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

Use intptr types in more code files (#1385)

* Use intptr types for segments and a few system files

* Use intptr types for more dma rom addresses

* Use intptr types in data referring to rom files

* Update and cleanup a few message casts

* Change sys_cfb functions and debugHeapStart to use pointers

* Update graph.c for the sys_cfb return type change
This commit is contained in:
Roman971 2022-10-02 17:38:09 +02:00 committed by GitHub
parent e257416c07
commit f5a7c5612b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 205 additions and 201 deletions

View file

@ -17,8 +17,8 @@
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((u32)(addr) + 0x80000000)
#define VIRTUAL_TO_PHYSICAL(addr) (u32)((u8*)(addr) - 0x80000000)
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)
#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr))
#define SQ(x) ((x)*(x))