Commit graph

5370 commits

Author SHA1 Message Date
Kp ddcf8c1798 Remove support for show_order_form
The original way to order the full version is defunct.  Remove the code
that showed that page.
2020-10-22 02:26:17 +00:00
Kp d309c141e7 Switch non-format uses of nm_messagebox to nm_messagebox_str 2020-10-22 02:26:16 +00:00
Kp 29d3e9a8c4 Move kconfig initialization to NSDMI where possible 2020-10-22 02:26:16 +00:00
Kp ceaea3ec22 Move automap initialization to NSDMI where possible
Some members are initialized with literal values.  Move those to an
NSDMI so that all constructor invocations will set them.
2020-10-22 02:26:16 +00:00
Kp ae657007fe Remove send_creation_events parameter
It is always nullptr.
2020-10-22 02:26:16 +00:00
Kp 2869566866 Remove unused ui_create_dialog parameter createdata
It is always nullptr.  Remove the parameter and pass nullptr where the
parameter was used.
2020-10-22 02:26:16 +00:00
Kp 261acf0ebc Simplify object_dialog callback_handler
The window is a C++ object; it does not need to access a global to get a
pointer to its own data.
2020-10-22 02:26:16 +00:00
Kp d61f3014b9 Remove sole use of non-nullptr createdata
object_dialog needs one parameter.  Move that handling to the
constructor.
2020-10-22 02:26:16 +00:00
Kp d2c5b4d64a Make listbox inherit from window 2020-10-22 02:26:16 +00:00
Kp 09531047b9 Use uint8_t for allow_abort_flag
It is only ever 0 or 1.
2020-10-22 02:26:16 +00:00
Kp 6d50470286 Improve packing of automap structure
Shrink fields that only ever hold byte sized values.
2020-10-12 03:28:26 +00:00
Kp ffb653c0b8 Pass control_info & to various functions
Switch from a direct global reference to passing control_info& as a
parameter.
2020-10-12 03:28:26 +00:00
Kp 47184c1463 Make newmenu inherit from window 2020-10-12 03:28:26 +00:00
Kp 8b7c83c5cb Move newmenu layout to substructure 2020-10-12 03:28:26 +00:00
Kp 840532c4d7 Rename newmenu_create_structure variables to be descriptive
s/tw/iterative_layout_max_width/
s/th/iterative_layout_max_height/
2020-10-12 03:28:26 +00:00
Kp 7e73ee2c78 Pass newmenu& to newmenu_create_structure 2020-10-12 03:28:26 +00:00
Kp 21b98ed513 Reorder newmenu fields to reduce wasted space 2020-10-12 03:28:26 +00:00
Kp 2ccfcb64d8 Use named enum for newmenu TinyMode 2020-10-12 03:28:26 +00:00
Kp 96f5428378 Use named enum for newmenu TabsFlag 2020-10-12 03:28:26 +00:00
Kp 82e007cd09 Remove write-only newmenu::dblclick_flag 2020-10-12 03:28:26 +00:00
Kp f8185494ad Pass UI_DIALOG& to ui_add_gadget_icon 2020-10-12 03:28:26 +00:00
Kp 4f572bbe23 Pass UI_DIALOG& to ui_add_gadget_userbox 2020-10-12 03:28:26 +00:00
Kp 95598a34e3 Pass UI_DIALOG& to ui_add_gadget_inputbox 2020-10-12 03:28:26 +00:00
Kp 466f431c91 Pass UI_DIALOG& to ui_add_gadget_checkbox 2020-10-12 03:28:26 +00:00
Kp 506f24ed04 Pass UI_GADGET_RADIO& to ui_radio_set_value 2020-10-12 03:28:26 +00:00
Kp f531c7d43e Pass UI_DIALOG& to ui_add_gadget_radio 2020-10-12 03:28:26 +00:00
Kp a563b5edf7 Pass UI_DIALOG& to ui_add_gadget_button 2020-10-12 03:28:26 +00:00
Kp 6dce3f90c2 Pass UI_DIALOG& to ui_close_dialog 2020-10-12 03:28:26 +00:00
Kp b6a7f63e5d Pass UI_DIALOG& to ui_gadget_calc_keys 2020-10-12 03:28:26 +00:00
Kp f79e0343d9 Pass UI_DIALOG& to ui_gadget_send_event 2020-10-12 03:28:25 +00:00
Kp c1ce3a2938 Pass explicit nullptr for ui_create_dialog createdata 2020-10-12 03:28:25 +00:00
Kp 147078615a Make object_dialog inherit from UI_DIALOG 2020-10-12 03:28:25 +00:00
Kp d25d14c24f Make wall_dialog inherit from UI_DIALOG 2020-10-12 03:28:25 +00:00
Kp 7fb4f7b396 Use std::array for editor mine filename 2020-10-12 03:28:25 +00:00
Kp a6abf76d0a Use enum class for index into ObjBitmaps 2020-10-07 03:59:14 +00:00
Kp 24497fa085 Use enum class for bmread mode selector 2020-10-07 03:59:14 +00:00
Kp 56b45ca2e8 Fix off-by-one in menu logic
If a menu was all text except for the last element, the menu would
incorrectly be classifed as all text, and citem would be pinned to the
first element.

Fixes: 14a9657136 ("Use partial_range to store newmenu_item pointer/length")
2020-10-03 22:34:38 +00:00
Kp c482d01be5 Move some fvi types to namespaces 2020-10-01 03:25:27 +00:00
Kp e6126b800f Reorder endlevel definitions to split by dcx/dsx 2020-10-01 03:25:27 +00:00
Kp d7560843b0 Fix exit tunnel sequence
The index and the value were transposed, and since both were integer
types, the type system was unable to warn that the new code was
incorrect.  Swap the variables to bind as intended.

Reported-by: Donkyhotay <https://github.com/dxx-rebirth/dxx-rebirth/issues/544>
Fixes: de4efc4f46 ("Qualify more uses of shared_segment members")
2020-10-01 03:25:27 +00:00
Kp c73e310928 Make robot_dialog inherit from UI_DIALOG 2020-09-21 03:18:12 +00:00
Kp a6b8012b5d Make editor_dialog inherit from UI_DIALOG 2020-09-21 03:18:12 +00:00
Kp e4442a1b05 Remove code for ORTHO_VIEWS
Support for ORTHO_VIEWS has been broken since commit
db514a5ded in December 2004.

`git blame HEAD -L872,+4 -- similar/editor/meddraw.cpp`:
```
db514a5ded main/editor/meddraw.c (Bradley Bell 2004-12-19 13:54:27 +0000 872) 			}
db514a5ded main/editor/meddraw.c (Bradley Bell 2004-12-19 13:54:27 +0000 873) 		} else
db514a5ded main/editor/meddraw.c (Bradley Bell 2004-12-19 13:54:27 +0000 874) #if ORTHO_VIEWS
db514a5ded main/editor/meddraw.c (Bradley Bell 2004-12-19 13:54:27 +0000 875) 		 else if ( screen_canvas == TopViewBox->canvas )
```

When ORTHO_VIEWS is true, this code expands to `} else else if (...)`; a
double-else is not legal, so the code cannot have been compiled with
ORTHO_VIEWS enabled.  All 4 of the relevant lines date to db514a5ded,
which itself is an import of files from the D1X editor.
2020-09-21 03:18:12 +00:00
Kp cd620e5f8c Make trigger_dialog inherit from UI_DIALOG 2020-09-21 03:18:12 +00:00
Kp 09966079c4 Make centers_dialog inherit from UI_DIALOG 2020-09-21 03:18:12 +00:00
Kp b97f581d56 Make hostage_dialog inherit from UI_DIALOG 2020-09-21 03:18:12 +00:00
Kp 3c1c270643 Make info_dialog_window inherit from window 2020-09-21 03:18:12 +00:00
Kp 68da7d0ae5 Make briefing inherit from window 2020-09-21 03:18:12 +00:00
Kp f37dc9e947 Make title_screen inherit from window 2020-09-21 03:18:12 +00:00
Kp e068c685f4 Make scores_menu inherit from window 2020-09-21 03:18:12 +00:00