SpaghettiKart
Loading...
Searching...
No Matches
skybox_and_splitscreen.c File Reference
#include <libultraship.h>
#include <macros.h>
#include <libultra/gbi.h>
#include <mk64.h>
#include <stdio.h>
#include "skybox_and_splitscreen.h"
#include "code_800029B0.h"
#include <common_structs.h>
#include "memory.h"
#include "../camera.h"
#include <assets/models/common_data.h>
#include "render_player.h"
#include "code_80057C60.h"
#include "menu_items.h"
#include "actors.h"
#include "render_courses.h"
#include "math_util.h"
#include "main.h"
#include "menus.h"
#include "port/Engine.h"
#include "engine/Matrix.h"
#include "engine/tracks/Track.h"
#include "engine/editor/Editor.h"
#include "port/Game.h"
#include "port/interpolation/FrameInterpolation.h"
#include "engine/CoreMath.h"
Include dependency graph for skybox_and_splitscreen.c:

Functions

void race_set_viewport (ScreenContext *arg0)
 
UNUSED void func_802A38AC (void)
 
void func_802A38B4 (void)
 
void func_802A39E0 (ScreenContext *arg0)
 
void init_z_buffer (void)
 
void init_rdp (void)
 
UNUSED void func_802A40A4 (void)
 
UNUSED void func_802A40AC (void)
 
UNUSED void func_802A40B4 (void)
 
UNUSED void func_802A40BC (void)
 
UNUSED void func_802A40C4 (void)
 
UNUSED void func_802A40CC (void)
 
UNUSED void func_802A40D4 (void)
 
UNUSED void func_802A40DC (void)
 
UNUSED s32 set_viewport2 (void)
 
void set_viewport (void)
 
void select_framebuffer (void)
 
void func_802A4300 (void)
 
void func_802A450C (Vtx *skybox)
 
void func_802A487C (Vtx *arg0)
 
void func_802A4A0C (Vtx *vtx, ScreenContext *screen)
 
void func_802A4D18 (void)
 
void func_802A4EF4 (void)
 
void race_begin_viewport (ScreenContext *screen, s32 mode)
 
void race_blank_viewport (ScreenContext *screen)
 
void race_begin_viewport_4p (ScreenContext *screen)
 
void render_screens (ScreenContext *screen, s32 mode, s32 someId, s32 playerId)
 
void set_screen (void)
 
void set_editor_screen (void)
 
void copy_framebuffer (s32 arg0, s32 arg1, s32 width, s32 height, u16 *source, u16 *target)
 
void func_802A7728 (void)
 
void func_802A7940 (void)
 

Variables

Vp D_802B8880 []
 
Vtx D_802B8890 []
 
Vtx D_802B8910 []
 
Vtx D_802B8990 []
 
Vtx D_802B8A10 []
 
UNUSED Gfx D_802B8A90 []
 
Mtx gIdentityMatrix2
 

Function Documentation

◆ copy_framebuffer()

void copy_framebuffer ( s32 arg0,
s32 arg1,
s32 width,
s32 height,
u16 * source,
u16 * target )
Here is the caller graph for this function:

◆ func_802A38AC()

UNUSED void func_802A38AC ( void )

◆ func_802A38B4()

void func_802A38B4 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802A39E0()

void func_802A39E0 ( ScreenContext * arg0)
Here is the caller graph for this function:

◆ func_802A40A4()

UNUSED void func_802A40A4 ( void )

◆ func_802A40AC()

UNUSED void func_802A40AC ( void )

◆ func_802A40B4()

UNUSED void func_802A40B4 ( void )

◆ func_802A40BC()

UNUSED void func_802A40BC ( void )

◆ func_802A40C4()

UNUSED void func_802A40C4 ( void )

◆ func_802A40CC()

UNUSED void func_802A40CC ( void )

◆ func_802A40D4()

UNUSED void func_802A40D4 ( void )

◆ func_802A40DC()

UNUSED void func_802A40DC ( void )

◆ func_802A4300()

void func_802A4300 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802A450C()

void func_802A450C ( Vtx * skybox)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802A487C()

void func_802A487C ( Vtx * arg0)
Here is the call graph for this function:

◆ func_802A4A0C()

void func_802A4A0C ( Vtx * vtx,
ScreenContext * screen )
Here is the call graph for this function:

◆ func_802A4D18()

void func_802A4D18 ( void )
Here is the caller graph for this function:

◆ func_802A4EF4()

void func_802A4EF4 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802A7728()

void func_802A7728 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802A7940()

void func_802A7940 ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_rdp()

void init_rdp ( void )

Sets the initial RDP (Reality Display Processor) rendering settings.

Here is the caller graph for this function:

◆ init_z_buffer()

void init_z_buffer ( void )

Initialize the z-buffer for the current frame.

Here is the caller graph for this function:

◆ race_begin_viewport()

void race_begin_viewport ( ScreenContext * screen,
s32 mode )

Refactored function, a little wonky due to preserving the original logic.

The swapping of logic may be a required for proper draw order. Or, perhaps they slapped functions in differing orders for each screen on a wim.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ race_begin_viewport_4p()

void race_begin_viewport_4p ( ScreenContext * screen)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ race_blank_viewport()

void race_blank_viewport ( ScreenContext * screen)

Creates the blank screen for player four in three player mode

Here is the call graph for this function:
Here is the caller graph for this function:

◆ race_set_viewport()

void race_set_viewport ( ScreenContext * arg0)
Here is the caller graph for this function:

◆ render_screens()

void render_screens ( ScreenContext * screen,
s32 mode,
s32 someId,
s32 playerId )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_framebuffer()

void select_framebuffer ( void )

Tells the RDP which of the three framebuffers it shall draw to.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_editor_screen()

void set_editor_screen ( void )
Here is the caller graph for this function:

◆ set_screen()

void set_screen ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_viewport()

void set_viewport ( void )
Here is the caller graph for this function:

◆ set_viewport2()

UNUSED s32 set_viewport2 ( void )

Variable Documentation

◆ D_802B8880

Vp D_802B8880[]
Initial value:
= {
{ { { 640, 480, 511, 0 }, { 640, 480, 511, 0 } } },
}

◆ D_802B8890

Vtx D_802B8890[]
Initial value:
= {
{ { { SCREEN_WIDTH, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
{ { { SCREEN_WIDTH, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
}
#define SCREEN_WIDTH
Definition mk64.h:26
#define SCREEN_HEIGHT
Definition mk64.h:27

◆ D_802B8910

Vtx D_802B8910[]
Initial value:
= {
{ { { SCREEN_WIDTH, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
{ { { SCREEN_WIDTH, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
}

◆ D_802B8990

Vtx D_802B8990[]
Initial value:
= {
{ { { SCREEN_WIDTH, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
{ { { SCREEN_WIDTH, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
}

◆ D_802B8A10

Vtx D_802B8A10[]
Initial value:
= {
{ { { SCREEN_WIDTH, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x1E, 0x1E, 0xFF, 0xFF } } },
{ { { 0, SCREEN_HEIGHT, -1 }, 0, { 0, 0 }, { 0xC8, 0xC8, 0xFF, 0xFF } } },
{ { { SCREEN_WIDTH, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
{ { { SCREEN_WIDTH, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 0, -1 }, 0, { 0, 0 }, { 0x78, 0xFF, 0x78, 0xFF } } },
{ { { 0, 120, -1 }, 0, { 0, 0 }, { 0x00, 0xDC, 0x00, 0xFF } } },
}

◆ D_802B8A90

UNUSED Gfx D_802B8A90[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2),
gsDPSetCycleType(G_CYC_FILL),
gsDPSetFillColor(0x00000000),
gsDPFillRectangle(0, 0, 319, 239),
gsDPPipeSync(),
gsDPSetCycleType(G_CYC_1CYCLE),
gsSPEndDisplayList(),
}

◆ gIdentityMatrix2

Mtx gIdentityMatrix2
Initial value:
= {
toFixedPointMatrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0),
}
#define toFixedPointMatrix(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16)
Definition macros.h:89