[svn3826] fix for NPOT textures in ascii mode; more sizes
Posted: Wed Jul 13, 2011 2:52 am
I missed something when I made 48x48 tile size more fully available here (I can't take full credit--it was already partially available in the code):
When ASCII graphics modes were used, it would create non-power of two (NPOT) textures, which ought to be avoided. On my system, this caused a small border to appear around the ASCII tiles with background, and some gfx cards may not even be able to handle NPOT textures at all.
So, I attached a patch to ensure power-of-two textures. For kicks, I also included even more tile sizes: 16, 20, 25, 32, 40, 51, and 64 (i.e., sizes := round(16*4**(1/6.0*i)) for i=0..6). If I were more familiar with making dialogues in ToME, I could have had the dialogue accept an integer size as input. As it is, though, these should provide enough options for players, and the code modifications are simple enough to include in the upcoming beta without fear of having a debilitating bug
. I should note that I also made ASCII outline/shadows scale with the different tile sizes, so using power-of-two textures for NPOT sizes doesn't affect the visual aesthetics much at all.
When ASCII graphics modes were used, it would create non-power of two (NPOT) textures, which ought to be avoided. On my system, this caused a small border to appear around the ASCII tiles with background, and some gfx cards may not even be able to handle NPOT textures at all.
So, I attached a patch to ensure power-of-two textures. For kicks, I also included even more tile sizes: 16, 20, 25, 32, 40, 51, and 64 (i.e., sizes := round(16*4**(1/6.0*i)) for i=0..6). If I were more familiar with making dialogues in ToME, I could have had the dialogue accept an integer size as input. As it is, though, these should provide enough options for players, and the code modifications are simple enough to include in the upcoming beta without fear of having a debilitating bug
