Core: Replace GBA_COLOR_WHITE with M_COLOR_WHITE

This commit is contained in:
Vicki Pfau 2020-11-21 17:43:35 -08:00
parent bf54c2d36f
commit c80cc1e307
4 changed files with 7 additions and 13 deletions

View File

@ -41,16 +41,19 @@ typedef uint32_t color_t;
#define M_COLOR_GREEN 0x0000FF00 #define M_COLOR_GREEN 0x0000FF00
#define M_COLOR_BLUE 0x00FF0000 #define M_COLOR_BLUE 0x00FF0000
#define M_COLOR_ALPHA 0xFF000000 #define M_COLOR_ALPHA 0xFF000000
#define M_COLOR_WHITE 0x00FFFFFF
#elif defined(COLOR_5_6_5) #elif defined(COLOR_5_6_5)
#define M_COLOR_RED 0x001F #define M_COLOR_RED 0x001F
#define M_COLOR_GREEN 0x07E0 #define M_COLOR_GREEN 0x07E0
#define M_COLOR_BLUE 0xF800 #define M_COLOR_BLUE 0xF800
#define M_COLOR_ALPHA 0x0000 #define M_COLOR_ALPHA 0x0000
#define M_COLOR_WHITE 0xFFDF
#else #else
#define M_COLOR_RED 0x001F #define M_COLOR_RED 0x001F
#define M_COLOR_GREEN 0x03E0 #define M_COLOR_GREEN 0x03E0
#define M_COLOR_BLUE 0x7C00 #define M_COLOR_BLUE 0x7C00
#define M_COLOR_ALPHA 0x1000 #define M_COLOR_ALPHA 0x1000
#define M_COLOR_WHITE 0x7FFF
#endif #endif
#ifndef PYCPARSE #ifndef PYCPARSE

View File

@ -46,15 +46,6 @@ struct GBAVideoSoftwareBackground {
}; };
enum { enum {
#ifdef COLOR_16_BIT
#ifdef COLOR_5_6_5
GBA_COLOR_WHITE = 0xFFDF,
#else
GBA_COLOR_WHITE = 0x7FFF,
#endif
#else
GBA_COLOR_WHITE = 0x00FFFFFF,
#endif
OFFSET_PRIORITY = 30, OFFSET_PRIORITY = 30,
OFFSET_INDEX = 28, OFFSET_INDEX = 28,
}; };

View File

@ -55,7 +55,7 @@ void GBAVideoProxyRendererCreate(struct GBAVideoProxyRenderer* renderer, struct
for (i = 0; i < 128; ++i) { for (i = 0; i < 128; ++i) {
renderer->d.highlightOBJ[i] = false; renderer->d.highlightOBJ[i] = false;
} }
renderer->d.highlightColor = 0xFFFFFF; renderer->d.highlightColor = M_COLOR_WHITE;
renderer->d.highlightAmount = 0; renderer->d.highlightAmount = 0;
renderer->logger->context = renderer; renderer->logger->context = renderer;

View File

@ -73,7 +73,7 @@ void GBAVideoSoftwareRendererCreate(struct GBAVideoSoftwareRenderer* renderer) {
for (i = 0; i < 128; ++i) { for (i = 0; i < 128; ++i) {
renderer->d.highlightOBJ[i] = false; renderer->d.highlightOBJ[i] = false;
} }
renderer->d.highlightColor = GBA_COLOR_WHITE; renderer->d.highlightColor = M_COLOR_WHITE;
renderer->d.highlightAmount = 0; renderer->d.highlightAmount = 0;
renderer->temporaryBuffer = 0; renderer->temporaryBuffer = 0;
@ -89,7 +89,7 @@ static void GBAVideoSoftwareRendererInit(struct GBAVideoRenderer* renderer) {
color_t* row = &softwareRenderer->outputBuffer[softwareRenderer->outputBufferStride * y]; color_t* row = &softwareRenderer->outputBuffer[softwareRenderer->outputBufferStride * y];
int x; int x;
for (x = 0; x < GBA_VIDEO_HORIZONTAL_PIXELS; ++x) { for (x = 0; x < GBA_VIDEO_HORIZONTAL_PIXELS; ++x) {
row[x] = GBA_COLOR_WHITE; row[x] = M_COLOR_WHITE;
} }
} }
} }
@ -558,7 +558,7 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
if (GBARegisterDISPCNTIsForcedBlank(softwareRenderer->dispcnt)) { if (GBARegisterDISPCNTIsForcedBlank(softwareRenderer->dispcnt)) {
int x; int x;
for (x = 0; x < GBA_VIDEO_HORIZONTAL_PIXELS; ++x) { for (x = 0; x < GBA_VIDEO_HORIZONTAL_PIXELS; ++x) {
row[x] = GBA_COLOR_WHITE; row[x] = M_COLOR_WHITE;
} }
return; return;
} }