Archived

This topic is now archived and is closed to further replies.

Wanting to put an image on screen. Any good tutorials?

This topic is 6661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Doh!
ehhe
Sorry... And thanks for pointing that out...
I was wanting to know how to do it on DOS -> DJGPP, but in fact I dont know how to do it on Direct X, also, so it'd be very kewl to know both =]

Thanks again,
-RoTTer

Share this post


Link to post
Share on other sites
I really recommend that you create your own graphics format (you'll have to write your own sprite editor though).

Because bitmap (and other formats) may have different palettes.

This can be very annoying because you can only display 1 palette (in 256 color screenmode).

Share this post


Link to post
Share on other sites
Well in the directx sdk look at the ddutil.cpp file. It contains code to load .bmp files of any depth to a directdraw surface where you can then blit them. As far as djgpp really goes its mainly just a matter of parsing the format header then reading in the data. I would say to start with .bmp because in my opnion its the easiest to make a loader for. As far as palettes go... Really all you do is draw everything in 24bit then put all the pics on on big pic and have the paint program reduce it all to indexed color. It well generaly do a good job. Otherwise just run in 15+ color(thue harder to do in dos).
Hope this helps some do a search on the net im sure you can find an example for djgpp.
If fact i think i might have a link to one.
well this isnt what i was looking for but this seems to have alot of very usefull stuff for djggp http://www.geocities.com/SiliconValley/Park/8933/
Also you might look into allegro for dos ,but as far as the industry is right now directx is the thing.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks both for the reply =]

Lemme reply both in this message :
bosjoh - Yeah, I tried that once, kinda long ago, but managed to make it only 16 colors images, lol. But I think Ill retry it, its not that bad... Although being able to load other file formats would be better, as Id be able to download pictures, have friends do it for me, or, eventually, I draw my owns (ugh! :P ) on a decent drawing app =]

Zenroth - Uhm... I think I gotta buy a Windows programming book, cause I s*ck bad in Visual programming, and C++ programming, also...eheheh, but thanks anyway =]
Im looking the site you gave the link, and it seems very good :>

Well, thanks you both for the reply, and Ill try to do something about the images =P

Cya,
-RoTTer

Share this post


Link to post
Share on other sites
Hello!

I want to put an image loaded from HD as a sprite on my games. Any file format would do (er, I mean, by any : BMP, GIF, PCX or JPG... but preferably GIF or JPG). Im not very (er, read "very" as "any") good in programming, so I didnt manage to make some PCX ones I got work... But o, well...hehe If anyone can help, Id be very happy =]

Cya,
-RoTTer

Share this post


Link to post
Share on other sites