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.
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
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/'
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.
Allow dcx::window struct to be subclassed step 3. This step adds the window destructor and both requires and implements the window to be deleted by the event handler/client in all cases.
Allow dcx::window struct to be subclassed step 2. This step renames and reconfigures window_create in window.cpp to be the main constructor. Also add a template constructor that allows an event handler that takes a subclass of window.
Allow dcx::window struct to be subclassed step 1. This step moves the definition for the window struct into window.h, keeping all member variables private and declaring the window related functions as 'friends'. This avoids changes to source files that use the window struct at this stage. Also moving some of the simpler functions in window.cpp into the struct definition to inline them. I would prefer to use class methods, so changing some of these to class methods as well.