-
Notifications
You must be signed in to change notification settings - Fork 610
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
split some graph.c related headers #1972
base: main
Are you sure you want to change the base?
Conversation
#define WORK_DISP __gfxCtx->work.p | ||
#define POLY_OPA_DISP __gfxCtx->polyOpa.p | ||
#define POLY_XLU_DISP __gfxCtx->polyXlu.p | ||
#define OVERLAY_DISP __gfxCtx->overlay.p | ||
|
||
#if OOT_DEBUG | ||
|
||
// __gfxCtx shouldn't be used directly. | ||
// Use the DISP macros defined above when writing to display buffers. | ||
#define OPEN_DISPS(gfxCtx, file, line) \ | ||
{ \ | ||
GraphicsContext* __gfxCtx; \ | ||
Gfx* dispRefs[4]; \ | ||
__gfxCtx = gfxCtx; \ | ||
(void)__gfxCtx; \ | ||
Graph_OpenDisps(dispRefs, gfxCtx, file, line) |
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.
In MM we put all those macros in a different header, one that has the z_rcp.c
function declarations because the files tend to use those macros and the rcp functions together.
I guess an argument can be made for the Open/CloseDisps and Alloc functions which are not present on MM.
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.
idk it feels a little more sensible for these macros to exist in graph.h since gfxCtx is a graph.c stack variable.
I also did a once over and realized that most functions don't even need to be exposed outside of graph; the only oddball is ThreadEntry.
Contributions made in this pr are licensed under CC0 |
sorry for the rebase, but there were extra files being shown as being modified that I didn't touch. I'd like to recap where this PR is currently, explaining some of my decisions for what goes where and pointing out some new changes. It was suggested that what is
As for other new changes. I did a documentation pass on Introduced |
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.
graph.h and gfx.h are the same thing (both are "graphics") and shouldn't be split
No description provided.