mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
document slot machine
This commit is contained in:
parent
baf95a8e7a
commit
5c8cc5225f
@ -771,12 +771,12 @@ gUnknown_083EDD1C:: @ 85A841C
|
|||||||
gUnknown_083EDD30:: @ 85A8430
|
gUnknown_083EDD30:: @ 85A8430
|
||||||
.byte 0x4A, 0x4B, 0x4C, 0x4E, 0x4D
|
.byte 0x4A, 0x4B, 0x4C, 0x4E, 0x4D
|
||||||
|
|
||||||
gUnknown_083EDD35:: @ 85A8435
|
gBettingTilesId:: @ 85A8435
|
||||||
.byte 0, 0
|
.byte 0, 0
|
||||||
.byte 1, 2
|
.byte 1, 2
|
||||||
.byte 3, 4
|
.byte 3, 4
|
||||||
|
|
||||||
gUnknown_083EDD3B:: @ 85A843B
|
gNumberBettingTiles:: @ 85A843B
|
||||||
.byte 1, 2, 2
|
.byte 1, 2, 2
|
||||||
|
|
||||||
gUnknown_085A843E:: @ 85A843E
|
gUnknown_085A843E:: @ 85A843E
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef GUARD_SLOT_MACHINE_H
|
#ifndef GUARD_SLOT_MACHINE_H
|
||||||
#define GUARD_SLOT_MACHINE_H
|
#define GUARD_SLOT_MACHINE_H
|
||||||
|
|
||||||
|
#define REEL_NUM_TAGS 21
|
||||||
|
|
||||||
|
|
||||||
void PlaySlotMachine(u8, void (callback)(void));
|
void PlaySlotMachine(u8, void (callback)(void));
|
||||||
|
|
||||||
#endif // GUARD_SLOT_MACHINE_H
|
#endif // GUARD_SLOT_MACHINE_H
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef GUARD_TASK_H
|
#ifndef GUARD_TASK_H
|
||||||
#define GUARD_TASK_H
|
#define GUARD_TASK_H
|
||||||
|
|
||||||
|
#define HEAD_SENTINEL 0xFE
|
||||||
|
#define TAIL_SENTINEL 0xFF
|
||||||
|
|
||||||
#define NUM_TASKS 16
|
#define NUM_TASKS 16
|
||||||
|
|
||||||
typedef void (*TaskFunc)(u8 taskId);
|
typedef void (*TaskFunc)(u8 taskId);
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef GUARD_TV_H
|
#ifndef GUARD_TV_H
|
||||||
#define GUARD_TV_H
|
#define GUARD_TV_H
|
||||||
|
|
||||||
|
#define SLOT_MACHINE 0
|
||||||
|
#define ROULETTE 1
|
||||||
|
|
||||||
extern u8 *const gTVStringVarPtrs[3];
|
extern u8 *const gTVStringVarPtrs[3];
|
||||||
|
|
||||||
void ClearTVShowData(void);
|
void ClearTVShowData(void);
|
||||||
@ -23,9 +26,9 @@ bool8 GetPriceReduction(u8 newsKind);
|
|||||||
void sub_80F14F8(TVShow *shows);
|
void sub_80F14F8(TVShow *shows);
|
||||||
size_t CountDigits(int value);
|
size_t CountDigits(int value);
|
||||||
u8 GetRibbonCount(struct Pokemon *pokemon);
|
u8 GetRibbonCount(struct Pokemon *pokemon);
|
||||||
void sub_80EDE70(u16 nCoinsSpent);
|
void reportPlayedSlotMachine(u16 nCoinsSpent);
|
||||||
void sub_80EDE84(u16 nCoinsSpent);
|
void reportPlayedRoulette(u16 nCoinsSpent);
|
||||||
void sub_80EDD78(u16 nCoinsPaidOut);
|
void reportNewCoinTotal(u16 nCoinsPaidOut);
|
||||||
void sub_80EEA70(void);
|
void sub_80EEA70(void);
|
||||||
void sub_80EDB44(void);
|
void sub_80EDB44(void);
|
||||||
void sub_80EDC60(const u16 *words);
|
void sub_80EDC60(const u16 *words);
|
||||||
|
@ -996,7 +996,7 @@ static void sub_81405CC(void)
|
|||||||
taskId = gUnknown_0203AB88->varA4 = CreateTask(sub_81408A8, 0);
|
taskId = gUnknown_0203AB88->varA4 = CreateTask(sub_81408A8, 0);
|
||||||
gTasks[taskId].data[6] = 6;
|
gTasks[taskId].data[6] = 6;
|
||||||
gTasks[taskId].data[13] = GetCoins();
|
gTasks[taskId].data[13] = GetCoins();
|
||||||
sub_80EDE84(GetCoins());
|
reportPlayedRoulette(GetCoins());
|
||||||
gUnknown_0203AB88->varA5 = CreateTask(sub_8140814, 1);
|
gUnknown_0203AB88->varA5 = CreateTask(sub_8140814, 1);
|
||||||
SetMainCallback2(sub_8140238);
|
SetMainCallback2(sub_8140238);
|
||||||
return;
|
return;
|
||||||
@ -1964,7 +1964,7 @@ static void sub_8141DE4(u8 taskId)
|
|||||||
gSpecialVar_0x8004 = TRUE;
|
gSpecialVar_0x8004 = TRUE;
|
||||||
else
|
else
|
||||||
gSpecialVar_0x8004 = FALSE;
|
gSpecialVar_0x8004 = FALSE;
|
||||||
sub_80EDD78(GetCoins());
|
reportNewCoinTotal(GetCoins());
|
||||||
BeginHardwarePaletteFade(0xFF, 0, 0, 16, 0);
|
BeginHardwarePaletteFade(0xFF, 0, 0, 16, 0);
|
||||||
gTasks[taskId].func = sub_8141E7C;
|
gTasks[taskId].func = sub_8141E7C;
|
||||||
}
|
}
|
||||||
|
1864
src/slot_machine.c
1864
src/slot_machine.c
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,6 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
|
||||||
#define HEAD_SENTINEL 0xFE
|
|
||||||
#define TAIL_SENTINEL 0xFF
|
|
||||||
|
|
||||||
struct Task gTasks[NUM_TASKS];
|
struct Task gTasks[NUM_TASKS];
|
||||||
|
|
||||||
static void InsertTask(u8 newTaskId);
|
static void InsertTask(u8 newTaskId);
|
||||||
|
16
src/tv.c
16
src/tv.c
@ -62,7 +62,7 @@ IWRAM_DATA s8 sTVShowMixingCurSlot;
|
|||||||
EWRAM_DATA u16 sPokemonAnglerSpecies = 0;
|
EWRAM_DATA u16 sPokemonAnglerSpecies = 0;
|
||||||
EWRAM_DATA u16 sPokemonAnglerAttemptCounters = 0;
|
EWRAM_DATA u16 sPokemonAnglerAttemptCounters = 0;
|
||||||
EWRAM_DATA u16 sFindThatGamerCoinsSpent = 0;
|
EWRAM_DATA u16 sFindThatGamerCoinsSpent = 0;
|
||||||
EWRAM_DATA bool8 sFindThatGamerWhichGame = FALSE;
|
EWRAM_DATA bool8 sFindThatGamerWhichGame = SLOT_MACHINE;
|
||||||
EWRAM_DATA ALIGNED(4) u8 sRecordMixingPartnersWithoutShowsToShare = 0;
|
EWRAM_DATA ALIGNED(4) u8 sRecordMixingPartnersWithoutShowsToShare = 0;
|
||||||
EWRAM_DATA ALIGNED(4) u8 sTVShowState = 0;
|
EWRAM_DATA ALIGNED(4) u8 sTVShowState = 0;
|
||||||
EWRAM_DATA u8 sTVSecretBaseSecretsRandomValues[3] = {};
|
EWRAM_DATA u8 sTVSecretBaseSecretsRandomValues[3] = {};
|
||||||
@ -2019,7 +2019,7 @@ void sub_80EDCE8(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80EDD78(u16 nCoinsPaidOut)
|
void reportNewCoinTotal(u16 nCoinsPaidOut)
|
||||||
{
|
{
|
||||||
TVShow *show;
|
TVShow *show;
|
||||||
bool8 flag;
|
bool8 flag;
|
||||||
@ -2031,7 +2031,7 @@ void sub_80EDD78(u16 nCoinsPaidOut)
|
|||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
switch (sFindThatGamerWhichGame)
|
switch (sFindThatGamerWhichGame)
|
||||||
{
|
{
|
||||||
case FALSE:
|
case SLOT_MACHINE:
|
||||||
if (nCoinsPaidOut >= sFindThatGamerCoinsSpent + 200)
|
if (nCoinsPaidOut >= sFindThatGamerCoinsSpent + 200)
|
||||||
{
|
{
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
@ -2044,7 +2044,7 @@ void sub_80EDD78(u16 nCoinsPaidOut)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case TRUE:
|
case ROULETTE:
|
||||||
if (nCoinsPaidOut >= sFindThatGamerCoinsSpent + 50)
|
if (nCoinsPaidOut >= sFindThatGamerCoinsSpent + 50)
|
||||||
{
|
{
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
@ -2072,15 +2072,15 @@ void sub_80EDD78(u16 nCoinsPaidOut)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80EDE70(u16 nCoinsSpent)
|
void reportPlayedSlotMachine(u16 nCoinsSpent)
|
||||||
{
|
{
|
||||||
sFindThatGamerWhichGame = FALSE;
|
sFindThatGamerWhichGame = SLOT_MACHINE;
|
||||||
sFindThatGamerCoinsSpent = nCoinsSpent;
|
sFindThatGamerCoinsSpent = nCoinsSpent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80EDE84(u16 nCoinsSpent)
|
void reportPlayedRoulette(u16 nCoinsSpent)
|
||||||
{
|
{
|
||||||
sFindThatGamerWhichGame = TRUE;
|
sFindThatGamerWhichGame = ROULETTE;
|
||||||
sFindThatGamerCoinsSpent = nCoinsSpent;
|
sFindThatGamerCoinsSpent = nCoinsSpent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user