Mario Kart 64
Loading...
Searching...
No Matches
render.inc.c
Go to the documentation of this file.
1#include <actors.h>
2#include <main.h>
4
13void render_actor_mario_sign(Camera* arg0, UNUSED Mat4 arg1, struct Actor* arg2) {
14 Mat4 sp40;
15 f32 unk;
16 s16 temp = arg2->flags;
17
18 if (temp & 0x800) {
19 return;
20 }
21
22 unk = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f);
23 if (!(unk < 0.0f)) {
24 gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
25 gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
26 mtxf_pos_rotation_xyz(sp40, arg2->pos, arg2->rot);
27 if (render_set_position(sp40, 0) != 0) {
29 }
30 }
31}
Camera * camera1
Definition camera.c:23
f32 Mat4[4][4]
Definition common_structs.h:16
#define G_SHADING_SMOOTH
Definition gbi.h:349
#define G_LIGHTING
Definition gbi.h:355
#define UNUSED
Definition macros.h:23
Gfx * gDisplayListHead
Definition main.c:132
f32 gCameraZoom[4]
Definition main.c:122
Gfx d_course_mario_raceway_dl_sign[]
Definition course_data.c:3531
void render_actor_mario_sign(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2)
Renders the Mario sign actor. Actor used in Mario Raceway.
Definition render.inc.c:13
f32 is_within_render_distance(Vec3f cameraPos, Vec3f objectPos, u16 orientationY, f32 minDistance, f32 fov, f32 maxDistance)
Definition math_util.c:1114
void mtxf_pos_rotation_xyz(Mat4 out, Vec3f pos, Vec3s orientation)
Definition math_util.c:468
s32 render_set_position(Mat4 arg0, s32 arg1)
Definition math_util.c:47
Definition actor_types.h:120
Vec3s rot
Definition actor_types.h:127
s16 flags
Definition actor_types.h:122
Vec3f pos
Definition actor_types.h:129
Definition camera.h:26
Vec3s rot
Definition camera.h:33
Vec3f pos
Definition camera.h:27
signed short int s16
Definition ultratypes.h:13
float f32
Definition ultratypes.h:34