Commit graph

5915 commits

Author SHA1 Message Date
Kp 0375876a08 Pass gr_bm_ubitbltm arg by & 2014-12-02 03:35:01 +00:00
Kp 25948a4b96 Pass gr_bm_ubitblt00m arg by & 2014-12-02 03:35:01 +00:00
Kp 95539512d5 Pass pcx_read_bitmap arg by & 2014-12-02 03:35:01 +00:00
Kp 31d6b151da Pass gr_bm_ubitblt arg by & 2014-12-02 03:35:01 +00:00
Kp 50e24ee0ef Pass gr_bm_ubitblt00 arg by & 2014-12-02 03:35:01 +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 7031c809fc Pass gr_ubitmapm arg by & 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 e90549d9a8 Use range_for on Orb_icons 2014-12-02 03:23:21 +00:00
Kp ec8738ca62 Merge branch 'btb/osx-fixes' into unification/master
Merge Mac OS X specific fixes from btb.  The Windows and Linux builds
are unaffected.  The OS X changes look sane, but cannot be tested here.

Changes not specific to OS X were previously committed separately.

Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/12
2014-12-01 23:47:10 +00:00
Kp 690dec3342 Workaround compilers mishandling template-template arguments
Visual Studio 2013 Update 4 and Clang 3.4 fail to parse
valptridx_template_t related argument lists because they misinterpret
the unspecialized inner template name as a reference to the current
specialization.  This seems to be nonconforming in C++11.

All gcc versions supported by Rebirth parse this sample program
correctly, but neither Visual Studio nor clang accept it.

    template <template <typename> class>
    struct A
    {
    };

    template <typename>
    struct B
    {
	    B(A<B>);
    };

In <https://stackoverflow.com/questions/17687459/clang-not-accepting-use-of-template-template-parameter-when-using-crtp>, a user saw a similar failure and received the answer:
    Your code is legal.

    From the C++11 Standard, section 14.6.1:

	Like normal (non-template) classes, class templates have an injected-class-name (Clause 9). The injected-class-name can be used as a template-name or a type-name. When it is used with a template-argument-list, as a template-argument for a template template-parameter, or as the final identifier in the elaborated-type- specifier of a friend class template declaration, it refers to the class template itself.

    Looks like your version of clang is still implementing the old rule.

This failure was first seen with Visual Studio 2013, but ignored because
Visual Studio has so many other problems parsing Rebirth.  Now that it
has been reported to affect clang as well, a workaround is clearly
needed.  A fix was suggested by btb
<2f9543f981>,
but that fix breaks gcc.

Rewrite the valptridx_template_t parameter passing to avoid mentioning
unspecialized template names as template parameters while defining the
class used as the parameter.

Reported by btb (clang): https://github.com/dxx-rebirth/dxx-rebirth/pull/12
2014-11-30 23:44:52 +00:00
Kp cf31cc4a5d Switch Laser_render to vobjptr_t 2014-11-30 22:09:23 +00:00
Kp d79287e368 Use partial_range for delete_curve 2014-11-30 22:09:23 +00:00
Kp 5dd4ebaa81 Optimize swap_0_255 2014-11-30 22:09:22 +00:00
Kp 0e63b3c300 Pass pcx_encode_line input as const 2014-11-30 22:09:22 +00:00
Kp ea535b0e38 Pass gr_rle_expand_scanline arg as const 2014-11-30 22:09:22 +00:00
Kp 706782b275 Pass gr_rle_getsize arg as const 2014-11-30 22:09:22 +00:00
Kp 87b8721f0a Replace gr_linear_stosd with macro 2014-11-30 22:09:22 +00:00
Kp fd0b7acf53 Pass gr_bm_ubitblt0x_rle arg by & 2014-11-30 22:09:22 +00:00
Kp 9b2ef9cfa4 Pass gr_rle_expand_scanline_generic arg by & 2014-11-30 22:09:22 +00:00
Kp 63cbff3b82 Pass gr_bm_ubitblt00m_rle arg by & 2014-11-30 22:09:22 +00:00
Kp 96acf9edec Pass gr_ubitmap00 arg by & 2014-11-30 22:09:22 +00:00
Kp 2697918223 Pass gr_bm_pixel arg by & 2014-11-30 22:09:22 +00:00
Kp 0b1aa34c43 Pass gr_set_super_transparent arg by &
Flip name of the boolean to match its function.
2014-11-30 22:09:21 +00:00
Kp 26f4aaa51b Pass gr_set_transparent arg by & 2014-11-30 22:09:21 +00:00
Kp e5acd8056d Pass gr_set_bitmap_flags arg by & 2014-11-30 22:09:21 +00:00
Kp cb939f32e0 Simplify decode_data 2014-11-30 22:09:21 +00:00
Kp efa7566821 Pass colormap as array<> 2014-11-30 22:09:21 +00:00
Kp d0abc13c94 Pass gr_create_sub_bitmap arg by & 2014-11-30 22:09:21 +00:00
Kp ef539be1ab Pass gr_init_bitmap_data arg by & 2014-11-30 22:09:21 +00:00
Kp f6dde1c593 Pass gr_init_bitmap_alloc arg by & 2014-11-30 22:09:21 +00:00
Kp 53ce29e789 Pass gr_init_bitmap arg by & 2014-11-30 22:09:20 +00:00
Kp 594c597621 Pass gr_init_bitmap_data arg by & 2014-11-30 22:09:20 +00:00
Kp 0672cdff1b Pass gr_set_bitmap_data grs_bitmap by & 2014-11-30 22:09:20 +00:00
Kp 97332b848c Pass gr_free_bitmap_data arg by & 2014-11-30 22:09:20 +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 bba9d90347 Use subscript notation in grs_bitmap bm_data 2014-11-30 22:09:19 +00:00
Kp 0790eda153 Use new/delete for grs_screen 2014-11-30 22:09:19 +00:00
Kp ad35ff421e Use new/delete for title_screen 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 b4acc5b858 Pass gr_ubitmap arg by & 2014-11-30 22:09:19 +00:00