mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Use __builtin_offsetof
for non IDO builds (#1140)
* Add offsetof macro * Change old uses of OFFSETOF with offsetof
This commit is contained in:
parent
ed0daabf98
commit
2191c8b0a0
5 changed files with 18 additions and 11 deletions
|
@ -1,12 +1,13 @@
|
|||
#ifndef _FILE_CHOOSE_H_
|
||||
#define _FILE_CHOOSE_H_
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
|
||||
#define GET_NEWF(sramCtx, slotNum, index) (sramCtx->readBuff[gSramSlotOffsets[slotNum] + OFFSETOF(SaveContext, newf[index])])
|
||||
#define GET_NEWF(sramCtx, slotNum, index) (sramCtx->readBuff[gSramSlotOffsets[slotNum] + offsetof(SaveContext, newf[index])])
|
||||
|
||||
#define SLOT_OCCUPIED(sramCtx, slotNum) \
|
||||
((GET_NEWF(sramCtx, slotNum, 0) == 'Z') || \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue