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_palm_tree(Camera* arg0, UNUSED Mat4 arg1, struct PalmTree* arg2) {
14 Vec3s spA8 = { 0, 0, 0 };
15 Mat4 sp68;
16 f32 temp_f0;
17 s16 temp_v0 = arg2->flags;
18
19 if ((temp_v0 & 0x800)) {
20 return;
21 }
22
23 temp_f0 =
24 is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f);
25
26 if (!(temp_f0 < 0.0f)) {
27 if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) {
28 func_8029794C(arg2->pos, arg2->rot, 2.0f);
29 }
30 mtxf_pos_rotation_xyz(sp68, arg2->pos, spA8);
31 if (render_set_position(sp68, 0) != 0) {
32
33 gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
34 gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
35
36 switch (arg2->variant) {
37 case 0:
39 gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
41 gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
42 break;
43
44 case 1:
46 gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
48 gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
49 break;
50
51 case 2:
53 gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
55 gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
56 break;
57 }
58 }
59 }
60}
void func_8029794C(Vec3f pos, Vec3s rot, f32 scale)
Definition actors.c:423
Camera * camera1
Definition camera.c:23
s16 Vec3s[3]
Definition common_structs.h:11
f32 Mat4[4][4]
Definition common_structs.h:16
#define G_CULL_BACK
Definition gbi.h:351
#define G_TT_NONE
Definition gbi.h:634
#define G_LIGHTING
Definition gbi.h:355
Gfx d_course_koopa_troopa_beach_dl_tree_top3[]
Definition course_data.c:7943
Gfx d_course_koopa_troopa_beach_dl_tree_trunk2[]
Definition course_data.c:7869
Gfx d_course_koopa_troopa_beach_dl_tree_top2[]
Definition course_data.c:7836
Gfx d_course_koopa_troopa_beach_dl_tree_trunk1[]
Definition course_data.c:7762
Gfx d_course_koopa_troopa_beach_dl_tree_trunk3[]
Definition course_data.c:7976
Gfx d_course_koopa_troopa_beach_dl_tree_top1[]
Definition course_data.c:7729
#define UNUSED
Definition macros.h:23
Gfx * gDisplayListHead
Definition main.c:132
f32 gCameraZoom[4]
Definition main.c:122
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
void render_actor_palm_tree(Camera *arg0, UNUSED Mat4 arg1, struct PalmTree *arg2)
Renders the palm tree actor. Actor used in Koopa Troopa Beach.
Definition render.inc.c:13
Definition camera.h:26
Vec3s rot
Definition camera.h:33
Vec3f pos
Definition camera.h:27
Definition actor_types.h:274
Vec3s rot
Definition actor_types.h:281
s16 variant
Definition actor_types.h:277
s16 flags
Definition actor_types.h:276
Vec3f pos
Definition actor_types.h:283
signed short int s16
Definition ultratypes.h:13
float f32
Definition ultratypes.h:34