Kp
f3d4dff941
Use enum class for clipping_code
...
Adjust code_window_point to use the same masks as clipping_code.
Previously, it had top and bottom swapped. However, since its output
was only ever compared for equality to 0, this transposition should not
affect the observable behavior.
2022-10-02 19:51:35 +00:00
Kp
6c32eb3970
Remove unused return value of g3_add_delta_vec
2022-10-02 19:51:35 +00:00
Kp
1808b6badd
Use enum class for projection_flag
2022-10-02 19:51:35 +00:00
Kp
ad8f970bf6
Pass g3s_point & to free_temp_point
...
Only one point is freed at a time, so pass by reference.
2022-10-02 19:51:35 +00:00
Kp
23315ebec2
Fix SDL-only g3_draw_sphere overflow test
...
PF_OVERFLOW is part of p3_flags, not p3_codes. Testing p3_codes meant
that the disk would be drawn when CC_OFF_RIGHT was unset. This seems
unlikely to be what was intended, so fix the mismatch by switching to
use p3_flags instead of switching the symbolic constant.
2022-09-24 17:47:52 +00:00
Kp
fd1be66fa4
Pass std::span to draw_tmap, draw_tmap_flat
2022-09-24 17:47:52 +00:00
Kp
a48e6ab56b
Pass std::span to _g3_draw_tmap
2022-09-24 17:47:52 +00:00
Kp
491d23e2d9
Pass std::span to _g3_draw_poly
2022-09-24 17:47:52 +00:00
Kp
a70188e7a5
Move various static functions into anonymous namespace
2022-07-09 13:39:29 +00:00
Kp
4fd412b2ea
Precompute g3_draw_line GL color data
2022-06-05 17:44:52 +00:00
Kp
e54338ce4e
Combine canvas+color into g3_draw_line_context
2022-06-05 17:44:52 +00:00
Kp
67705bdd7a
Return checkmuldiv result in std::optional
2022-05-24 02:32:58 +00:00
Kp
1f5d72e747
Use native 64-bit math in checkmuldiv
2022-05-24 02:32:58 +00:00
Kp
fdf5836031
Move g3 instance contexts onto the stack
2021-09-04 12:17:14 +00:00
Kp
079ab168a4
Move View_zoom out of global scope
...
It is only used briefly, so it can be local.
2021-08-26 03:13:45 +00:00
Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
fc63029833
Move more symbols into namespaces
2020-12-26 21:17:29 +00:00
Andreas Müller
c8ad243ec3
clipper.cpp: Fix build with gcc10
...
| common/3d/clipper.cpp:29:14: error: 'out_of_range' is not a member of 'std'
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2020-06-09 22:23:48 +02:00
Kp
3d3db16c6f
Move Canvas_width,Canvas_height to local scope
2020-05-22 02:40:26 +00:00
Kp
fa0d57961d
Use runtime check for instance_stack overrun
...
Replace assert with std::array<>::at(), so that an exception will be
thrown if the array bound is exceeded.
2020-05-02 21:18:43 +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
334da8e8e6
Move some SDL-only symbols into !DXX_USE_OGL
2019-08-06 02:59:41 +00:00
Kp
5d12f62d77
Omit p3_{u,v,l} from OpenGL builds
...
These are write-only for OpenGL. All reads are in SDL-only code.
Remove them to save 3 ints of space in every g3s_point.
2019-01-01 04:54:35 +00:00
Kp
12b57e84e6
Switch most in-tree http:// links to https://
...
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it. These domains were converted:
* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00
Kp
5073f89dfc
Simplify calc_rod_corners loops
2017-08-26 19:47:51 +00:00
Kp
88430e8946
Require vms_angvec &for g3_start_instance_angles
...
Only one caller exists, and that caller alway passes a non-nullptr
value. Switch to a reference and remove the unused special case to
handle a nullptr input.
2017-08-26 19:47:51 +00:00
Kp
1831148092
Split g3_start_instance_matrix usage
...
Most uses pass an orientation matrix. All sites are deterministic about
whether a matrix is passed. Make the matrix mandatory for sites that
passed it, and split out a separate version of g3_start_instance_matrix
for the 2 sites which do not provide orientation.
2017-08-26 19:47:51 +00:00
Kp
b65b6339f4
Make g3_draw_sphere pnt argument const (for OGL only)
...
SDL still needs to modify it, so use alias type `cg3s_point`, which is
`const g3s_point` in OGL and `g3s_point` in SDL.
2017-08-16 01:54:26 +00:00
Kp
ba914fea81
Pass up various return values
2017-02-26 00:00:02 +00:00
Kp
48bf96fe6a
Pass canvas to g3_draw_bitmap
2017-02-11 21:42:42 +00:00
Kp
66ee668e48
Pass canvas to _g3_draw_poly
2017-02-11 21:42:41 +00:00
Kp
214d930e14
Pass canvas to must_clip_flat_face
2017-02-11 21:42:41 +00:00
Kp
416954bbdf
Pass canvas to gr_upoly_tmap
2017-02-11 21:42:40 +00:00
Kp
394d9e1b80
Pass canvas to g3_draw_rod_tmap
2017-02-11 21:42:40 +00:00
Kp
6a2f3c1321
Pass canvas to g3_draw_tmap
2017-02-11 21:42:39 +00:00
Kp
4791a40007
Pass canvas to _g3_draw_tmap
2017-02-11 21:42:39 +00:00
Kp
a0538843b7
Pass canvas to must_clip_tmap_face
2017-02-11 21:42:39 +00:00
Kp
19151c12d9
Pass canvas to draw_tmap{,_flat}
2017-02-11 21:42:39 +00:00
Kp
beaa49a7ba
Pass destination bitmap to scale_bitmap
2017-02-11 21:42:34 +00:00
Kp
590a025a89
Pass canvas to g3_start_frame
2017-02-11 21:42:34 +00:00
Kp
740b3a9649
Pass canvas to ogl_start_frame
2017-02-11 21:42:33 +00:00
Kp
80e7ade6a1
Pass canvas to g3_draw_sphere
2017-02-11 21:42:33 +00:00
Kp
513e7ceceb
Pass canvas to g3_draw_line
2017-02-11 21:42:33 +00:00
Kp
b7d266897c
Pass canvas to must_clip_line
2017-02-11 21:42:33 +00:00
Kp
47a319bba5
Pass canvas to g3_draw_line
2017-02-11 21:42:33 +00:00
Kp
362d526546
Pass canvas to gr_disk
2016-12-29 03:27:13 +00:00
Kp
1fa5aef9ac
Pass canvas to gr_line
2016-12-29 03:27:10 +00:00
Kp
19528a85d0
Fix various check_header_includes=1 failures
2016-12-05 00:26:11 +00:00