From b7cfa9d36537b8ae53012eb88d59f8b842fb35c4 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 8 Mar 2019 21:39:51 -0500 Subject: Move more contest constants into C --- include/graphics.h | 8 ++++++++ include/sprite.h | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index c651268ca..063f71ee5 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4765,6 +4765,14 @@ extern const u32 gUnknown_08C16FA8[]; extern const u32 gUnknown_08C16E90[]; extern const u32 gUnknown_08C17170[]; extern const u32 gUnknown_08C17980[]; +extern const u32 gTiles_8C19450[]; +extern const u32 gContestNextTurnGfx[]; +extern const u16 gContestPal[]; +extern const u32 gUnknown_08C19168[]; +extern const u32 gContestApplauseGfx[]; +extern const u32 gContestJudgeGfx[]; +extern const u32 gContestJudgeSymbolsGfx[]; +extern const u32 gContest3Pal[]; extern const u32 gUnknown_08D95E00[]; extern const u32 gUnknown_08D960D0[]; diff --git a/include/sprite.h b/include/sprite.h index 32bdd9c55..10c4145b0 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -151,6 +151,26 @@ enum SUBSPRITES_IGNORE_PRIORITY, // on but priority is ignored }; +#define OAM_SIZE_0 (0) +#define OAM_SIZE_1 (1 << 0) +#define OAM_SIZE_2 (1 << 1) +#define OAM_SIZE_3 (1 << 2) + +#define SPRITE_SIZE_8x8 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_0 +#define SPRITE_SIZE_16x16 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_1 +#define SPRITE_SIZE_32x32 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_2 +#define SPRITE_SIZE_64x64 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_3 + +#define SPRITE_SIZE_16x8 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_0 +#define SPRITE_SIZE_32x8 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_1 +#define SPRITE_SIZE_32x16 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_2 +#define SPRITE_SIZE_64x32 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_3 + +#define SPRITE_SIZE_8x16 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_0 +#define SPRITE_SIZE_8x32 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_1 +#define SPRITE_SIZE_16x32 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_2 +#define SPRITE_SIZE_32x64 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_3 + struct Subsprite { s8 x; // was u16 in R/S -- cgit v1.2.3 From 5b4b0a245be14b7485c3e2cc40e40c78eeaa7ce0 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 9 Mar 2019 00:00:10 -0500 Subject: Move contest winner list to C --- include/contest.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/contest.h b/include/contest.h index 8146486cb..4fbec9d22 100644 --- a/include/contest.h +++ b/include/contest.h @@ -196,6 +196,14 @@ enum CONTEST_STRING_NONE = 255 }; +enum { + CONTEST_RANK_NORMAL, + CONTEST_RANK_SUPER, + CONTEST_RANK_HYPER, + CONTEST_RANK_MASTER, + CONTEST_RANK_LINK +}; + struct ContestPokemon { /*0x00*/ u16 species; -- cgit v1.2.3 From 153499ed6f08b6546349ba1ec33ea9e18840f44b Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 9 Mar 2019 01:38:38 -0500 Subject: Clean up contest_opponents.inc --- include/contest.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/contest.h b/include/contest.h index 4fbec9d22..a803c6d4c 100644 --- a/include/contest.h +++ b/include/contest.h @@ -208,15 +208,17 @@ struct ContestPokemon { /*0x00*/ u16 species; /*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; - /*0x0D*/ u8 trainerName[8]; + /*0x0D*/ u8 trainerName[PLAYER_NAME_LENGTH + 1]; /*0x15*/ u8 trainerGfxId; + // Temp note: 2 bytes of padding /*0x18*/ u32 flags; - /*0x1C*/ u8 whichRank:2; - u8 aiPool_Cool:1; - u8 aiPool_Beauty:1; - u8 aiPool_Cute:1; - u8 aiPool_Smart:1; - u8 aiPool_Tough:1; + /*0x1C*/ u8 whichRank:2; // 0x1 0x2 + u8 aiPool_Cool:1; // 0x4 + u8 aiPool_Beauty:1; // 0x8 + u8 aiPool_Cute:1; // 0x10 + u8 aiPool_Smart:1; // 0x20 + u8 aiPool_Tough:1; // 0x40 + // Temp note: 1 byte of padding /*0x1E*/ u16 moves[4]; // moves /*0x26*/ u8 cool; // cool /*0x27*/ u8 beauty; // beauty @@ -227,7 +229,7 @@ struct ContestPokemon /*0x2C*/ u8 unk2C[12]; /*0x38*/ u32 personality; // personality /*0x3C*/ u32 otId; // otId -}; // wow +}; struct Shared18000 { -- cgit v1.2.3 From 0c935a8bd500535ba67fad4f25ea50199cfc1871 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 9 Mar 2019 22:54:17 -0500 Subject: Move the contest opponent filter to C --- include/contest.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/contest.h b/include/contest.h index a803c6d4c..5c299bee5 100644 --- a/include/contest.h +++ b/include/contest.h @@ -204,6 +204,12 @@ enum { CONTEST_RANK_LINK }; +enum { + CONTEST_FILTER_NONE, + CONTEST_FILTER_NO_POSTGAME, + CONTEST_FILTER_ONLY_POSTGAME +}; + struct ContestPokemon { /*0x00*/ u16 species; -- cgit v1.2.3 From 207a54393c533e073e54365a8069753536fefa3c Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 31 Mar 2019 20:07:24 -0400 Subject: Fix mistakes and use EVENT_OBJ_GFX_* macros --- include/contest.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/contest.h b/include/contest.h index 5c299bee5..a0b1a6b34 100644 --- a/include/contest.h +++ b/include/contest.h @@ -216,7 +216,6 @@ struct ContestPokemon /*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x0D*/ u8 trainerName[PLAYER_NAME_LENGTH + 1]; /*0x15*/ u8 trainerGfxId; - // Temp note: 2 bytes of padding /*0x18*/ u32 flags; /*0x1C*/ u8 whichRank:2; // 0x1 0x2 u8 aiPool_Cool:1; // 0x4 @@ -224,7 +223,6 @@ struct ContestPokemon u8 aiPool_Cute:1; // 0x10 u8 aiPool_Smart:1; // 0x20 u8 aiPool_Tough:1; // 0x40 - // Temp note: 1 byte of padding /*0x1E*/ u16 moves[4]; // moves /*0x26*/ u8 cool; // cool /*0x27*/ u8 beauty; // beauty -- cgit v1.2.3 From 23ac2cc94e2914a427e97467103c0160af6f1be0 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 31 Mar 2019 20:15:44 -0400 Subject: Prep for merge --- include/sprite.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'include') diff --git a/include/sprite.h b/include/sprite.h index 10c4145b0..32bdd9c55 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -151,26 +151,6 @@ enum SUBSPRITES_IGNORE_PRIORITY, // on but priority is ignored }; -#define OAM_SIZE_0 (0) -#define OAM_SIZE_1 (1 << 0) -#define OAM_SIZE_2 (1 << 1) -#define OAM_SIZE_3 (1 << 2) - -#define SPRITE_SIZE_8x8 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_0 -#define SPRITE_SIZE_16x16 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_1 -#define SPRITE_SIZE_32x32 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_2 -#define SPRITE_SIZE_64x64 .shape = ST_OAM_SQUARE, .size = OAM_SIZE_3 - -#define SPRITE_SIZE_16x8 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_0 -#define SPRITE_SIZE_32x8 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_1 -#define SPRITE_SIZE_32x16 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_2 -#define SPRITE_SIZE_64x32 .shape = ST_OAM_H_RECTANGLE, .size = OAM_SIZE_3 - -#define SPRITE_SIZE_8x16 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_0 -#define SPRITE_SIZE_8x32 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_1 -#define SPRITE_SIZE_16x32 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_2 -#define SPRITE_SIZE_32x64 .shape = ST_OAM_V_RECTANGLE, .size = OAM_SIZE_3 - struct Subsprite { s8 x; // was u16 in R/S -- cgit v1.2.3