Gennaio 2012
-
Generale
more internal cleanup...
Mostra dettagli
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.
-
Generale
a couple more trivial tweaks
-
Generale
md4.c/h: add consts to appropriate arguments
-
Generale
sounds.c: check the sound number before accessing arrays with it; always do
Mostra dettagli
this in "(unsigned)i < bound" fashion.
-
Generale
trivial formatting / removing of old cruft / adding comments
-
Generale
animvpx sound: fix the 'may have many sounds per frame' requirement
Mostra dettagli
E.g. this should work correctly now: // FLY_BY, PIPEBOMB_EXPLODE, OCTA_DYING animsounds logo { 1 244 64 14 64 144 }
-
Generale
Possibility of specifying sounds for a VPX anim-replacement via DEF.
Mostra dettagli
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 }
-
Generale
In VPX 3 planed --> packed conversion code, pull constant expressions out of
Mostra dettagli
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:
Mostra dettagli
- texcacheindex *firstcacheindex, *curcacheindex - trytexcache(), gloadtile_cached() - Factor out duplicated code into clear_cache_internal()
-
Generale
Makefile.common: oops, -DNEBUG was in the debug build, not the release one
-
Generale
osxbuild.sh: don't build for ppc
-
Generale
When defining a model with the 'model' token and there were errors, don't
Mostra dettagli
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
-
Generale
- When saving game, clear all polymer lights before. Not doing this makes
Mostra dettagli
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
-
Generale
When loading a game, DON'T restore 'adult' TV tiles. This fixes the recent
Mostra dettagli
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.
-
Generale
savegame.c: some const void **ptr -> void **ptr, since they're certainly not const
-
Generale
trivial tweaks: some NULLing pointer after freeing them; move the 'too much mirrors'
Mostra dettagli
check one 'if' down since mirrors are only created when the condition holds
-
Generale
Pass bit 16 to P_SetGamePalette from CON's setgamepalette (forgotten from earlier commit)
-
Generale
Patch up access of malloc'd buffer one byte beyond its size in kplib's
Mostra dettagli
JPEG decoder (unearthed by valgrind).
-
Generale
In G_NewGame(), call Gv_RefreshPointers after Gv_ResetVars.
Mostra dettagli
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!).
Dicembre 2011
-
Generale
- Format CON crash output in VM_ScriptInfo() much more nicely.
Mostra dettagli
- Execute VM_ScriptInfo() when DNDEBUG is used.
-
Generale
Comment ldcty[12] array from kpegrend() to remove last of set-but-unused warnings. I don't see any reason to leave this alone.
-
Generale
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
Mostra dettagli
instead of -1. Setting is still only through 'setgamepalette'.
-
Generale
Besides the performance issues, there's another reason why changing the palette
Mostra dettagli
'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.
-
Generale
Trivial tweaks of setbrightness. Add an assertion that bits 1 and 4 are clear,
Mostra dettagli
mainly. Also remove setvgapalette() from source.
-
Generale
The earlier changes introduced bugs when palettes were not set correctly in
Mostra dettagli
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.
-
Generale
SDL layer: don't call SDL_SetGammaRamp() if there would be no change.
Mostra dettagli
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.
-
Generale
SDL layer: in 8-bit mode, defer setting the palette until showing the next frame.
Mostra dettagli
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
Mostra dettagli
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).
-
Generale
savegame.c: fix compilation warnings with release build, add timing for debug
-
Generale
Factor out two nearly identical pieces of code in game.c and gameexec.c
Mostra dettagli
into G_HandleMirror().
-
make smoststart[] (which saves starting "smostcnt"s) an array of int32's
Mostra dettagli
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.
-
Generale
Fix sintable access with raw angle value (which might be outside [0..2047])
Mostra dettagli
in overhead map drawing code.
-
Generale
patch up another out-of-bounds access in the voxel drawing code, though
Mostra dettagli
I'm not sure whether the increased array size is enough.
-
Generale
savegame.c: fix initial setting of compression threshold on savegame load;
Mostra dettagli
64-bit fixes
-
Generale
start CON code at script[3] instead of script[1]. The 'move' command permits
Mostra dettagli
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.
-
Generale
fix displaying the screenshot even for old-version savegames.
-
send BYTEVERSION as two bytes, high byte first.
Mostra dettagli
Now we don't need to worry about the numbers running out soon. Bump BYTEVERSION by three to celebrate this, too.
-
Generale
Enable SAMESIZE_ACTOR_T described earlier.
-
Generale
Rewrite the savegame format in terms of the generic saving/loading system.
Mostra dettagli
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)
-
Generale
Rewrite a couple of lines in clearfrags() to look more idiomatic.
-
Generale
Beauty tweaks; revert s_buildDate since we don't want windows builds to pull
Mostra dettagli
snapshots in the current development state now.
-
Generale
Fix non-TROR build and add a warning that such a build is only useful for
Mostra dettagli
debugging, i.e. savegames and the like will break.
-
Generale
Eh, fix out-of-bounds issue in clearfrags() with MAXPLAYERS players.
Mostra dettagli
It was identified with the clearfrags rewriting, but not corrected.
-
Generale
Factor out filename-based music setup code into G_SetupFilenameBasedMusic.
Mostra dettagli
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...
-
Generale
premap.c: write out inline function clearfrags() for clarity.
-
Generale
misc. cleanup in savegame.c
-
Generale
Rewrite EDuke32's -d<demofile> option parsing code. Writing into argv[i]
Mostra dettagli
isn't very wise. Also resize firstdemofile[] to BMAX_PATH bytes.