1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 16:04:35 +00:00

Use intptr in most remaining code files (#1438)

* Use intptr in most remaining code files

* Fix missing uintptr_t in actor

* Use u8* casts for texture pointer arithmetic

* Use bg + 1 instead of casting in Room_DrawBackground2D
This commit is contained in:
Roman971 2023-07-10 21:03:01 +02:00 committed by GitHub
parent d307a37233
commit 232fdb75d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 74 additions and 67 deletions

View file

@ -102,7 +102,7 @@ void Jpeg_CopyToZbuffer(u16* src, u16* zbuffer, s32 x, s32 y) {
* unaligned values in JPEG header files.
*/
u16 Jpeg_GetUnalignedU16(u8* ptr) {
if (((u32)ptr & 1) == 0) {
if (((uintptr_t)ptr & 1) == 0) {
// Read the value normally if it's aligned to a 16-bit address.
return *(u16*)ptr;
} else {