Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
5c7fc7d143
Remove unused UI_DIALOG d_callback
...
Every user now uses inheritance and a virtual function override. Make
callback_handler pure virtual, delete its body, and then delete the
member variables that existed only for use in that body. Remove the
constructor parameters that initialized those variables, and update all
derived classes accordingly.
2020-12-19 16:13:26 +00:00
Kp
2709676f8d
Rename ui_create_dialog to window_create
...
The requirement to call send_creation_events from outside the
constructor makes the presence of a helper function convenient. Rename
ui_create_dialog to window_create, and move it to window.h.
2020-12-19 16:13:26 +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
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
c1ce3a2938
Pass explicit nullptr for ui_create_dialog createdata
2020-10-12 03:28:25 +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
d056daa162
Remove obsolete UI_DIALOG constructor, macros
2020-09-21 03:18:12 +00:00
Kp
db7b4b3f88
Refer to <memory> directly, not through "compiler-make_unique.h"
2020-05-02 21:18:43 +00:00
Kp
cc38cdf4b8
Qualify uses of std::make_unique
2020-05-02 21:18:42 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
919580eaa9
Move RobotCenters to d_level_shared_robotcenter_state
2019-02-02 18:36:39 +00:00
Kp
12c06e59aa
Move N_robot_types into LevelSharedRobotInfoState
2018-12-30 00:43:59 +00:00
Chris Taylor
143ed30fee
Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp
2016-11-06 14:20:18 +08:00
Kp
5a69c09ec2
Move fuelcen_activate special assignment up
...
One caller uses fuelcen_activate when segp->special != station_type.
Every other caller passes the type that was already on the segment.
Move the assignment into the one caller that needs it, then remove the
argument.
2016-10-29 23:16:17 +00:00
Chris Taylor
06632e73e8
Make centers_dialog_handler return window_event_result::close instead of closing itself
...
This ensures the event system will know what's going on.
2016-10-27 17:15:31 +08:00
Chris Taylor
db665d8c33
Allow dcx::UI_DIALOG struct to be subclassed - step 2
...
Allow dcx::UI_DIALOG struct to be subclassed step 2. Make all the UI_DIALOG handlers return a window_event_result like everyone else.
2016-10-04 15:58:20 +08:00
Kp
ee1003f29f
Move conditionally compiled code into namespace dsx
2016-08-25 04:05:32 +00:00
Kp
e8d5992797
Remove unused CENTER_STRING_LENGTH
2016-07-09 17:58:35 +00:00
Kp
3779bc25a0
Define Robot_names only if EDITOR
2016-07-09 17:58:34 +00:00
Kp
e600528b83
Fix -Wshadow warnings in centers_dialog_handler
2016-05-21 17:24:51 +00:00
Kp
78de0ac119
Add fwd-event.h with forward declarations of event.h
2015-10-09 02:46:10 +00:00
Kp
17b1943c5e
Mark various per-file structures as static
2015-08-12 03:11:46 +00:00
Kp
fdd2356eac
Use segptridx for Cursegp, Markedsegp
2015-07-12 01:04:18 +00:00
Kp
6b6eaef226
Include polyobj.h from robot.h
...
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp
0bf2a6eb80
Return unique_ptr from ui_add_gadget_button
2014-12-20 04:36:10 +00:00
Kp
3b4fbd0bd5
Return unique_ptr from ui_add_gadget_radio
2014-12-20 04:36:10 +00:00
Kp
b16e8ecbec
Return unique_ptr from ui_add_gadget_checkbox
2014-12-20 04:36:09 +00:00
Kp
7e4e8f3501
Use unique_ptr for centers_dialog
2014-12-20 04:36:08 +00:00
Kp
a8f853aa7a
Pass d_event arg by const&
2014-10-04 22:36:13 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
094dfbf3d4
Reduce header inclusions
2013-12-31 03:22:03 +00:00
Kp
073f00974a
Eliminate uses of the typedef struct X { ... } X; pattern
...
C++ does not require this pattern.
import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
m = to.match(line)
if m:
osn = m.group(1)
print 'struct %s\n{' % osn
continue
if osn:
m = tc.match(line)
if m:
csn = m.group(2)
if osn == csn:
print '}%s;' % m.group(1)
osn = None
continue
else:
osn = None
print line,
2013-12-28 22:48:07 +00:00
Kp
be041a9cfc
Add type checking for ui_create_dialog
2013-12-17 03:49:24 +00:00
Kp
03daa71a02
Remove unused center_names
2013-11-28 00:27:43 +00:00
Kp
21c9e11811
Move similar/editor/centers.c -> similar/editor/centers.cpp
2013-10-05 23:07:23 +00:00