Merge branch 'master' into doc-pblock
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
#define GUARD_CONSTANTS_COINS_H
|
||||
|
||||
#define MAX_COINS 9999
|
||||
#define MAX_COIN_DIGITS 4
|
||||
|
||||
#endif // GUARD_CONSTANTS_COINS_H
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
#define NUM_NATURE_STATS NUM_STATS - 1 // excludes HP
|
||||
#define NUM_BATTLE_STATS NUM_STATS + 2 // includes Accuracy and Evasion
|
||||
|
||||
#define MIN_STAT_STAGE 0
|
||||
#define DEFAULT_STAT_STAGE 6
|
||||
#define MAX_STAT_STAGE 12
|
||||
|
||||
// Shiny odds
|
||||
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
|
||||
|
||||
|
||||
7
include/constants/roulette.h
Normal file
7
include/constants/roulette.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_CONSTANTS_ROULETTE_H
|
||||
#define GUARD_CONSTANTS_ROULETTE_H
|
||||
|
||||
// Flag set in gSpecialVar_0x8004 when playing Roulette on a Game Corner service day
|
||||
#define ROULETTE_SPECIAL_RATE (1 << 7)
|
||||
|
||||
#endif // GUARD_CONSTANTS_ROULETTE_H
|
||||
@@ -4918,13 +4918,13 @@ extern const u32 gPartyMenuPokeball_Pal[];
|
||||
extern const u32 gStatusPal_Icons[];
|
||||
|
||||
// Roulette
|
||||
extern const u32 gRouletteMenuTiles[];
|
||||
extern const u32 gRouletteWheelTiles[];
|
||||
extern const u32 gRouletteMenu_Gfx[];
|
||||
extern const u32 gRouletteWheel_Gfx[];
|
||||
extern const u32 gRouletteCenter_Gfx[];
|
||||
extern const u32 gRouletteHeadersTiles[];
|
||||
extern const u32 gRouletteCreditTiles[];
|
||||
extern const u32 gRouletteNumbersTiles[];
|
||||
extern const u32 gRouletteMultiplierTiles[];
|
||||
extern const u32 gRouletteHeaders_Gfx[];
|
||||
extern const u32 gRouletteCredit_Gfx[];
|
||||
extern const u32 gRouletteNumbers_Gfx[];
|
||||
extern const u32 gRouletteMultiplier_Gfx[];
|
||||
|
||||
// Contest util
|
||||
extern const u32 gContestResults_Gfx[];
|
||||
|
||||
83
include/palette_util.h
Normal file
83
include/palette_util.h
Normal file
@@ -0,0 +1,83 @@
|
||||
#ifndef GUARD_PALETTE_UTIL_H
|
||||
#define GUARD_PALETTE_UTIL_H
|
||||
|
||||
struct PulseBlendSettings
|
||||
{
|
||||
u16 blendColor;
|
||||
u16 paletteOffset;
|
||||
u8 numColors;
|
||||
u8 delay;
|
||||
u8 numFadeCycles;
|
||||
s8 maxBlendCoeff:4;
|
||||
s8 fadeType:2;
|
||||
s8 restorePaletteOnUnload:1;
|
||||
s8 unk7_7:1;
|
||||
};
|
||||
|
||||
struct PulseBlendPalette
|
||||
{
|
||||
u8 paletteSelector;
|
||||
u8 blendCoeff:4;
|
||||
u8 fadeDirection:1;
|
||||
s8 unk1_5:1;
|
||||
s8 available:1;
|
||||
u32 inUse:1;
|
||||
u8 delayCounter;
|
||||
u8 fadeCycleCounter;
|
||||
struct PulseBlendSettings pulseBlendSettings;
|
||||
};
|
||||
|
||||
struct PulseBlend
|
||||
{
|
||||
u16 usedPulseBlendPalettes;
|
||||
struct PulseBlendPalette pulseBlendPalettes[16];
|
||||
};
|
||||
|
||||
|
||||
#define FLASHUTIL_USE_EXISTING_COLOR (1 << 15)
|
||||
|
||||
struct RouletteFlashSettings
|
||||
{
|
||||
u16 color;
|
||||
u16 paletteOffset;
|
||||
u8 numColors;
|
||||
u8 delay;
|
||||
s8 unk6; // Set but never used
|
||||
s8 numFadeCycles:5;
|
||||
s8 unk7_5:2; // Set but never used
|
||||
s8 colorDeltaDir:1;
|
||||
};
|
||||
|
||||
struct RouletteFlashPalette
|
||||
{
|
||||
u8 state:7;
|
||||
bool8 available:1;
|
||||
u8 delayCounter;
|
||||
s8 fadeCycleCounter;
|
||||
s8 colorDelta;
|
||||
struct RouletteFlashSettings settings;
|
||||
};
|
||||
|
||||
struct RouletteFlashUtil
|
||||
{
|
||||
u8 enabled;
|
||||
u8 unused;
|
||||
u16 flags;
|
||||
struct RouletteFlashPalette palettes[16];
|
||||
};
|
||||
|
||||
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
|
||||
void InitPulseBlend(struct PulseBlend *);
|
||||
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UpdatePulseBlend(struct PulseBlend *);
|
||||
void ClearTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height);
|
||||
void SetTilemapRect(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height);
|
||||
void RouletteFlash_Run(struct RouletteFlashUtil *r0);
|
||||
void RouletteFlash_Reset(struct RouletteFlashUtil *r0);
|
||||
u8 RouletteFlash_Add(struct RouletteFlashUtil *r0, u8 r1, const struct RouletteFlashSettings *r2);
|
||||
void RouletteFlash_Stop(struct RouletteFlashUtil *r0, u16 r1);
|
||||
void RouletteFlash_Enable(struct RouletteFlashUtil *r0, u16 r1);
|
||||
|
||||
#endif // GUARD_PALETTE_UTIL_H
|
||||
@@ -254,7 +254,7 @@ extern const u16 *const gLevelUpLearnsets[];
|
||||
extern const u8 gPPUpGetMask[];
|
||||
extern const u8 gPPUpSetMask[];
|
||||
extern const u8 gPPUpAddMask[];
|
||||
extern const u8 gStatStageRatios[][2];
|
||||
extern const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2];
|
||||
extern const u16 gLinkPlayerFacilityClasses[];
|
||||
extern const struct SpriteTemplate gUnknown_08329D98[];
|
||||
extern const s8 gNatureStatTable[][5];
|
||||
|
||||
@@ -1,34 +1,6 @@
|
||||
#ifndef GUARD_ROULETTE_H
|
||||
#define GUARD_ROULETTE_H
|
||||
|
||||
struct UnkStruct1
|
||||
{
|
||||
u16 var00;
|
||||
u16 var02;
|
||||
u8 var04;
|
||||
u8 var05;
|
||||
u8 var06;
|
||||
s8 var07_0:5;
|
||||
s8 var07_5:2;
|
||||
s8 var07_7:1;
|
||||
};
|
||||
|
||||
struct UnkStruct3
|
||||
{
|
||||
u8 var00_0:7;
|
||||
u8 var00_7:1;
|
||||
u8 var01;
|
||||
s8 var02;
|
||||
s8 var03;
|
||||
struct UnkStruct1 var04;
|
||||
};
|
||||
|
||||
struct UnkStruct0
|
||||
{
|
||||
u8 var00;
|
||||
u8 var01;
|
||||
u16 var02; //flag for each UnkStruct3
|
||||
struct UnkStruct3 var04[0x10];
|
||||
};
|
||||
void PlayRoulette(void);
|
||||
|
||||
#endif // GUARD_ROULETTE_H
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#ifndef GUARD_ROULETTE_UTIL_H
|
||||
#define GUARD_ROULETTE_UTIL_H
|
||||
|
||||
#include "roulette.h"
|
||||
|
||||
struct PulseBlendSettings
|
||||
{
|
||||
u16 blendColor;
|
||||
u16 paletteOffset;
|
||||
u8 numColors;
|
||||
u8 delay;
|
||||
u8 numFadeCycles;
|
||||
s8 maxBlendCoeff:4;
|
||||
s8 fadeType:2;
|
||||
s8 restorePaletteOnUnload:1;
|
||||
s8 unk7_7:1;
|
||||
};
|
||||
|
||||
struct PulseBlendPalette
|
||||
{
|
||||
u8 paletteSelector;
|
||||
u8 blendCoeff:4;
|
||||
u8 fadeDirection:1;
|
||||
s8 unk1_5:1;
|
||||
s8 available:1;
|
||||
u32 inUse:1;
|
||||
u8 delayCounter;
|
||||
u8 fadeCycleCounter;
|
||||
struct PulseBlendSettings pulseBlendSettings;
|
||||
};
|
||||
|
||||
struct PulseBlend
|
||||
{
|
||||
u16 usedPulseBlendPalettes;
|
||||
struct PulseBlendPalette pulseBlendPalettes[16];
|
||||
};
|
||||
|
||||
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
|
||||
void InitPulseBlend(struct PulseBlend *);
|
||||
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UpdatePulseBlend(struct PulseBlend *);
|
||||
void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height);
|
||||
void sub_8152058(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height);
|
||||
void task_tutorial_controls_fadein(struct UnkStruct0 *r0);
|
||||
void sub_8151678(struct UnkStruct0 *r0);
|
||||
u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2);
|
||||
void sub_8151A9C(struct UnkStruct0 *r0, u16 r1);
|
||||
void sub_8151A48(struct UnkStruct0 *r0, u16 r1);
|
||||
|
||||
#endif // GUARD_ROULETTE_UTIL_H
|
||||
@@ -84,6 +84,19 @@ extern const u8 gText_SoSo[];
|
||||
extern const u8 gText_Bad[];
|
||||
extern const u8 gText_TheWorst[];
|
||||
|
||||
extern const u8 Roulette_Text_ControlsInstruction[];
|
||||
extern const u8 Roulette_Text_KeepPlaying[];
|
||||
extern const u8 Roulette_Text_Jackpot[];
|
||||
extern const u8 Roulette_Text_ItsAHit[];
|
||||
extern const u8 Roulette_Text_NothingDoing[];
|
||||
extern const u8 Roulette_Text_YouveWonXCoins[];
|
||||
extern const u8 Roulette_Text_BoardWillBeCleared[];
|
||||
extern const u8 Roulette_Text_CoinCaseIsFull[];
|
||||
extern const u8 Roulette_Text_NoCoinsLeft[];
|
||||
extern const u8 Roulette_Text_PlayMinimumWagerIsX[];
|
||||
extern const u8 Roulette_Text_SpecialRateTable[];
|
||||
extern const u8 Roulette_Text_NotEnoughCoins[];
|
||||
|
||||
extern const u8 gText_Slots[];
|
||||
extern const u8 gText_Roulette[];
|
||||
extern const u8 gText_Jackpot[];
|
||||
|
||||
Reference in New Issue
Block a user