Misc Clean (#1680)

* vramu32 in Overlay_Relocate

* Actor_SetColorFilter args

* Effect Hitmark enum

* Actor_WorldToActorCoords

* Some fault clean up

* contoller.h

* macros.h no longer needs stdint.h
This commit is contained in:
Derek Hensley
2024-09-07 21:55:59 -06:00
committed by GitHub
parent 2e2b2e2c7a
commit 6eaf196927
49 changed files with 151 additions and 133 deletions
+1
View File
@@ -36,6 +36,7 @@
#include "libc64/sprintf.h"
#include "PR/os_motor.h"
#include "controller.h"
#include "fault.h"
#include "macros.h"
#include "scheduler.h"
+1 -1
View File
@@ -1295,7 +1295,7 @@ f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint) {
* @param[out] offset The transformed coordinates.
* @param[in] point The point to transform to actor coordinates.
*/
void Actor_OffsetOfPointInActorCoords(Actor* actor, Vec3f* offset, Vec3f* point) {
void Actor_WorldToActorCoords(Actor* actor, Vec3f* offset, Vec3f* point) {
f32 cos = Math_CosS(actor->shape.rot.y);
f32 sin = Math_SinS(actor->shape.rot.y);
f32 diffX;
+1 -1
View File
@@ -183,7 +183,7 @@ void func_800F0BB4(EnHy* enHy, PlayState* play, EnDoor* door, s16 arg3, s16 arg4
Vec3f offset;
f32 phi_f0;
Actor_OffsetOfPointInActorCoords(&door->knobDoor.dyna.actor, &offset, &enHy->actor.world.pos);
Actor_WorldToActorCoords(&door->knobDoor.dyna.actor, &offset, &enHy->actor.world.pos);
phi_f0 = (offset.z >= 0.0f) ? 1.0f : -1.0f;
animIndex = ((s8)phi_f0 < 0) ? 0 : 2;
EnHy_ChangeObjectAndAnim(enHy, play, (animIndex == 0) ? arg3 : arg4);
+3 -2
View File
@@ -20,9 +20,10 @@
*/
#include "z64frameadvance.h"
#include "stdbool.h"
#include "controller.h"
#include "padutils.h"
#include "macros.h"
#include "stdbool.h"
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
frameAdvCtx->timer = 0;
+2 -2
View File
@@ -1148,12 +1148,12 @@ s32 SubS_MoveActorToPoint(Actor* actor, Vec3f* point, s16 rotStep) {
f32 distSqBefore;
f32 distSqAfter;
Actor_OffsetOfPointInActorCoords(actor, &offsetBefore, point);
Actor_WorldToActorCoords(actor, &offsetBefore, point);
Math_SmoothStepToS(&actor->world.rot.y, SubS_GetDistSqAndOrientPoints(point, &actor->world.pos, &distSqBefore), 4,
rotStep, 1);
actor->shape.rot.y = actor->world.rot.y;
Actor_MoveWithGravity(actor);
Actor_OffsetOfPointInActorCoords(actor, &offsetAfter, point);
Actor_WorldToActorCoords(actor, &offsetAfter, point);
SubS_GetDistSqAndOrientPoints(point, &actor->world.pos, &distSqAfter);
return ((offsetBefore.z > 0.0f) && (offsetAfter.z <= 0.0f)) ? true : false;
}
+1
View File
@@ -3,6 +3,7 @@
#include "stdbool.h"
#include "PR/viint.h"
#include "controller.h"
#include "debug.h"
#include "macros.h"
#include "main.h"