my brain is not braining anymore

This commit is contained in:
dominicentek 2023-08-16 01:21:03 +02:00
parent d0e15cdd10
commit bfeee35c88
2 changed files with 18 additions and 4 deletions

View file

@ -88,6 +88,11 @@ Pos=10,30
Size=275,400
Collapsed=0
[Window][Camera Stats]
Pos=10,609
Size=115,114
Collapsed=0
[Table][0xD0F0C6E3,2]
Column 0 Weight=1.0000
Column 1 Weight=1.0000

View file

@ -2931,6 +2931,15 @@ void set_camera_mode(struct Camera *c, s16 mode, s16 frames) {
* Updates Lakitu's position/focus and applies camera shakes.
*/
void update_lakitu(struct Camera *c) {
if (camera_frozen) {
vec3f_copy(gLakituState.pos, c->pos);
vec3f_copy(gLakituState.focus, c->focus);
vec3f_copy(gLakituState.goalPos, c->pos);
vec3f_copy(gLakituState.goalFocus, c->focus);
c->yaw = calculate_yaw(c->focus, c->pos);
gLakituState.yaw = c->yaw;
return;
}
struct Surface *floor = NULL;
Vec3f newPos;
Vec3f newFoc;
@ -3393,15 +3402,15 @@ void update_camera(struct Camera *c) {
if (camera_frozen) {
if (should_update_cam_from_keyframes) {
should_update_cam_from_keyframes = false;
vec3f_copy(gLakituState.pos, freezecamPos);
vec3f_set_dist_and_angle(gLakituState.pos, gLakituState.focus, 100, freezecamPitch, freezecamYaw);
vec3f_copy(c->pos, freezecamPos);
vec3f_set_dist_and_angle(c->pos, c->focus, 100, freezecamYaw, freezecamPitch);
}
else {
float dist;
s16 yaw;
s16 pitch;
vec3f_copy(freezecamPos, gLakituState.pos);
vec3f_get_dist_and_angle(gLakituState.pos, gLakituState.focus, &dist, &pitch, &yaw);
vec3f_copy(freezecamPos, c->pos);
vec3f_get_dist_and_angle(c->pos, c->focus, &dist, &yaw, &pitch);
freezecamYaw = yaw;
freezecamPitch = pitch;
}