1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Force required alignment on DMA related stuff (#1135)

* Force dword alignment on OSPifRam

* force_structure_alignment on each Font buffer

* Add ALIGNED8 macro to gSaveContext to ensure alignment

* create alignment.h header and use ALIGN8 in PLAYER_LIMB_BUF_COUNT

* add comment in common_data

* Roman's suggestion

* player_limb_buf_count

Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
Anghelo Carvajal 2022-02-11 20:23:57 -03:00 committed by GitHub
parent c8d150afe2
commit 8926b08582
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 16 deletions

View file

@ -8,11 +8,6 @@
#define VIRTUAL_TO_PHYSICAL(addr) (u32)((u8*)(addr) - 0x80000000)
#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr))
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
#define OFFSETOF(structure, member) ((size_t)&(((structure*)0)->member))
#define SQ(x) ((x)*(x))
@ -168,10 +163,4 @@ extern GraphicsContext* __gfxCtx;
((height)-1) << G_TEXTURE_IMAGE_FRAC); \
} while (0)
#ifdef __GNUC__
#define ALIGNED8 __attribute__ ((aligned (8)))
#else
#define ALIGNED8
#endif
#endif