Build 3718
SVN-
Generale
Fix GTK build
Nickname SVN e nomi Git sono unificati per persona.
Fix GTK build
Fix two bugs found by Clang's undefined behavior sanitizer.
- Return early from drawsprite_classic() if tspr->owner if oob. Commonize that check between renderers into bad_tspr(). - Make the BIT() macro a left-shift of the *unsigned* number 1, preventing expansion to (1<<31).
Fix debugging builds with Clang 3.2 and up.
In those Clang versions, -fcatch-undefined-behavior was replaced by -fsanitize=<what>. For Clang 3.2, we enable the address sanitizer and for 3.3 also the miscellaneous undefined behavior one. Currently, there's no version auto-detection from the Makefiles, it's set to 3.3 and the others are commented out.
Generalize ZRANGE and ANGRANGE to accept any nonnegative number.
Numbers 0 and 1 mean 'no spread', but the latter does one krand() call. Negative numbers are reserved for potential future use.
My love/hate relationship with git stash is quickly becoming a hate/hate relationship. :p
Fix TARGET sprites used as switches, introduced in r3679.
In G_LoadAddon(), remove inner 'struct grpfile *grp', fixing uninited access.
... four lines later. I don't know if that is the intended semantics for this function, but nasal demons is clearly not what we want. Please review!
Fix two harmless warnings and reindent one switch block.
Also, make G_LoadAddon() local to game.c.
Lunatic (map-int VX) build: implement loading <V7 maps.
auto-detect LameDuke's PALETTE.DAT and read tables accordingly.
LameDuke's shade table has 32 gradients of shade, like Duke3D. For the translucency table though, only the diagonal + one half is stored because it's symmetric (50/50 translucency).
Support adding custom grps to the selector in the startup window. To use this feature, create a file with a ".grpinfo" extension in your EDuke32 directory, following this template:
grpinfo { name "YourGameName" scriptname "yourgame.con" defname "yourgame.def" size yourgrpsize dependency DUKE15_CRC flags GAMEFLAG_ADDON crc yourgrpcrc } The "flags" field can also take the value "GAMEFLAG_DUKE" to define a new base game. Since this is the first commit of a new feature, certain semantics of the implementation and syntax are liable to change as necessary.
Don't write SelectedGRP to eduke32.cfg when using the Megaton compatibility "-addon" parameter.
Automatically execute mapname.cfg at map load time. This allows different maps in mods to have different rendering settings (shadescale, etc). This is not currently suitable for standalone user maps as there's no functionality to reset such cvars back to default at the next map load (so, if using this in a mod, every map needs to have a cfg).
Fix startup problems stemming from SelectedGRP = "" ending up in eduke32.cfg
a.m32: add user variable 'override_basepal'.
Set it to >=0 to override the base palette (water, slime, ...) in 3D mode. This can be useful to navigate Lameduke's underwater sections, since its LOOKUP.DAT only contains 8 lookup tables, but no other *base* palettes. Consequently, base palettes >=1 will make the whole screen black when Lameduke's LOOKUP.DAT is loaded into EDuke32 or Mapster32.
Revert an awful stupidity I committed in r3700.
Remove 'cl_angleinterpolation' cvar because it had no effect for a while.
Also remove the two instances of commented out code, but not the respective CON structure access code.
Classic drawmasks(): if sprite is on other side of maskwall, always draw it first.
This fixes the bug reported here: http://forums.duke4.net/topic/5340-bug-with-masked-walls/page__view__findpost__p__123233 But I haven't checked the change for any adverse effects.
engine.c: stylistic tweaks of drawmasks().
in tsprite access, fix checking min/max/RO; tweak RESPAWN preview.
This fixes RESPAWN preview wrongly clamping the previewed tsprite z coords to [-524288 .. 524288] (x/y limits). Also, make the previewed tsprites be 33% translucent with the option of 66% translucency by setting 'showrespawn_fulltrans' to 1 in a.m32.
in quick tile selection [G], if tile is nonexistent, revert it.
tweak the 'loaded map' message a bit.
- colorize the trailing part if there is corruption or (new) if sprites were removed - also corrupt-check when loading <V7 map - move start{pos,ang,sectnum} to build.c - remove pointless ...[].extra = -1 before loading map, scantoasc*[] comment
Lunatic/OS X: generate bytecode in object files from LuaJIT.
osxbuild.sh: Add 'clean' preset, deleting files missed by 'make veryclean'.
OS X: Pass -Wno-narrowing only with GCC 4.3+, fixing arttool build on my setup.
osxbuild.sh: new option --lastrev, 'dummyhelix' preset.
OS X: Write eduke32.log to ~/Library/Logs unless -usecwd is given.
Mask the seam that shows up when drawing the scuba HUD overlay in OpenGL by drawing SCUBAMASK 3 times... once at the left position + 1, and then at the proper left and right positions. It's definitely a hack, but at least it lives on the game side of things.
Fix building against libpng 1.6, which removed png_sizeof
Fix A_MoveSprite() wrongly reporting sector hit without z change after r3678.
Fix SPRITES_OF_SECT_SAFE macro. Oops!
gameexec.c: in VM_Fall(), comment out dead code, small indentation change.
TROR no-SE7 water: spawn splash, reuse calculated other sector number.
Improve on the code that handles changing sectors of projectiles.
- In the A_MoveSprite() code that transports projectiles due to an SE7 (introduced in r1450 / legacy ROR), only report "success" if the transportation succeeded. - Clear newly introduced internal SPRITE_DIDNOSE7WATER flag after checking it.
In G_MoveStandables() CRACKx handling, fix oob access of DynamicTileMap[].
Also, in two cases, don't assign A_IncurDamage() result to a variable if it's not needed.
Fix a couple of issues identified in the preceding commit.
- In S_PlaySound(), move the sound index bound check above an indexing. - For A_CheckHitSprite(), and A_FindPlayer(), allow NULL second arg. - In A_ShootWithZvel(), make some one-letter vars be int32_t, making storing safeldist() results in them meaningful. - In MaybeTrainKillEnemies(), remove two redundant checks and move another one further up. - Comment that SIDEBOLT1 will never be translucent as was probably intended. - In G_MoveFX(), fix an always-true comparison.
Fix the inventory icon selector's positioning to match v1.5 (reported by Fox [1]). While we're at it, move it according to ud.statusbarscale for aesthetic purposes.
Add cvars "hud_statusbarmode" and "r_rotatespritenowidescreen".
Center the x-position of BOTTOMSTATUSBAR displayed to the screen so an extra-wide one would display correctly.
Let me know if this breaks any mods that have #2462 with an x-dimension other than 320.
Fix a signed/unsigned comparison.
Fix a "duplicate const" error.
Fix reading the GOG and Steam paths for Win64 builds.
Fix "Error setting gamma ramp: DDERR_INVALIDPARAMS" on 64-bit.
Fix Mapster32 crash caused by custom s_buildRev strings longer than five characters.
(Note: We are still vulnerable to crashes here (and likely in other places), but you have (4096-16) extra characters to work with. We should consider replacing many uses of Bsprintf with Bsnprintf.)
Add newlines to some diagostic log messages that lack them and need them.
Fix the pause during display of TENSCREEN.
In upward moving enemy code of VM_Move(), consider TROR boundaries.
This fixes liztroops not passing TROR layers when on the jetpack, as well as other enemies capable of moving upward, and also COMMANDER and DRONE (for which the code is special-cased).
build.lua: add .sectsperbunch to map table, useful for TROR stats w/ findmaps.sh
Also, sync MAXBUNCHES to new limit in lunatic/defs_common.lua.
fix test.elua after map-int VX and one rename, add one microbenchmark.
Mostly engine and some gameexec.c stylistic changes.
in hitscan and getzrange, skip sprites if sprite part of clipmask is 0.
... like was done with clipmove() previously. Also, do some code clean up. There are no changes of functionality.
Fix something I fucked up with GRP scanning when I added support for the Megaton addon GRPs.
Silence "may be used uninitialized" warning, use Batoi() for user input.
Nag: The behavoir of atoi() is *undefined* if "the value of the result cannot be represented" (C99 7.20.1). Note: my nagging about undefined behaviors will *not* get less over time. :P
print the "Saved board" message more persistently.
new-generation map format, in-memory representation ("map-int VX").
The Lunatic build compiles with new structures for sector and wall types. They have separate members for TROR {up,down}{bunch,nextwall}, so there are no conflicts with other uses of members into which they were previously shoehorned. Also, the maximum bunch limit is bumped to 512 in that build. Currently, loading from V7/8/9 and saving to V7 and V8 are supported.
move utility scripts to util/, bittest.lua -> test/test_bitar.lua.