Kp
21241471c6
Return string width/height from gr_get_string_size
...
Use structured bindings to capture the values on return, so that they
can be declared as `const` if they are immutable after initial
computation.
2021-09-12 16:20:52 +00:00
Kp
a4f41f8360
Pass grs_canvas& to print_clock
2020-12-27 22:03:09 +00:00
Kp
7fb4f7b396
Use std::array for editor mine filename
2020-10-12 03:28:25 +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
6285878c4c
Add color_palette_index type alias, to note palette-related uint8_t
2020-07-16 02:31:04 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
ec1cf005b6
Enable -Wformat-truncation
...
Add macro cf_assert ("control flow" assert) to hint to gcc that certain
conditions are impossible. Use it to avoid generating range checks for
situations that never happen. If the event did happen, the only
consequence would be truncated UI text, rather than a correctness
problem.
2018-08-26 18:10: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
1413264697
Cache canvas in print_clock
2017-02-11 21:42:34 +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
1ef6b9d5bc
Pass font to gr_get_string_size
2017-01-08 22:31:59 +00:00
Kp
0905aefa0a
Pass canvas to gr_rect
2017-01-01 00:45:45 +00:00
Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
23047b1165
Pass color to gr_rect
2016-02-12 04:02:28 +00:00
Kp
110d62a748
Remove sprintf from autosave.cpp
2016-01-09 16:38:16 +00:00
Kp
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
bf60f19aef
Use inline namespace dcx for common/editor
2015-12-05 22:57:24 +00:00
Kp
93a441b81e
Remove unused editor func_* functions
2015-12-05 22:57:23 +00:00
Kp
ed55763603
Remove unused symbols
2015-12-04 03:36:31 +00:00
Kp
d9cef82f81
Allow nullptr for gr_get_string_size
2015-09-29 02:41:22 +00:00
Kp
9a5654e002
Move similar/editor/autosave.cpp -> common/editor/autosave.cpp
2015-07-25 23:10:47 +00:00
Kp
528633eb55
Propagate for variables in common/editor/func.cpp
2014-09-26 02:42:14 +00:00
Kp
57dc04a9bd
Remove trailing ^Z
2014-09-07 20:26:38 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
386c193cae
Make med_functions const
2013-11-28 00:27:43 +00:00
Kp
aa9127e3c1
Enable -Wwrite-strings
2013-09-15 21:34:03 +00:00
Kp
7983086b40
Move common/editor/func.c -> common/editor/func.cpp
2013-08-04 18:02:42 +00:00
Kp
5e89ce7cd3
Move */editor/data -> common/editor/data
2013-03-17 23:01:32 +00:00
Kp
f9f14afec5
Move */editor/func.c -> common/editor/func.c
2013-03-17 23:01:32 +00:00