mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 03:14:38 +00:00
Decompile KaleidoScope_Draw (#189)
* Decompile KaleidoScope_Draw * Naming * Simplify (casts) * Cleanup (comments) * Delete the .s file
This commit is contained in:
parent
93e8dbcc9e
commit
09d8cc529a
4 changed files with 68 additions and 160 deletions
|
@ -1,3 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
/*
|
||||
* File: z_kaleido_scope.c
|
||||
* Overlay: ovl_kaleido_scope
|
||||
|
@ -76,7 +79,52 @@
|
|||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_kaleido_scope/func_80825C14.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_kaleido_scope/KaleidoScope_Draw.s")
|
||||
extern const char D_8082FD78[], D_8082FD94[];
|
||||
|
||||
void KaleidoScope_Draw(GlobalContext* globalCtx) {
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
PauseContext* pauseCtx = &globalCtx->pauseCtx;
|
||||
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, D_8082FD78, 3188);
|
||||
|
||||
pauseCtx->inputX = input->rel.in.x;
|
||||
pauseCtx->inputY = input->rel.in.y;
|
||||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x02, interfaceCtx->parameterSegment);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x07, pauseCtx->unk_13C);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, pauseCtx->unk_128);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x09, pauseCtx->unk_12C);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0A, pauseCtx->unk_138);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0C, pauseCtx->unk_130);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0D, pauseCtx->unk_134);
|
||||
|
||||
if (pauseCtx->flag == 0) {
|
||||
func_80823994(pauseCtx, pauseCtx->unk_1D8.x, pauseCtx->unk_1D8.y, pauseCtx->unk_1D8.z);
|
||||
func_800949A8(globalCtx->state.gfxCtx);
|
||||
func_8082409C(globalCtx, globalCtx->state.gfxCtx);
|
||||
func_80820434(globalCtx, globalCtx->state.gfxCtx);
|
||||
func_800949A8(globalCtx->state.gfxCtx);
|
||||
|
||||
gDPSetCombineLERP(gfxCtx->polyOpa.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
func_80823994(pauseCtx, 0.0f, 0.0f, 64.0f);
|
||||
if (pauseCtx->state < 8 || 17 < pauseCtx->state) {
|
||||
func_80821C10(globalCtx);
|
||||
}
|
||||
}
|
||||
if (pauseCtx->state > 10 && pauseCtx->state <= 17) {
|
||||
func_80825C14(globalCtx);
|
||||
}
|
||||
if (pauseCtx->flag == 1 || pauseCtx->flag == 2) {
|
||||
func_808161AC(globalCtx);
|
||||
}
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, D_8082FD94, 3254);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_kaleido_scope/func_8082650C.s")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue