From 799edaf3e6c4d1aa714e6b11890a50724f3dff0e Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 6 Oct 2019 14:17:34 -0500 Subject: Document hide/show reflection movement actions --- .../constants/event_object_movement_constants.h | 4 ++-- include/global.fieldmap.h | 26 ++++++++-------------- 2 files changed, 11 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/constants/event_object_movement_constants.h b/include/constants/event_object_movement_constants.h index b1f9b4cb5..ed6f6c7fb 100755 --- a/include/constants/event_object_movement_constants.h +++ b/include/constants/event_object_movement_constants.h @@ -179,8 +179,8 @@ #define MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY 0x5D #define MOVEMENT_ACTION_INIT_AFFINE_ANIM 0x5E #define MOVEMENT_ACTION_CLEAR_AFFINE_ANIM 0x5F -#define MOVEMENT_ACTION_UNKNOWN1 0x60 -#define MOVEMENT_ACTION_UNKNOWN2 0x61 +#define MOVEMENT_ACTION_HIDE_REFLECTION 0x60 +#define MOVEMENT_ACTION_SHOW_REFLECTION 0x61 #define MOVEMENT_ACTION_WALK_DOWN_START_AFFINE 0x62 #define MOVEMENT_ACTION_WALK_DOWN_AFFINE 0x63 #define MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN 0x64 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index a17180589..03e787266 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -65,7 +65,7 @@ struct EventObjectTemplate /*0x0E*/ u16 trainerRange_berryTreeId; /*0x10*/ const u8 *script; /*0x14*/ u16 flagId; -}; /*size = 0x18*/ +}; struct WarpEvent { @@ -82,7 +82,6 @@ struct CoordEvent u8 elevation; u16 trigger; u16 index; - u8 filler_A[0x2]; u8 *script; }; @@ -90,20 +89,14 @@ struct BgEvent { u16 x, y; u8 elevation; - u8 kind; - union { // carried over from diego's FR/LG work, seems to be the same struct - // in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union. + u8 kind; // The "kind" field determines how to access bgUnion union below. + union { u8 *script; - - // hidden item type struct { u16 item; - u16 hiddenItemId; // flag offset to determine flag lookup + u16 hiddenItemId; } hiddenItem; - - // secret base type u32 secretBaseId; - } bgUnion; }; @@ -113,7 +106,6 @@ struct MapEvents u8 warpCount; u8 coordEventCount; u8 bgEventCount; - struct EventObjectTemplate *eventObjects; struct WarpEvent *warps; struct CoordEvent *coordEvents; @@ -122,10 +114,10 @@ struct MapEvents struct MapConnection { - /*0x00*/ u8 direction; - /*0x01*/ u32 offset; - /*0x05*/ u8 mapGroup; - /*0x06*/ u8 mapNum; + u8 direction; + u32 offset; + u8 mapGroup; + u8 mapNum; }; struct MapConnections @@ -180,7 +172,7 @@ struct EventObject /*0x03*/ u32 spriteAffineAnimPausedBackup:1; u32 disableJumpLandingGroundEffect:1; u32 fixedPriority:1; - u32 unk3_3:1; + u32 hideReflection:1; /*0x04*/ u8 spriteId; /*0x05*/ u8 graphicsId; /*0x06*/ u8 movementType; -- cgit v1.2.3 From 4494b5d4cb931cfde1371957e3c18a5240391755 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 6 Oct 2019 15:40:10 -0500 Subject: Document collision types --- include/global.fieldmap.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 03e787266..de08fd1ec 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -259,7 +259,20 @@ enum enum { - COLLISION_LEDGE_JUMP = 6 + COLLISION_NONE, + COLLISION_OUTSIDE_RANGE, + COLLISION_IMPASSABLE, + COLLISION_ELEVATION_MISMATCH, + COLLISION_EVENT_OBJECT, + COLLISION_STOP_SURFING, + COLLISION_LEDGE_JUMP, + COLLISION_PUSHED_BOULDER, + COLLISION_ROTATING_GATE, + COLLISION_WHEELIE_HOP, + COLLISION_ISOLATED_VERTICAL_RAIL, + COLLISION_ISOLATED_HORIZONTAL_RAIL, + COLLISION_VERTICAL_RAIL, + COLLISION_HORIZONTAL_RAIL, }; // player running states -- cgit v1.2.3 From 1b7607bd91a9bdf9ee5e2ccbf895727bc53f9254 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 11 Oct 2019 04:14:09 -0400 Subject: Document cable_club.inc --- include/constants/cable_club.h | 15 +++++++++++++++ include/constants/vars.h | 2 +- include/dodrio_berry_picking.h | 4 ++-- include/link.h | 22 ++++++++++++++++++++++ include/party_menu.h | 2 +- include/pokemon_jump.h | 6 +++--- 6 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 include/constants/cable_club.h (limited to 'include') diff --git a/include/constants/cable_club.h b/include/constants/cable_club.h new file mode 100644 index 000000000..f2aa4120c --- /dev/null +++ b/include/constants/cable_club.h @@ -0,0 +1,15 @@ +#ifndef GUARD_CONSTANTS_CABLE_CLUB_H +#define GUARD_CONSTANTS_CABLE_CLUB_H + +// States for VAR_CABLE_CLUB_STATE +#define USING_SINGLE_BATTLE 1 +#define USING_DOUBLE_BATTLE 2 +#define USING_TRADE_CENTER 3 +#define USING_RECORD_CORNER 4 +#define USING_MULTI_BATTLE 5 +#define USING_UNION_ROOM 6 +#define USING_BERRY_CRUSH 7 +#define USING_MINIGAME 8 +#define USING_BATTLE_TOWER 9 + +#endif //GUARD_CONSTANTS_CABLE_CLUB_H diff --git a/include/constants/vars.h b/include/constants/vars.h index 72b15654e..3fde9cc11 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -77,7 +77,7 @@ #define VAR_REGICE_STEPS_2 0x403C #define VAR_REGICE_STEPS_3 0x403D #define VAR_ALTERING_CAVE_WILD_SET 0x403E -#define VAR_ALWAYS_ZERO_0x403F 0x403F // This var is read and written, but is always zero. +#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. Presumably meant to be set externally by Mystery Gift distribution #define VAR_DAYS 0x4040 #define VAR_FANCLUB_UNKNOWN_1 0x4041 #define VAR_FANCLUB_UNKNOWN_2 0x4042 diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 55e8fa880..ac802a2b5 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -2,7 +2,7 @@ #define GUARD_DODRIO_BERRY_PICKING_H void sub_802493C(u16 a0, void (*callback)(void)); -void sub_8027A5C(void); -void sub_8027AAC(void); +void DoesPartyHaveDodrio(void); +void ShowDodrioBerryPickingRecords(void); #endif // GUARD_DODRIO_BERRY_PICKING_H diff --git a/include/link.h b/include/link.h index c14084066..847ea38ba 100644 --- a/include/link.h +++ b/include/link.h @@ -48,6 +48,28 @@ #define EXTRACT_LINK_ERRORS(status) \ (((status) & LINK_STAT_ERRORS) >> LINK_STAT_ERRORS_SHIFT) +#define LINKTYPE_0x1111 0x1111 // trade +#define LINKTYPE_0x1122 0x1122 // trade +#define LINKTYPE_0x1133 0x1133 // trade +#define LINKTYPE_0x1144 0x1144 // trade +#define LINKTYPE_BATTLE 0x2211 +#define LINKTYPE_0x2222 0x2222 // unused battle? +#define LINKTYPE_SINGLE_BATTLE 0x2233 +#define LINKTYPE_DOUBLE_BATTLE 0x2244 +#define LINKTYPE_MULTI_BATTLE 0x2255 +#define LINKTYPE_BATTLE_TOWER_50 0x2266 +#define LINKTYPE_BATTLE_TOWER_OPEN 0x2277 +#define LINKTYPE_0x2288 0x2288 // battle? +#define LINKTYPE_0x3311 0x3311 +#define LINKTYPE_0x3322 0x3322 +#define LINKTYPE_0x4411 0x4411 +#define LINKTYPE_BERRY_BLENDER 0x4422 +#define LINKTYPE_0x5501 0x5501 // mystery event +#define LINKTYPE_0x5502 0x5502 // unused? +#define LINKTYPE_0x5503 0x5503 // eReader +#define LINKTYPE_0x6601 0x6601 +#define LINKTYPE_0x6602 0x6602 + #define LINKCMD_SEND_LINK_TYPE 0x2222 #define LINKCMD_0x2FFE 0x2FFE #define LINKCMD_SEND_HELD_KEYS 0x4444 diff --git a/include/party_menu.h b/include/party_menu.h index d76e50788..fc4020b27 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -124,7 +124,7 @@ void InitChooseHalfPartyForBattle(u8 unused); void sub_81B8558(void); void sub_81B8904(u8 initArg, MainCallback callback); void sub_81B892C(void); -void sub_81B8958(void); +void ChooseMonForWirelessMinigame(void); void OpenPartyMenuInBattle(u8 arg); void sub_81B89F0(void); void sub_81B8C68(void); diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h index 28b19f9b1..4586ad6a6 100644 --- a/include/pokemon_jump.h +++ b/include/pokemon_jump.h @@ -4,10 +4,10 @@ #include "main.h" void sub_802A9A8(u16 monId, MainCallback callback); -bool32 sub_802C908(u16 species); -void sub_802C920(void); +bool32 IsSpeciesAllowedInPokemonJump(u16 species); +void DoesPartyHavePokemonJumpSpecies(void); void ResetPokeJumpResults(void); -void sub_802E3C4(void); +void ShowPokemonJumpRecords(void); void sub_802EB24(s16 tileTag, s16 palTag, s16 x, s16 y, u8 subpriority); bool32 sub_802EB84(void); -- cgit v1.2.3 From 4e2be7ff5e4e4f6b7f664bfee4f1d4433c7f238f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 11 Oct 2019 22:23:05 -0400 Subject: Review changes for #835 --- include/constants/vars.h | 2 +- include/dodrio_berry_picking.h | 2 +- include/pokemon_jump.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/constants/vars.h b/include/constants/vars.h index 3fde9cc11..3030581c6 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -77,7 +77,7 @@ #define VAR_REGICE_STEPS_2 0x403C #define VAR_REGICE_STEPS_3 0x403D #define VAR_ALTERING_CAVE_WILD_SET 0x403E -#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. Presumably meant to be set externally by Mystery Gift distribution +#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. The only way to obtain the Eon Ticket in Emerald is via Record Mixing #define VAR_DAYS 0x4040 #define VAR_FANCLUB_UNKNOWN_1 0x4041 #define VAR_FANCLUB_UNKNOWN_2 0x4042 diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index ac802a2b5..9995decc2 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -2,7 +2,7 @@ #define GUARD_DODRIO_BERRY_PICKING_H void sub_802493C(u16 a0, void (*callback)(void)); -void DoesPartyHaveDodrio(void); +void IsDodrioInParty(void); void ShowDodrioBerryPickingRecords(void); #endif // GUARD_DODRIO_BERRY_PICKING_H diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h index 4586ad6a6..dde59aac5 100644 --- a/include/pokemon_jump.h +++ b/include/pokemon_jump.h @@ -5,7 +5,7 @@ void sub_802A9A8(u16 monId, MainCallback callback); bool32 IsSpeciesAllowedInPokemonJump(u16 species); -void DoesPartyHavePokemonJumpSpecies(void); +void IsPokemonJumpSpeciesInParty(void); void ResetPokeJumpResults(void); void ShowPokemonJumpRecords(void); void sub_802EB24(s16 tileTag, s16 palTag, s16 x, s16 y, u8 subpriority); -- cgit v1.2.3