Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Data Structures | Macros | Functions | Variables
moving_texture.c File Reference
#include <ultra64.h>
#include "sm64.h"
#include "moving_texture.h"
#include "area.h"
#include "camera.h"
#include "rendering_graph_node.h"
#include "engine/math_util.h"
#include "memory.h"
#include "save_file.h"
#include "segment2.h"
#include "engine/surface_collision.h"
#include "geo_misc.h"
#include "room.h"

Data Structures

struct  MovtexObject
 An object containing all info for a mesh with moving textures. More...
 
struct  MovtexQuad
 Represents a single flat quad with a rotating texture Stores x and z for 4 vertices, though it is often just a rectangle. More...
 
struct  MovtexQuadCollection
 Contains an id and an array of MovtexQuad structs. More...
 

Macros

#define MOVTEX_ATTR_SPEED   0
 This file contains functions for generating display lists with moving textures (abbreviated movtex). More...
 
#define MOVTEX_LAYOUT_NOCOLOR   0
 
#define MOVTEX_LAYOUT_COLORED   1
 
#define MOVTEX_ATTR_X   1
 
#define MOVTEX_ATTR_Y   2
 
#define MOVTEX_ATTR_Z   3
 
#define MOVTEX_ATTR_NOCOLOR_S   4
 
#define MOVTEX_ATTR_NOCOLOR_T   5
 
#define MOVTEX_ATTR_COLORED_R   4
 
#define MOVTEX_ATTR_COLORED_G   5
 
#define MOVTEX_ATTR_COLORED_B   6
 
#define MOVTEX_ATTR_COLORED_S   7
 
#define MOVTEX_ATTR_COLORED_T   8
 
#define MOVTEX_VTX_COLOR_DEFAULT   0
 
#define MOVTEX_VTX_COLOR_YELLOW   1
 
#define MOVTEX_VTX_COLOR_RED   2
 

Functions

Gfxgeo_wdw_set_initial_water_level (s32 callContext, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4])
 Sets the initial water level in Wet-Dry World based on how high Mario jumped into the painting. More...
 
Gfxgeo_movtex_pause_control (s32 callContext, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4])
 Update moving texture counters that determine when to update the coordinates. More...
 
void movtex_make_quad_vertex (Vtx *verts, s32 index, s16 x, s16 y, s16 z, s16 rot, s16 rotOffset, f32 scale, u8 alpha)
 Make a vertex that's part of a quad with rotating texture. More...
 
Gfxmovtex_gen_from_quad (s16 y, struct MovtexQuad *quad)
 Generates and returns a display list for a single MovtexQuad at height y. More...
 
Gfxmovtex_gen_from_quad_array (s16 y, void *quadArrSegmented)
 Generate a display list drawing an array of MoxtexQuad at height 'y'. More...
 
Gfxmovtex_gen_quads_id (s16 id, s16 y, void *movetexQuadsSegmented)
 Generate the display list for a list of quads by searching through a collection for a given id. More...
 
voidget_quad_collection_from_id (u32 id)
 Find the quadCollection for a given quad collection id. More...
 
void movtex_change_texture_format (u32 quadCollectionId, Gfx **gfx)
 Write to 'gfx' a command to set the current texture format for the given quadCollection. More...
 
Gfxgeo_movtex_draw_water_regions (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Geo script responsible for drawing quads with a moving texture at the height of the corresponding water region. More...
 
void update_moving_texture_offset (s16 *movtexVerts, s32 attr)
 Updates a movtex mesh by adding the movtex's speed to the horizontal or vertical texture coordinates depending on 'attr'. More...
 
void movtex_write_vertex_first (Vtx *vtx, s16 *movtexVerts, struct MovtexObject *c, s8 attrLayout)
 Make the first vertex of a moving texture with index 0. More...
 
void movtex_write_vertex_index (Vtx *verts, s32 index, s16 *movtexVerts, struct MovtexObject *d, s8 attrLayout)
 Make a vertex with index > 0. More...
 
Gfxmovtex_gen_list (s16 *movtexVerts, struct MovtexObject *movtexList, s8 attrLayout)
 Generate a displaylist for a MovtexObject. More...
 
Gfxgeo_movtex_draw_nocolor (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Function for a geo node that draws a MovtexObject in the gMovtexNonColored list. More...
 
Gfxgeo_movtex_draw_colored (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Function for a geo node that draws a MovtexObject in the gMovtexColored list. More...
 
Gfxgeo_movtex_draw_colored_no_update (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Function for a geo node that draws a MovtexObject in the gMovtexColored list, but it doesn't call update_moving_texture_offset since that happens in geo_movtex_update_horizontal. More...
 
Gfxgeo_movtex_draw_colored_2_no_update (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Exact copy of geo_movtex_draw_colored_no_update, but now using the gMovtexColored2 array. More...
 
Gfxgeo_movtex_update_horizontal (s32 callContext, struct GraphNode *node, UNUSED f32 mtx[4][4])
 Make textures move horizontally by simply adding a number to the 's' texture coordinate. More...
 

Variables

s16 gMovtexCounter = 1
 Counters to make textures move iff the game is not paused. More...
 
s16 gMovtexCounterPrev = 0
 
s8 gMovtexVtxColor = MOVTEX_VTX_COLOR_DEFAULT
 
float gPaintingMarioYEntry = 0.0f
 The height at which Mario entered the last painting. Used for Wet-Dry World only. More...
 
s32 gWdwWaterLevelSet = FALSE
 Variable to ensure the initial Wet-Dry World water level is set only once. More...
 
u8 ssl_quicksand []
 
u8 ssl_pyramid_sand []
 
u8 ttc_yellow_triangle []
 
u8gMovtexIdToTexture []
 An array for converting a movtex texture id to a pointer that can be passed to gDPSetTextureImage. More...
 
Gfx castle_grounds_dl_waterfall []
 
s16 castle_grounds_movtex_tris_waterfall []
 
s16 ssl_movtex_tris_pyramid_sand_pathway_front []
 
Gfx ssl_dl_pyramid_sand_pathway_begin []
 
Gfx ssl_dl_pyramid_sand_pathway_end []
 
Gfx ssl_dl_pyramid_sand_pathway_front_end []
 
s16 ssl_movtex_tris_pyramid_sand_pathway_floor []
 
Gfx ssl_dl_pyramid_sand_pathway_floor_begin []
 
Gfx ssl_dl_pyramid_sand_pathway_floor_end []
 
s16 ssl_movtex_tris_pyramid_sand_pathway_side []
 
Gfx ssl_dl_pyramid_sand_pathway_side_end []
 
s16 bitfs_movtex_tris_lava_first_section []
 
Gfx bitfs_dl_lava_sections []
 
s16 bitfs_movtex_tris_lava_second_section []
 
s16 bitfs_movtex_tris_lava_floor []
 
Gfx bitfs_dl_lava_floor []
 
s16 lll_movtex_tris_lava_floor []
 
Gfx lll_dl_lava_floor []
 
s16 lll_movtex_tris_lavafall_volcano []
 
Gfx lll_dl_lavafall_volcano []
 
s16 cotmc_movtex_tris_water []
 
Gfx cotmc_dl_water_begin []
 
Gfx cotmc_dl_water_end []
 
Gfx cotmc_dl_water []
 
s16 ttm_movtex_tris_begin_waterfall []
 
Gfx ttm_dl_waterfall []
 
s16 ttm_movtex_tris_end_waterfall []
 
s16 ttm_movtex_tris_begin_puddle_waterfall []
 
Gfx ttm_dl_bottom_waterfall []
 
s16 ttm_movtex_tris_end_puddle_waterfall []
 
s16 ttm_movtex_tris_puddle_waterfall []
 
Gfx ttm_dl_puddle_waterfall []
 
s16 ssl_movtex_tris_pyramid_quicksand []
 
Gfx ssl_dl_quicksand_begin []
 
Gfx ssl_dl_quicksand_end []
 
Gfx ssl_dl_pyramid_quicksand []
 
s16 ssl_movtex_tris_pyramid_corners_quicksand []
 
Gfx ssl_dl_pyramid_corners_quicksand []
 
s16 ssl_movtex_tris_sides_quicksand []
 
Gfx ssl_dl_sides_quicksand []
 
s16 ttc_movtex_tris_big_surface_treadmill []
 
Gfx ttc_dl_surface_treadmill_begin []
 
Gfx ttc_dl_surface_treadmill_end []
 
Gfx ttc_dl_surface_treadmill []
 
s16 ttc_movtex_tris_small_surface_treadmill []
 
s16 ssl_movtex_tris_quicksand_pit []
 
Gfx ssl_dl_quicksand_pit_begin []
 
Gfx ssl_dl_quicksand_pit_end []
 
Gfx ssl_dl_quicksand_pit []
 
s16 ssl_movtex_tris_pyramid_quicksand_pit []
 
Gfx ssl_dl_pyramid_quicksand_pit_begin []
 
Gfx ssl_dl_pyramid_quicksand_pit_end []
 
struct MovtexObject gMovtexNonColored []
 MovtexObjects that have no color attributes per vertex (though the mesh as a whole can have a blend color). More...
 
struct MovtexObject gMovtexColored []
 MovtexObjects that have color attributes per vertex. More...
 
struct MovtexObject gMovtexColored2 []
 Treated identically to gMovtexColored. More...
 
s16 gMovetexLastTextureId
 Variable for a little optimization: only set the texture when it differs from the previous texture. More...
 
u8 bbh_movtex_merry_go_round_water_entrance []
 
u8 bbh_movtex_merry_go_round_water_side []
 
u8 ccm_movtex_penguin_puddle_water []
 
u8 inside_castle_movtex_green_room_water []
 
u8 inside_castle_movtex_moat_water []
 
u8 hmc_movtex_dorrie_pool_water []
 
u8 hmc_movtex_toxic_maze_mist []
 
u8 ssl_movtex_puddle_water []
 
u8 ssl_movtex_toxbox_quicksand_mist []
 
u8 sl_movtex_water []
 
u8 wdw_movtex_area1_water []
 
u8 wdw_movtex_area2_water []
 
u8 jrb_movtex_water []
 
u8 jrb_movtex_intial_mist []
 
u8 jrb_movtex_sinked_boat_water []
 
u8 thi_movtex_area1_water []
 
u8 thi_movtex_area2_water []
 
u8 castle_grounds_movtex_water []
 
u8 lll_movtex_volcano_floor_lava []
 
u8 ddd_movtex_area1_water []
 
u8 ddd_movtex_area2_water []
 
u8 wf_movtex_water []
 
u8 castle_courtyard_movtex_star_statue_water []
 
u8 ttm_movtex_puddle []
 

Macro Definition Documentation

◆ MOVTEX_ATTR_COLORED_B

#define MOVTEX_ATTR_COLORED_B   6

◆ MOVTEX_ATTR_COLORED_G

#define MOVTEX_ATTR_COLORED_G   5

◆ MOVTEX_ATTR_COLORED_R

#define MOVTEX_ATTR_COLORED_R   4

◆ MOVTEX_ATTR_COLORED_S

#define MOVTEX_ATTR_COLORED_S   7

◆ MOVTEX_ATTR_COLORED_T

#define MOVTEX_ATTR_COLORED_T   8

◆ MOVTEX_ATTR_NOCOLOR_S

#define MOVTEX_ATTR_NOCOLOR_S   4

◆ MOVTEX_ATTR_NOCOLOR_T

#define MOVTEX_ATTR_NOCOLOR_T   5

◆ MOVTEX_ATTR_SPEED

#define MOVTEX_ATTR_SPEED   0

This file contains functions for generating display lists with moving textures (abbreviated movtex).

This is used for water, sand, haze, mist and treadmills. Each mesh using this system has the animated vertices stored as an array of shorts. The first entry is the texture movement speed. After that the vertices are stored in one of two layouts: one without per-vertex color attributes and one with. [speed, v0(x,y,z, s,t) , v1(x,y,z, s,t) , ...] [speed, v0(x,y,z, r,g,b s,t), v1(x,y,z, r,g,b s,t), ...] x, y, z = vertex position as integers s, t = texture coordinatea as 6.10 fixed point number. That means coordinates in range [0, 1024] are a unique part of the image, after that it repeats the image.

The first vertex 'v0' is special because all subsequent vertices inherit its texture offset. So to animate e.g. a treadmill, the speed component arr[0] is simply added to the s component arr[7] every frame and the texture scrolls horizontally over the entire mesh without changing the rest of the array. Note that while the system allows many kinds of vertex animations, in practice the only animation used is horizontally scrolling textures.

After updating the base mesh, the vertices are converted to the format the RSP understands and a display list is generated. The RSP can buffer 16 vertices at a time, and this code assumes everything fits in one buffer, so every moving texture mesh must have at most 16 vertices. As a result some meshes are split up into multiple parts, like the sand pathway inside the pyramid which has 3 parts. The water stream in the Cavern of the Metal Cap fits in one mesh.

Apart from this general system, there is also a simpler system for flat quads with a rotating texture. This is often used for water, but also for mist, toxic haze and lava inside the volcano. One quad is described by the struct MovtexQuad, and multiple MovtexQuads form a MovtexQuadCollection. A geo node has an id that corresponds to the id of a certain MovtexQuadCollection, which will then be matched with the id of entries in gEnvironmentRegions to get the y-position. The x and z coordinates are stored in the MovtexQuads themself, so the water rectangle is separate from the actually drawn rectangle.

◆ MOVTEX_ATTR_X

#define MOVTEX_ATTR_X   1

◆ MOVTEX_ATTR_Y

#define MOVTEX_ATTR_Y   2

◆ MOVTEX_ATTR_Z

#define MOVTEX_ATTR_Z   3

◆ MOVTEX_LAYOUT_COLORED

#define MOVTEX_LAYOUT_COLORED   1

◆ MOVTEX_LAYOUT_NOCOLOR

#define MOVTEX_LAYOUT_NOCOLOR   0

◆ MOVTEX_VTX_COLOR_DEFAULT

#define MOVTEX_VTX_COLOR_DEFAULT   0

◆ MOVTEX_VTX_COLOR_RED

#define MOVTEX_VTX_COLOR_RED   2

◆ MOVTEX_VTX_COLOR_YELLOW

#define MOVTEX_VTX_COLOR_YELLOW   1

Function Documentation

◆ geo_movtex_draw_colored()

Gfx* geo_movtex_draw_colored ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Function for a geo node that draws a MovtexObject in the gMovtexColored list.

◆ geo_movtex_draw_colored_2_no_update()

Gfx* geo_movtex_draw_colored_2_no_update ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Exact copy of geo_movtex_draw_colored_no_update, but now using the gMovtexColored2 array.

Used for the sand pits in SSL, both outside and inside the pyramid.

◆ geo_movtex_draw_colored_no_update()

Gfx* geo_movtex_draw_colored_no_update ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Function for a geo node that draws a MovtexObject in the gMovtexColored list, but it doesn't call update_moving_texture_offset since that happens in geo_movtex_update_horizontal.

This is for when a MovtexObject has multiple instances (like TTC treadmills) so you don't want the animation speed to increase the more instances there are.

◆ geo_movtex_draw_nocolor()

Gfx* geo_movtex_draw_nocolor ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Function for a geo node that draws a MovtexObject in the gMovtexNonColored list.

◆ geo_movtex_draw_water_regions()

Gfx* geo_movtex_draw_water_regions ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Geo script responsible for drawing quads with a moving texture at the height of the corresponding water region.

The node's parameter determines which quad collection is drawn, see moving_texture.h.

◆ geo_movtex_pause_control()

Gfx* geo_movtex_pause_control ( s32  callContext,
UNUSED struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Update moving texture counters that determine when to update the coordinates.

Textures update when gMovtexCounterPrev != gMovtexCounter. This ensures water / sand flow stops when the game pauses.

◆ geo_movtex_update_horizontal()

Gfx* geo_movtex_update_horizontal ( s32  callContext,
struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Make textures move horizontally by simply adding a number to the 's' texture coordinate.

Used for:

  • treadmills in Tick Tock Clock
  • sand pits outside and inside the pyramid in Shifting Sand Note that the drawing for these happen in different nodes with functions geo_movtex_draw_colored_no_update and geo_movtex_draw_colored_2_no_update. Usually the updating happens in the same function that draws it, but in these cases the same model has multiple instances, and you don't want the model to update multiple times. Note that the final TTC only has one big treadmill though.

◆ geo_wdw_set_initial_water_level()

Gfx* geo_wdw_set_initial_water_level ( s32  callContext,
UNUSED struct GraphNode node,
UNUSED f32  mtx[4][4] 
)

Sets the initial water level in Wet-Dry World based on how high Mario jumped into the painting.

◆ get_quad_collection_from_id()

void* get_quad_collection_from_id ( u32  id)

Find the quadCollection for a given quad collection id.

◆ movtex_change_texture_format()

void movtex_change_texture_format ( u32  quadCollectionId,
Gfx **  gfx 
)

Write to 'gfx' a command to set the current texture format for the given quadCollection.

◆ movtex_gen_from_quad()

Gfx* movtex_gen_from_quad ( s16  y,
struct MovtexQuad quad 
)

Generates and returns a display list for a single MovtexQuad at height y.

◆ movtex_gen_from_quad_array()

Gfx* movtex_gen_from_quad_array ( s16  y,
void quadArrSegmented 
)

Generate a display list drawing an array of MoxtexQuad at height 'y'.

y: y position of the quads quadArrSegmented: a segmented address to an array of s16. The first number is the number of entries, followed by that number of MovtexQuad structs.

◆ movtex_gen_list()

Gfx* movtex_gen_list ( s16 movtexVerts,
struct MovtexObject movtexList,
s8  attrLayout 
)

Generate a displaylist for a MovtexObject.

'attrLayout' is one of MOVTEX_LAYOUT_NOCOLOR and MOVTEX_LAYOUT_COLORED.

◆ movtex_gen_quads_id()

Gfx* movtex_gen_quads_id ( s16  id,
s16  y,
void movetexQuadsSegmented 
)

Generate the display list for a list of quads by searching through a collection for a given id.

id: id of quad array to generate a list for y: height at which the quads are drawn movetexQuadsSegmented: segmented address to the MovtexQuadCollection array that will be searched.

◆ movtex_make_quad_vertex()

void movtex_make_quad_vertex ( Vtx verts,
s32  index,
s16  x,
s16  y,
s16  z,
s16  rot,
s16  rotOffset,
f32  scale,
u8  alpha 
)

Make a vertex that's part of a quad with rotating texture.

verts: array of RSP vertices n: index in 'verts' where the vertex is written x, y, z: position rot: base rotation of the texture rotOffset: gets added to base rotation scale: how often the texture repeats, 1 = no repeat

◆ movtex_write_vertex_first()

void movtex_write_vertex_first ( Vtx vtx,
s16 movtexVerts,
struct MovtexObject c,
s8  attrLayout 
)

Make the first vertex of a moving texture with index 0.

This vertex is the base of all vertices with index > 0, which use this vertex's coordinates as base on which to apply offset. The first vertex has offset 0 by definition, simplifying the calculations a bit.

◆ movtex_write_vertex_index()

void movtex_write_vertex_index ( Vtx verts,
s32  index,
s16 movtexVerts,
struct MovtexObject d,
s8  attrLayout 
)

Make a vertex with index > 0.

The vertex with index 0 is made in movtex_write_vertex_first and subsequent vertices use vertex 0 as a base for their texture coordinates.

◆ update_moving_texture_offset()

void update_moving_texture_offset ( s16 movtexVerts,
s32  attr 
)

Updates a movtex mesh by adding the movtex's speed to the horizontal or vertical texture coordinates depending on 'attr'.

movtexVerts: vertices to update attr: which attribute to change

Variable Documentation

◆ bbh_movtex_merry_go_round_water_entrance

u8 bbh_movtex_merry_go_round_water_entrance[]

◆ bbh_movtex_merry_go_round_water_side

u8 bbh_movtex_merry_go_round_water_side[]

◆ bitfs_dl_lava_floor

Gfx bitfs_dl_lava_floor[]

◆ bitfs_dl_lava_sections

Gfx bitfs_dl_lava_sections[]

◆ bitfs_movtex_tris_lava_first_section

s16 bitfs_movtex_tris_lava_first_section[]

◆ bitfs_movtex_tris_lava_floor

s16 bitfs_movtex_tris_lava_floor[]

◆ bitfs_movtex_tris_lava_second_section

s16 bitfs_movtex_tris_lava_second_section[]

◆ castle_courtyard_movtex_star_statue_water

u8 castle_courtyard_movtex_star_statue_water[]

◆ castle_grounds_dl_waterfall

Gfx castle_grounds_dl_waterfall[]

◆ castle_grounds_movtex_tris_waterfall

s16 castle_grounds_movtex_tris_waterfall[]

◆ castle_grounds_movtex_water

u8 castle_grounds_movtex_water[]

◆ ccm_movtex_penguin_puddle_water

u8 ccm_movtex_penguin_puddle_water[]

◆ cotmc_dl_water

Gfx cotmc_dl_water[]

◆ cotmc_dl_water_begin

Gfx cotmc_dl_water_begin[]

◆ cotmc_dl_water_end

Gfx cotmc_dl_water_end[]

◆ cotmc_movtex_tris_water

s16 cotmc_movtex_tris_water[]

◆ ddd_movtex_area1_water

u8 ddd_movtex_area1_water[]

◆ ddd_movtex_area2_water

u8 ddd_movtex_area2_water[]

◆ gMovetexLastTextureId

s16 gMovetexLastTextureId

Variable for a little optimization: only set the texture when it differs from the previous texture.

◆ gMovtexColored

struct MovtexObject gMovtexColored[]
Initial value:
= {
0xff, LAYER_OPAQUE },
LAYER_OPAQUE },
0xff, 0xff, 0xff, LAYER_OPAQUE },
0xff, 0xff, 0xff, LAYER_OPAQUE },
{ 0x00000000, 0x00000000, 0, NULL, NULL, NULL, NULL, 0x00, 0x00, 0x00, 0x00, 0x00000000 },
}
s16 ttc_movtex_tris_big_surface_treadmill[]
Gfx ttc_dl_surface_treadmill[]
Gfx ssl_dl_sides_quicksand[]
#define MOVTEX_TREADMILL_SMALL
Definition: moving_texture.h:99
#define MOVTEX_SSL_PYRAMID_SIDE
Definition: moving_texture.h:91
Gfx ssl_dl_pyramid_corners_quicksand[]
Gfx ssl_dl_quicksand_end[]
#define MOVTEX_SSL_PYRAMID_CORNER
Definition: moving_texture.h:92
#define MOVTEX_TREADMILL_BIG
Definition: moving_texture.h:98
Gfx ssl_dl_quicksand_begin[]
Gfx ssl_dl_pyramid_quicksand[]
s16 ttc_movtex_tris_small_surface_treadmill[]
s16 ssl_movtex_tris_pyramid_quicksand[]
Gfx ttc_dl_surface_treadmill_begin[]
s16 ssl_movtex_tris_pyramid_corners_quicksand[]
Definition: moving_texture.h:19
s16 ssl_movtex_tris_sides_quicksand[]
#define NULL
Definition: mbi.h:101
Definition: moving_texture.h:17
Gfx ttc_dl_surface_treadmill_end[]
#define MOVTEX_SSL_COURSE_EDGE
Definition: moving_texture.h:93
#define LAYER_OPAQUE
Definition: sm64.h:44

MovtexObjects that have color attributes per vertex.

◆ gMovtexColored2

struct MovtexObject gMovtexColored2[]
Initial value:
= {
0xff, LAYER_OPAQUE },
0xff, 0xff, 0xff, LAYER_OPAQUE },
{ 0x00000000, 0x00000000, 0, NULL, NULL, NULL, NULL, 0x00, 0x00, 0x00, 0x00, 0x00000000 },
}
s16 ssl_movtex_tris_quicksand_pit[]
Gfx ssl_dl_quicksand_pit_begin[]
#define MOVTEX_SSL_SAND_PIT_OUTSIDE
Definition: moving_texture.h:96
s16 ssl_movtex_tris_pyramid_quicksand_pit[]
#define MOVTEX_SSL_SAND_PIT_PYRAMID
Definition: moving_texture.h:97
Gfx ssl_dl_pyramid_quicksand_pit_end[]
Gfx ssl_dl_quicksand_pit_end[]
Definition: moving_texture.h:18
Gfx ssl_dl_quicksand_pit[]
Gfx ssl_dl_pyramid_quicksand_pit_begin[]
#define NULL
Definition: mbi.h:101
Definition: moving_texture.h:17
#define LAYER_OPAQUE
Definition: sm64.h:44

Treated identically to gMovtexColored.

◆ gMovtexCounter

s16 gMovtexCounter = 1

Counters to make textures move iff the game is not paused.

◆ gMovtexCounterPrev

s16 gMovtexCounterPrev = 0

◆ gMovtexIdToTexture

u8* gMovtexIdToTexture[]
Initial value:
u8 texture_waterbox_unknown_water[]
u8 texture_waterbox_mist[]
u8 ssl_pyramid_sand[]
u8 texture_waterbox_lava[]
u8 ssl_quicksand[]
u8 texture_waterbox_water[]
u8 texture_waterbox_jrb_water[]
u8 ttc_yellow_triangle[]

An array for converting a movtex texture id to a pointer that can be passed to gDPSetTextureImage.

◆ gMovtexNonColored

struct MovtexObject gMovtexNonColored[]

MovtexObjects that have no color attributes per vertex (though the mesh as a whole can have a blend color).

◆ gMovtexVtxColor

s8 gMovtexVtxColor = MOVTEX_VTX_COLOR_DEFAULT

◆ gPaintingMarioYEntry

float gPaintingMarioYEntry = 0.0f

The height at which Mario entered the last painting. Used for Wet-Dry World only.

◆ gWdwWaterLevelSet

s32 gWdwWaterLevelSet = FALSE

Variable to ensure the initial Wet-Dry World water level is set only once.

◆ hmc_movtex_dorrie_pool_water

u8 hmc_movtex_dorrie_pool_water[]

◆ hmc_movtex_toxic_maze_mist

u8 hmc_movtex_toxic_maze_mist[]

◆ inside_castle_movtex_green_room_water

u8 inside_castle_movtex_green_room_water[]

◆ inside_castle_movtex_moat_water

u8 inside_castle_movtex_moat_water[]

◆ jrb_movtex_intial_mist

u8 jrb_movtex_intial_mist[]

◆ jrb_movtex_sinked_boat_water

u8 jrb_movtex_sinked_boat_water[]

◆ jrb_movtex_water

u8 jrb_movtex_water[]

◆ lll_dl_lava_floor

Gfx lll_dl_lava_floor[]

◆ lll_dl_lavafall_volcano

Gfx lll_dl_lavafall_volcano[]

◆ lll_movtex_tris_lava_floor

s16 lll_movtex_tris_lava_floor[]

◆ lll_movtex_tris_lavafall_volcano

s16 lll_movtex_tris_lavafall_volcano[]

◆ lll_movtex_volcano_floor_lava

u8 lll_movtex_volcano_floor_lava[]

◆ sl_movtex_water

u8 sl_movtex_water[]

◆ ssl_dl_pyramid_corners_quicksand

Gfx ssl_dl_pyramid_corners_quicksand[]

◆ ssl_dl_pyramid_quicksand

Gfx ssl_dl_pyramid_quicksand[]

◆ ssl_dl_pyramid_quicksand_pit_begin

Gfx ssl_dl_pyramid_quicksand_pit_begin[]

◆ ssl_dl_pyramid_quicksand_pit_end

Gfx ssl_dl_pyramid_quicksand_pit_end[]

◆ ssl_dl_pyramid_sand_pathway_begin

Gfx ssl_dl_pyramid_sand_pathway_begin[]

◆ ssl_dl_pyramid_sand_pathway_end

Gfx ssl_dl_pyramid_sand_pathway_end[]

◆ ssl_dl_pyramid_sand_pathway_floor_begin

Gfx ssl_dl_pyramid_sand_pathway_floor_begin[]

◆ ssl_dl_pyramid_sand_pathway_floor_end

Gfx ssl_dl_pyramid_sand_pathway_floor_end[]

◆ ssl_dl_pyramid_sand_pathway_front_end

Gfx ssl_dl_pyramid_sand_pathway_front_end[]

◆ ssl_dl_pyramid_sand_pathway_side_end

Gfx ssl_dl_pyramid_sand_pathway_side_end[]

◆ ssl_dl_quicksand_begin

Gfx ssl_dl_quicksand_begin[]

◆ ssl_dl_quicksand_end

Gfx ssl_dl_quicksand_end[]

◆ ssl_dl_quicksand_pit

Gfx ssl_dl_quicksand_pit[]

◆ ssl_dl_quicksand_pit_begin

Gfx ssl_dl_quicksand_pit_begin[]

◆ ssl_dl_quicksand_pit_end

Gfx ssl_dl_quicksand_pit_end[]

◆ ssl_dl_sides_quicksand

Gfx ssl_dl_sides_quicksand[]

◆ ssl_movtex_puddle_water

u8 ssl_movtex_puddle_water[]

◆ ssl_movtex_toxbox_quicksand_mist

u8 ssl_movtex_toxbox_quicksand_mist[]

◆ ssl_movtex_tris_pyramid_corners_quicksand

s16 ssl_movtex_tris_pyramid_corners_quicksand[]

◆ ssl_movtex_tris_pyramid_quicksand

s16 ssl_movtex_tris_pyramid_quicksand[]

◆ ssl_movtex_tris_pyramid_quicksand_pit

s16 ssl_movtex_tris_pyramid_quicksand_pit[]

◆ ssl_movtex_tris_pyramid_sand_pathway_floor

s16 ssl_movtex_tris_pyramid_sand_pathway_floor[]

◆ ssl_movtex_tris_pyramid_sand_pathway_front

s16 ssl_movtex_tris_pyramid_sand_pathway_front[]

◆ ssl_movtex_tris_pyramid_sand_pathway_side

s16 ssl_movtex_tris_pyramid_sand_pathway_side[]

◆ ssl_movtex_tris_quicksand_pit

s16 ssl_movtex_tris_quicksand_pit[]

◆ ssl_movtex_tris_sides_quicksand

s16 ssl_movtex_tris_sides_quicksand[]

◆ ssl_pyramid_sand

u8 ssl_pyramid_sand[]

◆ ssl_quicksand

u8 ssl_quicksand[]

◆ thi_movtex_area1_water

u8 thi_movtex_area1_water[]

◆ thi_movtex_area2_water

u8 thi_movtex_area2_water[]

◆ ttc_dl_surface_treadmill

Gfx ttc_dl_surface_treadmill[]

◆ ttc_dl_surface_treadmill_begin

Gfx ttc_dl_surface_treadmill_begin[]

◆ ttc_dl_surface_treadmill_end

Gfx ttc_dl_surface_treadmill_end[]

◆ ttc_movtex_tris_big_surface_treadmill

s16 ttc_movtex_tris_big_surface_treadmill[]

◆ ttc_movtex_tris_small_surface_treadmill

s16 ttc_movtex_tris_small_surface_treadmill[]

◆ ttc_yellow_triangle

u8 ttc_yellow_triangle[]

◆ ttm_dl_bottom_waterfall

Gfx ttm_dl_bottom_waterfall[]

◆ ttm_dl_puddle_waterfall

Gfx ttm_dl_puddle_waterfall[]

◆ ttm_dl_waterfall

Gfx ttm_dl_waterfall[]

◆ ttm_movtex_puddle

u8 ttm_movtex_puddle[]

◆ ttm_movtex_tris_begin_puddle_waterfall

s16 ttm_movtex_tris_begin_puddle_waterfall[]

◆ ttm_movtex_tris_begin_waterfall

s16 ttm_movtex_tris_begin_waterfall[]

◆ ttm_movtex_tris_end_puddle_waterfall

s16 ttm_movtex_tris_end_puddle_waterfall[]

◆ ttm_movtex_tris_end_waterfall

s16 ttm_movtex_tris_end_waterfall[]

◆ ttm_movtex_tris_puddle_waterfall

s16 ttm_movtex_tris_puddle_waterfall[]

◆ wdw_movtex_area1_water

u8 wdw_movtex_area1_water[]

◆ wdw_movtex_area2_water

u8 wdw_movtex_area2_water[]

◆ wf_movtex_water

u8 wf_movtex_water[]