summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGriffinR <25753467+GriffinRichards@users.noreply.github.com>2019-08-06 13:52:10 -0400
committerhuderlem <huderlem@gmail.com>2019-08-21 17:06:55 -0500
commit5fb7ab05dd1e0897687ef9eb79bd9769c42c679c (patch)
tree0d574324e6246f6e34d913c25a5db81a743ad704 /include
parentd931ba96020397ec9a9740a9d67aac8a99bf11f6 (diff)
clean up
Diffstat (limited to 'include')
-rw-r--r--include/constants/global.h2
-rw-r--r--include/constants/lilycove_lady.h12
-rw-r--r--include/global.h22
3 files changed, 17 insertions, 19 deletions
diff --git a/include/constants/global.h b/include/constants/global.h
index ff28d6a4b..1177f0444 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -50,6 +50,8 @@
#define PYRAMID_BAG_ITEMS_COUNT 10
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
+#define TRAINER_ID_LENGTH 4
+
// string lengths
#define ITEM_NAME_LENGTH 14
#define POKEMON_NAME_LENGTH 10
diff --git a/include/constants/lilycove_lady.h b/include/constants/lilycove_lady.h
index 6ef70d8a7..01f60ccf4 100644
--- a/include/constants/lilycove_lady.h
+++ b/include/constants/lilycove_lady.h
@@ -10,6 +10,8 @@
#define LILYCOVE_LADY_STATE_COMPLETED 1
#define LILYCOVE_LADY_STATE_PRIZE 2
+#define LILYCOVE_LADY_GIFT_THRESHOLD 5
+
#define QUIZ_AUTHOR_PLAYER 0
#define QUIZ_AUTHOR_OTHER_PLAYER 1
#define QUIZ_AUTHOR_LADY 2
@@ -18,13 +20,7 @@
#define QUIZ_AUTHOR_NAME_LADY 0
#define QUIZ_AUTHOR_NAME_PLAYER 1
#define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2
-
-// TODO use array count macro?
-#define QUIZ_QUESTION_LEN 9 //ARRAY_COUNT(sQuizLadyQuestion#)
-#define NUM_QUIZ_QUESTIONS 16 //ARRAY_COUNT(sQuizLadyQuizQuestions)
-#define FAVOR_DESCRIPTION_NUM 6 //ARRAY_COUNT(sFavorLadyDescriptions)
-
-#define LILYCOVE_LADY_GIFT_THRESHOLD 5
-
+
+#define QUIZ_QUESTION_LEN 9
#endif
diff --git a/include/global.h b/include/global.h
index df0d0c1ea..a82fe5861 100644
--- a/include/global.h
+++ b/include/global.h
@@ -224,7 +224,7 @@ struct Apprentice
u8 number;
struct ApprenticeMon party[3];
u16 easyChatWords[6];
- u8 playerId[4];
+ u8 playerId[TRAINER_ID_LENGTH];
u8 playerName[PLAYER_NAME_LENGTH];
u8 language;
u32 checksum;
@@ -263,7 +263,7 @@ struct EmeraldBattleTowerRecord
/*0x01*/ u8 facilityClass;
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
- /*0x0C*/ u8 trainerId[4];
+ /*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
/*0x10*/ u16 greeting[6];
/*0x1C*/ u16 speechWon[6];
/*0x28*/ u16 speechLost[6];
@@ -278,7 +278,7 @@ struct BattleTowerEReaderTrainer
/*0x01*/ u8 facilityClass;
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
- /*0x0C*/ u8 trainerId[4];
+ /*0x0C*/ u8 trainerId[TRAINER_ID_LENGTH];
/*0x10*/ u16 greeting[6];
/*0x1C*/ u16 farewellPlayerLost[6];
/*0x28*/ u16 farewellPlayerWon[6];
@@ -425,7 +425,7 @@ struct PlayersApprentice
struct RankingHall1P
{
- u8 id[4];
+ u8 id[TRAINER_ID_LENGTH];
u16 winStreak;
u8 name[PLAYER_NAME_LENGTH + 1];
u8 language;
@@ -433,8 +433,8 @@ struct RankingHall1P
struct RankingHall2P
{
- u8 id1[4];
- u8 id2[4];
+ u8 id1[TRAINER_ID_LENGTH];
+ u8 id2[TRAINER_ID_LENGTH];
u16 winStreak;
u8 name1[PLAYER_NAME_LENGTH + 1];
u8 name2[PLAYER_NAME_LENGTH + 1];
@@ -446,7 +446,7 @@ struct SaveBlock2
/*0x00*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x08*/ u8 playerGender; // MALE, FEMALE
/*0x09*/ u8 specialSaveWarpFlags;
- /*0x0A*/ u8 playerTrainerId[4];
+ /*0x0A*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
/*0x0E*/ u16 playTimeHours;
/*0x10*/ u8 playTimeMinutes;
/*0x11*/ u8 playTimeSeconds;
@@ -495,7 +495,7 @@ struct SecretBase
/*0x1A9D*/ u8 battledOwnerToday:1;
/*0x1A9D*/ u8 registryStatus:2;
/*0x1A9E*/ u8 trainerName[PLAYER_NAME_LENGTH];
- /*0x1AA5*/ u8 trainerId[4]; // byte 0 is used for determining trainer class
+ /*0x1AA5*/ u8 trainerId[TRAINER_ID_LENGTH]; // byte 0 is used for determining trainer class
/*0x1AA9*/ u8 language;
/*0x1AAA*/ u16 numSecretBasesReceived;
/*0x1AAC*/ u8 numTimesEntered;
@@ -581,7 +581,7 @@ struct MailStruct
{
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
/*0x12*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
- /*0x1A*/ u8 trainerId[4];
+ /*0x1A*/ u8 trainerId[TRAINER_ID_LENGTH];
/*0x1E*/ u16 species;
/*0x20*/ u16 itemId;
};
@@ -598,7 +598,7 @@ struct MauvilleManBard
/*0x0E*/ u16 temporaryLyrics[6];
/*0x1A*/ u8 playerName[8];
/*0x22*/ u8 filler_2DB6[0x3];
- /*0x25*/ u8 playerTrainerId[4];
+ /*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
/*0x29*/ bool8 hasChangedSong;
/*0x2A*/ u8 language;
}; /*size = 0x2C*/
@@ -745,7 +745,7 @@ struct LilycoveLadyQuiz
/*0x014*/ u16 correctAnswer;
/*0x016*/ u16 playerAnswer;
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
- /*0x020*/ u16 playerTrainerId[4];
+ /*0x020*/ u16 playerTrainerId[TRAINER_ID_LENGTH];
/*0x028*/ u16 prize;
/*0x02a*/ bool8 waitingForChallenger;
/*0x02b*/ u8 questionId;