summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/contest.s70
-rw-r--r--include/contest.h8
-rw-r--r--src/contest.c149
-rw-r--r--src/data/contest_opponents.h80
4 files changed, 234 insertions, 73 deletions
diff --git a/data/contest.s b/data/contest.s
index aba96d54f..851af78c5 100644
--- a/data/contest.s
+++ b/data/contest.s
@@ -6,76 +6,6 @@
.section .rodata
.align 2, 0
- .align 2
-gUnknown_08587F34:: @ 8587F34
- .4byte 0x00000580, 0x000015e9, 0x000005c2, 0x000031a3
-
- .align 2
-gUnknown_08587F44:: @ 8587F44
- window_template 0x00, 0x12, 0x00, 0x0c, 0x02, 0x0f, 0x0200
- window_template 0x00, 0x12, 0x05, 0x0c, 0x02, 0x0f, 0x0218
- window_template 0x00, 0x12, 0x0a, 0x0c, 0x02, 0x0f, 0x0230
- window_template 0x00, 0x12, 0x0f, 0x0c, 0x02, 0x0f, 0x0248
- window_template 0x00, 0x01, 0x0f, 0x11, 0x04, 0x0f, 0x0260
- window_template 0x00, 0x01, 0x1f, 0x09, 0x02, 0x0f, 0x02a4
- window_template 0x00, 0x01, 0x21, 0x09, 0x02, 0x0f, 0x02b6
- window_template 0x00, 0x01, 0x23, 0x09, 0x02, 0x0f, 0x02c8
- window_template 0x00, 0x01, 0x25, 0x09, 0x02, 0x0f, 0x02da
- window_template 0x00, 0x10, 0x1f, 0x01, 0x02, 0x0f, 0x02ec
- window_template 0x00, 0x0b, 0x23, 0x12, 0x04, 0x0f, 0x02ee
- null_window_template
-
- .align 2
-gUnknown_08587FA4:: @ 8587FA4
- .4byte NULL, 0xFFFF
- .2byte SPECIES_ELECTRIKE
- .byte 2
- .string "ELECTER$", 11
- .string "EZRA$", 8
- .2byte 0
- .4byte NULL, 0xFFFF
- .2byte SPECIES_TROPIUS
- .byte 0
- .string "TROPO$", 11
- .string "ALLAN$", 8
- .2byte 2
- .4byte NULL, 0xFFFF
- .2byte SPECIES_XATU
- .byte 1
- .string "TUXA$", 11
- .string "JULIET$", 8
- .2byte 0
- .4byte NULL, 0xFFFF
- .2byte SPECIES_PLUSLE
- .byte 4
- .string "PULSE$", 11
- .string "BAILY$", 8
- .2byte 3
- .4byte NULL, 0xFFFF
- .2byte SPECIES_SHUPPET
- .byte 3
- .string "SHUPUP$", 11
- .string "MELANY$", 8
- .2byte 1
- .4byte NULL, 0xFFFF
- .2byte SPECIES_ZANGOOSE
- .byte 0
- .string "GOOZAN$", 11
- .string "HANA$", 8
- .2byte 2
- .4byte NULL, 0xFFFF
- .2byte SPECIES_LOUDRED
- .byte 1
- .string "LOUDED$", 11
- .string "BRYANT$", 8
- .2byte 2
- .4byte NULL, 0xFFFF
- .2byte SPECIES_DELCATTY
- .byte 2
- .string "KITSY$", 11
- .string "OMAR$", 8
- .2byte 3
-
.align 2
gContestOpponents:: @ 85880A4
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;
diff --git a/src/contest.c b/src/contest.c
index afb1c94d7..09847f6b6 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -218,8 +218,6 @@ EWRAM_DATA u8 gUnknown_02039F5D = 0;
// IWRAM common vars.
u32 gContestRngValue;
-extern const struct BgTemplate gUnknown_08587F34[4];
-extern const struct WindowTemplate gUnknown_08587F44[];
extern const u8 *const gUnknown_0827E8DA[];
extern const u8 gText_0827D55A[];
extern const u8 gText_0827E793[];
@@ -252,7 +250,6 @@ extern const struct SpriteTemplate gSpriteTemplate_8587AD0;
extern const struct SpriteTemplate gSpriteTemplate_8587B18[];
extern void (*const gContestEffectFuncs[])(void);
extern const s8 gContestExcitementTable[][5];
-extern const struct ContestWinner gUnknown_08587FA4[];
extern const struct CompressedSpriteSheet gUnknown_08589904[];
extern const struct SpritePalette gUnknown_08589924[];
extern const struct SpriteTemplate gSpriteTemplate_858998C[];
@@ -581,6 +578,152 @@ const u16 gUnknown_08587C30[] = INCBIN_U16("graphics/unknown/unknown_587C30.gbap
#include "data/contest_text_tables.h"
+const struct BgTemplate gUnknown_08587F34[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 0x18,
+ .screenSize = 2,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x1E,
+ .screenSize = 2,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 0x1C,
+ .screenSize = 2,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 0x1A,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+const struct WindowTemplate gUnknown_08587F44[] =
+{
+ {
+ .bg = 0,
+ .tilemapLeft = 18,
+ .tilemapTop = 0,
+ .width = 12,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x200
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 18,
+ .tilemapTop = 5,
+ .width = 12,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x218
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 18,
+ .tilemapTop = 10,
+ .width = 12,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x230
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 18,
+ .tilemapTop = 15,
+ .width = 12,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x248
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 15,
+ .width = 17,
+ .height = 4,
+ .paletteNum = 0xF,
+ .baseBlock = 0x260
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 0x1F,
+ .width = 9,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x2A4
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 0x21,
+ .width = 9,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x2B6
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 0x23,
+ .width = 9,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x2C8
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 0x25,
+ .width = 9,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x2DA
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 16,
+ .tilemapTop = 0x1F,
+ .width = 1,
+ .height = 2,
+ .paletteNum = 0xF,
+ .baseBlock = 0x2EC
+ },
+ {
+ .bg = 0,
+ .tilemapLeft = 11,
+ .tilemapTop = 0x23,
+ .width = 18,
+ .height = 4,
+ .paletteNum = 0xF,
+ .baseBlock = 0x2EE
+ },
+ DUMMY_WIN_TEMPLATE
+};
+
+#include "data/contest_opponents.h"
+
static void TaskDummy1(u8 taskId)
{
}
diff --git a/src/data/contest_opponents.h b/src/data/contest_opponents.h
new file mode 100644
index 000000000..580d7916e
--- /dev/null
+++ b/src/data/contest_opponents.h
@@ -0,0 +1,80 @@
+
+#include "global.h"
+#include "contest.h"
+#include "constants/species.h"
+
+const struct ContestWinner gUnknown_08587FA4[] =
+{
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_ELECTRIKE,
+ .contestCategory = CONTEST_CATEGORY_CUTE,
+ .monName = _("ELECTER"),
+ .trainerName = _("EZRA"),
+ .contestRank = CONTEST_RANK_NORMAL
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_TROPIUS,
+ .contestCategory = CONTEST_CATEGORY_COOL,
+ .monName = _("TROPO"),
+ .trainerName = _("ALLAN"),
+ .contestRank = CONTEST_RANK_HYPER
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_XATU,
+ .contestCategory = CONTEST_CATEGORY_BEAUTY,
+ .monName = _("TUXA"),
+ .trainerName = _("JULIET"),
+ .contestRank = CONTEST_RANK_NORMAL
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_PLUSLE,
+ .contestCategory = CONTEST_CATEGORY_TOUGH,
+ .monName = _("PULSE"),
+ .trainerName = _("BAILY"),
+ .contestRank = CONTEST_RANK_MASTER
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_SHUPPET,
+ .contestCategory = CONTEST_CATEGORY_SMART,
+ .monName = _("SHUPUP"),
+ .trainerName = _("MELANY"),
+ .contestRank = CONTEST_RANK_SUPER
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_ZANGOOSE,
+ .contestCategory = CONTEST_CATEGORY_COOL,
+ .monName = _("GOOZAN"),
+ .trainerName = _("HANA"),
+ .contestRank = CONTEST_RANK_HYPER
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_LOUDRED,
+ .contestCategory = CONTEST_CATEGORY_BEAUTY,
+ .monName = _("LOUDED"),
+ .trainerName = _("BRYANT"),
+ .contestRank = CONTEST_RANK_HYPER
+ },
+ {
+ .personality = 0,
+ .trainerId = 0xFFFF,
+ .species = SPECIES_DELCATTY,
+ .contestCategory = CONTEST_CATEGORY_CUTE,
+ .monName = _("KITSY"),
+ .trainerName = _("OMAR"),
+ .contestRank = CONTEST_RANK_MASTER
+ }
+}; \ No newline at end of file