summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-07-29 21:56:42 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-07-29 21:56:42 -0400
commita74d770de1bd0b989350f8f4833ec92f48139bf8 (patch)
treec101665c180cd6249a9dddd3115161d7f7f6de86
parent8384ed7a25f2fed140786b90a9893f47f8379f9a (diff)
Move string decls to strings.h
-rw-r--r--data/strings.s6
-rw-r--r--include/strings.h5
-rw-r--r--src/slot_machine.c17
3 files changed, 15 insertions, 13 deletions
diff --git a/data/strings.s b/data/strings.s
index e1804aae0..4f6b40d85 100644
--- a/data/strings.s
+++ b/data/strings.s
@@ -3067,13 +3067,13 @@ gText_HatchedFromEgg:: @ 841B6FD
gText_NickHatchPrompt:: @ 841B716
.string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$"
-gUnknown_841B747:: @ 841B747
+gString_OutOfCoins:: @ 841B747
.string "You've run out of COINS.\nGame over!$"
-gUnknown_841B76B:: @ 841B76B
+gString_QuitPlaying:: @ 841B76B
.string "Quit playing?$"
-gUnknown_841B779:: @ 841B779
+gString_SlotMachineControls:: @ 841B779
.string "{KEYGFX_DPAD_LEFT_RIGHT}COMBOS {KEYGFX_DPAD_DOWN}WAGER {KEYGFX_A_BUTTON}STOP {KEYGFX_B_BUTTON}EXIT$"
gUnknown_841B798:: @ 0x841B798
diff --git a/include/strings.h b/include/strings.h
index 85b67ed57..97c120ff3 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -203,4 +203,9 @@ extern const u8 gString_BattleRecords_ColumnHeaders[];
extern const u8 gString_BattleRecords_7Dashes[];
extern const u8 gString_BattleRecords_4Dashes[];
+// slot_machine
+extern const u8 gString_OutOfCoins[];
+extern const u8 gString_QuitPlaying[];
+extern const u8 gString_SlotMachineControls[];
+
#endif //GUARD_STRINGS_H
diff --git a/src/slot_machine.c b/src/slot_machine.c
index 6d0db130d..98270cf37 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -17,12 +17,9 @@
#include "text_window.h"
#include "random.h"
#include "trig.h"
+#include "strings.h"
#include "constants/songs.h"
-extern const u8 gUnknown_841B747[];
-extern const u8 gUnknown_841B76B[];
-extern const u8 gUnknown_841B779[];
-
struct SlotMachineState
{
MainCallback savedCallback;
@@ -2127,11 +2124,11 @@ bool8 sub_8141198(u8 * state, struct SlotMachineSetupTaskData * ptr)
FillWindowPixelBuffer(1, 0xFF);
PutWindowTilemap(1);
- x = 0xEC - GetStringWidth(0, gUnknown_841B779, 0);
+ x = 0xEC - GetStringWidth(0, gString_SlotMachineControls, 0);
textColor.fgColor = 15;
textColor.bgColor = 1;
textColor.shadowColor = 2;
- AddTextPrinterParameterized3(1, 0, x, 0, &textColor, 0, gUnknown_841B779);
+ AddTextPrinterParameterized3(1, 0, x, 0, &textColor, 0, gString_SlotMachineControls);
CopyBgTilemapBufferToVram(0);
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | 0x20 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON);
@@ -2339,7 +2336,7 @@ bool8 sub_8141198(u8 * state, struct SlotMachineSetupTaskData * ptr)
"\tbl FillWindowPixelBuffer\n"
"\tmovs r0, 0x1\n"
"\tbl PutWindowTilemap\n"
- "\tldr r4, _081413D8 @ =gUnknown_841B779\n"
+ "\tldr r4, _081413D8 @ =gString_SlotMachineControls\n"
"\tmovs r0, 0\n"
"\tadds r1, r4, 0\n"
"\tmovs r2, 0\n"
@@ -2401,7 +2398,7 @@ bool8 sub_8141198(u8 * state, struct SlotMachineSetupTaskData * ptr)
"_081413CC: .4byte 0x0000085c\n"
"_081413D0: .4byte gUnknown_8466620\n"
"_081413D4: .4byte gUnknown_8466998\n"
- "_081413D8: .4byte gUnknown_841B779\n"
+ "_081413D8: .4byte gString_SlotMachineControls\n"
"_081413DC: .4byte sub_8141118\n"
"_081413E0: .4byte sub_8140E40\n"
"_081413E4:\n"
@@ -2550,7 +2547,7 @@ bool8 sub_8141584(u8 * state, struct SlotMachineSetupTaskData * ptr)
switch (*state)
{
case 0:
- sub_81417E4(gUnknown_841B747);
+ sub_81417E4(gString_OutOfCoins);
CopyWindowToVram(0, 3);
(*state)++;
break;
@@ -2567,7 +2564,7 @@ bool8 sub_81415C8(u8 * state, struct SlotMachineSetupTaskData * ptr)
switch (*state)
{
case 0:
- sub_81417E4(gUnknown_841B76B);
+ sub_81417E4(gString_QuitPlaying);
sub_8141AD8(0);
CopyWindowToVram(0, 3);
(*state)++;