Commit Graph

3861 Commits

Author SHA1 Message Date
helixhorned 16b3cb6a42 LunaCON: showview and showviewunbiased.
git-svn-id: https://svn.eduke32.com/eduke32@3861 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 14:26:32 +00:00
helixhorned 5e5f80d61b Lunatic: keep status number symbols in actor.STAT instead of gv.STAT_*.
git-svn-id: https://svn.eduke32.com/eduke32@3860 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 14:26:30 +00:00
helixhorned a57ce255e7 Allow negating an action's viewtype 5 or 7, meaning to x-flip the shown sprite.
git-svn-id: https://svn.eduke32.com/eduke32@3859 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:21 +00:00
helixhorned 528366da46 Lunatic: add preliminary helper code for local gamevar saving.
git-svn-id: https://svn.eduke32.com/eduke32@3858 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:20 +00:00
helixhorned 34138cdc96 Lunatic: fix current incarnation of gamevar saving/restoration.
git-svn-id: https://svn.eduke32.com/eduke32@3857 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:17 +00:00
helixhorned a0f00e28c3 Lunatic: prettify listglobals.sh output.
git-svn-id: https://svn.eduke32.com/eduke32@3856 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:16 +00:00
helixhorned ddb0d3f63d LunaCON: properly generate references to gamevars named like Lua keywords.
git-svn-id: https://svn.eduke32.com/eduke32@3855 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:15 +00:00
helixhorned 7725544ef1 LunaCON: free a couple of file-scope local slots by storing stuff in tables.
git-svn-id: https://svn.eduke32.com/eduke32@3854 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:12 +00:00
helixhorned 03693fc13b kplib: don't write an int32_t where a char is expected.
git-svn-id: https://svn.eduke32.com/eduke32@3853 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-06 11:22:39 +00:00
helixhorned 335fa81b18 game.c: fix out-of-bounds write in G_GetSubString().
git-svn-id: https://svn.eduke32.com/eduke32@3852 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-06 11:22:38 +00:00
helixhorned f8c04673b4 Lunatic: tweak sector.STAT.* and other names a little.
git-svn-id: https://svn.eduke32.com/eduke32@3851 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-06 11:22:35 +00:00
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
hendricks266 e74ac19cd2 Fix display of level stats by fixing G_ScreenText() handling of (orientation & 2).
git-svn-id: https://svn.eduke32.com/eduke32@3849 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-03 05:26:24 +00:00
helixhorned 185597d3b3 LunaCON: proper handling of dynamic remappings with weapon defaults.
That is, the gamevars named WEAPONx_* in CON will now have the remapped value
if they were not overridden from CON ('gamevar' at file scope).
For C-CON, everything except signaling an override from the CON parser is in
place.

git-svn-id: https://svn.eduke32.com/eduke32@3848 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-02 14:07:56 +00:00
helixhorned 882eb4cb8b LunaCON: hook up dynamicsoundremap.
git-svn-id: https://svn.eduke32.com/eduke32@3847 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-02 14:07:52 +00:00
helixhorned 229a996d40 Make S_MenuSound() use stack'd array to get rid of S_StaticToDynamicMenuSound().
git-svn-id: https://svn.eduke32.com/eduke32@3846 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:46 +00:00
helixhorned 7fcb577f51 LunaCON: hook up qstrdim and screentext.
Also add some recent keywords to the list in con_lang.lua which I had
forgotten all along.

git-svn-id: https://svn.eduke32.com/eduke32@3845 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:45 +00:00
helixhorned 75313a78c8 Lunatic: sector[].ceiling/.floor gets a reference to a ceiling-or-floor struct.
Also, make sector[].*stat a bitint type.

Now, a piece of code could look like this:
local sec = sector[i]
local ceil = sec.ceiling
ceil.statx:flip(sector.STAT.SMOOSH)

git-svn-id: https://svn.eduke32.com/eduke32@3844 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:43 +00:00
helixhorned 51ad20eda5 Lunatic: fix a couple of oversights, tweak some stuff.
git-svn-id: https://svn.eduke32.com/eduke32@3843 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:42 +00:00
helixhorned e0433e66fb LunaCON: real user per-player vars.
The previous behavior was to translate them as global gamevars, since LunaCON
currently has no support for multiplayer. However, then some errors would be
missed where such gamevars are accessed in no-player context
(e.g. EVENT_ENTERLEVEL).
On by default, disabled with -fno-playervar.

git-svn-id: https://svn.eduke32.com/eduke32@3842 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:41 +00:00
helixhorned 358c7eb28b Lunatic/classic: in TROR maps (V10), enable non-power-of-two wall drawing.
Also, fix clearing a bunch in new-format-map (=Lunatic) build.

git-svn-id: https://svn.eduke32.com/eduke32@3841 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:39 +00:00
helixhorned f0ed046a98 LunaCON: fix mistranslation of CON "else { if" to Lua "elseif".
When encountering a non-empty statement inside braces, emit "do" ... "end".

git-svn-id: https://svn.eduke32.com/eduke32@3840 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:37 +00:00
hendricks266 e0a373893a Replace use of preprocessor macro WIN32 with _WIN32. (Blame clang.)
git-svn-id: https://svn.eduke32.com/eduke32@3839 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:57:00 +00:00
hendricks266 899f19155d Make improvements utilizing G_ScreenText().
git-svn-id: https://svn.eduke32.com/eduke32@3838 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:56:28 +00:00
hendricks266 e483dbefcd For all HUD and text shadows that use pal 4, also use shade 127.
git-svn-id: https://svn.eduke32.com/eduke32@3837 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:56:13 +00:00
hendricks266 bf9b91352b Text wrapper conversion.
G_PrintGameText(), minitext_(), G_DrawTXDigiNumZ(), and menutext_() now wrap G_ScreenText().
G_GameTextLen() now wraps G_ScreenTextSize().
G_DrawDigiNum_() now wraps G_DrawTXDigiNumZ().

git-svn-id: https://svn.eduke32.com/eduke32@3836 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:56:00 +00:00
hendricks266 4504716fa0 Prettify the DEF progress meter by relocating '\n' en masse.
It should be transparent even with the meter disabled.

git-svn-id: https://svn.eduke32.com/eduke32@3835 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:55:46 +00:00
hendricks266 4297507c8f Dynamicsoundremap.
git-svn-id: https://svn.eduke32.com/eduke32@3834 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:55:30 +00:00
hendricks266 ced47cf9fc Add qstrdim and screentext, powerful new functions for HUD text.
git-svn-id: https://svn.eduke32.com/eduke32@3833 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:55:00 +00:00
hendricks266 4375a3c261 Remove an unused variable from startwin.game.c.
git-svn-id: https://svn.eduke32.com/eduke32@3832 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:54:29 +00:00
hendricks266 297dfcdfc7 Update credits.
git-svn-id: https://svn.eduke32.com/eduke32@3831 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-31 05:08:46 +00:00
helixhorned 5bfbfa3c5b Lunatic: also reset per-actor gamevars from spawns originating from C.
Take care not to do it twice. Still untested though.

git-svn-id: https://svn.eduke32.com/eduke32@3830 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:59 +00:00
helixhorned 97f857ec39 Lunatic: split 'replace' option for actor chaining flags into soft/hard.
Hard replacement reassigns the tile flags, while soft replacement bitwise
ORs them, as in CON (since some flags might already have been set using
commands like spritenoshade).

git-svn-id: https://svn.eduke32.com/eduke32@3829 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:54 +00:00
helixhorned 020be8d4b5 Lunatic: reset per-actor gamevars on actor spawn, untested.
git-svn-id: https://svn.eduke32.com/eduke32@3828 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:52 +00:00
helixhorned ed5613bf57 Compile DEF progress meter only on Windows or if having the startup window.
The latter checked with #defined HAVE_GTK2, which is probably not correct
for every platform.
In builds without a startup window, the periods get mingled with stdout
output otherwise.

git-svn-id: https://svn.eduke32.com/eduke32@3827 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:50 +00:00
helixhorned 640eda2194 LunaCON: implement 'definegametype', allow writing userdef.level_number.
Also, allow (implicit) actor index -1 to 'sound' like in C-CON and fix
MULTIMODE gamevar definition (was 0, not 1).

git-svn-id: https://svn.eduke32.com/eduke32@3826 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:49 +00:00
helixhorned 593b82692e Mapster32: allow setting first walls of TROR sectors independently.
In 3D mode, Alt+F now only attempts to set the first wall of the aimed at
wall, not collecting upper/lower neighbors. For this, press Shift+Alt+F.
In 2D mode, they are always collected.

git-svn-id: https://svn.eduke32.com/eduke32@3825 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:45 +00:00
helixhorned 4457a5fbca Fix potential oob access when flipping the floor [F] in 2D mode.
git-svn-id: https://svn.eduke32.com/eduke32@3824 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 09:13:34 +00:00
helixhorned 560f88b022 Replace inline "qsetmode==200" checks with in3dmode().
Analogously for the negation; remove a couple of redundant decls of "qsetmode".

git-svn-id: https://svn.eduke32.com/eduke32@3823 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 09:13:32 +00:00
helixhorned 1715b7631f Make deletion of an ambient sound MUSICANDSFX sprite stop its sound again.
Add a test case source/lunatic/test/delmusicsfx.lua.

git-svn-id: https://svn.eduke32.com/eduke32@3822 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-28 19:52:51 +00:00
helixhorned 360aae414f Lunatic: add actor.delete() and various 'length' methods to geom.vec3/ivec3.
git-svn-id: https://svn.eduke32.com/eduke32@3821 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-28 19:52:48 +00:00
helixhorned a52130a996 C-CON: remove "found `gettspr' outside of EVENT_ANIMATESPRITES" warning.
Because one may obviously use gettspr/settspr in states called from that
event.

git-svn-id: https://svn.eduke32.com/eduke32@3820 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-28 19:52:45 +00:00
helixhorned e71bc9d19d Polymost: fix 'zadd' DEF token handling. (Polymer has it right.)
git-svn-id: https://svn.eduke32.com/eduke32@3819 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-26 18:42:59 +00:00
helixhorned a02ab83319 With DNCOORDS display, print number of sprites currently on the screen.
Only in debugging builds.

git-svn-id: https://svn.eduke32.com/eduke32@3818 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-26 18:42:56 +00:00
helixhorned 13b69711ac LunaCON: add a couple of ud members, gamevars; handle 'dynamicremap' only once.
Also, allow MAXVOLUMES+1 to first arg of 'music'.

git-svn-id: https://svn.eduke32.com/eduke32@3817 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-26 18:42:53 +00:00
terminx 4e9cf9722a Well then, I sure fucked that last commit up didn't I
git-svn-id: https://svn.eduke32.com/eduke32@3816 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-25 22:50:46 +00:00
terminx e3dedb19ee Fixes a crash after killing the boss in Duke 0.99 and fixes the issue with WGR2 SVN being detected as 0.99 due to malformed definelevelname statements
git-svn-id: https://svn.eduke32.com/eduke32@3815 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-25 20:25:39 +00:00
terminx 06713baf8d Fix a reference to "RDR_POLYMER" that was missed in startgtk
git-svn-id: https://svn.eduke32.com/eduke32@3814 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-25 06:11:38 +00:00
helixhorned c366388a9e Lunatic: -Wchained-loadactor option for LunaCON, clear errors on restart.
The last only in release builds.

git-svn-id: https://svn.eduke32.com/eduke32@3813 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-24 13:54:39 +00:00
helixhorned 6f94af7399 LunaCON: implement dragpoint, clipmove*; fix gamearray serialization.
git-svn-id: https://svn.eduke32.com/eduke32@3812 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-24 13:54:37 +00:00