Commit graph

77 commits

Author SHA1 Message Date
Kp 5a4989c86d Make cross_lva const array<> 2015-04-02 02:36:55 +00:00
Kp 1677d4159c Make primary_lva const array<> 2015-04-02 02:36:55 +00:00
Kp b712ae4603 Avoid unnecessary primary_lca initialization 2015-04-02 02:36:55 +00:00
Kp 27f50082f0 Avoid unnecessary cross_lca initialization 2015-04-02 02:36:55 +00:00
Kp 32d99ada2e Make ret_rgba const array<> 2015-04-02 02:36:55 +00:00
Kp 2a1df52f71 Remove unused g3_draw_bitmap return value 2015-04-02 02:36:54 +00:00
Kp 72d349b0e0 Remove unused g3_draw_sphere return value 2015-04-02 02:36:54 +00:00
Kp 1125a751db Remove unused g3_draw_poly return value 2015-04-02 02:36:54 +00:00
Kp c3161d08d5 Remove unused g3_draw_line return value 2015-04-02 02:36:54 +00:00
Kp fca381727c Add wrappers for screen width/height 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 f900d4a5ee Remove RAIIdmem::operator pointer
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int).  Adding a disambiguating overload for OS X
breaks Windows.  Remove operator pointer and operator[].  Rely on the
inherited operator[] for indexing.  Require users to call ->get() to
convert to a simple pointer.

First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp 99a4a0ed62 Capture range_for by-value temporaries as const
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug.  Require use of a by-reference
capture when modification is desired.

sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp ff4a0ccd70 Fix RAIIdmem array usage
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp 4a2c9325bb Fix various uninitialized accesses 2015-01-28 03:42:52 +00:00
Kp 492d6fd996 Remove draw_tmap from OGL build
It is only used as a placeholder.  Replace it with a number.

Compile out various non-OGL functions when building for OGL.
2015-01-22 03:34:20 +00:00
Kp bf3bb0b144 Pass uint_fast32_t nverts for texture drawers 2015-01-20 02:46:42 +00:00
Kp 15f9d5d3f5 Pass ogl_ubitblt arg by & 2014-12-02 03:35:01 +00:00
Kp e7aae37c8d Pass ogl_ubitblt_i arg by & 2014-12-02 03:35:01 +00:00
Kp 130d7a6e52 Pass ogl_loadtexture arg by & 2014-12-02 03:35:01 +00:00
Kp 5e03871f81 Pass tex_set_size arg by & 2014-12-02 03:35:01 +00:00
Kp 818b2c61ed Pass tex_set_size1 arg as & 2014-12-02 03:35:01 +00:00
Kp 5eddc2c197 Make bitmap bm_data const where easy 2014-12-02 03:24:38 +00:00
Kp 281aed868a Use range_for on ogl_texture_list 2014-11-30 22:09:20 +00:00
Kp 0236c237ed Pass ogl_freebmtexture arg by & 2014-11-30 22:09:20 +00:00
Kp 7775b5d7d4 Pass ogl_freetexture arg by & 2014-11-30 22:09:20 +00:00
Kp 486e753a84 Pass ogl_reset_texture arg by & 2014-11-30 22:09:19 +00:00
Kp a86313e746 Pass ogl_init_texture arg by & 2014-11-30 22:09:19 +00:00
Kp 93565a2d1e Pass ogl_init_texture_stats arg by & 2014-11-30 22:09:19 +00:00
Kp 9aa539c062 Return texmerge_get_cached_bitmap result by & 2014-11-30 22:09:19 +00:00
Kp 166f15617d Pass ogl_ubitmapm_cs arg by & 2014-11-30 22:09:18 +00:00
Kp 634f97e8d2 Pass tmap drawer grs_bitmap by & 2014-11-30 22:09:18 +00:00
Kp f89b57047a Pass g3_draw_bitmap grs_bitmap by & 2014-11-30 22:09:17 +00:00
Kp f206b3b127 Reduce inclusion of object.h 2014-11-23 04:36:58 +00:00
Kp 11769c5fc0 Pass draw_tmap* arg as const 2014-11-16 19:14:50 +00:00
Kp c2d308807c Make various g3s_point * const 2014-11-15 03:10:06 +00:00
Kp 3a73f2c9d0 Pass g3_draw_line as const 2014-11-15 03:10:04 +00:00
Kp 8e0d85b666 Pass g3_draw_tmap arg by & 2014-11-13 03:44:04 +00:00
Kp 0a97f175df Pass ogl_loadbmtexture arg by & 2014-11-13 03:43:12 +00:00
Kp 841e037e15 Pass ogl_loadbmtexture_f arg by & 2014-11-13 03:42:41 +00:00
Kp 9baeb31162 Pass rle_end arg by & 2014-11-13 03:41:38 +00:00
Kp 207dceba33 Pass g3_draw_sphere arg by & 2014-11-13 03:22:49 +00:00
Kp aba13a0bd0 Pass g3_draw_line arg by & 2014-11-13 03:19:52 +00:00
Kp df6b4bd783 Add vm_vec_rotate that returns result 2014-11-04 01:31:22 +00:00
Kp 5bb9c88979 Add vm_vec_sub that returns result 2014-10-29 03:24:31 +00:00
Kp fb641b3250 Wrap object iteration idiom 2014-10-12 23:05:46 +00:00
Kp 2434b20445 Pass g3_draw_bitmap pos by const & 2014-10-02 03:02:35 +00:00
Kp 5af79382a5 Pass vm_vec_rotate arg by & 2014-10-01 02:28:42 +00:00
Kp 321bbe37d8 Pass vm_vec_sub arguments by & 2014-09-28 21:11:45 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00