mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 17:30:25 +00:00
Introduce CAM_DATA_SET_
, CAM_ITEM_TYPE_
and name Player_SetTurnAroundCamera
, Player_RequestCameraSetting
(#2608)
* Introduce `CAM_SET_CAMERA_DATA_`, `CAM_ITEM_TYPE_` and name `Player_CameraChangeSettingTurnAround` * bss and formatting * func_80835E44 -> Player_RequestCameraSetting * -> Player_SetTurnAroundCamera * -> CAM_DATA_SET_
This commit is contained in:
parent
7ddd468ed6
commit
5870caba8b
10 changed files with 77 additions and 57 deletions
|
@ -228,7 +228,7 @@ void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play2) {
|
|||
if (sCamSetting == CAM_SET_NONE) {
|
||||
PRINTF("camera changed (mori rakka tenjyo) ... \n");
|
||||
sCamSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], 1, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], CAM_DATA_SET_0, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||
}
|
||||
} else if (sCamSetting != CAM_SET_NONE) {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ique-cn:128 pal-1.0:128 pal-1.1:128"
|
||||
"ique-cn:128 pal-1.0:0 pal-1.1:0"
|
||||
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
|
||||
|
|
|
@ -1777,7 +1777,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
|
|||
// Focus the camera on Epona
|
||||
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_TURN_AROUND);
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], 4, NULL, NULL, 0x51, 0, 0);
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], CAM_DATA_SET_2, NULL, NULL, CAM_ITEM_TYPE_81, 0, 0);
|
||||
}
|
||||
}
|
||||
if (!(this->stateFlags & ENHORSE_INACTIVE)) {
|
||||
|
@ -1853,7 +1853,7 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
|
|||
EnHorse_SetFollowAnimation(this, play);
|
||||
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_TURN_AROUND);
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], 4, NULL, NULL, 0x51, 0, 0);
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], CAM_DATA_SET_2, NULL, NULL, CAM_ITEM_TYPE_81, 0, 0);
|
||||
}
|
||||
} else {
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
|
|
@ -569,7 +569,7 @@ void EnOssan_TalkHappyMaskShopkeeper(PlayState* play) {
|
|||
|
||||
void EnOssan_UpdateCameraDirection(EnOssan* this, PlayState* play, f32 cameraFaceAngle) {
|
||||
this->cameraFaceAngle = cameraFaceAngle;
|
||||
Camera_SetCameraData(GET_ACTIVE_CAM(play), 0xC, NULL, NULL, cameraFaceAngle, 0, 0);
|
||||
Camera_SetCameraData(GET_ACTIVE_CAM(play), CAM_DATA_SET_2 | CAM_DATA_SET_3, NULL, NULL, cameraFaceAngle, 0, 0);
|
||||
}
|
||||
|
||||
s32 EnOssan_TryGetObjBankIndices(EnOssan* this, PlayState* play, s16* objectIds) {
|
||||
|
|
|
@ -377,7 +377,7 @@ static Vec3f sInteractWallCheckResult;
|
|||
static Input* sControlInput;
|
||||
|
||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
||||
"ique-cn:192 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
|
||||
"ique-cn:160 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
|
||||
|
||||
// .data
|
||||
|
||||
|
@ -3498,7 +3498,7 @@ void Player_SetupActionPreserveItemAction(PlayState* play, Player* this, PlayerA
|
|||
}
|
||||
}
|
||||
|
||||
void func_80835E44(PlayState* play, s16 camSetting) {
|
||||
void Player_RequestCameraSetting(PlayState* play, s16 camSetting) {
|
||||
if (!Play_CamIsNotFixed(play)) {
|
||||
if (camSetting == CAM_SET_SCENE_TRANSITION) {
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
|
@ -3508,9 +3508,9 @@ void func_80835E44(PlayState* play, s16 camSetting) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80835EA4(PlayState* play, s32 arg1) {
|
||||
func_80835E44(play, CAM_SET_TURN_AROUND);
|
||||
Camera_SetCameraData(Play_GetCamera(play, CAM_ID_MAIN), 4, NULL, NULL, arg1, 0, 0);
|
||||
void Player_SetTurnAroundCamera(PlayState* play, s32 camItemType) {
|
||||
Player_RequestCameraSetting(play, CAM_SET_TURN_AROUND);
|
||||
Camera_SetCameraData(Play_GetCamera(play, CAM_ID_MAIN), CAM_DATA_SET_2, NULL, NULL, camItemType, 0, 0);
|
||||
}
|
||||
|
||||
void Player_DestroyHookshot(Player* this) {
|
||||
|
@ -5270,7 +5270,7 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol
|
|||
|
||||
this->stateFlags1 |= PLAYER_STATE1_0 | PLAYER_STATE1_29;
|
||||
|
||||
func_80835E44(play, CAM_SET_SCENE_TRANSITION);
|
||||
Player_RequestCameraSetting(play, CAM_SET_SCENE_TRANSITION);
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
|
@ -5973,7 +5973,7 @@ void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) {
|
|||
if (magicSpell == 5) {
|
||||
this->subCamId = OnePointCutscene_Init(play, 1100, -101, NULL, CAM_ID_MAIN);
|
||||
} else {
|
||||
func_80835EA4(play, 10);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6041,7 +6041,7 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
|||
Player_SetupAction(play, this, Player_Action_8085063C, 1);
|
||||
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
|
||||
Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
|
||||
func_80835EA4(play, 4);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_4);
|
||||
}
|
||||
|
||||
func_80832224(this);
|
||||
|
@ -6095,11 +6095,11 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
|||
} else if (sp2C == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
|
||||
this->av1.actionVar1 = 1;
|
||||
this->actor.textId = 0x4005;
|
||||
func_80835EA4(play, 1);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_1);
|
||||
} else {
|
||||
this->av1.actionVar1 = 2;
|
||||
this->actor.textId = 0xCF;
|
||||
func_80835EA4(play, 4);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_4);
|
||||
}
|
||||
|
||||
this->actor.flags |= ACTOR_FLAG_TALK;
|
||||
|
@ -6122,21 +6122,21 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
|||
if (sp2C == 0xC) {
|
||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EED8, 0);
|
||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_bug_out);
|
||||
func_80835EA4(play, 3);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_3);
|
||||
} else if ((sp2C > 0) && (sp2C < 4)) {
|
||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EFC0, 0);
|
||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_fish_out);
|
||||
func_80835EA4(play, (sp2C == 1) ? 1 : 5);
|
||||
Player_SetTurnAroundCamera(play, (sp2C == 1) ? CAM_ITEM_TYPE_1 : CAM_ITEM_TYPE_5);
|
||||
} else {
|
||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EAC0, 0);
|
||||
Player_AnimChangeOnceMorphAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_start);
|
||||
func_80835EA4(play, 2);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_2);
|
||||
}
|
||||
} else {
|
||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084E3C4, 0);
|
||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_okarina_start);
|
||||
this->stateFlags2 |= PLAYER_STATE2_USING_OCARINA;
|
||||
func_80835EA4(play, (this->unk_6A8 != NULL) ? 0x5B : 0x5A);
|
||||
Player_SetTurnAroundCamera(play, (this->unk_6A8 != NULL) ? CAM_ITEM_TYPE_91 : CAM_ITEM_TYPE_90);
|
||||
if (this->unk_6A8 != NULL) {
|
||||
this->stateFlags2 |= PLAYER_STATE2_25;
|
||||
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, this->unk_6A8);
|
||||
|
@ -7353,7 +7353,7 @@ s32 Player_ActionHandler_2(Player* this, PlayState* play) {
|
|||
if (!(this->stateFlags2 & PLAYER_STATE2_10) || (this->currentBoots == PLAYER_BOOTS_IRON)) {
|
||||
Player_SetupWaitForPutAway(play, this, func_8083A434);
|
||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_demo_get_itemB);
|
||||
func_80835EA4(play, 9);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_9);
|
||||
}
|
||||
|
||||
this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_29;
|
||||
|
@ -13748,7 +13748,7 @@ void Player_Action_8084E1EC(Player* this, PlayState* play) {
|
|||
if ((this->stateFlags1 & PLAYER_STATE1_10) && LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) {
|
||||
func_808332F4(this, play);
|
||||
func_80832340(play, this);
|
||||
func_80835EA4(play, 8);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_8);
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
Player_PlayVoiceSfx(this, NA_SE_VO_LI_BREATH_DRINK);
|
||||
}
|
||||
|
@ -13918,7 +13918,7 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->av2.actionVar2 = 2;
|
||||
func_80835EA4(play, 9);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_9);
|
||||
}
|
||||
} else {
|
||||
if (this->av2.actionVar2 == 0) {
|
||||
|
@ -14120,7 +14120,7 @@ void Player_Action_SwingBottle(Player* this, PlayState* play) {
|
|||
|
||||
Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->itemAction));
|
||||
Player_AnimPlayOnceAdjusted(play, this, swingEntry->catchAnimation);
|
||||
func_80835EA4(play, 4);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16219,6 +16219,6 @@ void Player_StartTalking(PlayState* play, Actor* actor) {
|
|||
|
||||
if ((this->naviActor == this->talkActor) && ((this->talkActor->textId & 0xFF00) != 0x200)) {
|
||||
this->naviActor->flags |= ACTOR_FLAG_TALK;
|
||||
func_80835EA4(play, 0xB);
|
||||
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_11);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue