diff --git a/lib/ivis_common/piedef.h b/lib/ivis_common/piedef.h index 52cb8e940..032baa3b6 100644 --- a/lib/ivis_common/piedef.h +++ b/lib/ivis_common/piedef.h @@ -84,7 +84,7 @@ typedef struct { UBYTE r, g, b, a; } PIELIGHTBYTES; /** Our basic colour type. Use whenever you want to define a colour. * Set bytes separetely, and do not assume a byte order between the components. */ -typedef union { PIELIGHTBYTES byte; UDWORD argb; UBYTE vector[4]; } PIELIGHT; +typedef union { PIELIGHTBYTES byte; UDWORD rgba; UBYTE vector[4]; } PIELIGHT; typedef struct { diff --git a/lib/ivis_common/piestate.c b/lib/ivis_common/piestate.c index 5afd15a66..a7b185135 100644 --- a/lib/ivis_common/piestate.c +++ b/lib/ivis_common/piestate.c @@ -30,7 +30,7 @@ void pie_SetDefaultStates(void)//Sets all states rendStates.fogEnabled = false;// enable fog before renderer rendStates.fog = false;//to force reset to false pie_SetFogStatus(false); - black.argb = 0; + black.rgba = 0; black.byte.a = 255; pie_SetFogColour(black);//nicks colour @@ -74,7 +74,7 @@ void pie_EnableFog(BOOL val) { PIELIGHT black; - black.argb = 0; + black.rgba = 0; black.byte.a = 255; pie_SetFogColour(black); // clear background to black } diff --git a/src/display3d.c b/src/display3d.c index 7ab10b318..fca94ead6 100644 --- a/src/display3d.c +++ b/src/display3d.c @@ -4608,9 +4608,9 @@ static void addConstructionLine(DROID *psDroid, STRUCTURE *psStructure) colour.byte.r = 0; colour.byte.g = 0; } - pts[0].light.argb = 0xff000000; - pts[1].light.argb = 0xff000000; - pts[2].light.argb = 0xff000000; + pts[0].light.rgba = 0xff000000; + pts[1].light.rgba = 0xff000000; + pts[2].light.rgba = 0xff000000; pts[0].u = 0; pts[0].v = 0; diff --git a/src/game.c b/src/game.c index 113eedc77..a2f02a415 100644 --- a/src/game.c +++ b/src/game.c @@ -2467,7 +2467,7 @@ BOOL loadGame(const char *pGameToLoad, BOOL keepObjects, BOOL freeMem, BOOL User fogStatus = saveGameData.fogState; fogStatus &= FOG_FLAGS; } - colour.argb = saveGameData.fogColour; + colour.rgba = saveGameData.fogColour; pie_SetFogColour(colour); } if (saveGameVersion >= VERSION_19)//V21 @@ -4599,7 +4599,7 @@ bool gameLoadV(PHYSFS_file* fileHandle, unsigned int version) fogStatus = saveGameData.fogState; fogStatus &= FOG_FLAGS; } - colour.argb = saveGameData.fogColour; + colour.rgba = saveGameData.fogColour; pie_SetFogColour(colour); } @@ -4923,7 +4923,7 @@ static bool writeGameFile(const char* fileName, SDWORD saveType) saveGame.offWorldKeepLists = offWorldKeepLists; saveGame.RubbleTile = getRubbleTileNum(); saveGame.WaterTile = getWaterTileNum(); - saveGame.fogColour = pie_GetFogColour().argb; + saveGame.fogColour = pie_GetFogColour().rgba; saveGame.fogState = fogStatus; if(pie_GetFogEnabled()) { diff --git a/src/loop.c b/src/loop.c index ffa5acee1..1f4bb6a85 100644 --- a/src/loop.c +++ b/src/loop.c @@ -155,7 +155,7 @@ GAMECODE gameLoop(void) // set the fog color to black (RGB) // the fogbox will get this color - black.argb = 0; + black.rgba = 0; black.byte.a = 255; pie_SetFogColour(black); } diff --git a/src/radar.c b/src/radar.c index 9d5a1510b..c80048f1a 100644 --- a/src/radar.c +++ b/src/radar.c @@ -352,7 +352,7 @@ static void ClearRadar(UDWORD *screen) { for (j = 0; j < RadarHeight; j++) { - *pScr++ = WZCOL_RADAR_BACKGROUND.argb; + *pScr++ = WZCOL_RADAR_BACKGROUND.rgba; } } } @@ -441,9 +441,9 @@ static void DrawRadarTiles(UDWORD *screen,UDWORD Modulus,UWORD boxSizeH,UWORD bo { if (!getRevealStatus() || TEST_TILE_VISIBLE(selectedPlayer, WTile) || godMode) { - *WScr = appliedRadarColour(radarDrawMode, WTile).argb; + *WScr = appliedRadarColour(radarDrawMode, WTile).rgba; } else { - *WScr = WZCOL_RADAR_BACKGROUND.argb; + *WScr = WZCOL_RADAR_BACKGROUND.rgba; } /* Next pixel, next tile */ WScr++; @@ -471,7 +471,7 @@ static void DrawRadarTiles(UDWORD *screen,UDWORD Modulus,UWORD boxSizeH,UWORD bo col.byte.r = sqrtf(col.byte.r * WTile->illumination); col.byte.b = sqrtf(col.byte.b * WTile->illumination); col.byte.g = sqrtf(col.byte.g * WTile->illumination); - Val = col.argb; + Val = col.rgba; for(c=0; c