diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/easy_chat.h | 27 | ||||
-rw-r--r-- | include/easy_chat.h | 28 | ||||
-rw-r--r-- | include/global.fieldmap.h | 11 | ||||
-rw-r--r-- | include/global.h | 8 | ||||
-rw-r--r-- | include/slot_machine.h | 14 | ||||
-rw-r--r-- | include/task.h | 3 | ||||
-rw-r--r-- | include/tv.h | 9 |
7 files changed, 77 insertions, 23 deletions
diff --git a/include/constants/easy_chat.h b/include/constants/easy_chat.h index 1c8866bc3..50f5994f4 100644 --- a/include/constants/easy_chat.h +++ b/include/constants/easy_chat.h @@ -1,6 +1,33 @@ #ifndef GUARD_CONSTANTS_EASY_CHAT_H #define GUARD_CONSTANTS_EASY_CHAT_H +#define EASY_CHAT_TYPE_PROFILE 0 +#define EASY_CHAT_TYPE_BATTLE_START 1 +#define EASY_CHAT_TYPE_BATTLE_WON 2 +#define EASY_CHAT_TYPE_BATTLE_LOST 3 +#define EASY_CHAT_TYPE_MAIL 4 +#define EASY_CHAT_TYPE_INTERVIEW 5 +#define EASY_CHAT_TYPE_BARD_SONG 6 +#define EASY_CHAT_TYPE_FAN_CLUB 7 +#define EASY_CHAT_TYPE_UNK_8 8 +#define EASY_CHAT_TYPE_TRENDY_PHRASE 9 +#define EASY_CHAT_TYPE_GABBY_AND_TY 10 +#define EASY_CHAT_TYPE_CONTEST_INTERVIEW 11 +#define EASY_CHAT_TYPE_BATTLE_TOWER_INTERVIEW 12 +#define EASY_CHAT_TYPE_GOOD_SAYING 13 +#define EASY_CHAT_TYPE_FAN_QUESTION 14 +#define EASY_CHAT_TYPE_QUIZ_ANSWER 15 +#define EASY_CHAT_TYPE_QUIZ_QUESTION 16 +#define EASY_CHAT_TYPE_QUIZ_SET_QUESTION 17 +#define EASY_CHAT_TYPE_QUIZ_SET_ANSWER 18 +#define EASY_CHAT_TYPE_APPRENTICE 19 +#define EASY_CHAT_TYPE_QUESTIONNAIRE 20 + +#define EASY_CHAT_PERSON_REPORTER_MALE 0 +#define EASY_CHAT_PERSON_REPORTER_FEMALE 1 +#define EASY_CHAT_PERSON_BOY 2 +#define EASY_CHAT_PERSON_DISPLAY_NONE 3 + #define EC_GROUP_POKEMON 0x0 #define EC_GROUP_TRAINER 0x1 #define EC_GROUP_STATUS 0x2 diff --git a/include/easy_chat.h b/include/easy_chat.h index b7685e48c..2efdc4e5d 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -6,11 +6,11 @@ struct EasyChatScreenTemplate { - u8 unk_00; + u8 type; u8 numColumns; u8 numRows; - u8 unk_03_0:7; - u8 unk_03_7:1; + u8 frameId:7; + u8 fourFooterOptions:1; const u8 *titleText; const u8 *instructionsText1; const u8 *instructionsText2; @@ -20,7 +20,7 @@ struct EasyChatScreenTemplate struct EasyChatScreen { - /*0x00*/ u8 kind; + /*0x00*/ u8 type; /*0x01*/ u8 templateId; /*0x02*/ u8 numColumns; /*0x03*/ u8 numRows; @@ -28,7 +28,7 @@ struct EasyChatScreen /*0x05*/ s8 mainCursorColumn; /*0x06*/ s8 mainCursorRow; /*0x07*/ u8 unk_07; - /*0x08*/ u8 unk_08; + /*0x08*/ u8 stateBackup; /*0x09*/ u8 unk_09; /*0x0A*/ s8 unk_0a; /*0x0B*/ s8 unk_0b; @@ -38,7 +38,7 @@ struct EasyChatScreen /*0x0F*/ u8 unk_0f; /*0x10*/ s8 unk_10; /*0x11*/ s8 unk_11; - /*0x12*/ u8 sizeParam; + /*0x12*/ u8 displayedPersonType; /*0x13*/ u8 unk_13; /*0x14*/ u8 unk_14[0x20]; /*0x34*/ const u8 *titleText; @@ -75,13 +75,13 @@ struct Unk203A11C u16 unkB00[BG_SCREEN_SIZE / 2]; }; -struct Unk08597C30 +struct EasyChatPhraseFrameDimensions { - u8 unk0_0:5; - u8 unk0_5:3; - u8 unk1; - u8 unk2; - u8 unk3; + u8 left:5; + u8 top:3; + u8 width; + u8 height; + u8 footerId; }; struct EasyChatWordInfo @@ -122,7 +122,7 @@ struct EasyChatWordsByLetter }; void InitEasyChatPhrases(void); -void easy_chat_input_maybe(void); +void ShowEasyChatScreen(void); u8 * CopyEasyChatWord(u8 *dest, u16 word); bool32 sub_811F8D8(int word); void InitializeEasyChatWordArray(u16 *words, u16 length); @@ -132,7 +132,7 @@ u16 sub_811EE38(u16 group); u16 sub_811F01C(void); u16 EasyChat_GetNumWordsInGroup(u8); u16 sub_811EE90(u16); -void sub_811A20C(u8 kind, u16 *words, MainCallback callback, u8 sizeParam); +void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType); void sub_811F8BC(void); #endif // GUARD_EASYCHAT_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 74a8363bb..e35d900d8 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -1,6 +1,13 @@ #ifndef GUARD_GLOBAL_FIELDMAP_H #define GUARD_GLOBAL_FIELDMAP_H +#define METATILE_COLLISION_MASK 0x0C00 +#define METATILE_ID_MASK 0x03FF +#define METATILE_ID_UNDEFINED 0x03FF +#define METATILE_ELEVATION_SHIFT 12 +#define METATILE_COLLISION_SHIFT 10 +#define METATILE_ELEVATION_MASK 0xF000 + enum { CONNECTION_SOUTH = 1, @@ -19,8 +26,8 @@ struct Tileset /*0x01*/ bool8 isSecondary; /*0x04*/ void *tiles; /*0x08*/ void *palettes; - /*0x0c*/ void *metatiles; - /*0x10*/ void *metatileAttributes; + /*0x0c*/ u16 *metatiles; + /*0x10*/ u16 *metatileAttributes; /*0x14*/ TilesetCB callback; }; diff --git a/include/global.h b/include/global.h index ad4168a07..8737c6388 100644 --- a/include/global.h +++ b/include/global.h @@ -870,10 +870,10 @@ struct SaveBlock1 /*0x2BA1*/ u8 outbreakPokemonProbability; /*0x2BA2*/ u16 outbreakDaysLeft; /*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData; - /*0x2BB0*/ u16 unk2BB0[6]; - /*0x2BBC*/ u16 unk2BBC[6]; - /*0x2BC8*/ u16 unk2BC8[6]; - /*0x2BD4*/ u16 unk2BD4[6]; + /*0x2BB0*/ u16 easyChatProfile[6]; + /*0x2BBC*/ u16 easyChatBattleStart[6]; + /*0x2BC8*/ u16 easyChatBattleWon[6]; + /*0x2BD4*/ u16 easyChatBattleLost[6]; /*0x2BE0*/ struct MailStruct mail[MAIL_COUNT]; /*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system /*0x2E28*/ OldMan oldMan; diff --git a/include/slot_machine.h b/include/slot_machine.h index 88bbbd91b..d441b7411 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -1,6 +1,20 @@ #ifndef GUARD_SLOT_MACHINE_H #define GUARD_SLOT_MACHINE_H +#define NUM_REELS 3 +#define REEL_NUM_TAGS 21 +#define REEL_TAG_HEIGHT 24 + +// Lucky Flags +#define LUCKY_BIAS_REPLAY (1 << 0) +#define LUCKY_BIAS_CHERRY (1 << 1) +#define LUCKY_BIAS_LOTAD (1 << 2) +#define LUCKY_BIAS_AZURILL (1 << 3) +#define LUCKY_BIAS_POWER (1 << 4) +#define LUCKY_BIAS_REELTIME (1 << 5) +#define LUCKY_BIAS_MIXED_777 (1 << 6) +#define LUCKY_BIAS_777 (1 << 7) + void PlaySlotMachine(u8, void (callback)(void)); #endif // GUARD_SLOT_MACHINE_H diff --git a/include/task.h b/include/task.h index a199ba128..4852571b4 100644 --- a/include/task.h +++ b/include/task.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); diff --git a/include/tv.h b/include/tv.h index a7ef3daa8..ec7ac1e89 100644 --- a/include/tv.h +++ b/include/tv.h @@ -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 AlertTVThatPlayerPlayedSlotMachine(u16 nCoinsSpent); +void AlertTVThatPlayerPlayedRoulette(u16 nCoinsSpent); +void AlertTVOfNewCoinTotal(u16 nCoinsPaidOut); void sub_80EEA70(void); void sub_80EDB44(void); void sub_80EDC60(const u16 *words); |