mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-16 04:44:44 +00:00
Document Viewpoints and Scene Cam Types (#1285)
* Document bgCamData * More changes and cleanup * More docs * Clarify comments * PR Feedback, rename bgcheck functions * remove fallthrough cleanup (other pr that deals with that) * PR Suggestions * bug report * bgCamDataIndexBeforeUnderwater * PR/Discord Discussions * Missed some * sync function header args * Another suggestion * cleanup * Comments * Indoor BgCamData * Change bgCamData to s16 for now * PR suggestions * the * use "info" * Missed a suggestion * Update and sync docs * More docs * Even more docs * Revert macro * Add comment * Better comments * More cleanup * Better Cam Scene Docs * Small change * Market -> Pivot * "only" * swap * Better comment * Another comment * to * Implement suggestions from discord * Discord Discussion * Revert bgCamFuncData to Vec3s * cleanup * Remaining cleanup * docs cleanup * format * More docs * Improve notes * Cleanup * Change enum * PR Suggestions * Improve comment * Rephrase * Implement discussion from discord * Discord discussion * fixed to locked * Update comments * Few more comments * Update include/z64.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Update include/z64camera.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Better comments * PR Suggestions * rm numbers * Update src/code/z_play.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
6d52684020
commit
d88a23f4a0
19 changed files with 105 additions and 60 deletions
|
@ -333,7 +333,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
|
|||
play->csCtx.segment = gAdultWarpInCS;
|
||||
}
|
||||
}
|
||||
if (func_800C0CB8(play) != 0) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing);
|
||||
|
|
|
@ -1083,7 +1083,13 @@ void func_80A0461C(EnElf* this, PlayState* play) {
|
|||
} else {
|
||||
arrowPointedActor = play->actorCtx.targetCtx.arrowPointedActor;
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_10) || ((YREG(15) & 0x10) && func_800BC56C(play, 2))) {
|
||||
// `R_SCENE_CAM_TYPE` is not a bit field, but this conditional checks for a specific bit.
|
||||
// This `& 0x10` check will pass for either `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT`, `SCENE_CAM_TYPE_FIXED`, or
|
||||
// `SCENE_CAM_TYPE_SHOOTING_GALLERY`.
|
||||
// However, of these three, only `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT` is used with `VIEWPOINT_PIVOT`,
|
||||
// so here the bit check is equivalent to checking for `SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT`.
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_10) ||
|
||||
((R_SCENE_CAM_TYPE & 0x10) && Play_CheckViewpoint(play, VIEWPOINT_PIVOT))) {
|
||||
temp = 12;
|
||||
this->unk_2C0 = 100;
|
||||
} else if (arrowPointedActor == NULL || arrowPointedActor->category == ACTORCAT_NPC) {
|
||||
|
|
|
@ -653,7 +653,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
|
|||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_29;
|
||||
func_800BC490(play, 1);
|
||||
Play_SetViewpoint(play, VIEWPOINT_LOCKED);
|
||||
Interface_ChangeAlpha(50);
|
||||
this->drawCursor = 0;
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
|
@ -737,7 +737,7 @@ void EnOssan_State_Idle(EnOssan* this, PlayState* play, Player* player) {
|
|||
// "Start conversation!!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 会話開始!! ★★★" VT_RST "\n");
|
||||
player->stateFlags2 |= PLAYER_STATE2_29;
|
||||
func_800BC590(play);
|
||||
Play_SetShopBrowsingViewpoint(play);
|
||||
EnOssan_SetStateStartShopping(play, this, false);
|
||||
} else if (this->actor.xzDistToPlayer < 100.0f) {
|
||||
func_8002F2CC(&this->actor, play, 100);
|
||||
|
@ -1322,7 +1322,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) {
|
|||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_29;
|
||||
func_800BC490(play, 1);
|
||||
Play_SetViewpoint(play, VIEWPOINT_LOCKED);
|
||||
Interface_ChangeAlpha(50);
|
||||
this->drawCursor = 0;
|
||||
EnOssan_UpdateCameraDirection(this, play, 0.0f);
|
||||
|
@ -1696,7 +1696,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player
|
|||
osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 続けるよ!! ★★★" VT_RST "\n");
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_29;
|
||||
func_800BC490(play, 2);
|
||||
Play_SetViewpoint(play, VIEWPOINT_PIVOT);
|
||||
Message_StartTextbox(play, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(play, this, true);
|
||||
func_8002F298(&this->actor, play, 100.0f, -1);
|
||||
|
@ -1715,7 +1715,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player
|
|||
selectedItem->updateStockedItemFunc(play, selectedItem);
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= PLAYER_STATE2_29;
|
||||
func_800BC490(play, 2);
|
||||
Play_SetViewpoint(play, VIEWPOINT_PIVOT);
|
||||
Message_StartTextbox(play, this->actor.textId, &this->actor);
|
||||
EnOssan_SetStateStartShopping(play, this, true);
|
||||
func_8002F298(&this->actor, play, 100.0f, -1);
|
||||
|
|
|
@ -53,7 +53,7 @@ void OceffSpot_Init(Actor* thisx, PlayState* play) {
|
|||
Lights_PointNoGlowSetInfo(&this->lightInfo2, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
this->lightNode2 = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo2);
|
||||
if (YREG(15)) {
|
||||
if (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_DEFAULT) {
|
||||
this->actor.scale.y = 2.4f;
|
||||
} else {
|
||||
this->actor.scale.y = 0.3f;
|
||||
|
|
|
@ -2830,7 +2830,7 @@ void func_80835DE4(PlayState* play, Player* this, PlayerFunc674 func, s32 flags)
|
|||
}
|
||||
|
||||
void func_80835E44(PlayState* play, s16 camSetting) {
|
||||
if (!func_800C0CB8(play)) {
|
||||
if (!Play_CamIsNotFixed(play)) {
|
||||
if (camSetting == CAM_SET_SCENE_TRANSITION) {
|
||||
Interface_ChangeAlpha(2);
|
||||
}
|
||||
|
@ -5144,7 +5144,8 @@ s32 func_8083B998(Player* this, PlayState* play) {
|
|||
(this->unk_664->naviEnemyId != NAVI_ENEMY_NONE))) {
|
||||
this->stateFlags2 |= PLAYER_STATE2_21;
|
||||
} else if ((this->naviTextId == 0) && !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) &&
|
||||
(YREG(15) != 0x10) && (YREG(15) != 0x20) && !func_8083B8F4(this, play)) {
|
||||
(R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) &&
|
||||
(R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT) && !func_8083B8F4(this, play)) {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue