Decouple <cstdint>
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageSurface.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
|
||||
#define CheckLine() \
|
||||
@@ -57,9 +59,9 @@ RageSurface *RageSurface_Load_XPM( char * const *xpm, RString &error )
|
||||
if( sscanf( clr, "%2x%2x%2x", &r, &g, &b ) != 3 )
|
||||
continue;
|
||||
RageSurfaceColor colorval;
|
||||
colorval.r = (uint8_t) r;
|
||||
colorval.g = (uint8_t) g;
|
||||
colorval.b = (uint8_t) b;
|
||||
colorval.r = (std::uint8_t) r;
|
||||
colorval.g = (std::uint8_t) g;
|
||||
colorval.b = (std::uint8_t) b;
|
||||
colorval.a = 0xFF;
|
||||
|
||||
colors.push_back( colorval );
|
||||
@@ -88,9 +90,9 @@ RageSurface *RageSurface_Load_XPM( char * const *xpm, RString &error )
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int8_t *p = (int8_t *) img->pixels;
|
||||
std::int8_t *p = (std::int8_t *) img->pixels;
|
||||
p += y * img->pitch;
|
||||
int32_t *p32 = (int32_t *) p;
|
||||
std::int32_t *p32 = (std::int32_t *) p;
|
||||
for( int x = 0; x < width; ++x )
|
||||
{
|
||||
RString color_name = row.substr( x*color_length, color_length );
|
||||
@@ -105,7 +107,7 @@ RageSurface *RageSurface_Load_XPM( char * const *xpm, RString &error )
|
||||
|
||||
if( colors.size() <= 256 )
|
||||
{
|
||||
p[x] = (int8_t) it->second;
|
||||
p[x] = (std::int8_t) it->second;
|
||||
} else {
|
||||
const RageSurfaceColor &color = colors[it->second];
|
||||
p32[x] = (color.r << 24) + (color.g << 16) + (color.b << 8);
|
||||
|
||||
Reference in New Issue
Block a user