diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index b095ebdc3..3febf774d 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -2822,7 +2822,6 @@ void xvt_image_destroy(XVT_IMAGE image) COLOR xvt_image_get_clut(XVT_IMAGE image, short index) { XVT_ASSERT(image != NULL); -#if wxCHECK_VERSION(2,3,0) if (image) { const wxImage& bmp = ((const TXVT_IMAGE*)image)->Image(); @@ -2834,7 +2833,6 @@ COLOR xvt_image_get_clut(XVT_IMAGE image, short index) return MAKE_COLOR(r, g, b); } } -#endif return COLOR_BLACK; } @@ -2856,17 +2854,12 @@ void xvt_image_get_dimensions(XVT_IMAGE image, short *width, short *height) XVT_IMAGE_FORMAT xvt_image_get_format(XVT_IMAGE image) { -#if wxCHECK_VERSION(2,3,0) const wxImage& img = ((const TXVT_IMAGE*)image)->Image(); return img.HasPalette() ? XVT_IMAGE_CL8 : XVT_IMAGE_RGB; -#else - return XVT_IMAGE_RGB; -#endif } short xvt_image_get_ncolors(XVT_IMAGE image) { -#if wxCHECK_VERSION(2,3,0) int n = 0; if (image) { @@ -2875,7 +2868,7 @@ short xvt_image_get_ncolors(XVT_IMAGE image) { const wxPalette& pal = bmp.GetPalette(); unsigned char r, g, b; - for (n = 16; n < 255; n++) + for (n = 16; n < 256; n++) { if (!pal.GetRGB(n, &r, &g, &b)) break; @@ -2883,15 +2876,6 @@ short xvt_image_get_ncolors(XVT_IMAGE image) } } return n; -#else - int n = 0; - if (image) - { - wxImage& bmp = ((TXVT_IMAGE*)image)->Image(); - n = bmp.CountColours(257); - } - return n > 256 ? 0 : n; -#endif } COLOR xvt_image_get_pixel(XVT_IMAGE image, short x, short y) @@ -2941,7 +2925,6 @@ XVT_IMAGE xvt_image_read_bmp(const char *filenamep) void xvt_image_set_clut(XVT_IMAGE image, short index, COLOR color) { wxImage& bmp = ((TXVT_IMAGE*)image)->Image(); -#if wxCHECK_VERSION(2,3,0) if (bmp.HasPalette()) { const wxPalette& pal = bmp.GetPalette(); @@ -2962,7 +2945,6 @@ void xvt_image_set_clut(XVT_IMAGE image, short index, COLOR color) bmp.SetRGB(x, y, c.Red(), c.Green(), c.Blue()); } } -#endif } void xvt_image_set_ncolors(XVT_IMAGE image, short ncolors)