Subversion Repositories eduke32


Go to most recent revision | Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
4895 2287d 14h terminx /polymer/eduke32/source/gamevars.h Clean up/refactor a few gamevar related functions based on building as C++/C99 and some interesting articles I read about how GCC and Clang optimize switches. Worth a few FPS here.  
4839 2303d 2h helixhorned /polymer/eduke32/source/gamevars.h In C-CON build, prevent leak of gamevar/gamearray labels on savegame loading.

Also, rewrite the loops in Gv_Free() and Gv_Clear() in the plain fashion so
that they are correct even if the number of gamearrays exceeds the number of
4762 2335d 11h hendricks266 /polymer/eduke32/source/gamevars.h Fix some things when building on OS X. DONT_BUILD.  
4755 2337d 0h helixhorned /polymer/eduke32/source/gamevars.h Fix C build and build on Linux/SDL2.

- for the first point: 'struct glattribs sdlayer_gl_attributes[]' was defined
at file scope, but 'glmultisample > 0' is not a compile-time constant.
- for the second point: r4749 changed the meaning of some conditional
compilation (supposedly, unintentionally). I'm reverting it to pre-r4749
but keeping the rewritten style. It's concerned with mouse thumb buttons.
4747 2337d 6h terminx /polymer/eduke32/source/gamevars.h Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.  
4745 2337d 7h terminx /polymer/eduke32/source/gamevars.h Mainly misc cleanups (and a fix for the C++ build), but there are a few important changes in here.

VM_OnEvent() has become VM_OnEvent(), VM_OnEventWithReturn(), VM_OnEventWithDist(), and VM_OnEventWithBoth() (the latter of which is only ever used once...). Of course, this required every call to VM_OnEvent() be changed.

memberlabel_t and vmstate_t have been changed to use the regular "int" type versus explicitly specifying int32_t as they did previously. The rationale for this change is simply that it looks cleaner, and I think we should move toward just using "int" in most cases where there's no particular reason to specify an explicit data type.

Also changes CON_KILLIT to just "return" instead of "continue". DONT_BUILD.
4735 2351d 21h helixhorned /polymer/eduke32/source/gamevars.h C-CON: fix 'readgamearray' and 'resizearray' on Windows.

We must not use Xrealloc(), since gamearrays are now allocated with
NOTE: I did not check all potential problematic cases, only those to get
LNGA3 up and running.
4698 2361d 2h terminx /polymer/eduke32/source/gamevars.h Aligned gamevar/gamearray allocation  
4680 2365d 15h terminx /polymer/eduke32/source/gamevars.h Another 5000 lines of pain and tears. DONT_BUILD.  
4658 2365d 16h terminx /polymer/eduke32/source/gamevars.h Various additional optimizations: add CLASSIC_SLICE_BY_4 mode to unroll some of the loops in a-c, replace integer divisions by a divisor unknown at compile time with usage of libdivide, clean up pragmas further by removing more old stuff that wasn't used anywhere. This is another one of those nasty commits that make people cry. DONT_BUILD.  
4631 2390d 15h terminx /polymer/eduke32/source/gamevars.h Gamevar cleanup: drop "register" qualifiers, shuffle a few things around.  
4541 2462d 10h hendricks266 /polymer/eduke32/source/gamevars.h Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.

4286 2631d 22h helixhorned /polymer/eduke32/source/gamevars.h Lunatic: Fix compilation of C++ build, but not starting up yet.

3848 2875d 5h helixhorned /polymer/eduke32/source/gamevars.h 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
3830 2878d 1h helixhorned /polymer/eduke32/source/gamevars.h Lunatic: also reset per-actor gamevars from spawns originating from C.

Take care not to do it twice. Still untested though.
3791 2889d 0h helixhorned /polymer/eduke32/source/gamevars.h Remove redundant checks for some map state function uses.

Also, prettify G_FreeMapState(), remove some duplicate function decls and
resurrect 'savestate' and 'restorestate' OSD commands for the debug build.
3789 2889d 0h helixhorned /polymer/eduke32/source/gamevars.h Lunatic: conditionally compile out more code in savegame/gamevars.[ch].

Also, make the savegame major version 2 in the Lunatic build.
3556 2956d 8h helixhorned /polymer/eduke32/source/gamevars.h Lunatic translator: handle LOGO_FLAGS.

This is the only gamevar of its kind that is handled for Lunatic, neither
3459 2989d 22h helixhorned /polymer/eduke32/source/gamevars.h Move around some #ifdef LUNATIC to compile out more code, minor cleanup.  
3417 3007d 22h helixhorned /polymer/eduke32/source/gamevars.h CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.

In CON, the bit is still always cleared for user-defined gamevars.

Show All