Commit graph

45 commits

Author SHA1 Message Date
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 2243cd7f58 Use xrange for loops with zero start and constant numerical end
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*\(!=\|<\)\s*\([0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\4u))/
2019-05-04 18:27:36 +00:00
Kp 08446f0ab6 Pass font to gr_string,gr_printf 2018-05-19 23:21:42 +00:00
Kp 49c0cdae2e Simplify calls to gr_set_default_canvas
Rather than use an inline wrapper and rely on the compiler optimizer to
redirect gr_set_current_canvas(nullptr) to gr_set_default_canvas,
rewrite all relevant calls directly in the source.

git grep -l 'gr_set_current_canvas' | xargs sed -i -e 's:gr_set_current_canvas(\s*NULL\|nullptr\s*);:gr_set_default_canvas();:'
2017-11-05 20:49:08 +00:00
Kp 6ff14b7688 Cache canvas in keypad.cpp 2017-03-10 01:22:25 +00:00
Kp aa9b9a8346 Pass canvas to ui_draw_box_in 2017-02-11 21:42:36 +00:00
Kp ae33aaafc1 Pass canvas to gr_set_fontcolor 2017-02-11 21:42:32 +00:00
Kp 5da784dbed Pass canvas to gr_{,u}string 2017-01-08 22:32:00 +00:00
Kp 794dcce327 Pass canvas to gr_urect 2017-01-01 00:45:44 +00:00
Chris Taylor cc3f35649f Change all occurrences of "Couldn't" to "Could not" for consistency ("Could not" is more common and wins).
Not touching TXT_COULDNT because it's stored separately in hog file.
2016-11-13 13:27:18 +08:00
Chris Taylor ac438f4cc2 Allow the user to carry on as usual if any of the editor files are missing (i.e. before editor was loaded).
If a game was playing, continue playing. If it was in the main menu, return to the main menu. (If all files are put in place the editor can load again.)
2016-11-11 16:09:57 +08:00
Kp f4e1ebb576 Remove unnecessary gr_setcolor calls 2016-02-12 04:02:28 +00:00
Kp 35a4736df0 Pass color to gr_urect 2016-02-12 04:02:28 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp 22bd3ce8d8 Use inline namespace dcx for common/ui 2015-12-05 22:57:24 +00:00
Kp dad504cfef Fix some -Wshadow warnings 2015-11-26 02:56:54 +00:00
Kp 968cdbecf4 Add non-aborting UserError for user-caused fatal errors 2015-06-16 03:15:40 +00:00
Kp 150e2d2686 Convert local arrays to array<> 2015-04-19 04:18:49 +00:00
Kp 71ec47b32e Refactor ui_pad_activate 2015-01-29 04:27:35 +00:00
Kp faee7c7302 Ignore empty lines when parsing pads 2015-01-28 03:42:53 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp dc35b0ad88 Fix Win32 build 2015-01-03 23:44:32 +00:00
Kp a9998476a9 Use ntstring for UI_KEYPAD description 2014-12-22 04:35:48 +00:00
Kp df46499f85 Fix buffer overrun reading UI pad 2014-12-22 04:35:47 +00:00
Kp ba88926780 Fix potential null dereference parsing UI pad 2014-12-22 04:35:47 +00:00
Kp 0af323c24d Fix various buffer overruns parsing pad UI 2014-12-22 04:35:47 +00:00
Kp 2766114959 Make PHYSFSX_gets_line_t::line_t be array<> 2014-12-20 04:36:10 +00:00
Kp c53a8cc30f Initialize buttontext in UI_KEYPAD constructor 2014-12-20 04:36:10 +00:00
Kp 0bf2a6eb80 Return unique_ptr from ui_add_gadget_button 2014-12-20 04:36:10 +00:00
Kp 6a62d3b49d Cache KeyPad[n] address 2014-12-20 04:36:08 +00:00
Kp b9ceceda3a Use array<char,100> for UI_KEYPAD::buttontext 2014-12-20 04:36:08 +00:00
Kp 5600cea3ac Use array<unique_ptr<UI_KEYPAD>> for KeyPad 2014-12-20 04:36:08 +00:00
Kp b0e2188dd2 Propagate for variables in common/ui/keypad.cpp 2014-09-26 02:42:15 +00:00
Kp 425c4242c1 Use std::string for UI_GADGET_BUTTON text 2014-09-07 21:21:57 +00:00
Kp e8f4b20d1d Use special type for PHYSFSX_fgets 2014-09-07 20:07:20 +00:00
Kp c1d184240d Use unique_ptr to manage fonts 2014-07-22 23:48:23 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp a2cec5d71f Switch PHYSFSX_fgets to auto-sized variant where possible 2013-12-07 18:39:19 +00:00
Kp accaef2ecb Remove unused REMOVE_EOL macro in keypad.cpp
It conflicts with pre-compiled headers.
2013-12-05 00:08:58 +00:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp aa9127e3c1 Enable -Wwrite-strings 2013-09-15 21:34:03 +00:00
Kp a881ee455e Remove fix.h 2013-08-08 03:01:48 +00:00
Kp 1fdc080c17 Move common/ui/keypad.c -> common/ui/keypad.cpp 2013-08-04 17:59:37 +00:00
Renamed from common/ui/keypad.c (Browse further)