More-accurate Ending.cpp variable arrangement

This commit is contained in:
Clownacy 2020-01-07 06:05:07 +00:00
parent 0ceb8955d2
commit b1dbce8743

View file

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