pokeemerald/src/data.c

442 lines
14 KiB
C
Raw Normal View History

2018-08-22 15:34:36 +02:00
#include "global.h"
#include "alloc.h"
2019-04-04 23:08:53 +02:00
#include "battle.h"
#include "data.h"
#include "graphics.h"
#include "constants/items.h"
#include "constants/moves.h"
2018-12-03 16:10:41 +01:00
#include "constants/species.h"
2019-04-04 23:08:53 +02:00
#include "constants/trainers.h"
#include "constants/battle_ai.h"
2018-08-22 15:34:36 +02:00
2018-09-11 02:35:47 +02:00
const u16 gUnknown_082FF1D8[] = INCBIN_U16("graphics/link/minigame_digits.gbapal");
2018-10-21 09:24:57 +02:00
const u32 gUnknown_082FF1F8[] = INCBIN_U32("graphics/link/minigame_digits.4bpp.lz");
2019-04-04 23:08:53 +02:00
// unused
2018-10-21 09:24:57 +02:00
const u32 gUnknown_082FF2B8[] = INCBIN_U32("graphics/link/minigame_digits2.4bpp.lz");
2018-09-11 02:35:47 +02:00
const struct SpriteFrameImage gUnknown_082FF3A8[] =
{
gHeap + 0x8000, 0x800,
gHeap + 0x8800, 0x800,
gHeap + 0x9000, 0x800,
gHeap + 0x9800, 0x800,
};
const struct SpriteFrameImage gUnknown_082FF3C8[] =
{
gHeap + 0xA000, 0x800,
gHeap + 0xA800, 0x800,
gHeap + 0xB000, 0x800,
gHeap + 0xB800, 0x800,
};
const struct SpriteFrameImage gUnknown_082FF3E8[] =
{
gHeap + 0xC000, 0x800,
gHeap + 0xC800, 0x800,
gHeap + 0xD000, 0x800,
gHeap + 0xD800, 0x800,
};
const struct SpriteFrameImage gUnknown_082FF408[] =
{
gHeap + 0xE000, 0x800,
gHeap + 0xE800, 0x800,
gHeap + 0xF000, 0x800,
gHeap + 0xF800, 0x800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_Brendan[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_Brendan, 0x0800,
gTrainerBackPic_Brendan + 0x0800, 0x0800,
gTrainerBackPic_Brendan + 0x1000, 0x0800,
gTrainerBackPic_Brendan + 0x1800, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_May[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_May, 0x0800,
gTrainerBackPic_May + 0x0800, 0x0800,
gTrainerBackPic_May + 0x1000, 0x0800,
gTrainerBackPic_May + 0x1800, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_Red[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_Red, 0x0800,
gTrainerBackPic_Red + 0x0800, 0x0800,
gTrainerBackPic_Red + 0x1000, 0x0800,
gTrainerBackPic_Red + 0x1800, 0x0800,
gTrainerBackPic_Red + 0x2000, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_Leaf[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_Leaf, 0x0800,
gTrainerBackPic_Leaf + 0x0800, 0x0800,
gTrainerBackPic_Leaf + 0x1000, 0x0800,
gTrainerBackPic_Leaf + 0x1800, 0x0800,
gTrainerBackPic_Leaf + 0x2000, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireBrendan[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_RubySapphireBrendan, 0x0800,
gTrainerBackPic_RubySapphireBrendan + 0x0800, 0x0800,
gTrainerBackPic_RubySapphireBrendan + 0x1000, 0x0800,
gTrainerBackPic_RubySapphireBrendan + 0x1800, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireMay[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_RubySapphireMay, 0x0800,
gTrainerBackPic_RubySapphireMay + 0x0800, 0x0800,
gTrainerBackPic_RubySapphireMay + 0x1000, 0x0800,
gTrainerBackPic_RubySapphireMay + 0x1800, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_Wally[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_Wally, 0x0800,
gTrainerBackPic_Wally + 0x0800, 0x0800,
gTrainerBackPic_Wally + 0x1000, 0x0800,
gTrainerBackPic_Wally + 0x1800, 0x0800,
};
2019-02-02 22:53:47 +01:00
const struct SpriteFrameImage gTrainerBackPicTable_Steven[] =
2018-09-11 02:35:47 +02:00
{
gTrainerBackPic_Steven, 0x0800,
gTrainerBackPic_Steven + 0x0800, 0x0800,
gTrainerBackPic_Steven + 0x1000, 0x0800,
gTrainerBackPic_Steven + 0x1800, 0x0800,
};
2019-04-04 23:08:53 +02:00
static const union AnimCmd sAnim_GeneralFrame0[] =
2018-09-11 02:35:47 +02:00
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AnimCmd sAnim_GeneralFrame3[] =
2018-09-11 02:35:47 +02:00
{
ANIMCMD_FRAME(3, 0),
ANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF548[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0100, 0x0100, 0x00, 0x00),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF558[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0xff00, 0x0100, 0x00, 0x00),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF568[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0028, 0x0028, 0x00, 0x00),
AFFINEANIMCMD_FRAME(0x0012, 0x0012, 0x00, 0x0c),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF580[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0xfffe, 0xfffe, 0x00, 0x12),
AFFINEANIMCMD_FRAME(0xfff0, 0xfff0, 0x00, 0x0f),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF598[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x00a0, 0x0100, 0x00, 0x00),
AFFINEANIMCMD_FRAME(0x0004, 0x0000, 0x00, 0x08),
AFFINEANIMCMD_FRAME(0xfffc, 0x0000, 0x00, 0x08),
AFFINEANIMCMD_JUMP(1),
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF5B8[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0002, 0x0002, 0x00, 0x14),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF5C8[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0xfffe, 0xfffe, 0x00, 0x14),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF5D8[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0100, 0x0100, 0x00, 0000),
AFFINEANIMCMD_FRAME(0xfff0, 0xfff0, 0x00, 0x09),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF5F0[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0004, 0x0004, 0x00, 0x3f),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF600[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfd, 0x05),
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x03, 0x05),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
const union AffineAnimCmd *const gUnknown_082FF618[] =
2018-09-11 02:35:47 +02:00
{
gUnknown_082FF548,
gUnknown_082FF568,
gUnknown_082FF580,
gUnknown_082FF598,
gUnknown_082FF5B8,
gUnknown_082FF5C8,
gUnknown_082FF5F0,
gUnknown_082FF600,
gUnknown_082FF5D8,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF63C[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0xfffc, 0xfffc, 0x04, 0x3f),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF64C[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x03, 0x05),
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfd, 0x05),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF664[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfb, 0x14),
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x00, 0x14),
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x05, 0x14),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
static const union AffineAnimCmd gUnknown_082FF684[] =
2018-09-11 02:35:47 +02:00
{
AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x09, 0x6e),
AFFINEANIMCMD_END,
};
2019-04-04 23:08:53 +02:00
const union AffineAnimCmd *const gUnknown_082FF694[] =
2018-09-11 02:35:47 +02:00
{
gUnknown_082FF548,
gUnknown_082FF568,
gUnknown_082FF580,
gUnknown_082FF598,
gUnknown_082FF5B8,
gUnknown_082FF5C8,
gUnknown_082FF63C,
gUnknown_082FF64C,
gUnknown_082FF664,
gUnknown_082FF5D8,
gUnknown_082FF684,
};
2019-04-04 23:08:53 +02:00
const union AffineAnimCmd *const gUnknown_082FF6C0[] =
2018-09-11 02:35:47 +02:00
{
gUnknown_082FF558,
gUnknown_082FF568,
gUnknown_082FF580,
gUnknown_082FF598,
gUnknown_082FF5B8,
gUnknown_082FF5C8,
gUnknown_082FF63C,
gUnknown_082FF64C,
gUnknown_082FF664,
gUnknown_082FF5D8,
gUnknown_082FF684,
};
2018-08-22 15:34:36 +02:00
2019-04-04 23:08:53 +02:00
static const union AnimCmd gUnknown_082FF6EC[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_082FF6F4[] =
{
ANIMCMD_FRAME(1, 0),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_082FF6FC[] =
{
ANIMCMD_FRAME(2, 0),
ANIMCMD_END,
};
static const union AnimCmd gUnknown_082FF704[] =
{
ANIMCMD_FRAME(3, 0),
ANIMCMD_END,
};
2019-04-04 23:53:06 +02:00
const union AnimCmd *const gUnknown_082FF70C[] =
2019-04-04 23:08:53 +02:00
{
gUnknown_082FF6EC,
gUnknown_082FF6F4,
gUnknown_082FF6FC,
gUnknown_082FF704,
};
#define SPECIES_SPRITE(species, sprite) [SPECIES_##species] = {sprite, 0x800, SPECIES_##species}
#define SPECIES_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species}
#define SPECIES_SHINY_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species + SPECIES_SHINY_TAG}
#define TRAINER_SPRITE(trainerPic, sprite, size) [TRAINER_PIC_##trainerPic] = {sprite, size, TRAINER_PIC_##trainerPic}
#define TRAINER_PAL(trainerPic, pal) [TRAINER_PIC_##trainerPic] = {pal, TRAINER_PIC_##trainerPic}
#define TRAINER_BACK_PAL(trainerPic, pal) [TRAINER_BACK_PIC_##trainerPic] = {pal, TRAINER_BACK_PIC_##trainerPic}
2018-08-27 01:26:54 +02:00
#include "data/pokemon_graphics/unknown_anims.h"
#include "data/pokemon_graphics/front_pic_coordinates.h"
#include "data/pokemon_graphics/still_front_pic_table.h"
#include "data/pokemon_graphics/back_pic_coordinates.h"
2018-08-23 00:03:44 +02:00
#include "data/pokemon_graphics/back_pic_table.h"
#include "data/pokemon_graphics/palette_table.h"
#include "data/pokemon_graphics/shiny_palette_table.h"
#include "data/trainer_graphics/front_pic_anims.h"
#include "data/trainer_graphics/front_pic_tables.h"
2018-08-22 22:41:34 +02:00
#include "data/trainer_graphics/back_pic_anims.h"
2018-08-22 15:34:36 +02:00
#include "data/trainer_graphics/back_pic_tables.h"
#include "data/pokemon_graphics/enemy_mon_elevation.h"
2019-04-04 23:08:53 +02:00
#include "data/pokemon_graphics/front_pic_anims.h"
2018-08-22 15:34:36 +02:00
#include "data/pokemon_graphics/front_pic_table.h"
2019-04-04 23:08:53 +02:00
// unused
const u32 gUnknown830AF4C[] =
2018-08-22 15:34:36 +02:00
{
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000088, 0x00000888, 0x00000888, 0x00000886,
0x00000888, 0x00000886, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000886, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000886, 0x00000886,
0x00000888, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000888, 0x00000886, 0x00000888,
0x00000888, 0x00000888, 0x00000886, 0x00000886,
0x00000888, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000886, 0x00000886, 0x00000088,
0x00000886, 0x00000886, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000886, 0x00000888, 0x00000088, 0x00000088,
0x00000888, 0x00000888, 0x00000888, 0x00000886,
0x00000888, 0x00000888, 0x00000888, 0x00000886,
0x00000886, 0x00000886, 0x00000886, 0x00000886,
0x00000886, 0x00000886, 0x00000888, 0x00000888,
0x00000886, 0x00000886, 0x00000886, 0x00000886,
0x00000886, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000886, 0x00000886, 0x00000888,
0x00000886, 0x00000886, 0x00000888, 0x00000888,
0x00000088, 0x00000088, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000886, 0x00000886, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000088, 0x00000886,
0x00000888, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000888, 0x00000886, 0x00000888,
0x00000088, 0x00000088, 0x00000886, 0x00000886,
0x00000088, 0x00000088, 0x00000888, 0x00000886,
0x00000886, 0x00000888, 0x00000888, 0x00000088,
0x00000888, 0x00000886, 0x00000886, 0x00000888,
0x00000886, 0x00000888, 0x00000888, 0x00000886,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000088, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000088, 0x00000888, 0x00000888, 0x00000886,
0x00000886, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000886,
0x00000888, 0x00000886, 0x00000088, 0x00000088,
0x00000088, 0x00000888, 0x00000088, 0x00000888,
0x00000888, 0x00000088, 0x00000088, 0x00000888,
0x00000886, 0x00000888, 0x00000886, 0x00000886,
0x00000886, 0x00000888, 0x00000888, 0x00000888,
0x00000088, 0x00000888, 0x00000888, 0x00000888,
0x00000088, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000088, 0x00000088,
0x00000886, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000088, 0x00000888,
0x00000886, 0x00000888, 0x00000088, 0x00000088,
0x00000888, 0x00000888, 0x00000088, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000088,
0x00000888, 0x00000888, 0x00000088, 0x00000088,
0x00000088, 0x00000888, 0x00000088, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000886, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000886, 0x00000886, 0x00000886,
0x00000088, 0x00000088, 0x00000088, 0x00000886,
0x00000088, 0x00000886, 0x00000886, 0x00000886,
0x00000088, 0x00000886, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000886,
0x00000886, 0x00000886, 0x00000888, 0x00000888,
0x00000886, 0x00000886, 0x00000886, 0x00000886,
0x00000088, 0x00000088, 0x00000886, 0x00000886,
0x00001882, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000886, 0x00000886, 0x00000886,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000886, 0x00000088, 0x00000886, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000886, 0x00000886,
0x00000088, 0x00000088, 0x00000088, 0x00000886,
0x00000886, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000886, 0x00000088,
0x00000088, 0x00000886, 0x00000886, 0x00000886,
0x00000886, 0x00000886, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000886,
0x00000886, 0x00000886, 0x00000886, 0x00000088,
0x00000886, 0x00000088, 0x00000886, 0x00000886,
0x00000886, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000886, 0x00000886,
0x00000886, 0x00000888, 0x00000886, 0x00000886,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000886, 0x00000886, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000088, 0x00000088, 0x00000088,
0x00000088, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
0x00000888, 0x00000888, 0x00000888, 0x00000888,
};
2019-04-04 23:08:53 +02:00
#include "data/trainer_parties.h"
#include "data/text/trainer_class_names.h"
#include "data/trainers.h"
#include "data/text/species_names.h"
#include "data/text/move_names.h"