August 2012
-
fix build on OS X, pass LUNATIC define to build/ sources.
-
fix hex literal parsing on Windows, add two comments.
-
add 'stat' module for running statistics.
Show details
Also, rewrite the mapastats iterator and the LIZTROOP hitscan timing in terms of that.
-
add 'randgen' module, implementing an encapsulated JKISS PRNG.
Show details
Also fix error handling path in our_require(), i.e. when loadstring fails.
-
General
gethitickms(): replace division by multiplication.
-
add 'geom' module, sporting a vec2 type and a general 'intersect' func.
-
update DukePlayer_t, fix build.
-
General
Factor out 5 instances of functionally identical code into G_ClearCameraView().
July 2012
-
General
OSX build: mighty tweak osxbuild.sh and link to LibPNG from Fink on x86_64.
Show details
The build script now has two more presets: helix and installtools (which was previously attempted after the build; untested). Also, - when detecting git, run commands such that the SVN repo isn't accessed - package kextract, kgroup and arttool into tools/ in the zip - try to exit on failure in some places, though that doesn't seem to work
-
General
osxbuild.sh: factor out building commands and exit 1 on failure
-
on x86 GCC asm builds, fix crash with floor sprites of (x or y) size 2.
Show details
The idiv instruction also signals an FPE when the resulting *signed* quotient overflows, so we simply use div instead.
-
build fix on Windows and translator fix with 32-bit archs?
Show details
erratum in r2844 commit message: ydim vs. bytesperline --> xdim vs. bytesperline
-
General
Add gethitickms() to the Windows layer.
-
General
Make DukePlayer_t's transporter_hold an int16_t again.
Show details
This was narrowed to int8_t in r1625, breaking CON code that wanted to lock the player for a longer time than 127 game tics.
-
General
Prevent integer div-by-0 (SIGFPE) when drawing console background with void tiles.
Show details
The tiles used are BIGHOLE (1141) and VIEWBORDER (3250). Ideally we'd draw the console background using something specially-coded instead of rotatesprite if it's fully black anyway.
-
General
Fix SHOW MAP ON/OFF message in the game.
-
General
PNG screenshots: fix oob read of malloc'd mem on Windows.
Show details
These could manifest themselves as garbage lines on the bottom and happened because of the ydim vs. bytesperline discrepancy again.
-
General
Add custom-built lean zlib and libpng and enable PNG screenshots on Windows.
Show details
Instructions on how I built the libs are in Windows/src/minipng.dfa.
-
time every event and actor call and print summary at game exit.
-
add "bit array" helper module, rewrite the bit test in terms of that.
-
protect user modules from tampering, too.
-
more bitop profiling; make undeclared-var reads forbidden in modules
-
override 'error' so that a string is always returned to C.
-
module(), require() for custom modules, bit op test from LJ homepage.
-
General
In game.c's kopen4loadfrommod, use snprintf.
-
fix underwalls being not animated (introduced in r2823).
-
clamp GL texture to edge if possible, preventing potential stray lines
-
don't call I_ClearAllInput() before idle loop.
Show details
If input is cleared before, it can become impossible to cancel the video when decoding and displaying a frame takes longer than a frame.
-
collect times while playing the video and print a summary to the log afterwards.
-
General
Update LibVPX prebuilt library and headers to git commit 3eb4143fc3381497128d.
Show details
The library was built with GCC 4.6.1 and configured like ./configure --disable-vp8-encoder --disable-multithread --disable-spatial-resampling On the aforementioned AMD system, this reduces the mean time for decoding a frame from 18.2 to 15.4 ms, so IMO it's worth the somewhat hefty addition of 430 Kb.
-
unroll 3 planes -> packed conversion loop.
Show details
On an AMD Phenom II X4 system with generic memory modules, this brings down the mean time for this conversion from 16.5 to 10.5 ms. (GCC 4.6.1, optimized build)
-
extend must-fail tests with a check for the expected error messages.
-
overridden 'require', currently for base modules only.
-
make baselib functions used in defs.c local, be more disciplined with stack.
Show details
Also, print a backtrace if we return to C with an error.
-
General
a.m32: in collect_*_sectors from the 'F menu, start query with sector under mouse
-
General
Revert hightile factoring for now.
-
General
This should fix the "assignment discards 'const' qualifier" warning in music.c.
-
simplify some code while I'm at it (equivalence tranformations only)
-
bring the ypanning correction for non-pow2 walls closer to Pmost's, pt2
Show details
This changes a constant inside the panning calculation from 256 to 255 (making e.g. panning 255 and 0 the same in the "San Andreas fault" sign in E1L5) and uses the correct reference wall for the "do panning correction?" conditional. Now, the problematic walls should look the same as in Polymost.
-
bring the ypanning correction for non-pow2 walls closer to Pmost's, pt1
Show details
This makes the corrections conditional on where they appear in (under-, over-, white or mask wall).
-
General
a.m32: add some commented out example code for the screenshot functionality.
-
draw walls with non-pow2 ysizes in the old fashion for the time being.
Show details
I'm willing to make this one concession to correctness in the name of backward- compatibility. I think that one reason why this has never cause a crash is that tiles in BUILD are allocated in Ken's big allocache buffer, so oob accesses were dampened by that (though they hit uninitialized data).
-
EVENT_DRAW3DSCREEN, screenshot functonality.
Show details
The event is run after drawing the scene, but before the overlays. To make a screenshot from a script, set DOSCRSHOT to non-zero. It will then be scheduled to run once after the drawing but before the above-mentioned event. The screenshots will be called mcapXXXX.{png,tga}.
-
General
Comment out printext256's GL mode fallback code.
Show details
This would only hit when polymost_printext256 erred out (mem alloc failure, glGenTextures failure), i.e. "almost never". Also, tweak a bound check in polymost_printext256.
-
if printext256's <col> arg is negative, use editorcolors[-<col>].
Show details
The editor colors are the ones listed on page 9 of the Mapster32 built-in help.
-
factor out y panning coefficient calculation code.
-
General
Add ART loader for the LuaJIT BUILD struct loader module, 2 more examples.
Show details
The map iterator now has init/finish capability, making it possible to write scripts that aggregate data over multiple map files. One such example calculates some statistics, the other loads art metadata and looks for red walls with non-pow2 ysize tiles.
-
General
Add LuaJIT-based BUILD map loader and batch processing script + example.
-
General
Update our prebuilt MinGW libogg/libvorbis/libvorbisfile to the newest versions, courtesy of forum user LeoD
-
factor out wall y panning coefficient calculation.
Show details
Non-pow2 wall/mask drawing in classic introduced cases where walls are drawn "incorrectly" because they were constructed with the old behavior in mind. Polymer appears to "correct" for it partially, but doesn't cover all cases. Specifically, now we have: - E1L1 first inside secret room (5000, 50000): Polymer draws like Duke 1.5, classic now draws with an offset. - E3L2 near the vault (-20000, 25000): both classic and Polymer draw with offsets compared to Duke 1.5, but they're different! This means that more research is needed into what makes these two cases diverge, even though both have the same root cause. !!! Also, mappers should abstain from using non-power-of two textures on walls until this issue is resolved in a satisfactory fashion !!!