1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Struct Returns (#1574)

* change args

* PR Review

* format
This commit is contained in:
engineer124 2023-11-20 03:17:31 +11:00 committed by GitHub
parent 3d1ee33d7b
commit aef0335681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 425 additions and 481 deletions

View file

@ -734,19 +734,15 @@ void DemoKankyo_Vec3fCopy(Vec3f* src, Vec3f* dst) {
dst->z = src->z;
}
Vec3f* DemoKankyo_AddVecGeoToVec3f(Vec3f* dest, Vec3f* a, VecGeo* geo) {
Vec3f DemoKankyo_AddVecGeoToVec3f(Vec3f* a, VecGeo* geo) {
Vec3f sum;
Vec3f b;
OLib_VecGeoToVec3f(&b, geo);
Vec3f b = OLib_VecGeoToVec3f(geo);
sum.x = a->x + b.x;
sum.y = a->y + b.y;
sum.z = a->z + b.z;
*dest = sum;
return dest;
return sum;
}
void DemoKankyo_Vec3fAddPosRot(PosRot* posRot, Vec3f* vec, Vec3f* dst) {
@ -754,9 +750,9 @@ void DemoKankyo_Vec3fAddPosRot(PosRot* posRot, Vec3f* vec, Vec3f* dst) {
Vec3f vecCopy;
DemoKankyo_Vec3fCopy(vec, &vecCopy);
OLib_Vec3fToVecGeo(&geo, &vecCopy);
geo = OLib_Vec3fToVecGeo(&vecCopy);
geo.yaw += posRot->rot.y;
DemoKankyo_AddVecGeoToVec3f(dst, &posRot->pos, &geo);
*dst = DemoKankyo_AddVecGeoToVec3f(&posRot->pos, &geo);
}
void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
@ -817,7 +813,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_22++;
}
}
Actor_GetWorld(&posRot, &player->actor);
posRot = Actor_GetWorld(&player->actor);
DemoKankyo_Vec3fAddPosRot(&posRot, &camPos, &D_8098CF98);
break;
case 2:
@ -941,7 +937,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, PlayState* play) {
&this->unk_150[i].unk_20, &this->unk_150[i].unk_1C) != 0) {
this->unk_150[i].unk_22++;
}
Actor_GetWorld(&posRot, &this->actor);
posRot = Actor_GetWorld(&this->actor);
DemoKankyo_Vec3fAddPosRot(&posRot, &camPos, &D_8098CFB8);
break;
case 2:

View file

@ -121,7 +121,7 @@ void EnButte_DrawTransformationEffect(EnButte* this, PlayState* play) {
alpha = Math_SinS(sTransformationEffectAlpha) * 250;
alpha = CLAMP(alpha, 0, 255);
Camera_GetCamDir(&camDir, GET_ACTIVE_CAM(play));
camDir = Camera_GetCamDir(GET_ACTIVE_CAM(play));
Matrix_RotateY(BINANG_TO_RAD(camDir.y), MTXMODE_NEW);
Matrix_RotateX(BINANG_TO_RAD(camDir.x), MTXMODE_APPLY);
Matrix_RotateZ(BINANG_TO_RAD(camDir.z), MTXMODE_APPLY);

View file

@ -75,7 +75,7 @@ void OceffWipe_Draw(Actor* thisx, PlayState* play) {
Vec3f quakeOffset;
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(play));
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
OPEN_DISPS(play->state.gfxCtx, "../z_oceff_wipe.c", 346);

View file

@ -69,7 +69,7 @@ void OceffWipe2_Draw(Actor* thisx, PlayState* play) {
Vec3f quakeOffset;
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(play));
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
if (this->timer < 32) {
z = Math_SinS(this->timer << 9) * 1330;
} else {

View file

@ -70,7 +70,7 @@ void OceffWipe3_Draw(Actor* thisx, PlayState* play) {
Vec3f quakeOffset;
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(play));
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
if (this->counter < 32) {
z = Math_SinS(this->counter << 9) * 1330;
} else {

View file

@ -68,7 +68,7 @@ void OceffWipe4_Draw(Actor* thisx, PlayState* play) {
Vec3f quakeOffset;
eye = GET_ACTIVE_CAM(play)->eye;
Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(play));
quakeOffset = Camera_GetQuakeOffset(GET_ACTIVE_CAM(play));
if (this->timer < 16) {
z = Math_SinS(this->timer * 1024) * 1330.0f;
} else {