raze-gles/polymer/eduke32/source
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
..
enet Replace use of preprocessor macro WIN32 with _WIN32. (Blame clang.) 2013-06-01 06:57:00 +00:00
eobj Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir. 2013-03-04 04:14:19 +00:00
eobj_win Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir. 2013-03-04 04:14:19 +00:00
jaudiolib Fix playing ambient sounds at max volume for split sec on entering their range. 2013-03-31 18:58:17 +00:00
jmact Add rudimentary sanity checks when playing ANM files. 2013-03-31 18:57:59 +00:00
lunatic LunaCON: proper handling of dynamic remappings with weapon defaults. 2013-06-02 14:07:56 +00:00
misc Support high DPI setups for the startup dialogs on Windows 2013-05-23 18:27:06 +00:00
obj Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir. 2013-03-04 04:14:19 +00:00
obj_win Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir. 2013-03-04 04:14:19 +00:00
util Tools updates: 2012-11-15 06:42:37 +00:00
_functio.h Lunatic translator: update default defines. 2012-11-25 13:18:41 +00:00
_midi.h Fix JonoF's email address. 2012-03-12 04:47:04 +00:00
_rts.h Updated synthesis script, moved some non-essential files around, updated license headers on all non-BUILDLIC files, added memory cache on top of texcache to improve load times, moved some duplicated keyboard handling stuff from winlayer/sdlayer to baselayer, fixed keypad / in Mapster32 tile selector, fixed bug where p->rotscrnang and p->look_ang never reset to 0, added support for reloading maphack based polymer lights after mode changes/savegame loads, other minor changes 2010-05-25 10:56:00 +00:00
actors.c Make deletion of an ambient sound MUSICANDSFX sprite stop its sound again. 2013-05-28 19:52:51 +00:00
actors.h Tweak r3681 to obtain the same behavior in the pre-r3681 undefined behavior case. 2013-05-10 12:31:33 +00:00
actors_inline.c Clean up of mostly actors.c, but some other files along the way too. 2013-04-15 10:48:09 +00:00
actors_inline.h Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup. 2012-11-05 02:49:08 +00:00
anim.c Add rudimentary sanity checks when playing ANM files. 2013-03-31 18:57:59 +00:00
anim.h Possibility of specifying sounds for a VPX anim-replacement via DEF. 2012-01-10 23:43:54 +00:00
animvpx.c Take over and use static assertion macro found in LuaJIT sources. 2013-04-05 17:53:14 +00:00
animvpx.h Make ivfrate build standalone, Makefile tweaks. 2012-11-08 21:54:17 +00:00
astub.c Mapster32: allow setting first walls of TROR sectors independently. 2013-05-30 18:10:45 +00:00
common.c Sanitize hard coded render mode numbers... replace all references to rendmode 0, 3, 4, etc with proper REND_CLASSIC, REND_POLYMOST, REND_POLYMER labels. 2013-05-17 03:44:09 +00:00
common_game.h Add support for shareware 0.99/1.0/1.1, for shits and giggles. 2013-05-23 18:28:04 +00:00
config.c Sanitize hard coded render mode numbers... replace all references to rendmode 0, 3, 4, etc with proper REND_CLASSIC, REND_POLYMOST, REND_POLYMER labels. 2013-05-17 03:44:09 +00:00
config.h Fix warning from r3128 2012-11-08 22:09:00 +00:00
demo.c Lunatic: cmdline switch to run test script, compile out more code, 2 more GVs. 2013-01-20 21:17:06 +00:00
demo.h In -d command line arg, allow specifying demo number in addition to file name. 2012-10-01 17:52:40 +00:00
duke3d.h Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
function.h Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup. 2012-11-05 02:49:08 +00:00
game.c Fix the display of numbers with TEXT_GAMETEXTNUMHACK and TEXT_XOFFSETZERO. (Fix level stats, part 2.) 2013-06-03 05:26:44 +00:00
game.h Make improvements utilizing G_ScreenText(). 2013-06-01 06:56:28 +00:00
game_inline.c Add qstrdim and screentext, powerful new functions for HUD text. 2013-06-01 06:55:00 +00:00
game_inline.h Add qstrdim and screentext, powerful new functions for HUD text. 2013-06-01 06:55:00 +00:00
gamedef.c Replace use of preprocessor macro WIN32 with _WIN32. (Blame clang.) 2013-06-01 06:57:00 +00:00
gamedef.h Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
gamedefs.h Remove some duplicate or unused control layer defines. 2013-02-25 15:31:22 +00:00
gameexec.c Fix display of level stats by fixing G_ScreenText() handling of (orientation & 2). 2013-06-03 05:26:24 +00:00
gameexec.h Make G_{Save,Restore}MapState() take no input arguments. 2013-05-19 19:29:26 +00:00
GameListSource.game.h Clean up some file and directory structure. 2012-12-29 10:54:35 +00:00
GameListSource.game.m Clean up some file and directory structure. 2012-12-29 10:54:35 +00:00
gamestructures.c CON parser: don't accept read-only gamevars for 1st arg of *sprite{sect,stat}. 2013-01-24 20:02:52 +00:00
gamevars.c LunaCON: proper handling of dynamic remappings with weapon defaults. 2013-06-02 14:07:56 +00:00
gamevars.h LunaCON: proper handling of dynamic remappings with weapon defaults. 2013-06-02 14:07:56 +00:00
global.c Add support for shareware 0.99/1.0/1.1, for shits and giggles. 2013-05-23 18:28:04 +00:00
global.h Add support for shareware 0.99/1.0/1.1, for shits and giggles. 2013-05-23 18:28:04 +00:00
GNU.TXT Importing source for great justice 2006-04-13 20:47:06 +00:00
GrpFile.game.h Clean up some file and directory structure. 2012-12-29 10:54:35 +00:00
GrpFile.game.m Clean up some file and directory structure. 2012-12-29 10:54:35 +00:00
grpscan.c Add support for shareware 0.99/1.0/1.1, for shits and giggles. 2013-05-23 18:28:04 +00:00
grpscan.h Add support for shareware 0.99/1.0/1.1, for shits and giggles. 2013-05-23 18:28:04 +00:00
input.c Relax CAPITALIZATION restrictions. 2013-03-25 04:31:09 +00:00
input.h Massive menu input control revamp/cleanup/factor. (added: input.[ch]) 2012-06-03 16:11:22 +00:00
keys.h Updated synthesis script, moved some non-essential files around, updated license headers on all non-BUILDLIC files, added memory cache on top of texcache to improve load times, moved some duplicated keyboard handling stuff from winlayer/sdlayer to baselayer, fixed keypad / in Mapster32 tile selector, fixed bug where p->rotscrnang and p->look_ang never reset to 0, added support for reloading maphack based polymer lights after mode changes/savegame loads, other minor changes 2010-05-25 10:56:00 +00:00
m32def.c a.m32: Implement a Polymer "head light" emanating from your position in 3D mode. 2013-04-05 17:53:31 +00:00
m32def.h Add "rotatespritea" to CON and M32script. 2013-03-25 04:33:03 +00:00
m32exec.c Replace inline "qsetmode==200" checks with in3dmode(). 2013-05-30 09:13:32 +00:00
m32structures.c Sanitize hard coded render mode numbers... replace all references to rendmode 0, 3, 4, etc with proper REND_CLASSIC, REND_POLYMOST, REND_POLYMER labels. 2013-05-17 03:44:09 +00:00
m32vars.c LunaCON: proper handling of dynamic remappings with weapon defaults. 2013-06-02 14:07:56 +00:00
macros.h Fix two bugs found by Clang's undefined behavior sanitizer. 2013-04-29 19:24:19 +00:00
mapster32.h Split r3159..r3161, part 14: The rest. 2012-11-15 14:28:47 +00:00
mdump.cpp Superficial text changes: 2012-03-26 05:05:57 +00:00
mdump.h 1. Removed unneeded the svn:executable proprties. These files aren't actually executable. 2008-07-12 14:09:52 +00:00
menus.c Make improvements utilizing G_ScreenText(). 2013-06-01 06:56:28 +00:00
menus.h Minor menu cleanups, only half-finished (if that). 2012-10-14 22:16:07 +00:00
midi.c Split r3159..r3161, part 10: add explicit casts to *alloc return values. 2012-11-15 14:28:29 +00:00
midi.h Fix JonoF's email address. 2012-03-12 04:47:04 +00:00
mpu401.c Win64 support! (Meaning it works, not that we recommend it for everyday use.) 2012-12-13 02:37:20 +00:00
mpu401.h Fix JonoF's email address. 2012-03-12 04:47:04 +00:00
music.c This should fix the "assignment discards 'const' qualifier" warning in music.c. 2012-07-09 19:00:23 +00:00
names.h add two tile labels which Todd forgot to move from GAME.CON to DEFS.CON and therefore did not make it to names.h 2011-08-20 23:27:46 +00:00
namesdyn.c Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
namesdyn.h Lunatic translator: dynamic tile remapping. 2013-03-17 18:11:38 +00:00
net.c Fix playing ambient sounds at max volume for split sec on entering their range. 2013-03-31 18:58:17 +00:00
net.h Fix NETCODE=0 build. 2013-01-06 18:56:38 +00:00
old.diff Tweakery in various places. 2011-03-17 23:37:38 +00:00
osdcmds.c Make G_{Save,Restore}MapState() take no input arguments. 2013-05-19 19:29:26 +00:00
osdcmds.h Fix bound keys' commands being truncated in settings.cfg, control* cleanup. 2012-11-18 15:44:18 +00:00
osdfuncs.c Cleanup of console/on-screen-display (OSD) functionality. 2012-12-25 16:13:50 +00:00
osdfuncs.h Cleanup of console/on-screen-display (OSD) functionality. 2012-12-25 16:13:50 +00:00
player.c Fix one more 1<<31 calculation, remove one unneeded cast. 2013-05-04 16:36:08 +00:00
player.h Lunatic: replace DukePlayer_t set-member methods with metatable magic. 2013-04-07 15:20:41 +00:00
premap.c Replace inline "qsetmode==200" checks with in3dmode(). 2013-05-30 09:13:32 +00:00
premap.h Reimplement pixel doubling by drawing scene at 1/(2*2) resolution and expanding. 2013-01-20 21:17:31 +00:00
quotes.h Addition of 3 events: 2012-05-14 18:12:27 +00:00
rev.h Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup. 2012-11-05 02:49:08 +00:00
rts.c Add newlines to some diagostic log messages that lack them and need them. 2013-04-13 03:49:35 +00:00
rts.h Possibly fix another weird crash 2010-08-07 23:14:23 +00:00
savegame.c Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
savegame.h Lunatic: conditionally compile out more code in savegame/gamevars.[ch]. 2013-05-19 19:29:18 +00:00
sdlmusic.c For novelty, add support for RENDERTYPE=SDL under Windows. 2012-11-24 09:13:29 +00:00
sector.c Sanitize hard coded render mode numbers... replace all references to rendmode 0, 3, 4, etc with proper REND_CLASSIC, REND_POLYMOST, REND_POLYMER labels. 2013-05-17 03:44:09 +00:00
sector.h Make G_{Save,Restore}MapState() take no input arguments. 2013-05-19 19:29:26 +00:00
sector_inline.c Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup. 2012-11-05 02:49:08 +00:00
sector_inline.h Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup. 2012-11-05 02:49:08 +00:00
soundefs.h update soundefs.h to match the final v1.5 DEFS.CON 2011-08-20 23:27:58 +00:00
sounds.c Make S_MenuSound() use stack'd array to get rid of S_StaticToDynamicMenuSound(). 2013-06-01 20:09:46 +00:00
sounds.h Fix playing ambient sounds at max volume for split sec on entering their range. 2013-03-31 18:58:17 +00:00
sounds_mapster32.c Replace use of preprocessor macro WIN32 with _WIN32. (Blame clang.) 2013-06-01 06:57:00 +00:00
sounds_mapster32.h Rename SOUNDOWNER's (used in sound_t) member .i to .ow for easier grepping. 2012-03-10 21:22:44 +00:00
soundsdyn.c Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
soundsdyn.h Dynamicsoundremap. 2013-06-01 06:55:30 +00:00
standard.h Fix JonoF's email address. 2012-03-12 04:47:04 +00:00
startgtk.game.c Fix a reference to "RDR_POLYMER" that was missed in startgtk 2013-05-25 06:11:38 +00:00
startosx.game.m Clean up some file and directory structure. 2012-12-29 10:54:35 +00:00
startwin.game.c Remove an unused variable from startwin.game.c. 2013-06-01 06:54:29 +00:00
startwin.game.h Updated synthesis script, moved some non-essential files around, updated license headers on all non-BUILDLIC files, added memory cache on top of texcache to improve load times, moved some duplicated keyboard handling stuff from winlayer/sdlayer to baselayer, fixed keypad / in Mapster32 tile selector, fixed bug where p->rotscrnang and p->look_ang never reset to 0, added support for reloading maphack based polymer lights after mode changes/savegame loads, other minor changes 2010-05-25 10:56:00 +00:00
winbits.c Windows: Fix potential crash in version checker. 2012-11-29 12:49:41 +00:00