Skip to content

Commit

Permalink
-CodeChange: rename memory in GameLoop_GameCredits()
Browse files Browse the repository at this point in the history
  • Loading branch information
miniupnp committed Jan 1, 2017
1 parent 56c1ebc commit 70ca38d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/cutscene.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ static void GameLoop_GameCredits(void)
static const uint8 colours[] = {0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0};

uint16 i;
uint8 *memory;
uint8 remap[256];

GUI_Mouse_Hide_Safe();

Expand All @@ -823,25 +823,25 @@ static void GameLoop_GameCredits(void)

Music_Play(33);

memory = GFX_Screen_Get_ByIndex(SCREEN_2);
/*memory = GFX_Screen_Get_ByIndex(SCREEN_2);*/

for (i = 0; i < 256; i++) {
uint8 loc06;
uint8 loc04;
uint8 high, low; /* high / low nibble */

memory[i] = i & 0xFF;
remap[i] = (uint8)i;

loc06 = i / 16;
loc04 = i % 16;
high = i >> 4;
low = i & 15;

if (loc06 == 9 && loc04 <= 6) {
memory[i] = (g_playerHouseID * 16) + loc04 + 144;
/* map colors 144-150 to the one of the player House */
if (high == 9 && low <= 6) {
remap[i] = ((g_playerHouseID + 9) << 4) + low;
}
}

Sprites_LoadImage("MAPPLAN.CPS", SCREEN_1, g_palette_998A);

GUI_Palette_RemapScreen(g_curWidgetXBase << 3, g_curWidgetYBase, g_curWidgetWidth << 3, g_curWidgetHeight, SCREEN_1, memory);
GUI_Palette_RemapScreen(g_curWidgetXBase << 3, g_curWidgetYBase, g_curWidgetWidth << 3, g_curWidgetHeight, SCREEN_1, remap);

GUI_Screen_FadeIn2(g_curWidgetXBase << 3, g_curWidgetYBase, g_curWidgetWidth << 3, g_curWidgetHeight, SCREEN_1, SCREEN_0, 1, false);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -4055,7 +4055,7 @@ void GUI_Mouse_SetPosition(uint16 x, uint16 y)
* @param screenID The screen to do the remapping on.
* @param remap The pointer to the remap palette.
*/
void GUI_Palette_RemapScreen(uint16 left, uint16 top, uint16 width, uint16 height, Screen screenID, uint8 *remap)
void GUI_Palette_RemapScreen(uint16 left, uint16 top, uint16 width, uint16 height, Screen screenID, const uint8 *remap)
{
uint8 *screen = GFX_Screen_Get_ByIndex(screenID);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ extern void GUI_ClearScreen(Screen screenID);
extern void GUI_DrawScreen(Screen screenID);
extern void GUI_DrawSprite(Screen screenID, const uint8 *sprite, int16 posX, int16 posY, uint16 windowID, uint16 flags, ...);
extern void GUI_DrawInterfaceAndRadar(Screen screenID);
extern void GUI_Palette_RemapScreen(uint16 left, uint16 top, uint16 width, uint16 height, Screen screenID, uint8 *remap);
extern void GUI_Palette_RemapScreen(uint16 left, uint16 top, uint16 width, uint16 height, Screen screenID, const uint8 *remap);
extern void GUI_Screen_Copy(int16 xSrc, int16 ySrc, int16 xDst, int16 yDst, int16 width, int16 height, Screen screenSrc, Screen screenDst);
extern void GUI_Screen_FadeIn(uint16 xSrc, uint16 ySrc, uint16 xDst, uint16 yDst, uint16 width, uint16 height, Screen screenSrc, Screen screenDst);
extern void GUI_Screen_FadeIn2(int16 x, int16 y, int16 width, int16 height, Screen screenSrc, Screen screenDst, uint16 delay, bool skipNull);
Expand Down

0 comments on commit 70ca38d

Please sign in to comment.