-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document gfxalloc.c #2153
base: main
Are you sure you want to change the base?
Document gfxalloc.c #2153
Changes from 2 commits
bb0bb13
3e5585c
74ebde2
ff7e92d
7db9570
4c40183
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1157,11 +1157,11 @@ void Play_Draw(PlayState* this) { | |
gSPSegment(POLY_OPA_DISP++, 0x01, this->billboardMtx); | ||
|
||
if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_COVER_ELEMENTS) { | ||
Gfx* gfxP; | ||
Gfx* sp1CC = POLY_OPA_DISP; | ||
Gfx* tempGfxDisp; | ||
Gfx* lockedGfxDisp; | ||
|
||
gfxP = Gfx_Open(sp1CC); | ||
gSPDisplayList(OVERLAY_DISP++, gfxP); | ||
tempGfxDisp = Gfx_Open(lockedGfxDisp = POLY_OPA_DISP); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not convinced by the temp/locked naming scheme (nor "disp") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
gSPDisplayList(OVERLAY_DISP++, tempGfxDisp); | ||
|
||
if ((this->transitionMode == TRANS_MODE_INSTANCE_RUNNING) || | ||
(this->transitionMode == TRANS_MODE_INSTANCE_WAIT) || (this->transitionCtx.transitionType >= 56)) { | ||
|
@@ -1172,11 +1172,11 @@ void Play_Draw(PlayState* this) { | |
|
||
SET_FULLSCREEN_VIEWPORT(&view); | ||
|
||
View_ApplyTo(&view, VIEW_ALL, &gfxP); | ||
this->transitionCtx.draw(&this->transitionCtx.instanceData, &gfxP); | ||
View_ApplyTo(&view, VIEW_ALL, &tempGfxDisp); | ||
this->transitionCtx.draw(&this->transitionCtx.instanceData, &tempGfxDisp); | ||
} | ||
|
||
TransitionFade_Draw(&this->transitionFadeFlash, &gfxP); | ||
TransitionFade_Draw(&this->transitionFadeFlash, &tempGfxDisp); | ||
|
||
#if PLATFORM_N64 | ||
if (gVisMonoColor.a != 0) | ||
|
@@ -1185,12 +1185,12 @@ void Play_Draw(PlayState* this) { | |
#endif | ||
{ | ||
gPlayVisMono.vis.primColor.rgba = gVisMonoColor.rgba; | ||
VisMono_Draw(&gPlayVisMono, &gfxP); | ||
VisMono_Draw(&gPlayVisMono, &tempGfxDisp); | ||
} | ||
|
||
gSPEndDisplayList(gfxP++); | ||
Gfx_Close(sp1CC, gfxP); | ||
POLY_OPA_DISP = gfxP; | ||
gSPEndDisplayList(tempGfxDisp++); | ||
Gfx_Close(lockedGfxDisp, tempGfxDisp); | ||
POLY_OPA_DISP = tempGfxDisp; | ||
} | ||
|
||
if (gTransitionTileState == TRANS_TILE_READY) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why "disp" ? afaik that stands for "display"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opted for disp to make the distinction that the first argument should be a display buffer pointer (i.e. POLY_OPA_DISP) rather than any old Gfx*.