April 2023
-
add manual test case 'mask_drawing_order.map'
-
in 'msaveloadtext()', prevent read of 'g_skillNames[-1]', fixing issue #225.
Show details
Note: 'skill == 0' can be obtained from the command line by either * '-m': "monsters off", or * '-s0': 'ud.m_monsters_off' is *not* set
-
in "draw tsprite before mask?" check, consider tile offsets for sloped sprites.
Show details
In 'GetCornerPoints()', fix condition for when to use 'get_floorspr_points()' to include sloped sprites as well.
-
in "draw tsprite before mask?" check, consider offsets for floor sprites.
-
in "draw tsprite before mask?" check, consider xoffset for wall sprites.
Show details
(More precisely, in renderDrawMasks()'s check "does the maskwall separate the tsprite center from the camera?".) This provides more reasonable rendering order when the sprite (as drawn) is heavily biased to one side of the maskwall. Note [1]: mask/mask intersections are in general problematic since there is no further subdivision. For opaque objects, the OpenGL modes "work around" the issue thanks to the depth buffer. See: - 'mask_drawing_order.map', the STEAM sprites which by position are all on the other side of the right-hand side fence, but as drawn may or may not be more towards one particular side. (The topmost one with xoffset 50 is the first to be drawn behind it; note that 'picanm[STEAM].xofs == -47'.) - Issue #136, the first example screenshot. However, there, the fence intersects the STEAM sprite quite exactly in the middle (as drawn), so note [1] above applies.
-
in 'editorDraw2dSprite()', don't redundantly (over)draw a line.
-
in 'editorDraw2dSprite()', rename '[xy]2' -> 'd[xy]' + other NIFC tweaks.
Show details
- pull out repeated expression 'spr->ang + angofs' into local 'ang' - tweak 'editorDraw2dScreen()', too
-
in 'renderDrawMasks()', simplify a condition.
-
fix "search for named tile" [S] in the tile selection view.
-
NIFC tweaks around tile selection.
Show details
Background: "search for named tile" does not work as expected.
-
from 'renderDrawMasks()', pull out 'GetCornerPoints()'.
-
in mask/tsprite sorting, NIFC tweaks (round 3: common rendering).
Show details
Meaning the 'while (maskwallcnt) { ... loop over tpsrites ... }' block in 'renderDrawMasks()' that is not conditional on the rendering mode.
-
in mask/tsprite sorting, NIFC tweaks (round 2: +1 local, +3 functions).
Show details
- 'PolymostPrepareMasks()' - 'PolymostDrawMasks()' - 'DrawDebugSpriteOutlines()' In passing: - Declare once and reuse 'isPolymost' local - In '#if 0'-d debug code, fix an inconsistency and a call by an obsolete function name
-
in mask/tsprite sorting, NIFC tweaks (round 1: clang-format, locals, const).
Show details
(NIFC: no intended functional changes)
-
address various UBSan and [-Wunused-but-set-variable] warnings.
Show details
source/mimalloc/src/options.c:228:3: runtime error: call to function mi_log(char*, void*) through pointer to incorrect function type 'void (*)(const char *, void *)' source/build/src/osd.cpp:1755:44: runtime error: null pointer passed as argument 2, which is declared to never be null source/build/src/glbuild.cpp:296:9: runtime error: load of value 4294967295, which is not a valid value for type 'glsamplertype' source/duke3d/src/gamestructures.cpp:355:125: runtime error: member access within null pointer of type 'DukePlayer_t' ---- Note: we are also getting e.g. > source/build/include/compat.h:1008:72: runtime error: store to misaligned address 0x(...) > for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment due to '-fsanitize=alignment' implied by '-fsanitize=undefined'. This is left as-is.
-
pull out 'find_usermaphack()', also handling '!usermaphacks' case.
Show details
Exposed by UBSan, e.g.: source/build/src/engine.cpp:11090:67: runtime error: null pointer passed as argument 2, which is declared to never be null
-
General
Common.mak: drop 'unsigned-integer-overflow' and 'float-divide-by-zero' from 'ASAN_FLAGS'.
Show details
- 'unsigned-integer-overflow': happens too frequently (and is not UB) - 'float-divide-by-zero': see https://reviews.llvm.org/D63793 and D64317
September 2020
-
General
sdlayer.cpp: remove an '#ifndef __ANDROID__' block with only commented code in it.
-
General
sdlayer.cpp: don't print SDL_SetWindowGammaRamp() error if the function was not called.
Show details
We may have gotten an error message like: videoSetGamma(): Failed loading udev_device_get_action: (...)/libSDL2-2.0.so.0: undefined symbol: _udev_device_get_action But: 1. The "error" in question did actually happen earlier in SDL, but is harmless because SDL first tries to load a symbol using 'dlsym(RTLD_DEFAULT, ...)' and failing that (as it happens in my case), from an explicitly loaded libudev (which succeeds). 2. The message misleads a user into thinking that it may have something to do with gamma adjustment having no effect. (As is the case for me.)
-
update zpl.h for build and runtime fixes on 32-bit ARM.
Show details
July 2016
-
on TROR point insertion, mark more points.
Show details
This fixes a bug reported by Micky C on 2016-01-11 where too few points were marked to be inserted. See AMC TC SVN r2308.
-
pull out some code from M32_InsertPoint() into M32_MarkPointInsertion().
-
fix map-text loading.
Show details
The file descriptor was closed from Lua code, causing the subsequent kfilelength() to fail and attempt an allocation of (size_t)-1 bytes.
-
General
SDL2 layer: in Mapster32, fix menu Ctrl-F in case NumLock is on.
-
General
engine.c: fix potential smostwall[-1] access. Found by ASan.
-
General
Fix non-HAVE_CLIPSHAPE_FEATURE build.
Show details
Used for example with DEBUGGINGAIDS=2, i.e. sanitizers enabled.
November 2015
-
General
player.c: factor out large A_ShootWithZvel() block into A_ShootHardcoded()
Show details
The block is taken over verbatim; 'vec3_t srcvect' is passed by value. The primary purpose of this is that it's easier to compare custom projectile behavior in A_ShootCustom() with the hardcoded one by reading the code of these two functions. For example, this may be of use to modders wishing to emulate a hardcoded projectile. DONT_BUILD.
-
in drawspritelabel(), use fixed background color.
Show details
Make it always one of the colors that the 2D color cycles to (base color + offset in [0 .. 4]) instead of <base color>-3, as that one might be in a different color ramp.
-
add byte array editorcolors[256] to m32script variables.
Show details
This makes it possible to set up editor colors at startup (from m32_autoexec.cfg). For example: script_expertmode 1 do for i range 256 ifge i 33 { set editorcolors[i] i } script_expertmode 0 Use this method in the description of how to get old-style 2D colors in tiles.cfg and suggest an alternative color index pair.
-
make 'script_expertmode' require an argument (0 or 1) to toggle.
Show details
Without an argument, it prints the current state.
-
General
In package/sdk/tiles.cfg, use the right word for "remove commenting".
Show details
DONT_BUILD.
-
changes to aid getting the old color scheme (by customizing).
Show details
- bump MAX_TILE_GROUP_ENTRIES to MAXUSERTILES - in loadtilegroups(), only assign a tile color if it wasn't already assigned - allow "hidden" tile groups by omitting the hotkey - Tweak the description added to tiles.cfg
-
honor "blocking color" declared with DEF 'spritecol' et al.
Show details
Meaning tilegroup's 'colors' directive. Also, to the packaged tiles.cfg, add a description of how to emulate the earlier Mapster32 sprite coloring for one tile group.
-
in a.m32, draw color info ("set showpal 1") more informatively.
Show details
- draw ticks above the palette "ruler" - draw all editor colors (colors in editorcolor[])
-
introduce DEF command "2dcolidxrange <col> <idx> <idxend>".
Show details
<col> is the editorcolor[] starting index <idx> is the actual color index start <idxend> is the actual color index end So, editor colors from <col> onward will be mapped to [<idx> .. min(<idxend>, 255)]. Takes precedence over '2dcol'.
-
in drawscreen_drawsprite(), "sprite[j]." -> "spr->".
Show details
Also a similar stylistic tweak in parsetilegroups().
-
formatting changes around 2D sprite/wall color code.
-
General
Fix POLYMER=0 build. DONT_BUILD.
-
fix variable that is used uninitialized.
-
General
premap.c: on prelevel(), clear bits 16 and 32 of effector sprites.
-
remove "Ludicrous Zoom!" message when reaching max 2D zoom.
Show details
The problem is that it stays a few seconds afterwards, obscuring information on the status line.
-
add var 'corruptcheck_game_duke3d' and enable by default.
Show details
Currently, this checks for effector sprites that are not face-aligned. See https://forums.duke4.net/topic/8324-icestation-colossus-map-broken
-
various stylistic tweaks, no functional changes. DONT_BUILD.
October 2015
-
in TROR-join sectors [Ctrl+J], print z difference hint.
Show details
At the very least, this makes it easier to decide for one option ("Connect yellow ceiling w/ blue floor (1) or (v)ice versa?") when one of the differences is zero, which might have occurred from temporarily breaking TROR links.
-
fix fillsector() calls before fade_editor_screen().
Show details
The latter allows one to specify a color to keep, but with r5302 the fillsector() highlights are drawn with transparency, thus making it ineffective. Add an argument to toggle transparency to fillsector() (now fillsector_maybetrans()) and two wrapper functions.
-
don't offer to "Insert outer loop and make red walls" w/ RAlt+RCtrl.
Show details
This feature only makes sense with the complete de-selection of a set of sectors, i.e. when pressing RAlt to do this, not adding or removing sectors to/from the set of already highlighted ones.