papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
curtains.c File Reference

Macros

#define UI_NO_CONTROLLER_SIZE   (ui_no_controller_png_width * ui_no_controller_png_height)
 

Functions

 INCLUDE_IMG ("theater/walls.png", theater_walls_png)
 
 INCLUDE_IMG ("theater/curtains.png", theater_curtains_png)
 
 INCLUDE_IMG ("theater/floor.png", theater_floor_png)
 
 INCLUDE_PAL ("theater/floor.pal", theater_floor_pal)
 
 INCLUDE_IMG ("ui/no_controller.png", ui_no_controller_png)
 
BSS UNK_FUN_PTR (gCurtainDrawCallback)
 
void initialize_curtains (void)
 
void update_curtains (void)
 
void render_curtains (void)
 
void set_curtain_scale_goal (f32 scale)
 
void set_curtain_scale (f32 scale)
 
void set_curtain_draw_callback (UNK_FUN_PTR(callback))
 
void set_curtain_fade_goal (f32 fade)
 
void set_curtain_fade (f32 fade)
 

Variables

Gfx D_800746E0 []
 
Gfx D_80075730 []
 
Gfx D_800758A0 []
 
Gfx TheaterWallShadowsGfx []
 
Gfx TheaterCurtainGfx []
 
Gfx TheaterInsetShadowsGfx []
 
Gfx TheaterFloorGfx []
 
Gfx TheaterRightWallGfx []
 
Gfx TheaterLeftWallGfx []
 
Gfx TheaterGfx []
 
Vp TheaterViewport
 
Gfx TheaterInitGfx []
 
Gfx NoControllerSetupTexGfx []
 
Gfx NoControllerGfx []
 
BSS f32 gCurtainScale
 
BSS f32 gCurtainScaleGoal
 
BSS f32 gCurtainFade
 
BSS f32 gCurtainFadeGoal
 
BSS Mtx D_8009BAA8 [2]
 

Macro Definition Documentation

◆ UI_NO_CONTROLLER_SIZE

#define UI_NO_CONTROLLER_SIZE   (ui_no_controller_png_width * ui_no_controller_png_height)

Referenced by render_curtains().

Function Documentation

◆ INCLUDE_IMG() [1/4]

INCLUDE_IMG ( "theater/curtains.png" ,
theater_curtains_png  )

◆ INCLUDE_IMG() [2/4]

INCLUDE_IMG ( "theater/floor.png" ,
theater_floor_png  )

◆ INCLUDE_IMG() [3/4]

INCLUDE_IMG ( "theater/walls.png" ,
theater_walls_png  )

◆ INCLUDE_IMG() [4/4]

INCLUDE_IMG ( "ui/no_controller.png" ,
ui_no_controller_png  )

◆ INCLUDE_PAL()

INCLUDE_PAL ( "theater/floor.pal" ,
theater_floor_pal  )

◆ initialize_curtains()

void initialize_curtains ( void )

◆ render_curtains()

void render_curtains ( void )

Referenced by gfx_draw_frame().

◆ set_curtain_draw_callback()

void set_curtain_draw_callback ( UNK_FUN_PTR(callback) )

◆ set_curtain_fade()

void set_curtain_fade ( f32 fade)

◆ set_curtain_fade_goal()

void set_curtain_fade_goal ( f32 fade)

◆ set_curtain_scale()

void set_curtain_scale ( f32 scale)

◆ set_curtain_scale_goal()

void set_curtain_scale_goal ( f32 scale)

◆ UNK_FUN_PTR()

BSS UNK_FUN_PTR ( gCurtainDrawCallback )

◆ update_curtains()

void update_curtains ( void )

Referenced by step_game_loop().

Variable Documentation

◆ D_800746E0

Gfx D_800746E0[]
Initial value:
= {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock_4b(theater_walls_png, G_IM_FMT_I, 16, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_CLAMP, 4, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList(),
}

◆ D_80075730

Gfx D_80075730[]
Initial value:
= {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(theater_curtains_png, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 32, 0, G_TX_MIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList(),
}

◆ D_800758A0

Gfx D_800758A0[]
Initial value:
= {
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPLoadTLUT_pal16(0, theater_floor_pal),
gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock_4b(theater_floor_png, G_IM_FMT_CI, 32, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR |
G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList(),
}

◆ D_8009BAA8

BSS Mtx D_8009BAA8[2]

Referenced by render_curtains().

◆ gCurtainFade

BSS f32 gCurtainFade

◆ gCurtainFadeGoal

◆ gCurtainScale

BSS f32 gCurtainScale

◆ gCurtainScaleGoal

◆ NoControllerGfx

Gfx NoControllerGfx[]
Initial value:
= {
gsSPTextureRectangle(0x0180, 0x0260, 0x0380, 0x02E0, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400),
gsDPPipeSync(),
gsSPEndDisplayList(),
}

Referenced by render_curtains().

◆ NoControllerSetupTexGfx

Gfx NoControllerSetupTexGfx[]
Initial value:
= {
gsDPPipeSync(),
gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureFilter(G_TF_POINT),
gsDPSetTextureConvert(G_TC_FILT),
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM),
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
gsDPSetTextureLUT(G_TT_NONE),
gsDPLoadTextureTile(ui_no_controller_png, G_IM_FMT_IA, G_IM_SIZ_8b, ui_no_controller_png_width,
ui_no_controller_png_height, 0, 0, ui_no_controller_png_width - 1,
ui_no_controller_png_height - 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 7,
5, G_TX_NOLOD, G_TX_NOLOD),
gsSPClearGeometryMode(G_CULL_BOTH | G_LIGHTING),
gsSPSetGeometryMode(G_SHADE | G_SHADING_SMOOTH),
gsSPEndDisplayList(),
}

Referenced by render_curtains().

◆ TheaterCurtainGfx

Gfx TheaterCurtainGfx[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(G_RM_PASS, G_RM_XLU_SURF2),
gsDPSetCombineMode(G_CC_MODULATEIDECALA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_80075730),
gsSPVertex(theater_curtain_vtx, 31, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
gsSP2Triangles(15, 16, 17, 0, 15, 17, 18, 0),
gsSP2Triangles(19, 20, 21, 0, 19, 21, 22, 0),
gsSP2Triangles(13, 23, 24, 0, 13, 24, 14, 0),
gsSP2Triangles(23, 25, 26, 0, 23, 26, 24, 0),
gsSP2Triangles(25, 27, 28, 0, 25, 28, 26, 0),
gsSP2Triangles(27, 29, 30, 0, 27, 30, 28, 0),
gsSPEndDisplayList(),
}
Gfx D_80075730[]
Definition curtains.c:23
#define PM_CC2_MULTIPLY_PRIM
Definition macros.h:316

◆ TheaterFloorGfx

Gfx TheaterFloorGfx[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_800746E0),
gsSPVertex(theater_floor_vtx, 25, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 0, 0, 4, 0, 3, 0),
gsSP2Triangles(1, 6, 7, 0, 1, 7, 2, 0),
gsSP2Triangles(3, 8, 9, 0, 3, 9, 10, 0),
gsSP2Triangles(11, 4, 3, 0, 11, 3, 10, 0),
gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
gsSP2Triangles(8, 12, 15, 0, 8, 15, 9, 0),
gsSP2Triangles(6, 16, 13, 0, 6, 13, 7, 0),
gsSP2Triangles(14, 17, 18, 0, 19, 14, 18, 0),
gsSP2Triangles(20, 11, 21, 0, 11, 22, 21, 0),
gsSP2Triangles(23, 19, 18, 0, 23, 18, 24, 0),
gsSP2Triangles(22, 23, 24, 0, 22, 24, 21, 0),
gsSPEndDisplayList(),
}
Gfx D_800746E0[]
Definition curtains.c:13

◆ TheaterGfx

Gfx TheaterGfx[]
Initial value:
={
gsSPDisplayList(TheaterFloorGfx),
gsSPDisplayList(TheaterLeftWallGfx),
gsSPDisplayList(TheaterRightWallGfx),
gsSPDisplayList(TheaterInsetShadowsGfx),
gsSPDisplayList(TheaterWallShadowsGfx),
gsSPDisplayList(TheaterCurtainGfx),
gsSPEndDisplayList(),
}
Gfx TheaterInsetShadowsGfx[]
Definition curtains.c:81
Gfx TheaterWallShadowsGfx[]
Definition curtains.c:51
Gfx TheaterRightWallGfx[]
Definition curtains.c:115
Gfx TheaterFloorGfx[]
Definition curtains.c:93
Gfx TheaterLeftWallGfx[]
Definition curtains.c:127
Gfx TheaterCurtainGfx[]
Definition curtains.c:62

Referenced by render_curtains().

◆ TheaterInitGfx

Gfx TheaterInitGfx[]
Initial value:
= {
gsSPViewport(&TheaterViewport),
gsDPSetCycleType(G_CYC_2CYCLE),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureConvert(G_TC_FILT),
gsDPSetCombineKey(G_CK_NONE),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 320, 240),
gsDPSetColorDither(G_CD_MAGICSQ),
gsDPSetAlphaDither(G_AD_PATTERN),
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH | G_CLIPPING | 0x0040F9FA),
gsSPSetGeometryMode(G_SHADE | G_SHADING_SMOOTH),
gsSPPerspNormalize(0x0014),
gsSPEndDisplayList(),
}
Vp TheaterViewport
Definition curtains.c:149

Referenced by render_curtains().

◆ TheaterInsetShadowsGfx

Gfx TheaterInsetShadowsGfx[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(G_RM_PASS, G_RM_XLU_SURF2),
gsDPSetCombineMode(G_CC_SHADE, PM_CC2_MULTIPLY_PRIM),
gsSPTexture(0x0080, 0x0080, 0, G_TX_RENDERTILE, G_OFF),
gsSPVertex(theater_left_inset_shadow_vtx, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPVertex(theater_right_inset_shadow_vtx, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
}

◆ TheaterLeftWallGfx

Gfx TheaterLeftWallGfx[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_800758A0),
gsSPVertex(theater_left_wall_vtx, 6, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0),
gsSPEndDisplayList(),
}
Gfx D_800758A0[]
Definition curtains.c:34

◆ TheaterRightWallGfx

Gfx TheaterRightWallGfx[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(CVG_DST_FULL | ZMODE_OPA | FORCE_BL | G_RM_PASS, CVG_DST_FULL | ZMODE_OPA | FORCE_BL |
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_800758A0),
gsSPVertex(theater_right_wall_vtx, 6, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0),
gsSPEndDisplayList(),
}

◆ TheaterViewport

Vp TheaterViewport
Initial value:
= {
{
{(SCREEN_WIDTH/2)*4, (SCREEN_HEIGHT/2)*4, 0x200 - 1, 0},
{(SCREEN_WIDTH/2)*4, (SCREEN_HEIGHT/2)*4, 0x200 - 1, 0},
}
}
#define SCREEN_WIDTH
Definition macros.h:116
#define SCREEN_HEIGHT
Definition macros.h:117

◆ TheaterWallShadowsGfx

Gfx TheaterWallShadowsGfx[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(G_RM_PASS, G_RM_CLD_SURF2),
gsDPSetCombineMode(G_CC_MODULATEIA, PM_CC2_MULTIPLY_PRIM),
gsSPDisplayList(D_80075730),
gsSPVertex(theater_wall_shadows_vtx, 8, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSPEndDisplayList(),
}