Build 3093
SVN-
only let emitshadow affect shadows, not lightmaps.
Mostra dettagli
Lightmaps are already opt-in anyway.
Nickname SVN e nomi Git sono unificati per persona.
only let emitshadow affect shadows, not lightmaps.
Lightmaps are already opt-in anyway.
add support for negative lights
And hook them up to cstat 128 (half-submerged, 'c' in mapster).
add a prlight flag to make shadow-less spotlights
And hook it up to SE cstat 64 ('1' in mapster32). This disables both lightmaps and shadow maps for the spotlight; please let me know if you have a usecase where you want lightmaps but no shadow maps for specific lights.
Texel-granular hitscan() for wall-aligned sprites.
The attribute is set per tile from DEF: either texhitscanrange <begintile> <endtile> or tilefromtexture <tile> { ... texhitscan ... } (As a special case, the list may only contain "texhitscan", in which case the texture is not changed.) In passing, do some cleanup for "tilefromtexture" DEF parsing: the list tokens should now be accepted in any order, and errors don't appear in the middle of the list parsing.
Prototypical no-SE7 water submersion/emersion.
Submersion only happens when the upper sector has lotag 1 and its vertical neighbor has lotag 2 (this can be useful to create non-submergible above-water sectors). Currently, only the player is handled. On the implementation side, the water handling code is split into P_Submerge() and P_Emerge() preparing the "teleportation", and P_FinishWaterChange() for the finalization.
save command input history.
take over load path.
add an OSD command to be able to interface with stuff.
In savegames, store dummy constant-length block instead of a _prlight array.
sizeof(_prlight) differs across compilers, and besides, Polymer lights were not loaded anyway (they're restored live in-game later). The savegame version was not bumped, but only savegames made with builds where sizeof(_prlight)==261 (like synthesis) will stay compatible! Report and helpful debugging information by LeoD.
make 'corruptcheck_noalreadyrefd' a separate OSD command.
Instead of having 'noalreadyrefd' as a 'corruptcheck' subcommand. This way, TAB completion can be had.
factor out some code (3x) into GetSaveBoardFilename().
Factor out prepare/finish parts from load{old,}board(), misc. cleanup.
This means that loadoldboard() now should also initialize Polymer map info after loading a v5/v6 map. Make the variables holding a file descriptor an int32_t instead of int16_t.
A bit stylistic Polymost code cleanup.
Add compilation switch MODEL_OCCLUSION_CHECKING to polymost.h, leave it enabled.
Fix a.masm changes so MSVC builds work again. The relevant functionality seems to work (non-power of 2 textures drawn without error), even with CLASSIC_NONPOW2_YSIZE_WALLS defined in engine.c, but I'm not familiar with any corner or edge cases that need to be watched out for with this.
Note: CLASSIC_NONPOW2_YSIZE_WALLS is still not enabled in svn.
engine.c: Split CLASSIC_NONPOW2_YSIZE into _WALLS and _SPRITES, enable the second
engine.c: add compilation switches for non-pow2 ysize functions, disable for now.
Previously, we used them in our builds for sprites, but MSVC builds don't have the ASM ported to MASM, and thus the workaround of ignoring the linking errors was not safe.
foreachmap.lua: add option of only printing matching file names (like grep -l)
Also, add convenience wrapper script findmaps.sh for quickly searching for sprites/walls/sectors satisfying a certain condition in all map files under a given directory.
add check for sprites being out of the maximal grid range (+-524288).
Requested auto-correction will place such sprites at their sector's first point.
foreachmap.lua: add shortcut for quickly finding certain sectors/walls/sprites.
Make getangle() a __fastcall function instead of static inline.
This trims four 4k pages of code from the release EDuke32 build and one page from Mapster32.
In dosetaspect(), bail out calculating radarang2[] instead of failing assertion.
When this happens, parallaxmodes other than 0 will be unavailable and silently draw as parallaxmode 0. This usually happens with extremely wide resolutions.
Move #include <math.h> from polymer.h to polymer.c.
Remove some #if 0 blocks that are probably of no interest any more.
For reference, they are the following: - cache1d.c: suckcache() - build.c: compare_wall_coords() - make switch-invisible heuristic - Mapster32: old sprite search - Mapster32: manual z range - m32script: read/writearray, qgetsysstr - menus.c: savetemp()
Add EVENT_PREGAME. Now all sprites are processed in the following fashion:
1. EVENT_PREGAME 2. hardcoded stuff 3. EVENT_GAME One potential use is to examine values which are clobbered by commands such as ifhitweapon/ifwasweapon.
Quit the game if SE17 (warp elevator) setup fails.
The spawn-time SE 17 setup uses nextsectorneighborz() which can fail (return -1) on some circumstances and would cause an OOB sector[] access.
engine.c: rewrite nextsectorneighborz() for clarity.
build.lua map loader: add the option of canonicalizing sprite order.
This is mostly for debugging, since currently, Mapster32 restores sprites not in the same order as the original sprite index order. Also, expose this option from map2text.lua and mapdiff.sh.
for c&p-ing map portions w/o TROR, fix wrongly resetting wall lotag/extra
for copy-pasting map portions without TROR, fix wrongly resetting xpanning.
This is really an artifact of overloading the sector fields for different uses. For copy-pasting TROR'd portions, the bug still persists.
Keep full-screen tints through palette changes again.
A debug macro to test tints being stuck at the least intense non-zero value is provided in engine.c.
Make a colored REACTOR/REACTOR2 sprite disappear in single player again.
Noted by Nukey. See Duke3D 1.5 GAME.C line 4220.
properly reset highlights in undo/redo.
with highlighted sectors, print rot. angle; Alt + [,]: manual angle.
Because rotating sectors "smoothly" by 1 BUILD ang will quickly accumulate roundoff error, this lets the user first do that as a preview and then use the manual angle rotation do carry it out for real.
use the rotatepoint code for both smooth and 90-degree sect. rotation.
Factor out Polymost's widescreen bit handling code and use it in classic, too.
This means that classic and the GL modes now look the same as far as e.g. hud_bgstretch or HUD weapons are concerned.
polymost.c: rewite widescreen bit code, part 2.
Use integer math; both args to setaspect are constant.
Clean up classic's and Polymost's dorotatesprite functions (triv. changes only)
polymost.c: rewrite dorotatesprite's widescreen bit handling (256,512,1024).
Instead of setting and resetting the [xy]dim globals, use them as locals in a block (shadowing the globals). Also, do some common subexpression elimination for clarity.
use updatesector instead of *z.
When shrunk, the player position is below the floor for some weird reason. Updatesectorz would set the sector to -1, and the view would not be drawn.
in setaspect_new, determine the aspect with {x,y}dimen instead of {x,y}dim.
That is, use the view boundries instead of the whole screen.
Fix mirrors in Polymost.
Text-repl.: hitinfo variables -> hit, hit{sprite,sect,wall} members -> no "hit"
This makes the code rather more readable in some places. Unlike the two preceding commits, this one is actually purely textual replacement.