From: David B. <dav...@gm...> - 2010-07-07 14:36:05
|
Hi Wenyuan, > > Pressing F10 will require scaling of all menu sprites to the new > resolution. It used to take like 5s without caching. Now it roughly > takes 1-2s. But you have spotted a bug too! I tested the program and > indeed it is instantaneous when switching in-game. The reason is that > it doesn't scale the menu items. As a result, if you then quit the > game and return to the menu, all sprites will still be as big as in > fullscreen mode, resulted in a clipped screen. I suspect this bug was > present in the older versions too, i.e. before SVG caching was > introduced. I will look into it. So now, if someone presses F10 when the menus are displayed, what happens? Are the sprites already scaled and cached at the new resolution, so the program just has to read them from disk? Or do they have to be scaled? If the latter, it might be a good job for a secondary thread to scale and cache the sprites at the "other" resolution (either 640x480 or fullscreen) once they have been prepared for the current resolution. We also might consider keeping both sets of sprites in memory, at least optionally depending on the amount of system memory. Regards, David |