1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 19:04:38 +00:00

Fix RaycastFloor flags (#1328)

* fix raycast floor flags

* format.sh

* Name flags

* Rename RaycastFloor functions, clean up caller code, document z_bg_spot15_rrbox

* change comment to prevent format wrap

* change to "if BGCHECK_GROUND_CHECK_ON is set"

* roman suggestions
This commit is contained in:
mzxrules 2022-08-30 11:49:51 -04:00 committed by GitHub
parent fe8d5988b9
commit 327a813b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 497 additions and 451 deletions

View file

@ -1315,7 +1315,7 @@ s32 Play_InCsMode(PlayState* this) {
return (this->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(this);
}
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos) {
CollisionPoly poly;
f32 temp1;
f32 temp2;
@ -1326,7 +1326,7 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
f32 nz;
s32 pad[5];
floorY = BgCheck_AnyRaycastFloor1(&this->colCtx, &poly, vec);
floorY = BgCheck_AnyRaycastDown1(&this->colCtx, &poly, pos);
if (floorY > BGCHECK_Y_MIN) {
nx = COLPOLY_GET_NORMAL(poly.normal.x);
@ -1355,9 +1355,9 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
mf->wy = 0.0f;
mf->xz = 0.0f;
mf->wz = 0.0f;
mf->xw = vec->x;
mf->xw = pos->x;
mf->yw = floorY;
mf->zw = vec->z;
mf->zw = pos->z;
mf->ww = 1.0f;
} else {
mf->xy = 0.0f;
@ -1372,9 +1372,9 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* vec) {
mf->yz = 0.0f;
mf->zy = 0.0f;
mf->yy = 1.0f;
mf->xw = vec->x;
mf->yw = vec->y;
mf->zw = vec->z;
mf->xw = pos->x;
mf->yw = pos->y;
mf->zw = pos->z;
mf->ww = 1.0f;
}
@ -1776,7 +1776,7 @@ s32 func_800C0DB4(PlayState* this, Vec3f* pos) {
if (WaterBox_GetSurface1(this, &this->colCtx, waterSurfacePos.x, waterSurfacePos.z, &waterSurfacePos.y,
&waterBox) == true &&
pos->y < waterSurfacePos.y &&
BgCheck_EntityRaycastFloor3(&this->colCtx, &poly, &bgId, &waterSurfacePos) != BGCHECK_Y_MIN) {
BgCheck_EntityRaycastDown3(&this->colCtx, &poly, &bgId, &waterSurfacePos) != BGCHECK_Y_MIN) {
return true;
} else {
return false;