1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 20:35:13 +00:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
487 changed files with 14371 additions and 4713 deletions

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);