mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +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:
parent
fe8d5988b9
commit
327a813b37
42 changed files with 497 additions and 451 deletions
|
@ -1168,13 +1168,13 @@ s32 func_8002E234(Actor* actor, f32 arg1, s32 arg2) {
|
|||
return true;
|
||||
}
|
||||
|
||||
s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* arg2, s32 arg3) {
|
||||
s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* pos, s32 arg3) {
|
||||
f32 floorHeightDiff;
|
||||
s32 floorBgId;
|
||||
|
||||
arg2->y += 50.0f;
|
||||
pos->y += 50.0f;
|
||||
|
||||
actor->floorHeight = BgCheck_EntityRaycastFloor5(play, &play->colCtx, &actor->floorPoly, &floorBgId, actor, arg2);
|
||||
actor->floorHeight = BgCheck_EntityRaycastDown5(play, &play->colCtx, &actor->floorPoly, &floorBgId, actor, pos);
|
||||
actor->bgCheckFlags &= ~(BGCHECKFLAG_GROUND_TOUCH | BGCHECKFLAG_GROUND_LEAVE | BGCHECKFLAG_GROUND_STRICT);
|
||||
|
||||
if (actor->floorHeight <= BGCHECK_Y_MIN) {
|
||||
|
@ -3472,9 +3472,9 @@ f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar
|
|||
|
||||
void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
|
||||
MtxF sp60;
|
||||
f32 var;
|
||||
Vec3f sp50;
|
||||
CollisionPoly* sp4C;
|
||||
f32 yIntersect;
|
||||
Vec3f checkPos;
|
||||
CollisionPoly* groundPoly;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 8120);
|
||||
|
||||
|
@ -3484,14 +3484,14 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
|
|||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
|
||||
|
||||
sp50.x = arg0->x;
|
||||
sp50.y = arg0->y + 1.0f;
|
||||
sp50.z = arg0->z;
|
||||
checkPos.x = arg0->x;
|
||||
checkPos.y = arg0->y + 1.0f;
|
||||
checkPos.z = arg0->z;
|
||||
|
||||
var = BgCheck_EntityRaycastFloor2(play, &play->colCtx, &sp4C, &sp50);
|
||||
yIntersect = BgCheck_EntityRaycastDown2(play, &play->colCtx, &groundPoly, &checkPos);
|
||||
|
||||
if (sp4C != NULL) {
|
||||
func_80038A28(sp4C, arg0->x, var, arg0->z, &sp60);
|
||||
if (groundPoly != NULL) {
|
||||
func_80038A28(groundPoly, arg0->x, yIntersect, arg0->z, &sp60);
|
||||
Matrix_Put(&sp60);
|
||||
} else {
|
||||
Matrix_Translate(arg0->x, arg0->y, arg0->z, MTXMODE_NEW);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue