mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 04:14:34 +00:00
Misc Cleanup 2 (#1007)
* Cleanup `UNK_TYPE`, `UNK_PTR` usage * Add some missing empty lines after declarations * Remove some legacy comments from non-matching times * Fix some grammar (mostly "it's"/"its") * Use proper names for two symbols after ZAPD bugfix * Cleanup `place_title_cards.xml` * Use `NULL` to check against `D_8012D260` pointer * Parentheses around some macro arguments * wip proofread headers up to z64animation.h
This commit is contained in:
parent
04a9d51e90
commit
669732abbe
104 changed files with 217 additions and 92 deletions
|
@ -1973,6 +1973,7 @@ s32 Camera_Parallel1(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
|
||||
|
||||
para1->unk_00 = NEXTPCT * playerHeight * yNormal;
|
||||
;
|
||||
para1->distTarget = NEXTPCT * playerHeight * yNormal;
|
||||
|
@ -2181,6 +2182,7 @@ s32 Camera_Jump1(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(R_CAM_YOFFSET_NORM)) - (PCT(R_CAM_YOFFSET_NORM) * (68.0f / playerHeight));
|
||||
|
||||
jump1->atYOffset = PCT(NEXTSETTING) * playerHeight * yNormal;
|
||||
jump1->distMin = PCT(NEXTSETTING) * playerHeight * yNormal;
|
||||
jump1->distMax = PCT(NEXTSETTING) * playerHeight * yNormal;
|
||||
|
@ -2721,6 +2723,7 @@ s32 Camera_Battle1(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
|
||||
|
||||
batt1->yOffset = NEXTPCT * playerHeight * yNormal;
|
||||
batt1->distance = NEXTSETTING;
|
||||
batt1->swingYawInitial = NEXTSETTING;
|
||||
|
@ -2954,6 +2957,7 @@ s32 Camera_Battle4(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(R_CAM_YOFFSET_NORM)) - (PCT(R_CAM_YOFFSET_NORM) * (68.0f / playerHeight));
|
||||
|
||||
batt4->yOffset = NEXTPCT * playerHeight * yNormal;
|
||||
batt4->rTarget = NEXTPCT * playerHeight * yNormal;
|
||||
batt4->pitchTarget = DEGF_TO_BINANG(NEXTSETTING);
|
||||
|
@ -3062,6 +3066,7 @@ s32 Camera_KeepOn1(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
|
||||
|
||||
keep1->unk_00 = NEXTPCT * playerHeight * yNormal;
|
||||
keep1->unk_04 = NEXTSETTING;
|
||||
keep1->unk_08 = NEXTSETTING;
|
||||
|
@ -3302,6 +3307,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(OREG(46))) - (PCT(OREG(46)) * (68.0f / playerHeight));
|
||||
|
||||
keep3->yOffset = NEXTPCT * playerHeight * yNormal;
|
||||
keep3->minDist = NEXTSETTING;
|
||||
keep3->maxDist = NEXTSETTING;
|
||||
|
@ -3494,6 +3500,7 @@ s32 Camera_KeepOn4(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + t) - ((68.0f / playerHeight) * t);
|
||||
|
||||
keep4->unk_00 = NEXTPCT * playerHeight * yNormal;
|
||||
keep4->unk_04 = NEXTPCT * playerHeight * yNormal;
|
||||
keep4->unk_08 = NEXTSETTING;
|
||||
|
@ -4652,6 +4659,7 @@ s32 Camera_Unique3(Camera* camera) {
|
|||
if (RELOAD_PARAMS) {
|
||||
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
|
||||
f32 yNormal = (1.0f + PCT(R_CAM_YOFFSET_NORM)) - (PCT(R_CAM_YOFFSET_NORM) * (68.0f / playerHeight));
|
||||
|
||||
params->yOffset = NEXTPCT * playerHeight * yNormal;
|
||||
params->fov = NEXTSETTING;
|
||||
params->interfaceFlags = NEXTSETTING;
|
||||
|
@ -6670,6 +6678,7 @@ s32 Camera_Special9(Camera* camera) {
|
|||
spAC = *eye = *eyeNext;
|
||||
} else {
|
||||
s16 yaw;
|
||||
|
||||
// 0xE38 ~ 20 degrees
|
||||
eyeAdjustment.pitch = 0xE38;
|
||||
// 0xAAA ~ 15 degrees.
|
||||
|
@ -7535,7 +7544,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
}
|
||||
|
||||
/**
|
||||
* When the camera's timer is 0, change the camera to it's parent
|
||||
* When the camera's timer is 0, change the camera to its parent
|
||||
*/
|
||||
void Camera_Finish(Camera* camera) {
|
||||
Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM];
|
||||
|
@ -7992,6 +8001,7 @@ s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 camDataIdx, f32 a
|
|||
osSyncPrintf(".... change default door camera (set %d)\n", CAM_SET_DOORC);
|
||||
} else {
|
||||
s32 setting = Camera_GetCamDataSetting(camera, camDataIdx);
|
||||
|
||||
camera->unk_14A |= 0x40;
|
||||
|
||||
if (Camera_ChangeSetting(camera, setting) >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue