mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
label metatiles for pacifidlog and fortree bridges
This commit is contained in:
parent
724add638c
commit
aad839995f
@ -72,9 +72,33 @@
|
||||
#define METATILE_Cave_SealedChamberEntrance_BottomMid 0x233
|
||||
#define METATILE_Cave_SealedChamberEntrance_BottomRight 0x234
|
||||
|
||||
// gTileset_InsideOfTruck
|
||||
#define METATILE_InsideOfTruck_ExitLight_Top 0x208
|
||||
#define METATILE_InsideOfTruck_ExitLight_Mid 0x210
|
||||
#define METATILE_InsideOfTruck_ExitLight_Bottom 0x218
|
||||
#define METATILE_InsideOfTruck_DoorClosedFloor_Top 0x20D
|
||||
#define METATILE_InsideOfTruck_DoorClosedFloor_Mid 0x215
|
||||
#define METATILE_InsideOfTruck_DoorClosedFloor_Bottom 0x21D
|
||||
|
||||
// gTileset_Pacifidlog
|
||||
#define METATILE_Pacifidlog_FloatingLogs_Horizontal0 0x250
|
||||
#define METATILE_Pacifidlog_FloatingLogs_Horizontal1 0x251
|
||||
#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0 0x252
|
||||
#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1 0x253
|
||||
#define METATILE_Pacifidlog_SubmergedLogs_Horizontal0 0x254
|
||||
#define METATILE_Pacifidlog_SubmergedLogs_Horizontal1 0x255
|
||||
#define METATILE_Pacifidlog_FloatingLogs_Vertical0 0x258
|
||||
#define METATILE_Pacifidlog_FloatingLogs_Vertical1 0x260
|
||||
#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0 0x259
|
||||
#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1 0x261
|
||||
#define METATILE_Pacifidlog_SubmergedLogs_Vertical0 0x25A
|
||||
#define METATILE_Pacifidlog_SubmergedLogs_Vertical1 0x262
|
||||
|
||||
|
||||
// gTileset_Fortree
|
||||
#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E
|
||||
#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F
|
||||
#define METATILE_Fortree_BridgeOverTrees_Raised 0x256
|
||||
#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257
|
||||
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
#define PLACE_DECORATION_SELECTOR_TAG 0xbe5
|
||||
#define PLACE_DECORATION_PLAYER_TAG 0x008
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/vars.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
#define SECONDS(value) ((signed) (60.0 * value + 0.5))
|
||||
|
||||
@ -203,9 +204,9 @@ void Task_HandleTruckSequence(u8 taskId)
|
||||
data[1]++;
|
||||
if (data[1] == 120)
|
||||
{
|
||||
MapGridSetMetatileIdAt(11, 8, 520);
|
||||
MapGridSetMetatileIdAt(11, 9, 528);
|
||||
MapGridSetMetatileIdAt(11, 10, 536);
|
||||
MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, ExitLight_Top));
|
||||
MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, ExitLight_Mid));
|
||||
MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, ExitLight_Bottom));
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_TRACK_DOOR);
|
||||
DestroyTask(taskId);
|
||||
@ -217,9 +218,9 @@ void Task_HandleTruckSequence(u8 taskId)
|
||||
|
||||
void ExecuteTruckSequence(void)
|
||||
{
|
||||
MapGridSetMetatileIdAt(11, 8, 525);
|
||||
MapGridSetMetatileIdAt(11, 9, 533);
|
||||
MapGridSetMetatileIdAt(11, 10, 541);
|
||||
MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, DoorClosedFloor_Top));
|
||||
MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, DoorClosedFloor_Mid));
|
||||
MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, DoorClosedFloor_Bottom));
|
||||
DrawWholeMapView();
|
||||
ScriptContext2_Enable();
|
||||
CpuFastFill(0, gPlttBufferFaded, 0x400);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/vars.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
struct PacifidlogMetatileOffsets
|
||||
{
|
||||
@ -50,26 +51,26 @@ static const TaskFunc sPerStepCallbacks[] =
|
||||
// they are in pairs but declared as 1D array
|
||||
static const struct PacifidlogMetatileOffsets sHalfSubmergedBridgeMetatileOffsets[] =
|
||||
{
|
||||
{ 0, 0, 0x259}, { 0, 1, 0x261},
|
||||
{ 0, -1, 0x259}, { 0, 0, 0x261},
|
||||
{ 0, 0, 0x252}, { 1, 0, 0x253},
|
||||
{ -1, 0, 0x252}, { 0, 0, 0x253}
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)},
|
||||
{ 0, -1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)},
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)},
|
||||
{-1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)}
|
||||
};
|
||||
|
||||
static const struct PacifidlogMetatileOffsets sFullySubmergedBridgeMetatileOffsets[] =
|
||||
{
|
||||
{ 0, 0, 0x25A}, { 0, 1, 0x262},
|
||||
{ 0, -1, 0x25A}, { 0, 0, 0x262},
|
||||
{ 0, 0, 0x254}, { 1, 0, 0x255},
|
||||
{ -1, 0, 0x254}, { 0, 0, 0x255}
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)},
|
||||
{ 0, -1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)},
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)},
|
||||
{-1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)}
|
||||
};
|
||||
|
||||
static const struct PacifidlogMetatileOffsets sFloatingBridgeMetatileOffsets[] =
|
||||
{
|
||||
{ 0, 0, 0x258}, { 0, 1, 0x260},
|
||||
{ 0, -1, 0x258}, { 0, 0, 0x260},
|
||||
{ 0, 0, 0x250}, { 1, 0, 0x251},
|
||||
{ -1, 0, 0x250}, { 0, 0, 0x251}
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)},
|
||||
{ 0, -1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)},
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)},
|
||||
{-1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)}
|
||||
};
|
||||
|
||||
// Each element corresponds to a y coordinate row in the sootopolis gym 1F map.
|
||||
@ -374,11 +375,11 @@ static void SetLoweredForetreeBridgeMetatile(s16 x, s16 y)
|
||||
{
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x24e:
|
||||
MapGridSetMetatileIdAt(x, y, 0x24f);
|
||||
case METATILE_ID(Fortree, BridgeOverGrass_Raised):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Lowered));
|
||||
break;
|
||||
case 0x256:
|
||||
MapGridSetMetatileIdAt(x, y, 0x257);
|
||||
case METATILE_ID(Fortree, BridgeOverTrees_Raised):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Lowered));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -391,11 +392,11 @@ static void SetNormalFortreeBridgeMetatile(s16 x, s16 y)
|
||||
{
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x24f:
|
||||
MapGridSetMetatileIdAt(x, y, 0x24e);
|
||||
case METATILE_ID(Fortree, BridgeOverGrass_Lowered):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Raised));
|
||||
break;
|
||||
case 0x257:
|
||||
MapGridSetMetatileIdAt(x, y, 0x256);
|
||||
case METATILE_ID(Fortree, BridgeOverTrees_Lowered):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Raised));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user