Kp
ca2b1e0cf0
Remove build_colormap_good parameter used
...
`build_colormap_good` only took `used` to clear it. Only one caller
needed it cleared. Move the clear into that caller. Remove the
parameter from all calls.
2018-03-08 04:21:18 +00:00
Kp
b6e2205b9f
Simplify palette color tracking
...
Callers only care whether a color is used, not how often it is used.
2018-03-08 04:21:18 +00:00
Kp
ff49e949d4
Fix savegame thumbnail previews
...
Transposed arguments to fill_n caused rls_stretch_scanline to write
garbage to the preview buffer.
Reported-by: Havner <https://github.com/dxx-rebirth/dxx-rebirth/issues/354 >
Fixes: 8aadb4be5b
("Use fill_n instead of inline loop to write scanline")
2017-11-06 04:24:16 +00:00
Kp
7eadc218a6
Add debugging code to trace global canvas updates
2017-11-05 20:49:09 +00:00
Kp
8684cf5571
Remove unused gr_bitblt_dest_step_shift
...
It is always 0, and has been since it was imported in D2X.
2017-11-01 02:01:20 +00:00
Kp
0909b126ac
Simplify gr_rle_expand_scanline_generic
...
Both the `if` and `else` paths had the same loop and post-loop
processing. The `if` path was a strict subset of the `else` path. The
`else` path had one setup statement, and was otherwise equal to the `if`
path. Move the shared statements outside the guarded path.
2017-10-06 01:59:09 +00:00
Kp
8aadb4be5b
Use fill_n instead of inline loop to write scanline
2017-10-06 01:59:09 +00:00
Kp
49cc3aa324
Work around i686-w64-mingw32-g++ compiler crash
2017-04-22 21:23:55 +00:00
Kp
8184a4609b
Simplify gr_rle_decode
2017-04-08 16:48:17 +00:00
Kp
2e1e1b1185
Fix pointer/array::iterator mismatch in scalec.cpp
2017-04-08 16:48:17 +00:00
Kp
297746024b
Use enum for GR blending mode
2017-03-18 18:07:36 +00:00
Kp
719de35484
Pass grs_bitmap to gr_pixel
2017-03-11 19:56:23 +00:00
Kp
9dbec8433d
Pass grs_bitmap to gr_upixel
2017-03-11 19:56:23 +00:00
Kp
9311548eba
Pass grs_bitmap to ogl_upixelc
2017-03-11 19:56:23 +00:00
Kp
beaa49a7ba
Pass destination bitmap to scale_bitmap
2017-02-11 21:42:34 +00:00
Kp
d779a26307
Pass canvas to gr_bm_ubitblt0x_rle
2017-02-11 21:42:33 +00:00
Kp
f8b057d43d
Pass canvas to gr_bm_ubitbltm
2017-02-11 21:42:32 +00:00
Kp
9cc5d6f439
Pass canvas to gr_bm_ubitblt
2017-02-11 21:42:32 +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
c242319829
Use RLE helper for bitblt RLE decoding
2017-02-11 21:42:30 +00:00
Kp
c1440ff995
Factor out RLE expansion
...
Many sites open-coded walking a bitmap and handling whether it was
RLE_BIG. Factor that out into a helper class and redirect those sites
to use it.
2017-02-11 21:42:30 +00:00
Kp
d40c636ecc
Reorder gr_free_bitmap_data to improve tail call optimization
2017-02-08 23:34:41 +00:00
Kp
764d20d4e1
Make grs_bitmap::bm_flags private
2017-01-15 00:03:13 +00:00
Kp
96cc5a40b8
Remove dead preprocessor guards
...
Some bitblt code had guards of the form:
#if A
xxx
#if !A
yyy
#endif
zzz
#endif
If A is true, !A is false, so the inner block can never be included.
Delete it.
2017-01-15 00:03:12 +00:00
Kp
c914131009
Pass canvas to gr_rle_expand_scanline_generic
2017-01-01 00:45:45 +00:00
Kp
22e364e030
Pass canvas to gr_clear_canvas
2017-01-01 00:45:45 +00:00
Kp
0905aefa0a
Pass canvas to gr_rect
2017-01-01 00:45:45 +00:00
Kp
794dcce327
Pass canvas to gr_urect
2017-01-01 00:45:44 +00:00
Kp
774dedd21d
Pass canvas to gr_bm_pixel
2017-01-01 00:45:44 +00:00
Kp
2be580df0c
Pass canvas to gr_bm_upixel
2017-01-01 00:45:44 +00:00
Kp
77c22d3a7f
Pass canvas to gr_settransblend
2017-01-01 00:45:44 +00:00
Kp
c3c4ab8e3e
Pass canvas to gr_box
2017-01-01 00:45:44 +00:00
Kp
dac1a69f7c
Pass canvas to gr_ubox
2017-01-01 00:45:44 +00:00
Kp
1b57e9a5ff
Pass canvas to show_fullscr
2017-01-01 00:45:43 +00:00
Kp
250bf58e51
Pass canvas to gr_bitmapm
2017-01-01 00:45:43 +00:00
Kp
362d526546
Pass canvas to gr_disk
2016-12-29 03:27:13 +00:00
Kp
acd309099b
Pass canvas to gr_ucircle
2016-12-29 03:27:13 +00:00
Kp
08d0aa9b59
Pass canvas to gr_bitmap
2016-12-29 03:27:13 +00:00
Kp
d7cd6d17c3
Pass canvas to gr_ubitmapm
2016-12-29 03:27:13 +00:00
Kp
6ab3b18657
Pass canvas to gr_ubitmap
2016-12-29 03:27:12 +00:00
Kp
99f5cfbb10
Pass canvas to ogl_ubitmapm_cs
2016-12-29 03:27:12 +00:00
Kp
1b617b9d5c
Pass canvas to gr_ubitmapGENERICm
2016-12-29 03:27:12 +00:00
Kp
ea0b0137f9
Pass canvas to gr_ubitmap012m
2016-12-29 03:27:12 +00:00
Kp
aba8f163e6
Pass canvas to gr_ubitmap012
2016-12-29 03:27:12 +00:00
Kp
ba70ec2142
Pass canvas to gr_for_each_bitmap_byte
2016-12-29 03:27:12 +00:00
Kp
d1f1633f45
Pass canvas to gr_ubitmapGENERIC
2016-12-29 03:27:11 +00:00
Kp
7e62a5670e
Pass canvas to gr_box12
2016-12-29 03:27:11 +00:00
Kp
14961b52fe
Pass canvas to gr_ubox12
2016-12-29 03:27:11 +00:00
Kp
9f6c54e29a
Pass unsigned x/y to gr_gpixel
2016-12-29 03:27:11 +00:00
Kp
f4752eabb3
Pass canvas to gr_for_each_bitmap_byte callback
2016-12-29 03:27:11 +00:00