Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
1b4b6673ee
Pass color to g3_draw_poly
2016-02-12 04:02:28 +00:00
Kp
d2d9d2bf5a
Unify op_flatpoly color setup
2016-02-12 04:02:28 +00:00
Kp
70ffee39cd
Use namespace dcx for WORDS_BIGENDIAN/WORDS_NEED_ALIGNMENT functions
...
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/pull/171 >
Fixes: 32051298ae
("Use inline namespace dcx/dsx for more symbols")
2015-12-23 03:28:17 +00:00
Kp
26e948d5f1
Uninline namespace dsx
2015-12-13 18:00:49 +00:00
Kp
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
d4857f4257
Use inline namespace dsx for similar/3d
2015-12-13 18:00:48 +00:00
derhass
85691b3784
Restore inclusion of byteutil.h in similiar/3d/interp.cpp
...
4a84320817b9e02f86f3ec2dd2678e3367cddcc removed lots of inclusions of
byteutil.h in various source files. However, when building with
WORDS_NEED_ALIGNMENT, interp.cpp makes use of the INTEL_SHORT and
GET_INTEL_SHORT macros defined there.
Fixes: c4a8432081
("Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*")
2015-09-29 18:36:01 +00:00
Kp
fcab519693
Remove extern for vms_vector_swap
...
It is only used in the interpreter.
2015-09-19 23:04:36 +00:00
Kp
c4a8432081
Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*
...
The cast provokes a warning on systems that require alignment, so remove
it. memcpy takes const void* input, so the cast is unnecessary.
Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119 >
2015-09-13 21:02:19 +00:00
Kp
3905f1a668
Enable -Wcast-qual
2015-06-13 22:42:21 +00:00
Kp
ae604225c8
Fix gcc-4.6 interpreter build
...
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`
Fixes: 77ec36b9c3
("Convert g3_draw_morphing_model to class")
2015-05-22 03:33:19 +00:00
Kp
6792c1bc4b
Enable -Wunused-parameter
2015-04-26 20:15:56 +00:00
Kp
3da71f79cc
Move WORDS_BIGENDIAN functions into #ifdef guard
2015-03-22 18:49:21 +00:00
Kp
c5f6a115ec
Add <stdexcept> for files that throw std::runtime_error
2015-03-22 04:16:49 +00:00
Kp
3a37b41192
Fix startup trap with D1 shareware data
...
D1 shareware models handle textures in a way that requires starting
highest_texture_num at -1.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/46 >
Fixes: 68be3baeca
("Track highest_texture_num locally")
2015-03-20 03:30:20 +00:00
Kp
cb83156132
Fix -O0 build
...
btb reports that clang fails to link
<77ec36b9c3 (commitcomment-9992820)
>.
When building at -O0, static member glow_num has its address referenced
because the compiler does not inline non-static method
glow_num_stub::operator=. Add a definition of this symbol.
Fixes: 77ec36b9c3
("Convert g3_draw_morphing_model to class")
2015-03-03 04:36:16 +00:00
Kp
14530d43ea
Guard g3d_interp_outline by defined(EDITOR)
2015-02-28 22:34:07 +00:00
Kp
2397bc9a02
Cache &Polygon_models[N_polygon_models]
2015-02-28 22:34:07 +00:00
Kp
86800b1515
Simplify op_sortnorm
2015-02-28 22:34:06 +00:00
Kp
68be3baeca
Track highest_texture_num locally
2015-02-28 22:34:06 +00:00
Kp
87516a5b1b
Always update glow_num
...
If !glow_values, the update will be ignored later.
2015-02-28 22:34:06 +00:00
Kp
1833ea6bfa
Factor out polymodel init_sub switch
2015-02-28 22:34:06 +00:00
Kp
c0a8f598c2
Factor out polymodel morph switch
2015-02-28 22:34:06 +00:00
Kp
c0eb4391ba
Factor out polymodel draw switch
2015-02-28 22:34:06 +00:00
Kp
655dc60850
Factor out polymodel color switch
2015-02-28 22:34:06 +00:00
Kp
aafe252c6d
Factor out polymodel chunk switch
2015-02-28 22:34:06 +00:00
Kp
2085fcca34
Factor out record size
2015-02-28 22:34:06 +00:00
Kp
e19237c105
Factor out polymodel swap switch
2015-02-28 22:34:06 +00:00
Kp
1a0f409648
Convert init_model_sub to class
2015-02-28 22:34:05 +00:00
Kp
77ec36b9c3
Convert g3_draw_morphing_model to class
2015-02-28 22:34:05 +00:00
Kp
c080f65e81
Convert g3_draw_polygon_model to class
2015-02-28 22:34:05 +00:00
Kp
0ec4a876c5
Convert g3_poly_get_color to class
2015-02-28 22:34:05 +00:00
Kp
a07ae16d93
Convert get_chunks to class
2015-02-28 22:34:05 +00:00
Kp
8338cc7640
Convert swap_polygon_model_data to class
2015-02-28 22:34:05 +00:00
Kp
69fa0ee00c
Centralize swap_polygon_model_data op update
2015-02-25 04:19:12 +00:00
Kp
31df9268bf
Use C++ casts for interpreter casts
2015-02-22 01:29:43 +00:00
Kp
2fa2e17a82
Make chunk.old_base const
2015-02-22 01:29:43 +00:00
Kp
5ddab4818d
Make rotate_point_list src const
2015-02-22 01:29:43 +00:00
Kp
8e4493a534
Fix WORDS_BIGENDIAN breaks
2015-02-22 01:29:43 +00:00
Kp
d1f45f85b2
Wrap submodel angles
2015-02-14 22:48:28 +00:00
Kp
2daaacaa26
Move robot_points onto stack
2015-02-05 03:03:50 +00:00
Kp
9f44ccbbf3
Fix WORDS_NEED_ALIGNMENT build of interp.cpp
2014-12-19 02:19:29 +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
d9e42e6bf3
Pass g3_draw_rod_tmap arg by &
2014-11-13 03:34:42 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
69c052ccf6
Pass vms_vector_swap arg by &
2014-10-26 22:08:58 +00:00
Kp
68211d20d3
Pass g3_rotate_point arg by &
2014-10-02 03:02:35 +00:00
Kp
ade7aa2a5f
Pass g3_start_instance_angles arg by const &
2014-10-02 03:02:35 +00:00
Kp
b2ab0e48da
Pass g3_check_normal_facing arg by &
2014-10-02 03:02:35 +00:00
Kp
00b59c3058
Pass vm_vec_dot arguments by &
2014-09-28 21:11:48 +00:00
Kp
703f60ac3f
Fix -Wtype-limits warnings
2014-09-21 21:41:55 +00:00
Kp
5576a65dac
Check length of g3 tmap inputs
2014-09-04 03:02:21 +00:00
Kp
215c66595b
Copy morphing g3s_uvl onto stack
2014-09-03 01:32:34 +00:00
Kp
99f1777983
Move point_list onto interpreter stack
2014-08-16 22:18:09 +00:00
Kp
dfb7026724
Only set canvas color if it is used
2014-08-16 21:58:37 +00:00
Kp
4b7c823f2f
Remove write-only variable morph_uvls
2014-08-16 21:56:18 +00:00
Kp
d74e36507c
Propagate NULL arguments to g3_check_and_draw_poly
2014-08-16 21:54:48 +00:00
Kp
22a34809ee
Move interpreter g3s_lrgb onto stack
...
MAX_POINTS_PER_POLY is 25, so storing lrgb on the stack fits easily and
saves memory allocation/deallocation.
2014-08-16 21:53:29 +00:00
Kp
cbd341e8ee
Remove unused !FADE_FLATPOLY code
2014-08-16 21:52:56 +00:00
Kp
1cd6277a3f
Move interpreter OP_ constants to static const
2014-08-16 21:52:37 +00:00
Kp
a42a403198
Remove unused return value of g3_draw_morphing_model
2014-08-16 17:35:44 +00:00
Kp
0228b067c1
Remove unused return value of g3_draw_polygon_model
2014-08-16 17:35:44 +00:00
Kp
cf7bdf3261
Remove long-unused verify
2014-07-16 03:21:04 +00:00
Matt Vandermeulen
28f307eb85
Fixes #5 - Byteswap header renamed to byteutil, plus sed magic
...
[Kp: switch to #pragma for byteutil.h]
2014-07-03 02:03:08 +00:00
Kp
e6655f9481
Use std::vector for lrgb_list
2014-06-22 21:01:31 +00:00
zico
c96aece6d2
Removed PARALLAX banner from source files that were not released by PARALLAX; most importantly C source code translated from Assembler and args.cpp which was rewritten from scratch
2014-06-12 10:41:03 +02:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
8208ab9e53
Fix array underread when no glow is defined
...
ASan reports an access to array[-1].
2013-12-19 03:31:24 +00:00
Kp
aba6c2dfee
Pass glow_values as array<> to retain size information
2013-12-19 03:31:24 +00:00
Kp
77c0b58591
Fix editor crash introduced in 47c00c712
...
glow_values may be NULL, so check before dereferencing it.
2013-12-17 03:48:31 +00:00
Kp
279f123f56
Simplify FADE_FLATPOLY logic
2013-12-17 03:46:35 +00:00
zico
47c00c7128
Added code which draws activated headlights or their absence to g3_draw_polygon_model. This was never implemented in D2X - probably because most of interp.c was adopted from D1X.
2013-12-16 08:37:51 +01:00
Kp
3b9b5ebfb0
Use RAII to manage function-local heap objects
2013-12-08 19:04:52 +00:00
Kp
2714679284
Mark private functions static
2013-11-02 04:23:55 +00:00
Kp
4863c42c9d
Move similar/3d/interp.c -> similar/3d/interp.cpp
2013-10-01 02:53:09 +00:00
Kp
74bcb86cf4
Remove some const modifiers that broke SDL-only build
2013-07-27 21:29:01 +00:00
Kp
4577dd3977
Merge branch 'd2x-rebirth/master' into unification/master
2013-07-21 21:34:46 +00:00
Kp
a1ba420031
Mark various parameters and variables as const
2013-07-20 23:12:24 +00:00
Kp
8d379f4f9c
Move */3d/interp.c -> similar/3d/interp.c
2013-03-03 01:03:33 +00:00