mirror of https://github.com/zeldaret/oot.git
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
|
@ -119,6 +119,12 @@ struct View;
|
||||||
#define CAM_VIEW_FOV (1 << 5) // camera->fov
|
#define CAM_VIEW_FOV (1 << 5) // camera->fov
|
||||||
#define CAM_VIEW_ROLL (1 << 6) // camera->roll
|
#define CAM_VIEW_ROLL (1 << 6) // camera->roll
|
||||||
|
|
||||||
|
#define CAM_DATA_SET_0 (1 << 0)
|
||||||
|
#define CAM_DATA_SET_1 (1 << 1)
|
||||||
|
#define CAM_DATA_SET_2 (1 << 2)
|
||||||
|
#define CAM_DATA_SET_3 (1 << 3)
|
||||||
|
#define CAM_DATA_SET_4 (1 << 4)
|
||||||
|
|
||||||
// All scenes using `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT` or `SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT` are expected
|
// All scenes using `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT` or `SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT` are expected
|
||||||
// to have their first two bgCamInfo entries be the following:
|
// to have their first two bgCamInfo entries be the following:
|
||||||
#define BGCAM_INDEX_TOGGLE_LOCKED 0
|
#define BGCAM_INDEX_TOGGLE_LOCKED 0
|
||||||
|
@ -851,6 +857,22 @@ typedef struct KeepOn4ReadOnlyData {
|
||||||
/* 0x1E */ s16 unk_1E;
|
/* 0x1E */ s16 unk_1E;
|
||||||
} KeepOn4ReadOnlyData; // size = 0x20
|
} KeepOn4ReadOnlyData; // size = 0x20
|
||||||
|
|
||||||
|
typedef enum CameraItemType {
|
||||||
|
/* 1 */ CAM_ITEM_TYPE_1 = 1,
|
||||||
|
/* 2 */ CAM_ITEM_TYPE_2,
|
||||||
|
/* 3 */ CAM_ITEM_TYPE_3,
|
||||||
|
/* 4 */ CAM_ITEM_TYPE_4,
|
||||||
|
/* 5 */ CAM_ITEM_TYPE_5,
|
||||||
|
/* 8 */ CAM_ITEM_TYPE_8 = 8,
|
||||||
|
/* 9 */ CAM_ITEM_TYPE_9,
|
||||||
|
/* 10 */ CAM_ITEM_TYPE_10,
|
||||||
|
/* 11 */ CAM_ITEM_TYPE_11,
|
||||||
|
/* 12 */ CAM_ITEM_TYPE_12,
|
||||||
|
/* 81 */ CAM_ITEM_TYPE_81 = 81,
|
||||||
|
/* 90 */ CAM_ITEM_TYPE_90 = 90,
|
||||||
|
/* 91 */ CAM_ITEM_TYPE_91
|
||||||
|
} CameraItemType;
|
||||||
|
|
||||||
typedef struct KeepOn4ReadWriteData {
|
typedef struct KeepOn4ReadWriteData {
|
||||||
/* 0x00 */ f32 unk_00;
|
/* 0x00 */ f32 unk_00;
|
||||||
/* 0x04 */ f32 unk_04;
|
/* 0x04 */ f32 unk_04;
|
||||||
|
@ -1648,8 +1670,7 @@ s32 Camera_ChangeDoorCam(Camera* camera, struct Actor* doorActor, s16 bgCamIndex
|
||||||
s16 timer3);
|
s16 timer3);
|
||||||
s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
|
s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
|
||||||
Vec3f Camera_GetQuakeOffset(Camera* camera);
|
Vec3f Camera_GetQuakeOffset(Camera* camera);
|
||||||
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
|
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3, s32 data4);
|
||||||
UNK_TYPE arg6);
|
|
||||||
s32 func_8005B198(void);
|
s32 func_8005B198(void);
|
||||||
s16 Camera_SetFinishedFlag(Camera* camera);
|
s16 Camera_SetFinishedFlag(Camera* camera);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "play_state.h"
|
#include "play_state.h"
|
||||||
#include "vis.h"
|
#include "vis.h"
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0"
|
||||||
|
|
||||||
SpeedMeter D_801664D0;
|
SpeedMeter D_801664D0;
|
||||||
VisCvg sVisCvg;
|
VisCvg sVisCvg;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
|
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||||
"ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
|
"ique-cn:64 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
|
||||||
|
|
||||||
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
|
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
|
||||||
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
|
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
|
||||||
|
@ -3661,7 +3661,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||||
"ique-cn:128 ntsc-1.0:82 ntsc-1.1:82 ntsc-1.2:82 pal-1.0:82 pal-1.1:82"
|
"ique-cn:128 ntsc-1.0:79 ntsc-1.1:79 ntsc-1.2:79 pal-1.0:79 pal-1.1:79"
|
||||||
|
|
||||||
s32 Camera_KeepOn4(Camera* camera) {
|
s32 Camera_KeepOn4(Camera* camera) {
|
||||||
static Vec3f D_8015BD50;
|
static Vec3f D_8015BD50;
|
||||||
|
@ -3677,7 +3677,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
VecGeo spB8;
|
VecGeo spB8;
|
||||||
UNUSED VecGeo spB0;
|
UNUSED VecGeo spB0;
|
||||||
VecGeo spA8;
|
VecGeo spA8;
|
||||||
s16* temp_s0 = &camera->data2;
|
s16* itemType = &camera->data2;
|
||||||
s16 spA2;
|
s16 spA2;
|
||||||
s16 spA0;
|
s16 spA0;
|
||||||
s16 sp9E;
|
s16 sp9E;
|
||||||
|
@ -3698,12 +3698,12 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
camera->play->view.unk_124 = camera->camId | 0x50;
|
camera->play->view.unk_124 = camera->camId | 0x50;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
rwData->unk_14 = *temp_s0;
|
rwData->unk_14 = *itemType;
|
||||||
camera->stateFlags &= ~CAM_STATE_LOCK_MODE;
|
camera->stateFlags &= ~CAM_STATE_LOCK_MODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rwData->unk_14 != *temp_s0) {
|
if (rwData->unk_14 != *itemType) {
|
||||||
PRINTF(VT_COL(YELLOW, BLACK) "camera: item: item type changed %d -> %d\n" VT_RST, rwData->unk_14, *temp_s0);
|
PRINTF(VT_COL(YELLOW, BLACK) "camera: item: item type changed %d -> %d\n" VT_RST, rwData->unk_14, *itemType);
|
||||||
camera->animState = 20;
|
camera->animState = 20;
|
||||||
camera->stateFlags |= CAM_STATE_LOCK_MODE;
|
camera->stateFlags |= CAM_STATE_LOCK_MODE;
|
||||||
camera->stateFlags &= ~(CAM_STATE_CHECK_WATER | CAM_STATE_CHECK_BG);
|
camera->stateFlags &= ~(CAM_STATE_CHECK_WATER | CAM_STATE_CHECK_BG);
|
||||||
|
@ -3726,33 +3726,33 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
roData->interfaceField = GET_NEXT_RO_DATA(values);
|
roData->interfaceField = GET_NEXT_RO_DATA(values);
|
||||||
roData->unk_14 = GET_NEXT_SCALED_RO_DATA(values);
|
roData->unk_14 = GET_NEXT_SCALED_RO_DATA(values);
|
||||||
roData->unk_1E = GET_NEXT_RO_DATA(values);
|
roData->unk_1E = GET_NEXT_RO_DATA(values);
|
||||||
PRINTF("camera: item: type %d\n", *temp_s0);
|
PRINTF("camera: item: type %d\n", *itemType);
|
||||||
switch (*temp_s0) {
|
switch (*itemType) {
|
||||||
case 1:
|
case CAM_ITEM_TYPE_1:
|
||||||
roData->unk_00 = playerHeight * -0.6f * yNormal;
|
roData->unk_00 = playerHeight * -0.6f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 2.0f * yNormal;
|
roData->unk_04 = playerHeight * 2.0f * yNormal;
|
||||||
roData->unk_08 = 10.0f;
|
roData->unk_08 = 10.0f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case CAM_ITEM_TYPE_2:
|
||||||
case 3:
|
case CAM_ITEM_TYPE_3:
|
||||||
roData->unk_08 = -20.0f;
|
roData->unk_08 = -20.0f;
|
||||||
roData->unk_18 = 80.0f;
|
roData->unk_18 = 80.0f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case CAM_ITEM_TYPE_4:
|
||||||
roData->unk_00 = playerHeight * -0.2f * yNormal;
|
roData->unk_00 = playerHeight * -0.2f * yNormal;
|
||||||
roData->unk_08 = 25.0f;
|
roData->unk_08 = 25.0f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case CAM_ITEM_TYPE_8:
|
||||||
roData->unk_00 = playerHeight * -0.2f * yNormal;
|
roData->unk_00 = playerHeight * -0.2f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 0.8f * yNormal;
|
roData->unk_04 = playerHeight * 0.8f * yNormal;
|
||||||
roData->unk_08 = 50.0f;
|
roData->unk_08 = 50.0f;
|
||||||
roData->unk_18 = 70.0f;
|
roData->unk_18 = 70.0f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case CAM_ITEM_TYPE_9:
|
||||||
roData->unk_00 = playerHeight * 0.1f * yNormal;
|
roData->unk_00 = playerHeight * 0.1f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 0.5f * yNormal;
|
roData->unk_04 = playerHeight * 0.5f * yNormal;
|
||||||
roData->unk_08 = -20.0f;
|
roData->unk_08 = -20.0f;
|
||||||
|
@ -3761,7 +3761,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE, KEEPON4_FLAG_6);
|
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE, KEEPON4_FLAG_6);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case CAM_ITEM_TYPE_5:
|
||||||
roData->unk_00 = playerHeight * -0.4f * yNormal;
|
roData->unk_00 = playerHeight * -0.4f * yNormal;
|
||||||
roData->unk_08 = -10.0f;
|
roData->unk_08 = -10.0f;
|
||||||
roData->unk_0C = 45.0f;
|
roData->unk_0C = 45.0f;
|
||||||
|
@ -3769,7 +3769,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_ALL, KEEPON4_FLAG_1);
|
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_ALL, KEEPON4_FLAG_1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case CAM_ITEM_TYPE_10:
|
||||||
roData->unk_00 = playerHeight * -0.5f * yNormal;
|
roData->unk_00 = playerHeight * -0.5f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 1.5f * yNormal;
|
roData->unk_04 = playerHeight * 1.5f * yNormal;
|
||||||
roData->unk_08 = -15.0f;
|
roData->unk_08 = -15.0f;
|
||||||
|
@ -3780,7 +3780,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
roData->unk_1E = 0x3C;
|
roData->unk_1E = 0x3C;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case CAM_ITEM_TYPE_12:
|
||||||
roData->unk_00 = playerHeight * -0.6f * yNormal;
|
roData->unk_00 = playerHeight * -0.6f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 1.6f * yNormal;
|
roData->unk_04 = playerHeight * 1.6f * yNormal;
|
||||||
roData->unk_08 = -2.0f;
|
roData->unk_08 = -2.0f;
|
||||||
|
@ -3792,14 +3792,14 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
roData->unk_18 = 50.0f;
|
roData->unk_18 = 50.0f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x5A:
|
case CAM_ITEM_TYPE_90:
|
||||||
roData->unk_00 = playerHeight * -0.3f * yNormal;
|
roData->unk_00 = playerHeight * -0.3f * yNormal;
|
||||||
roData->unk_18 = 45.0f;
|
roData->unk_18 = 45.0f;
|
||||||
roData->interfaceField =
|
roData->interfaceField =
|
||||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_IGNORE, KEEPON4_FLAG_1);
|
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_IGNORE, KEEPON4_FLAG_1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x5B:
|
case CAM_ITEM_TYPE_91:
|
||||||
roData->unk_00 = playerHeight * -0.1f * yNormal;
|
roData->unk_00 = playerHeight * -0.1f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 1.5f * yNormal;
|
roData->unk_04 = playerHeight * 1.5f * yNormal;
|
||||||
roData->unk_08 = -3.0f;
|
roData->unk_08 = -3.0f;
|
||||||
|
@ -3809,7 +3809,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_IGNORE, KEEPON4_FLAG_3);
|
CAM_INTERFACE_FIELD(CAM_LETTERBOX_MEDIUM, CAM_HUD_VISIBILITY_IGNORE, KEEPON4_FLAG_3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x51:
|
case CAM_ITEM_TYPE_81:
|
||||||
roData->unk_00 = playerHeight * -0.3f * yNormal;
|
roData->unk_00 = playerHeight * -0.3f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 1.5f * yNormal;
|
roData->unk_04 = playerHeight * 1.5f * yNormal;
|
||||||
roData->unk_08 = 2.0f;
|
roData->unk_08 = 2.0f;
|
||||||
|
@ -3821,7 +3821,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
||||||
roData->unk_1E = 0x1E;
|
roData->unk_1E = 0x1E;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case CAM_ITEM_TYPE_11:
|
||||||
roData->unk_00 = playerHeight * -0.19f * yNormal;
|
roData->unk_00 = playerHeight * -0.19f * yNormal;
|
||||||
roData->unk_04 = playerHeight * 0.7f * yNormal;
|
roData->unk_04 = playerHeight * 0.7f * yNormal;
|
||||||
roData->unk_0C = 130.0f;
|
roData->unk_0C = 130.0f;
|
||||||
|
@ -8874,25 +8874,24 @@ Vec3f Camera_GetQuakeOffset(Camera* camera) {
|
||||||
return camera->quakeOffset;
|
return camera->quakeOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
|
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3, s32 data4) {
|
||||||
UNK_TYPE arg6) {
|
if (setDataFlags & CAM_DATA_SET_0) {
|
||||||
if (setDataFlags & 0x1) {
|
|
||||||
camera->data0 = data0;
|
camera->data0 = data0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setDataFlags & 0x2) {
|
if (setDataFlags & CAM_DATA_SET_1) {
|
||||||
camera->data1 = data1;
|
camera->data1 = data1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setDataFlags & 0x4) {
|
if (setDataFlags & CAM_DATA_SET_2) {
|
||||||
camera->data2 = data2;
|
camera->data2 = data2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setDataFlags & 0x8) {
|
if (setDataFlags & CAM_DATA_SET_3) {
|
||||||
camera->data3 = data3;
|
camera->data3 = data3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setDataFlags & 0x10) {
|
if (setDataFlags & CAM_DATA_SET_4) {
|
||||||
PRINTF(VT_COL(RED, WHITE) "camera: setCameraData: last argument not alive!\n" VT_RST);
|
PRINTF(VT_COL(RED, WHITE) "camera: setCameraData: last argument not alive!\n" VT_RST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "z_lib.h"
|
#include "z_lib.h"
|
||||||
|
|
||||||
#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" \
|
#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:168 ntsc-1.1:168 ntsc-1.2:168 pal-1.0:168 pal-1.1:168"
|
"ique-cn:192 ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160"
|
||||||
|
|
||||||
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
|
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
|
||||||
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
|
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
|
||||||
|
|
|
@ -4293,7 +4293,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
|
||||||
subCam->timer = -99;
|
subCam->timer = -99;
|
||||||
if (Play_CamIsNotFixed(play)) {
|
if (Play_CamIsNotFixed(play)) {
|
||||||
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_TURN_AROUND);
|
Play_InitCameraDataUsingPlayer(play, subCamId, player, CAM_SET_TURN_AROUND);
|
||||||
subCam->data2 = 0xC;
|
subCam->data2 = CAM_ITEM_TYPE_12;
|
||||||
} else {
|
} else {
|
||||||
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
||||||
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
Play_RequestCameraSetting(play, subCamId, CAM_SET_FREE2);
|
||||||
|
|
|
@ -228,7 +228,7 @@ void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play2) {
|
||||||
if (sCamSetting == CAM_SET_NONE) {
|
if (sCamSetting == CAM_SET_NONE) {
|
||||||
PRINTF("camera changed (mori rakka tenjyo) ... \n");
|
PRINTF("camera changed (mori rakka tenjyo) ... \n");
|
||||||
sCamSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
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);
|
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||||
}
|
}
|
||||||
} else if (sCamSetting != CAM_SET_NONE) {
|
} else if (sCamSetting != CAM_SET_NONE) {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
#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" \
|
#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 \
|
#define FLAGS \
|
||||||
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
|
(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
|
// Focus the camera on Epona
|
||||||
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
|
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
|
||||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_TURN_AROUND);
|
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)) {
|
if (!(this->stateFlags & ENHORSE_INACTIVE)) {
|
||||||
|
@ -1853,7 +1853,7 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
|
||||||
EnHorse_SetFollowAnimation(this, play);
|
EnHorse_SetFollowAnimation(this, play);
|
||||||
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
|
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
|
||||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_TURN_AROUND);
|
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 {
|
} else {
|
||||||
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
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) {
|
void EnOssan_UpdateCameraDirection(EnOssan* this, PlayState* play, f32 cameraFaceAngle) {
|
||||||
this->cameraFaceAngle = 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) {
|
s32 EnOssan_TryGetObjBankIndices(EnOssan* this, PlayState* play, s16* objectIds) {
|
||||||
|
|
|
@ -377,7 +377,7 @@ static Vec3f sInteractWallCheckResult;
|
||||||
static Input* sControlInput;
|
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" \
|
#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
|
// .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 (!Play_CamIsNotFixed(play)) {
|
||||||
if (camSetting == CAM_SET_SCENE_TRANSITION) {
|
if (camSetting == CAM_SET_SCENE_TRANSITION) {
|
||||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||||
|
@ -3508,9 +3508,9 @@ void func_80835E44(PlayState* play, s16 camSetting) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80835EA4(PlayState* play, s32 arg1) {
|
void Player_SetTurnAroundCamera(PlayState* play, s32 camItemType) {
|
||||||
func_80835E44(play, CAM_SET_TURN_AROUND);
|
Player_RequestCameraSetting(play, CAM_SET_TURN_AROUND);
|
||||||
Camera_SetCameraData(Play_GetCamera(play, CAM_ID_MAIN), 4, NULL, NULL, arg1, 0, 0);
|
Camera_SetCameraData(Play_GetCamera(play, CAM_ID_MAIN), CAM_DATA_SET_2, NULL, NULL, camItemType, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player_DestroyHookshot(Player* this) {
|
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;
|
this->stateFlags1 |= PLAYER_STATE1_0 | PLAYER_STATE1_29;
|
||||||
|
|
||||||
func_80835E44(play, CAM_SET_SCENE_TRANSITION);
|
Player_RequestCameraSetting(play, CAM_SET_SCENE_TRANSITION);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -5973,7 +5973,7 @@ void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) {
|
||||||
if (magicSpell == 5) {
|
if (magicSpell == 5) {
|
||||||
this->subCamId = OnePointCutscene_Init(play, 1100, -101, NULL, CAM_ID_MAIN);
|
this->subCamId = OnePointCutscene_Init(play, 1100, -101, NULL, CAM_ID_MAIN);
|
||||||
} else {
|
} 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);
|
Player_SetupAction(play, this, Player_Action_8085063C, 1);
|
||||||
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
|
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
|
||||||
Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
|
Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
|
||||||
func_80835EA4(play, 4);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
func_80832224(this);
|
func_80832224(this);
|
||||||
|
@ -6095,11 +6095,11 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
||||||
} else if (sp2C == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
|
} else if (sp2C == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
|
||||||
this->av1.actionVar1 = 1;
|
this->av1.actionVar1 = 1;
|
||||||
this->actor.textId = 0x4005;
|
this->actor.textId = 0x4005;
|
||||||
func_80835EA4(play, 1);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_1);
|
||||||
} else {
|
} else {
|
||||||
this->av1.actionVar1 = 2;
|
this->av1.actionVar1 = 2;
|
||||||
this->actor.textId = 0xCF;
|
this->actor.textId = 0xCF;
|
||||||
func_80835EA4(play, 4);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->actor.flags |= ACTOR_FLAG_TALK;
|
this->actor.flags |= ACTOR_FLAG_TALK;
|
||||||
|
@ -6122,21 +6122,21 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
||||||
if (sp2C == 0xC) {
|
if (sp2C == 0xC) {
|
||||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EED8, 0);
|
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EED8, 0);
|
||||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_bug_out);
|
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)) {
|
} else if ((sp2C > 0) && (sp2C < 4)) {
|
||||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EFC0, 0);
|
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EFC0, 0);
|
||||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_fish_out);
|
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 {
|
} else {
|
||||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EAC0, 0);
|
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EAC0, 0);
|
||||||
Player_AnimChangeOnceMorphAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_start);
|
Player_AnimChangeOnceMorphAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_start);
|
||||||
func_80835EA4(play, 2);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084E3C4, 0);
|
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084E3C4, 0);
|
||||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_okarina_start);
|
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_okarina_start);
|
||||||
this->stateFlags2 |= PLAYER_STATE2_USING_OCARINA;
|
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) {
|
if (this->unk_6A8 != NULL) {
|
||||||
this->stateFlags2 |= PLAYER_STATE2_25;
|
this->stateFlags2 |= PLAYER_STATE2_25;
|
||||||
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, this->unk_6A8);
|
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)) {
|
if (!(this->stateFlags2 & PLAYER_STATE2_10) || (this->currentBoots == PLAYER_BOOTS_IRON)) {
|
||||||
Player_SetupWaitForPutAway(play, this, func_8083A434);
|
Player_SetupWaitForPutAway(play, this, func_8083A434);
|
||||||
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_demo_get_itemB);
|
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;
|
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)) {
|
if ((this->stateFlags1 & PLAYER_STATE1_10) && LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) {
|
||||||
func_808332F4(this, play);
|
func_808332F4(this, play);
|
||||||
func_80832340(play, this);
|
func_80832340(play, this);
|
||||||
func_80835EA4(play, 8);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_8);
|
||||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 5.0f)) {
|
} else if (LinkAnimation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||||
Player_PlayVoiceSfx(this, NA_SE_VO_LI_BREATH_DRINK);
|
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;
|
this->av2.actionVar2 = 2;
|
||||||
func_80835EA4(play, 9);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_9);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this->av2.actionVar2 == 0) {
|
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_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->itemAction));
|
||||||
Player_AnimPlayOnceAdjusted(play, this, swingEntry->catchAnimation);
|
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)) {
|
if ((this->naviActor == this->talkActor) && ((this->talkActor->textId & 0xFF00) != 0x200)) {
|
||||||
this->naviActor->flags |= ACTOR_FLAG_TALK;
|
this->naviActor->flags |= ACTOR_FLAG_TALK;
|
||||||
func_80835EA4(play, 0xB);
|
Player_SetTurnAroundCamera(play, CAM_ITEM_TYPE_11);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue