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
Kp
ba78153f13
Pass canvas to gr_ubitmap00m
2016-12-29 03:27:11 +00:00
Kp
eb5419b934
Unify gr_ubitmap00{,m}
2016-12-29 03:27:10 +00:00
Kp
feb0baf040
Pass canvas to gr_ubitmap00
2016-12-29 03:27:10 +00:00
Kp
1fa5aef9ac
Pass canvas to gr_line
2016-12-29 03:27:10 +00:00
Kp
7439949595
Pass canvas to gr_uline
2016-12-29 03:27:10 +00:00
Kp
27a033d634
Pass canvas to gr_box0
2016-12-29 03:27:10 +00:00
Kp
dc4a75ca41
Pass canvas to gr_ubox0
2016-12-29 03:27:10 +00:00
Kp
fab08ec636
Pass canvas to gr_universal_uline
2016-12-29 03:27:10 +00:00
Kp
fc7bfac31b
Pass canvas to 2d/line.cpp plot
2016-12-29 03:27:09 +00:00
Kp
962912e08a
Pass canvas to gr_hline
2016-12-29 03:27:09 +00:00
Kp
d43426a0f7
Pass canvas to gr_vline
2016-12-29 03:27:09 +00:00
Kp
ef06aa089a
Pass canvas to gr_pixel
2016-12-29 03:27:09 +00:00
Kp
7e4d07490d
Pass canvas to gr_upixel
2016-12-29 03:27:09 +00:00
Kp
1ed06c91b7
Pass canvas to ogl_ulinec
2016-12-29 03:27:09 +00:00
Kp
fee4346dc1
Pass canvas to ogl_urect
2016-12-29 03:27:08 +00:00
Kp
bc66f5ce9b
Pass canvas to gr_scanline
2016-12-29 03:27:08 +00:00
Kp
e63593edc4
Pass canvas to gr_uscanline
2016-12-29 03:27:08 +00:00
Kp
3081e69536
Pass grs_main_bitmap to gr_init_bitmap_alloc
2016-10-29 23:16:15 +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
6a3ded191f
Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
...
Rename symbol EDITOR to DXX_USE_EDITOR 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 -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp
99bbd0cf26
Mark global constants as constexpr
...
s/^const \([^*]*=.*;\)/constexpr \1/
2016-07-23 04:10:42 +00:00
Kp
5a16845d74
Remove useless cast in scalec
2016-07-15 03:43:02 +00:00
Kp
59750d3c29
Rewrite declarations of ubyte *
to standard uint8_t *
2016-07-14 01:59:02 +00:00
Kp
e2b28eafcc
Use range_for for _rle_expand_texture
2016-07-10 04:11:34 +00:00
Kp
37d6a652c9
Remove useless casts in box.cpp
2016-07-06 01:54:24 +00:00
Kp
d32afbdac5
Rewrite simple unsigned int casts from C style to static_cast<>
...
s/(unsigned int)\s*(/static_cast<uint32_t>(/g
2016-07-06 01:54:24 +00:00
Kp
65f68877aa
Rewrite simple integer casts from C style to static_cast<>
...
This pass only targets commonly used standard types.
s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-16 03:56:44 +00:00
Kp
1b12a3f7ef
Add parentheses around target of more complicated casts
...
C casts do not require parentheses. C++ casts require grouping around
the target. Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of some C casts.
This pass attempts to process expressions that involve parenthesized or
bracketed subexpressions, but only if those subexpressions do not
themselves contain parenthesized or bracketed subexpressions.
(int) f(1); // changed
(int) f(g()); // not changed
perl -p -i -e 's/(\(\s*((?:un)?signed|int|char|short|long|float|double|s?size_t|(?:u?int[[:digit:]]+_t))\s*\**\s*\)\s*)([&+-]?)([[:alnum:]_.]+\s*->\s*)*([[:alnum:]_.]+)((?:\s*(?:\[[^][]*\])*|(?:\([^()]*\))*))(\s*([;+>*\/^%,|&<>])|$|(\s*-\s*[^>]))/\1\(\3\4\5\6\)\7/g'
2016-06-12 03:45:37 +00:00
Kp
b282bea173
Rewrite simple integer casts from C style to static_cast<>
...
This pass only targets commonly used standard types.
s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp
82a8f6ebb0
Pass bm_mode to gr_init_bitmap
2016-05-28 17:31:27 +00:00
Kp
3c5add9d0e
Pass bm_mode to gr_init_bitmap_alloc
2016-05-28 17:31:27 +00:00
Kp
86122120b7
Pass bm_mode to gr_init_canvas
2016-05-28 17:31:27 +00:00
Kp
398596c468
Use enum for bitmap mode
2016-05-28 17:31:26 +00:00
Kp
a0cc2bfc7e
Pass canvas to ogl_upixelc
2016-05-28 17:31:26 +00:00
Kp
4a3abb3ca3
Cache src values in gr_ubitmap00
2016-05-28 17:31:26 +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
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
36bd39babe
Pass color to gr_line
2016-02-12 04:02:28 +00:00
Kp
3c73d44771
Pass color to gr_disk
2016-02-12 04:02:28 +00:00
Kp
ecb71ba22e
Pass color to gr_ucircle
2016-02-12 04:02:28 +00:00
Kp
edd2acc86b
Pass color to gr_box
2016-02-12 04:02:28 +00:00
Kp
8135577315
Pass color to gr_ubox12
2016-02-12 04:02:28 +00:00
Kp
de08a67321
Pass color to gr_ubox
2016-02-12 04:02:28 +00:00
Kp
23047b1165
Pass color to gr_rect
2016-02-12 04:02:28 +00:00
Kp
35a4736df0
Pass color to gr_urect
2016-02-12 04:02:28 +00:00
Kp
f235d6b12b
Pass color to gr_pixel
2016-02-12 04:02:28 +00:00
Kp
053901b62b
Pass color to gr_uline
2016-02-12 04:02:28 +00:00
Kp
5aeb7559fb
Pass color to 2d/line.cpp workers
2016-02-12 04:02:28 +00:00
Kp
659f0fb3ab
Pass color to gr_upixel
2016-02-12 04:02:28 +00:00
Kp
0dcfa6fba5
Pass color to ogl_urect
2016-02-12 04:02:28 +00:00
Kp
fabe774291
Pass color to gr_scanline
2016-02-12 04:02:28 +00:00
Kp
1c04cb70d9
Change ogl_ubitmapm_cs constant -1 to const white
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
8a324f8492
Simplify gr_scanline
2016-02-10 03:58:05 +00:00
Kp
443b021db8
Precompute fade_table first level index
2016-02-10 03:58:05 +00:00
Kp
905d935a6b
Remove write-only cv_drawmode
2016-01-29 04:05:47 +00:00
Kp
0a68a6439e
Use ={} to clear rle cache
2016-01-09 16:38:11 +00:00