January 2012
-
General
more internal cleanup...
Show details
the only visible change is that polymost_trytexcache (formerly two instances of nearly duplicate code) now prints a diagnostic after a cache miss. The one that one is most likely to encounter is "r_downsize doesn't match", meaning that this setting likely differs between Mapster and the game.
-
General
a couple more trivial tweaks
-
General
md4.c/h: add consts to appropriate arguments
-
General
sounds.c: check the sound number before accessing arrays with it; always do
Show details
this in "(unsigned)i < bound" fashion.
-
General
trivial formatting / removing of old cruft / adding comments
-
General
animvpx sound: fix the 'may have many sounds per frame' requirement
Show details
E.g. this should work correctly now: // FLY_BY, PIPEBOMB_EXPLODE, OCTA_DYING animsounds logo { 1 244 64 14 64 144 }
-
General
Possibility of specifying sounds for a VPX anim-replacement via DEF.
Show details
The syntax is as follows: animsounds <anim> { frame1 sound1 frame2 sound2 ... } <anim> has to be one of the tokens: cineov2, cineov3, RADLOGO, DUKETEAM, logo, vol41a, vol42a, vol4e1, vol43a, vol4e2, or vol4e3, corresponding to hard-coded Duke3D anims. The frameN's (1-based frame numbers) have to be in ascending order (but not necessarily strictly ascending, so that a frame may have more than one sound). Example: for Duke3D's XBLA nuke logo animation (IVF extracted from nuke.webm), the following definition overlays the video with a sound sequence similar (identical save for timing) to the original nuke animation: // frame 1: FLY_BY, frame 64: PIPEBOMB_EXPLODE animsounds logo { 1 244 64 14 }
-
General
In VPX 3 planed --> packed conversion code, pull constant expressions out of
Show details
the loop. For the release build and the test animation, this lowers the time to 3-4 ms per conversion of one frame on my desktop machine.
-
make the following static in polymost.c:
Show details
- texcacheindex *firstcacheindex, *curcacheindex - trytexcache(), gloadtile_cached() - Factor out duplicated code into clear_cache_internal()
-
General
Makefile.common: oops, -DNEBUG was in the debug build, not the release one
-
General
osxbuild.sh: don't build for ppc
-
General
When defining a model with the 'model' token and there were errors, don't
Show details
let it hang around causing trouble later on; delete it right now and inform the user. Add a couple of 'static's to some functions and file scope data in mdsprite.c
-
General
- When saving game, clear all polymer lights before. Not doing this makes
Show details
the SE ones douple, triple, ... after each save. Maphack lights are reloaded with polymer_resetlights() (though I've had them disappearing after load, I couldn't reproduce it afterwards). - in debugging builds, print a message when polymer_resetlight is called on a nonexistent one. The problem is not so much the call itself (it's guarded), but the fact that resources on the caller side may not have been freed if it thinks that those lights do in fact exist. Right now, it's not the case though. - add 'loaded map hack' messages after some other successful loadmaphack calls
-
General
When loading a game, DON'T restore 'adult' TV tiles. This fixes the recent
Show details
crashes. Usually, after loading a game, some wall tiles are tweaked depending on whether adult mode is enabled or not. If it's not, those wall picnums are replaced with blank or broken screens. If it is, they are restored from the wall's .extra member. Apparently though, Mapster32 leaves some .extra members floating around even after deleting a TROR nextwall link (it's used as the 'lower wall index'). Because MAXWALLS is greater than MAXTILES, this may produce out-of-bounds accesses and corrupt memory (besides setting wall tilenums to nonsensical values) later in the game. Other than that, the change only affects loading savegames created with adult mode OFF. Kinky TV screenies simply won't be restored then.
-
General
savegame.c: some const void **ptr -> void **ptr, since they're certainly not const
-
General
trivial tweaks: some NULLing pointer after freeing them; move the 'too much mirrors'
Show details
check one 'if' down since mirrors are only created when the condition holds
-
General
Pass bit 16 to P_SetGamePalette from CON's setgamepalette (forgotten from earlier commit)
-
General
Patch up access of malloc'd buffer one byte beyond its size in kplib's
Show details
JPEG decoder (unearthed by valgrind).
-
General
In G_NewGame(), call Gv_RefreshPointers after Gv_ResetVars.
Show details
Resetting the gamevars might produce inconsistencies between an earlier loaded game (for example, if it was saved with different/earlier CON code), and worst of all, the gamevars that reference C variables might be overwritten (i.e. the addresses to those variable, which is very bad!).
December 2011
-
General
- Format CON crash output in VM_ScriptInfo() much more nicely.
Show details
- Execute VM_ScriptInfo() when DNDEBUG is used.
-
General
Comment ldcty[12] array from kpegrend() to remove last of set-but-unused warnings. I don't see any reason to leave this alone.
-
General
a.m32 light hotkeys: clamp hitag (range) to 0..32767 instead of 0..16000
-
make the 'palette' player member actually return the player's palette ID
Show details
instead of -1. Setting is still only through 'setgamepalette'.
-
General
Besides the performance issues, there's another reason why changing the palette
Show details
'frequently' isn't such a good idea. Assume an actor constantly changes the palette to some value and you're attacked by a newbeast at the same time. Then the pain tinting would be reset each time the actor's code is run. This commit adds a new flag 16 to setbrightness(), meaning "don't reset the fade tinting". Its only use right now is from CON's setgamepalette command (and there, always). The change is done in the engine and thus affects all platforms.
-
General
Trivial tweaks of setbrightness. Add an assertion that bits 1 and 4 are clear,
Show details
mainly. Also remove setvgapalette() from source.
-
General
The earlier changes introduced bugs when palettes were not set correctly in
Show details
certain situations (mostly cutscenes etc). This commit removes bit 1 from all flags that make it to setbrightness, the meaning of which is "don't actually update the palette". I have no idea what it was for and since the corresponding P_SetGamePalette() calls were from places like the mentioned cutscenes, I don't think it matters performance-wise.
-
General
SDL layer: don't call SDL_SetGammaRamp() if there would be no change.
Show details
This is in the similar vein as the set-palette deferring and it's this that fixes the low FPS in the radioactively contaminated area in AMC TC: Megabase (since setgamma() is called from setbrightness()). Again, update issues might be expected, but changing focus between EDuke32 and the desktop and back seems to restore the gamma settings properly on Kubuntu. Looks like X (or whatever above handles this stuff) maintains it on a per-application basis.
-
General
SDL layer: in 8-bit mode, defer setting the palette until showing the next frame.
Show details
CON code sometimes uses 'setgamepalette' from withing actors, which is a bit too frequent. Deferring the actual palette updating means that multiple requests in between two screen redraws are coalesced into one, which is desirable for performance reasons and for the reduction of 'tearing' artefacts (but not prevention, since the drawing isn't synced to the screen refresh rate with vsync off). (Did-not-)update issues might be introduced. Windows isn't touched because - I expect it to be more brittle, especially in light of the ATI HW gamma problems. - I haven't tested whether the particular performance penalty that lead to this change ('gas' in AMC TC) exists there too
-
remove the old inversion and PCX code from the source
-
if compiled with USE_LIBPNG, always use PNG, even for
Show details
color-inversed shots. For both PNG and TGA, change the way they're done in 8-bit mode: instead of XORing every byte with 15, save the inverse palette (each component taken 255-x).
-
General
savegame.c: fix compilation warnings with release build, add timing for debug
-
General
Factor out two nearly identical pieces of code in game.c and gameexec.c
Show details
into G_HandleMirror().
-
make smoststart[] (which saves starting "smostcnt"s) an array of int32's
Show details
instead of shorts. This fixes their values' overflow in AMC TC megabase and probably a couple of other large maps.
-
fix bug in Net_ParseServerPacket introduced with SAMESIZE_ACTOR_T.
-
General
Fix sintable access with raw angle value (which might be outside [0..2047])
Show details
in overhead map drawing code.
-
General
patch up another out-of-bounds access in the voxel drawing code, though
Show details
I'm not sure whether the increased array size is enough.
-
General
savegame.c: fix initial setting of compression threshold on savegame load;
Show details
64-bit fixes
-
General
start CON code at script[3] instead of script[1]. The 'move' command permits
Show details
the constants 0 and 1, and moveptrs may reference the script up to index 2 then (though I'm not sure whether the code is reachable with moveofs either 0 or 1), so make sure it's nulled instead of whatever happened to compile at the first two positions. Move 1 is only used once in the original cons, when frozen and being shattered.
-
General
fix displaying the screenshot even for old-version savegames.
-
send BYTEVERSION as two bytes, high byte first.
Show details
Now we don't need to worry about the numbers running out soon. Bump BYTEVERSION by three to celebrate this, too.
-
General
Enable SAMESIZE_ACTOR_T described earlier.
-
General
Rewrite the savegame format in terms of the generic saving/loading system.
Show details
This makes savegames practically the same as the initial snapshot of a demo. Saves are now named 'dukesavX.esv' (demos: 'edemoX.edm'). Additionally, many changes that couldn't/needn't be cleanly separated are added with this commit: - make spriteext_t have the same size across 32/64 bit platforms (actor_t partially) - prevent saving/loading in MP games (it certainly didn't work and still doesn't) - it's time we start using assertions! Define NDEBUG for releasse builds. - reset savegame major and minor versions (we have a new magic string, so no conflict)
-
General
Rewrite a couple of lines in clearfrags() to look more idiomatic.
-
General
Beauty tweaks; revert s_buildDate since we don't want windows builds to pull
Show details
snapshots in the current development state now.
-
General
Fix non-TROR build and add a warning that such a build is only useful for
Show details
debugging, i.e. savegames and the like will break.
-
General
Eh, fix out-of-bounds issue in clearfrags() with MAXPLAYERS players.
Show details
It was identified with the clearfrags rewriting, but not corrected.
-
General
Factor out filename-based music setup code into G_SetupFilenameBasedMusic.
Show details
There were two instances of nearly identical code in premap.c and savegame.c. Also identifies a (harmless) problem with realloc'ing, we had: if (len+1 > sizeof(MapInfo[...].musicfn)) MapInfo[...].musicfn = Brealloc(MapInfo[...].musicfn, len+1) which reallocs almost all the time (since .musicfn is a pointer). Now we do realloc every time...
-
General
premap.c: write out inline function clearfrags() for clarity.
-
General
misc. cleanup in savegame.c
-
General
Rewrite EDuke32's -d<demofile> option parsing code. Writing into argv[i]
Show details
isn't very wise. Also resize firstdemofile[] to BMAX_PATH bytes.