mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
document slot machine
This commit is contained in:
parent
baf95a8e7a
commit
5c8cc5225f
1144
data/slot_machine.s
1144
data/slot_machine.s
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,9 @@
|
||||
#ifndef GUARD_SLOT_MACHINE_H
|
||||
#define GUARD_SLOT_MACHINE_H
|
||||
|
||||
#define REEL_NUM_TAGS 21
|
||||
|
||||
|
||||
void PlaySlotMachine(u8, void (callback)(void));
|
||||
|
||||
#endif // GUARD_SLOT_MACHINE_H
|
||||
|
@ -1,6 +1,9 @@
|
||||
#ifndef GUARD_TASK_H
|
||||
#define GUARD_TASK_H
|
||||
|
||||
#define HEAD_SENTINEL 0xFE
|
||||
#define TAIL_SENTINEL 0xFF
|
||||
|
||||
#define NUM_TASKS 16
|
||||
|
||||
typedef void (*TaskFunc)(u8 taskId);
|
||||
|
@ -1,6 +1,9 @@
|
||||
#ifndef GUARD_TV_H
|
||||
#define GUARD_TV_H
|
||||
|
||||
#define SLOT_MACHINE 0
|
||||
#define ROULETTE 1
|
||||
|
||||
extern u8 *const gTVStringVarPtrs[3];
|
||||
|
||||
void ClearTVShowData(void);
|
||||
@ -23,9 +26,9 @@ bool8 GetPriceReduction(u8 newsKind);
|
||||
void sub_80F14F8(TVShow *shows);
|
||||
size_t CountDigits(int value);
|
||||
u8 GetRibbonCount(struct Pokemon *pokemon);
|
||||
void sub_80EDE70(u16 nCoinsSpent);
|
||||
void sub_80EDE84(u16 nCoinsSpent);
|
||||
void sub_80EDD78(u16 nCoinsPaidOut);
|
||||
void reportPlayedSlotMachine(u16 nCoinsSpent);
|
||||
void reportPlayedRoulette(u16 nCoinsSpent);
|
||||
void reportNewCoinTotal(u16 nCoinsPaidOut);
|
||||
void sub_80EEA70(void);
|
||||
void sub_80EDB44(void);
|
||||
void sub_80EDC60(const u16 *words);
|
||||
|
@ -996,7 +996,7 @@ static void sub_81405CC(void)
|
||||
taskId = gUnknown_0203AB88->varA4 = CreateTask(sub_81408A8, 0);
|
||||
gTasks[taskId].data[6] = 6;
|
||||
gTasks[taskId].data[13] = GetCoins();
|
||||
sub_80EDE84(GetCoins());
|
||||
reportPlayedRoulette(GetCoins());
|
||||
gUnknown_0203AB88->varA5 = CreateTask(sub_8140814, 1);
|
||||
SetMainCallback2(sub_8140238);
|
||||
return;
|
||||
@ -1964,7 +1964,7 @@ static void sub_8141DE4(u8 taskId)
|
||||
gSpecialVar_0x8004 = TRUE;
|
||||
else
|
||||
gSpecialVar_0x8004 = FALSE;
|
||||
sub_80EDD78(GetCoins());
|
||||
reportNewCoinTotal(GetCoins());
|
||||
BeginHardwarePaletteFade(0xFF, 0, 0, 16, 0);
|
||||
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 "task.h"
|
||||
|
||||
#define HEAD_SENTINEL 0xFE
|
||||
#define TAIL_SENTINEL 0xFF
|
||||
|
||||
struct Task gTasks[NUM_TASKS];
|
||||
|
||||
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 sPokemonAnglerAttemptCounters = 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 sTVShowState = 0;
|
||||
EWRAM_DATA u8 sTVSecretBaseSecretsRandomValues[3] = {};
|
||||
@ -2019,7 +2019,7 @@ void sub_80EDCE8(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80EDD78(u16 nCoinsPaidOut)
|
||||
void reportNewCoinTotal(u16 nCoinsPaidOut)
|
||||
{
|
||||
TVShow *show;
|
||||
bool8 flag;
|
||||
@ -2031,7 +2031,7 @@ void sub_80EDD78(u16 nCoinsPaidOut)
|
||||
flag = FALSE;
|
||||
switch (sFindThatGamerWhichGame)
|
||||
{
|
||||
case FALSE:
|
||||
case SLOT_MACHINE:
|
||||
if (nCoinsPaidOut >= sFindThatGamerCoinsSpent + 200)
|
||||
{
|
||||
flag = TRUE;
|
||||
@ -2044,7 +2044,7 @@ void sub_80EDD78(u16 nCoinsPaidOut)
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case TRUE:
|
||||
case ROULETTE:
|
||||
if (nCoinsPaidOut >= sFindThatGamerCoinsSpent + 50)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
void sub_80EDE84(u16 nCoinsSpent)
|
||||
void reportPlayedRoulette(u16 nCoinsSpent)
|
||||
{
|
||||
sFindThatGamerWhichGame = TRUE;
|
||||
sFindThatGamerWhichGame = ROULETTE;
|
||||
sFindThatGamerCoinsSpent = nCoinsSpent;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user