mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 11:24:40 +00:00
Introduce OPEN_DISPS/CLOSE_DISPS macros (#360)
This commit is contained in:
parent
1f1b5e39f5
commit
2a2fdf7f3e
134 changed files with 3133 additions and 3775 deletions
|
@ -12,33 +12,32 @@ void Sample_HandleStateChange(SampleContext* this) {
|
|||
void Sample_Draw(SampleContext* this) {
|
||||
GraphicsContext* gfxCtx = this->state.gfxCtx;
|
||||
View* view = &this->view;
|
||||
Gfx* dispRefs[5];
|
||||
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../z_sample.c", 62);
|
||||
OPEN_DISPS(gfxCtx, "../z_sample.c", 62);
|
||||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x01, this->staticSegment);
|
||||
gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL);
|
||||
gSPSegment(oGfxCtx->polyOpa.p++, 0x01, this->staticSegment);
|
||||
|
||||
func_80095248(gfxCtx, 0, 0, 0);
|
||||
|
||||
view->flags = 1 | 2 | 4;
|
||||
func_800AAA50(view, 15);
|
||||
|
||||
if (1) {
|
||||
{
|
||||
Mtx* mtx = Graph_Alloc(gfxCtx, sizeof(Mtx));
|
||||
guPosition(mtx, SREG(37), SREG(38), SREG(39), 1.0f, SREG(40), SREG(41), SREG(42));
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD);
|
||||
gSPMatrix(oGfxCtx->polyOpa.p++, mtx, G_MTX_LOAD);
|
||||
}
|
||||
|
||||
gfxCtx->polyOpa.p = Gfx_SetFog2(gfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0);
|
||||
oGfxCtx->polyOpa.p = Gfx_SetFog2(oGfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0);
|
||||
func_80093D18(gfxCtx);
|
||||
|
||||
gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gDPSetCombineMode(gfxCtx->polyOpa.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 0, 0);
|
||||
gDPSetCycleType(oGfxCtx->polyOpa.p++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(oGfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gDPSetCombineMode(oGfxCtx->polyOpa.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetPrimColor(oGfxCtx->polyOpa.p++, 0, 0, 255, 255, 0, 0);
|
||||
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_sample.c", 111);
|
||||
CLOSE_DISPS(gfxCtx, "../z_sample.c", 111);
|
||||
}
|
||||
|
||||
void Sample_Main(SampleContext* this) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue