From 565114625f3e8505b157c0c444c5d40caba150ee Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 25 Feb 2020 16:35:38 -0500 Subject: fldeff_cut through SetUpFieldMove_Cut --- include/field_specials.h | 1 + include/fieldmap.h | 5 +++-- include/metatile_behavior.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/field_specials.h b/include/field_specials.h index 02069ff84..b7d7f4f1d 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -25,5 +25,6 @@ bool8 ShouldShowBoxWasFullMessage(void); u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr); u8 GetUnlockedSeviiAreas(void); u32 GetPlayerTrainerId(void); +bool8 CutMoveRuinValleyCheck(void); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 406ec2959..a8e31685f 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -19,6 +19,7 @@ u32 MapGridGetMetatileBehaviorAt(int, int); u8 MapGridGetMetatileLayerTypeAt(s16 x, s16 y); void MapGridSetMetatileIdAt(int, int, u16); void MapGridSetMetatileEntryAt(int, int, u16); +u8 MapGridGetZCoordAt(s32 x, s32 y); void GetCameraCoords(u16*, u16*); bool8 MapGridIsImpassableAt(s32, s32); s32 GetMapBorderIdAt(s32, s32); @@ -29,8 +30,8 @@ struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y); void sub_8059948(u8 a0, u8 a1); void save_serialize_map(void); -u32 sub_8058F1C(u32 original, u8 bit); -u32 sub_8058F48(s16 x, s16 y, u8 z); +u32 GetMetatileAttributeFromRawMetatileBehavior(u32 original, u8 bit); +u32 MapGridGetMetatileAttributeAt(s16 x, s16 y, u8 attr); void MapGridSetMetatileImpassabilityAt(s32 x, s32 y, bool32 arg2); #endif //GUARD_FIELDMAP_H diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index d567ab77c..f3195e6c9 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -114,7 +114,7 @@ bool8 MetatileBehavior_UnusedReturnFalse_10(u8 metatileBehavior); bool8 MetatileBehavior_UnusedReturnFalse_11(u8 metatileBehavior); bool8 MetatileBehavior_UnusedReturnFalse_12(u8 metatileBehavior); bool8 MetatileBehavior_UnusedReturnFalse_13(u8 metatileBehavior); -bool8 sub_805A2BC(u8 metatileBehavior, u8 playerDirection); +bool8 TestMetatileAttributeBit(u8 attr, u8 bitmask); bool8 MetatileBehavior_UnusedIsSpinRight(u8 metatileBehavior); bool8 MetatileBehavior_UnusedIsSpinLeft(u8 metatileBehavior); bool8 MetatileBehavior_UnusedIsSpinUp(u8 metatileBehavior); -- cgit v1.2.3 From 41644b283ad2d4fb5e30b61271c5820c1ccbc499 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 25 Feb 2020 16:52:16 -0500 Subject: through sub_8097A20 --- include/event_scripts.h | 3 +++ include/field_specials.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/event_scripts.h b/include/event_scripts.h index f026cb57a..bf16ed2ec 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -1201,4 +1201,7 @@ extern const u8 Text_MonSentToBoxBillsBoxFull[]; extern const u8 EventScript_BagItemCanBeRegistered[]; +// fldeff_cut +extern const u8 EventScript_FldEffCut[]; + #endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/field_specials.h b/include/field_specials.h index b7d7f4f1d..9653a9169 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -26,5 +26,6 @@ u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr); u8 GetUnlockedSeviiAreas(void); u32 GetPlayerTrainerId(void); bool8 CutMoveRuinValleyCheck(void); +void CutMoveOpenDottedHoleDoor(void); #endif // GUARD_FIELD_SPECIALS_H -- cgit v1.2.3 From 51e2b99b9d748755b77fa3bdbc86d261d58fc74c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 26 Feb 2020 09:11:24 -0500 Subject: Finish fldeff_cut --- include/event_object_movement.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/event_object_movement.h b/include/event_object_movement.h index b713dbd7d..baf66d737 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -117,6 +117,8 @@ bool32 RfuUnionObjectIsInvisible(u8 objectEventId); void RfuUnionObjectStartWarp(u8 objectEventId, u8 animNo); bool32 RfuUnionObjectIsWarping(u8 objectEventId); +void sub_805F378(s16 x, s16 y); + // Exported data declarations extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; @@ -124,5 +126,7 @@ extern const struct SpritePalette gUnknown_83A5348; extern const struct SpriteTemplate * const gFieldEffectObjectTemplatePointers[]; extern const struct OamData gObjectEventBaseOam_32x32; extern const struct UCoords16 gUnknown_83A64C8[]; +extern const u16 gUnknown_8398648[]; +extern const u16 gUnknown_8398688[]; #endif // GUARD_EVENT_OBJECT_MOVEMENT_H -- cgit v1.2.3 From 4747fcb6296709bf3f9eb287ca6adb977dae0bce Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 26 Feb 2020 09:21:49 -0500 Subject: Name methods in fldeff_cut --- include/fldeff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/fldeff.h b/include/fldeff.h index 51287f400..56e2dfbd9 100644 --- a/include/fldeff.h +++ b/include/fldeff.h @@ -10,7 +10,7 @@ gTasks[taskId].data[9] = (u32)func; extern struct MapPosition gPlayerFacingPosition; bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId); -u8 oei_task_add(void); +u8 CreateFieldEffectShowMon(void); // flash u8 sub_80C9DCC(u8 lightLevel, u8 mapType); -- cgit v1.2.3 From cac0681b2c11b7184545cc42d4bd209d6000b42c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 26 Feb 2020 13:14:53 -0500 Subject: Name cut grass metatiles --- include/constants/metatile_labels.h | 24 ++++++++++++++++++++++++ include/global.fieldmap.h | 2 ++ 2 files changed, 26 insertions(+) (limited to 'include') diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index b71e7d08f..ca4a92263 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -2,6 +2,14 @@ #define GUARD_METATILE_LABELS_H // gTileset_General +#define METATILE_General_Plain_Mowed 0x001 +#define METATILE_General_ThinTreeTop_Grass 0x00A +#define METATILE_General_WideTreeTopLeft_Grass 0x00B +#define METATILE_General_WideTreeTopRight_Grass 0x00C +#define METATILE_General_Plain_Grass 0x00D +#define METATILE_General_WideTreeTopLeft_Mowed 0x00E +#define METATILE_General_WideTreeTopRight_Mowed 0x00F +#define METATILE_General_ThinTreeTop_Mowed 0x013 #define METATILE_General_CalmWater 0x12B // gTileset_Mart @@ -127,4 +135,20 @@ #define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287 #define METATILE_TrainerTower_CounterBarrier 0x2B4 +// gTileset_ViridianForest +#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284 +#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281 + +// gTileset_CeladonCity +#define METATILE_CeladonCity_CyclingRoad_Grass 0x352 +#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E + +// gTileset_FuchsiaCity +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302 +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312 + #endif // GUARD_METATILE_LABELS_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index c599b68ab..a4d6880b1 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -15,6 +15,8 @@ enum typedef void (*TilesetCB)(void); +#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) + struct Tileset { /*0x00*/ bool8 isCompressed; -- cgit v1.2.3