Move some SDL-only symbols into !DXX_USE_OGL

This commit is contained in:
Kp 2019-08-06 02:59:41 +00:00
parent f0faac66d4
commit 334da8e8e6
4 changed files with 11 additions and 3 deletions

View file

@ -79,6 +79,7 @@ uint8_t *gr_rle_decode(const uint8_t *sb, uint8_t *db, const rle_position_t e)
return db;
}
#if !DXX_USE_OGL
// Given pointer to start of one scanline of rle data, uncompress it to
// dest, from source pixels x1 to x2.
void gr_rle_expand_scanline_masked(uint8_t *dest, const uint8_t *src, int x1, int x2)
@ -140,6 +141,7 @@ void gr_rle_expand_scanline_masked(uint8_t *dest, const uint8_t *src, int x1, in
}
}
}
#endif
void gr_rle_expand_scanline(uint8_t *dest, const uint8_t *src, int x1, int x2)
{
@ -441,6 +443,7 @@ grs_bitmap *_rle_expand_texture(const grs_bitmap &bmp)
return least_recently_used->expanded_bitmap.get();
}
#if !DXX_USE_OGL
void gr_rle_expand_scanline_generic(grs_canvas &canvas, grs_bitmap &dest, int dx, const int dy, const uint8_t *src, const int x1, const int x2)
{
int i = 0;
@ -497,6 +500,7 @@ void gr_rle_expand_scanline_generic(grs_canvas &canvas, grs_bitmap &dest, int dx
i += count;
}
}
#endif
/*
* swaps entries 0 and 255 in an RLE bitmap without uncompressing it

View file

@ -15,6 +15,7 @@
namespace dcx {
#if !DXX_USE_OGL
temporary_points_t::temporary_points_t() :
free_point_num(0)
{
@ -104,7 +105,6 @@ static g3s_point &clip_edge(int plane_flag,g3s_point *on_pnt,g3s_point *off_pnt,
return tmp;
}
#if !DXX_USE_OGL
//clips a line to the viewing pyramid.
void clip_line(g3s_point *&p0,g3s_point *&p1,const uint_fast8_t codes_or, temporary_points_t &tp)
{
@ -122,7 +122,6 @@ void clip_line(g3s_point *&p0,g3s_point *&p1,const uint_fast8_t codes_or, tempor
tp.free_temp_point(old_p1);
}
}
#endif
static int clip_plane(int plane_flag,polygon_clip_points &src,polygon_clip_points &dest,int *nv,g3s_codes *cc, temporary_points_t &tp)
{
@ -186,5 +185,6 @@ const polygon_clip_points &clip_polygon(polygon_clip_points &rsrc,polygon_clip_p
return *src; //we swapped after we copied
}
#endif
}

View file

@ -256,7 +256,9 @@ static inline void g3_check_and_draw_tmap(grs_canvas &canvas, const array<cg3s_p
}
//draws a line. takes two points.
#if !DXX_USE_OGL
struct temporary_points_t;
#endif
//draw a bitmap object that is always facing you
//returns 1 if off screen, 0 if drew

View file

@ -58,7 +58,9 @@ static inline rle_position_t rle_end(const T1 &src, T2 &dst)
namespace dcx {
uint8_t *gr_rle_decode(const uint8_t *sb, uint8_t *db, rle_position_t e);
int gr_bitmap_rle_compress(grs_bitmap &bmp);
#if !DXX_USE_OGL
void gr_rle_expand_scanline_masked(uint8_t *dest, const uint8_t *src, int x1, int x2);
#endif
void gr_rle_expand_scanline(uint8_t *dest, const uint8_t *src, int x1, int x2);
grs_bitmap *_rle_expand_texture(const grs_bitmap &bmp);
static inline const grs_bitmap *rle_expand_texture(const grs_bitmap &bmp) __attribute_warn_unused_result;
@ -74,8 +76,8 @@ void rle_swap_0_255(grs_bitmap &bmp);
void rle_remap(grs_bitmap &bmp, array<color_t, 256> &colormap);
#if !DXX_USE_OGL
#define gr_rle_expand_scanline_generic(C,D,DX,DY,S,X1,X2) gr_rle_expand_scanline_generic(D,DX,DY,S,X1,X2)
#endif
void gr_rle_expand_scanline_generic(grs_canvas &, grs_bitmap &dest, int dx, int dy, const ubyte *src, int x1, int x2 );
#endif
class bm_rle_expand_range
{