Build 3533
SVN-
General
build.c: initialize g_doHardcodedMovement to 1.
Show details
Fixing movement when not loading a.m32.
SVN handles and Git names are merged into one person.
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.
in texel-hitscan wall-aligned sprites, consider engine-side animation.
Whether a sprite is considered for texel-hitscan is determined on the base tile number, not the individual animated tile numbers.
polymost.c: factor out 2x dup'd code into get_projhack_ratio().
One use was in determining the ray vector for the mouse-aiming hitscan in the editor. Unfortunately, the change doesn't make it any less broken in Polymost, even if the two instances were out of sync.
add cvar/mapster32.cfg option "keeptexturestretch".
If enabled, dragging wall vertices will correct the xrepeat after the mouse button is released, so that the pre-drag absolute stretching is restored.
slightly rework code for setting/querying some cvars.
more or less fix the auto wall-alignment feature ([.]/[,]).
- Run it twice, since the first one is wrong. - Warn when attempting to align based on a top-oriented wall. When the sequence of walls to align has "windows", only the bottom parts will be correct. - Make the modifiers actually useful: * Pressing SHIFT aligns at most one wall, remove the old CTRL modifier. * The rest is as before: ALT makes the walls have (approximately) equal texture stretching, ['] (quote) aligns the immediate TROR-nextwalls.
don't show wall length of *line* highlight when dragging points.
Also, factor out 2x dup'd code of insertsprite() into do_insertsprite() and add searchwall-displaying code into package/samples/a.m32.
Replace dragpoint()'s "dragpoint_noreset" global with a "flags" argument.
Also, add another flag, signifying that from the editor, also the "lastwall"s (i.e. the CCW-linked points) should get collected. This is to signal the editor that their wall lengths should be displayed, too.
don't apply GL fogging to crosshair.
polymost.c: a couple of {tex,mem}cache cleanups / fixes.
- Stop using memcache on some other failure paths, particularly when failing to read from the on-disk texcache. - Factor out cache reading code (3x). - Fix endianness issues affecting big-enadian systems (one introduced by r3382, one existing before). Comment each B_LITTLE32 with whether we're converting from native to on-disk (little) endianness or back.
polymost.c: some meaning-preserving cleanups, make some vars file-local.
polymost.c: factor out 2 x 3x dup'd I/O code for DXT filter functions.
allow creating circle walls from TROR-constrained walls.
When reaching wall limits, it is possible that only some circle points will be inserted and the result is left unfinished.
grabbag of different things.
- fix error handing with recursing events - wallsofsect iterator, sector[]:contains() - more codegen; mangle function names - m32: compinside
Bring the SDL.h include in SDLMain.m up to speed with driver_sdl.c in jaudiolib and sdl_inc.h in the engine. Also address some Apple macro problems.
fix a possible crash with texel-hitscan.
Reproduced as follows (assuming all tiles have texel-hitscan for simplicity): In E2L5, shoot the opening switch with the shotgun, aiming for the border. The crash occurs because the *other*, depressed switch tile isn't yet loaded when we index into its tile storage. Dereferencing 0+small number == BAD!