February 2013
-
General
Lunatic (translator): thisprojectile, *shoot.
-
General
Rework how the z velocity is passed from *zshoot to A_Shoot().
Show details
Previously, actor[].shootzvel (implementation detail, not available to CON) was checked, and if it was !=0, that was the overridden velocity. The value 0 meant "hardcoded, projectile-dependent velocity". But that neccesiated a hack where if zvel 0 was passed and really meant, it needed to be set to 1 instead. Now we have A_ShootWithZvel() taking an additional last argument plus a macro SHOOT_HARDCODED_ZVEL permissible for that argument.
-
General
player.c: factor out more identical code into Proj_DoHitscan().
Show details
Also, simplify a couple of other lines.
-
projectiles...
-
General
player.c: factor out a repeated 3-liner into safeldist(), remove some commented code.
-
General
actors.c: factor out 6x identical code into Proj_BounceOffWall().
-
for VM_Fall and VM_ResetPlayer, pass VM sprite/player etc. as args.
Show details
Simplifying VM_FallSprite and VM_ResetPlayer2 used from Lunatic.
-
General
Move around some #ifdef LUNATIC to compile out more code, minor cleanup.
-
General
Lose the packed attribute on / rearrange some game struct types.
Show details
actors.h: remove 'packed' from projectile_t, tiledata_t. In tiledata_t, make .cacherange member an int32_t so that the following member "projectile_t defproj" is aligned on a 4-byte boundary. player.h: remove 'packed' from playerspawn_t, DukeStatus_t, input_t. In Lunatic, correct packing attribute of the base type of the unrestricted actor_t and DukePlayer_t pointer types (the declaration was used without Bump BYTEVERSION.
-
General
player.c: remove a couple of unnecessary casts.
-
conditionally compile out more legacy code, remove old mixed mode code.
-
General
Lose the 'packed' attribute for types declared in build.h.
Show details
Most of them are already aligned to their natural boundaries, so lowering the alignment to 1 byte can only worsen things by making the C compiler generate poorer (unaligned access) code for some platforms. The layout of structures is not specified by the C Standard, but is rather given by a particular platform + toolchain's ABI (application binary interface). Most ABIs follow the expected pattern "alignment of scalars is their size, alignment of arrays is that of its element type, alignment of structs is the maximum alignment of its members". A couple of links to particular ABIs are given in build.h. Problems are expected with archs that care about unaligned access when a pointer to a non-packed struct is taken that resides in a packed aggregate, but these uses should be weeded out (I'm not sure if there are any in our codebase). The following types are affected, only hitdata_t changes its size: sectortype, walltype, spritetype, spriteext_t, spritesmooth_t, struct validmode_t, picanm_t, palette_t, vec2_t, vec3_t, hitdata_t.
-
General
Lunatic translator: codegen for actor-tsprite accesses, sync some RO members.
-
General
Fix all hitscan weapons (not only pistol) wrongly fire without spread at enemies.
Show details
Introduced in r3358, where I missed a condition inside an 'if'.
-
provide access to actor-tsprite.
-
General
game.c: In G_DoSpriteAnimations, put t, i and s locals into their blocks.
Show details
And const them appropriately. Also remove #if 0'ed code related to an MSVC pragma.
-
General
NULL spriteext[].tpsr after each running EVENT_ANIMATESPRITES for a tsprite.
Show details
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.
-
General
Don't set spriteext[].tspr when creating tsprites from the engine.
Show details
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.
Show details
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.
-
General
Lunatic (translator): provide checked write access to a couple more members.
-
Centralize all bound-checking in bcheck.lua.
-
General
Lunatic translator: codegen for some "method-like" member write accesses.
January 2013
-
General
Additional networking patch from Jasper Foreman, sadly sitting untested for almost a month because everyone here has been too sick to do anything with it. :(
-
General
Fix MinGW/GCC build. Oops!
-
General
Use nearbyintf() to when calculating g_frameDelay (when r_maxfps is changed) to get closer to the target framerate by bypassing float -> int truncation
-
General
Fix knuckle cracking animation broken in r3436
-
General
Lunatic translator: a couple of set-struct commands, "-I" option for default dir.
-
General
Don't apply GL fogging to wall lines drawn in game's "light" overhead view.
-
prefer to use ctype objects instead of C type strings.
Show details
Pass types via ffi.typeof() instead of declaring them in the global namespace when possible.
-
General
player.c: return early from various P_Display*() if player's *incs are oob.
-
use bcarray types to guard accesses to arrays inside structs.
-
General
Add bcarray.lua, implementing a factory for bound-checked array types.
-
General
Lunatic translator: struct read access.
-
General
Lunatic translator: prototypical array/struct access, for reference only.
-
a little bit of everything.
-
sync with preceding change, complete two commands.
-
General
CON parser: don't accept read-only gamevars for 1st arg of *sprite{sect,stat}.
-
General
game.c: replace one missed instance of inline code with calc_smoothratio().
-
sync with preceding change, fix r3419.
-
General
Rework hardcoded BADGUY sprite flag initialization (i.e. amend r3257).
Show details
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.
-
General
Fix USE_OPENGL=0 build.
-
fix cycling to the next link sprite with LShift+"]", tweak message.
-
fix wrongly stripping debug binaries...
Show details
... when 'make' is invoked like "make ... STRIP=some_strip".
-
simplify how to determine whether the final binary is stripped.
Show details
Whenever it should be not, STRIP is set to the empty string. This fixes the Lunatic RELEASE=1 build.
-
General
Reimplement pixel doubling by drawing scene at 1/(2*2) resolution and expanding.
Show details
The pixel doubling now only applies to the area where the world scene is drawn, i.e. it may be smaller than the physical screen / WM window size. The optimized version is slightly faster than for non-doubled pixels for me (optimized build), but see code for caveats. Some other minor issues: - won't work when the world is drawn from demo cameras (and offscreen, but that matters less) - will leave a few pixels empty when running with x resolutions not evenly divisible by 4
-
General
game.c: pull out two G_DrawRooms blocks into G_OROR_DupSprite and G_ReadGLFrame.
Show details
... to have a little moew overview.
-
General
Lunatic translator: handle overriding system GVs.
-
General
player.c: make four functions file-local.
-
General
CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.
Show details
In CON, the bit is still always cleared for user-defined gamevars.