Files
mm/include/z64collision_check.h
T
Tharo 7743e5a2c4 Overhaul the build system (#234)
* wip

* fix

* add disassembler

* Disasm builds OK

* Variable addends

* More wip

* Rodata migration implemented

* Cleanup old tools

* Try fix submodule -> subrepo merge

* git subrepo pull --force --remote=https://github.com/zeldaret/ZAPD.git tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "602e609"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "602e609"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Builds again but assets are totally broken

* git subrepo pull --force tools/asm-processor

subrepo:
  subdir:   "tools/asm-processor"
  merged:   "1ffdb08a"
upstream:
  origin:   "https://github.com/simonlindholm/asm-processor.git"
  branch:   "master"
  commit:   "1ffdb08a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* More cleanup, move functions.txt and variables.txt to tools/disasm and rm tables

* rm z64compress in preparation for subrepo

* git subrepo clone (merge) https://github.com/z64me/z64compress.git tools/z64compress

subrepo:
  subdir:   "tools/z64compress"
  merged:   "eb11085c"
upstream:
  origin:   "https://github.com/z64me/z64compress.git"
  branch:   "main"
  commit:   "eb11085c"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Fix asset extraction

* Fix diff-init make rule

* Split code bss

* Split assumed linker bug padding from assembly files

* add filelists for mm.us.rev1

* Maybe working, but I'm not sure

* add overlays to spec

* Add rodata to actos

* Everything compiles

* Make a lot of C files for code

* Add almost every file in code to spec

* whoops

* 3 code files left

* add scenes to spec

* More progress on progress.py

* Fix skelanime in spec

* audio files!

* Fix merge issues

* Fix some C files in code

* Fix remaining code files

* Use existing O1 C files in spec

* reorder boot order in spec

* update spec

* fault.c

* Convert relocs on completed actors, fixbaserom uses current rom name

* more boot files

* Add VT macros and script

* finish already existing boot files

* most of  libultra

* fix 64bits libultra files

* Use C files for libultra, wrap some functions in NON_MATCHING

* Remove duplicate of OS_CLOCK_RATE from fault.c

* C files for fbdemos

* delete dumb files

* bootstrap C files, still need to add them to the spec

* update fixbaserom

* boot OK?

* I forgot to commit the spec

* C for gamestates

* C for kaleido

* Change all includes to ""

* copy actor sizes script from oot

* I forgot to delete those files

* Basic C files for effects

* Add effects initvars names

* Remove mislabelled boot functions from header/txt

* Begin porting bootstrap_fx, some sizes

* Fix <>

* Fix enum

* Fix diff.py

* fix libultra stuff

* update regconvert

* update setup warnings

* add some missing ;

* Fix some makefile stuff and other fixes on some non_matching functions

* add executable flag in extract_baserom and fixbaserom

* fix relative path

* copy assist from oot

* fix map path

* another assist path fix

* Delete C files for handwritten files

* add code_801A51F0 to spec

* add gfxbuffers to spec

* Move rodata to top of each file when possible

* UNK_TYPEs for func_801A51F0

* Remove kaleido rodata from spec

* Update spec and undefined_syms for recent merge

* GCC warnings and fix errors in nonmatchings,

* round percentage numbers

* progress script: format changes

* progress: error on non-existing files

* fix warning in z_scene_table

* Match 2 nonmatchings in z_actor

* Warnings in lightswitch and invadepoh

* Fix warning in z_actor_dlftbls

* I though I fixed this one

* whoops

* Comment out CC_CHECK

* Removed redundant ultra64.h includes

* Update asm_processor, sorted boot_O1 into other folders, completed the fbdemo bootstrap, cleaned up undefined_syms

* Completed gamestates bootstrap

* Split kaleido_scope

* Remove section.h and segment.h, move keep object externs to a common location in variables.h

* Completed effects bootstrap

* Segmented address externs for effects, fbdemos, gamestates and kaleido

* Move actor data externs out of the if 0

* Segmented address externs for actors

* Prepare actionfunc detection

* fix script, how did it even work before

* Fix actionfunc script again, re-introduce some more intermediate prints to the disassembler

* Automated actionFunc detection in actors

* Segmented addresses from player .text

* rm old segment addrs script and fix build

* Move sizes folder to tools

* Make build.py executable

* New Jenkinsfile Prayge

* Remove numpy dependencies

* Add warnings_disasm_current.txt

* my bad

* Update spec and undefined_syms

* Add z_eff_ss_hahen to pametfrog

* git subrepo pull (merge) --force tools/z64compress

subrepo:
  subdir:   "tools/z64compress"
  merged:   "163ca2af"
upstream:
  origin:   "https://github.com/z64me/z64compress.git"
  branch:   "main"
  commit:   "163ca2af"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Make z64compress print to stdout

* sneeky commit to update warnings tooling

* test

* Another test

* Mark fixing overlay reloc generating as a TODO

* Update warnings stuff

* Communicate the return code from running z64compress back to the Makefile through the wrapper

* Run formatter, remove extra commented copy of function

* Re-fix some includes

* Convert atan to hex to conform to decided style

* Some tidying up, remove c for fp and the other two handwritten code files

* BSS in z_collision_check & z_scene_proc

* add static back in

* Fix timerintr bss, add file to spec, some cleanup

* Remove externs

* Newline

* Readd enums

* Typo

* Colours

* Comments for hitmark enum values

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* Improvements and suggestions

* Organize and remove unused imports and use env for python3 scripts, delete unused overlay.py

Co-authored-by: angie <angheloalf95@gmail.com>
Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2021-08-03 23:21:31 -04:00

432 lines
17 KiB
C

#ifndef _Z_COLLISION_CHECK_H_
#define _Z_COLLISION_CHECK_H_
#include "PR/ultratypes.h"
#include "z64math.h"
#include "unk.h"
struct Actor;
typedef struct {
/* 0x00 */ struct Actor* actor; // Attached actor
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} Collider; // size = 0x18
typedef struct {
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
/* 0x02 */ u8 acFlags; // Information flags for OC collisions.
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x04 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x05 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInit; // size = 0x06
typedef struct {
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
/* 0x02 */ u8 acFlags; // Information flags for AC collisions.
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x04 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitType1; // size = 0x05
typedef struct {
/* 0x00 */ struct Actor* actor; // Attached actor
/* 0x04 */ u8 atFlags; // Information flags for AT collisions.
/* 0x05 */ u8 acFlags; // Information flags for AC collisions.
/* 0x06 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x07 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitToActor; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 damage; // Damage or Stun Timer
} ColliderTouch; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 damage; // Damage or Stun Timer
} ColliderTouchInit; // size = 0x08
typedef struct {
/* 0x00 */ u32 dmgFlags; // Bumper damage type flags.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
/* 0x06 */ Vec3s hitPos; // Point of contact
} ColliderBump; // size = 0x0C
typedef struct {
/* 0x00 */ u32 dmgFlags; // Bumper exclusion mask
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x05 */ u8 defense; // Damage Resistance
} ColliderBumpInit; // size = 0x08
typedef struct ColliderInfo {
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
} ColliderInfo; // size = 0x28
typedef struct {
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x04 */ ColliderTouchInit toucher; // Damage properties when acting as an AT collider
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
} ColliderInfoInit; // size = 0x18
typedef struct {
/* 0x00 */ Sphere16 modelSphere; // model space sphere
/* 0x08 */ Sphere16 worldSphere; // world space sphere
/* 0x10 */ f32 scale; // worldsphere = modelsphere * scale * 0.01
/* 0x14 */ u8 limb; // attached limb
} ColliderJntSphElementDim; // size = 0x18
typedef struct {
/* 0x00 */ u8 limb; // attached limb
/* 0x02 */ Sphere16 modelSphere; // model space sphere
/* 0x0A */ s16 scale; // world space sphere = model * scale * 0.01
} ColliderJntSphElementDimInit; // size = 0x0C
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x28 */ ColliderJntSphElementDim dim;
} ColliderJntSphElement; // size = 0x40
typedef struct {
/* 0x00 */ ColliderInfoInit info;
/* 0x18 */ ColliderJntSphElementDimInit dim;
} ColliderJntSphElementInit; // size = 0x24
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderJntSphElement* elements;
} ColliderJntSph; // size = 0x20
typedef struct {
/* 0x0 */ ColliderInit base;
/* 0x8 */ s32 count;
/* 0xC */ ColliderJntSphElementInit* elements;
} ColliderJntSphInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitType1; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderJntSphElementInit* elements;
} ColliderJntSphInitToActor; // size = 0x10
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ Cylinder16 dim;
} ColliderCylinder; // size = 0x4C
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitType1; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitToActor; // size = 0x2C
typedef struct {
/* 0x00 */ Vec3f vtx[3];
} ColliderTrisElementDimInit; // size = 0x24
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x28 */ TriNorm dim;
} ColliderTrisElement; // size = 0x5C
typedef struct {
/* 0x00 */ ColliderInfoInit info;
/* 0x18 */ ColliderTrisElementDimInit dim;
} ColliderTrisElementInit; // size = 0x3C
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ s32 count;
/* 0x1C */ ColliderTrisElement* elements;
} ColliderTris; // size = 0x20
typedef struct {
/* 0x0 */ ColliderInit base;
/* 0x8 */ s32 count;
/* 0xC */ ColliderTrisElementInit* elements;
} ColliderTrisInit; // size = 0x10
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ s32 count;
/* 0x0C */ ColliderTrisElementInit* elements;
} ColliderTrisInitType1; // size = 0x10
typedef struct {
/* 0x00 */ Vec3f quad[4];
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
} ColliderQuadDim; // size = 0x40
typedef struct {
/* 0x00 */ Vec3f quad[4];
} ColliderQuadDimInit; // size = 0x30
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ ColliderQuadDim dim;
} ColliderQuad; // size = 0x80
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit; // size = 0x50
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInitType1; // size = 0x50
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ ColliderJntSphElementDim dim;
} ColliderSphere; // size = 0x58
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderJntSphElementDimInit dim;
} ColliderSphereInit; // size = 0x2C
typedef struct {
/* 0x00 */ LineSegment line;
/* 0x18 */ u16 ocFlags;
} OcLine; // size = 0x1C
typedef struct {
/* 0x000 */ s16 colATCount;
/* 0x002 */ u16 sacFlags; // Controls whether new collidors can be added or removed, or only swapped
/* 0x004 */ Collider* colAT[50];
/* 0x0CC */ s32 colACCount;
/* 0x0D0 */ Collider* colAC[60];
/* 0x1C0 */ s32 colOCCount;
/* 0x1C4 */ Collider* colOC[50];
/* 0x28C */ s32 colLineCount;
/* 0x290 */ OcLine* colLine[3];
} CollisionCheckContext; // size = 0x29C
typedef struct {
/* 0 */ u8 blood;
/* 1 */ u8 effect;
} HitInfo; // size = 0x2
typedef enum {
/* 0 */ BLOOD_NONE,
/* 1 */ BLOOD_BLUE,
/* 2 */ BLOOD_GREEN,
/* 3 */ BLOOD_WATER,
/* 4 */ BLOOD_RED,
/* 5 */ BLOOD_RED2
} ColChkBloodType;
typedef enum {
/* 0 */ HIT_WHITE,
/* 1 */ HIT_DUST,
/* 2 */ HIT_RED,
/* 3 */ HIT_SOLID,
/* 4 */ HIT_WOOD,
/* 5 */ HIT_NONE
} ColChkHitType;
typedef enum {
/* 0 */ MASSTYPE_IMMOVABLE,
/* 1 */ MASSTYPE_HEAVY,
/* 2 */ MASSTYPE_NORMAL
} ColChkMassType;
typedef enum {
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
/* 9 */ COLTYPE_METAL,
/* 10 */ COLTYPE_NONE,
/* 11 */ COLTYPE_WOOD,
/* 12 */ COLTYPE_HARD,
/* 13 */ COLTYPE_TREE
} ColliderType;
typedef enum {
/* 0 */ COLSHAPE_JNTSPH,
/* 1 */ COLSHAPE_CYLINDER,
/* 2 */ COLSHAPE_TRIS,
/* 3 */ COLSHAPE_QUAD,
/* 4 */ COLSHAPE_SPHERE,
/* 5 */ COLSHAPE_MAX
} ColliderShape;
typedef enum {
/* 0 */ ELEMTYPE_UNK0,
/* 1 */ ELEMTYPE_UNK1,
/* 2 */ ELEMTYPE_UNK2,
/* 3 */ ELEMTYPE_UNK3,
/* 4 */ ELEMTYPE_UNK4,
/* 5 */ ELEMTYPE_UNK5,
/* 6 */ ELEMTYPE_UNK6,
/* 7 */ ELEMTYPE_UNK7
} ElementType;
#define SAC_ON (1 << 0) // CollisionContext SAC Flag
#define AT_NONE 0 // No flags set. Cannot have AT collisions when set as AT
#define AT_ON (1 << 0) // Can have AT collisions when set as AT
#define AT_HIT (1 << 1) // Had an AT collision
#define AT_BOUNCED (1 << 2) // Had an AT collision with an AC_HARD collider
#define AT_TYPE_PLAYER (1 << 3) // Has player-aligned damage
#define AT_TYPE_ENEMY (1 << 4) // Has enemy-aligned damage
#define AT_TYPE_OTHER (1 << 5) // Has non-aligned damage
#define AT_SELF (1 << 6) // Can have AT collisions with colliders attached to the same actor
#define AT_TYPE_ALL (AT_TYPE_PLAYER | AT_TYPE_ENEMY | AT_TYPE_OTHER) // Has all three damage alignments
#define AC_NONE 0 // No flags set. Cannot have AC collisions when set as AC
#define AC_ON (1 << 0) // Can have AC collisions when set as AC
#define AC_HIT (1 << 1) // Had an AC collision
#define AC_HARD (1 << 2) // Causes AT colliders to bounce off it
#define AC_TYPE_PLAYER AT_TYPE_PLAYER // Takes player-aligned damage
#define AC_TYPE_ENEMY AT_TYPE_ENEMY // Takes enemy-aligned damage
#define AC_TYPE_OTHER AT_TYPE_OTHER // Takes non-aligned damage
#define AC_NO_DAMAGE (1 << 6) // Collider does not take damage
#define AC_BOUNCED (1 << 7) // Caused an AT collider to bounce off it
#define AC_TYPE_ALL (AC_TYPE_PLAYER | AC_TYPE_ENEMY | AC_TYPE_OTHER) // Takes damage from all three alignments
#define OC1_NONE 0 // No flags set. Cannot have OC collisions when set as OC
#define OC1_ON (1 << 0) // Can have OC collisions when set as OC
#define OC1_HIT (1 << 1) // Had an OC collision
#define OC1_NO_PUSH (1 << 2) // Does not push other colliders away during OC collisions
#define OC1_TYPE_PLAYER (1 << 3) // Can have OC collisions with OC type player
#define OC1_TYPE_1 (1 << 4) // Can have OC collisions with OC type 1
#define OC1_TYPE_2 (1 << 5) // Can have OC collisions with OC type 2
#define OC1_TYPE_ALL (OC1_TYPE_PLAYER | OC1_TYPE_1 | OC1_TYPE_2) // Can have collisions with all three OC types
#define OC2_NONE 0 // No flags set. Has no OC type
#define OC2_HIT_PLAYER (1 << 0) // Had an OC collision with OC type player
#define OC2_UNK1 (1 << 1) // Prevents OC collisions with OC2_UNK2. Some horses and toki_sword have it.
#define OC2_UNK2 (1 << 2) // Prevents OC collisions with OC2_UNK1. Nothing has it.
#define OC2_TYPE_PLAYER OC1_TYPE_PLAYER // Has OC type player
#define OC2_TYPE_1 OC1_TYPE_1 // Has OC type 1
#define OC2_TYPE_2 OC1_TYPE_2 // Has OC type 2
#define OC2_FIRST_ONLY (1 << 6) // Skips AC checks on elements after the first collision. Only used by Ganon
#define TOUCH_NONE 0 // No flags set. Cannot have AT collisions
#define TOUCH_ON (1 << 0) // Can have AT collisions
#define TOUCH_HIT (1 << 1) // Had an AT collision
#define TOUCH_NEAREST (1 << 2) // If a Quad, only collides with the closest bumper
#define TOUCH_SFX_NORMAL (0 << 3) // Hit sound effect based on AC collider's type
#define TOUCH_SFX_HARD (1 << 3) // Always uses hard deflection sound
#define TOUCH_SFX_WOOD (2 << 3) // Always uses wood deflection sound
#define TOUCH_SFX_NONE (3 << 3) // No hit sound effect
#define TOUCH_AT_HITMARK (1 << 5) // Draw hitmarks for every AT collision
#define TOUCH_DREW_HITMARK (1 << 6) // Already drew hitmark for this frame
#define TOUCH_UNK7 (1 << 7) // Unknown purpose. Used by some enemy quads
#define BUMP_NONE 0 // No flags set. Cannot have AC collisions
#define BUMP_ON (1 << 0) // Can have AC collisions
#define BUMP_HIT (1 << 1) // Had an AC collision
#define BUMP_HOOKABLE (1 << 2) // Can be hooked if actor has hookability flags set.
#define BUMP_NO_AT_INFO (1 << 3) // Does not give its info to the AT collider that hit it.
#define BUMP_NO_DAMAGE (1 << 4) // Does not take damage.
#define BUMP_NO_SWORD_SFX (1 << 5) // Does not have a sound when hit by player-attached AT colliders.
#define BUMP_NO_HITMARK (1 << 6) // Skips hit effects.
#define BUMP_DRAW_HITMARK (1 << 7) // Draw hitmark for AC collision this frame.
#define OCELEM_NONE 0 // No flags set. Cannot have OC collisions
#define OCELEM_ON (1 << 0) // Can have OC collisions
#define OCELEM_HIT (1 << 1) // Had an OC collision
#define OCELEM_UNK2 (1 << 2) // Unknown purpose.
#define OCELEM_UNK3 (1 << 3) // Unknown purpose. Used by Dead Hand element 0 and Dodongo element 5
#define OCLINE_NONE 0 // Did not have an OcLine collision
#define OCLINE_HIT (1 << 0) // Had an OcLine collision
#define DMG_ENTRY(damage, effect) ((damage) | ((effect) << 4))
// These flags are not to be used in code until we figure out how we want to format them. They are only here for reference
#define DMG_DEKU_NUT (1 << 0x00)
#define DMG_DEKU_STICK (1 << 0x01)
#define DMG_HORSE_TRAMPLE (1 << 0x02)
#define DMG_EXPLOSIVES (1 << 0x03)
#define DMG_ZORA_BOOMERANG (1 << 0x04)
#define DMG_NORMAL_ARROW (1 << 0x05)
#define DMG_UNK_0x06 (1 << 0x06)
#define DMG_HOOKSHOT (1 << 0x07)
#define DMG_GORON_PUNCH (1 << 0x08)
#define DMG_SWORD (1 << 0x09)
#define DMG_GORON_POUND (1 << 0x0A)
#define DMG_FIRE_ARROW (1 << 0x0B)
#define DMG_ICE_ARROW (1 << 0x0C)
#define DMG_LIGHT_ARROW (1 << 0x0D)
#define DMG_GORON_SPIKES (1 << 0x0E)
#define DMG_DEKU_SPIN (1 << 0x0F)
#define DMG_DEKU_BUBBLE (1 << 0x10)
#define DMG_DEKU_LAUNCH (1 << 0x11)
#define DMG_UNK_0x12 (1 << 0x12)
#define DMG_ZORA_BARRIER (1 << 0x13)
#define DMG_NORMAL_SHIELD (1 << 0x14)
#define DMG_LIGHT_RAY (1 << 0x15)
#define DMG_THROWN_OBJECT (1 << 0x16)
#define DMG_ZORA_PUNCH (1 << 0x17)
#define DMG_SPIN_ATTACK (1 << 0x18)
#define DMG_SWORD_BEAM (1 << 0x19)
#define DMG_NORMAL_ROLL (1 << 0x1A)
#define DMG_UNK_0x1B (1 << 0x1B)
#define DMG_UNK_0x1C (1 << 0x1C)
#define DMG_UNBLOCKABLE (1 << 0x1D)
#define DMG_UNK_0x1E (1 << 0x1E)
#define DMG_POWDER_KEG (1 << 0x1F)
#endif