Samapico Posted December 18, 2008 Report Posted December 18, 2008 Why is it more complicated to get a bitmap working with 2 colors than with 16millions of them... GRRRR I need to get this working to fix the huge memory usage of ASSS regions. It would basically be divided by 24 Also, I might have to make it display only one region at a time... which can be a good thing when you have 10 regions on top of one another anyway; it becomes a big grey mess. But if I can make it work like I want, I'll probably keep all the regions shown, but I'll show the selected region on top of the others, with its full color... So far... I managed to -create the monochrome bitmap in memory...-make weird things to be able to store the color palette (of 2 colors, yay)... It did this weird thing... When I use GetDIBits, which gathers the bitmap data itself so I can save it to a file or something, it fills the color palette in the header... cool... but at the same time, it resets the 'number of colors' entry in that same header... That's just really weird :/ Had to save that number before, GetDIBits, then store the palette colors one by one... bleh. -It doesn't 'fail' when attempting to draw on the bitmap... But still nothing shows upEDIT: had a flash just as I wrote that last sentence, and I got it to draw something, YAY! Now I have to be able to make it the color I want It's getting late... actually it's been late for several hours already... It's so late that it's actually very soon too. Some people get up at this time of the day.. hmm... it's 4am lol.Oh well... holidays ...
Samapico Posted December 19, 2008 Author Report Posted December 19, 2008 IT WORKS NOW Sketter will be testing what I've done in a few minutes... I'll see if it fixes the memory problem. I put a file in the downloads for the latest test versionhttp://www.ssforum.net/index.php?autocom=d...s&showcat=1I'll try to keep it updated as I make minor changes between releases. You can subscribe to it if you really want to stay up-to-date or if you want to give feedback.
Samapico Posted December 19, 2008 Author Report Posted December 19, 2008 Ok... Apparently the fix for the regions IS working. It's possible to open more region-intensive maps without getting a blank screen. But it seems I'm still unable to effectively free the memory used by the display layers on inactive maps... There are 6 layers for each map opened, on a 1024x768 resolution that means 3MB x 6 = 18MB for each map opened. Normally, it should only take 18MB total, only for the active map, instead of 18MB for each of them.I might go the lazy way and make these layers global and have only one instance of them instead of having them declared in each map...
Recommended Posts