mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 05:43:51 +01:00
label metatiles for general, fallarbor, and sootopolis gym tilesets
This commit is contained in:
parent
aad839995f
commit
8b26bd1e09
@ -1,6 +1,12 @@
|
|||||||
#ifndef GUARD_METATILE_LABELS_H
|
#ifndef GUARD_METATILE_LABELS_H
|
||||||
#define GUARD_METATILE_LABELS_H
|
#define GUARD_METATILE_LABELS_H
|
||||||
|
|
||||||
|
// gTileset_General
|
||||||
|
#define METATILE_General_MuddySlope_Frame0 0x0E8
|
||||||
|
#define METATILE_General_MuddySlope_Frame1 0x0E9
|
||||||
|
#define METATILE_General_MuddySlope_Frame2 0x0EA
|
||||||
|
#define METATILE_General_MuddySlope_Frame3 0x0EB
|
||||||
|
|
||||||
// gTileset_Building
|
// gTileset_Building
|
||||||
#define METATILE_Building_PC_Off 0x004
|
#define METATILE_Building_PC_Off 0x004
|
||||||
#define METATILE_Building_PC_On 0x005
|
#define METATILE_Building_PC_On 0x005
|
||||||
@ -100,6 +106,13 @@
|
|||||||
#define METATILE_Fortree_BridgeOverTrees_Raised 0x256
|
#define METATILE_Fortree_BridgeOverTrees_Raised 0x256
|
||||||
#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257
|
#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257
|
||||||
|
|
||||||
|
// gTileset_SootopolisGym
|
||||||
|
#define METATILE_SootopolisGym_Ice_Cracked 0x20E
|
||||||
|
#define METATILE_SootopolisGym_Ice_Broken 0x206
|
||||||
|
|
||||||
|
// gTileset_Fallarbor
|
||||||
|
#define METATILE_Fallarbor_AshGrass 0x20A
|
||||||
|
#define METATILE_Fallarbor_NormalGrass 0x212
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -868,13 +868,13 @@ u32 FldEff_Unknown22(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartAshFieldEffect(s16 x, s16 y, u16 c, s16 d)
|
void StartAshFieldEffect(s16 x, s16 y, u16 metatileId, s16 d)
|
||||||
{
|
{
|
||||||
gFieldEffectArguments[0] = x;
|
gFieldEffectArguments[0] = x;
|
||||||
gFieldEffectArguments[1] = y;
|
gFieldEffectArguments[1] = y;
|
||||||
gFieldEffectArguments[2] = 0x52;
|
gFieldEffectArguments[2] = 0x52;
|
||||||
gFieldEffectArguments[3] = 1;
|
gFieldEffectArguments[3] = 1;
|
||||||
gFieldEffectArguments[4] = c;
|
gFieldEffectArguments[4] = metatileId;
|
||||||
gFieldEffectArguments[5] = d;
|
gFieldEffectArguments[5] = d;
|
||||||
FieldEffectStart(FLDEFF_ASH);
|
FieldEffectStart(FLDEFF_ASH);
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,12 @@ static const u16 sSootopolisGymIceRowVars[] =
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sMuddySlopeMetatiles[] = {0xe8, 0xeb, 0xea, 0xe9};
|
static const u16 sMuddySlopeMetatiles[] = {
|
||||||
|
METATILE_ID(General, MuddySlope_Frame0),
|
||||||
|
METATILE_ID(General, MuddySlope_Frame3),
|
||||||
|
METATILE_ID(General, MuddySlope_Frame2),
|
||||||
|
METATILE_ID(General, MuddySlope_Frame1)
|
||||||
|
};
|
||||||
|
|
||||||
static void Task_RunPerStepCallback(u8 taskId)
|
static void Task_RunPerStepCallback(u8 taskId)
|
||||||
{
|
{
|
||||||
@ -524,7 +529,7 @@ void SetSootopolisGymCrackedIceMetatiles(void)
|
|||||||
for (y = 0; y < height; y++)
|
for (y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
if (IsIcePuzzleCoordVisited(x, y) == TRUE)
|
if (IsIcePuzzleCoordVisited(x, y) == TRUE)
|
||||||
MapGridSetMetatileIdAt(x + 7, y + 7, 0x20e);
|
MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_ID(SootopolisGym, Ice_Cracked));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,7 +584,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId)
|
|||||||
x = data[4];
|
x = data[4];
|
||||||
y = data[5];
|
y = data[5];
|
||||||
PlaySE(SE_RU_BARI);
|
PlaySE(SE_RU_BARI);
|
||||||
MapGridSetMetatileIdAt(x, y, 0x20e);
|
MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Cracked));
|
||||||
CurrentMapDrawMetatileAt(x, y);
|
CurrentMapDrawMetatileAt(x, y);
|
||||||
MarkIcePuzzleCoordVisited(x - 7, y - 7);
|
MarkIcePuzzleCoordVisited(x - 7, y - 7);
|
||||||
data[1] = 1;
|
data[1] = 1;
|
||||||
@ -595,7 +600,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId)
|
|||||||
x = data[4];
|
x = data[4];
|
||||||
y = data[5];
|
y = data[5];
|
||||||
PlaySE(SE_RU_GASYAN);
|
PlaySE(SE_RU_GASYAN);
|
||||||
MapGridSetMetatileIdAt(x, y, 0x206);
|
MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Broken));
|
||||||
CurrentMapDrawMetatileAt(x, y);
|
CurrentMapDrawMetatileAt(x, y);
|
||||||
data[1] = 1;
|
data[1] = 1;
|
||||||
}
|
}
|
||||||
@ -615,10 +620,10 @@ static void AshGrassPerStepCallback(u8 taskId)
|
|||||||
data[2] = y;
|
data[2] = y;
|
||||||
if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y)))
|
if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y)))
|
||||||
{
|
{
|
||||||
if (MapGridGetMetatileIdAt(x, y) == 0x20a)
|
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(Fallarbor, AshGrass))
|
||||||
StartAshFieldEffect(x, y, 0x212, 4);
|
StartAshFieldEffect(x, y, METATILE_ID(Fallarbor, NormalGrass), 4);
|
||||||
else
|
else
|
||||||
StartAshFieldEffect(x, y, 0x206, 4);
|
StartAshFieldEffect(x, y, 0x206, 4);// unsure what metatile this refers to
|
||||||
|
|
||||||
if (CheckBagHasItem(ITEM_SOOT_SACK, 1))
|
if (CheckBagHasItem(ITEM_SOOT_SACK, 1))
|
||||||
{
|
{
|
||||||
@ -632,7 +637,7 @@ static void AshGrassPerStepCallback(u8 taskId)
|
|||||||
|
|
||||||
static void SetCrackedFloorHoleMetatile(s16 x, s16 y)
|
static void SetCrackedFloorHoleMetatile(s16 x, s16 y)
|
||||||
{
|
{
|
||||||
MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);
|
MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);// again unsure what these are referring to
|
||||||
CurrentMapDrawMetatileAt(x, y);
|
CurrentMapDrawMetatileAt(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -687,7 +692,7 @@ static void SetMuddySlopeMetatile(s16 *data, s16 x, s16 y)
|
|||||||
|
|
||||||
MapGridSetMetatileIdAt(x, y, tile);
|
MapGridSetMetatileIdAt(x, y, tile);
|
||||||
CurrentMapDrawMetatileAt(x, y);
|
CurrentMapDrawMetatileAt(x, y);
|
||||||
MapGridSetMetatileIdAt(x, y, 0xe8);
|
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, MuddySlope_Frame0));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Task_MuddySlope(u8 taskId)
|
static void Task_MuddySlope(u8 taskId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user