mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
Use macros for oGfxCtx accesses (#465)
* fix colliderinit typo * fix initchain * reloc * add defines * add defines * missed some on merge * rename gfxCtx and add comment * remove space
This commit is contained in:
parent
92bb1fb210
commit
3c5fe66dcd
195 changed files with 2236 additions and 2229 deletions
|
@ -85,13 +85,20 @@
|
|||
} \
|
||||
(void)0
|
||||
|
||||
extern GraphicsContext* oGfxCtx;
|
||||
extern GraphicsContext* __gfxCtx;
|
||||
|
||||
#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
|
||||
|
||||
// __gfxCtx shouldn't be used directly.
|
||||
// Use the DISP macros defined above when writing to display buffers.
|
||||
#define OPEN_DISPS(gfxCtx, file, line) \
|
||||
{ \
|
||||
GraphicsContext* oGfxCtx; \
|
||||
GraphicsContext* __gfxCtx; \
|
||||
Gfx* dispRefs[4]; \
|
||||
oGfxCtx = gfxCtx; \
|
||||
__gfxCtx = gfxCtx; \
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, file, line)
|
||||
|
||||
#define CLOSE_DISPS(gfxCtx, file, line) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue