The only caller for get_multi_endlevel_poll1 was DoEndLevelScoreGlitz,
which only called it on an unreachable path. That path is now gone, so
remove get_multi_endlevel_poll1.
Commit 63ca866 reduced the number of elements in UDP_Socket[] from (2 +
tracker) to (2), but added a write to UDP_Socket[2], which is now out of
bounds. Fortunately, UDP_Socket[2] is never read. Remove the
initialization of it.
Fixes: 63ca86698e ("Added communication for tracker written by A Future Pilot")
Conflicts:
common/arch/sdl/window.cpp - Remove unused EVENT_WINDOW_CLOSED and w_callback local var
common/ui/dialog.cpp - Remove unused EVENT_WINDOW_CLOSED
Previously, raspberrypi mode forced DXX_WORDS_NEED_ALIGNMENT on and any
other mode forced it off. Add a specific user setting for
DXX_WORDS_NEED_ALIGNMENT. Set its default as bool(raspberrypi) to
preserve the previous special case.
Rename symbol WORDS_NEED_ALIGNMENT to DXX_WORDS_NEED_ALIGNMENT to show that it is a DXX
symbol, not one inherited from a library.
This is a mostly automated transform, but the changes to SConstruct were
manual.
git grep -wl WORDS_NEED_ALIGNMENT -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(WORDS_NEED_ALIGNMENT\)\>/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(WORDS_NEED_ALIGNMENT\))/#\1if \2DXX_\3/' -e 's/^\s*#ifndef \(WORDS_NEED_ALIGNMENT\)\>/#if !DXX_\1/'
Fixes: 435aa5a020 ("Move USE_UDP to dxxsconf.h; rename to DXX_USE_UDP")
Fixes: 7c8c2b5aa4 ("Move USE_TRACKER to dxxsconf.h; rename to DXX_USE_TRACKER")
Saved games dump robot ai_local state for all objects, regardless of
whether the object is a robot. Loading a game restored all ai_local
values, regardless of whether the object was a robot on restore. This
caused memory corruption in objects that were not robots when the
`ctype.`_T_ for that object was large enough to overlap
`ctype.ai_info.ail`.
Fix this by loading the ai_local into a junk buffer when the object is
not a robot. It would be better to skip over the bogus ai_local
entirely, but the structure of ai_local_read_swap makes that difficult.
Use the easy fix for now.
Kreator reports that "Pyramids of Luxoran" crashes due to a valptridx
sanity check. The level incorrectly attempts to open a wall on a
segment/side which has no wall.
Add an error check and a con_printf suggesting that the level author
needs to fix the invalid trigger.
Kreator reports that a level from back when Descent was new fails the
test for bogus matcen triggers. This level cannot be played when that
test throws an exception, so downgrade the exception to a CON_URGENT
message. This will hopefully deter level authors from creating any new
levels with this problem, but will allow users to play existing levels.
escort_get_goal_segment expected exists_in_mine to return object_none or
a valid object. In some mines, exists_in_mine will return
object_guidebot_cannot_reach, which is neither object_none nor a valid
object. Exclude reading the segment of the unreachable object.
Allow dcx::UI_DIALOG struct to be subclassed step 3. This step adds the destructor and makes sure the dialog is only deleted within the main dialog handler if the specific handler didn't return window_event_result::deleted.
Replace delete dcx::window kludge with a better solution: instead of requiring every handler to delete the window, add a window_event_result::deleted, which gets returned if the window was deleted by the handler, so window_close knows not to attempt to delete it again.
Allow dcx::UI_DIALOG struct to be subclassed step 1. This step renames and reconfigures untyped_ui_dialog_create in dialog.cpp to be the main constructor. Also adds a template constructor that allows an event handler that takes a subclass of UI_DIALOG.