Kp
e7629f35ee
Move newmenu_item::saved_text into the two sub-types that need it
2020-12-27 22:03:09 +00:00
Kp
e6875641c9
Move Newmenu_allowed_chars into individual newmenu_item
...
Allowed characters are more properly scoped to a specific text entry
field. Move them there to eliminate a global.
2020-12-27 22:03:09 +00:00
Kp
1f8c8e355b
Allow newmenu callers to choose whether to use a background box
...
Previously, callers chose whether to use a fullscreen background image,
and the newmenu code inferred that callers without a background image
wanted a background box, while those with a background image wanted no
box. Change newmenu_layout to take a parameter specifying the caller's
intent, so that a caller can choose to have any combination of a
background image and a background box.
2020-12-27 22:03:09 +00:00
Kp
2b9c146ff2
Convert glitz menu to inherit from newmenu
...
Add a static method to block until the menu closes, so that the glitz
menu can continue to block its caller.
2020-12-27 22:03:09 +00:00
Kp
c0601edde3
Move GammaLevel to CCfg
2020-12-27 22:03:09 +00:00
Kp
effa7435c2
Remove newmenu_listbox1
...
It is no longer used.
2020-12-27 22:03:09 +00:00
Kp
095d660c55
Inline listbox_get_window
...
It is only used once.
2020-12-26 21:17:29 +00:00
Kp
def7e03260
Move listbox callback handling to a derived class
2020-12-26 21:17:29 +00:00
Kp
f43e98764a
Move listbox to newmenu.h
2020-12-26 21:17:29 +00:00
Kp
f01c29c779
Flatten newmenu_do* hierarchy
...
There is now a single caller for newmenu_do3. Inline do3 into do2, so
that do2 calls do4. Mark do4 as static.
2020-12-26 21:17:29 +00:00
Kp
d1ff6becb4
Move listbox_layout to newmenu.h
...
Rename listbox_create_structure to listbox_layout::create_structure.
2020-12-26 21:17:29 +00:00
Kp
b9a27094eb
Pass menu_title through listbox functions
2020-12-26 21:17:29 +00:00
Kp
b63ccc63ca
Make passive_messagebox inherit from newmenu
...
passive_messagebox is only suitable when the user's selection does not
matter, so restrict to be used for cases where only one "choice" is
offered.
2020-12-26 21:17:29 +00:00
Kp
834f009dd7
Use enum class for wallnum_t
2020-12-26 21:17:29 +00:00
Kp
fc63029833
Move more symbols into namespaces
2020-12-26 21:17:29 +00:00
Kp
faa4d2ce34
Use enum class for vertnum_t
2020-12-26 21:17:29 +00:00
Kp
70d55c010d
Move Num_vertices into if(DXX_USE_EDITOR)
...
Non-editor builds only need Num_vertices as a local during mine loading.
2020-12-26 21:17:29 +00:00
Kp
6b3e78054c
Remove support for reading Miner's .LVL files
...
The Miner LVL files are not present in retail Descent 2 data. I know of
no way to obtain them. The code for loading them has been marked as
broken since 2018, and no one reported it. Remove this support to
simplify future work.
2020-12-20 20:39:07 +00:00
Kp
dd3f272929
Use enum class for actdoornum_t
2020-12-20 20:39:07 +00:00
Kp
1c2fcf86e0
Convert multi_leave_game to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
e2c95058db
Convert multi_endlevel to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
a3eb82cefd
Move multi code into namespaces
2020-12-20 20:39:07 +00:00
Kp
5e4047ce2a
Convert disconnect_player to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
955ce55661
Convert kick_player to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
2007257064
Convert get_multi_endlevel_poll2 to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
407678dfdf
Convert multi_send_endlevel_packet to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
ea6504e60b
Convert multi_level_sync to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
2f90d7a208
Convert multi_do_protocol_frame to dispatch through a vtable
2020-12-20 20:39:07 +00:00
Kp
d070377e6b
Convert multi_objnum_is_past to dispatch through a vtable
...
This reduces the call depth by one, and eliminates a load of a global
variable that always has the value MULTI_PROTO_UDP. It adds a load of
the address of the empty dispatch object. Overall, this should be an
improvement.
2020-12-20 20:39:07 +00:00
Kp
696141eabf
Use enum class for weapon_info::bounce
2020-12-20 20:39:07 +00:00
Kp
e261ca2884
Use enum class for weapon_info::matter
2020-12-20 20:39:07 +00:00
Kp
9f8fbb1a77
Remove newdemo_strip_frames
...
The sole user is based on newdemo_do2, which is being retired. This
feature was only available in developer builds.
2020-12-20 20:39:07 +00:00
Kp
df1ee5e671
Make weapon reorder menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
303815f80c
Make netgame_list_game_menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
e57c9efa7e
Change main F1 help menu to inherit from newmenu
2020-12-19 16:13:26 +00:00
Kp
76acfdd38f
Convert main menu to inherit from newmenu
2020-12-19 16:13:26 +00:00
Kp
8e65573c56
Eliminate move construction of newmenu_layout
...
Construct one in place, update it, and then use it to initialize the
rest of the newmenu.
2020-12-19 16:13:26 +00:00
Kp
c68dddd372
Move various definitions into namespaces
2020-12-19 16:13:26 +00:00
Kp
b1b2300c7d
Use enum class for wall_key
2020-12-19 16:13:26 +00:00
Kp
47c33cbd55
Use enum class for WALL_IS_DOORWAY_FLAG
...
This reduces the size of the debug information substantially.
2020-12-19 16:13:26 +00:00
Kp
efcd9b91ce
Use enum class for WALL_IS_DOORWAY_sresult_t
...
This generates the same code, but shrinks the debug information.
2020-12-19 16:13:26 +00:00
Kp
56122687d1
Delegate newmenu subfunction handling into virtual function
2020-12-19 16:13:26 +00:00
Kp
d4cf9943c5
Make newmenu subfunction const
2020-12-19 16:13:26 +00:00
Kp
1032462988
Make newmenu max_displayable const
2020-12-19 16:13:26 +00:00
Kp
de5c300724
Make newmenu_layout::all_text const
2020-12-19 16:13:26 +00:00
Kp
530f396b2e
Make newmenu::tiny_mode_flag, tabs_flag, max_on_menu const
2020-12-19 16:13:26 +00:00
Kp
200952c3d9
Add type-specific tag wrappers for newmenu calls
...
Make the compiler check that title, subtitle, and filename are passed in
the right places.
2020-12-19 16:13:26 +00:00
Kp
53566b7673
Move struct newmenu to newmenu.h
2020-12-19 16:13:26 +00:00
Kp
017c4ce933
Restore buffering on PCX loads
...
Commit 3114874713
delegated PCX loading to
SDL_image, and as an incidental change, switched to using an unbuffered
PHYSFS file. On Linux, this has no perceptible difference in
performance. On Windows, the unbuffered accesses cause enough of a
performance problem for users to notice and report an issue. Add a new
helper to create an SDL_RWops around a buffered file, and use that for
PCX loading.
Fixes: 3114874713
("Delegate PCX loading to SDL_image")
Reported-by: Q3BFG10K <https://github.com/dxx-rebirth/dxx-rebirth/issues/549 >
Reported-by: aybe <https://github.com/dxx-rebirth/dxx-rebirth/issues/555 >
Analyzed-by: arbruijn <https://github.com/dxx-rebirth/dxx-rebirth/issues/555#issuecomment-735442076 >
2020-11-30 05:12:00 +00:00
Kp
a028ea14ae
Restore format(printf) attribute for powerup_basic
...
Kreeblah reports that clang now warns for powerup.cpp due to a missing
__attribute_format_printf. This was incorrectly dropped in
ffb653c0b8
. gcc did not warn, but clang
now warns. Add back the attribute.
Fixes: ffb653c0b8
("Pass control_info & to various functions")
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/547 >
2020-10-27 04:27:55 +00:00