Mario Kart 64
Loading...
Searching...
No Matches
render.inc.c
Go to the documentation of this file.
1#include <actors.h>
2#include <PR/gbi.h>
3#include <main.h>
4#include <defines.h>
5
14void render_actor_school_bus(Camera* arg0, struct Actor* arg1) {
15 UNUSED s32 pad[6];
16 Mat4 spC8;
17 UNUSED s32 pad2[32];
18 f32 temp_f0;
19
20 temp_f0 =
21 is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
22 if (temp_f0 < 0.0f) {
23 return;
24 }
25
26 gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
27 gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
28
29 mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot);
30 if (render_set_position(spC8, 0) != 0) {
31
33 if (temp_f0 < 160000.0f) {
34 gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_3);
35 } else if (temp_f0 < 640000.0f) {
36 gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4);
37 } else {
38 gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5);
39 }
40 } else if (temp_f0 < 160000.0f) {
41 gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4);
42 } else {
43 gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5);
44 }
45 }
46}
Gfx toads_turnpike_dl_5[]
Definition course_offsets.c:101
Gfx toads_turnpike_dl_3[]
Definition course_offsets.c:81
Gfx toads_turnpike_dl_4[]
Definition course_offsets.c:91
Camera * camera1
Definition camera.c:23
f32 Mat4[4][4]
Definition common_structs.h:16
#define SCREEN_MODE_1P
Options for gScreenModeSelection and gActiveScreenMode.
Definition defines.h:198
#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
s32 gActiveScreenMode
Definition main.c:176
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
#define G_ON
Definition mbi.h:51
void render_actor_school_bus(Camera *arg0, struct Actor *arg1)
Renders the school bus actor. Actor used in Toad's Turnpike. His update are made in vehicle.
Definition render.inc.c:14
Definition actor_types.h:120
Vec3s rot
Definition actor_types.h:127
Vec3f pos
Definition actor_types.h:129
Definition camera.h:26
Vec3s rot
Definition camera.h:33
Vec3f pos
Definition camera.h:27
signed int s32
Definition ultratypes.h:15
float f32
Definition ultratypes.h:34