Dynamically generated static background!!!

Started by
1 comment, last by Buxter_Baxter 20 years, 10 months ago
Hello I have this code: for(mapx = 0; mapx <= 10; mapx++){ for(mapy = 0; mapy <= 11; mapy++){ if(map[mapy][mapx]==1) g_pDisplay->Blt( 100+(32*mapx), 100+(32*mapy), BackSurface, NULL); } } Is there a way to save that as a whole and Blit it any time needed, I am just worried about the performance? ~ Petar ~
Advertisement
Are you blitting onto the primary surface? Not a good idea

In any case, you can make a screen-sized surface and just blit that when you need it. It probably won''t be significantly faster than what you are doing now, though, and you''d be eating a lot of memory.
By the time the game is finished I might have more than 5 or 6 surfaces so that is going to be one of them...

This topic is closed to new replies.

Advertisement