Build 3588
SVN-
give sprite cstat 1024 a marco name, CSTAT_SPRITE_MDHACK.
SVN handles and Git names are merged into one person.
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.
build.c: initialize g_doHardcodedMovement to 1.
Fixing movement when not loading a.m32.
engine.c: in setpolymost2dview(), set gloy=-1 unconditionally.
This fixes an update issue: start EDuke32 without warping to a map in Polymost, change to classic, and change to Polymost again. The OSD background will be displaced.
sector[]:zrangeat(), 'getzrange' command for the translator.
Also, fix quote commands there.
add "movement by one" debugging functionality via a.m32.
If m32script gamevar "move_by_one" is nonzero, the some keys move the "player arrow" by increments of 1: - Without SHIFT: LEFT/RIGHT absolute x, DOWN/UP absolute y, A/Z absolute z. - With SHIFT: DOWN/UP (unbounded!) horiz, LEFT/RIGHT angle. This can be useful to debug renderer bugs that show a high sensitivity to the exact location ("are transient in space").
Lunatic translator: text rendering and other niceties.
Lunatic translator: sprite list commands, findnear*, protect player[].ftq.
Add Homebrew Channel metadata for Mapster32 and expand the build process to easily allow its addition. Unfortunately it closes on launch without any log and I don't have any means to debug it, so it remains disabled. (Who wants to map on a TV with 640x480 resolution anyway?)
Classic renderer: high-precision sprite drawing, preventing stray lines on top.
Face- and wall-aligned sprites are drawn using the wall routines in BUILD. However, the per-x-screen-coordinate distance (swall[]) is calculated in a way that potentially incurs great precision loss (for example 5 bits for xdimen=1280, yxaspect=65536). This leads to the starting (top) vertical texture coordinate possibly wrapping to large values, leaving an unsightly "stray line" on top of the sprite from certain viewing angles/horiz values. The approach to fix it has two parts: first, the distance is calculated using float values, preventing the precision loss. Because this doesn't fully prevent the unwanted lines, the texture coords are clamped to the mininum and maximum (0 and UINT32_MAX respectively) when calculating them for sprites. Note that stray lines may still appear at the *bottom* of sprites under certain circumstances, for example when viewing at a y-flipped sprite from above. These should be less noticable in real-world usage though. The feature is guarded by a macro HIGH_PRECISION_SPRITE in case using floating point or 64-bit integers is undesirable/impossible on some platforms.
engine.c: factor out calculation of texture coords / addresses in wall drawing.
engine.c: don't pass [udls]wal to maskwallscan(), use *wall globals instead.
sprite.change{sect,stat}, access to more members, member read test.
engine.c: in changesprite{sect,stat}, swap second and third early-out tests.
That is, first check if the sprite is in the game world and then if it already has the desired sector or status number. This doesn't change anything in our codebase, since the return values of these functions are never examined.
Engine cleanup continued, no functional changes.
engine/Polymer: factor out setting {cos,sin}*globalang into set_globalang().
engine.c: clean up drawsprite()
The usual: declare locals more tightly, const-qualify them where it helps readability, remove dead code...
Fix POLYMER=0 build, cleaning up #include discipline on the way.
Also taking care that the USE_OPENGL=0 build builds.
for VM_Fall and VM_ResetPlayer, pass VM sprite/player etc. as args.
Simplifying VM_FallSprite and VM_ResetPlayer2 used from Lunatic.
Lunatic translator: codegen for actor-tsprite accesses, sync some RO members.
provide access to actor-tsprite.
NULL spriteext[].tpsr after each running EVENT_ANIMATESPRITES for a tsprite.
Meaning that only *ettsprite[THISACTOR] makes sense from CON. It did before too, because .tspr was set before each event run (and not before all runs), only that it was never nulled, which was kind of untidy.
remove unused tsprite access via spriteext[].tspr.
Don't set spriteext[].tspr when creating tsprites from the engine.
Its only use is to have a actor -> tsprite mapping for the EVENT_ANIMATESPRITE event and .tspr will be set before it is run.
RESPAWN-preview coded in M32-script.
The m32script variable 'showrespawn_always' toggles whether the respawned picnum is shown unconditionally instead of only when aimed at (and locked onto the RESPAWN sprite) in 3D mode. Cool idea by Micky C. NOTE: sometimes doesn't work because of a bug in the m32script interpreter.
Don't apply GL fogging to wall lines drawn in game's "light" overhead view.
CON parser: don't accept read-only gamevars for 1st arg of *sprite{sect,stat}.
Rework hardcoded BADGUY sprite flag initialization (i.e. amend r3257).
Use a new flag to mark hard-coded enemies, not SPRITE_BADGUY. This fixes an issue where in E1L4, a pigcop would appear in the area you have to crawl under shrunk. Thanks to LLCoolDave1 for pinpointing the range of relevant revisions.
fix cycling to the next link sprite with LShift+"]", tweak message.