From 8cce0db5bb3fba3feb64f9a40c8605a416a2c0e8 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 18 Jun 2022 16:05:07 +0300 Subject: [PATCH] Cleanup credits.h --- src/credits.cc | 19 +++++++++++++------ src/credits.h | 13 ------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/credits.cc b/src/credits.cc index 6ea671a..ef40abe 100644 --- a/src/credits.cc +++ b/src/credits.cc @@ -4,6 +4,7 @@ #include "color.h" #include "core.h" #include "cycle.h" +#include "db.h" #include "debug.h" #include "draw.h" #include "game_mouse.h" @@ -17,20 +18,26 @@ #include +#define CREDITS_WINDOW_WIDTH (640) +#define CREDITS_WINDOW_HEIGHT (480) +#define CREDITS_WINDOW_SCROLLING_DELAY (38) + +static bool creditsFileParseNextLine(char* dest, int* font, int* color); + // 0x56D740 -File* gCreditsFile; +static File* gCreditsFile; // 0x56D744 -int gCreditsWindowNameColor; +static int gCreditsWindowNameColor; // 0x56D748 -int gCreditsWindowTitleFont; +static int gCreditsWindowTitleFont; // 0x56D74C -int gCreditsWindowNameFont; +static int gCreditsWindowNameFont; // 0x56D750 -int gCreditsWindowTitleColor; +static int gCreditsWindowTitleColor; // 0x42C860 void creditsOpen(const char* filePath, int backgroundFid, bool useReversedStyle) @@ -239,7 +246,7 @@ void creditsOpen(const char* filePath, int backgroundFid, bool useReversedStyle) } // 0x42CE6C -bool creditsFileParseNextLine(char* dest, int* font, int* color) +static bool creditsFileParseNextLine(char* dest, int* font, int* color) { char string[256]; while (fileReadString(string, 256, gCreditsFile)) { diff --git a/src/credits.h b/src/credits.h index e416225..96a2e06 100644 --- a/src/credits.h +++ b/src/credits.h @@ -1,19 +1,6 @@ #ifndef CREDITS_H #define CREDITS_H -#include "db.h" - -#define CREDITS_WINDOW_WIDTH (640) -#define CREDITS_WINDOW_HEIGHT (480) -#define CREDITS_WINDOW_SCROLLING_DELAY (38) - -extern File* gCreditsFile; -extern int gCreditsWindowNameColor; -extern int gCreditsWindowTitleFont; -extern int gCreditsWindowNameFont; -extern int gCreditsWindowTitleColor; - void creditsOpen(const char* path, int fid, bool useReversedStyle); -bool creditsFileParseNextLine(char* dest, int* font, int* color); #endif /* CREDITS_H */