Document Collision_Check (#468)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* some decomp

* still playing around with this

* rename functions

* ZAP again

* ZAP again

* the renaming begins

* more renaming. hopefully didn't break anything

* change all the things

* this and then merge

* and done

* one little thing

* small docs, small rename

* changed mind on cylinder and quad elements

* something

* more stuff

* more docs

* more adjustments

* Fixed some types

* more fixes

* all sorts of cleanup

* now with flags

* match!

* names and such

* update tools

* damage tables

* ColChkInfo

* one more thing

* formatting

* more formatting

* anime merge

* some stuff

* damage table

* again

* changes

* .s

* changes

* oc2 type

* a couple things

* format

* un-name magic arrows, not enough proof yet

* fix damage table script and remove old one

* EnAObj

* changes

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
petrie911
2021-01-17 20:13:36 -06:00
committed by GitHub
parent f786f958bb
commit 02994f5339
487 changed files with 14371 additions and 4713 deletions
+50 -45
View File
@@ -820,7 +820,7 @@ void Actor_Init(Actor* actor, GlobalContext* globalCtx) {
actor->uncullZoneForward = 1000.0f;
actor->uncullZoneScale = 350.0f;
actor->uncullZoneDownward = 700.0f;
func_80061E48(&actor->colChkInfo);
CollisionCheck_InitInfo(&actor->colChkInfo);
actor->floorPolySource = BGCHECK_SCENE;
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) {
@@ -1432,17 +1432,21 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
}
typedef struct {
f32 unk_0, unk_4;
} struct_80115FF8; // size = 0x8
/* 0x0 */ f32 rangeSq;
/* 0x4 */ f32 leashScale;
} TargetRangeParams; // size = 0x8
struct_80115FF8 D_80115FF8[] = {
{ 4900.0f, 0.5f }, { 28900.0f, 0.6666667f }, { 78400.0f, 0.05f }, { 122500.0f, 0.6666667f },
{ 490000.0f, 0.6666667f }, { 1000000.0f, 0.6666667f }, { 10000.0f, 0.94905096f }, { 19600.0f, 0.85714287f },
{ 57600.0f, 0.41666666f }, { 78400.0f, 0.001f },
#define TARGET_RANGE(range, leash) \
{ SQ(range), (f32)range / leash }
TargetRangeParams D_80115FF8[] = {
TARGET_RANGE(70, 140), TARGET_RANGE(170, 255), TARGET_RANGE(280, 5600), TARGET_RANGE(350, 525),
TARGET_RANGE(700, 1050), TARGET_RANGE(1000, 1500), TARGET_RANGE(100, 105.36842), TARGET_RANGE(140, 163.33333),
TARGET_RANGE(240, 576), TARGET_RANGE(280, 280000),
};
u32 func_8002F090(Actor* actor, f32 arg1) {
return arg1 < D_80115FF8[actor->unk_1F].unk_0;
return arg1 < D_80115FF8[actor->unk_1F].rangeSq;
}
s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
@@ -1464,7 +1468,7 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
dist = actor->xyzDistToLinkSq;
}
return !func_8002F090(actor, D_80115FF8[actor->unk_1F].unk_4 * dist);
return !func_8002F090(actor, D_80115FF8[actor->unk_1F].leashScale * dist);
}
return 0;
@@ -1722,7 +1726,7 @@ void func_8002F994(Actor* actor, s32 arg1) {
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) {
if (func_80041D4C(&globalCtx->colCtx, poly, bgId) == 8) {
globalCtx->unk_11D30[0] = 1;
func_8005DFAC(globalCtx, NULL, pos);
CollisionCheck_BlueBlood(globalCtx, NULL, pos);
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
return true;
}
@@ -2063,7 +2067,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
} else if ((unkFlag && !(actor->flags & unkFlag)) ||
(!unkFlag && unkCondition && (sp74 != actor) && (actor != player->naviActor) &&
(actor != player->heldActor) && (&player->actor != actor->parent))) {
func_80061E8C(&actor->colChkInfo);
CollisionCheck_ResetDamage(&actor->colChkInfo);
actor = actor->next;
} else if (actor->update == NULL) {
if (!actor->isDrawn) {
@@ -2100,7 +2104,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
func_8003F8EC(globalCtx, &globalCtx->colCtx.dyna, actor);
}
func_80061E8C(&actor->colChkInfo);
CollisionCheck_ResetDamage(&actor->colChkInfo);
actor = actor->next;
}
@@ -2440,7 +2444,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
}
if ((HREG(64) != 1) || (HREG(76) != 0)) {
CollisionCheck_Draw(globalCtx, &globalCtx->colChkCtx);
CollisionCheck_DrawCollision(globalCtx, &globalCtx->colChkCtx);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6563);
@@ -2498,7 +2502,7 @@ void func_80031B14(GlobalContext* globalCtx, ActorContext* actorCtx) {
}
}
CollisionCheck_InitContext(globalCtx, &globalCtx->colChkCtx);
CollisionCheck_ClearContext(globalCtx, &globalCtx->colChkCtx);
actorCtx->flags.tempClear = 0;
actorCtx->flags.tempSwch &= 0xFFFFFF;
globalCtx->msgCtx.unk_E3F4 = 0;
@@ -3198,8 +3202,8 @@ void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s1
}
Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider) {
if ((collider->acFlags & 0x2) && (collider->ac->type == ACTORTYPE_EXPLOSIVES)) {
collider->acFlags &= ~0x2;
if ((collider->acFlags & AC_HIT) && (collider->ac->type == ACTORTYPE_EXPLOSIVES)) {
collider->acFlags &= ~AC_HIT;
return collider->ac;
}
@@ -3267,8 +3271,9 @@ Actor* func_80033780(GlobalContext* globalCtx, Actor* refActor, f32 arg2) {
spA8.y = itemActor->actor.posRot.pos.y + deltaY;
spA8.z = itemActor->actor.posRot.pos.z + deltaZ;
if (func_80062ECC(refActor->colChkInfo.unk_10, refActor->colChkInfo.unk_12, 0.0f, &refActor->posRot.pos,
&itemActor->actor.posRot.pos, &spA8, &sp90, &sp84)) {
if (CollisionCheck_CylSideVsLineSeg(refActor->colChkInfo.unk_10, refActor->colChkInfo.unk_12, 0.0f,
&refActor->posRot.pos, &itemActor->actor.posRot.pos, &spA8, &sp90,
&sp84)) {
return &itemActor->actor;
} else {
actor = actor->next;
@@ -3555,7 +3560,7 @@ void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 frame, s32 type) {
}
void func_8003424C(GlobalContext* globalCtx, Vec3f* arg1) {
func_80062D60(globalCtx, arg1);
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, arg1);
}
void func_8003426C(Actor* actor, s16 arg1, s16 arg2, s16 arg3, s16 arg4) {
@@ -3985,7 +3990,7 @@ void func_800355B8(GlobalContext* globalCtx, Vec3f* arg1) {
u8 func_800355E4(GlobalContext* globalCtx, Collider* collider) {
Player* player = PLAYER;
if ((collider->acFlags & 0x08) && (player->swordState != 0) && (player->swordAnimation == 0x16)) {
if ((collider->acFlags & AC_TYPE_PLAYER) && (player->swordState != 0) && (player->swordAnimation == 0x16)) {
return 1;
} else {
return 0;
@@ -4002,27 +4007,27 @@ u8 Actor_ApplyDamage(Actor* actor) {
return actor->colChkInfo.health;
}
void func_80035650(Actor* actor, ColliderBody* colBody, s32 freezeFlag) {
if (colBody->acHitItem == NULL) {
void func_80035650(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag) {
if (colInfo->acHitInfo == NULL) {
actor->unk_116 = 0x00;
} else if (freezeFlag && (colBody->acHitItem->toucher.flags & 0x10060000)) {
actor->freezeTimer = colBody->acHitItem->toucher.damage;
} else if (freezeFlag && (colInfo->acHitInfo->toucher.dmgFlags & 0x10060000)) {
actor->freezeTimer = colInfo->acHitInfo->toucher.damage;
actor->unk_116 = 0x00;
} else if (colBody->acHitItem->toucher.flags & 0x0800) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x0800) {
actor->unk_116 = 0x01;
} else if (colBody->acHitItem->toucher.flags & 0x1000) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x1000) {
actor->unk_116 = 0x02;
} else if (colBody->acHitItem->toucher.flags & 0x4000) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x4000) {
actor->unk_116 = 0x04;
} else if (colBody->acHitItem->toucher.flags & 0x8000) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x8000) {
actor->unk_116 = 0x08;
} else if (colBody->acHitItem->toucher.flags & 0x10000) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x10000) {
actor->unk_116 = 0x10;
} else if (colBody->acHitItem->toucher.flags & 0x2000) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x2000) {
actor->unk_116 = 0x20;
} else if (colBody->acHitItem->toucher.flags & 0x80000) {
} else if (colInfo->acHitInfo->toucher.dmgFlags & 0x80000) {
if (freezeFlag) {
actor->freezeTimer = colBody->acHitItem->toucher.damage;
actor->freezeTimer = colInfo->acHitInfo->toucher.damage;
}
actor->unk_116 = 0x40;
} else {
@@ -4031,34 +4036,34 @@ void func_80035650(Actor* actor, ColliderBody* colBody, s32 freezeFlag) {
}
void func_8003573C(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag) {
ColliderBody* curColBody;
ColliderInfo* curColInfo;
s32 flag;
s32 i;
actor->unk_116 = 0x00;
for (i = jntSph->count - 1; i >= 0; i--) {
curColBody = &jntSph->list[i].body;
if (curColBody->acHitItem == NULL) {
curColInfo = &jntSph->elements[i].info;
if (curColInfo->acHitInfo == NULL) {
flag = 0x00;
} else if (freezeFlag && (curColBody->acHitItem->toucher.flags & 0x10060000)) {
actor->freezeTimer = curColBody->acHitItem->toucher.damage;
} else if (freezeFlag && (curColInfo->acHitInfo->toucher.dmgFlags & 0x10060000)) {
actor->freezeTimer = curColInfo->acHitInfo->toucher.damage;
flag = 0x00;
} else if (curColBody->acHitItem->toucher.flags & 0x0800) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x0800) {
flag = 0x01;
} else if (curColBody->acHitItem->toucher.flags & 0x1000) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x1000) {
flag = 0x02;
} else if (curColBody->acHitItem->toucher.flags & 0x4000) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x4000) {
flag = 0x04;
} else if (curColBody->acHitItem->toucher.flags & 0x8000) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x8000) {
flag = 0x08;
} else if (curColBody->acHitItem->toucher.flags & 0x10000) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x10000) {
flag = 0x10;
} else if (curColBody->acHitItem->toucher.flags & 0x2000) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x2000) {
flag = 0x20;
} else if (curColBody->acHitItem->toucher.flags & 0x80000) {
} else if (curColInfo->acHitInfo->toucher.dmgFlags & 0x80000) {
if (freezeFlag) {
actor->freezeTimer = curColBody->acHitItem->toucher.damage;
actor->freezeTimer = curColInfo->acHitInfo->toucher.damage;
}
flag = 0x40;
} else {
+2 -2
View File
@@ -4390,7 +4390,7 @@ void BgCheck_DrawDynaPolyList(GlobalContext* globalCtx, CollisionContext* colCtx
vC.y += AREG(26) * ny;
vC.z += AREG(26) * nz;
}
func_8005B2AC(globalCtx->state.gfxCtx, &vA, &vB, &vC, r, g, b);
Collider_DrawPoly(globalCtx->state.gfxCtx, &vA, &vB, &vC, r, g, b);
if (curNode->next == SS_NULL) {
break;
}
@@ -4461,7 +4461,7 @@ void BgCheck_DrawStaticPoly(GlobalContext* globalCtx, CollisionContext* colCtx,
vC.y += AREG(26) * ny;
vC.z += AREG(26) * nz;
}
func_8005B2AC(globalCtx->state.gfxCtx, &vA, &vB, &vC, r, g, b);
Collider_DrawPoly(globalCtx->state.gfxCtx, &vA, &vB, &vC, r, g, b);
}
/**
+4 -4
View File
@@ -3382,8 +3382,8 @@ s32 Camera_KeepOn3(Camera* camera) {
Camera_Vec3fVecSphGeoAdd(&lineChkPointB, &anim->atTarget, &atToEyeAdj);
if (!(keep3->flags & 0x80)) {
while (i < angleCnt) {
if (!func_800626B0(camera->globalCtx, &camera->globalCtx->colChkCtx, &anim->atTarget, &lineChkPointB,
&colChkActors, 2) &&
if (!CollisionCheck_LineOCCheck(camera->globalCtx, &camera->globalCtx->colChkCtx, &anim->atTarget,
&lineChkPointB, &colChkActors, 2) &&
!Camera_BGCheck(camera, &anim->atTarget, &lineChkPointB)) {
break;
}
@@ -3666,8 +3666,8 @@ s32 Camera_KeepOn4(Camera* camera) {
if (!(keep4->unk_1C & 1)) {
angleCnt = ARRAY_COUNT(D_8011D3B0);
for (i = 0; i < angleCnt; i++) {
if (!func_800626B0(camera->globalCtx, &camera->globalCtx->colChkCtx, &D_8015BD50, &D_8015BD70, spCC,
sp9C) &&
if (!CollisionCheck_LineOCCheck(camera->globalCtx, &camera->globalCtx->colChkCtx, &D_8015BD50,
&D_8015BD70, spCC, sp9C) &&
!Camera_BGCheck(camera, &D_8015BD50, &D_8015BD70)) {
break;
}
+767 -51
View File
@@ -1,109 +1,825 @@
#include "global.h"
DamageTable D_8011DB20[] = {
static DamageTable sDamageTablePresets[] = {
{ {
0x10, 0x01, 0x01, 0x02, 0xE0, 0x01, 0xF2, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x01, 0x01, 0x00, 0x00,
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0xE),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0xF),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0xF),
/* Master sword */ DMG_ENTRY(2, 0xF),
/* Giant's Knife */ DMG_ENTRY(2, 0xF),
/* Fire arrow */ DMG_ENTRY(2, 0x2),
/* Ice arrow */ DMG_ENTRY(1, 0x0),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(2, 0x2),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x01, 0x02, 0xE0, 0x01, 0xF2, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x01, 0x01, 0x00, 0x00,
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 1 Used by En_Karebaba
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0xE),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0xF),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0xF),
/* Master sword */ DMG_ENTRY(2, 0xF),
/* Giant's Knife */ DMG_ENTRY(2, 0xF),
/* Fire arrow */ DMG_ENTRY(2, 0x2),
/* Ice arrow */ DMG_ENTRY(1, 0x0),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(2, 0x2),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x02, 0x01, 0x02, 0x10, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
// 2 Used by En_St, En_Ssh
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(2, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(2, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(4, 0x0),
/* Ice arrow */ DMG_ENTRY(4, 0x0),
/* Light arrow */ DMG_ENTRY(4, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(3, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(4, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(4, 0x0),
/* Master jump */ DMG_ENTRY(8, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
// 3
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(1, 0x0),
/* Hookshot */ DMG_ENTRY(1, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(1, 0x0),
/* Giant's Knife */ DMG_ENTRY(1, 0x0),
/* Fire arrow */ DMG_ENTRY(1, 0x0),
/* Ice arrow */ DMG_ENTRY(1, 0x0),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(1, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(1, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(1, 0x0),
/* Fire magic */ DMG_ENTRY(1, 0x0),
/* Ice magic */ DMG_ENTRY(1, 0x0),
/* Light magic */ DMG_ENTRY(1, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(2, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(2, 0x0),
/* Master jump */ DMG_ENTRY(2, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
// 4 Used by En_Dodojr
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(2, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(2, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(4, 0x0),
/* Ice arrow */ DMG_ENTRY(4, 0x0),
/* Light arrow */ DMG_ENTRY(4, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(4, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(4, 0x0),
/* Master jump */ DMG_ENTRY(8, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x01, 0x00, 0x10, 0x01, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, 0x31, 0x01, 0x00, 0x00,
0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 5
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(1, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(1, 0x0),
/* Giant's Knife */ DMG_ENTRY(1, 0x0),
/* Fire arrow */ DMG_ENTRY(1, 0x0),
/* Ice arrow */ DMG_ENTRY(1, 0x3),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(1, 0x3),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(1, 0x0),
/* Master spin */ DMG_ENTRY(1, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x04, 0x00, 0x02, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 6
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(3, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(6, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(4, 0x0),
/* Hammer swing */ DMG_ENTRY(4, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(2, 0x0),
/* Master sword */ DMG_ENTRY(6, 0x0),
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
/* Fire arrow */ DMG_ENTRY(6, 0x0),
/* Ice arrow */ DMG_ENTRY(0, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x04, 0x00, 0x02, 0x06, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00,
0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 7
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(3, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(6, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(4, 0x0),
/* Hammer swing */ DMG_ENTRY(4, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(2, 0x0),
/* Master sword */ DMG_ENTRY(6, 0x0),
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
/* Fire arrow */ DMG_ENTRY(6, 0x0),
/* Ice arrow */ DMG_ENTRY(6, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(4, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 8
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(3, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(4, 0x0),
/* Hammer swing */ DMG_ENTRY(4, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(2, 0x0),
/* Master sword */ DMG_ENTRY(0, 0x0),
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(0, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(4, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x02, 0x02, 0x01, 0x02, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
// 9 Used by En_Bubble
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(0, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(2, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(4, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(4, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(4, 0x0),
/* Master jump */ DMG_ENTRY(8, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x00, 0xE2, 0x10, 0x01, 0x02, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x32, 0x01, 0x00, 0x00,
0x00, 0x22, 0x32, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 10
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(2, 0xE),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0xF),
/* Master sword */ DMG_ENTRY(2, 0xF),
/* Giant's Knife */ DMG_ENTRY(2, 0xF),
/* Fire arrow */ DMG_ENTRY(2, 0x2),
/* Ice arrow */ DMG_ENTRY(2, 0x3),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(2, 0x2),
/* Ice magic */ DMG_ENTRY(2, 0x3),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 11 Used by En_Horse
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(0, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(0, 0x0),
/* Hammer swing */ DMG_ENTRY(0, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(9, 0x0),
/* Master sword */ DMG_ENTRY(0, 0x0),
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(0, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 12
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(4, 0x0),
/* Hammer swing */ DMG_ENTRY(4, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(2, 0x0),
/* Master sword */ DMG_ENTRY(4, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(0, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(4, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x01, 0x02, 0x10, 0x01, 0x02, 0x10, 0x01, 0x02, 0x02, 0x22, 0x01, 0x01, 0x00, 0x00,
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 13
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(2, 0x0),
/* Fire arrow */ DMG_ENTRY(2, 0x2),
/* Ice arrow */ DMG_ENTRY(1, 0x0),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(2, 0x2),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(1, 0x0),
/* Master spin */ DMG_ENTRY(1, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
// 14 Used by En_Sw
/* Deku nut */ DMG_ENTRY(1, 0x0),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(2, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(2, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(4, 0x0),
/* Ice arrow */ DMG_ENTRY(4, 0x0),
/* Light arrow */ DMG_ENTRY(4, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(4, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(4, 0x0),
/* Master jump */ DMG_ENTRY(8, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 15 Used by En_Fd
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(0, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(0, 0x0),
/* Hammer swing */ DMG_ENTRY(0, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(0, 0x0),
/* Master sword */ DMG_ENTRY(0, 0x0),
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(0, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
// 16 Used by En_Fw
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(2, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(2, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(4, 0x0),
/* Ice arrow */ DMG_ENTRY(4, 0x0),
/* Light arrow */ DMG_ENTRY(4, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(4, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(4, 0x0),
/* Master jump */ DMG_ENTRY(8, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 17
/* Deku nut */ DMG_ENTRY(1, 0x0),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(1, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(1, 0x0),
/* Hookshot */ DMG_ENTRY(1, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(1, 0x0),
/* Giant's Knife */ DMG_ENTRY(1, 0x0),
/* Fire arrow */ DMG_ENTRY(1, 0x0),
/* Ice arrow */ DMG_ENTRY(1, 0x0),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(1, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(1, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(1, 0x0),
/* Fire magic */ DMG_ENTRY(1, 0x0),
/* Ice magic */ DMG_ENTRY(1, 0x0),
/* Light magic */ DMG_ENTRY(1, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 18
/* Deku nut */ DMG_ENTRY(1, 0x0),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(1, 0x0),
/* Boomerang */ DMG_ENTRY(1, 0x0),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(1, 0x0),
/* Hookshot */ DMG_ENTRY(1, 0x0),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(1, 0x0),
/* Giant's Knife */ DMG_ENTRY(1, 0x0),
/* Fire arrow */ DMG_ENTRY(1, 0x0),
/* Ice arrow */ DMG_ENTRY(1, 0x0),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(1, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(1, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(1, 0x0),
/* Fire magic */ DMG_ENTRY(1, 0x0),
/* Ice magic */ DMG_ENTRY(1, 0x0),
/* Light magic */ DMG_ENTRY(1, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x00, 0x02, 0x10, 0x01, 0x02, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x32, 0x01, 0x00, 0x00,
0x00, 0x22, 0x32, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 19
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0xF),
/* Master sword */ DMG_ENTRY(2, 0xF),
/* Giant's Knife */ DMG_ENTRY(2, 0xF),
/* Fire arrow */ DMG_ENTRY(2, 0x2),
/* Ice arrow */ DMG_ENTRY(2, 0x3),
/* Light arrow */ DMG_ENTRY(1, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(2, 0x2),
/* Ice magic */ DMG_ENTRY(2, 0x3),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x01, 0xF2, 0xE0, 0x01, 0xD2, 0x10, 0x01, 0x02, 0x02, 0x00, 0x32, 0x00, 0x00, 0x00,
0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 20
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0xF),
/* Boomerang */ DMG_ENTRY(0, 0xE),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0xD),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(2, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(2, 0x3),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(2, 0x3),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(2, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x10, 0x01, 0x00, 0xF0, 0x10, 0x01, 0xF0, 0x10, 0x01, 0x02, 0x02, 0x00, 0x12, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 21
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(1, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0xF),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(1, 0x0),
/* Hammer swing */ DMG_ENTRY(0, 0xF),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(2, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(2, 0x1),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(2, 0x1),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
{ {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 22 Used by En_Du, En_Go, En_Ma1, En_Ma2, En_Ma3
/* Deku nut */ DMG_ENTRY(0, 0x0),
/* Deku stick */ DMG_ENTRY(0, 0x0),
/* Slingshot */ DMG_ENTRY(0, 0x0),
/* Explosive */ DMG_ENTRY(0, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x0),
/* Normal arrow */ DMG_ENTRY(0, 0x0),
/* Hammer swing */ DMG_ENTRY(0, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x0),
/* Kokiri sword */ DMG_ENTRY(0, 0x0),
/* Master sword */ DMG_ENTRY(0, 0x0),
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
/* Fire arrow */ DMG_ENTRY(0, 0x0),
/* Ice arrow */ DMG_ENTRY(0, 0x0),
/* Light arrow */ DMG_ENTRY(0, 0x0),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x0),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(0, 0x0),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
/* Giant spin */ DMG_ENTRY(0, 0x0),
/* Master spin */ DMG_ENTRY(0, 0x0),
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
/* Giant jump */ DMG_ENTRY(0, 0x0),
/* Master jump */ DMG_ENTRY(0, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(0, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
} },
};
// Gets the pointer to one of the 23 preset damage tables. Returns NULL if index is out of range.
DamageTable* DamageTable_Get(s32 index) {
if (index < 0 || index >= 23) {
if (!(0 <= index && index < ARRAY_COUNT(sDamageTablePresets))) {
// Index over
osSyncPrintf("CollisionBtlTbl_get():インデックスオーバー\n");
return 0;
return NULL;
}
return &D_8011DB20[index];
return &sDamageTablePresets[index];
}
void func_8005B248(DamageTable* table) {
// Sets all entries in the damage table to 0x00
void DamageTable_Clear(DamageTable* table) {
s32 i;
for (i = 0; i < 32; i++) {
table->table[i] = 0;
+2122 -1783
View File
File diff suppressed because it is too large Load Diff
+20 -6
View File
@@ -34,8 +34,22 @@ const ActorInit En_A_Obj_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x39, 0x39, 0x20, COLSHAPE_CYLINDER },
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_ALL,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK2,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 25, 60, 0, { 0, 0, 0 } },
};
@@ -138,7 +152,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
func_8001D234(this, thisx->params);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
thisx->colChkInfo.mass = 0xFF;
thisx->colChkInfo.mass = MASS_IMMOVABLE;
thisx->unk_1F = 0;
break;
case A_OBJ_KNOB:
@@ -152,7 +166,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (thisx->params < 5) {
thisx->colChkInfo.mass = 0xFF;
thisx->colChkInfo.mass = MASS_IMMOVABLE;
}
if (this->dyna.bgId != BGACTOR_NEG_ONE) {
@@ -315,8 +329,8 @@ void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx) {
switch (this->dyna.actor.params) {
case A_OBJ_SIGNPOST_OBLONG:
case A_OBJ_SIGNPOST_ARROW:
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
+2 -2
View File
@@ -499,8 +499,8 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
if ((this->actor.params == ITEM00_SHIELD_DEKU) || (this->actor.params == ITEM00_SHIELD_HYLIAN) ||
(this->actor.params == ITEM00_TUNIC_ZORA) || (this->actor.params == ITEM00_TUNIC_GORON)) {
+4 -4
View File
@@ -237,7 +237,7 @@ void Gameplay_Init(GameState* thisx) {
func_8006BA00(globalCtx);
Effect_InitContext(globalCtx);
EffectSs_InitInfo(globalCtx, 0x55);
func_8005D3BC(globalCtx, &globalCtx->colChkCtx);
CollisionCheck_InitContext(globalCtx, &globalCtx->colChkCtx);
AnimationContext_Reset(&globalCtx->animationCtx);
func_8006450C(globalCtx, &globalCtx->csCtx);
@@ -835,7 +835,7 @@ void Gameplay_Update(GlobalContext* globalCtx) {
LOG_NUM("1", 1, "../z_play.c", 3612);
}
func_8006139C(globalCtx, &globalCtx->colChkCtx);
CollisionCheck_AT(globalCtx, &globalCtx->colChkCtx);
if (1 && HREG(63)) {
LOG_NUM("1", 1, "../z_play.c", 3618);
@@ -847,13 +847,13 @@ void Gameplay_Update(GlobalContext* globalCtx) {
LOG_NUM("1", 1, "../z_play.c", 3624);
}
func_800622E4(globalCtx, &globalCtx->colChkCtx);
CollisionCheck_Damage(globalCtx, &globalCtx->colChkCtx);
if (1 && HREG(63)) {
LOG_NUM("1", 1, "../z_play.c", 3631);
}
CollisionCheck_InitContext(globalCtx, &globalCtx->colChkCtx);
CollisionCheck_ClearContext(globalCtx, &globalCtx->colChkCtx);
if (1 && HREG(63)) {
LOG_NUM("1", 1, "../z_play.c", 3637);
+9 -9
View File
@@ -945,7 +945,7 @@ u8 func_80090480(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* w
Vec3f* newBase) {
if (weaponInfo->active == 0) {
if (collider != NULL) {
Collider_QuadSetAT(globalCtx, &collider->base);
Collider_ResetQuadAT(globalCtx, &collider->base);
}
Math_Vec3f_Copy(&weaponInfo->tip, newTip);
Math_Vec3f_Copy(&weaponInfo->base, newBase);
@@ -955,12 +955,12 @@ u8 func_80090480(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* w
(weaponInfo->tip.z == newTip->z) && (weaponInfo->base.x == newBase->x) &&
(weaponInfo->base.y == newBase->y) && (weaponInfo->base.z == newBase->z)) {
if (collider != NULL) {
Collider_QuadSetAT(globalCtx, &collider->base);
Collider_ResetQuadAT(globalCtx, &collider->base);
}
return 0;
} else {
if (collider != NULL) {
func_80062734(collider, newBase, newTip, &weaponInfo->base, &weaponInfo->tip);
Collider_SetQuadVertices(collider, newBase, newTip, &weaponInfo->base, &weaponInfo->tip);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &collider->base);
}
Math_Vec3f_Copy(&weaponInfo->base, newBase);
@@ -972,22 +972,22 @@ u8 func_80090480(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* w
void func_80090604(GlobalContext* globalCtx, Player* this, ColliderQuad* collider, Vec3f* quadSrc) {
static u8 shieldColTypes[PLAYER_SHIELD_MAX] = {
COLTYPE_METAL_SHIELD,
COLTYPE_WOODEN_SHIELD,
COLTYPE_METAL_SHIELD,
COLTYPE_METAL_SHIELD,
COLTYPE_METAL,
COLTYPE_WOOD,
COLTYPE_METAL,
COLTYPE_METAL,
};
if (this->stateFlags1 & 0x400000) {
Vec3f quadDest[4];
this->shieldQuad.base.type = shieldColTypes[this->currentShield];
this->shieldQuad.base.colType = shieldColTypes[this->currentShield];
Matrix_MultVec3f(&quadSrc[0], &quadDest[0]);
Matrix_MultVec3f(&quadSrc[1], &quadDest[1]);
Matrix_MultVec3f(&quadSrc[2], &quadDest[2]);
Matrix_MultVec3f(&quadSrc[3], &quadDest[3]);
func_80062734(collider, &quadDest[0], &quadDest[1], &quadDest[2], &quadDest[3]);
Collider_SetQuadVertices(collider, &quadDest[0], &quadDest[1], &quadDest[2], &quadDest[3]);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &collider->base);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &collider->base);
@@ -25,8 +25,22 @@ const ActorInit Arms_Hook_InitVars = {
};
ColliderQuadInit sQuadInit = {
{ COLTYPE_UNK10, 0x09, 0x00, 0x00, 0x08, COLSHAPE_QUAD },
{ 0x02, { 0x00000080, 0x00, 0x01 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x05, 0x00, 0x00 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_PLAYER,
AC_NONE,
OC1_NONE,
OC2_TYPE_PLAYER,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK2,
{ 0x00000080, 0x00, 0x01 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ 0 },
};
@@ -161,10 +175,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
ArmsHook_CheckForCancel(this);
if (this->timer != 0) {
if ((this->collider.base.atFlags & 2) && (this->collider.body.atHitItem->flags != 4)) {
if ((this->collider.base.atFlags & AT_HIT) && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) {
if (this->collider.body.atHitItem->bumperFlags & 4) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor);
if ((touchedActor->flags & 0x400) == 0x400) {
func_80865044(this);
@@ -278,7 +292,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
&D_801333E0, &D_801333E8);
return;
}
func_80062D60(globalCtx, &this->actor.posRot.pos);
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &this->actor.posRot.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
return;
@@ -45,8 +45,22 @@ const ActorInit Bg_Bdan_Objects_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x00, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x09, 0x00, 0x00 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_HARD,
BUMP_NONE,
OCELEM_NONE,
},
{ 0x00BB, 0x0050, 0x0000, { 0 } },
};
@@ -298,8 +312,8 @@ void func_8086C5BC(BgBdanObjects* this, GlobalContext* globalCtx) {
}
void func_8086C618(BgBdanObjects* this, GlobalContext* globalCtx) {
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
Flags_SetSwitch(globalCtx, this->unk_168);
this->dyna.actor.initPosRot.rot.y = (s16)(this->dyna.actor.shape.rot.y + 0x2000) & 0xC000;
@@ -59,17 +59,31 @@ extern CollisionHeader D_06005CF8;
extern Gfx D_060061A0[];
extern Gfx D_06005A20[];
static ColliderJntSphItemInit sJntSphItemsInit[] = {
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xEFC1FFFE, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{ 0x00, { { 0x0000, 0x0078, 0x0000 }, 370 }, 100 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xEFC1FFFE, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 120, 0 }, 370 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x39, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -398,14 +412,14 @@ void func_8086DB68(BgBdanSwitch* this, GlobalContext* globalCtx) {
default:
return;
case YELLOW_TALL_1:
if (((this->collider.base.acFlags & 2) != 0) && this->unk_1D8 <= 0) {
if (((this->collider.base.acFlags & AC_HIT) != 0) && this->unk_1D8 <= 0) {
this->unk_1D8 = 0xA;
func_8086DC30(this);
func_8086D4B4(this, globalCtx);
}
break;
case YELLOW_TALL_2:
if (((this->collider.base.acFlags & 2) != 0) && ((this->unk_1DC & 2) == 0) && this->unk_1D8 <= 0) {
if (((this->collider.base.acFlags & AC_HIT) != 0) && ((this->unk_1DC & 2) == 0) && this->unk_1D8 <= 0) {
this->unk_1D8 = 0xA;
func_8086DC30(this);
func_8086D4B4(this, globalCtx);
@@ -441,7 +455,7 @@ void func_8086DCE8(BgBdanSwitch* this, GlobalContext* globalCtx) {
}
break;
case YELLOW_TALL_2:
if (((this->collider.base.acFlags & 2) != 0) && ((this->unk_1DC & 2) == 0) && (this->unk_1D8 <= 0)) {
if (((this->collider.base.acFlags & AC_HIT) != 0) && ((this->unk_1DC & 2) == 0) && (this->unk_1D8 <= 0)) {
this->unk_1D8 = 0xA;
func_8086DDA8(this);
func_8086D548(this, globalCtx);
@@ -466,29 +480,28 @@ void func_8086DDC0(BgBdanSwitch* this, GlobalContext* globalCtx) {
}
void BgBdanSwitch_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgBdanSwitch* this = THIS;
s32 type;
s32 temp;
if (this->unk_1DA > 0) {
this->unk_1DA -= 1;
this->unk_1DA--;
}
this->actionFunc(this, globalCtx);
func_8086D0EC(this);
type = this->dyna.actor.params & 0xFF;
if (type != 3 && type != 4) {
this->unk_1D8 -= 1;
return;
this->unk_1D8--;
} else {
if (!Player_InCsMode(globalCtx) && this->unk_1D8 > 0) {
this->unk_1D8--;
}
this->unk_1DC = this->collider.base.acFlags;
this->collider.base.acFlags &= ~AC_HIT;
this->collider.elements[0].dim.modelSphere.radius = this->unk_1D4 * 370.0f;
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
if (!Player_InCsMode(globalCtx) && this->unk_1D8 > 0) {
this->unk_1D8 -= 1;
}
temp = this->collider.base.acFlags;
this->collider.base.acFlags &= 0xFFFD;
this->unk_1DC = temp;
this->collider.list[0].dim.modelSphere.radius = this->unk_1D4 * 370.0f;
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
void func_8086DF58(BgBdanSwitch* this, GlobalContext* globalCtx, Gfx* dlist) {
@@ -510,7 +523,7 @@ void BgBdanSwitch_Draw(Actor* thisx, GlobalContext* globalCtx) {
case YELLOW_TALL_1:
case YELLOW_TALL_2:
func_8086DF58(this, globalCtx, D_060061A0);
func_800628A4(0, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
Matrix_MultVec3f(&D_8086E0E0, &this->dyna.actor.posRot2.pos);
break;
case BLUE:
@@ -21,7 +21,7 @@ typedef struct BgBdanSwitch {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgBdanSwitchActionFunc actionFunc;
/* 0x0168 */ ColliderJntSph collider;
/* 0x0188 */ ColliderJntSphItem colliderItems[1];
/* 0x0188 */ ColliderJntSphElement colliderItems[1];
/* 0x01C8 */ f32 unk_1C8;
/* 0x01CC */ s16 unk_1CC;
/* 0x01CE */ char unk_1CE[0x2];
@@ -25,25 +25,53 @@ extern CollisionHeader D_050041B0;
extern Gfx D_05003FC0[];
extern Gfx D_05004088[];
static ColliderTrisItemInit sTrimItemInit[3] = {
static ColliderTrisElementInit sTrisElementsInit[3] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x40000048, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000048, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { -70.0f, 176.0f, 0.0f }, { -70.0f, -4.0f, 0.0f }, { 0.0f, -4.0f, 30.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x40000048, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000048, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 70.0f, 176.0f, 0.0f }, { -70.0f, 176.0f, 0.0f }, { 0.0f, -4.0f, 30.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x40000048, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000048, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 70.0f, -4.0f, 0.0f }, { 70.0f, 176.0f, 0.0f }, { 0.0f, -4.0f, 30.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_TRIS,
},
3,
sTrimItemInit,
sTrisElementsInit,
};
const ActorInit Bg_Bombwall_InitVars = {
@@ -109,9 +137,9 @@ void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i <= 2; i++) {
for (j = 0; j <= 2; j++) {
sp80.x = sTrisInit.list[i].dim.vtx[j].x;
sp80.y = sTrisInit.list[i].dim.vtx[j].y;
sp80.z = sTrisInit.list[i].dim.vtx[j].z + 2.0f;
sp80.x = sTrisInit.elements[i].dim.vtx[j].x;
sp80.y = sTrisInit.elements[i].dim.vtx[j].y;
sp80.z = sTrisInit.elements[i].dim.vtx[j].z + 2.0f;
BgBombwall_RotateVec(&vecs[j], &sp80, sin, cos);
@@ -119,7 +147,7 @@ void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx) {
vecs[j].y += this->dyna.actor.posRot.pos.y;
vecs[j].z += this->dyna.actor.posRot.pos.z;
}
func_800627A0(&this->collider, i, &vecs[0], &vecs[1], &vecs[2]);
Collider_SetTrisVertices(&this->collider, i, &vecs[0], &vecs[1], &vecs[2]);
}
this->unk_2A2 |= 1;
@@ -187,8 +215,8 @@ void func_8086ED50(BgBombwall* this, GlobalContext* globalCtx) {
}
void func_8086ED70(BgBombwall* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_8086EDFC(this, globalCtx);
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
} else if (this->dyna.actor.xzDistToLink < 600.0f) {
@@ -11,7 +11,7 @@ typedef void (*BgBombwallActionFunc)(struct BgBombwall*, GlobalContext*);
typedef struct BgBombwall {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderTris collider;
/* 0x0184 */ ColliderTrisItem colliderItems[3];
/* 0x0184 */ ColliderTrisElement colliderItems[3];
/* 0x0298 */ BgBombwallActionFunc actionFunc;
/* 0x029C */ Gfx* dList;
/* 0x02A0 */ s16 unk_2A0;
@@ -33,6 +33,26 @@ const ActorInit Bg_Breakwall_InitVars = {
(ActorFunc)BgBreakwall_Update,
NULL,
};
static ColliderQuadInit D_80870760 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER | AC_TYPE_OTHER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK0,
{ 0x00000048, 0x00, 0x00 },
{ 0x00000048, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Breakwall/BgBreakwall_SetupAction.s")
@@ -32,8 +32,22 @@ const ActorInit Bg_Ddan_Kd_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x39, 0x00, 0x00, COLSHAPE_CYLINDER },
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_ALL,
OC1_NONE,
OC2_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK2,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 245, 180, -400, { 0, 0, 0 } },
};
@@ -107,8 +121,8 @@ void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) {
this->prevExplosivePos = explosive->posRot.pos;
}
}
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -34,14 +34,42 @@ const ActorInit Bg_Dodoago_InitVars = {
};
static ColliderCylinderInit sColCylinderInit0 = {
{ COLTYPE_UNK10, 0x00, 0x39, 0x00, 0x00, COLSHAPE_CYLINDER },
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_ALL,
OC1_NONE,
OC2_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK2,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 80, 30, 80, { 0, 0, 0 } },
};
static ColliderCylinderInit sColCylinderInit1 = {
{ COLTYPE_UNK10, 0x00, 0x00, 0x3D, 0x20, COLSHAPE_CYLINDER },
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_NONE,
AC_NONE,
OC1_ON | OC1_NO_PUSH | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK2,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 50, 60, 280, { 0, 0, 0 } },
};
@@ -152,9 +180,9 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) {
} else {
if (Flags_GetEventChkInf(0xB0)) {
Collider_CylinderUpdate(&this->dyna.actor, &this->colliders[0]);
Collider_CylinderUpdate(&this->dyna.actor, &this->colliders[1]);
Collider_CylinderUpdate(&this->dyna.actor, &this->colliders[2]);
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[0]);
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[1]);
Collider_UpdateCylinder(&this->dyna.actor, &this->colliders[2]);
this->colliders[0].dim.pos.z += 0xC8;
this->colliders[1].dim.pos.z += 0xD7;
this->colliders[1].dim.pos.x += 0x5A;
@@ -239,15 +267,15 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) {
EnBom* bomb;
if (this->dyna.actor.parent == NULL) {
if ((s32)(this->colliders[1].base.maskA & 2) || (this->colliders[2].base.maskA & 2)) {
if ((s32)(this->colliders[1].base.ocFlags1 & OC1_HIT) || (this->colliders[2].base.ocFlags1 & OC1_HIT)) {
if ((s32)(this->colliders[1].base.maskA & 2)) {
if ((s32)(this->colliders[1].base.ocFlags1 & OC1_HIT)) {
bomb = (EnBom*)this->colliders[1].base.oc;
} else {
bomb = (EnBom*)this->colliders[2].base.oc;
}
this->colliders[1].base.maskA &= ~2;
this->colliders[2].base.maskA &= ~2;
this->colliders[1].base.ocFlags1 &= ~OC1_HIT;
this->colliders[2].base.ocFlags1 &= ~OC1_HIT;
if (bomb->actor.type == ACTORTYPE_EXPLOSIVES && bomb->actor.id == ACTOR_EN_BOM && bomb->actor.params == 0) {
this->dyna.actor.parent = &bomb->actor;
bomb->timer = 50;
@@ -33,8 +33,22 @@ const ActorInit Bg_Gnd_Soulmeiro_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x10, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x00 }, { 0x00020800, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x00 },
{ 0x00020800, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 50, 20, 20, { 0, 0, 0 } },
};
@@ -159,13 +173,13 @@ void func_8087B284(BgGndSoulmeiro* this, GlobalContext* globalCtx) {
if (!Flags_GetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F)) {
this->actor.draw = BgGndSoulmeiro_Draw;
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
this->unk_198 = 40;
this->actionFunc = func_8087AF38;
return;
}
Collider_CylinderUpdate(&this->actor, &this->collider);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -41,38 +41,87 @@ const ActorInit Bg_Haka_Sgami_InitVars = {
NULL,
};
static ColliderTrisItemInit sTriItemsInit[] = {
static ColliderTrisElementInit sTrisElementsInit[4] = {
{
{ 0x02, { 0x20000000, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
{
ELEMTYPE_UNK2,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ { { 365.0f, 45.0f, 27.0f }, { 130.0f, 45.0f, 150.0f }, { 290.0f, 45.0f, 145.0f } } },
},
{
{ 0x02, { 0x20000000, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
{
ELEMTYPE_UNK2,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ { { 250.0f, 45.0f, 90.0f }, { 50.0f, 45.0f, 80.0f }, { 160.0f, 45.0f, 160.0f } } },
},
{
{ 0x02, { 0x20000000, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
{
ELEMTYPE_UNK2,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ { { -305.0f, 33.0f, -7.0f }, { -220.0f, 33.0f, 40.0f }, { -130.0f, 33.0f, -5.0f } } },
},
{
{ 0x02, { 0x20000000, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
{
ELEMTYPE_UNK2,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ { { -190.0f, 33.0f, 40.0f }, { -30.0f, 33.0f, 15.0f }, { -70.0f, 33.0f, -30.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x00, 0x20, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
4,
sTriItemsInit,
sTrisElementsInit,
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x00, 0x39, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_NONE,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 80, 130, 0, { 0, 0, 0 } },
};
static CollisionCheckInfoInit sColChkInfoInit = { 0, 80, 130, 0xFF };
static CollisionCheckInfoInit sColChkInfoInit = { 0, 80, 130, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
@@ -108,7 +157,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) {
this->colliderScytheCenter.dim.pos.y = thisx->posRot.pos.y;
this->colliderScytheCenter.dim.pos.z = thisx->posRot.pos.z;
func_80061ED4(&thisx->colChkInfo, NULL, &sColChkInfoInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
for (i = 0; i < 4; i++) {
blureInit.p1StartColor[i] = sP1StartColor[i];
@@ -174,7 +223,7 @@ void BgHakaSgami_Spin(BgHakaSgami* this, GlobalContext* globalCtx) {
f32 actorRotYSin;
f32 actorRotYCos;
s32 iterateCount;
ColliderTrisItemInit* colliderList;
ColliderTrisElementInit* elementInit;
if (this->timer != 0) {
this->timer--;
@@ -192,24 +241,25 @@ void BgHakaSgami_Spin(BgHakaSgami* this, GlobalContext* globalCtx) {
iterateCount = (this->actor.params != 0) ? 4 : 2;
for (i = iterateCount - 2; i < iterateCount; i++) {
colliderList = &sTrisInit.list[i];
elementInit = &sTrisInit.elements[i];
for (j = 0; j < 3; j++) {
scytheVertices[j].x = this->actor.posRot.pos.x + colliderList->dim.vtx[j].z * actorRotYSin +
colliderList->dim.vtx[j].x * actorRotYCos;
scytheVertices[j].y = this->actor.posRot.pos.y + colliderList->dim.vtx[j].y;
scytheVertices[j].z = this->actor.posRot.pos.z + colliderList->dim.vtx[j].z * actorRotYCos -
colliderList->dim.vtx[j].x * actorRotYSin;
scytheVertices[j].x = this->actor.posRot.pos.x + elementInit->dim.vtx[j].z * actorRotYSin +
elementInit->dim.vtx[j].x * actorRotYCos;
scytheVertices[j].y = this->actor.posRot.pos.y + elementInit->dim.vtx[j].y;
scytheVertices[j].z = this->actor.posRot.pos.z + elementInit->dim.vtx[j].z * actorRotYCos -
elementInit->dim.vtx[j].x * actorRotYSin;
}
func_800627A0(&this->colliderScythe, i, &scytheVertices[0], &scytheVertices[1], &scytheVertices[2]);
Collider_SetTrisVertices(&this->colliderScythe, i, &scytheVertices[0], &scytheVertices[1], &scytheVertices[2]);
for (j = 0; j < 3; j++) {
scytheVertices[j].x = (2 * this->actor.posRot.pos.x) - scytheVertices[j].x;
scytheVertices[j].z = (2 * this->actor.posRot.pos.z) - scytheVertices[j].z;
}
func_800627A0(&this->colliderScythe, (i + 2) % 4, &scytheVertices[0], &scytheVertices[1], &scytheVertices[2]);
Collider_SetTrisVertices(&this->colliderScythe, (i + 2) % 4, &scytheVertices[0], &scytheVertices[1],
&scytheVertices[2]);
}
if ((this->unk_151 == 0) || (globalCtx->actorCtx.unk_03 != 0)) {
@@ -17,7 +17,7 @@ typedef struct BgHakaSgami {
/* 0x0154 */ s32 blureEffectIndex[2];
/* 0x015C */ ColliderCylinder colliderScytheCenter;
/* 0x01A8 */ ColliderTris colliderScythe;
/* 0x01C8 */ ColliderTrisItem colliderScytheItems[4];
/* 0x01C8 */ ColliderTrisElement colliderScytheItems[4];
} BgHakaSgami; // size = 0x0338
extern const ActorInit Bg_Haka_Sgami_InitVars;
@@ -43,29 +43,64 @@ const ActorInit Bg_Haka_Trap_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_METAL_SHIELD, 0x11, 0x0D, 0x09, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x04 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x01, 0x01, 0x01 },
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 30, 90, 0, { 0, 0, 0 } },
};
static ColliderTrisItemInit sTrisItemsInit[2] = {
static ColliderTrisElementInit sTrisElementsInit[2] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00020000, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00020000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 1800.0f, 1200.0f, 0.0f }, { -1800.0f, 1200.0f, 0.0f }, { -1800.0f, 0.0f, 0.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00020000, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00020000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 1800.0f, 1200.0f, 0.0f }, { -1800.0f, 0.0f, 0.0f }, { 1800.0f, 0.0f, 0.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
2,
sTrisItemsInit,
sTrisElementsInit,
};
static CollisionCheckInfoInit sColChkInfoInit = { 0x00, 0x0050, 0x0064, 0xFF };
static CollisionCheckInfoInit sColChkInfoInit = { 0, 80, 100, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
@@ -137,8 +172,8 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
this->colliderCylinder.dim.radius = 18;
this->colliderCylinder.dim.height = 115;
this->colliderCylinder.body.toucherFlags = this->colliderCylinder.body.toucherFlags;
this->colliderCylinder.body.toucherFlags |= 0x10;
this->colliderCylinder.info.toucherFlags = this->colliderCylinder.info.toucherFlags;
this->colliderCylinder.info.toucherFlags |= TOUCH_SFX_WOOD;
this->actionFunc = func_808801B8;
}
@@ -151,7 +186,7 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->uncullZoneScale = 500.0f;
}
func_80061ED4(&thisx->colChkInfo, 0, &sColChkInfoInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, 0, &sColChkInfoInit);
}
void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@@ -212,7 +247,7 @@ void func_808801B8(BgHakaTrap* this, GlobalContext* globalCtx) {
func_8087FFC0(this, globalCtx);
if (this->colliderSpikes.base.acFlags & 2) {
if (this->colliderSpikes.base.acFlags & AC_HIT) {
this->timer = 20;
D_80880F30 = 1;
this->actionFunc = func_808802D8;
@@ -475,13 +510,13 @@ void func_80880D68(BgHakaTrap* this) {
Vec3f vec2;
Vec3f vec1;
Matrix_MultVec3f(&sTrisItemsInit[0].dim.vtx[0], &vec1);
Matrix_MultVec3f(&sTrisItemsInit[0].dim.vtx[1], &vec2);
Matrix_MultVec3f(&sTrisItemsInit[0].dim.vtx[2], &vec3);
func_800627A0(&this->colliderSpikes, 0, &vec1, &vec2, &vec3);
Matrix_MultVec3f(&sTrisElementsInit[0].dim.vtx[0], &vec1);
Matrix_MultVec3f(&sTrisElementsInit[0].dim.vtx[1], &vec2);
Matrix_MultVec3f(&sTrisElementsInit[0].dim.vtx[2], &vec3);
Collider_SetTrisVertices(&this->colliderSpikes, 0, &vec1, &vec2, &vec3);
Matrix_MultVec3f(&sTrisItemsInit[1].dim.vtx[2], &vec2);
func_800627A0(&this->colliderSpikes, 1, &vec1, &vec3, &vec2);
Matrix_MultVec3f(&sTrisElementsInit[1].dim.vtx[2], &vec2);
Collider_SetTrisVertices(&this->colliderSpikes, 1, &vec1, &vec3, &vec2);
}
void BgHakaTrap_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -26,7 +26,7 @@ typedef struct BgHakaTrap {
/* 0x016C */ Vec3f unk_16C;
/* 0x0178 */ ColliderCylinder colliderCylinder;
/* 0x01C4 */ ColliderTris colliderSpikes;
/* 0x01E4 */ ColliderTrisItem colliderSpikesItem[2];
/* 0x01E4 */ ColliderTrisElement colliderSpikesItem[2];
} BgHakaTrap; // size = 0x029C
extern const ActorInit Bg_Haka_Trap_InitVars;
@@ -31,14 +31,42 @@ const ActorInit Bg_Haka_Tubo_InitVars = {
};
static ColliderCylinderInit sPotColliderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 25, 60, 30, { 0, 0, 0 } },
};
static ColliderCylinderInit sFlamesColliderInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x09, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000008, 0x00, 0x00 }, 0x19, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 60, 45, 235, { 0, 0, 0 } },
};
@@ -89,13 +117,13 @@ void BgHakaTubo_Idle(BgHakaTubo* this, GlobalContext* globalCtx) {
this->dyna.actor.posRot.pos.z = Math_CosS(this->dyna.actor.shape.rot.y - 0x4000) * 145.0f + -1587.0f;
}
// Colliding with flame circle
if (this->flamesCollider.base.atFlags & 2) {
this->flamesCollider.base.atFlags &= ~2;
if (this->flamesCollider.base.atFlags & AT_HIT) {
this->flamesCollider.base.atFlags &= ~AT_HIT;
func_8002F71C(globalCtx, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsLink, 5.0f);
}
// Colliding with hitbox inside the pot
if (this->potCollider.base.acFlags & 2) {
this->potCollider.base.acFlags &= ~2;
if (this->potCollider.base.acFlags & AC_HIT) {
this->potCollider.base.acFlags &= ~AC_HIT;
// If the colliding actor is within a 50 unit radius and 50 unit height cylinder centered
// on the actor's position, break the pot
if (func_8002DBB0(&this->dyna.actor, &this->potCollider.base.ac->posRot.pos) < 50.0f &&
@@ -112,8 +140,8 @@ void BgHakaTubo_Idle(BgHakaTubo* this, GlobalContext* globalCtx) {
this->actionFunc = BgHakaTubo_DropCollectible;
}
} else {
Collider_CylinderUpdate(&this->dyna.actor, &this->flamesCollider);
Collider_CylinderUpdate(&this->dyna.actor, &this->potCollider);
Collider_UpdateCylinder(&this->dyna.actor, &this->flamesCollider);
Collider_UpdateCylinder(&this->dyna.actor, &this->potCollider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->potCollider.base);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->flamesCollider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->flamesCollider.base);
@@ -30,6 +30,26 @@ const ActorInit Bg_Haka_Zou_InitVars = {
(ActorFunc)BgHakaZou_Update,
NULL,
};
static ColliderCylinderInit D_808835F0 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 5, 60, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Zou/BgHakaZou_Init.s")
@@ -33,12 +33,26 @@ typedef struct {
} BgHidanCurtainParams; // size = 0x10
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x09, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x19, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 81, 144, 0, { 0, 0, 0 } },
};
static CollisionCheckInfoInit sCcInfoInit = { 1, 0x50, 0x64, 0xFF };
static CollisionCheckInfoInit sCcInfoInit = { 1, 80, 100, MASS_IMMOVABLE };
static BgHidanCurtainParams sHCParams[] = { { 81, 144, 0.090f, 144.0f, 5.0f }, { 46, 88, 0.055f, 88.0f, 3.0f } };
@@ -88,8 +102,8 @@ void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.dim.pos.z = this->actor.posRot.pos.z;
this->collider.dim.radius = hcParams->radius;
this->collider.dim.height = hcParams->height;
Collider_CylinderUpdate(&this->actor, &this->collider);
func_80061ED4(&thisx->colChkInfo, NULL, &sCcInfoInit);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sCcInfoInit);
if (this->type == 0) {
this->actionFunc = BgHidanCurtain_WaitForClear;
} else {
@@ -196,10 +210,10 @@ void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) {
f32 riseProgress;
if ((globalCtx->cameraPtrs[0]->setting == 0x28) || (globalCtx->cameraPtrs[0]->setting == 0x38)) {
this->collider.base.atFlags &= ~2;
this->collider.base.atFlags &= ~AT_HIT;
} else {
if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~2;
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
func_8002F71C(globalCtx, &this->actor, 5.0f, this->actor.yawTowardsLink, 1.0f);
}
if ((this->type == 4) || (this->type == 5)) {
@@ -30,34 +30,69 @@ const ActorInit Bg_Hidan_Dalm_InitVars = {
(ActorFunc)BgHidanDalm_Draw,
};
static ColliderTrisItemInit sTrisItemInit[4] = {
static ColliderTrisElementInit sTrisElementInit[4] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000040, 0x00, 0x00 }, 0x00, 0x79, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ { { 305.0f, 0.0f, -300.0f }, { 305.0f, 600.0f, -300.0f }, { 305.0f, 600.0f, 300.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000040, 0x00, 0x00 }, 0x00, 0x79, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ { { 305.0f, 0.0f, -300.0f }, { 305.0f, 600.0f, 300.0f }, { 305.0f, 0.0f, 300.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000040, 0x00, 0x00 }, 0x00, 0x79, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ { { -305.0f, 0.0f, -300.0f }, { -305.0f, 600.0f, 300.0f }, { -305.0f, 600.0f, -300.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000040, 0x00, 0x00 }, 0x00, 0x79, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ { { -305.0f, 0.0f, -300.0f }, { -305.0f, 0.0f, 300.0f }, { -305.0f, 600.0f, 300.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
4,
sTrisItemInit,
sTrisElementInit,
};
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(gravity, 65336, ICHAIN_STOP),
ICHAIN_F32_DIV1000(gravity, -200, ICHAIN_STOP),
};
extern Gfx D_0600BBF0[];
@@ -95,10 +130,11 @@ void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void BgHidanDalm_Wait(BgHidanDalm* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((this->collider.base.acFlags & 2) && !Player_InCsMode(globalCtx) &&
if ((this->collider.base.acFlags & AC_HIT) && !Player_InCsMode(globalCtx) &&
(player->swordAnimation == 22 || player->swordAnimation == 23)) {
this->collider.base.acFlags &= ~2;
if (this->collider.list[0].body.bumperFlags & 2 || this->collider.list[1].body.bumperFlags & 2) {
this->collider.base.acFlags &= ~AC_HIT;
if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) ||
(this->collider.elements[1].info.bumperFlags & BUMP_HIT)) {
this->dyna.actor.posRot.rot.y -= 0x4000;
} else {
this->dyna.actor.posRot.rot.y += 0x4000;
@@ -161,19 +197,19 @@ void BgHidanDalm_UpdateCollider(BgHidanDalm* this) {
Vec3f pos1;
Vec3f pos0;
Matrix_MultVec3f(&sTrisItemInit[0].dim.vtx[0], &pos0);
Matrix_MultVec3f(&sTrisItemInit[0].dim.vtx[1], &pos1);
Matrix_MultVec3f(&sTrisItemInit[0].dim.vtx[2], &pos2);
func_800627A0(&this->collider, 0, &pos0, &pos1, &pos2);
Matrix_MultVec3f(&sTrisItemInit[1].dim.vtx[2], &pos1);
func_800627A0(&this->collider, 1, &pos0, &pos2, &pos1);
Matrix_MultVec3f(&sTrisElementInit[0].dim.vtx[0], &pos0);
Matrix_MultVec3f(&sTrisElementInit[0].dim.vtx[1], &pos1);
Matrix_MultVec3f(&sTrisElementInit[0].dim.vtx[2], &pos2);
Collider_SetTrisVertices(&this->collider, 0, &pos0, &pos1, &pos2);
Matrix_MultVec3f(&sTrisElementInit[1].dim.vtx[2], &pos1);
Collider_SetTrisVertices(&this->collider, 1, &pos0, &pos2, &pos1);
Matrix_MultVec3f(&sTrisItemInit[2].dim.vtx[0], &pos0);
Matrix_MultVec3f(&sTrisItemInit[2].dim.vtx[1], &pos1);
Matrix_MultVec3f(&sTrisItemInit[2].dim.vtx[2], &pos2);
func_800627A0(&this->collider, 2, &pos0, &pos1, &pos2);
Matrix_MultVec3f(&sTrisItemInit[3].dim.vtx[1], &pos2);
func_800627A0(&this->collider, 3, &pos0, &pos2, &pos1);
Matrix_MultVec3f(&sTrisElementInit[2].dim.vtx[0], &pos0);
Matrix_MultVec3f(&sTrisElementInit[2].dim.vtx[1], &pos1);
Matrix_MultVec3f(&sTrisElementInit[2].dim.vtx[2], &pos2);
Collider_SetTrisVertices(&this->collider, 2, &pos0, &pos1, &pos2);
Matrix_MultVec3f(&sTrisElementInit[3].dim.vtx[1], &pos2);
Collider_SetTrisVertices(&this->collider, 3, &pos0, &pos2, &pos1);
}
void BgHidanDalm_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -13,7 +13,7 @@ typedef struct BgHidanDalm {
/* 0x0164 */ BgHidanDalmActionFunc actionFunc;
/* 0x0168 */ u8 switchFlag;
/* 0x016C */ ColliderTris collider;
/* 0x018C */ ColliderTrisItem colliderItems[4];
/* 0x018C */ ColliderTrisElement colliderItems[4];
} BgHidanDalm; // size = 0x02FC
extern const ActorInit Bg_Hidan_Dalm_InitVars;
@@ -37,17 +37,26 @@ const ActorInit Bg_Hidan_Firewall_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x09, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x19, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 30, 83, 0, { 0 } },
};
static CollisionCheckInfoInit sColChkInfoInit = {
0x01,
0x0050,
0x0064,
0xFF,
};
static CollisionCheckInfoInit sColChkInfoInit = { 1, 80, 100, MASS_IMMOVABLE };
static UNK_PTR D_80886D04[] = {
0x06015D20, 0x06016120, 0x06016520, 0x06016920, 0x06016D20, 0x06017120, 0x06017520, 0x06017920,
@@ -67,7 +76,7 @@ void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.dim.pos.y = this->actor.posRot.pos.y;
func_80061ED4(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
this->actionFunc = BgHidanFirewall_Wait;
}
@@ -176,16 +185,16 @@ void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx) {
this->unk_150 = (this->unk_150 + 1) % 8;
if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~2;
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
BgHidanFirewall_Collide(this, globalCtx);
}
this->actionFunc(this, globalCtx);
if (this->actionFunc == BgHidanFirewall_Erupt) {
BgHidanFirewall_ColliderFollowPlayer(this, globalCtx);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
func_8002F974(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG);
}
}
@@ -41,8 +41,22 @@ const ActorInit Bg_Hidan_Fwbig_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x09, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x19, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 30, 130, 0, { 0, 0, 0 } },
};
@@ -58,7 +72,7 @@ void BgHidanFwbig_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->direction = (u16)(thisx->params >> 8);
thisx->params &= 0xFF;
if (this->direction != 0) {
@@ -205,8 +219,8 @@ void BgHidanFwbig_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgHidanFwbig* this = THIS;
if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~2;
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
func_8002F71C(globalCtx, &this->actor, 5.0f, this->actor.posRot.rot.y, 1.0f);
if (this->direction != 0) {
this->actionFunc = BgHidanFwbig_Lower;
@@ -30,21 +30,42 @@ static f32 sYPosOffsets[] = {
-20.0f, -120.0f, -220.0f, -320.0f, -420.0f,
};
static ColliderTrisItemInit sTrisItemsInit[2] = {
static ColliderTrisElementInit sTrisElementsInit[2] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x40000040, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { -20.0f, 3.0f, -20.0f }, { -20.0f, 3.0f, 20.0f }, { 20.0f, 3.0f, 20.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x40000040, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 20.0f, 3.0f, 20.0f }, { 20.0f, 3.0f, -20.0f }, { -20.0f, 3.0f, -20.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_TRIS },
ARRAY_COUNT(sTrisItemsInit),
sTrisItemsInit,
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_TRIS,
},
2,
sTrisElementsInit,
};
const ActorInit Bg_Hidan_Hamstep_InitVars = {
@@ -100,7 +121,7 @@ s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, GlobalContext* globalCtx)
params |= (this->dyna.actor.params & 0xFF00);
step = (BgHidanHamstep*)Actor_SpawnAsChild(
&globalCtx2->actorCtx, step, globalCtx2, ACTOR_BG_HIDAN_HAMSTEP, pos.x, pos.y, pos.z,
&globalCtx2->actorCtx, &step->dyna.actor, globalCtx2, ACTOR_BG_HIDAN_HAMSTEP, pos.x, pos.y, pos.z,
this->dyna.actor.posRot.rot.x, this->dyna.actor.posRot.rot.y, this->dyna.actor.posRot.rot.z, params);
if (step == NULL) {
@@ -119,7 +140,7 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 i2;
BgHidanHamstep* step;
DynaPolyActor_Init(&this->dyna.actor, DPM_PLAYER);
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
if ((this->dyna.actor.params & 0xFF) == 0) {
@@ -128,11 +149,11 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i < 2; i++) {
for (i2 = 0; i2 < 3; i2++) {
sp48[i2].x = sTrisInit.list[i].dim.vtx[i2].x + this->dyna.actor.initPosRot.pos.x;
sp48[i2].y = sTrisInit.list[i].dim.vtx[i2].y + this->dyna.actor.initPosRot.pos.y;
sp48[i2].z = sTrisInit.list[i].dim.vtx[i2].z + this->dyna.actor.initPosRot.pos.z;
sp48[i2].x = sTrisInit.elements[i].dim.vtx[i2].x + this->dyna.actor.initPosRot.pos.x;
sp48[i2].y = sTrisInit.elements[i].dim.vtx[i2].y + this->dyna.actor.initPosRot.pos.y;
sp48[i2].z = sTrisInit.elements[i].dim.vtx[i2].z + this->dyna.actor.initPosRot.pos.z;
}
func_800627A0(&this->collider, i, &sp48[0], &sp48[1], &sp48[2]);
Collider_SetTrisVertices(&this->collider, i, &sp48[0], &sp48[1], &sp48[2]);
}
}
@@ -174,7 +195,7 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) {
while (step != NULL) {
Actor_Kill(&step->dyna.actor);
step = step->dyna.actor.child;
step = (BgHidanHamstep*)step->dyna.actor.child;
}
}
}
@@ -213,13 +234,13 @@ void func_808884C8(BgHidanHamstep* step, GlobalContext* globalCtx) {
}
void func_80888638(BgHidanHamstep* this, GlobalContext* globalCtx) {
BgHidanHamstep* child = this->dyna.actor.child;
BgHidanHamstep* child = (BgHidanHamstep*)this->dyna.actor.child;
while (child != NULL) {
if ((child->dyna.actor.params & 0xFF) != 0) {
func_808884C8(child, globalCtx);
}
child = child->dyna.actor.child;
child = (BgHidanHamstep*)child->dyna.actor.child;
}
}
@@ -234,18 +255,18 @@ void func_80888694(BgHidanHamstep* this, BgHidanHamstep* parent) {
}
}
child = this->dyna.actor.child;
child = (BgHidanHamstep*)this->dyna.actor.child;
while (child != NULL) {
if (this->dyna.actor.posRot.pos.y < child->dyna.actor.posRot.pos.y) {
child->dyna.actor.posRot.pos.y = this->dyna.actor.posRot.pos.y;
}
child = child->dyna.actor.child;
child = (BgHidanHamstep*)child->dyna.actor.child;
}
}
void func_80888734(BgHidanHamstep* this) {
BgHidanHamstep* parent = this->dyna.actor.parent;
BgHidanHamstep* parent = (BgHidanHamstep*)this->dyna.actor.parent;
f32 factor = SREG(30) * 0.5f;
if (parent != NULL) {
@@ -262,14 +283,14 @@ void func_80888734(BgHidanHamstep* this) {
}
void func_808887C4(BgHidanHamstep* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
func_800800F8(globalCtx, 3310, 100, &this->dyna.actor, 0);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH);
this->collider.base.acFlags = 0;
this->collider.base.acFlags = AC_NONE;
BgHidanHamstep_SetupAction(this, 1);
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0xFF);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -300,7 +321,7 @@ void func_80888860(BgHidanHamstep* this, GlobalContext* globalCtx) {
Quake_SetCountdown(quakeIndex, 20);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
func_800AA000(this->dyna.actor.xyzDistToLinkSq, 255, 20, 150);
func_80888638(&this->dyna.actor, globalCtx);
func_80888638(this, globalCtx);
osSyncPrintf("A(%d)\n", this->dyna.actor.params);
}
}
@@ -309,7 +330,7 @@ void func_80888860(BgHidanHamstep* this, GlobalContext* globalCtx) {
void func_808889B8(BgHidanHamstep* this, GlobalContext* globalCtx) {
s32 pad;
BgHidanHamstep* parent = this->dyna.actor.parent;
BgHidanHamstep* parent = (BgHidanHamstep*)this->dyna.actor.parent;
func_80888734(this);
@@ -11,7 +11,7 @@ typedef void (*BgHidanHamstepActionFunc)(struct BgHidanHamstep*, GlobalContext*)
typedef struct BgHidanHamstep {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderTris collider;
/* 0x0184 */ ColliderTrisItem colliderItems[2];
/* 0x0184 */ ColliderTrisElement colliderItems[2];
/* 0x023C */ BgHidanHamstepActionFunc actionFunc;
/* 0x0240 */ s32 action;
/* 0x0244 */ s32 unk_244;
@@ -29,6 +29,44 @@ const ActorInit Bg_Hidan_Hrock_InitVars = {
(ActorFunc)BgHidanHrock_Update,
(ActorFunc)BgHidanHrock_Draw,
};
static ColliderTrisElementInit D_80889820[2] = {
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ { { -40.0f, 3.0f, -40.0f }, { -40.0f, 3.0f, 40.0f }, { 40.0f, 3.0f, 40.0f } } },
},
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x40000040, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_NO_AT_INFO | BUMP_NO_DAMAGE | BUMP_NO_SWORD_SFX | BUMP_NO_HITMARK,
OCELEM_NONE,
},
{ { { 40.0f, 3.0f, 40.0f }, { 40.0f, 3.0f, -40.0f }, { -40.0f, 3.0f, -40.0f } } },
},
};
static ColliderTrisInit D_80889898 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
2,
D_80889820,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Hrock/BgHidanHrock_Init.s")
@@ -38,15 +38,31 @@ const ActorInit Bg_Hidan_Kowarerukabe_InitVars = {
static Gfx* sBreakableWallDLists[] = { 0x0600B9C0, 0x0600C038, 0x0600B900 };
static ColliderJntSphItemInit sJntSphItemsInit[1] = { {
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{ 0, { { 0, 0, 0 }, 100 }, 100 },
} };
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 100 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_JNTSPH },
ARRAY_COUNT(sJntSphItemsInit),
sJntSphItemsInit,
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
1,
sJntSphElementsInit,
};
void BgHidanKowarerukabe_InitDynaPoly(BgHidanKowarerukabe* this, GlobalContext* globalCtx) {
@@ -72,8 +88,8 @@ void BgHidanKowarerukabe_InitColliderSphere(BgHidanKowarerukabe* this, GlobalCon
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
this->collider.list[0].dim.modelSphere.radius = sphereRadii[this->dyna.actor.params & 0xFF];
this->collider.list[0].dim.modelSphere.center.y = sphereYPositions[this->dyna.actor.params & 0xFF];
this->collider.elements[0].dim.modelSphere.radius = sphereRadii[this->dyna.actor.params & 0xFF];
this->collider.elements[0].dim.modelSphere.center.y = sphereYPositions[this->dyna.actor.params & 0xFF];
}
void BgHidanKowarerukabe_OffsetActorYPos(BgHidanKowarerukabe* this) {
@@ -311,7 +327,7 @@ void BgHidanKowarerukabe_Draw(Actor* thisx, GlobalContext* globalCtx) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, sBreakableWallDLists[this->dyna.actor.params & 0xFF]);
func_800628A4(0, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_kowarerukabe.c", 573);
}
@@ -9,7 +9,7 @@ struct BgHidanKowarerukabe;
typedef struct BgHidanKowarerukabe {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph collider;
/* 0x0184 */ ColliderJntSphItem colliderItems[1];
/* 0x0184 */ ColliderJntSphElement colliderItems[1];
} BgHidanKowarerukabe; // size = 0x01C4
extern const ActorInit Bg_Hidan_Kowarerukabe_InitVars;
@@ -27,6 +27,26 @@ const ActorInit Bg_Hidan_Rock_InitVars = {
(ActorFunc)BgHidanRock_Update,
(ActorFunc)BgHidanRock_Draw,
};
static ColliderCylinderInit D_8088BF8C = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 45, 77, -40, { 3310, 120, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Rock/BgHidanRock_Init.s")
@@ -21,37 +21,86 @@ const ActorInit Bg_Hidan_Rsekizou_InitVars = {
(ActorFunc)BgHidanRsekizou_Draw,
};
static ColliderJntSphItemInit sJntSphItemsInit[6] = {
static ColliderJntSphElementInit sJntSphElementsInit[6] = {
{
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { 0, 30, 40 }, 25 }, 100 },
},
{
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { -35, 32, 77 }, 32 }, 100 },
},
{
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { -80, 35, 130 }, 42 }, 100 },
},
{
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { 0, 30, -40 }, 25 }, 100 },
},
{
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { 35, 32, -77 }, 32 }, 100 },
},
{
{ 0x00, { 0x20000000, 0x01, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x19, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { 80, 35, -130 }, 42 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x00, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
6,
sJntSphItemsInit,
sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -81,7 +130,7 @@ void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) {
this->collider.list[i].dim.worldSphere.radius = this->collider.list[i].dim.modelSphere.radius;
this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius;
}
this->burnFrame = 0;
this->bendFrame = 0;
@@ -97,7 +146,7 @@ void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void BgHidanRsekizou_Update(Actor* thisx, GlobalContext* globalCtx) {
BgHidanRsekizou* this = THIS;
s32 i;
ColliderJntSphItem* sphere;
ColliderJntSphElement* sphere;
s32 pad;
f32 yawSine;
f32 yawCosine;
@@ -117,7 +166,7 @@ void BgHidanRsekizou_Update(Actor* thisx, GlobalContext* globalCtx) {
yawCosine = Math_CosS(this->dyna.actor.shape.rot.y);
for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) {
sphere = &this->collider.list[i];
sphere = &this->collider.elements[i];
sphere->dim.worldSphere.center.x = this->dyna.actor.initPosRot.pos.x +
yawCosine * sphere->dim.modelSphere.center.x +
yawSine * sphere->dim.modelSphere.center.z;
@@ -11,7 +11,7 @@ typedef struct BgHidanRsekizou {
/* 0x0164 */ s16 bendFrame;
/* 0x0166 */ s16 burnFrame;
/* 0x0168 */ ColliderJntSph collider;
/* 0x0188 */ ColliderJntSphItem colliderItems[6];
/* 0x0188 */ ColliderJntSphElement colliderItems[6];
} BgHidanRsekizou; // size = 0x0308
extern const ActorInit Bg_Hidan_Rsekizou_InitVars;
@@ -26,6 +26,88 @@ const ActorInit Bg_Hidan_Sekizou_InitVars = {
(ActorFunc)BgHidanSekizou_Update,
(ActorFunc)BgHidanSekizou_Draw,
};
static ColliderJntSphElementInit D_8088E180[6] = {
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 30, 40 }, 23 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 32, 87 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 35, 150 }, 40 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 30, 40 }, 23 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 32, 87 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 35, 150 }, 40 }, 100 },
},
};
static ColliderJntSphInit D_8088E258 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
6,
D_8088E180,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Sekizou/func_8088CEC0.s")
@@ -27,6 +27,44 @@ const ActorInit Bg_Hidan_Sima_InitVars = {
(ActorFunc)BgHidanSima_Update,
(ActorFunc)BgHidanSima_Draw,
};
static ColliderJntSphElementInit D_8088F1A0[2] = {
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { 0, 40, 100 }, 22 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x01, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 1, { { 0, 40, 145 }, 30 }, 100 },
},
};
static ColliderJntSphInit D_8088F1E8 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
2,
D_8088F1A0,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Hidan_Sima/BgHidanSima_Init.s")
@@ -27,6 +27,46 @@ const ActorInit Bg_Ice_Shelter_InitVars = {
(ActorFunc)BgIceShelter_Update,
(ActorFunc)BgIceShelter_Draw,
};
static ColliderCylinderInit D_8089170C = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_OTHER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 0, 0, 0, { 0, 0, 0 } },
};
static ColliderCylinderInit D_80891738 = {
{
COLTYPE_HARD,
AT_NONE,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x4FC1FFF6, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, 0, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Shelter/func_80890740.s")
@@ -22,8 +22,22 @@ void BgIceTurara_Fall(BgIceTurara* this, GlobalContext* globalCtx);
void BgIceTurara_Regrow(BgIceTurara* this, GlobalContext* globalCtx);
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x11, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x04 }, { 0x4FC007CA, 0x00, 0x00 }, 0x01, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0x4FC007CA, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ 13, 120, 0, { 0, 0, 0 } },
};
@@ -59,7 +73,7 @@ void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx) {
CollisionHeader_GetVirtual(&D_06002594, &colHeader);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.actor.params == TURARA_STALAGMITE) {
this->actionFunc = BgIceTurara_Stalagmite;
@@ -104,7 +118,7 @@ void BgIceTurara_Break(BgIceTurara* this, GlobalContext* globalCtx, f32 arg2) {
}
void BgIceTurara_Stalagmite(BgIceTurara* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
BgIceTurara_Break(this, globalCtx, 50.0f);
Actor_Kill(&this->dyna.actor);
return;
@@ -133,7 +147,7 @@ void BgIceTurara_Shiver(BgIceTurara* this, GlobalContext* globalCtx) {
if (this->shiverTimer == 0) {
this->dyna.actor.posRot.pos.x = this->dyna.actor.initPosRot.pos.x;
this->dyna.actor.posRot.pos.z = this->dyna.actor.initPosRot.pos.z;
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
this->actionFunc = BgIceTurara_Fall;
@@ -148,8 +162,8 @@ void BgIceTurara_Shiver(BgIceTurara* this, GlobalContext* globalCtx) {
}
void BgIceTurara_Fall(BgIceTurara* this, GlobalContext* globalCtx) {
if ((this->collider.base.atFlags & 2) || (this->dyna.actor.bgCheckFlags & 1)) {
this->collider.base.atFlags &= ~2;
if ((this->collider.base.atFlags & AT_HIT) || (this->dyna.actor.bgCheckFlags & 1)) {
this->collider.base.atFlags &= ~AT_HIT;
this->dyna.actor.bgCheckFlags &= ~1;
if (this->dyna.actor.posRot.pos.y < this->dyna.actor.groundY) {
this->dyna.actor.posRot.pos.y = this->dyna.actor.groundY;
@@ -168,7 +182,7 @@ void BgIceTurara_Fall(BgIceTurara* this, GlobalContext* globalCtx) {
this->dyna.actor.posRot.pos.y += 40.0f;
func_8002E4B4(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
this->dyna.actor.posRot.pos.y -= 40.0f;
Collider_CylinderUpdate(&this->dyna.actor, &this->collider);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -39,8 +39,22 @@ const ActorInit Bg_Jya_1flift_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x00, 0x39, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
{
COLTYPE_NONE,
AT_NONE,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 70, 80, -82, { 0, 0, 0 } },
};
@@ -77,7 +91,7 @@ void BgJya1flift_InitCollision(Actor* thisx, GlobalContext* globalCtx) {
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
this->dyna.actor.colChkInfo.mass = 0xFF;
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
}
void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) {
@@ -186,8 +200,8 @@ void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
this->isLinkRiding = tempIsRiding;
Collider_CylinderUpdate(thisx, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(thisx, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
} else {
Actor_Kill(thisx);
}
@@ -28,17 +28,31 @@ const ActorInit Bg_Jya_Bombchuiwa_InitVars = {
(ActorFunc)BgJyaBombchuiwa_Draw,
};
static ColliderJntSphItemInit sJntSphItemsInit[1] = {
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { -300, 0, 0 }, 40 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x21, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_2,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -135,7 +149,7 @@ void BgJyaBombchuiwa_SetupWaitForExplosion(BgJyaBombchuiwa* this, GlobalContext*
}
void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {
if ((this->collider.base.acFlags & 2) || (this->timer > 0)) {
if ((this->collider.base.acFlags & AC_HIT) || (this->timer > 0)) {
if (this->timer == 0) {
func_800800F8(globalCtx, 3410, -99, &this->actor, 0);
}
@@ -146,8 +160,8 @@ void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* glob
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_WALL_BROKEN);
}
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -220,7 +234,7 @@ void BgJyaBombchuiwa_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->drawFlags & 1) {
Gfx_DrawDListOpa(globalCtx, &D_0600E8D0);
func_800628A4(0, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
}
if (this->drawFlags & 2) {
@@ -12,7 +12,7 @@ typedef struct BgJyaBombchuiwa {
/* 0x0000 */ Actor actor;
/* 0x014C */ BgJyaBombchuiwaActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
/* 0x0170 */ ColliderJntSphItem colliderItems;
/* 0x0170 */ ColliderJntSphElement colliderItems;
/* 0x01B0 */ f32 lightRayIntensity;
/* 0x01B4 */ s16 timer;
/* 0x01B6 */ u8 drawFlags; // Used to determine how the actor is drawn.
@@ -23,16 +23,30 @@ const ActorInit Bg_Jya_Bombiwa_InitVars = {
(ActorFunc)BgJyaBombiwa_Draw,
};
static ColliderJntSphItemInit sJntSphItemsInit[] = {
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 50 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
1,
&sJntSphItemsInit,
&sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
@@ -143,13 +157,13 @@ void BgJyaBombiwa_Break(BgJyaBombiwa* this, GlobalContext* globalCtx) {
void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
BgJyaBombiwa* this = THIS;
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
BgJyaBombiwa_Break(this, globalCtx);
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot, 40, NA_SE_EV_WALL_BROKEN);
Actor_Kill(&this->dyna.actor);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -157,5 +171,5 @@ void BgJyaBombiwa_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaBombiwa* this = THIS;
Gfx_DrawDListOpa(globalCtx, D_0600E490);
func_800628A4(0, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
}
@@ -11,7 +11,7 @@ typedef struct BgJyaBombiwa {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ s32 unk_164;
/* 0x0168 */ ColliderJntSph collider;
/* 0x0188 */ ColliderJntSphItem colliderItems;
/* 0x0188 */ ColliderJntSphElement colliderItems;
} BgJyaBombiwa; // size = 0x01C8
extern const ActorInit Bg_Jya_Bombiwa_InitVars;
@@ -37,20 +37,34 @@ const ActorInit Bg_Jya_Goroiwa_InitVars = {
};
extern Gfx D_060006B0[];
static ColliderJntSphItemInit sJntSphItemsInit[] = {
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{ 0x00, { 0x20000000, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x01 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 58 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x11, 0x00, 0x39, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static CollisionCheckInfoInit sColChkInfoInit = { 0x01, 0xF, 0x0, 0xFE };
static CollisionCheckInfoInit sColChkInfoInit = { 1, 15, 0, MASS_HEAVY };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
@@ -60,7 +74,7 @@ static InitChainEntry sInitChain[] = {
};
void func_80897970(BgJyaGoroiwa* this) {
Sphere16* worldSphere = &this->collider.list->dim.worldSphere;
Sphere16* worldSphere = &this->collider.elements[0].dim.worldSphere;
worldSphere->center.x = this->actor.posRot.pos.x;
worldSphere->center.y = (s32)(this->actor.posRot.pos.y + 59.5f);
@@ -73,15 +87,13 @@ void func_808979C0(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, &this->colliderItem);
func_80897970(this);
this->collider.list->dim.worldSphere.radius = 0x3A;
this->collider.elements[0].dim.worldSphere.radius = 58;
}
void func_80897A2C(BgJyaGoroiwa* this) {
Actor* thisx = &this->actor;
f32 rotFactor = 175.30046f;
f32 posDiff = thisx->posRot.pos.x - thisx->pos4.x;
f32 posDiff = this->actor.posRot.pos.x - this->actor.pos4.x;
thisx->shape.rot.z -= rotFactor * posDiff;
this->actor.shape.rot.z -= 0x10000 / (119 * M_PI) * posDiff;
}
void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
@@ -89,10 +101,8 @@ void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
func_808979C0(this, globalCtx);
this->actor.shape.rot.z = 0;
this->actor.shape.rot.y = this->actor.shape.rot.z;
this->actor.shape.rot.x = this->actor.shape.rot.z;
func_80061ED4(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
this->actor.shape.rot.x = this->actor.shape.rot.y = this->actor.shape.rot.z = 0;
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
ActorShape_Init(&this->actor.shape, 595.0f, &ActorShadow_DrawFunc_Circle, 9.0f);
this->actor.shape.unk_14 = 0x80;
func_80897B1C(this);
@@ -106,7 +116,7 @@ void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80897B1C(BgJyaGoroiwa* this) {
this->actionFunc = func_80897B48;
this->collider.base.atFlags = this->collider.base.atFlags | 1;
this->collider.base.atFlags |= AT_ON;
this->unk_1B4 = 0;
this->unk_1B0 = 1.0f;
}
@@ -137,8 +147,8 @@ void func_80897B48(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
thisx->posRot.pos.y = (0.38043478f * tmpf1) - 129.5f;
}
if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~3;
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT & ~AT_ON;
tmp16 = thisx->yawTowardsLink - thisx->posRot.rot.y;
if ((tmp16 >= -0x3FFF) && (tmp16 < 0x4000)) {
@@ -202,7 +212,7 @@ void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.groundY =
BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->actor.floorPoly, &sp38, &this->actor, &pos);
func_80897970(this);
if (this->collider.base.atFlags & 1) {
if (this->collider.base.atFlags & AT_ON) {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
@@ -12,7 +12,7 @@ typedef struct BgJyaGoroiwa {
/* 0x0000 */ Actor actor;
/* 0x014C */ BgJyaGoroiwaFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
/* 0x0170 */ ColliderJntSphItem colliderItem;
/* 0x0170 */ ColliderJntSphElement colliderItem;
/* 0x01B0 */ f32 unk_1B0;
/* 0x01B4 */ s16 unk_1B4;
/* 0x01B6 */ s16 unk_1B6;
@@ -35,17 +35,31 @@ const ActorInit Bg_Jya_Haheniron_InitVars = {
(ActorFunc)BgJyaHaheniron_Draw,
};
static ColliderJntSphItemInit sJntSphItemsInit[1] = {
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{ 0x00, { 0xFFCFFFFF, 0x00, 0x04 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x00 },
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 10 }, 100 },
},
};
static ColliderJntSphInit D_80898764 = {
{ COLTYPE_UNK10, 0x11, 0x01, 0x00, 0x00, COLSHAPE_JNTSPH },
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static s16 sKakeraScales[] = { 5, 8, 11, 14, 17 };
@@ -68,7 +82,7 @@ void BgJyaHaheniron_ColliderInit(BgJyaHaheniron* this, GlobalContext* globalCtx)
s32 pad;
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &D_80898764, this->colliderItems);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
}
void BgJyaHaheniron_SpawnFragments(GlobalContext* globalCtx, Vec3f* vec1, Vec3f* vec2) {
@@ -95,7 +109,7 @@ void BgJyaHaheniron_SpawnFragments(GlobalContext* globalCtx, Vec3f* vec1, Vec3f*
}
EffectSsKakera_Spawn(globalCtx, vec1, &vel, vec1, -350, arg5, 40, 4, 0, sKakeraScales[i], 0, 20, 40,
KAKERA_COLOR_NONE, OBJECT_JYA_IRON, &D_06000880);
KAKERA_COLOR_NONE, OBJECT_JYA_IRON, D_06000880);
angle += 0x3333;
}
pos.x = vec1->x + (vec2->x * 5.0f);
@@ -139,17 +153,17 @@ void BgJyaHaheniron_ChairCrumble(BgJyaHaheniron* this, GlobalContext* globalCtx)
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 5.0f, 8.0f, 0.0f, 0x85);
if ((this->actor.bgCheckFlags & 9) || ((this->collider.base.atFlags & 2) && (this->collider.base.at != NULL) &&
if ((this->actor.bgCheckFlags & 9) || ((this->collider.base.atFlags & AT_HIT) && (this->collider.base.at != NULL) &&
(this->collider.base.at->type == ACTORTYPE_PLAYER))) {
vec.x = -Rand_ZeroOne() * this->actor.velocity.x;
vec.y = -Rand_ZeroOne() * this->actor.velocity.y;
vec.z = -Rand_ZeroOne() * this->actor.velocity.z;
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.posRot, &vec);
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.posRot.pos, &vec);
Actor_Kill(&this->actor);
} else if (this->timer > 60) {
Actor_Kill(&this->actor);
} else {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
this->actor.shape.rot.y += 0x4B0;
this->actor.shape.rot.x += 0xFA0;
@@ -163,7 +177,7 @@ void BgJyaHaheniron_PillarCrumble(BgJyaHaheniron* this, GlobalContext* globalCtx
if (this->timer >= 8) {
Actor_MoveForward(&this->actor);
} else if (this->timer >= 17) {
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.posRot, D_808987A0);
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.posRot.pos, D_808987A0);
Actor_Kill(&this->actor);
}
this->actor.shape.rot.y += 0x258;
@@ -176,8 +190,8 @@ void BgJyaHaheniron_SetupRubbleCollide(BgJyaHaheniron* this) {
void BgJyaHaheniron_RubbleCollide(BgJyaHaheniron* this, GlobalContext* globalCtx) {
if (this->timer >= 17) {
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.posRot, D_808987AC);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR2);
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.posRot.pos, D_808987AC);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR2);
Actor_Kill(&this->actor);
}
}
@@ -196,7 +210,7 @@ void BgJyaHaheniron_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaHaheniron* this = THIS;
if (this->actor.params == 0) {
func_800628A4(0, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
}
Gfx_DrawDListOpa(globalCtx, dLists[this->actor.params]);
}
@@ -12,7 +12,7 @@ typedef struct BgJyaHaheniron {
/* 0x0000 */ Actor actor;
/* 0x014C */ BgJyaHahenironActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
/* 0x0170 */ ColliderJntSphItem colliderItems[1];
/* 0x0170 */ ColliderJntSphElement colliderItems[1];
/* 0x01B0 */ s16 timer;
} BgJyaHaheniron; // size = 0x01B4
@@ -23,6 +23,26 @@ const ActorInit Bg_Jya_Ironobj_InitVars = {
(ActorFunc)BgJyaIronobj_Update,
(ActorFunc)BgJyaIronobj_Draw,
};
static ColliderCylinderInit D_808994AC = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_ENEMY,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 30, 150, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Jya_Ironobj/func_808988A0.s")
@@ -39,17 +39,31 @@ const ActorInit Bg_Jya_Megami_InitVars = {
(ActorFunc)BgJyaMegami_Draw,
};
static ColliderJntSphItemInit sJntSphItemsInit[] = {
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00200000, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{ 0x00, { { 0x0000, 0xFDA8, 0xFF38 }, 0x003C }, 0x0064 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00200000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, -600, -200 }, 60 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static BgJyaMegamiPieceInit sPiecesInit[] = {
@@ -185,9 +199,9 @@ void BgJyaMegami_SetupDetectLight(BgJyaMegami* this) {
}
void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 0x2) {
if (this->collider.base.acFlags & AC_HIT) {
this->lightTimer++;
this->collider.base.acFlags &= ~0x2;
this->collider.base.acFlags &= ~AC_HIT;
if (globalCtx->gameplayFrames % 4 == 0) {
func_8089A41C(this, globalCtx, (this->crumbleIndex * 0.04f) + 0.05f);
}
@@ -334,7 +348,7 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) {
void BgJyaMegami_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaMegami* this = THIS;
func_800628A4(0, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
if (this->actionFunc == BgJyaMegami_Explode) {
BgJyaMegami_DrawExplode(this, globalCtx);
} else {
@@ -19,7 +19,7 @@ typedef struct BgJyaMegami {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgJyaMegamiActionFunc actionFunc;
/* 0x0168 */ ColliderJntSph collider;
/* 0x0188 */ ColliderJntSphItem colliderItem;
/* 0x0188 */ ColliderJntSphElement colliderItem;
/* 0x01C8 */ s16 lightTimer;
/* 0x01CA */ s16 explosionTimer;
/* 0x01CC */ s16 crumbleIndex;
@@ -30,17 +30,31 @@ const ActorInit Bg_Menkuri_Eye_InitVars = {
extern Gfx D_06002D20[];
static s32 D_8089C1A0;
static ColliderJntSphItemInit sJntSphItemsInit[1] = {
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{ 0x04, { 0x00000000, 0x00, 0x00 }, { 0x0001F820, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK4,
{ 0x00000000, 0x00, 0x00 },
{ 0x0001F820, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 1, { { 0, 0, 0 }, 14 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -49,15 +63,15 @@ static InitChainEntry sInitChain[] = {
void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx) {
BgMenkuriEye* this = THIS;
ColliderJntSphItem* colliderList;
ColliderJntSphElement* colliderList;
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
this->collider.list->dim.worldSphere.center.x = this->actor.posRot.pos.x;
this->collider.list->dim.worldSphere.center.y = this->actor.posRot.pos.y;
this->collider.list->dim.worldSphere.center.z = this->actor.posRot.pos.z;
colliderList = this->collider.list;
this->collider.elements[0].dim.worldSphere.center.x = this->actor.posRot.pos.x;
this->collider.elements[0].dim.worldSphere.center.y = this->actor.posRot.pos.y;
this->collider.elements[0].dim.worldSphere.center.z = this->actor.posRot.pos.z;
colliderList = this->collider.elements;
colliderList->dim.worldSphere.radius = colliderList->dim.modelSphere.radius;
if (!Flags_GetSwitch(globalCtx, this->actor.params)) {
D_8089C1A0 = 0;
@@ -85,9 +99,9 @@ void BgMenkuriEye_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
}
if ((this->collider.base.acFlags & 2) &&
if ((this->collider.base.acFlags & AC_HIT) &&
(ABS((s16)(this->collider.base.ac->posRot.rot.y - this->actor.shape.rot.y)) > 0x5000)) {
this->collider.base.acFlags &= ~0x2;
this->collider.base.acFlags &= ~AC_HIT;
if (this->framesUntilDisable == -1) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_AMOS_DAMAGE);
D_8089C1A0 += 1;
@@ -10,7 +10,7 @@ typedef struct BgMenkuriEye {
/* 0x0000 */ Actor actor;
/* 0x014C */ s16 framesUntilDisable;
/* 0x0150 */ ColliderJntSph collider;
/* 0x0170 */ ColliderJntSphItem colliderItems[1];
/* 0x0170 */ ColliderJntSphElement colliderItems[1];
} BgMenkuriEye; // size = 0x01B0
extern const ActorInit Bg_Menkuri_Eye_InitVars;
@@ -31,55 +31,118 @@ const ActorInit Bg_Mizu_Bwall_InitVars = {
(ActorFunc)BgMizuBwall_Draw,
};
static ColliderTrisItemInit sTrisElementInitFloor[2] = {
static ColliderTrisElementInit sTrisElementInitFloor[2] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { -40.0f, 0.0f, -40.0f }, { -40.0f, 0.0f, 40.0f }, { 40.0f, 0.0f, 40.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { -40.0f, 0.0f, -40.0f }, { 40.0f, 0.0f, 40.0f }, { 40.0f, 0.0f, -40.0f } } },
},
};
static ColliderTrisInit sTrisInitFloor = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_TRIS,
},
2,
sTrisElementInitFloor,
};
static ColliderTrisItemInit sTrisElementInitRutoWall[1] = {
static ColliderTrisElementInit sTrisElementInitRutoWall[1] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 116.0f, 0.0f }, { 0.0f, 0.0f, 70.0f }, { 0.0f, 0.0f, -70.0f } } },
},
};
static ColliderTrisInit sTrisInitRutoWall = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_TRIS,
},
1,
sTrisElementInitRutoWall,
};
static ColliderTrisItemInit sTrisElementInitWall[2] = {
static ColliderTrisElementInit sTrisElementInitWall[2] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 120.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 60.0f, 0.0f, 0.0f } } },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 120.0f, 0.0f }, { 60.0f, 0.0f, 0.0f }, { 60.0f, 120.0f, 0.0f } } },
},
};
static ColliderTrisInit sTrisInitUnusedWall = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_TRIS,
},
2,
sTrisElementInitWall,
};
static ColliderTrisInit sTrisInitStingerWall = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_TRIS,
},
2,
sTrisElementInitWall,
};
@@ -138,15 +201,15 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
for (j = 0; j < 3; j++) {
offset.x = sTrisInitFloor.list[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.list[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.list[i].dim.vtx[j].z + 2.0f;
offset.x = sTrisInitFloor.elements[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.elements[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.elements[i].dim.vtx[j].z + 2.0f;
BgMizuBwall_RotateVec3f(&vtx[j], &offset, sin, cos);
vtx[j].x += this->dyna.actor.posRot.pos.x;
vtx[j].y += this->dyna.actor.posRot.pos.y;
vtx[j].z += this->dyna.actor.posRot.pos.z;
}
func_800627A0(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
Collider_SetTrisVertices(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
}
this->actionFunc = BgMizuBwall_Idle;
}
@@ -174,15 +237,15 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i < ARRAY_COUNT(sTrisElementInitRutoWall); i++) {
for (j = 0; j < 3; j++) {
offset.x = sTrisInitRutoWall.list[i].dim.vtx[j].x;
offset.y = sTrisInitRutoWall.list[i].dim.vtx[j].y;
offset.z = sTrisInitRutoWall.list[i].dim.vtx[j].z + 2.0f;
offset.x = sTrisInitRutoWall.elements[i].dim.vtx[j].x;
offset.y = sTrisInitRutoWall.elements[i].dim.vtx[j].y;
offset.z = sTrisInitRutoWall.elements[i].dim.vtx[j].z + 2.0f;
BgMizuBwall_RotateVec3f(&vtx[j], &offset, sin, cos);
vtx[j].x += this->dyna.actor.posRot.pos.x;
vtx[j].y += this->dyna.actor.posRot.pos.y;
vtx[j].z += this->dyna.actor.posRot.pos.z;
}
func_800627A0(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
Collider_SetTrisVertices(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
}
this->actionFunc = BgMizuBwall_Idle;
}
@@ -212,15 +275,15 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
for (j = 0; j < 3; j++) {
//! @bug This uses the wrong set of collision triangles, causing the collider to be
//! flat to the ground instead of vertical. It should use sTrisInitUnusedWall.
offset.x = sTrisInitFloor.list[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.list[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.list[i].dim.vtx[j].z;
offset.x = sTrisInitFloor.elements[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.elements[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.elements[i].dim.vtx[j].z;
BgMizuBwall_RotateVec3f(&vtx[j], &offset, sin, cos);
vtx[j].x += this->dyna.actor.posRot.pos.x;
vtx[j].y += this->dyna.actor.posRot.pos.y;
vtx[j].z += this->dyna.actor.posRot.pos.z;
}
func_800627A0(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
Collider_SetTrisVertices(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
}
this->actionFunc = BgMizuBwall_Idle;
}
@@ -250,15 +313,15 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
for (j = 0; j < 3; j++) {
//! @bug This uses the wrong set of collision triangles, causing the collider to be
//! flat to the ground instead of vertical. It should use sTrisInitStingerWall.
offset.x = sTrisInitFloor.list[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.list[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.list[i].dim.vtx[j].z + 2.0f;
offset.x = sTrisInitFloor.elements[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.elements[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.elements[i].dim.vtx[j].z + 2.0f;
BgMizuBwall_RotateVec3f(&vtx[j], &offset, sin, cos);
vtx[j].x += this->dyna.actor.posRot.pos.x;
vtx[j].y += this->dyna.actor.posRot.pos.y;
vtx[j].z += this->dyna.actor.posRot.pos.z;
}
func_800627A0(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
Collider_SetTrisVertices(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
}
this->actionFunc = BgMizuBwall_Idle;
}
@@ -288,15 +351,15 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
for (j = 0; j < 3; j++) {
//! @bug This uses the wrong set of collision triangles, causing the collider to be
//! flat to the ground instead of vertical. It should use sTrisInitStingerWall.
offset.x = sTrisInitFloor.list[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.list[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.list[i].dim.vtx[j].z + 2.0f;
offset.x = sTrisInitFloor.elements[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.elements[i].dim.vtx[j].y;
offset.z = sTrisInitFloor.elements[i].dim.vtx[j].z + 2.0f;
BgMizuBwall_RotateVec3f(&vtx[j], &offset, sin, cos);
vtx[j].x += this->dyna.actor.posRot.pos.x;
vtx[j].y += this->dyna.actor.posRot.pos.y;
vtx[j].z += this->dyna.actor.posRot.pos.z;
}
func_800627A0(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
Collider_SetTrisVertices(&this->collider, i, &vtx[0], &vtx[1], &vtx[2]);
}
this->actionFunc = BgMizuBwall_Idle;
}
@@ -399,8 +462,8 @@ void BgMizuBwall_SpawnDebris(BgMizuBwall* this, GlobalContext* globalCtx) {
void BgMizuBwall_Idle(BgMizuBwall* this, GlobalContext* globalCtx) {
BgMizuBwall_SetAlpha(this, globalCtx);
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Flags_SetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 8) & 0x3F);
this->breakTimer = 1;
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
@@ -11,7 +11,7 @@ typedef void (*BgMizuBwallActionFunc)(struct BgMizuBwall*, GlobalContext*);
typedef struct BgMizuBwall {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderTris collider;
/* 0x0184 */ ColliderTrisItem elements[3]; // only ever uses 2
/* 0x0184 */ ColliderTrisElement elements[3]; // only ever uses 2
/* 0x0298 */ BgMizuBwallActionFunc actionFunc;
/* 0x029C */ f32 yRot;
/* 0x02A0 */ s32 scrollAlpha1;
@@ -41,17 +41,31 @@ const ActorInit Bg_Mori_Hashigo_InitVars = {
NULL,
};
static ColliderJntSphItemInit sJntSphItemsInit[1] = {
static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{ 0x04, { 0x00000000, 0x00, 0x00 }, { 0x0001F820, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK4,
{ 0x00000000, 0x00, 0x00 },
{ 0x0001F820, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 25 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static InitChainEntry sInitChainClasp[] = {
@@ -94,10 +108,10 @@ void BgMoriHashigo_InitCollider(BgMoriHashigo* this, GlobalContext* globalCtx) {
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
this->collider.list[0].dim.worldSphere.center.x = (s16)this->dyna.actor.posRot.pos.x;
this->collider.list[0].dim.worldSphere.center.y = (s16)this->dyna.actor.posRot.pos.y + 21;
this->collider.list[0].dim.worldSphere.center.z = (s16)this->dyna.actor.posRot.pos.z;
this->collider.list[0].dim.worldSphere.radius = 19;
this->collider.elements[0].dim.worldSphere.center.x = (s16)this->dyna.actor.posRot.pos.x;
this->collider.elements[0].dim.worldSphere.center.y = (s16)this->dyna.actor.posRot.pos.y + 21;
this->collider.elements[0].dim.worldSphere.center.z = (s16)this->dyna.actor.posRot.pos.z;
this->collider.elements[0].dim.worldSphere.radius = 19;
}
s32 BgMoriHashigo_SpawnLadder(BgMoriHashigo* this, GlobalContext* globalCtx) {
@@ -205,8 +219,8 @@ void BgMoriHashigo_SetupClasp(BgMoriHashigo* this) {
void BgMoriHashigo_Clasp(BgMoriHashigo* this, GlobalContext* globalCtx) {
if (this->hitTimer <= 0) {
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->hitTimer = 10;
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
@@ -11,7 +11,7 @@ typedef void (*BgMoriHashigoActionFunc)(struct BgMoriHashigo*, GlobalContext*);
typedef struct BgMoriHashigo {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph collider;
/* 0x0184 */ ColliderJntSphItem colliderItems[1];
/* 0x0184 */ ColliderJntSphElement colliderItems[1];
/* 0x01C4 */ BgMoriHashigoActionFunc actionFunc;
/* 0x01C8 */ s16 hitTimer;
/* 0x01CA */ s16 bounceCounter;
@@ -48,21 +48,42 @@ const ActorInit Bg_Po_Event_InitVars = {
(ActorFunc)BgPoEvent_Draw,
};
static ColliderTrisItemInit sTrisItemsInit[2] = {
static ColliderTrisElementInit sTrisElementsInit[2] = {
{
{ 0x04, { 0x00000000, 0x00, 0x00 }, { 0x0001F820, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK4,
{ 0x00000000, 0x00, 0x00 },
{ 0x0001F820, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 25.0f, 33.0f, 0.0f }, { -25.0f, 33.0f, 0.0f }, { -25.0f, -33.0f, 0.0f } } },
},
{
{ 0x04, { 0x00000000, 0x00, 0x00 }, { 0x0001F820, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK4,
{ 0x00000000, 0x00, 0x00 },
{ 0x0001F820, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 25.0f, 33.0f, 0.0f }, { -25.0f, -33.0f, 0.0f }, { 25.0f, -33.0f, 0.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
2,
sTrisItemsInit,
sTrisElementsInit,
};
static u8 sBlocksAtRest = 0;
@@ -75,7 +96,7 @@ void BgPoEvent_InitPaintings(BgPoEvent* this, GlobalContext* globalCtx) {
static s16 paintingPosX[] = { -1302, -866, 1421, 985 };
static s16 paintingPosY[] = { 1107, 1091 };
static s16 paintingPosZ[] = { -3384, -3252 };
ColliderTrisItemInit* item;
ColliderTrisElementInit* item;
Vec3f* vtxVec;
s32 i1;
s32 i2;
@@ -96,7 +117,7 @@ void BgPoEvent_InitPaintings(BgPoEvent* this, GlobalContext* globalCtx) {
scaleY = 1.0f;
}
for (i1 = 0; i1 < sTrisInit.count; i1++) {
item = &sTrisInit.list[i1];
item = &sTrisInit.elements[i1];
if (1) {} // This section looks like a macro of some sort.
for (i2 = 0; i2 < 3; i2++) {
vtxVec = &item->dim.vtx[i2];
@@ -104,7 +125,7 @@ void BgPoEvent_InitPaintings(BgPoEvent* this, GlobalContext* globalCtx) {
sp9C[i2].y = (vtxVec->y * scaleY) + this->dyna.actor.initPosRot.pos.y;
sp9C[i2].z = this->dyna.actor.initPosRot.pos.z + (coss * vtxVec->z) - (vtxVec->x * sins);
}
func_800627A0(&this->collider, i1, &sp9C[0], &sp9C[1], &sp9C[2]);
Collider_SetTrisVertices(&this->collider, i1, &sp9C[0], &sp9C[1], &sp9C[2]);
}
if ((this->type != 4) && (this->index != 2)) {
phi_t2 = (this->type == 2) ? this->index : this->index + 2;
@@ -434,7 +455,7 @@ void BgPoEvent_BlockSolved(BgPoEvent* this, GlobalContext* globalCtx) {
}
void BgPoEvent_AmyWait(BgPoEvent* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
sPuzzleState |= 0x20;
this->timer = 5;
func_8003426C(&this->dyna.actor, 0x4000, 0xFF, 0, 5);
@@ -518,7 +539,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, GlobalContext* globalCtx) {
this->timer = 0;
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH);
this->actionFunc = BgPoEvent_PaintingVanish;
} else if (this->collider.base.acFlags & 2) {
} else if (this->collider.base.acFlags & AC_HIT) {
if (!BgPoEvent_NextPainting(this)) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_PO_SISTERS, thisx->posRot.pos.x,
thisx->posRot.pos.y - 40.0f, thisx->posRot.pos.z, 0, thisx->shape.rot.y, 0,
@@ -16,7 +16,7 @@ typedef struct BgPoEvent {
/* 0x016A */ s8 direction;
/* 0x016C */ s16 timer;
/* 0x0170 */ ColliderTris collider;
/* 0x0190 */ ColliderTrisItem colliderItems[2];
/* 0x0190 */ ColliderTrisElement colliderItems[2];
} BgPoEvent; // size = 0x0248
extern const ActorInit Bg_Po_Event_InitVars;
@@ -25,8 +25,22 @@ void BgPoSyokudai_Update(Actor* thisx, GlobalContext* globalCtx);
void BgPoSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx);
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_METAL_SHIELD, 0x00, 0x0D, 0x39, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{
COLTYPE_METAL,
AT_NONE,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 12, 60, 0, { 0, 0, 0 } },
};
@@ -72,7 +86,7 @@ void BgPoSyokudai_Init(Actor* thisx, GlobalContext* globalCtx) {
this->flameColor = (thisx->params >> 8) & 0xFF;
thisx->params &= 0x3F;
thisx->colChkInfo.mass = 0xFF;
thisx->colChkInfo.mass = MASS_IMMOVABLE;
this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo);
Lights_PointGlowSetInfo(&this->lightInfo, thisx->posRot.pos.x, (s16)thisx->posRot.pos.y + 65, thisx->posRot.pos.z,
@@ -29,6 +29,33 @@ const ActorInit Bg_Spot06_Objects_InitVars = {
(ActorFunc)BgSpot06Objects_Update,
(ActorFunc)BgSpot06Objects_Draw,
};
static ColliderJntSphElementInit D_808AF930[1] = {
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000080, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 1, { { 0, 0, -160 }, 18 }, 100 },
},
};
static ColliderJntSphInit D_808AF954 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
D_808AF930,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot06_Objects/BgSpot06Objects_Init.s")
@@ -35,25 +35,53 @@ extern Gfx D_0500A880[];
extern CollisionHeader D_060039D4;
extern Gfx D_06003898[];
static ColliderJntSphItemInit sJntSphItemsInit[] = {
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 50, 50 }, 70 }, 100 },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { -100, 50, 50 }, 70 }, 100 },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 100, 50, 50 }, 70 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
3,
sJntSphItemsInit,
sJntSphElementsInit,
};
static Vec3f D_808B08AC[] = {
@@ -158,7 +186,7 @@ void BgSpot08Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void BgSpot08Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
BgSpot08Bakudankabe* this = THIS;
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
func_808B0324(this, globalCtx);
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot.pos, 40, NA_SE_EV_WALL_BROKEN);
@@ -172,8 +200,8 @@ void BgSpot08Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgSpot08Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgSpot08Bakudankabe* this = THIS;
func_800628A4(0, &this->collider);
func_800628A4(1, &this->collider);
func_800628A4(2, &this->collider);
Collider_UpdateSpheres(0, &this->collider);
Collider_UpdateSpheres(1, &this->collider);
Collider_UpdateSpheres(2, &this->collider);
Gfx_DrawDListOpa(globalCtx, D_06003898);
}
@@ -9,7 +9,7 @@ struct BgSpot08Bakudankabe;
typedef struct BgSpot08Bakudankabe {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph collider;
/* 0x0184 */ ColliderJntSphItem colliderItems[3];
/* 0x0184 */ ColliderJntSphElement colliderItems[3];
} BgSpot08Bakudankabe; // size = 0x0244
extern const ActorInit Bg_Spot08_Bakudankabe_InitVars;
@@ -30,8 +30,22 @@ const ActorInit Bg_Spot11_Bakudankabe_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 40, 80, 0, { 2259, 108, -1580 } },
};
@@ -123,7 +137,7 @@ void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
BgSpot11Bakudankabe* this = THIS;
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
func_808B2218(this, globalCtx);
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
Audio_PlaySoundAtPosition(globalCtx, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN);
@@ -36,22 +36,50 @@ static s16 D_808B5DD8[][10] = {
{ 0x0006, 0x0009, 0x0028, 0x0000, 0x0BB8, 0xD8F0, 0x001E, 0x0000, 0x0000, 0x0000 },
};
static ColliderJntSphItemInit sJntSphItemsInit[] = {
static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x4FC1FFF6, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x4FC1FFF6, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 50, 0 }, 288 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK12, 0x00, 0x0D, 0x39, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_HARD,
AT_NONE,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
1,
sJntSphItemsInit,
sJntSphElementsInit,
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 190, 80, 0, { 10, 0, 50 } },
};
@@ -127,11 +155,11 @@ void func_808B4C4C(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
s32 pad;
Collider_InitJntSph(globalCtx, &this->colliderJntSph);
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphItems);
this->colliderJntSph.list->dim.worldSphere.center.x = this->actor.posRot.pos.x;
this->colliderJntSph.list->dim.worldSphere.center.y = this->actor.posRot.pos.y + 50.0f;
this->colliderJntSph.list->dim.worldSphere.center.z = this->actor.posRot.pos.z;
this->colliderJntSph.list->dim.worldSphere.radius = 120;
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderElements);
this->colliderJntSph.elements[0].dim.worldSphere.center.x = this->actor.posRot.pos.x;
this->colliderJntSph.elements[0].dim.worldSphere.center.y = this->actor.posRot.pos.y + 50.0f;
this->colliderJntSph.elements[0].dim.worldSphere.center.z = this->actor.posRot.pos.z;
this->colliderJntSph.elements[0].dim.worldSphere.radius = 120;
}
void func_808B4D04(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
@@ -151,7 +179,7 @@ s32 func_808B4D9C(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
}
Actor_ProcessInitChain(&this->actor, sInitChainBoulder);
Actor_SetScale(&this->actor, 0.4f);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
func_808B4C4C(this, globalCtx);
func_808B4D04(this, globalCtx);
this->sinRotation = Math_SinS(this->actor.shape.rot.y);
@@ -214,7 +242,7 @@ void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx) {
switch (this->actor.params) {
case 0xFF:
// The boulder is intact
shouldLive = func_808B4D9C(thisx, globalCtx);
shouldLive = func_808B4D9C(this, globalCtx);
break;
case 0:
case 1:
@@ -223,7 +251,7 @@ void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx) {
case 4:
case 5:
// The boulder is debris
shouldLive = func_808B4E58(thisx, globalCtx);
shouldLive = func_808B4E58(this, globalCtx);
break;
default:
osSyncPrintf("Error : arg_data おかしいな(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot16_bombstone.c", 668,
@@ -233,7 +261,7 @@ void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (!shouldLive) {
Actor_Kill(thisx);
Actor_Kill(&this->actor);
return;
}
osSyncPrintf("Spot16 obj 爆弾石 (scaleX %f)(arg_data 0x%04x)\n", this->actor.scale.x, this->actor.params);
@@ -270,6 +298,8 @@ void func_808B5240(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
if (1) {}
// for(;this->unk_158 < ARRAY_COUNTU(D_808B5EB0); this->unk_158++)
while (true) {
if (this->unk_158 >= ARRAY_COUNTU(D_808B5EB0) || this->unk_154 < D_808B5EB0[this->unk_158][0]) {
break;
@@ -391,7 +421,7 @@ void func_808B57E0(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
playerHeldActor = player->heldActor;
if (playerHeldActor != NULL && playerHeldActor->type == ACTORTYPE_EXPLOSIVES &&
playerHeldActor->id == ACTOR_EN_BOMBF) {
sPlayerBomb = playerHeldActor;
sPlayerBomb = (EnBombf*)playerHeldActor;
}
}
}
@@ -409,8 +439,8 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
if (globalCtx) {}
if (this->colliderCylinder.base.acFlags & 2) {
this->colliderCylinder.base.acFlags &= ~2;
if (this->colliderCylinder.base.acFlags & AC_HIT) {
this->colliderCylinder.base.acFlags &= ~AC_HIT;
func_808B561C(this, globalCtx);
@@ -421,9 +451,9 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
func_808B5A78(this);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderCylinder);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderCylinder.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph.base);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph.base);
}
if (mREG(64) == 1) {
@@ -486,7 +516,7 @@ void func_808B5B6C(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
if (actor->bgCheckFlags & 8 || (actor->bgCheckFlags & 1 && actor->velocity.y < 0.0f)) {
BgSpot16Bombstone_SpawnFragments(this, globalCtx);
BgSpot16Bombstone_SpawnDust(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &actor->posRot, 20, NA_SE_EV_ROCK_BROKEN);
Audio_PlaySoundAtPosition(globalCtx, &actor->posRot.pos, 20, NA_SE_EV_ROCK_BROKEN);
Actor_Kill(actor);
return;
}
@@ -18,7 +18,7 @@ typedef struct BgSpot16Bombstone {
/* 0x015C */ f32 sinRotation;
/* 0x0160 */ f32 cosRotation;
/* 0x0164 */ ColliderJntSph colliderJntSph;
/* 0x0184 */ ColliderJntSphItem colliderJntSphItems[1];
/* 0x0184 */ ColliderJntSphElement colliderElements[1];
/* 0x01C4 */ ColliderCylinder colliderCylinder;
/* 0x0210 */ s16 unk_210;
/* 0x0212 */ s16 unk_212;
@@ -38,21 +38,42 @@ const ActorInit Bg_Spot18_Basket_InitVars = {
(ActorFunc)BgSpot18Basket_Draw,
};
static ColliderJntSphItemInit sJntSphItemsInit[2] = {
static ColliderJntSphElementInit sJntSphElementsInit[2] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 0, { { 0, 2040, 0 }, 54 }, 100 },
},
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 1, { { 0, 1400, 0 }, 13 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x09, 0x20, COLSHAPE_JNTSPH },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
2,
sJntSphItemsInit,
sJntSphElementsInit,
};
static s16 D_808B85C8[] = { 0x8000, 0x2AAA, 0xD555, 0x0000 };
@@ -61,8 +82,9 @@ void func_808B7710(Actor* thisx, GlobalContext* globalCtx) {
BgSpot18Basket* this = THIS;
Collider_InitJntSph(globalCtx, &this->colliderJntSph);
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, &this->colliderJntSphItems);
this->dyna.actor.colChkInfo.mass = 0xFF;
Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit,
&this->ColliderJntSphElements);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
}
void func_808B7770(BgSpot18Basket* this, GlobalContext* globalCtx, f32 arg2) {
@@ -197,7 +219,7 @@ void func_808B7BCC(BgSpot18Basket* this, GlobalContext* globalCtx) {
this->dyna.actor.posRot.pos.x = (Math_SinS(this->unk_20E) * this->unk_208) + this->dyna.actor.initPosRot.pos.x;
this->dyna.actor.posRot.pos.z = (Math_CosS(this->unk_20E) * this->unk_208) + this->dyna.actor.initPosRot.pos.z;
if (this->colliderJntSph.base.acFlags & 2) {
if (this->colliderJntSph.base.acFlags & AC_HIT) {
colliderBaseAc = this->colliderJntSph.base.ac;
if (colliderBaseAc != NULL) {
@@ -418,7 +440,7 @@ void BgSpot18Basket_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actionFunc != func_808B7AFC) {
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph);
if (this->actionFunc != func_808B7B6C) {
this->colliderJntSph.base.acFlags &= ~2;
this->colliderJntSph.base.acFlags &= ~AC_HIT;
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph);
}
}
@@ -427,7 +449,7 @@ void BgSpot18Basket_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgSpot18Basket_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgSpot18Basket* this = THIS;
func_800628A4(0, &this->colliderJntSph);
func_800628A4(1, &this->colliderJntSph);
Collider_UpdateSpheres(0, &this->colliderJntSph);
Collider_UpdateSpheres(1, &this->colliderJntSph);
Gfx_DrawDListOpa(globalCtx, D_060018B0);
}
@@ -11,7 +11,7 @@ typedef void (*BgSpot18BasketActionFunc)(struct BgSpot18Basket*, GlobalContext*)
typedef struct BgSpot18Basket {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph colliderJntSph;
/* 0x0184 */ ColliderJntSphItem colliderJntSphItems[2];
/* 0x0184 */ ColliderJntSphElement ColliderJntSphElements[2];
/* 0x0204 */ BgSpot18BasketActionFunc actionFunc;
/* 0x0208 */ f32 unk_208;
/* 0x020C */ s16 unk_20C;
@@ -37,18 +37,25 @@ const ActorInit Bg_Toki_Swd_InitVars = {
(ActorFunc)BgTokiSwd_Draw,
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x00, 0x39, 0x12, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
{ 10, 70, 0, { 0 } }
};
static ColliderCylinderInit sCylinderInit = { {
COLTYPE_NONE,
AT_NONE,
AC_NONE,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1 | OC2_UNK1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_NONE,
OCELEM_ON,
},
{ 10, 70, 0, { 0 } } };
static CollisionCheckInfoInit sColChkInfoInit = {
0x0A,
0x0023,
0x0064,
0xFF,
};
static CollisionCheckInfoInit sColChkInfoInit = { 10, 35, 100, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 0x19, ICHAIN_STOP),
@@ -76,8 +83,8 @@ void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
Collider_CylinderUpdate(thisx, &this->collider);
func_80061ED4(&thisx->colChkInfo, 0, &sColChkInfoInit);
Collider_UpdateCylinder(thisx, &this->collider);
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
}
void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@@ -149,7 +156,7 @@ void BgTokiSwd_Update(Actor* thisx, GlobalContext* globalCtx) {
BgTokiSwd* this = THIS;
this->actionFunc(this, globalCtx);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
void BgTokiSwd_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -33,21 +33,42 @@ const ActorInit Bg_Ydan_Maruta_InitVars = {
(ActorFunc)BgYdanMaruta_Draw,
};
static ColliderTrisItemInit sTrisItemInit[2] = {
static ColliderTrisElementInit sTrisElementsInit[2] = {
{
{ 0x00, { 0x20000000, 0x00, 0x04 }, { 0x00000004, 0x00, 0x00 }, 0x11, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000004, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_WOOD,
BUMP_ON,
OCELEM_NONE,
},
{ { { 220.0f, -10.0f, 0.0f }, { 220.0f, 10.0f, 0.0f }, { -220.0f, 10.0f, 0.0f } } },
},
{
{ 0x00, { 0x20000000, 0x00, 0x04 }, { 0x00000004, 0x00, 0x00 }, 0x11, 0x01, 0x00 },
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000004, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_WOOD,
BUMP_ON,
OCELEM_NONE,
},
{ { { 16.0f, 0.0f, 0.0f }, { 16.0f, 135.0f, 0.0f }, { -16.0f, 135.0f, 0.0f } } },
},
};
static ColliderTrisInit sTrisInit = {
{ COLTYPE_UNK10, 0x11, 0x09, 0x00, 0x20, COLSHAPE_TRIS },
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
2,
sTrisItemInit,
sTrisElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -66,20 +87,20 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
f32 sinRotY;
f32 cosRotY;
CollisionHeader* colHeader = NULL;
ColliderTrisItemInit* items;
ColliderTrisElementInit* triInit;
Actor_ProcessInitChain(thisx, sInitChain);
Collider_InitTris(globalCtx, &this->collider);
Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, &this->colliderItems);
Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, &this->elements);
this->unk_168 = thisx->params & 0xFFFF;
thisx->params = (thisx->params >> 8) & 0xFF;
if (thisx->params == 0) {
items = &sTrisItemInit[0];
triInit = &sTrisElementsInit[0];
this->actionFunc = func_808BEFF4;
} else {
items = &sTrisItemInit[1];
triInit = &sTrisElementsInit[1];
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_060066A8, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
@@ -96,18 +117,18 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
cosRotY = Math_CosS(thisx->shape.rot.y);
for (i = 0; i < 3; i++) {
sp4C[i].x = (items->dim.vtx[i].x * cosRotY) + thisx->posRot.pos.x;
sp4C[i].y = items->dim.vtx[i].y + thisx->posRot.pos.y;
sp4C[i].z = thisx->posRot.pos.z - (items->dim.vtx[i].x * sinRotY);
sp4C[i].x = (triInit->dim.vtx[i].x * cosRotY) + thisx->posRot.pos.x;
sp4C[i].y = triInit->dim.vtx[i].y + thisx->posRot.pos.y;
sp4C[i].z = thisx->posRot.pos.z - (triInit->dim.vtx[i].x * sinRotY);
}
func_800627A0(&this->collider, 0, &sp4C[0], &sp4C[1], &sp4C[2]);
Collider_SetTrisVertices(&this->collider, 0, &sp4C[0], &sp4C[1], &sp4C[2]);
sp4C[1].x = (items->dim.vtx[2].x * cosRotY) + thisx->posRot.pos.x;
sp4C[1].y = items->dim.vtx[0].y + thisx->posRot.pos.y;
sp4C[1].z = thisx->posRot.pos.z - (items->dim.vtx[2].x * sinRotY);
sp4C[1].x = (triInit->dim.vtx[2].x * cosRotY) + thisx->posRot.pos.x;
sp4C[1].y = triInit->dim.vtx[0].y + thisx->posRot.pos.y;
sp4C[1].z = thisx->posRot.pos.z - (triInit->dim.vtx[2].x * sinRotY);
func_800627A0(&this->collider, 1, &sp4C[0], &sp4C[2], &sp4C[1]);
Collider_SetTrisVertices(&this->collider, 1, &sp4C[0], &sp4C[2], &sp4C[1]);
}
void BgYdanMaruta_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@@ -120,23 +141,23 @@ void BgYdanMaruta_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_808BEFF4(BgYdanMaruta* this, GlobalContext* globalCtx) {
if (this->collider.base.atFlags & 2) {
if (this->collider.base.atFlags & AT_HIT) {
func_8002F71C(globalCtx, &this->dyna.actor, 7.0f, this->dyna.actor.shape.rot.y, 6.0f);
}
this->dyna.actor.shape.rot.x += 0x360;
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
func_8002F974(&this->dyna.actor, NA_SE_EV_TOGE_STICK_ROLLING - SFX_FLAG);
}
void func_808BF078(BgYdanMaruta* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
this->unk_16A = 20;
Flags_SetSwitch(globalCtx, this->unk_168);
func_80078884(NA_SE_SY_CORRECT_CHIME);
this->actionFunc = func_808BF108;
func_800800F8(globalCtx, 0xBC2, 0x32, &this->dyna.actor, 0);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
@@ -14,7 +14,7 @@ typedef struct BgYdanMaruta {
/* 0x0168 */ u8 unk_168;
/* 0x016A */ s16 unk_16A;
/* 0x016C */ ColliderTris collider;
/* 0x018C */ ColliderTrisItem colliderItems[2];
/* 0x018C */ ColliderTrisElement elements[2];
} BgYdanMaruta; // size = 0x0244
extern const ActorInit Bg_Ydan_Maruta_InitVars;
@@ -27,6 +27,44 @@ const ActorInit Bg_Ydan_Sp_InitVars = {
(ActorFunc)BgYdanSp_Update,
(ActorFunc)BgYdanSp_Draw,
};
static ColliderTrisElementInit D_808C0930[2] = {
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x00 },
{ 0x00020800, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 75.0f, -8.0f, 75.0f }, { -75.0f, -8.0f, 75.0f }, { -75.0f, -8.0f, -75.0f } } },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x00 },
{ 0x00020800, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ { { 140.0f, 288.79998779296875f, 0.0f }, { -140.0f, 288.0f, 0.0f }, { -140.0f, 0.0f, 0.0f } } },
},
};
static ColliderTrisInit D_808C09A8 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_2,
COLSHAPE_TRIS,
},
2,
D_808C0930,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ydan_Sp/BgYdanSp_Init.s")
@@ -50,6 +50,231 @@ const ActorInit Boss_Dodongo_InitVars = {
(ActorFunc)BossDodongo_Update,
(ActorFunc)BossDodongo_Draw,
};
static ColliderJntSphElementInit D_808C7100[19] = {
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 7, { { 8500, 1200, 0 }, 40 }, 100 },
},
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 33, { { 2000, -2000, 0 }, 60 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 1, { { 0, 0, 0 }, 60 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 15, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 16, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 17, { { 0, 0, 0 }, 40 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 22, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 23, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 24, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 29, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 30, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 31, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 32, { { 0, 0, 0 }, 50 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 38, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 39, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 40, { { 0, 0, 0 }, 40 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 45, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 46, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 47, { { 0, 0, 0 }, 40 }, 100 },
},
};
static ColliderJntSphInit D_808C73AC = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
19,
D_808C7100,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Dodongo/func_808C1190.s")
+225
View File
@@ -21,6 +21,231 @@ const ActorInit Boss_Fd_InitVars = {
(ActorFunc)BossFd_Update,
(ActorFunc)BossFd_Draw,
};
static ColliderJntSphElementInit D_808D1660[19] = {
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 1, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 2, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 3, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 4, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 5, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 6, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 7, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 8, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 9, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 10, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 11, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 12, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 13, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 14, { { 0, 0, 0 }, 18 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 15, { { 0, 0, 0 }, 16 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 16, { { 0, 0, 0 }, 14 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 17, { { 0, 0, 0 }, 12 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 18, { { 0, 0, 0 }, 10 }, 100 },
},
};
static ColliderJntSphInit D_808D190C = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
19,
D_808D1660,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Fd/func_808CADC0.s")
@@ -21,6 +21,121 @@ const ActorInit Boss_Fd2_InitVars = {
(ActorFunc)BossFd2_Update,
(ActorFunc)BossFd2_Draw,
};
static ColliderJntSphElementInit D_808D5FD0[9] = {
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 35, { { 6000, 0, 0 }, 21 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 18, { { 4000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 19, { { 3000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 20, { { 4000, 0, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 24, { { 4000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 25, { { 3000, 0, 0 }, 13 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 26, { { 3500, 1500, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 17, { { 0, 0, 0 }, 26 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 30, { { 0, 0, 0 }, 17 }, 100 },
},
};
static ColliderJntSphInit D_808D6114 = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
9,
D_808D5FD0,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Fd2/func_808D2670.s")
@@ -68,6 +68,46 @@ const ActorInit Boss_Ganon_InitVars = {
(ActorFunc)BossGanon_Update,
(ActorFunc)BossGanon_Draw,
};
static ColliderCylinderInit D_808E4C00 = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 20, 80, -50, { 0, 0, 0 } },
};
static ColliderCylinderInit D_808E4C2C = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK6,
{ 0x00100700, 0x00, 0x08 },
{ 0x0D900740, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 20, 30, -15, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Ganon/func_808D6870.s")
@@ -51,6 +51,236 @@ const ActorInit Boss_Ganon2_InitVars = {
(ActorFunc)BossGanon2_Update,
(ActorFunc)BossGanon2_Draw,
};
static ColliderJntSphElementInit D_80906D7C[16] = {
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 1, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 2, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 3, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 4, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 5, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 6, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 7, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 8, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 9, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 10, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 11, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 12, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 13, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 14, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 15, { { 0, 0, 0 }, 30 }, 100 },
},
};
static ColliderJntSphInit D_80906FBC = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_FIRST_ONLY | OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
16,
D_80906D7C,
};
static ColliderJntSphElementInit D_80906FCC[2] = {
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x40 },
{ 0xFFDFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 15, { { 0, 0, 0 }, 45 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x40 },
{ 0xFFDFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 16, { { 0, 0, 0 }, 45 }, 100 },
},
};
static ColliderJntSphInit D_80907014 = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
2,
D_80906FCC,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Ganon2/func_808FCF40.s")
@@ -21,6 +21,46 @@ const ActorInit Boss_Ganondrof_InitVars = {
(ActorFunc)BossGanondrof_Update,
(ActorFunc)BossGanondrof_Draw,
};
static ColliderCylinderInit D_80914CD0 = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 30, 90, -50, { 0, 0, 0 } },
};
static ColliderCylinderInit D_80914CFC = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 20, 30, -20, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/func_80910640.s")
@@ -21,6 +21,165 @@ const ActorInit Boss_Goma_InitVars = {
(ActorFunc)BossGoma_Update,
(ActorFunc)BossGoma_Draw,
};
static ColliderJntSphElementInit D_8091AE60[13] = {
{
{
ELEMTYPE_UNK3,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 5, { { 0, 0, 1200 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 11, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 12, { { 0, 0, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 13, { { 0, 0, 0 }, 12 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 14, { { 0, 0, 0 }, 25 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 22, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 23, { { 0, 0, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 29, { { 0, 0, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 57, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 64, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 74, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 75, { { 0, 0, 0 }, 15 }, 100 },
},
{
{
ELEMTYPE_UNK2,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 81, { { 0, 0, 0 }, 15 }, 100 },
},
};
static ColliderJntSphInit D_8091B034 = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
13,
D_8091AE60,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Goma/func_80915A10.s")
+245
View File
@@ -21,6 +21,251 @@ const ActorInit Boss_Mo_InitVars = {
(ActorFunc)BossMo_Update,
(ActorFunc)BossMo_Draw,
};
static ColliderCylinderInit D_8092603C = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFDFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 20, 40, -20, { 0, 0, 0 } },
};
static ColliderJntSphElementInit D_80925D80[19] = {
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, 0, 0 }, 0 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 1, { { 0, 0, 0 }, 0 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 2, { { 0, 0, 0 }, 30 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 3, { { 0, 0, 0 }, 24 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 4, { { 0, 0, 0 }, 22 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 5, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 6, { { 0, 0, 0 }, 18 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 7, { { 0, 0, 0 }, 16 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 8, { { 0, 0, 0 }, 14 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 9, { { 0, 0, 0 }, 12 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 10, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 11, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 12, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 13, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 14, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 15, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 16, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 17, { { 0, 0, 0 }, 10 }, 100 },
},
{
{
ELEMTYPE_UNK4,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 18, { { 0, 0, 0 }, 10 }, 100 },
},
};
static ColliderJntSphInit D_8092602C = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
19,
D_80925D80,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Mo/func_8091BB00.s")
@@ -21,6 +21,320 @@ const ActorInit Boss_Sst_InitVars = {
(ActorFunc)BossSst_Update,
(ActorFunc)BossSst_Draw,
};
static ColliderJntSphElementInit D_80937630[11] = {
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 7, { { 1500, 0, 0 }, 70 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 6, { { 0, 0, 0 }, 75 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 4, { { 5000, 0, 0 }, 120 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 3, { { -2500, 0, 0 }, 150 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 43, { { 1500, 0, 0 }, 80 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 43, { { 7500, 0, 0 }, 70 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 44, { { 3000, 0, 0 }, 60 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 40, { { 1500, 0, 0 }, 80 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 40, { { 7500, 0, 0 }, 70 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 41, { { 3000, 0, 0 }, 60 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x30 },
{ 0x00000080, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_ON,
},
{ 8, { { 1500, 0, 0 }, 70 }, 100 },
},
};
static ColliderJntSphInit D_809377BC = {
{
COLTYPE_HARD,
AT_TYPE_ENEMY,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
11,
D_80937630,
};
static ColliderCylinderInit D_809377CC = {
{
COLTYPE_HIT0,
AT_NONE,
AC_NONE | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 85, 100, -50, { 0, 0, 0 } },
};
static ColliderJntSphElementInit D_80937494[11] = {
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 2, { { 2000, -1500, 250 }, 65 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 10, { { 0, 0, 0 }, 22 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 11, { { 500, 0, 0 }, 22 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 15, { { -250, -250, 0 }, 25 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 16, { { 500, -250, 0 }, 25 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 20, { { 250, -250, 0 }, 25 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 21, { { 500, -250, 0 }, 25 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 25, { { 0, 0, 0 }, 27 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 26, { { 750, 0, 0 }, 26 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 5, { { 750, -150, 0 }, 21 }, 100 },
},
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 6, { { 750, 0, 0 }, 20 }, 100 },
},
};
static ColliderJntSphInit D_80937620 = {
{
COLTYPE_HIT0,
AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
11,
D_80937494,
};
static ColliderCylinderInit D_809377F8 = {
{
COLTYPE_NONE,
AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x04, 0x10 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ 85, 1, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Sst/BossSst_Init.s")
@@ -95,6 +95,66 @@ const ActorInit Boss_Tw_InitVars = {
(ActorFunc)BossTw_Update,
(ActorFunc)BossTw_Draw,
};
static ColliderCylinderInit D_8094A7E8 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ALL,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x30 },
{ 0x00100000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 25, 35, -17, { 0, 0, 0 } },
};
static ColliderCylinderInit D_8094A814 = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 45, 120, -30, { 0, 0, 0 } },
};
static ColliderCylinderInit D_8094A840 = {
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x20 },
{ 0xFFCDFFFE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON | BUMP_HOOKABLE,
OCELEM_ON,
},
{ 45, 120, -30, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Tw/func_80938CD0.s")
+114
View File
@@ -59,6 +59,120 @@ const ActorInit Boss_Va_InitVars = {
(ActorFunc)BossVa_Update,
(ActorFunc)BossVa_Draw,
};
static ColliderCylinderInit D_8095BF60 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFEF, 0x03, 0x08 },
{ 0x00000010, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 85, 120, 0, { 0, 0, 0 } },
};
static ColliderJntSphElementInit D_8095BF8C[1] = {
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000010, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 25 }, 100 },
},
};
static ColliderJntSphInit D_8095BFB0 = {
{
COLTYPE_HIT6,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
1,
D_8095BF8C,
};
static ColliderQuadInit D_8095BFF4 = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x03, 0x04 },
{ 0x00000010, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL | TOUCH_UNK7,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
static ColliderJntSphElementInit D_8095BFC0[1] = {
{
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x03, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 30 }, 100 },
},
};
static ColliderJntSphInit D_8095BFE4 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
1,
D_8095BFC0,
};
static ColliderQuadInit D_8095BFF4 = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x03, 0x04 },
{ 0x00000010, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL | TOUCH_UNK7,
BUMP_ON,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Boss_Va/func_8094F2C0.s")
@@ -39,6 +39,63 @@ const ActorInit Demo_Gj_InitVars = {
(ActorFunc)DemoGj_Update,
(ActorFunc)DemoGj_Draw,
};
static ColliderCylinderInitType1 sCylinderInit = {
{
COLTYPE_HIT0,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 30, 100, 0, { 0, 0, 0 } },
};
static ColliderCylinderInitType1 sCylinderInit = {
{
COLTYPE_HIT0,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 25, 110, 0, { 0, 0, 0 } },
};
static ColliderCylinderInitType1 sCylinderInit = {
{
COLTYPE_HIT0,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 25, 200, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Gj/func_80978930.s")
+10 -4
View File
@@ -59,8 +59,14 @@ static UNK_PTR D_80987830[] = {
static u32 D_8098783C = 0;
static ColliderCylinderInit_Set3 sCylinderInit = {
{ COLTYPE_UNK0, 0x00, 0x00, 0x09, COLSHAPE_CYLINDER },
static ColliderCylinderInitType1 sCylinderInit = {
{
COLTYPE_HIT0,
AT_NONE,
AC_NONE,
OC1_ON | OC1_TYPE_PLAYER,
COLSHAPE_CYLINDER,
},
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
{ 25, 80, 0, { 0, 0, 0 } },
};
@@ -154,7 +160,7 @@ void func_80984D00(Actor* thisx, GlobalContext* globalCtx) {
DemoIm* this = THIS;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder_Set3(globalCtx, &this->collider, &this->actor, &sCylinderInit);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit);
}
void func_80984D4C(Actor* thisx, GlobalContext* globalCtx) {
@@ -166,7 +172,7 @@ void func_80984D4C(Actor* thisx, GlobalContext* globalCtx) {
void func_80984D74(DemoIm* this, GlobalContext* globalCtx) {
s32 pad[5];
Collider_CylinderUpdate(&this->actor, &this->collider);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
@@ -27,6 +27,26 @@ const ActorInit Demo_Kekkai_InitVars = {
(ActorFunc)DemoKekkai_Update,
(ActorFunc)DemoKekkai_Draw,
};
static ColliderCylinderInit D_8098E0B0 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x07, 0x04 },
{ 0x00002000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_ON,
},
{ 680, 220, 120, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Kekkai/func_8098CFD0.s")
+21 -7
View File
@@ -32,8 +32,22 @@ const ActorInit Door_Ana_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x00, COLSHAPE_CYLINDER },
{ 0x02, { 0x00000000, 0x00, 0x00 }, { 0x00000048, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK2,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000048, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 50, 10, 0, { 0 } },
};
@@ -83,7 +97,7 @@ void DoorAna_Destroy(Actor* thisx, GlobalContext* globalCtx) {
// update routine for grottos that are currently "hidden"/unopened
void DoorAna_WaitClosed(DoorAna* this, GlobalContext* globalCtx) {
u32 openGrotto = false;
if ((this->actor.params & 0x200) == 0) {
if (!(this->actor.params & 0x200)) {
// opening with song of storms
if (this->actor.xyzDistToLinkSq < 40000.0f && Flags_GetEnv(globalCtx, 5)) {
openGrotto = true;
@@ -91,12 +105,12 @@ void DoorAna_WaitClosed(DoorAna* this, GlobalContext* globalCtx) {
}
} else {
// bombing/hammering open a grotto
if ((this->collider.base.acFlags & 2) != 0) {
if (this->collider.base.acFlags & AC_HIT) {
openGrotto = true;
Collider_DestroyCylinder(globalCtx, &this->collider);
} else {
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
}
// open the grotto
@@ -114,7 +128,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
s32 destinationIdx;
player = PLAYER;
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f) != 0) {
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) {
if ((this->actor.unk_1F != 0) && (globalCtx->sceneLoadFlag == 0) && (player->stateFlags1 & 0x80000000) &&
(player->unk_84F == 0)) {
destinationIdx = ((this->actor.params >> 0xC) & 7) - 1;
@@ -22,6 +22,53 @@ const ActorInit Door_Killer_InitVars = {
(ActorFunc)DoorKiller_Update,
NULL,
};
static ColliderCylinderInit D_80995FB0 = {
{
COLTYPE_METAL,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x10 },
{ 0x0001FFEE, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ 20, 100, 0, { 0, 0, 0 } },
};
static ColliderJntSphElementInit D_80995FDC[1] = {
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000008, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 0, { { 0, 0, 0 }, 100 }, 100 },
},
};
static ColliderJntSphInit D_80996000 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
1,
D_80995FDC,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Init.s")
+60
View File
@@ -33,6 +33,66 @@ const ActorInit En_Am_InitVars = {
(ActorFunc)EnAm_Update,
(ActorFunc)EnAm_Draw,
};
static ColliderCylinderInit D_809AFF80 = {
{
COLTYPE_HIT5,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 15, 70, 0, { 0, 0, 0 } },
};
static ColliderCylinderInit D_809AFFAC = {
{
COLTYPE_METAL,
AT_NONE,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00400106, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 15, 70, 0, { 0, 0, 0 } },
};
static ColliderQuadInit D_809AFFD8 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_NONE,
OC1_NONE,
OC2_NONE,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x08 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Am/func_809ADF20.s")
+19 -5
View File
@@ -45,8 +45,22 @@ const ActorInit En_Ani_InitVars = {
};
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x11, 0x39, 0x10, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_ENEMY,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 30, 40, 0, { 0 } },
};
@@ -77,7 +91,7 @@ void EnAni_Init(Actor* thisx, GlobalContext* globalCtx) {
Animation_PlayOnce(&this->skelAnime, &D_060076EC);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
if (LINK_IS_CHILD) {
EnAni_SetupAction(this, func_809B064C);
} else {
@@ -237,8 +251,8 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
EnAni* this = THIS;
s32 pad[2];
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL)) {
@@ -33,6 +33,26 @@ const ActorInit En_Anubice_InitVars = {
(ActorFunc)EnAnubice_Update,
(ActorFunc)EnAnubice_Draw,
};
static ColliderCylinderInit D_809B22D0 = {
{
COLTYPE_NONE,
AT_NONE,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 29, 103, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Anubice/func_809B1120.s")
@@ -29,6 +29,26 @@ const ActorInit En_Anubice_Fire_InitVars = {
(ActorFunc)EnAnubiceFire_Update,
(ActorFunc)EnAnubiceFire_Draw,
};
static ColliderCylinderInit D_809B31E0 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0xFFCFFFFF, 0x01, 0x04 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_ON,
OCELEM_NONE,
},
{ 0, 0, 0, { 0, 0, 0 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Anubice_Fire/EnAnubiceFire_Init.s")
@@ -32,6 +32,26 @@ const ActorInit En_Arrow_InitVars = {
(ActorFunc)EnArrow_Update,
(ActorFunc)EnArrow_Draw,
};
static ColliderQuadInit D_809B4D50 = {
{
COLTYPE_NONE,
AT_ON | AT_TYPE_PLAYER,
AC_NONE,
OC1_NONE,
OC2_TYPE_PLAYER,
COLSHAPE_QUAD,
},
{
ELEMTYPE_UNK2,
{ 0x00000020, 0x00, 0x01 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_NONE,
BUMP_NONE,
OCELEM_NONE,
},
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Arrow/func_809B3920.s")
+38
View File
@@ -30,6 +30,44 @@ const ActorInit En_Ba_InitVars = {
(ActorFunc)EnBa_Update,
(ActorFunc)EnBa_Draw,
};
static ColliderJntSphElementInit D_809B808C[2] = {
{
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x00000010, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_NONE,
},
{ 8, { { 0, 0, 0 }, 20 }, 100 },
},
{
{
ELEMTYPE_UNK0,
{ 0x20000000, 0x00, 0x04 },
{ 0x00000000, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_NORMAL,
BUMP_NONE,
OCELEM_NONE,
},
{ 13, { { 0, 0, 0 }, 25 }, 100 },
},
};
static ColliderJntSphInit D_809B80D4 = {
{
COLTYPE_HIT0,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_NONE,
OC2_NONE,
COLSHAPE_JNTSPH,
},
2,
D_809B808C,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ba/func_809B6350.s")
+141 -37
View File
@@ -96,18 +96,108 @@ extern AnimationHeader D_06000444;
extern SkeletonHeader D_06001A30;
static DamageTable sDamageTableBlueGreen = {
0xF0, 0x02, 0x01, 0xA2, 0xF0, 0xE2, 0xA2, 0xF0, 0x01, 0x02, 0x04, 0xE2, 0xC4, 0xB4, 0x00, 0x00,
0x00, 0x60, 0x93, 0x83, 0xA0, 0xA0, 0x01, 0x04, 0x02, 0x02, 0x08, 0x04, 0x60, 0x00, 0xA4, 0x00,
/* Deku nut */ DMG_ENTRY(0, 0xF),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0xA),
/* Boomerang */ DMG_ENTRY(0, 0xF),
/* Normal arrow */ DMG_ENTRY(2, 0xE),
/* Hammer swing */ DMG_ENTRY(2, 0xA),
/* Hookshot */ DMG_ENTRY(0, 0xF),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(2, 0xE),
/* Ice arrow */ DMG_ENTRY(4, 0xC),
/* Light arrow */ DMG_ENTRY(4, 0xB),
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
/* Fire magic */ DMG_ENTRY(0, 0x6),
/* Ice magic */ DMG_ENTRY(3, 0x9),
/* Light magic */ DMG_ENTRY(3, 0x8),
/* Shield */ DMG_ENTRY(0, 0xA),
/* Mirror Ray */ DMG_ENTRY(0, 0xA),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(4, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(8, 0x0),
/* Master jump */ DMG_ENTRY(4, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x6),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(4, 0xA),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
};
static DamageTable sDamageTableRed = {
0xD0, 0xD0, 0xD0, 0xA2, 0xD0, 0xE2, 0xA2, 0xD0, 0xD0, 0xE2, 0xE4, 0xE2, 0x94, 0xE2, 0xE4, 0xE2,
0xE2, 0x60, 0x93, 0x60, 0xA0, 0xA0, 0x01, 0xE4, 0xE2, 0x02, 0xE8, 0xE4, 0x60, 0x00, 0xA4, 0x00,
/* Deku nut */ DMG_ENTRY(0, 0xD),
/* Deku stick */ DMG_ENTRY(0, 0xD),
/* Slingshot */ DMG_ENTRY(0, 0xD),
/* Explosive */ DMG_ENTRY(2, 0xA),
/* Boomerang */ DMG_ENTRY(0, 0xD),
/* Normal arrow */ DMG_ENTRY(2, 0xE),
/* Hammer swing */ DMG_ENTRY(2, 0xA),
/* Hookshot */ DMG_ENTRY(0, 0xD),
/* Kokiri sword */ DMG_ENTRY(0, 0xD),
/* Master sword */ DMG_ENTRY(2, 0xE),
/* Giant's Knife */ DMG_ENTRY(4, 0xE),
/* Fire arrow */ DMG_ENTRY(2, 0xE),
/* Ice arrow */ DMG_ENTRY(4, 0x9),
/* Light arrow */ DMG_ENTRY(2, 0xE),
/* Unk arrow 1 */ DMG_ENTRY(4, 0xE),
/* Unk arrow 2 */ DMG_ENTRY(2, 0xE),
/* Unk arrow 3 */ DMG_ENTRY(2, 0xE),
/* Fire magic */ DMG_ENTRY(0, 0x6),
/* Ice magic */ DMG_ENTRY(3, 0x9),
/* Light magic */ DMG_ENTRY(0, 0x6),
/* Shield */ DMG_ENTRY(0, 0xA),
/* Mirror Ray */ DMG_ENTRY(0, 0xA),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(4, 0xE),
/* Master spin */ DMG_ENTRY(2, 0xE),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(8, 0xE),
/* Master jump */ DMG_ENTRY(4, 0xE),
/* Unknown 1 */ DMG_ENTRY(0, 0x6),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(4, 0xA),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
};
static DamageTable sDamageTableWhite = {
0xF0, 0xE2, 0xE1, 0xA2, 0xF0, 0xE2, 0xA2, 0xF0, 0xE1, 0xE2, 0xE4, 0x54, 0xE2, 0xE2, 0xE4, 0xE2,
0xE2, 0x74, 0x60, 0x60, 0xA0, 0xA0, 0xE1, 0xE4, 0xE2, 0xE2, 0xE8, 0xE4, 0x60, 0x00, 0xA4, 0x00,
/* Deku nut */ DMG_ENTRY(0, 0xF),
/* Deku stick */ DMG_ENTRY(2, 0xE),
/* Slingshot */ DMG_ENTRY(1, 0xE),
/* Explosive */ DMG_ENTRY(2, 0xA),
/* Boomerang */ DMG_ENTRY(0, 0xF),
/* Normal arrow */ DMG_ENTRY(2, 0xE),
/* Hammer swing */ DMG_ENTRY(2, 0xA),
/* Hookshot */ DMG_ENTRY(0, 0xF),
/* Kokiri sword */ DMG_ENTRY(1, 0xE),
/* Master sword */ DMG_ENTRY(2, 0xE),
/* Giant's Knife */ DMG_ENTRY(4, 0xE),
/* Fire arrow */ DMG_ENTRY(4, 0x5),
/* Ice arrow */ DMG_ENTRY(2, 0xE),
/* Light arrow */ DMG_ENTRY(2, 0xE),
/* Unk arrow 1 */ DMG_ENTRY(4, 0xE),
/* Unk arrow 2 */ DMG_ENTRY(2, 0xE),
/* Unk arrow 3 */ DMG_ENTRY(2, 0xE),
/* Fire magic */ DMG_ENTRY(4, 0x7),
/* Ice magic */ DMG_ENTRY(0, 0x6),
/* Light magic */ DMG_ENTRY(0, 0x6),
/* Shield */ DMG_ENTRY(0, 0xA),
/* Mirror Ray */ DMG_ENTRY(0, 0xA),
/* Kokiri spin */ DMG_ENTRY(1, 0xE),
/* Giant spin */ DMG_ENTRY(4, 0xE),
/* Master spin */ DMG_ENTRY(2, 0xE),
/* Kokiri jump */ DMG_ENTRY(2, 0xE),
/* Giant jump */ DMG_ENTRY(8, 0xE),
/* Master jump */ DMG_ENTRY(4, 0xE),
/* Unknown 1 */ DMG_ENTRY(0, 0x6),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(4, 0xA),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
};
const ActorInit En_Bb_InitVars = {
@@ -122,16 +212,30 @@ const ActorInit En_Bb_InitVars = {
(ActorFunc)EnBb_Draw,
};
static ColliderJntSphItemInit sJntSphElementInit[1] = {
static ColliderJntSphElementInit sJntSphElementInit[1] = {
{
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{ 0, { { 0, -120, 0 }, 4 }, 300 },
},
};
static ColliderJntSphInit sJntSphInit = {
{ COLTYPE_UNK3, 0x11, 0x09, 0x09, 0x10, COLSHAPE_JNTSPH },
ARRAY_COUNT(sJntSphElementInit),
{
COLTYPE_HIT3,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_PLAYER,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
1,
sJntSphElementInit,
};
@@ -230,9 +334,9 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) {
this->timer = 0;
this->flameScaleY = 80.0f;
this->flameScaleX = 100.0f;
this->collider.list[0].body.toucherFlags = 9;
this->collider.list[0].body.toucher.flags = 0xFFCFFFFF;
this->collider.list[0].body.toucher.damage = 8;
this->collider.elements[0].info.toucherFlags = TOUCH_ON | TOUCH_SFX_HARD;
this->collider.elements[0].info.toucher.dmgFlags = 0xFFCFFFFF;
this->collider.elements[0].info.toucher.damage = 8;
this->bobSize = this->actionState * 20.0f;
this->flamePrimAlpha = 255;
this->moveMode = BBMOVE_NORMAL;
@@ -250,7 +354,7 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->naviEnemyId = 0x24;
thisx->colChkInfo.damageTable = &sDamageTableRed;
this->flameEnvColor.r = 255;
this->collider.list[0].body.toucher.effect = 1;
this->collider.elements[0].info.toucher.effect = 1;
EnBb_SetupRed(globalCtx, this);
break;
case ENBB_WHITE:
@@ -277,7 +381,7 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) {
break;
case ENBB_GREEN_BIG:
this->path = this->actionState >> 4;
this->collider.list[0].dim.modelSphere.radius = 0x16;
this->collider.elements[0].dim.modelSphere.radius = 0x16;
Actor_SetScale(thisx, 0.03f);
case ENBB_GREEN:
thisx->naviEnemyId = 0x1E;
@@ -293,8 +397,8 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) {
} else {
EnBb_SetupFlameTrail(this);
}
this->collider.list[0].dim.worldSphere.radius =
this->collider.list[0].dim.modelSphere.radius * this->collider.list[0].dim.scale;
this->collider.elements[0].dim.worldSphere.radius =
this->collider.elements[0].dim.modelSphere.radius * this->collider.elements[0].dim.scale;
}
void EnBb_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@@ -530,9 +634,9 @@ void EnBb_Blue(EnBb* this, GlobalContext* globalCtx) {
}
}
Math_SmoothStepToS(&this->actor.posRot.rot.y, this->vMoveAngleY, 1, 0x3E8, 0);
if ((this->collider.base.acFlags & 2) || (this->collider.base.atFlags & 2)) {
if ((this->collider.base.acFlags & AC_HIT) || (this->collider.base.atFlags & AT_HIT)) {
this->vMoveAngleY = this->actor.yawTowardsLink + 0x8000;
if (this->collider.base.acFlags & 2) {
if (this->collider.base.acFlags & AC_HIT) {
afterHitAngle = -0x8000;
} else {
afterHitAngle = 0x4000;
@@ -542,8 +646,8 @@ void EnBb_Blue(EnBb* this, GlobalContext* globalCtx) {
}
}
this->actor.posRot.rot.y = this->actor.yawTowardsLink + afterHitAngle;
this->collider.base.acFlags &= ~2;
this->collider.base.atFlags &= ~2;
this->collider.base.acFlags &= ~AC_HIT;
this->collider.base.atFlags &= ~AT_HIT;
}
if (this->maxSpeed >= 6.0f) {
@@ -815,9 +919,9 @@ void EnBb_White(EnBb* this, GlobalContext* globalCtx) {
this->moveMode = BBMOVE_NOCLIP;
this->maxSpeed = 10.0f;
}
if (this->collider.base.atFlags & 2) {
if (this->collider.base.atFlags & AT_HIT) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLE_BITE);
this->collider.base.atFlags &= ~2;
this->collider.base.atFlags &= ~AT_HIT;
}
this->actor.shape.rot.y = this->actor.posRot.rot.y;
} else if (Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f) == 0.0f) {
@@ -902,9 +1006,9 @@ void EnBb_Green(EnBb* this, GlobalContext* globalCtx) {
}
this->moveMode = BBMOVE_NOCLIP;
this->maxSpeed = 10.0f;
if (this->collider.base.atFlags & 2) {
if (this->collider.base.atFlags & AT_HIT) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLE_BITE);
this->collider.base.atFlags &= ~2;
this->collider.base.atFlags &= ~AT_HIT;
}
if (Math_CosF(this->bobPhase) == 0.0f) {
if (this->charge) {
@@ -940,7 +1044,7 @@ void EnBb_Green(EnBb* this, GlobalContext* globalCtx) {
this->actionState++;
this->timer = (Rand_ZeroOne() * 30.0f) + 60.0f;
if (this->vFlameTimer != 0) {
this->collider.base.acFlags &= ~2;
this->collider.base.acFlags &= ~AC_HIT;
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLE_DOWN);
}
@@ -1033,8 +1137,8 @@ void EnBb_Stunned(EnBb* this, GlobalContext* globalCtx) {
}
void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) {
if (this->collider.base.atFlags & 4) {
this->collider.base.atFlags &= ~4;
if (this->collider.base.atFlags & AT_BOUNCED) {
this->collider.base.atFlags &= ~AT_BOUNCED;
if (this->action != BB_DOWN) {
if (this->actor.params >= ENBB_RED) {
this->actor.posRot.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsLink + 0x8000;
@@ -1047,13 +1151,13 @@ void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) {
this->actionVar2 = 1;
}
}
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->dmgEffect = this->actor.colChkInfo.damageEffect;
func_80035650(&this->actor, &this->collider.list[0].body, 0);
func_80035650(&this->actor, &this->collider.elements[0].info, 0);
switch (this->dmgEffect) {
case 7:
this->actor.freezeTimer = this->collider.list[0].body.acHitItem->toucher.damage;
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
case 5:
this->fireIceTimer = 0x30;
//! @bug
@@ -1062,7 +1166,7 @@ void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) {
//! Din's Fire on a white bubble will do just that. The mechanism is complex and described below.
goto block_15;
case 6:
this->actor.freezeTimer = this->collider.list[0].body.acHitItem->toucher.damage;
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
break;
case 8:
case 9:
@@ -1087,7 +1191,7 @@ void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) {
((this->actor.params != ENBB_WHITE) && (this->flameScaleX < 20.0f))) {
Actor_ApplyDamage(&this->actor);
} else {
this->collider.base.acFlags |= 2;
this->collider.base.acFlags |= AC_HIT;
}
}
if (this->actor.colChkInfo.health == 0) {
@@ -1143,10 +1247,10 @@ void EnBb_Update(Actor* thisx, GlobalContext* globalCtx2) {
func_8002E4B4(globalCtx, &this->actor, sp34, 25.0f, 20.0f, 5);
}
this->actor.posRot2.pos = this->actor.posRot.pos;
this->collider.list->dim.worldSphere.center.x = this->actor.posRot.pos.x;
this->collider.list->dim.worldSphere.center.y =
this->collider.elements->dim.worldSphere.center.x = this->actor.posRot.pos.x;
this->collider.elements->dim.worldSphere.center.y =
this->actor.posRot.pos.y + (this->actor.shape.unk_08 * this->actor.scale.y);
this->collider.list->dim.worldSphere.center.z = this->actor.posRot.pos.z;
this->collider.elements->dim.worldSphere.center.z = this->actor.posRot.pos.z;
if ((this->action > BB_KILL) && ((this->actor.speedXZ != 0.0f) || (this->action == BB_GREEN))) {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
+1 -1
View File
@@ -41,7 +41,7 @@ typedef struct EnBb {
/* 0x02A8 */ s16 fireIceTimer;
/* 0x02AA */ u8 dmgEffect;
/* 0x02AC */ ColliderJntSph collider;
/* 0x02CC */ ColliderJntSphItem elements[1];
/* 0x02CC */ ColliderJntSphElement elements[1];
/* 0x030C */ struct_80032E24 enPartInfo;
/* 0x0324 */ Actor* targetActor;
} EnBb; // size = 0x0328
@@ -28,6 +28,53 @@ const ActorInit En_Bigokuta_InitVars = {
(ActorFunc)EnBigokuta_Update,
(ActorFunc)EnBigokuta_Draw,
};
static ColliderJntSphElementInit D_809BF3D4[1] = {
{
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x08 },
{ 0xFFCFFFFF, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_HARD,
BUMP_ON,
OCELEM_ON,
},
{ 1, { { 0, 45, -30 }, 75 }, 100 },
},
};
static ColliderJntSphInit D_809BF3F8 = {
{
COLTYPE_HIT0,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
1,
D_809BF3D4,
};
static ColliderCylinderInit D_809BF408 = {
{
COLTYPE_HARD,
AT_ON | AT_TYPE_ENEMY,
AC_ON | AC_HARD | AC_TYPE_PLAYER,
OC1_ON | OC1_TYPE_ALL,
OC2_TYPE_1,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK1,
{ 0x20000000, 0x00, 0x08 },
{ 0xFFCFFFE7, 0x00, 0x00 },
TOUCH_ON | TOUCH_SFX_HARD,
BUMP_ON,
OCELEM_ON,
},
{ 50, 100, 0, { 30, 0, 12 } },
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bigokuta/EnBigokuta_Init.s")

Some files were not shown because too many files have changed in this diff Show More