all repos — mgba @ c80cc1e307397b0eacc97c40009be58aaa56a4ec

mGBA Game Boy Advance Emulator

Core: Replace GBA_COLOR_WHITE with M_COLOR_WHITE
Vicki Pfau vi@endrift.com
Sat, 21 Nov 2020 17:43:35 -0800
commit

c80cc1e307397b0eacc97c40009be58aaa56a4ec

parent

bf54c2d36fa64d4819cda0ff903eae5dc79c3548

M include/mgba/core/interface.hinclude/mgba/core/interface.h

@@ -41,16 +41,19 @@ #define M_COLOR_RED 0x000000FF

#define M_COLOR_GREEN 0x0000FF00 #define M_COLOR_BLUE 0x00FF0000 #define M_COLOR_ALPHA 0xFF000000 +#define M_COLOR_WHITE 0x00FFFFFF #elif defined(COLOR_5_6_5) #define M_COLOR_RED 0x001F #define M_COLOR_GREEN 0x07E0 #define M_COLOR_BLUE 0xF800 #define M_COLOR_ALPHA 0x0000 +#define M_COLOR_WHITE 0xFFDF #else #define M_COLOR_RED 0x001F #define M_COLOR_GREEN 0x03E0 #define M_COLOR_BLUE 0x7C00 #define M_COLOR_ALPHA 0x1000 +#define M_COLOR_WHITE 0x7FFF #endif #ifndef PYCPARSE
M include/mgba/internal/gba/renderers/video-software.hinclude/mgba/internal/gba/renderers/video-software.h

@@ -46,15 +46,6 @@ bool highlight;

}; 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_INDEX = 28, };
M src/gba/extra/proxy.csrc/gba/extra/proxy.c

@@ -55,7 +55,7 @@ int i;

for (i = 0; i < 128; ++i) { renderer->d.highlightOBJ[i] = false; } - renderer->d.highlightColor = 0xFFFFFF; + renderer->d.highlightColor = M_COLOR_WHITE; renderer->d.highlightAmount = 0; renderer->logger->context = renderer;
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -73,7 +73,7 @@ int i;

for (i = 0; i < 128; ++i) { renderer->d.highlightOBJ[i] = false; } - renderer->d.highlightColor = GBA_COLOR_WHITE; + renderer->d.highlightColor = M_COLOR_WHITE; renderer->d.highlightAmount = 0; renderer->temporaryBuffer = 0;

@@ -89,7 +89,7 @@ for (y = 0; y < GBA_VIDEO_VERTICAL_PIXELS; ++y) {

color_t* row = &softwareRenderer->outputBuffer[softwareRenderer->outputBufferStride * y]; int x; for (x = 0; x < GBA_VIDEO_HORIZONTAL_PIXELS; ++x) { - row[x] = GBA_COLOR_WHITE; + row[x] = M_COLOR_WHITE; } } }

@@ -558,7 +558,7 @@ color_t* row = &softwareRenderer->outputBuffer[softwareRenderer->outputBufferStride * y];

if (GBARegisterDISPCNTIsForcedBlank(softwareRenderer->dispcnt)) { int x; for (x = 0; x < GBA_VIDEO_HORIZONTAL_PIXELS; ++x) { - row[x] = GBA_COLOR_WHITE; + row[x] = M_COLOR_WHITE; } return; }