mirror of
https://github.com/HarbourMasters/Starship
synced 2026-06-09 04:49:43 -04:00
c348962cab
* Sector Z Docs initial * Sector Z docs * some other things * correction * Space Junk * SectorZ_SetLevelObjects * rename assets with correct prefix * aSzBackgroundTex * details * pr review * Sector X initials * Meteo Initials * Sector X things I forgot * fox_tr360 & fox_ve1 & fox_so initials * fox_so details * Zones initials * More Zones initials * more zones initials * area 6 initials * fortuna inits * fortuna actors * some more docs * more docs for Fortuna * fix mistake in data incorrectly imported * Fortuna Radars * BossFO * Sector Y Initials * Venom 2 general Docs * Some Corneria Docs * Actor, Scenery and Boss IDs in update and draw functions of gObjectInfo * more docs and this usage * fox_360 this usage * more actor types and this usages * fox_effect type usage * training docs * some Sector X docs * fix incorrect usage of "this" * fix comment * more docs * funcNames * fox_bg spacing * boolean * scenery corneria bumbs * terrain bumps * corneria arch * more corneria objects * hitboxes * more corneria objects * more corneria level objects * more corneria objects * aCoWaterfallDL * corneria docs * more corneria docs * Granga swork start * corneria swork * Corneria * Corneria Granga docs * more granga docs * granga work buffer enum * CarrierParts enum use * option * Corneria Docs * GRANGA_FWK * fox_co.h header * fix Fault_FillRectangle typo * PR reviews * sCsTeamInitialPos * Doodad
48 lines
2.1 KiB
C
48 lines
2.1 KiB
C
#include "global.h"
|
|
|
|
void Graphics_NMIWipe(void) {
|
|
static s16 sWipeBarLength = 0;
|
|
s32 i;
|
|
|
|
gViewport->vp.vscale[0] = SCREEN_WIDTH * 2;
|
|
gViewport->vp.vscale[1] = SCREEN_HEIGHT * 2;
|
|
gViewport->vp.vscale[2] = G_MAXZ / 2;
|
|
gViewport->vp.vscale[3] = 0;
|
|
gViewport->vp.vtrans[0] = SCREEN_WIDTH * 2;
|
|
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * 2;
|
|
gViewport->vp.vtrans[2] = G_MAXZ / 2;
|
|
gViewport->vp.vtrans[3] = 0;
|
|
gSPViewport(gMasterDisp++, gViewport);
|
|
gDPPipeSync(gMasterDisp++);
|
|
gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN,
|
|
SCREEN_HEIGHT - SCREEN_MARGIN);
|
|
|
|
Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_MARGIN,
|
|
MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength) + SCREEN_MARGIN,
|
|
SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, 0, 0, 0, 255);
|
|
Graphics_FillRectangle(
|
|
&gMasterDisp, SCREEN_WIDTH - SCREEN_MARGIN - MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength),
|
|
SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2, 0, 0, 0, 255);
|
|
Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_HEIGHT / 2,
|
|
MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength) + SCREEN_MARGIN,
|
|
3 * SCREEN_HEIGHT / 4 - SCREEN_MARGIN / 2, 0, 0, 0, 255);
|
|
Graphics_FillRectangle(&gMasterDisp,
|
|
SCREEN_WIDTH - SCREEN_MARGIN - MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength),
|
|
3 * SCREEN_HEIGHT / 4 - SCREEN_MARGIN / 2, SCREEN_WIDTH - SCREEN_MARGIN,
|
|
SCREEN_HEIGHT - SCREEN_MARGIN, 0, 0, 0, 255);
|
|
if (sWipeBarLength == 0) {
|
|
AudioThread_PreNMIReset();
|
|
}
|
|
|
|
sWipeBarLength += SCREEN_WIDTH / 7;
|
|
if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing?
|
|
osViBlack(true);
|
|
gStopTasks = true;
|
|
}
|
|
|
|
for (i = 0; i < MAXCONTROLLERS; i++) {
|
|
gControllerRumbleEnabled[i] = 0;
|
|
gControllerRumbleFlags[i] = 0;
|
|
}
|
|
}
|