Kp
6043168d51
Move various SDL-only texture mapping functions to !DXX_USE_OGL
...
The OGL build compiles, but does not use, various texture mapping
functions. Move these to be built only for the SDL build.
2017-11-01 02:01:21 +00:00
Kp
7bae498c45
Cache bitset::operator[] result
2017-09-30 18:00:15 +00:00
Kp
753cbafe61
Pass canvas to render_terrain
2017-03-11 19:56:26 +00:00
Kp
a6fc1f6357
Pass canvas to draw_cell
2017-03-11 19:56:26 +00:00
Kp
7410ad343c
Pass canvas to render_mine
2017-03-10 01:22:28 +00:00
Kp
08e4a6e620
Use stdint constants for some INT*_MAX
...
clang becomes confused trying to determine which vm_distance_squared
constructor to use for a literal input of 0x7fffffffffffffff, even
though the size of the input requires it to be `long` and only one
constructor can take a `long`. Switch from an explicit
0x7fffffffffffffff to the symbolic constant INT64_MAX, which has the
same value, but a platform-appropriate suffix to force the compiler to
pick the right type.
For general clarity, switch some other instances of integer maximum
literals to symbolic constants of the same value.
This commit has no effect on the generated code (except for changes to
line numbers).
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/pull/324 >
Fixes: 17208cca79
("Disallow int for vm_distance_squared")
2017-02-22 03:05:43 +00:00
Kp
59b57bd7dc
Pass canvas to g3_check_and_draw_tmap
2017-02-11 21:42:40 +00:00
Kp
513e7ceceb
Pass canvas to g3_draw_line
2017-02-11 21:42:33 +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
9a06543781
Switch terrain.cpp light cast to static_cast
2016-09-04 00:02:51 +00:00
Kp
c636dc4b98
Convert various static const
expressions to constexpr
2016-07-16 16:52:04 +00:00
Kp
dcc56e6b39
Propagate bm_mode::linear into iff_read_bitmap
2016-05-28 17:31:27 +00:00
Kp
398596c468
Use enum for bitmap mode
2016-05-28 17:31:26 +00:00
Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
8c24eaa721
Pass color to g3_draw_line
2016-02-12 04:02:28 +00:00
Kp
ccee595321
Remove Interpolation_method from OGL build
2015-11-06 03:51:10 +00:00
Kp
68834fb929
Expand render_mine window_rendered_data helper inline
2015-05-05 03:20:42 +00:00
Kp
31450e4843
Pass iff_read_bitmap arg by &
2015-01-25 05:32:44 +00:00
Kp
9794cfddc9
Move some local structs into anonymous namespaces
2015-01-24 19:16:34 +00:00
Kp
d3e657222e
Use RAIIdmem for height_array
2015-01-23 03:55:04 +00:00
Kp
9ffd958d3d
Create window_rendered_data locally
2014-12-18 04:12:38 +00:00
Kp
b79e432a3e
Pass render_mine arg by &
2014-12-13 04:11:16 +00:00
Kp
5eddc2c197
Make bitmap bm_data const where easy
2014-12-02 03:24:38 +00:00
Kp
855b249555
Make g3s_point const only in OGL
2014-11-16 19:14:51 +00:00
Kp
c2d308807c
Make various g3s_point * const
2014-11-15 03:10:06 +00:00
Kp
8e0d85b666
Pass g3_draw_tmap arg by &
2014-11-13 03:44:04 +00:00
Kp
baa39fe8f7
Add g3_rotate_point that returns result
2014-11-13 03:41:29 +00:00
Kp
aba13a0bd0
Pass g3_draw_line arg by &
2014-11-13 03:19:52 +00:00
Kp
40eb2e6b01
Add vm_vec_scale_add that returns result
2014-11-02 03:43:57 +00:00
Kp
b32f5e5df3
Add vm_vec_copy_scale that returns result
2014-11-02 03:43:47 +00:00
Kp
805d7f2404
Pass get_face_light arg by &
2014-11-02 03:43:29 +00:00
Kp
697bdcf078
Add vm_vec_normal that returns result
2014-11-01 03:17:48 +00:00
Kp
ff877834cb
Pass render_terrain vector by &
2014-11-01 03:12:57 +00:00
Kp
5bb9c88979
Add vm_vec_sub that returns result
2014-10-29 03:24:31 +00:00
Kp
2ceabf5034
Pass g3_add_delta_vec arg by &
2014-10-02 03:02:36 +00:00
Kp
adae9888b9
Pass g3_rotate_delta_vec arg by &
2014-10-02 03:02:36 +00:00
Kp
68211d20d3
Pass g3_rotate_point arg by &
2014-10-02 03:02:35 +00:00
Kp
f509b49dc3
Pass vm_vec_normal arg by &
2014-10-01 02:28:42 +00:00
Kp
05a91f9b58
Pass vm_vec_scale_add2 arguments by &
2014-09-28 21:43:14 +00:00
Kp
4104bf4f11
Pass vm_vec_scale_add arguments by &
2014-09-28 21:43:14 +00:00
Kp
b5949cc4a0
Pass vm_vec_copy_scale arguments by &
2014-09-28 21:43:14 +00:00
Kp
00b59c3058
Pass vm_vec_dot arguments by &
2014-09-28 21:11:48 +00:00
Kp
321bbe37d8
Pass vm_vec_sub arguments by &
2014-09-28 21:11:45 +00:00
Kp
7ddba1d15e
Pass vm_vec_negate v by reference
2014-09-28 21:09:37 +00:00
Kp
d9a3bf5a57
Move terrain y cache onto stack
2014-09-28 21:09:27 +00:00
Kp
5576a65dac
Check length of g3 tmap inputs
2014-09-04 03:02:21 +00:00
Kp
94550355a8
Use make_unique instead of bare new
2014-08-24 18:28:09 +00:00
Kp
eefdce5b04
Reduce nesting of vms_vector::{x,y,z}
2014-08-22 02:27:13 +00:00
Kp
d74e36507c
Propagate NULL arguments to g3_check_and_draw_poly
2014-08-16 21:54:48 +00:00
Kp
7f1ccd298b
Use unique_ptr for light_array
2014-07-22 23:48:24 +00:00