Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
d28ec4723e
Allow comparing const instances of screen_mode
2020-12-27 22:03:09 +00:00
Kp
c1d6150015
Pass grs_font& to gr_set_curfont
2020-12-27 22:03:09 +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
7a790f6068
Inline gr_set_fontcolor
...
It is a trivial function.
2020-07-05 23:34:32 +00:00
Kp
7b52b1fe1d
Move grs_bitmap::avg_color into #if !DXX_USE_OGL
...
This field is used in the SDL build for rendering. In the GL build, its
only purpose is for the editor to write it to a PIG file. Change that
one use to compute the value as needed. Move all other references
behind a preprocessor test for !DXX_USE_OGL. This shrinks the size of
grs_bitmap by 1 pointer, since the compiler added padding after
avg_color up to the size of the next aligned pointer.
2020-05-22 02:40:26 +00:00
Kp
8839f538e0
Refer to <array> directly, not through "compiler-array.h"
2020-05-02 21:18:42 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
9cee93abb1
Require support for C++14 std::exchange
2020-05-02 21:18:42 +00:00
Kp
7bcbaae230
Tighten protection against grs_bitmap bm_data confusion
...
Bitmaps based on grs_main_bitmap own their data. Bitmaps based on
grs_bitmap do not. Adjust prototypes to prevent initializing a
grs_main_bitmap with data it will not own.
2019-02-02 18:36:39 +00:00
Kp
ba442b99bd
Fix potential memory leak in grs_main_bitmap move-assignment
2019-02-02 18:36:39 +00:00
Kp
f33877d379
Make grs_main_bitmap::grs_main_bitmap() clear the whole structure
2018-07-14 17:23:15 +00:00
Kp
39edf53496
Check for freed canvas in release builds
2018-06-14 02:39:15 +00:00
Kp
7eadc218a6
Add debugging code to trace global canvas updates
2017-11-05 20:49:09 +00:00
Kp
4f40b9de18
Assert that a canvas is not referenced when it is destroyed
2017-11-05 20:49:08 +00:00
Kp
6f81d13c41
Pass canvas to gr_set_curfont
2017-02-11 21:42:38 +00:00
Kp
43a700a200
Prefer grs_main_bitmap::reset() to direct reinitialization
...
This ensures that any allocated resources are always freed.
2017-02-11 21:42:31 +00:00
Kp
8c706a88bd
Initialize grs_main_bitmap at construction
2017-01-28 18:12:20 +00:00
Kp
764d20d4e1
Make grs_bitmap::bm_flags private
2017-01-15 00:03:13 +00:00
Kp
3081e69536
Pass grs_main_bitmap to gr_init_bitmap_alloc
2016-10-29 23:16:15 +00:00
Kp
9da6507e82
Remove test DXX_HAVE_CONSTEXPR_UNION_CONSTRUCTOR
...
Test DXX_HAVE_CONSTEXPR_UNION_CONSTRUCTOR probes for a bug present in
<=gcc-4.7.x. Rebirth now rejects <=gcc-4.8.x for other reasons, so all
supported gcc versions pass test DXX_HAVE_CONSTEXPR_UNION_CONSTRUCTOR.
Remove the test.
2016-09-25 04:52:49 +00:00
Kp
62b58e9890
Move OGL to dxxsconf.h; rename to DXX_USE_OGL
...
Rename symbol OGL to DXX_USE_OGL to show that it is a DXX
symbol, not one inherited from a library. Move it to dxxsconf.h to
shorten the command line.
This is a mostly automated transform, but the changes to SConstruct were
manual.
git grep -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +00:00
Kp
bbda32f78d
Make cv_fade_level unsigned
2016-05-28 17:31:26 +00:00
Kp
27cef20eb3
Move namespace dsx handling to dsx-ns.h
2016-03-19 19:08:10 +00:00
Kp
08de1bbff0
Remove cv_color
...
It is only ever set to 0 or copied from other canvases. Set it to zero
everywhere.
2016-02-12 04:02:28 +00:00
Kp
e07c9a5f87
Combine ft_chars, ft_allocdata into one allocation
2016-02-12 04:02:28 +00:00
Kp
230f2dbb19
Make cv_blend_func OGL-specific
2016-02-12 04:02:28 +00:00
Kp
905d935a6b
Remove write-only cv_drawmode
2016-01-29 04:05:47 +00:00
Kp
677c70c64e
Move font filename into grs_font
2016-01-10 21:18:09 +00:00
Kp
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
85d7c495e8
Use inline namespace dsx for similar/2d
2015-12-13 18:00:48 +00:00
Kp
69c5a79058
Use inline namespace dcx for common/2d
2015-12-05 22:57:23 +00:00
Kp
f509073b65
Move font allocdata pointer to grs_font
2015-11-14 18:17:21 +00:00
Kp
74290b5150
Add some error checking to font loader
2015-11-14 18:17:21 +00:00
Kp
c942d28197
Use accessor for grs_bitmap::bm_type
2015-07-25 23:10:47 +00:00
Kp
9bfea35e4f
Use forward-declaration header for gr.h
2015-07-25 23:10:45 +00:00
Kp
cc2a5e9790
Use gr_free_bitmap_data for Orb_icons
2015-05-22 03:33:19 +00:00
Kp
0ece005dfa
Use screen_mode for screen resolution
2015-05-14 02:23:13 +00:00
Kp
2d9af1e348
Propagate gr_init argument
2015-05-14 02:23:13 +00:00
Kp
6dccb811b7
Pass unsigned x/y to gr_pixel
2015-05-09 17:39:00 +00:00
Kp
cf87ebe54d
Remove write-only grs_bitmap::bm_handle
2015-05-09 17:38:59 +00:00
Kp
916cf69e37
Remove unused gr_uline return value
2015-04-02 02:36:54 +00:00
Kp
ca123b6cde
Remove unused gr_line return value
2015-04-02 02:36:54 +00:00
Kp
66a70fd373
Prepare for global arrays to be array<>
2015-04-02 02:36:52 +00:00
Kp
2b44a352ca
Remove redundant sc_mode
...
sc_mode is a packed copy of sc_w/sc_h. Switch to an accessor that uses
the copy.
2015-03-22 18:49:21 +00:00
Kp
fca381727c
Add wrappers for screen width/height
2015-03-22 18:49:21 +00:00
Kp
8daa014d53
Remove unused gr_check_mode
2015-03-22 18:49:21 +00:00
Kp
f098471e54
Make sdl_video_flags static
2015-03-22 18:49:21 +00:00
Kp
08c0c3768c
Remove unused gr_set_draw_buffer
2015-03-22 18:49:21 +00:00
Kp
0f74a66063
Use uint_fast32_t for gr_box
2015-02-14 22:48:30 +00:00