🎉 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!

Tilesets and Windowed mode.

Started by
0 comments, last by Sphet 24 years, 6 months ago
Uhh.. if I have a windowed directX game using tiles, I can only create directX surfaces that are as big as the smallest screen size I want to support (640x480). Anything larger than that and the surface creation will fail. I would use my own memory for my tiles to overcome this problem, except I am relying on the LoadBitmap/GetDC method of converting from 24 bit to 16 and icky 8 bit mode. Anyone else trying to deal with this? Some of my tiles are 128x128 which means I can get 15 tiles in a 640x480 area. I am going to need tones of surfaces for this to work. Or should I use my own memory / bitmap manager and do the 24 to 16 bit conversion myself, ignoring 8 bit mode for now (maybe later include 8bit specific graphics which would look better than the WinAPI 24 to 8bit conversion anyways)?

erg.

Advertisement
the method of using LoadImage/GetDC is the method i use. if you are concerned with wide surface support (i remember reading somewhere that in dx5+ it was no longer an issue, or at least not much of an issue, because you can always create surfaces in system memory), then i will suggest the following...

the use of LoadImage/GetDC is still a perfectly suitable way to do the image conversion. however, nobody ever said that you have to blit the ENTIRE bitmap image onto the surface. you could just blit a portion of it, lock that surface, and pull the image data out of it (thus saving yourself the trouble of writing your own conversion code). so, you could work with just a single surface, BitBlt the bitmap onto it however many times you need to to get all of the image data out and into whatever user-defined structure you want. of course, you'll then have to write custom blitting code, and make special code for allowing transparency and whatnot.

Get off my lawn!

This topic is closed to new replies.

Advertisement