Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Enumerations | Functions | Variables
shadow.h File Reference
#include <ultra64.h>
#include "types.h"

Go to the source code of this file.

Enumerations

enum  ShadowType {
  SHADOW_CIRCLE_9_VERTS = 0, SHADOW_CIRCLE_4_VERTS = 1, SHADOW_CIRCLE_4_VERTS_FLAT_UNUSED = 2, SHADOW_SQUARE_PERMANENT = 10,
  SHADOW_SQUARE_SCALABLE = 11, SHADOW_SQUARE_TOGGLABLE = 12, SHADOW_RECTANGLE_HARDCODED_OFFSET = 50, SHADOW_CIRCLE_PLAYER = 99
}
 Shadow types. More...
 

Functions

Gfxcreate_shadow_below_xyz (f32 xPos, f32 yPos, f32 zPos, s16 shadowScale, u8 shadowSolidity, s8 shadowType)
 Given the (x, y, z) location of an object, create a shadow below that object with the given initial solidity and "shadowType" (described above). More...
 

Variables

s8 sMarioOnFlyingCarpet
 Flag for if Mario is on a flying carpet. More...
 
s16 sSurfaceTypeBelowShadow
 The surface type below the current shadow. More...
 
s8 gShadowAboveWaterOrLava
 Flag for if the current shadow is above water or lava. More...
 
s8 gMarioOnIceOrCarpet
 Flag for if Mario is on ice or a flying carpet. More...
 

Enumeration Type Documentation

◆ ShadowType

enum ShadowType

Shadow types.

Shadows are circles, squares, or hardcoded rectangles, and can be composed of either 4 or 9 vertices.

Enumerator
SHADOW_CIRCLE_9_VERTS 
SHADOW_CIRCLE_4_VERTS 
SHADOW_CIRCLE_4_VERTS_FLAT_UNUSED 
SHADOW_SQUARE_PERMANENT 
SHADOW_SQUARE_SCALABLE 
SHADOW_SQUARE_TOGGLABLE 
SHADOW_RECTANGLE_HARDCODED_OFFSET 

This defines an offset after which rectangular shadows with custom widths and heights can be defined.

SHADOW_CIRCLE_PLAYER 

Function Documentation

◆ create_shadow_below_xyz()

Gfx* create_shadow_below_xyz ( f32  xPos,
f32  yPos,
f32  zPos,
s16  shadowScale,
u8  shadowSolidity,
s8  shadowType 
)

Given the (x, y, z) location of an object, create a shadow below that object with the given initial solidity and "shadowType" (described above).

Given the (x, y, z) location of an object, create a shadow below that object with the given initial solidity and "shadowType" (described above).

Return a pointer to the display list representing the shadow.

Variable Documentation

◆ gMarioOnIceOrCarpet

s8 gMarioOnIceOrCarpet

Flag for if Mario is on ice or a flying carpet.

◆ gShadowAboveWaterOrLava

s8 gShadowAboveWaterOrLava

Flag for if the current shadow is above water or lava.

◆ sMarioOnFlyingCarpet

s8 sMarioOnFlyingCarpet

Flag for if Mario is on a flying carpet.

◆ sSurfaceTypeBelowShadow

s16 sSurfaceTypeBelowShadow

The surface type below the current shadow.