Build 3686
SVN-
General
Fix A_MoveSprite() wrongly reporting sector hit without z change after r3678.
SVN handles and Git names are merged into one person.
Fix A_MoveSprite() wrongly reporting sector hit without z change after r3678.
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.
Clean up of mostly actors.c, but some other files along the way too.
- Rewrite some sprites-of-{stat,sector} loops using the SPRITES_OF, SPRITES_OF_SECT and new SPRITES_OF_SECT_SAFE macros. - In passing, identify some problems and mark them with 'XXX', but don't attempt to fix them yet. - The usual readability improvements...
TROR no-SE7 water: handle projectiles.
Actually, the tweaked code in VM_Move() is not specific to projectiles, so other sprites now may pass no-SE7 water boundaries too, but it's most noticeable with projectiles.
TROR no-SE7 water: allow boundary change only if other-side lotag is other one.
That is, if submerging, the lower sector MUST have lotag 2. If emerging, the upper sector MUST have lotag 1. (Previously, emersion happened from ST 2 sectors unconditionally.) This means that the area where submersion or emersion can happen is now the same for the top and bottom parts.
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.)
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.
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.
Fix changing the max refresh rate in EDuke32 (it was already working correctly in Mapster32).
replace DukePlayer_t set-member methods with metatable magic.
So that members needing it are checked when they're assigned to using the usual syntax. What kind of check to perform (sector, player, ... x whether negative values are allowed) is written in a declarative fashion inside the C declaration. Also, make Lunatic's MAXQUOTES be C's OBITQUOTEINDEX and bound-check an access of sprite[p->wackedbyplayer] in the C code.
a.m32: Don't reposition head light if in void space, fixing crash.
a.m32: Implement a Polymer "head light" emanating from your position in 3D mode.
Toggled with Ctrl+Shift+[KP-]. Variable 'headlight_range' controls its range. For the implementation, a new event EVENT_PREDRAW3DSCREEN was added.
custom integer types treated as bitfields.
Used for engine struct's (c)stat and actor[].flags members.
Fix ART offset and face sprite flipping interaction.
Fix ART offset and sprite flipping interaction.
factor out 3x computing "alwaysshowgray", but don't change anything.
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.
fix assertion failure with overlong walls in rintersect().
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.
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.
in readgamearray support code, use engine file functions.
This is so that files residing in GRPs (or anywhere the engine looks for them) can be read, too.
give sprite cstat 1024 a marco name, CSTAT_SPRITE_MDHACK.
Fix Mapster32. It runs now.
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.
Lunatic t.: option for generating code caching sprite/actor/player structs...
...at the beginning of each function called back from C, and each case/default function. Called -fcache-sap. Disabled by default.
spritesof{stat,sect} iterators that allow deletion inside the loop.
Also, - an optimization for sprite[]:setpos(). Calls to get_sprite_index() seem to be pretty slow (at least when they're not compiled). - add getzrange to the dynsymlists
Plug up alpha leaks in Polymost textures/rotatesprite.
Connect spriteext.alpha to models and voxels in Polymost.
This code is neat, tidy, organized, and sensical!
Connect spriteext.alpha to Polymost.
Ugh, global variable hacks. Excuse me while I wash my hands.