mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
More Camera Flags (#1453)
* Generic Camera Flags * New flag names * Add flags to functions * Finish flag docs * More docs * More cleanup * More clarity * Better shrinkwindow flag docs * Improve name * CAM_INTERFACE_FLAGS * Better approach to edge cases * Change ordering for consistency * Oops * Add masks to macro * PR/Discord discussions * cleanup comment * Oops * PR Suggestions * More PR Feedback * More PR Suggestions * More Camera Flags * PR Suggestions * More flag style change * Small cleanup * More flag docs * Another flag * Fix flags * sync names with other PRs * more fixes * fix comments * update with hud visibility mode docs * missed one * fix comments * Roman PR Suggestions * interfaceField * small fix * letterbox cleanup * cleanup * fix macro arg * fix func declaration * many more docs * better docs? * missed some * oops, revert * add flags to name * cleanup * flag * double signal * simplify cam func name * more suggestions * PR Suggestion
This commit is contained in:
parent
d1df4e4c7e
commit
81a3c3da32
37 changed files with 531 additions and 461 deletions
|
@ -25,8 +25,8 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn);
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
void Play_ChangeViewpointBgCamIndex(PlayState* this) {
|
||||
Camera_ChangeBgCamIndex(GET_ACTIVE_CAM(this), this->viewpoint - 1);
|
||||
void Play_RequestViewpointBgCam(PlayState* this) {
|
||||
Camera_RequestBgCam(GET_ACTIVE_CAM(this), this->viewpoint - 1);
|
||||
}
|
||||
|
||||
void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
|
||||
|
@ -42,7 +42,7 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
|
|||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
Play_ChangeViewpointBgCamIndex(this);
|
||||
Play_RequestViewpointBgCam(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,8 +255,9 @@ void Play_Init(GameState* thisx) {
|
|||
this->cameraPtrs[CAM_ID_MAIN] = &this->mainCamera;
|
||||
this->cameraPtrs[CAM_ID_MAIN]->uid = 0;
|
||||
this->activeCamId = CAM_ID_MAIN;
|
||||
Camera_OverwriteStateFlags(&this->mainCamera, CAM_STATE_0 | CAM_STATE_1 | CAM_STATE_2 | CAM_STATE_3 | CAM_STATE_4 |
|
||||
CAM_STATE_5 | CAM_STATE_6 | CAM_STATE_7);
|
||||
Camera_OverwriteStateFlags(&this->mainCamera, CAM_STATE_CHECK_BG_ALT | CAM_STATE_CHECK_WATER | CAM_STATE_CHECK_BG |
|
||||
CAM_STATE_EXTERNAL_FINISHED | CAM_STATE_CAM_FUNC_FINISH |
|
||||
CAM_STATE_LOCK_MODE | CAM_STATE_DISTORTION | CAM_STATE_PLAY_INIT);
|
||||
Sram_Init(this, &this->sramCtx);
|
||||
Regs_InitData(this);
|
||||
Message_Init(this);
|
||||
|
@ -412,12 +413,12 @@ void Play_Init(GameState* thisx) {
|
|||
|
||||
player = GET_PLAYER(this);
|
||||
Camera_InitDataUsingPlayer(&this->mainCamera, player);
|
||||
Camera_ChangeMode(&this->mainCamera, CAM_MODE_NORMAL);
|
||||
Camera_RequestMode(&this->mainCamera, CAM_MODE_NORMAL);
|
||||
|
||||
playerStartBgCamIndex = player->actor.params & 0xFF;
|
||||
if (playerStartBgCamIndex != 0xFF) {
|
||||
osSyncPrintf("player has start camera ID (" VT_FGCOL(BLUE) "%d" VT_RST ")\n", playerStartBgCamIndex);
|
||||
Camera_ChangeBgCamIndex(&this->mainCamera, playerStartBgCamIndex);
|
||||
Camera_RequestBgCam(&this->mainCamera, playerStartBgCamIndex);
|
||||
}
|
||||
|
||||
if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT) {
|
||||
|
@ -943,7 +944,7 @@ void Play_Update(PlayState* this) {
|
|||
}
|
||||
}
|
||||
|
||||
Play_ChangeViewpointBgCamIndex(this);
|
||||
Play_RequestViewpointBgCam(this);
|
||||
}
|
||||
|
||||
PLAY_LOG(3708);
|
||||
|
@ -1643,11 +1644,11 @@ s32 Play_InitCameraDataUsingPlayer(PlayState* this, s16 camId, Player* player, s
|
|||
|
||||
camera = this->cameraPtrs[camIdx];
|
||||
Camera_InitDataUsingPlayer(camera, player);
|
||||
return Camera_ChangeSetting(camera, setting);
|
||||
return Camera_RequestSetting(camera, setting);
|
||||
}
|
||||
|
||||
s32 Play_ChangeCameraSetting(PlayState* this, s16 camId, s16 setting) {
|
||||
return Camera_ChangeSetting(Play_GetCamera(this, camId), setting);
|
||||
s32 Play_RequestCameraSetting(PlayState* this, s16 camId, s16 setting) {
|
||||
return Camera_RequestSetting(Play_GetCamera(this, camId), setting);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue