finish src metatile labels

This commit is contained in:
garak 2019-06-11 23:19:25 -04:00 committed by huderlem
parent 9f8a30e4e7
commit fbbc2b1d8b
4 changed files with 130 additions and 39 deletions

View File

@ -15,6 +15,7 @@
#define METATILE_General_TallGrass_TreeRight 0x1C7
#define METATILE_General_Grass_TreeLeft 0x1CE
#define METATILE_General_Grass_TreeRight 0x1CF
#define METATILE_General_SandPit_Center 0x121
// gTileset_Building
#define METATILE_Building_PC_Off 0x004
@ -135,5 +136,58 @@
#define METATILE_Lavaridge_NormalGrass 0x206
#define METATILE_Lavaridge_AshGrass 0x207
#define METATILE_Lavaridge_LavaField 0x271
// gTileset_PokemonCenter
#define METATILE_PokemonCenter_Elevator1F_Tile0_Frame0 0x280
#define METATILE_PokemonCenter_Elevator1F_Tile0_Frame1 0x282
#define METATILE_PokemonCenter_Elevator1F_Tile0_Frame2 0x284
#define METATILE_PokemonCenter_Elevator1F_Tile1_Frame0 0x281
#define METATILE_PokemonCenter_Elevator1F_Tile1_Frame1 0x283
#define METATILE_PokemonCenter_Elevator1F_Tile1_Frame2 0x285
#define METATILE_PokemonCenter_Elevator1F_Tile2_Frame0 0x288
#define METATILE_PokemonCenter_Elevator1F_Tile2_Frame1 0x28A
#define METATILE_PokemonCenter_Elevator1F_Tile2_Frame2 0x28C
#define METATILE_PokemonCenter_Elevator1F_Tile3_Frame0 0x289
#define METATILE_PokemonCenter_Elevator1F_Tile3_Frame1 0x28B
#define METATILE_PokemonCenter_Elevator1F_Tile3_Frame2 0x28D
#define METATILE_PokemonCenter_Elevator2F_Tile0_Frame0 0x2A0
#define METATILE_PokemonCenter_Elevator2F_Tile0_Frame1 0x2A2
#define METATILE_PokemonCenter_Elevator2F_Tile0_Frame2 0x2A4
#define METATILE_PokemonCenter_Elevator2F_Tile1_Frame0 0x2A1
#define METATILE_PokemonCenter_Elevator2F_Tile1_Frame1 0x2A3
#define METATILE_PokemonCenter_Elevator2F_Tile1_Frame2 0x2A5
#define METATILE_PokemonCenter_Elevator2F_Tile2_Frame0 0x2A8
#define METATILE_PokemonCenter_Elevator2F_Tile2_Frame1 0x2AA
#define METATILE_PokemonCenter_Elevator2F_Tile2_Frame2 0x2AC
// gTileset_Mauville
#define METATILE_Mauville_DeepSand_Center 0x251
#define METATILE_Mauville_DeepSand_BottomMid 0x259
#endif // GUARD_METATILE_LABELS_H

View File

@ -4,6 +4,7 @@
#include "fieldmap.h"
#include "fldeff.h"
#include "task.h"
#include "constants/metatile_labels.h"
static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0;
@ -53,13 +54,47 @@ static void sub_80E12E8(u8 taskId, const s16 *list, u16 isImpassableFlag)
}
}
static const u16 gUnknown_08589ABA[] = {0x284, 0x282, 0x280};
static const u16 gUnknown_08589AC0[] = {0x285, 0x283, 0x281};
static const u16 gUnknown_08589AC6[] = {0x28C, 0x28A, 0x288};
static const u16 gUnknown_08589ACC[] = {0x28D, 0x28B, 0x289};
static const u16 gUnknown_08589AD2[] = {0x2A0, 0x2A2, 0x2A4};
static const u16 gUnknown_08589AD8[] = {0x2A1, 0x2A3, 0x2A5};
static const u16 gUnknown_08589ADE[] = {0x2A8, 0x2AA, 0x2AC};
static const u16 sElevatorMetatiles_1F_0[] = {
METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame2),
METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame1),
METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame0)
};
static const u16 sElevatorMetatiles_1F_1[] = {
METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame2),
METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame1),
METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame0)
};
static const u16 sElevatorMetatiles_1F_2[] = {
METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame2),
METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame1),
METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame0)
};
static const u16 sElevatorMetatiles_1F_3[] = {
METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame2),
METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame1),
METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame0)
};
static const u16 sElevatorMetatiles_2F_0[] = {
METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame0),
METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame1),
METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame2)
};
static const u16 sElevatorMetatiles_2F_1[] = {
METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame0),
METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame1),
METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame2)
};
static const u16 sElevatorMetatiles_2F_2[] = {
METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame0),
METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame1),
METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame2)
};
static void sub_80E1444(u8 taskId)
{
@ -70,25 +105,25 @@ static void sub_80E1444(u8 taskId)
switch (data[0])
{
case 0:
sub_80E12E8(taskId, gUnknown_08589ABA, 0);
sub_80E12E8(taskId, sElevatorMetatiles_1F_0, 0);
break;
case 1:
sub_80E12E8(taskId, gUnknown_08589AC0, 0);
sub_80E12E8(taskId, sElevatorMetatiles_1F_1, 0);
break;
case 2:
sub_80E12E8(taskId, gUnknown_08589AC6, METATILE_COLLISION_MASK);
sub_80E12E8(taskId, sElevatorMetatiles_1F_2, METATILE_COLLISION_MASK);
break;
case 3:
sub_80E12E8(taskId, gUnknown_08589ACC, 0);
sub_80E12E8(taskId, sElevatorMetatiles_1F_3, 0);
break;
case 4:
sub_80E12E8(taskId, gUnknown_08589AD2, METATILE_COLLISION_MASK);
sub_80E12E8(taskId, sElevatorMetatiles_2F_0, METATILE_COLLISION_MASK);
break;
case 5:
sub_80E12E8(taskId, gUnknown_08589AD8, 0);
sub_80E12E8(taskId, sElevatorMetatiles_2F_1, 0);
break;
case 6:
sub_80E12E8(taskId, gUnknown_08589ADE, 0);
sub_80E12E8(taskId, sElevatorMetatiles_2F_2, 0);
break;
}

View File

@ -22,6 +22,7 @@
#include "constants/metatile_behaviors.h"
#include "constants/songs.h"
#include "constants/vars.h"
#include "constants/metatile_labels.h"
EWRAM_DATA struct MapPosition gPlayerFacingPosition = {0};
@ -800,16 +801,16 @@ static void Task_SecretBasePCTurnOn(u8 taskId)
{
case 4:
case 12:
MapGridSetMetatileIdAt(data[0], data[1], 548);
MapGridSetMetatileIdAt(data[0], data[1], 0x224);
CurrentMapDrawMetatileAt(data[0], data[1]);
break;
case 8:
case 16:
MapGridSetMetatileIdAt(data[0], data[1], 544);
MapGridSetMetatileIdAt(data[0], data[1], 0x220);
CurrentMapDrawMetatileAt(data[0], data[1]);
break;
case 20:
MapGridSetMetatileIdAt(data[0], data[1], 548);
MapGridSetMetatileIdAt(data[0], data[1], 0x224);
CurrentMapDrawMetatileAt(data[0], data[1]);
FieldEffectActiveListRemove(FLDEFF_PCTURN_ON);
EnableBothScriptContexts();
@ -828,9 +829,9 @@ void DoSecretBasePCTurnOffEffect(void)
PlaySE(SE_PC_OFF);
if (!VarGet(VAR_CURRENT_SECRET_BASE))
MapGridSetMetatileIdAt(x, y, 3616);
MapGridSetMetatileIdAt(x, y, 0x220 | METATILE_COLLISION_MASK);
else
MapGridSetMetatileIdAt(x, y, 3617);
MapGridSetMetatileIdAt(x, y, 0x221 | METATILE_COLLISION_MASK);
CurrentMapDrawMetatileAt(x, y);
}
@ -902,8 +903,8 @@ bool8 FldEff_NopA700(void)
static void DoSecretBaseBreakableDoorEffect(s16 x, s16 y)
{
PlaySE(SE_TOY_KABE);
MapGridSetMetatileIdAt(x, y, 630);
MapGridSetMetatileIdAt(x, y - 1, 622);
MapGridSetMetatileIdAt(x, y, 0x276);
MapGridSetMetatileIdAt(x, y - 1, 0x26E);
CurrentMapDrawMetatileAt(x, y);
CurrentMapDrawMetatileAt(x, y - 1);
}

View File

@ -18,6 +18,7 @@
#include "constants/maps.h"
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/metatile_labels.h"
struct MirageTowerPulseBlend {
u8 taskId;
@ -109,24 +110,24 @@ const struct SpriteSheet gMirageTowerCeilingCrumbleSpriteSheets[] =
static const struct MetatileCoords sInvisibleMirageTowerMetatiles[] =
{
{18, 53, 0x251},
{19, 53, 0x251},
{20, 53, 0x251},
{18, 54, 0x251},
{19, 54, 0x251},
{20, 54, 0x251},
{18, 55, 0x251},
{19, 55, 0x251},
{20, 55, 0x251},
{18, 56, 0x251},
{19, 56, 0x251},
{20, 56, 0x251},
{18, 57, 0x259},
{19, 57, 0x259},
{20, 57, 0x259},
{18, 58, 0x121},
{19, 58, 0x121},
{20, 58, 0x121},
{18, 53, METATILE_ID(Mauville, DeepSand_Center)},
{19, 53, METATILE_ID(Mauville, DeepSand_Center)},
{20, 53, METATILE_ID(Mauville, DeepSand_Center)},
{18, 54, METATILE_ID(Mauville, DeepSand_Center)},
{19, 54, METATILE_ID(Mauville, DeepSand_Center)},
{20, 54, METATILE_ID(Mauville, DeepSand_Center)},
{18, 55, METATILE_ID(Mauville, DeepSand_Center)},
{19, 55, METATILE_ID(Mauville, DeepSand_Center)},
{20, 55, METATILE_ID(Mauville, DeepSand_Center)},
{18, 56, METATILE_ID(Mauville, DeepSand_Center)},
{19, 56, METATILE_ID(Mauville, DeepSand_Center)},
{20, 56, METATILE_ID(Mauville, DeepSand_Center)},
{18, 57, METATILE_ID(Mauville, DeepSand_BottomMid)},
{19, 57, METATILE_ID(Mauville, DeepSand_BottomMid)},
{20, 57, METATILE_ID(Mauville, DeepSand_BottomMid)},
{18, 58, METATILE_ID(General, SandPit_Center)},
{19, 58, METATILE_ID(General, SandPit_Center)},
{20, 58, METATILE_ID(General, SandPit_Center)},
};
static const union AnimCmd gSpriteAnim_8617DEC[] =