Commit graph

11005 commits

Author SHA1 Message Date
Kp 26cb111bc0 Pass UI_DIALOG& to ui_mouse_on_gadget 2020-10-12 03:28:26 +00:00
Kp a21d89ea6c Pass UI_DIALOG& to ui_draw_button 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 dd2a60de69 Pass UI_DIALOG& to ui_dialog_set_current_canvas 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 564f699002 Pass UI_DIALOG& to ui_gadget_get_next, ui_gadget_get_prev 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 d7bff3daf3 Pass UI_DIALOG& to ui_dialog_do_gadgets 2020-10-12 03:28:25 +00:00
Kp f79e0343d9 Pass UI_DIALOG& to ui_gadget_send_event 2020-10-12 03:28:25 +00:00
Kp 6ff47e2a18 Pass UI_DIALOG& to ui_add_gadget_listbox 2020-10-12 03:28:25 +00:00
Kp 33beedc9fd Pass UI_DIALOG& to ui_draw_listbox 2020-10-12 03:28:25 +00:00
Kp b30d60a521 Pass UI_DIALOG& to ui_gadget_add 2020-10-12 03:28:25 +00:00
Kp b19e0698a1 Simplify out ui_dialog_get_window
UI_DIALOG now extends window, so the conversion is implicit.
2020-10-12 03:28:25 +00:00
Kp 8547c918c2 Make ui_file_browser inherit from UI_DIALOG 2020-10-12 03:28:25 +00:00
Kp 563ac19708 Make menu.cpp menu inherit from UI_DIALOG 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 1864f2dfdf Remove unnecessary UI menu member button 2020-10-12 03:28:25 +00:00
Kp 46dc19f539 Make messagebox inherit from UI_DIALOG 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 97a1bf2b27 Merge commit 'Fixed macOS compilation'... into master 2020-10-07 04:00:09 +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 b136994551 Move valptridx<segment> to dcx
segment is now dcx, so move the valptridx wrapper.
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 1fc8663eff Improve ui_add_gadget_inputbox length handling
Fix potential buffer overflow if `length` (now `length_of_initial_text`)
is less than the `strlen` computed length of text.

Rename variables to clarify usage.

Eliminate the unnecessary use of `strlen`.
2020-09-28 03:32:15 +00:00
Kp 88ab83c354 Remove write-only field UI_GADGET_INPUTBOX::slength 2020-09-28 03:32:15 +00:00
Kp 9a5e968646 Use std::unique_ptr for UI_GADGET_INPUTBOX::text 2020-09-28 03:32:15 +00:00
Kp 59ca93f219 Simplify copy+uppercase pattern in editor code
Change d_strupr to both copy and uppercase, instead of using strcpy to
copy and then a separate phase to rewrite the text as uppercase.
2020-09-28 03:32:15 +00:00
Kp cbf9fb9b9e Remove reference to gcc5 in INSTALL.markdown section for Homebrew
According to a comment from Kreeblah[1], homebrew guarantees a new
enough C++ compiler.  Additionally, gcc5 was once new enough, but is now
below the minimum supported version, so installing it is not useful.
Remove the reference to it.

[1]: https://github.com/dxx-rebirth/dxx-rebirth/pull/540#discussion_r486059009
2020-09-21 03:18:12 +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 5cdd562244 Move UI_DIALOG callback handling to virtual function 2020-09-21 03:18:12 +00:00
Kp 8760387188 Make UI_DIALOG inherit from window 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
Kp f0ae880e83 Make gamebitmaps_viewer_window inherit from window 2020-09-21 03:18:12 +00:00
Kp 9f4886c56d Make polygon_models_viewer inherit from window 2020-09-21 03:18:12 +00:00
Kp 08701ca190 Store kmatrix_result in a uint8_t size enum 2020-09-21 03:18:12 +00:00
Kp b9f3e8a40a Remove unused UI_DIALOG fields 2020-09-21 03:18:12 +00:00