🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

i think this is a newbie question...

Started by
14 comments, last by raislam 22 years, 10 months ago
ok, i have been learning c++ for 4 years now and have been writing dos text-based programs... but, i got sick and tired of that, but i hadn''t found any books on loading bitmap files... i just want to load it to an offscreen surface so that i can use the RECT type to use them in a tile based game... what is the simplest way to load a bitmap to an offscreen surface? (could you explain how to do it either to load directly from a file instead of a rescource file?) thank you, ur help is very appreciated
Advertisement
What you are saying is you want to go into windows programming, or you want to load a .bmp from DOS?
------------------------------Put THAT in your smoke and pipe it
windows (i have the dx8 sdk now, i just updated... that was a big file...)
If I remember rightly, there is some example code of how to do this in the sdk. The file with the bmp loader is called something like ddutil.cpp at least that was the name in the dx7 sdk.
Anyway, I suggest that you look in the examples as the sdk''s tend to have a lot of quite easily understandable code.
Regards,
Devore
If you are needing help of this kind you need to get started from the ground up. I suggest that you get a good book on the subject such as "The Zen of Direct3D Programming" which also covers lots of 2D stuff similar to what you want to do.
HenryLecturer in Computer Games TechnologyUniversity of Abertay DundeeScotlandUK
I''d suggest you learn the Win32 API first. Try Programming Windows by Charles Petzold or Windows 98 Programming from the Ground Up by Herbert Schildt. After that, if you want to learn DirectX, I would suggest Tricks of the Windows Game Programming Gurus by André LaMothe.
is there any way to do it with 1 function, or just smaller? could i have some code that inserts a bmp file called "grass.bmp" with 32x15 dimensions... it is for an isometric game.. and if possible, some tiling code
is there any way to do it with 1 function, or just smaller? could i have some code that inserts a bmp file called "grass.bmp" with 32x15 dimensions... it is for an isometric game.. and if possible, some tiling code
There is no one little magical function to create a game for you. You have to do it yourself or use an API like DirectX or OpenGL.
i know that... i just want a DirectDraw function that displays a *.bmp file... i know that there is one, but i get a little lost when i go through the huge header files in the sdk...

This topic is closed to new replies.

Advertisement