Is it possible to load GRAPHICS into dos, if so, what would be the BASIC code........

Started by
2 comments, last by sonicteam 21 years, 6 months ago
Ok, Lets say I wanted to load a few graphics into a DOS window, how would I go about doing that? I have seen this done with some EMulater Utilites I grabed off of Zophar.net Its called SNESUtl, if you ever have the chance please go check it out. You see, Im not to excitited about coding windows yet. I just read a few pages of a "Refrence to Windows Guide" and I decided I am not ready for complex programing, so I''ll just stay in dos prgraming. Dont rush it, I think it''s better if you take your time with this, really. So, if anyone knows how to load any type of graphic(If it may be Fancy Text, Thats fine)Anything, Please reply. p.s. please now replies telling me that I am just a n00b and I should not worry about this aspect of programming yet... well anyways, thanks GDnet gurus! #include <Sonicteam.h> int main() { cout << "SONICTEAM " << ''\n''; peace....
Advertisement
here is the basic code algorthm / steps you''ll need

1st. PutPixel...you''ll need to be able to place a pixel of a certin color on the screen.... if you cannot do that, you cannot load any graphics..

2nd. choose a file format, bmp, raw, and tga are easy....I''d say start with one of those

3rd. Research. Wosit,etc and bone up on the file format of your choice...

now code:
4th. (maybe) Load the header of the file format you choose from documentation

5th. parse the information you gleem from the header into each seperate pixel, and display the pixel on the screen...

the end....

hopefully that will get you started...
~~~~~Screaming Statue Software. | OpenGL FontLibWhy does Data talk to the computer? Surely he's Wi-Fi enabled... - phaseburn
Er, if you think Windows graphics is hard, you really don''t want to look at MS-DOS graphics. Unless you use a ready-made graphics library. Allegro was quite popular if memory serves - do a web search on it as the DOS version is probably still available. If you don''t go this route, you''re going to need to do some pretty hairy stuff, programming right down to X86 interrupts and possibly even messing with bits of assembly language, depending on what you want to achieve.

(Audio is even worse, which is another good reason for using a third-party library like Allegro.)

Go for Windows DirectX, or OpenGL on Windows, Linux (or BeOS). Or MacOS X. Or ANYTHING but MS-DOS. Trust me, videogame development on MS-DOS is dead for a *damned* good reason.

Incidentally, Windows isn''t hard. Most of it is just boilerplate code which you only ever need to write once. Initialisation code often looks hairy, but once written, you can hide it out of the way and just focus on the meat. In addition, most modern operating systems require similar boilerplate code, so once you''ve wrapped your head around the Win32 architecture, you won''t have trouble picking up, say, Linux or MacOS X.

DirectX''s reputation for being a bit tricky is deserved, but much less so today than in the past. (Part of this is because DirectX handles more than just graphics.) However, if you want an easier learning curve, go for OpenGL, which is just graphics and often viewed as better for a beginner to start with. (It''s the API most university graphics programming courses use.)

Hope this helps.

--
Sean Timarco Baggaley
Sean Timarco Baggaley (Est. 1971.)Warning: May contain bollocks.
go to www.cprogramming.com
click on "tutorial", scroll down, and you will see Graphics Programming Tutorial. that one is for DOS. good luck.

My compiler generates one error message: "does not compile."
My compiler generates one error message: "does not compile."

This topic is closed to new replies.

Advertisement