mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 06:54:33 +00:00
Documentation pass on DoorShutter
(#1352)
* Documentation pass on `DoorShutter` * lockTimer -> unlockTimer * Add `DOORSHUTTER_STYLE_FROM_SCENE` * `DoorShutter_SetupType` -> `DoorShutter_WaitForObject` * perpendicularly -> perpendicular * `DoorShutter_CheckShouldDraw` -> `DoorShutter_ShouldDraw` * Improve comment on `DoorShutter_GetPlayerSide` * `jabuDoorClosed`/`barsClosed` +`Amount` * attempt to improve a comment * fix shameful left-aligned numbers * unname closing/opening * action funcs names * run formatter * enums improvements Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
parent
e4c1a4b512
commit
ce2e5e71c8
4 changed files with 440 additions and 225 deletions
|
@ -931,20 +931,24 @@ f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint) {
|
|||
return Math_Vec3f_DistXZ(&actor->world.pos, refPoint);
|
||||
}
|
||||
|
||||
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2) {
|
||||
f32 cosRot2Y;
|
||||
f32 sinRot2Y;
|
||||
/**
|
||||
* Convert `pos` to be relative to the actor's position and yaw, store into `dest`.
|
||||
* Actor_WorldToActorCoords
|
||||
*/
|
||||
void func_8002DBD0(Actor* actor, Vec3f* dest, Vec3f* pos) {
|
||||
f32 cosY;
|
||||
f32 sinY;
|
||||
f32 deltaX;
|
||||
f32 deltaZ;
|
||||
|
||||
cosRot2Y = Math_CosS(actor->shape.rot.y);
|
||||
sinRot2Y = Math_SinS(actor->shape.rot.y);
|
||||
deltaX = arg2->x - actor->world.pos.x;
|
||||
deltaZ = arg2->z - actor->world.pos.z;
|
||||
cosY = Math_CosS(actor->shape.rot.y);
|
||||
sinY = Math_SinS(actor->shape.rot.y);
|
||||
deltaX = pos->x - actor->world.pos.x;
|
||||
deltaZ = pos->z - actor->world.pos.z;
|
||||
|
||||
result->x = (deltaX * cosRot2Y) - (deltaZ * sinRot2Y);
|
||||
result->z = (deltaX * sinRot2Y) + (deltaZ * cosRot2Y);
|
||||
result->y = arg2->y - actor->world.pos.y;
|
||||
dest->x = (deltaX * cosY) - (deltaZ * sinY);
|
||||
dest->z = (deltaX * sinY) + (deltaZ * cosY);
|
||||
dest->y = pos->y - actor->world.pos.y;
|
||||
}
|
||||
|
||||
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue