Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions include/structs/BattleObject.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
u8 Unk_0c // loc=0xc
u8 Unk_0d // loc=0xd
u8 Element // loc=0xe
u8 Unk_0f // loc=0xf
enum8 SlideType // loc=0xf
struct_const SLIDE_TYPE_NONE, 0x00
struct_const SLIDE_TYPE_WIND, 0x01
struct_const SLIDE_TYPE_ICE, 0x02
struct_const SLIDE_TYPE_ROAD, 0x03

union
u8 CurAnim // loc=0x10
Expand Down Expand Up @@ -84,15 +88,15 @@
u8 PreventAnim // loc=0x18
u8 Unk_19 // loc=0x19
u8 ChipsHeld // loc=0x1a
u8 Unk_1b // loc=0x1b
u8 Unk_1c // loc=0x1c
u8 Unk_1d // loc=0x1d
u8 NumSlideTiles // loc=0x1b
u8 SlideDeltaX // loc=0x1c
u8 SlideDeltaY // loc=0x1d

union
u8 Unk_1e // loc=0x1e
u8 Unk_1f // loc=0x1f
u8 SlidePerTileTimer // loc=0x1e
u8 SlideState // loc=0x1f
nextu
u16 Unk_1e_Unk_1f // loc=0x1e
u16 SlidePerTileTimerAndSlideState // loc=0x1e
endu

union
Expand Down
61 changes: 38 additions & 23 deletions include/structs/CollisionData.inc
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
.macro ObjectFlags1 field:req // type: enum ObjectFlags1
enum32 \field
struct_const OBJECT_FLAGS_GUARD, 0x0000001
struct_const OBJECT_FLAGS_UNK_2, 0x0000002
struct_const OBJECT_FLAGS_UNK_4, 0x0000004
struct_const OBJECT_FLAGS_INVULNERABLE, 0x0000008
struct_const OBJECT_FLAGS_AIRSHOE, 0x0000010
struct_const OBJECT_FLAGS_FLOATSHOE, 0x0000020
struct_const OBJECT_FLAGS_CURRENTLY_MOVING, 0x0000040
struct_const OBJECT_FLAGS_PARALYZED, 0x0000800
struct_const OBJECT_FLAGS_IMMOBILIZED_BIT, 14
struct_const OBJECT_FLAGS_FROZEN_BIT, 16
struct_const OBJECT_FLAGS_SUPERARMOR_BIT, 17
struct_const OBJECT_FLAGS_UNDERSHIRT, 0x0040000
struct_const OBJECT_FLAGS_CURRENTLY_MOVING_1_BIT, 19
struct_const OBJECT_FLAGS_UNK_BIT_20_BIT, 20
struct_const OBJECT_FLAGS_UNK_BIT_21_BIT, 21
struct_const OBJECT_FLAGS_UNK_BIT_22_BIT, 22
struct_const OBJECT_FLAGS_AFFECTED_BY_ICE, 0x2000000
struct_const OBJECT_FLAGS_UNAFFECTED_BY_POISON, 0x8000000
struct_const OBJECT_FLAGS_GUARD, 0x00000001
struct_const OBJECT_FLAGS_INVIS, 0x00000002
struct_const OBJECT_FLAGS_UNK_4, 0x00000004
struct_const OBJECT_FLAGS_INVULNERABLE, 0x00000008
struct_const OBJECT_FLAGS_AIRSHOE, 0x00000010
struct_const OBJECT_FLAGS_FLOATSHOE, 0x00000020
struct_const OBJECT_FLAGS_CANNOT_SLIDE, 0x00000040
struct_const OBJECT_FLAGS_UNK_8, 0x00000080
struct_const OBJECT_FLAGS_DEAD, 0x00000100
struct_const OBJECT_FLAGS_FLASHING, 0x00000200
struct_const OBJECT_FLAGS_FLINCHING, 0x00000400
struct_const OBJECT_FLAGS_PARALYZED, 0x00000800
struct_const OBJECT_FLAGS_SLIDING, 0x00001000
struct_const OBJECT_FLAGS_BLIND, 0x00002000
struct_const OBJECT_FLAGS_IMMOBILIZED, 0x00004000
struct_const OBJECT_FLAGS_CONFUSED, 0x00008000
struct_const OBJECT_FLAGS_FROZEN, 0x00010000
struct_const OBJECT_FLAGS_SUPERARMOR, 0x00020000
struct_const OBJECT_FLAGS_UNDERSHIRT, 0x00040000
struct_const OBJECT_FLAGS_MOVE_COMPLETE, 0x00080000
struct_const OBJECT_FLAGS_DRAG, 0x00100000
struct_const OBJECT_FLAGS_ANGER, 0x00200000
struct_const OBJECT_FLAGS_USING_ACTION, 0x00400000
struct_const OBJECT_FLAGS_UNK_24, 0x00800000
struct_const OBJECT_FLAGS_UNK_25, 0x01000000
struct_const OBJECT_FLAGS_AFFECTED_BY_ICE, 0x02000000
struct_const OBJECT_FLAGS_UNK_26, 0x04000000
struct_const OBJECT_FLAGS_UNAFFECTED_BY_POISON, 0x08000000
struct_const OBJECT_FLAGS_UNK_28, 0x10000000
struct_const OBJECT_FLAGS_UNK_29, 0x20000000
struct_const OBJECT_FLAGS_UNK_30, 0x40000000
struct_const OBJECT_FLAGS_UNK_31, 0x80000000
struct_const OBJECT_FLAGS_BUBBLED, 0x80000000
.endm

.macro collision_data_struct, label:req, struct_entry=label_struct_entry, set_struct_start_address=set_struct_start_address
Expand All @@ -28,7 +43,7 @@
u8 Region // loc=0x1
u8 PrimaryElement // loc=0x2
u8 Unk_03 // loc=0x3

union
u8 Alliance // loc=0x4
u8 Flip // loc=0x5
Expand All @@ -47,7 +62,7 @@
nextu
u16 PanelXY // loc=0xa
endu

u8 Direction // loc=0xc
u8 CounterTimer // loc=0xd
u8 HitModifierBase // loc=0xe
Expand All @@ -61,14 +76,14 @@
u8 Unk_17 // loc=0x17
u8 SecondaryElementWeakness // loc=0x18
u8 SecondaryElement // loc=0x19

union
u8 Unk_1a // loc=0x1a
u8 Unk_1b // loc=0x1b
nextu
u16 Unk_1a_1b // loc=0x1a
endu

u16 Unk_1c // loc=0x1c
u16 Unk_1e // loc=0x1e
u16 Unk_20 // loc=0x20
Expand All @@ -86,7 +101,7 @@
flags32 ObjectFlags2 // loc=0x40
u32 CollisionIndexBit // loc=0x44
u32 Unk_48 // loc=0x48
struct_org 0x54
struct_org 0x54
u32 Unk_54 // loc=0x54
u32 Unk_58 // loc=0x58
struct_org 0x60
Expand Down