Mario Kart 64
Loading...
Searching...
No Matches
camera.h
Go to the documentation of this file.
1#ifndef CAMERA_H
2#define CAMERA_H
3
4#include <common_structs.h>
5
13#ifdef AVOID_UB
14#define BAD_RETURN(cmd) void
15#else
16#define BAD_RETURN(cmd) cmd
17#endif
18
25
26typedef struct {
27 /* 0x00 */ Vec3f pos;
28 /* 0x0C */ Vec3f lookAt;
29 // This is expected to be a normalized vector, indicates what direction is "up" for the camera
30 /* 0x18 */ Vec3f up;
31 // I think these are the "nautical angles" between pos and lookAt
32 // rot[0] = roll? Does nothing?, rot[1] = yaw, rot[2] = pitch
33 /* 0x24 */ Vec3s rot;
34 /* 0x2A */ u16 someBitFlags;
35 /* 0x2C */ s16 unk_2C;
36 /* 0x2E */ s16 unk_2E;
37 /* 0x30 */ Vec3f unk_30;
38 /* 0x3C */ Vec3f unk_3C;
39 /* 0x48 */ s32 unk_48;
40 /* 0x4C */ s32 unk_4C;
41 /* 0x50 */ s32 unk_50;
42 /* 0x54 */ Collision collision;
43 // When you hit a wall (or another driver) the camera's pos and lookAt bounce up and down. This is the velocity(?)
44 // of that bouncing
46 // Timer for wall-hit bounce. Counts up instead of down
47 /* 0xA0 */ f32 unk_A0;
48 /* 0xA4 */ s32 unk_A4;
49 /* 0xA8 */ s32 unk_A8;
50 /* 0xAC */ s16 unk_AC;
51 // Id of the player the camera is following.
52 /* 0xAE */ s16 playerId;
53 // Seems related to camera movement during drifting
54 /* 0xB0 */ s16 unk_B0;
55 /* 0xB2 */ s16 unk_B2;
56 /* 0xB4 */ f32 unk_B4;
57} Camera; /* size = 0xB8 */
58
64void func_8001D53C(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16, s16);
65void func_8001D794(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16);
72void func_8001F394(Player*, f32*);
73void func_8001F87C(s32);
74
75extern f32 D_800DDB30[];
76
77extern Camera cameras[];
78extern Camera* camera1;
79extern Camera* camera2;
80extern Camera* camera3;
81extern Camera* camera4;
82
83// end of camera.c variables
84
85extern s8 D_80164A89;
86
87extern s32 D_80164A08[4];
88
89extern s32 D_80164A28;
90extern s32 D_80164A2C;
91extern f32 D_80164A30;
92extern f32 D_80164A90[];
93extern f32 D_80164AA0[];
94
95#endif
void func_8001D944(Player *, Camera *, Vec3f, f32 *, f32 *, f32 *, s32 *, s16, s16)
Camera * camera3
Definition camera.c:25
void func_8001EE98(Player *, Camera *, s8)
Definition camera.c:901
void func_8001D794(Player *, Camera *, Vec3f, f32 *, f32 *, f32 *, s16)
Definition camera.c:456
void func_8001CA78(Player *, Camera *, Vec3f, f32 *, f32 *, f32 *, s32, s32)
void func_8001EA0C(Camera *, Player *, s8)
Definition camera.c:809
f32 D_800DDB30[]
Definition camera.c:20
f32 D_80164A30
Definition camera.c:37
void func_8001F87C(s32)
Definition camera.c:1134
s32 D_80164A28
Definition camera.c:35
Camera * camera4
Definition camera.c:26
Camera * camera1
Definition camera.c:23
void func_8001F394(Player *, f32 *)
Definition camera.c:1004
f32 D_80164AA0[]
Definition camera.c:47
void func_8001CA24(Player *, f32)
Definition camera.c:194
f32 D_80164A90[]
Definition camera.c:46
s32 D_80164A08[4]
Definition camera.c:33
Camera cameras[]
Definition camera.c:22
void func_8001E0C4(Camera *, Player *, s8)
Definition camera.c:626
s32 D_80164A2C
Definition camera.c:36
Camera * camera2
Definition camera.c:24
void func_8001CCEC(Player *, Camera *, Vec3f, f32 *, f32 *, f32 *, s32 *, s16, s16)
void func_8001CA10(Camera *)
Definition camera.c:189
void func_8001D53C(Player *, Camera *, Vec3f, f32 *, f32 *, f32 *, s16, s16)
Definition camera.c:406
s8 D_80164A89
Definition camera.c:44
void func_8001E8E8(Camera *, Player *, s8)
Definition camera.c:778
void func_8001E45C(Camera *, Player *, s8)
Definition camera.c:687
void camera_init(f32, f32, f32, s16, u32, s32)
f32 Vec3f[3]
Definition common_structs.h:6
s16 Vec3s[3]
Definition common_structs.h:11
Definition camera.h:26
UnkCameraInner unk_94
Definition camera.h:45
s32 unk_4C
Definition camera.h:40
Vec3s rot
Definition camera.h:33
s16 playerId
Definition camera.h:52
Vec3f unk_30
Definition camera.h:37
s16 unk_AC
Definition camera.h:50
s32 unk_50
Definition camera.h:41
f32 unk_A0
Definition camera.h:47
s16 unk_2E
Definition camera.h:36
f32 unk_B4
Definition camera.h:56
s32 unk_A4
Definition camera.h:48
Vec3f pos
Definition camera.h:27
s16 unk_B2
Definition camera.h:55
Vec3f unk_3C
Definition camera.h:38
Vec3f up
Definition camera.h:30
u16 someBitFlags
Definition camera.h:34
Vec3f lookAt
Definition camera.h:28
s16 unk_B0
Definition camera.h:54
s16 unk_2C
Definition camera.h:35
Collision collision
Definition camera.h:42
s32 unk_48
Definition camera.h:39
s32 unk_A8
Definition camera.h:49
Definition common_structs.h:132
Definition common_structs.h:249
Definition camera.h:19
s16 unk_6
Definition camera.h:22
s16 unk_4
Definition camera.h:21
s16 unk_8
Definition camera.h:23
f32 unk_0
Definition camera.h:20
signed int s32
Definition ultratypes.h:15
unsigned int u32
Definition ultratypes.h:16
signed char s8
Definition ultratypes.h:11
signed short int s16
Definition ultratypes.h:13
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14