diff --git a/src/Ending.cpp b/src/Ending.cpp index 70af5dbf..4c99411a 100644 --- a/src/Ending.cpp +++ b/src/Ending.cpp @@ -40,8 +40,8 @@ void ActionStripper(void) // Draw casts void PutStripper(void) { - RECT rc; int s; + RECT rc; for (s = 0; s < MAX_STRIP; ++s) { @@ -69,8 +69,8 @@ void PutStripper(void) // Create a cast object void SetStripper(int x, int y, const char *text, int cast) { - RECT rc; int s; + RECT rc; for (s = 0; s < MAX_STRIP; ++s) if (!(Strip[s].flag & 0x80)) @@ -99,8 +99,8 @@ void SetStripper(int x, int y, const char *text, int cast) // Regenerate cast text void RestoreStripper(void) { - RECT rc; int s; + RECT rc; for (s = 0; s < MAX_STRIP; ++s) { @@ -161,6 +161,8 @@ void ReloadIllust(int a) ReloadBitmap_Resource(name, SURFACE_ID_CREDITS_IMAGE); } +const char *credit_script = "Credit.tsc"; + // Initialize and release credits void InitCreditScript(void) { @@ -179,11 +181,12 @@ void ReleaseCreditScript(void) } } -const char *credit_script = "Credit.tsc"; - // Start playing credits BOOL StartCreditScript(void) { + FILE *fp; + char path[MAX_PATH]; + // Clear previously existing credits data if (Credit.pData != NULL) { @@ -192,7 +195,6 @@ BOOL StartCreditScript(void) } // Open file - char path[MAX_PATH]; sprintf(path, "%s\\%s", gDataPath, credit_script); Credit.size = GetFileSizeLong(path); @@ -204,7 +206,7 @@ BOOL StartCreditScript(void) if (Credit.pData == NULL) return FALSE; - FILE *fp = fopen(path, "rb"); + fp = fopen(path, "rb"); if (fp == NULL) { free(Credit.pData); @@ -441,6 +443,7 @@ void CutCreditIllust(void) // Scene of the island falling int Scene_DownIsland(HWND hWnd, int mode) { + ISLAND_SPRITE sprite; int wait; // Setup background @@ -451,7 +454,6 @@ int Scene_DownIsland(HWND hWnd, int mode) // Setup island RECT rc_sprite = {160, 0, 200, 24}; - ISLAND_SPRITE sprite; sprite.x = 168 * 0x200; sprite.y = 64 * 0x200;