Mario Kart 64
Loading...
Searching...
No Matches
render.inc.c
Go to the documentation of this file.
1#include <camera.h>
2#include <actors.h>
3#include <defines.h>
4#include <main.h>
6
16void render_actor_yoshi_egg(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3) {
17 Mat4 sp60;
18 Vec3s sp5C;
19 Vec3f sp54;
20 f32 temp_f0;
21
23 temp_f0 = is_within_render_distance(arg0->pos, egg->pos, arg0->rot[1], 200.0f, gCameraZoom[arg0 - camera1], 16000000.0f);
24 if (temp_f0 < 0.0f) {
25 return;
26 }
27 } else {
28 arg3 = 15;
29 temp_f0 = 0.0f;
30 }
31
32 gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
33 if ((arg3 > 12) && (arg3 < 20)) {
34 if (temp_f0 < 640000.0f) {
35 sp54[0] = egg->pos[0];
36 sp54[1] = 3.0f;
37 sp54[2] = egg->pos[2];
38 func_802976D8(sp5C);
39 func_8029794C(sp54, sp5C, 10.0f);
40 }
41 sp5C[0] = 0;
42 sp5C[1] = egg->eggRot;
43 sp5C[2] = 0;
44 mtxf_pos_rotation_xyz(sp60, egg->pos, sp5C);
45 if (render_set_position(sp60, 0) == 0) { return; }
46
47 gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
49 } else {
50 arg1[3][0] = egg->pos[0];
51 arg1[3][1] = egg->pos[1];
52 arg1[3][2] = egg->pos[2];
53
54 if (render_set_position(arg1, 0) != 0) {
55 gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
57 }
58 }
59}
void func_802976D8(Vec3s arg0)
Definition actors.c:351
void func_8029794C(Vec3f pos, Vec3s rot, f32 scale)
Definition actors.c:417
Camera * camera1
Definition camera.c:23
f32 Vec3f[3]
Definition common_structs.h:6
s16 Vec3s[3]
Definition common_structs.h:11
f32 Mat4[4][4]
Definition common_structs.h:16
#define CREDITS_SEQUENCE
Definition defines.h:213
#define G_SHADING_SMOOTH
Definition gbi.h:353
#define G_LIGHTING
Definition gbi.h:359
Gfx * gDisplayListHead
Definition main.c:134
f32 gCameraZoom[4]
Definition main.c:124
s32 gGamestate
Definition main.c:169
f32 is_within_render_distance(Vec3f cameraPos, Vec3f objectPos, u16 orientationY, f32 minDistance, f32 fov, f32 maxDistance)
Definition math_util.c:1092
void mtxf_pos_rotation_xyz(Mat4 out, Vec3f pos, Vec3s orientation)
Definition math_util.c:466
s32 render_set_position(Mat4 arg0, s32 arg1)
Definition math_util.c:49
Definition camera.h:26
Vec3s rot
Definition camera.h:33
Vec3f pos
Definition camera.h:27
Definition actor_types.h:212
s16 eggRot
Definition actor_types.h:220
Vec3f pos
Definition actor_types.h:223
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14
void render_actor_yoshi_egg(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3)
Renders the Yoshi egg actor. Actor used in Yoshi Valley.
Definition render.inc.c:16
Gfx d_course_yoshi_valley_dl_egg_lod0[]
Definition course_data.c:11283
Gfx d_course_yoshi_valley_dl_16D70[]
Definition course_data.c:11205