Build 3637
SVN-
General
Prevent loading anything except the GRP from the Steam or GOG Duke3D install directories. Loading DUKE.RTS from those paths will be resolved later.
SVN handles and Git names are merged into one person.
Prevent loading anything except the GRP from the Steam or GOG Duke3D install directories. Loading DUKE.RTS from those paths will be resolved later.
Fix savegamevar/readgamevar breakage from r3579
Fix handling of SE31 pointing upward. A bug was introduced in r2607.
Fix ART offset and face sprite flipping interaction.
Fix ART offset and sprite flipping interaction.
Fix activated MUSICANDSFX wrongly being looped, introduced in r3631.
Fix playing ambient sounds at max volume for split sec on entering their range.
This is done by always calling FX_PlayAuto3D() to play such sounds. It now additionally takes a third argument 'loophow', permissible values being FX_ONESHOT and FX_LOOP.
In 'tip' display code, extrapolate four more values of the y coord table.
Also, for tip_incs values greater or equal than the number of elements in this table, return early reporting that the hand has been drawn, so that the otherwise selected weapon is not drawn.
chaining of actor callback functions.
For events and actors, a flag can be now passed whether to chain the new function at the beginning or end of an already existing one, or to replace it entirely. Also, for the translator, add option -fno-error-nostate, disabled by default.
Add rudimentary sanity checks when playing ANM files.
- Don't attempt to play an ANM file if it is empty (warn) or too short (error). - If failing to read IVF file header or initializing VPX codec, don't play ANM. - Return early from gltexapplyprops() if not in GL modes.
Add some test CON files to source/lunatic/test.
The code is mostly by other people, who are credited in the CON files.
Return early from A_IncurDamage() if actor[].picnum ("htpicnum" in CON) is < 0.
With this change, it is impossible for negative values to be used as array indices inside this function, and I believe that it is also impossible that they escape to somewhere they might be used as such. For Lunatic, allow setting actor[].picnum to negative values and in the translator, add (commented out) code to warn whenever it is set to a constant negative value. Also, fix a _sound call in _addphealth in control.lua.
make the crash log file named eduke32_or_mapster32.crash.log.
Don't output an empty SelectedGRP entry into the cfg, fixing bare EDuke32 build.
factor out 3x computing "alwaysshowgray", but don't change anything.
Tweak the code that adds the Steam and GOG Duke3D paths a little. This changes things so that we add the DOSBox version provided on Steam as a source for the GRP instead of their main content dir, bypassing loading their screwed up duke3d.def.
Load def modules even if no root def exists. Print a message to the log for each def module that is loaded.
Fix a multi-line comment in cache1d.c.
Correct the capitalization of NAPALM.
Fix loading of a user's previous "SelectedGRP" file.
Don't continue animating Ripper, Shrinker, Expander and Freezethrower when the game is paused or the menu is up.
Read GOG.com and Steam Duke3D install paths from the registry instead of hard-coding the default paths.
Fix shrunk player fist animation speed as requested on the forums. I didn't test this against the DOS version but it seems about right according to my memory. Let me know if it's still wrong and you care that much about it.
MSVC build fixes. The change to Makefile.deps is slightly questionable but it's not really an issue.
Fix a case in minitext_() overlooked by r3608.
(This should fix the inventory item box in the statusbar.)
Properly implement rotatesprite16 by adding ROTATESPRITE_FULL16 to orientation.
Add "rotatespritea" to CON and M32script.
I hope I didn't bruise Lunatic too much.
Implement alpha into rotatesprite (rotatesprite_) on the engine side.
Add orientation bit 2048, enumerated as ROTATESPRITE_FULL16, which is a courtesy provided by the engine for the purpose of the game to internally force use of full 32-bit coordinates. With this bit set, all CON screen drawing commands can use rotatesprite16-like coordinates.
While the functionality was already internally in place for gametext as one of two hacks using ROTATESPRITE_MAX (the other still used by minitext_() to align with the statusbar) we must codify a bit in the engine for safe external use. (Otherwise, ROTATESPRITE_MAX could/would theoretically increase and leave modders high and dry.) (Dev note: In G_DrawTXDigiNumZ(), ROTATESPRITE_MAX was used to bitshift the value used to calculate digit spacing for no reason I can ascertain other than to introduce rounding errors into the zoom/textscale calculations. It was never used anywhere, so I removed it.) Bonus: The scaling code for digitalnumberz and gametextz has been modified so that the spacing is no longer affected by rounding errors. Try animating the zoom value and compare how the text used to jump but now does not.
Hackily implement spriteext.alpha into Classic by internally attaching 33% and 66% to the cstat bits.
Relax CAPITALIZATION restrictions.
fix assertion failure with overlong walls in rintersect().
Lunatic translator: proper Lua->CON line mapping for actor/event/etc. headers.
return early with 0 from cansee() if either sector is >= MAXSECTORS.
Previously, only the <0 condition was checked. However, the passed sectnums could be >= MAXSECTORS (at least in C-CON), for example when issuing 'canseespr' on a sprite not in the game world.
readarrayfromfile: fail silently if file can't be opened.
simplify RETURN handling, make its behavior across events same as C-CON.
There's only one RETURN value on the C side (g_RETURN), which is also referenced from Lua. Upon entering an event, its value takes on the per-event default one, and its value when the event code finishes is passed back to the game. Independently of that, its value is always saved and restored across event calls.
add LuaJIT's 'dump' module, printing traced bytecode, IR and mcode.
don't wrongly report PANIC corruption with MAXSPRITES sprites present.
Lunatic t.: don't error on changing stat/sect of sprite not in the game world.
actor usertypes from CON, set SFLAGs as 2nd gameactor() arg in Lua.
In passing, fix a couple of omissions: gameactor() being passed nil's in the middle, more than one moveflag to CON *actor.
premap.c: fix oob access of tagbitmap[] with formerly negative lo-/hitags.
Also, allocate that array dynamically instead of on the stack.
make ivec3 and dvec3 types share same metatable, orthogonalize API.
Specifically, remove ivec3's blen1() method and add from/to BUILD coordinate (z scaled by 16) conversion methods.
slightly cleaner weapondata_t access.
Also, for the embedded translator: don't warn on unrecognized command line opt.
Clean up mdsprite.c:voxdraw() a little.
Clean up mdsprite.c:md3draw() by factoring out m->head.flags == 1337 check.
... into a macro MFLAGS_NOCONV(m). Since it currently expands to (0), some dead code will be eliminated. Introduce a "compilation option" macro DO_MD2_MD3_CONV in mdsprite.c.
Clean up mdsprite.c:md3draw() by factoring out spriteext[tspr->owner] access.
Make -testlua accepted (but ignored) in non-Lunatic build.
So that it doesn't result in the -t (respawn on) command line switch.
Clean up mdsprite.c:md3draw() by tightening locals, factoring out 2x dup code.
give sprite cstat 1024 a marco name, CSTAT_SPRITE_MDHACK.
Fix Mapster32. It runs now.
Add the default installation paths for the GOG.com release of Duke Nukem 3D: Atomic Edition and the Steam release of Duke Nukem 3D: Megaton Edition (if they exist) to EDuke32's search path.
Process ART animations on tspr->picnum early in all three renderers.
This enables ART animations to take effect on voxels in classic, voxels and models in Polymost, and models in Polymer.
Save the configuration files whenever a savegame is made.
Prevent the middle chaingun muzzleflash from animating its position when the player is frozen.
The unmodified behavior is completely wrong and I don't see how any mod could ever use it.
weapons.con.sample: Fix three C to CON porting bugs. Thanks to Fox for the reports.
(Modders who used an older version: Take a look at the SVN diff, the fixes can easily be applied by hand.)
Add to r3544.