summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slot_machine.c60
1 files changed, 57 insertions, 3 deletions
diff --git a/src/slot_machine.c b/src/slot_machine.c
index 129d9b79a..7010bd969 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -37,8 +37,9 @@ struct SlotMachineState
struct SlotMachineGfxManager
{
u32 field_00[3];
- u32 field_0C[3][5];
- u8 filler_4C[0x2C];
+ struct Sprite * field_0C[3][5];
+ u8 filler_4C[0x28];
+ u32 field_70;
};
EWRAM_DATA struct SlotMachineState * sSlotMachineState = NULL;
@@ -168,6 +169,33 @@ const struct SpritePalette gUnknown_84655C8[] = {
{NULL}
};
+const u16 gUnknown_8465608[] = {
+ 2,
+ 2,
+ 0,
+ 0,
+ 2,
+ 4,
+ 3
+};
+
+const u16 gUnknown_8465616[] = {
+ 0x0120, 0x011f, 0x011e, 0x011d, 0x011c, 0x011b, 0x011a, 0x0119, 0x0118, 0x0117, 0x0116, 0x0115, 0x0114, 0x0113, 0x0112, 0x0111,
+ 0x0110, 0x010f, 0x010e, 0x010d, 0x010c, 0x010b, 0x010a, 0x0109, 0x0108, 0x0107, 0x0106, 0x0105, 0x0104, 0x0103, 0x0102, 0x0101,
+ 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
+ 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
+ 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, 0x0109, 0x010a, 0x010b, 0x010c, 0x010d, 0x010e, 0x010f, 0x0110,
+ 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, 0x0118, 0x0119, 0x011a, 0x011b, 0x011c, 0x011d, 0x011e, 0x011f, 0x0120
+};
+
+const u8 gUnknown_84656D6[] = {
+ 0x10, 0x10, 0x10, 0x10, 0x0f, 0x0e, 0x0d, 0x0d, 0x0c, 0x0b, 0x0a, 0x0a, 0x09, 0x08, 0x07, 0x07, 0x06, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x09, 0x09, 0x0a, 0x0b, 0x0c, 0x0c, 0x0d, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f
+};
+
+extern const struct SpriteTemplate gUnknown_84657E4;
+
void PlaySlotMachine(u16 machineIdx, MainCallback savedCallback)
{
ResetTasks();
@@ -1408,7 +1436,33 @@ void sub_8140C6C(struct SlotMachineGfxManager * manager)
manager->field_00[i] = 0;
for (j = 0; j < 5; j++)
{
- manager->field_0C[i][j] = 0;
+ manager->field_0C[i][j] = NULL;
+ }
+ }
+}
+
+void sub_8140CA0(void)
+{
+ struct Sprite * sprite;
+ s32 i, j;
+ s32 spriteId;
+ s32 animId;
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 5; j++)
+ {
+ spriteId = CreateSprite(&gUnknown_84657E4, 80 + 40 * i, 44 + 24 * j, 2);
+ animId = gUnknown_8464926[i][j];
+ sprite = &gSprites[spriteId];
+ StartSpriteAnim(sprite, animId);
+ sprite->oam.paletteNum = IndexOfSpritePaletteTag(gUnknown_8465608[animId]);
+ sprite->data[0] = i;
+ sprite->data[1] = j;
+ sprite->data[2] = j;
+ sprite->data[3] = 0;
+ sprite->oam.matrixNum = 0;
+ gUnknown_203F3A4->field_0C[i][j] = sprite;
+ gUnknown_203F3A4->field_70 = 0x07000006;
}
}
}