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
479884288c
Always delegate to window_create for send_creation_events
2020-12-20 20:39:07 +00:00
Kp
a56ff84fd5
Make listbox callback const
2020-12-20 20:39:07 +00:00
Kp
a4cfdba4d9
Make joystick_sensitivity::menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
f0b6a23e0e
Make mouse_sensitivity::menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
c5a677817b
Make keyboard_sensitivity::menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
a0b09f0657
Make netgame_powerups_allowed_menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
485369810a
Make grant_powerup_menu inherit from newmenu
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
7f48fe045b
Use std::move_backward in scores_maybe_add_player
2020-12-20 20:39:07 +00:00
Kp
e72dae0b91
Initialize scores_menu members in constructor
2020-12-20 20:39:07 +00:00
Kp
305c3dc04c
Avoid passing pointer to uninitialized last_game to scores_view
...
The position parameter should avoid the value being used, but avoid
passing a pointer to known-uninitialized data to be safe.
2020-12-20 20:39:07 +00:00
Kp
7da06d916c
Move DoGameOver inline
...
Delete the backward comment. This function is used for single player,
not multiplayer.
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
9fb0406234
Make rename-guidebot menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
6cca4ab2ce
Make main multiplayer menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
131e5a257e
Make options menu inherit from newmenu
2020-12-20 20:39:07 +00:00
Kp
9edbf27300
Make sandbox menu inherit from newmenu
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
08d3288aee
Move netgame list setup into netgame_list_game_menu_items
2020-12-20 20:39:07 +00:00
Kp
34b8541986
Make netgame_info_menu inherit from passive_newmenu
2020-12-20 20:39:07 +00:00
Kp
b8ef5c89c3
Use enumerated_array for lines passed to netgame_info
...
Avoid incrementing an iteration variable, and instead write the values
to precomputed offsets. Avoid copying constant strings into mutable
storage.
2020-12-19 16:13:26 +00:00
Kp
d7cce3a8ff
Change demo F1 help menu to inherit from newmenu
2020-12-19 16:13:26 +00:00
Kp
90f46b7a02
Change netgame F1 help menu to inherit from newmenu
2020-12-19 16:13:26 +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
137fd95ae0
Reduce indirection resolving chosen menu item
...
Instead of storing a hardcoded array of identifiers, use the index in
the main array as the identifier. Split `enum MENUS` accordingly.
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