1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 00:40:16 +00:00

Actor Struct Changes (and a few related things) (#617)

* reformat header

* type -> category

* done for now i think

* some more stuff

* first -> head

* focus

* flag comment

* ground -> floor

* remove asm, name wrapper funcs

* name func, format

* review

* targetPriority, format

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "0305ec2c2"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "0305ec2c2"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* comment

* review

* feet flags

* horse shadow
This commit is contained in:
fig02 2021-01-18 16:04:04 -05:00 committed by GitHub
parent 20206fba0d
commit 00a5edea71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
697 changed files with 8157 additions and 7942 deletions

View file

@ -93,7 +93,7 @@ u8 D_80B2CEC0 = false;
const ActorInit En_Viewer_InitVars = {
ACTOR_EN_VIEWER,
ACTORTYPE_ITEMACTION,
ACTORCAT_ITEMACTION,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(EnViewer),
@ -129,8 +129,8 @@ EnViewerAnimFunc sAnimFuncs[] = {
static void* sActorShadowDrawFunc[] = {
NULL,
ActorShadow_DrawFunc_Circle,
ActorShadow_DrawFunc_Squiggly,
ActorShadow_DrawCircle,
ActorShadow_DrawHorse,
};
// timer
@ -762,9 +762,9 @@ void EnViewer_GetCutsceneNextPos(EnViewer* this, GlobalContext* globalCtx) {
endPos.z = globalCtx->csCtx.npcActions[0]->endPos.z;
interpolated = func_8006F93C(globalCtx->csCtx.npcActions[0]->endFrame,
globalCtx->csCtx.npcActions[0]->startFrame, globalCtx->csCtx.frames);
this->actor.posRot.pos.x = ((endPos.x - startPos.x) * interpolated) + startPos.x;
this->actor.posRot.pos.y = ((endPos.y - startPos.y) * interpolated) + startPos.y;
this->actor.posRot.pos.z = ((endPos.z - startPos.z) * interpolated) + startPos.z;
this->actor.world.pos.x = ((endPos.x - startPos.x) * interpolated) + startPos.x;
this->actor.world.pos.y = ((endPos.y - startPos.y) * interpolated) + startPos.y;
this->actor.world.pos.z = ((endPos.z - startPos.z) * interpolated) + startPos.z;
}
} else {
if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[1] != NULL &&
@ -777,19 +777,19 @@ void EnViewer_GetCutsceneNextPos(EnViewer* this, GlobalContext* globalCtx) {
endPos.z = globalCtx->csCtx.npcActions[1]->endPos.z;
interpolated = func_8006F93C(globalCtx->csCtx.npcActions[1]->endFrame,
globalCtx->csCtx.npcActions[1]->startFrame, globalCtx->csCtx.frames);
this->actor.posRot.pos.x = ((endPos.x - startPos.x) * interpolated) + startPos.x;
this->actor.posRot.pos.y = ((endPos.y - startPos.y) * interpolated) + startPos.y;
this->actor.posRot.pos.z = ((endPos.z - startPos.z) * interpolated) + startPos.z;
this->actor.world.pos.x = ((endPos.x - startPos.x) * interpolated) + startPos.x;
this->actor.world.pos.y = ((endPos.y - startPos.y) * interpolated) + startPos.y;
this->actor.world.pos.z = ((endPos.z - startPos.z) * interpolated) + startPos.z;
if (globalCtx->csCtx.npcActions[1]->action == 12) {
yaw = Math_Vec3f_Yaw(&startPos, &endPos);
Math_SmoothStepToS(&this->actor.posRot.rot.y, yaw, 10, 1000, 1);
Math_SmoothStepToS(&this->actor.world.rot.y, yaw, 10, 1000, 1);
Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 10, 1000, 1);
}
if (params == 9) {
this->actor.posRot.rot.x = globalCtx->csCtx.npcActions[1]->urot.x;
this->actor.posRot.rot.y = globalCtx->csCtx.npcActions[1]->urot.y;
this->actor.posRot.rot.z = globalCtx->csCtx.npcActions[1]->urot.z;
this->actor.world.rot.x = globalCtx->csCtx.npcActions[1]->urot.x;
this->actor.world.rot.y = globalCtx->csCtx.npcActions[1]->urot.y;
this->actor.world.rot.z = globalCtx->csCtx.npcActions[1]->urot.z;
this->actor.shape.rot.x = globalCtx->csCtx.npcActions[1]->urot.x;
this->actor.shape.rot.y = globalCtx->csCtx.npcActions[1]->urot.y;
this->actor.shape.rot.z = globalCtx->csCtx.npcActions[1]->urot.z;