raze-gles/polymer/eduke32
hendricks266 6cc62ea2bf Fix the display of numbers with TEXT_GAMETEXTNUMHACK and TEXT_XOFFSETZERO. (Fix level stats, part 2.)
The commit revises the definition of qstrdim when TEXT_[XY]OFFSETZERO are used. With these flags, the offsets the user specifies are now the only dimensions the function cares about in terms of tile placement, so depending on the difference between the offset(s) and the size of the final tile, it may be slightly more or less than the dimensions actually displayed on the screen because tile size is never taken into account. (For example, if your font is nominally 9x7 like the Duke bluefont and you use a TEXT_XOFFSETZERO of 5 with a string five characters long, the total x dimension will be 25 even though the last character will overhang that amount by four pixels. If you use a TEXT_XOFFSETZERO of 12 with the same string, the total x width will be 60 even though there will be three pixels of empty space on the right edge.) This change was made because assigning text an arbitrary constant width in general implies an intent to keep character positions constant even with a variable width font, but returning the visible span of pixels on the screen that the tiles cover would have caused the string to move when alignment options other than the top-left were used. In other words, you can now safely use TEXT_[XY]OFFSETZERO with the alignment options and the text won't jiggle.

Also, with TEXT_GAMETEXTNUMHACK, numerals are now effectively TEXT_XOFFSETZERO text that respect the above paragraph, so number count displays can look nice with alignment options too.

Having to modify the extent/offset code makes me realize that I'm not quite happy with its structure because it gets tangled juggling different concepts like character width, X offset, and spacing, and how they relate when the line wraps or in terms of the final size. Fortunately, it produces correct results as far as I know, and it's not necessarily ugly, just hard to understand. Handle with care.

git-svn-id: https://svn.eduke32.com/eduke32@3850 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-03 05:26:44 +00:00
..
build Lunatic/classic: in TROR maps (V10), enable non-power-of-two wall drawing. 2013-06-01 20:09:39 +00:00
package Test commit from SVN since I may have bricked my local git clone. (r3796 doesn't show up as SVN-committed for me, partial commit?) The change itself is a very small tweak in m32help.hlp. 2013-05-20 19:50:35 +00:00
platform osxbuild.sh: Add 'clean' preset, deleting files missed by 'make veryclean'. 2013-04-17 20:34:54 +00:00
rsrc Support high DPI setups for the startup dialogs on Windows 2013-05-23 18:27:06 +00:00
source Fix the display of numbers with TEXT_GAMETEXTNUMHACK and TEXT_XOFFSETZERO. (Fix level stats, part 2.) 2013-06-03 05:26:44 +00:00
Makefile Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
Makefile.common Lunatic: fix randgen module after md4 removal, run DEFS_BC_SIZE cmd only once. 2013-05-17 10:41:57 +00:00
Makefile.deps Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
Makefile.msvc Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
eduke32.sln Source code "cleanup," herein referred to as "rape" 2010-05-02 23:27:30 +00:00
eduke32.vcxproj Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
eduke32.vcxproj.filters Dynamicsoundremap. 2013-06-01 06:55:30 +00:00