mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Move battle_bg data to C
This commit is contained in:
parent
991151f461
commit
f40fa37398
173
data/data2c.s
173
data/data2c.s
@ -8,179 +8,6 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
.2byte 0x0300, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A988:: @ 831A988
|
||||
.byte 0x00, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A990:: @ 831A990
|
||||
.byte 0x00, 0x03, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A998:: @ 831A998
|
||||
.2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A9A8:: @ 831A9A8
|
||||
.2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x0018, 0x0018, 0x8000, 0x0000
|
||||
.2byte 0x0018, 0x0018, 0x8000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A9C8:: @ 831A9C8
|
||||
.4byte gUnknown_0831A998
|
||||
.4byte gUnknown_0831A9A8
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A9D0:: @ 831A9D0
|
||||
spr_template 0x2710, 0x2710, gUnknown_0831A988, gDummySpriteAnimTable, NULL, gUnknown_0831A9C8, nullsub_17
|
||||
|
||||
.align 2
|
||||
gUnknown_0831A9E8:: @ 831A9E8
|
||||
spr_template 0x2710, 0x2710, gUnknown_0831A990, gDummySpriteAnimTable, NULL, gUnknown_0831A9C8, nullsub_17
|
||||
|
||||
.align 2
|
||||
gUnknown_0831AA00:: @ 831AA00
|
||||
obj_tiles gUnknown_08D77B0C, 0x1000, 0x2710
|
||||
|
||||
.align 2
|
||||
gBattleBgTemplates:: @ 831AA08
|
||||
.4byte 0x00000580, 0x000005c5, 0x000013e6, 0x000033ab
|
||||
|
||||
.align 2
|
||||
gUnknown_0831AA18:: @ 831AA18
|
||||
window_template 0x00, 0x02, 0x0f, 0x1a, 0x04, 0x00, 0x0090
|
||||
window_template 0x00, 0x01, 0x23, 0x0e, 0x04, 0x00, 0x01c0
|
||||
window_template 0x00, 0x11, 0x23, 0x0c, 0x04, 0x05, 0x0190
|
||||
window_template 0x00, 0x02, 0x37, 0x08, 0x02, 0x05, 0x0300
|
||||
window_template 0x00, 0x0b, 0x37, 0x08, 0x02, 0x05, 0x0310
|
||||
window_template 0x00, 0x02, 0x39, 0x08, 0x02, 0x05, 0x0320
|
||||
window_template 0x00, 0x0b, 0x39, 0x08, 0x02, 0x05, 0x0330
|
||||
window_template 0x00, 0x15, 0x37, 0x04, 0x02, 0x05, 0x0290
|
||||
window_template 0x00, 0x15, 0x39, 0x00, 0x00, 0x05, 0x0298
|
||||
window_template 0x00, 0x19, 0x37, 0x04, 0x02, 0x05, 0x0298
|
||||
window_template 0x00, 0x15, 0x39, 0x08, 0x02, 0x05, 0x02a0
|
||||
window_template 0x00, 0x15, 0x37, 0x08, 0x04, 0x05, 0x02b0
|
||||
window_template 0x00, 0x1a, 0x09, 0x03, 0x04, 0x05, 0x0100
|
||||
window_template 0x01, 0x13, 0x08, 0x0a, 0x0b, 0x05, 0x0100
|
||||
window_template 0x02, 0x12, 0x00, 0x0c, 0x03, 0x06, 0x016e
|
||||
window_template 0x01, 0x02, 0x03, 0x06, 0x02, 0x05, 0x0020
|
||||
window_template 0x02, 0x02, 0x03, 0x06, 0x02, 0x05, 0x0040
|
||||
window_template 0x01, 0x02, 0x02, 0x06, 0x02, 0x05, 0x0020
|
||||
window_template 0x02, 0x02, 0x02, 0x06, 0x02, 0x05, 0x0040
|
||||
window_template 0x01, 0x02, 0x06, 0x06, 0x02, 0x05, 0x0060
|
||||
window_template 0x02, 0x02, 0x06, 0x06, 0x02, 0x05, 0x0080
|
||||
window_template 0x00, 0x0c, 0x02, 0x06, 0x02, 0x00, 0x00a0
|
||||
window_template 0x00, 0x04, 0x02, 0x07, 0x02, 0x00, 0x00a0
|
||||
window_template 0x00, 0x13, 0x02, 0x07, 0x02, 0x00, 0x00b0
|
||||
null_window_template
|
||||
|
||||
.align 2
|
||||
gUnknown_0831AAE0:: @ 831AAE0
|
||||
window_template 0x00, 0x02, 0x0f, 0x1a, 0x04, 0x00, 0x0090
|
||||
window_template 0x00, 0x01, 0x23, 0x0e, 0x04, 0x00, 0x01c0
|
||||
window_template 0x00, 0x11, 0x23, 0x0c, 0x04, 0x05, 0x0190
|
||||
window_template 0x00, 0x02, 0x37, 0x08, 0x02, 0x05, 0x0300
|
||||
window_template 0x00, 0x0b, 0x37, 0x08, 0x02, 0x05, 0x0310
|
||||
window_template 0x00, 0x02, 0x39, 0x08, 0x02, 0x05, 0x0320
|
||||
window_template 0x00, 0x0b, 0x39, 0x08, 0x02, 0x05, 0x0330
|
||||
window_template 0x00, 0x15, 0x37, 0x04, 0x02, 0x05, 0x0290
|
||||
window_template 0x00, 0x15, 0x39, 0x00, 0x00, 0x05, 0x0298
|
||||
window_template 0x00, 0x19, 0x37, 0x04, 0x02, 0x05, 0x0298
|
||||
window_template 0x00, 0x15, 0x39, 0x08, 0x02, 0x05, 0x02a0
|
||||
window_template 0x00, 0x15, 0x37, 0x08, 0x04, 0x05, 0x02b0
|
||||
window_template 0x00, 0x1a, 0x09, 0x03, 0x04, 0x05, 0x0100
|
||||
window_template 0x01, 0x13, 0x08, 0x0a, 0x0b, 0x05, 0x0100
|
||||
window_template 0x02, 0x12, 0x00, 0x0c, 0x03, 0x06, 0x016e
|
||||
window_template 0x00, 0x06, 0x01, 0x08, 0x02, 0x05, 0x0100
|
||||
window_template 0x00, 0x0e, 0x01, 0x02, 0x02, 0x05, 0x0110
|
||||
window_template 0x00, 0x10, 0x01, 0x08, 0x02, 0x05, 0x0114
|
||||
window_template 0x00, 0x0c, 0x04, 0x06, 0x02, 0x05, 0x0124
|
||||
window_template 0x00, 0x0c, 0x06, 0x06, 0x02, 0x05, 0x0130
|
||||
window_template 0x00, 0x0c, 0x08, 0x06, 0x02, 0x05, 0x013c
|
||||
window_template 0x00, 0x08, 0x0b, 0x0e, 0x02, 0x05, 0x0148
|
||||
window_template 0x00, 0x02, 0x0f, 0x1a, 0x04, 0x07, 0x0090
|
||||
null_window_template
|
||||
|
||||
.align 2
|
||||
gBattleWindowTemplates:: @ 831ABA0
|
||||
.4byte gUnknown_0831AA18
|
||||
.4byte gUnknown_0831AAE0
|
||||
|
||||
.align 2
|
||||
gBattleTerrainTable:: @ 831ABA8
|
||||
@ tall_grass
|
||||
.4byte gBattleTerrainTiles_TallGrass
|
||||
.4byte gBattleTerrainTilemap_TallGrass
|
||||
.4byte gBattleTerrainAnimTiles_TallGrass
|
||||
.4byte gBattleTerrainAnimTilemap_TallGrass
|
||||
.4byte gBattleTerrainPalette_TallGrass
|
||||
|
||||
@ long_grass
|
||||
.4byte gBattleTerrainTiles_LongGrass
|
||||
.4byte gBattleTerrainTilemap_LongGrass
|
||||
.4byte gBattleTerrainAnimTiles_LongGrass
|
||||
.4byte gBattleTerrainAnimTilemap_LongGrass
|
||||
.4byte gBattleTerrainPalette_LongGrass
|
||||
|
||||
@ sand
|
||||
.4byte gBattleTerrainTiles_Sand
|
||||
.4byte gBattleTerrainTilemap_Sand
|
||||
.4byte gBattleTerrainAnimTiles_Sand
|
||||
.4byte gBattleTerrainAnimTilemap_Sand
|
||||
.4byte gBattleTerrainPalette_Sand
|
||||
|
||||
@ underwater
|
||||
.4byte gBattleTerrainTiles_Underwater
|
||||
.4byte gBattleTerrainTilemap_Underwater
|
||||
.4byte gBattleTerrainAnimTiles_Underwater
|
||||
.4byte gBattleTerrainAnimTilemap_Underwater
|
||||
.4byte gBattleTerrainPalette_Underwater
|
||||
|
||||
@ water
|
||||
.4byte gBattleTerrainTiles_Water
|
||||
.4byte gBattleTerrainTilemap_Water
|
||||
.4byte gBattleTerrainAnimTiles_Water
|
||||
.4byte gBattleTerrainAnimTilemap_Water
|
||||
.4byte gBattleTerrainPalette_Water
|
||||
|
||||
@ pond_water
|
||||
.4byte gBattleTerrainTiles_PondWater
|
||||
.4byte gBattleTerrainTilemap_PondWater
|
||||
.4byte gBattleTerrainAnimTiles_PondWater
|
||||
.4byte gBattleTerrainAnimTilemap_PondWater
|
||||
.4byte gBattleTerrainPalette_PondWater
|
||||
|
||||
@ rock
|
||||
.4byte gBattleTerrainTiles_Rock
|
||||
.4byte gBattleTerrainTilemap_Rock
|
||||
.4byte gBattleTerrainAnimTiles_Rock
|
||||
.4byte gBattleTerrainAnimTilemap_Rock
|
||||
.4byte gBattleTerrainPalette_Rock
|
||||
|
||||
@ cave
|
||||
.4byte gBattleTerrainTiles_Cave
|
||||
.4byte gBattleTerrainTilemap_Cave
|
||||
.4byte gBattleTerrainAnimTiles_Cave
|
||||
.4byte gBattleTerrainAnimTilemap_Cave
|
||||
.4byte gBattleTerrainPalette_Cave
|
||||
|
||||
@ building
|
||||
.4byte gBattleTerrainTiles_Building
|
||||
.4byte gBattleTerrainTilemap_Building
|
||||
.4byte gBattleTerrainAnimTiles_Building
|
||||
.4byte gBattleTerrainAnimTilemap_Building
|
||||
.4byte gBattleTerrainPalette_Building
|
||||
|
||||
@ plain
|
||||
.4byte gBattleTerrainTiles_Building
|
||||
.4byte gBattleTerrainTilemap_Building
|
||||
.4byte gBattleTerrainAnimTiles_Building
|
||||
.4byte gBattleTerrainAnimTilemap_Building
|
||||
.4byte gBattleTerrainPalette_Plain
|
||||
|
||||
.align 2
|
||||
gUnknown_0831AC70:: @ 831AC70
|
||||
.4byte REG_BG3HOFS
|
||||
|
@ -35,7 +35,7 @@ void CB2_QuitRecordedBattle(void);
|
||||
void sub_8038528(struct Sprite* sprite);
|
||||
void sub_8038A04(void); // unused
|
||||
void VBlankCB_Battle(void);
|
||||
void nullsub_17(void);
|
||||
void nullsub_17(struct Sprite *sprite);
|
||||
void sub_8038B74(struct Sprite *sprite);
|
||||
void sub_8038D64(void);
|
||||
u32 sub_80391E0(u8 arrayId, u8 caseId);
|
||||
|
@ -382,6 +382,7 @@ SECTIONS {
|
||||
src/rom_8034C54.o(.rodata);
|
||||
src/data2b.o(.rodata);
|
||||
src/battle_data.o(.rodata);
|
||||
src/battle_bg.o(.rodata);
|
||||
data/data2c.o(.rodata);
|
||||
src/battle_main.o(.rodata);
|
||||
src/battle_util.o(.rodata);
|
||||
|
679
src/battle_bg.c
679
src/battle_bg.c
@ -1,24 +1,26 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "graphics.h"
|
||||
#include "decompress.h"
|
||||
#include "bg.h"
|
||||
#include "palette.h"
|
||||
#include "main.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "link.h"
|
||||
#include "battle_bg.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_message.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "sound.h"
|
||||
#include "constants/songs.h"
|
||||
#include "window.h"
|
||||
#include "text_window.h"
|
||||
#include "menu.h"
|
||||
#include "battle_setup.h"
|
||||
#include "bg.h"
|
||||
#include "decompress.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "graphics.h"
|
||||
#include "link.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "palette.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
#include "text_window.h"
|
||||
#include "trig.h"
|
||||
#include "window.h"
|
||||
#include "constants/map_types.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
struct BattleBackground
|
||||
{
|
||||
@ -29,13 +31,6 @@ struct BattleBackground
|
||||
const void *palette;
|
||||
};
|
||||
|
||||
extern const struct SpriteTemplate gUnknown_0831A9D0;
|
||||
extern const struct SpriteTemplate gUnknown_0831A9E8;
|
||||
extern const struct CompressedSpriteSheet gUnknown_0831AA00;
|
||||
extern const struct BgTemplate gBattleBgTemplates[4];
|
||||
extern const struct WindowTemplate *const gBattleWindowTemplates[];
|
||||
extern const struct BattleBackground gBattleTerrainTable[];
|
||||
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
@ -43,6 +38,644 @@ extern u16 gBattle_BG2_Y;
|
||||
|
||||
extern u8 GetCurrentMapBattleScene(void);
|
||||
|
||||
// .rodata
|
||||
static const u16 sUnrefArray[] = {0x0300, 0x0000}; //OamData?
|
||||
|
||||
static const struct OamData gUnknown_0831A988 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 3,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 3,
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_0831A990 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 3,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 3,
|
||||
.tileNum = 64,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_0831A998[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0x0080, 0x0080, 0x00, 0x00),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_0831A9A8[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0x0080, 0x0080, 0x00, 0x00),
|
||||
AFFINEANIMCMD_FRAME(0x0018, 0x0018, 0x00, 0x80),
|
||||
AFFINEANIMCMD_FRAME(0x0018, 0x0018, 0x00, 0x80),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd * const gUnknown_0831A9C8[] =
|
||||
{
|
||||
gUnknown_0831A998,
|
||||
gUnknown_0831A9A8,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0831A9D0 =
|
||||
{
|
||||
.tileTag = 0x2710,
|
||||
.paletteTag = 0x2710,
|
||||
.oam = &gUnknown_0831A988,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_0831A9C8,
|
||||
.callback = nullsub_17
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0831A9E8 =
|
||||
{
|
||||
.tileTag = 0x2710,
|
||||
.paletteTag = 0x2710,
|
||||
.oam = &gUnknown_0831A990,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_0831A9C8,
|
||||
.callback = nullsub_17
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_0831AA00 =
|
||||
{
|
||||
gUnknown_08D77B0C, 0x1000, 0x2710
|
||||
};
|
||||
|
||||
const struct BgTemplate gBattleBgTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 24,
|
||||
.screenSize = 2,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 1,
|
||||
.mapBaseIndex = 28,
|
||||
.screenSize = 2,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 1,
|
||||
.mapBaseIndex = 30,
|
||||
.screenSize = 1,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 26,
|
||||
.screenSize = 1,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0
|
||||
},
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0831AA18[] =
|
||||
{
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 35,
|
||||
.width = 14,
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x01c0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 17,
|
||||
.tilemapTop = 35,
|
||||
.width = 12,
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0190,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 55,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0300,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 55,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0310,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 57,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0320,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 57,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0330,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
.width = 4,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0290,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 55,
|
||||
.width = 4,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02a0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
.width = 8,
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02b0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 26,
|
||||
.tilemapTop = 9,
|
||||
.width = 3,
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 8,
|
||||
.width = 10,
|
||||
.height = 11,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
.priority = 2,
|
||||
.tilemapLeft = 18,
|
||||
.tilemapTop = 0,
|
||||
.width = 12,
|
||||
.height = 3,
|
||||
.paletteNum = 6,
|
||||
.baseBlock = 0x016e,
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 3,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0020,
|
||||
},
|
||||
{
|
||||
.priority = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 3,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0040,
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 2,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0020,
|
||||
},
|
||||
{
|
||||
.priority = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 2,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0040,
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 6,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0060,
|
||||
},
|
||||
{
|
||||
.priority = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 6,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0080,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 2,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x00a0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 4,
|
||||
.tilemapTop = 2,
|
||||
.width = 7,
|
||||
.height = 2,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x00a0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 2,
|
||||
.width = 7,
|
||||
.height = 2,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x00b0,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_0831AAE0[] =
|
||||
{
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 35,
|
||||
.width = 14,
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x01c0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 17,
|
||||
.tilemapTop = 35,
|
||||
.width = 12,
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0190,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 55,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0300,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 55,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0310,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 57,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0320,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 57,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0330,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
.width = 4,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0290,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 55,
|
||||
.width = 4,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02a0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
.width = 8,
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02b0,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 26,
|
||||
.tilemapTop = 9,
|
||||
.width = 3,
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
.priority = 1,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 8,
|
||||
.width = 10,
|
||||
.height = 11,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
.priority = 2,
|
||||
.tilemapLeft = 18,
|
||||
.tilemapTop = 0,
|
||||
.width = 12,
|
||||
.height = 3,
|
||||
.paletteNum = 6,
|
||||
.baseBlock = 0x016e,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 1,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 14,
|
||||
.tilemapTop = 1,
|
||||
.width = 2,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0110,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 16,
|
||||
.tilemapTop = 1,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0114,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 4,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0124,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 6,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0130,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 8,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x013c,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 8,
|
||||
.tilemapTop = 11,
|
||||
.width = 14,
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0148,
|
||||
},
|
||||
{
|
||||
.priority = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = 7,
|
||||
.baseBlock = 0x0090,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
const struct WindowTemplate * const gBattleWindowTemplates[] =
|
||||
{
|
||||
gUnknown_0831AA18,
|
||||
gUnknown_0831AAE0,
|
||||
};
|
||||
|
||||
static const struct BattleBackground gBattleTerrainTable[] =
|
||||
{
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_TallGrass,
|
||||
.tilemap = gBattleTerrainTilemap_TallGrass,
|
||||
.entryTileset = gBattleTerrainAnimTiles_TallGrass,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_TallGrass,
|
||||
.palette = gBattleTerrainPalette_TallGrass,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_LongGrass,
|
||||
.tilemap = gBattleTerrainTilemap_LongGrass,
|
||||
.entryTileset = gBattleTerrainAnimTiles_LongGrass,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_LongGrass,
|
||||
.palette = gBattleTerrainPalette_LongGrass,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_Sand,
|
||||
.tilemap = gBattleTerrainTilemap_Sand,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Sand,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Sand,
|
||||
.palette = gBattleTerrainPalette_Sand,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_Underwater,
|
||||
.tilemap = gBattleTerrainTilemap_Underwater,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Underwater,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Underwater,
|
||||
.palette = gBattleTerrainPalette_Underwater,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_Water,
|
||||
.tilemap = gBattleTerrainTilemap_Water,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Water,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Water,
|
||||
.palette = gBattleTerrainPalette_Water,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_PondWater,
|
||||
.tilemap = gBattleTerrainTilemap_PondWater,
|
||||
.entryTileset = gBattleTerrainAnimTiles_PondWater,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_PondWater,
|
||||
.palette = gBattleTerrainPalette_PondWater,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_Rock,
|
||||
.tilemap = gBattleTerrainTilemap_Rock,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Rock,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Rock,
|
||||
.palette = gBattleTerrainPalette_Rock,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_Cave,
|
||||
.tilemap = gBattleTerrainTilemap_Cave,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Cave,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Cave,
|
||||
.palette = gBattleTerrainPalette_Cave,
|
||||
},
|
||||
{
|
||||
.tileset = gBattleTerrainTiles_Building,
|
||||
.tilemap = gBattleTerrainTilemap_Building,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Building,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Building,
|
||||
.palette = gBattleTerrainPalette_Building,
|
||||
},
|
||||
{// plain
|
||||
.tileset = gBattleTerrainTiles_Building,
|
||||
.tilemap = gBattleTerrainTilemap_Building,
|
||||
.entryTileset = gBattleTerrainAnimTiles_Building,
|
||||
.entryTilemap = gBattleTerrainAnimTilemap_Building,
|
||||
.palette = gBattleTerrainPalette_Plain,
|
||||
},
|
||||
};
|
||||
|
||||
// .text
|
||||
void BattleInitBgsAndWindows(void)
|
||||
{
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
|
@ -2055,7 +2055,7 @@ void VBlankCB_Battle(void)
|
||||
ScanlineEffect_InitHBlankDmaTransfer();
|
||||
}
|
||||
|
||||
void nullsub_17(void)
|
||||
void nullsub_17(struct Sprite *sprite)
|
||||
{
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user