Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
envfx_snow.h
Go to the documentation of this file.
1 #ifndef ENVFX_SNOW_H
2 #define ENVFX_SNOW_H
3 
4 #include <ultra64.h>
5 #include "types.h"
6 
7 #define ENVFX_MODE_NONE 0 // no effects
8 #define ENVFX_SNOW_NORMAL 1 // CCM, SL
9 #define ENVFX_SNOW_WATER 2 // Secret Aquarium, Sunken Ship
10 #define ENVFX_SNOW_BLIZZARD 3 // unused
11 
12 #define ENVFX_BUBBLE_START 10 // Separates snow effects and flower/bubble effects
13 
14 #define ENVFX_FLOWERS 11 // unused
15 #define ENVFX_LAVA_BUBBLES 12 // LLL, BitFS, Bowser 2
16 #define ENVFX_WHIRLPOOL_BUBBLES 13 // DDD
17 #define ENVFX_JETSTREAM_BUBBLES 14 // JRB, DDD (submarine area)
18 
19 struct EnvFxParticle {
21  //s8 filler01;
22  s16 animFrame; // lava bubbles and flowers have frame animations
26  s32 angleAndDist[2]; // for whirpools, [0] = angle from center, [1] = distance from center
27  s32 unusedBubbleVar; // set to zero for bubbles when respawning, never used elsewhere
28  s32 bubbleY; // for Bubbles, yPos is always set to this
29  s8 filler20[56 - 0x20];
30 };
31 
32 extern s8 gEnvFxMode;
33 extern UNUSED s32 D_80330644;
37 
38 extern struct EnvFxParticle *gEnvFxBuffer;
40 extern s16 gSnowParticleCount;
42 
43 Gfx *envfx_update_particles(s32 snowMode, Vec3s marioPos, Vec3s camTo, Vec3s camFrom);
44 void orbit_from_positions(Vec3s from, Vec3s to, s16 *radius, s16 *pitch, s16 *yaw);
45 void rotate_triangle_vertices(Vec3s vertex1, Vec3s vertex2, Vec3s vertex3, s16 pitch, s16 yaw);
46 
47 #endif // ENVFX_SNOW_H
struct SnowFlakeVertex gSnowFlakeVertex2
Definition: envfx_snow.c:49
signed char s8
Definition: ultratypes.h:11
s8 filler20[56 - 0x20]
Definition: envfx_snow.h:29
signed short int s16
Definition: ultratypes.h:13
Gfx * envfx_update_particles(s32 snowMode, Vec3s marioPos, Vec3s camTo, Vec3s camFrom)
Updates the environment effects (snow, flowers, bubbles) and returns a display list drawing them...
Definition: envfx_snow.c:451
s16 gSnowParticleMaxCount
Definition: envfx_snow.c:36
This file contains the function that handles &#39;environment effects&#39;, which are particle effects relate...
Definition: envfx_snow.c:27
Definition: gbi_old.h:59
s32 angleAndDist[2]
Definition: envfx_snow.h:26
s16 Vec3s[3]
Definition: types.h:24
void rotate_triangle_vertices(Vec3s vertex1, Vec3s vertex2, Vec3s vertex3, s16 pitch, s16 yaw)
Rotates the input vertices according to the give pitch and yaw.
Definition: envfx_snow.c:296
s8 isAlive
Definition: envfx_snow.h:20
UNUSED s32 D_80330644
Definition: envfx_snow.c:40
Definition: envfx_snow.h:19
void orbit_from_positions(Vec3s from, Vec3s to, s16 *radius, s16 *pitch, s16 *yaw)
Given two points, return the vector from one to the other represented as euler angles and a length...
Definition: envfx_snow.c:141
struct SnowFlakeVertex gSnowFlakeVertex3
Definition: envfx_snow.c:50
Vec3i gSnowCylinderLastPos
Definition: envfx_snow.c:34
s32 xPos
Definition: envfx_snow.h:23
s16 animFrame
Definition: envfx_snow.h:22
s32 Vec3i[3]
Definition: types.h:25
s32 yPos
Definition: envfx_snow.h:24
s8 gEnvFxMode
Definition: envfx_snow.c:39
s32 unusedBubbleVar
Definition: envfx_snow.h:27
struct SnowFlakeVertex gSnowFlakeVertex1
Definition: envfx_snow.c:48
s32 zPos
Definition: envfx_snow.h:25
s16 gSnowParticleCount
Definition: envfx_snow.c:35
#define UNUSED
Definition: macros.h:13
struct EnvFxParticle * gEnvFxBuffer
Definition: envfx_snow.c:33
signed int s32
Definition: ultratypes.h:15
s32 bubbleY
Definition: envfx_snow.h:28