diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2026-09-16 09:01:55 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-16 09:01:55 -0600 |
| commit | 60ac50c9628d25968bfe367e1b4b6f030078be64 (patch) | |
| tree | e03a0d825cfe443adcf076cb643c20692151f431 /src/racing/memory.c | |
| parent | 7adfdaa9abb18d76ae80f26bff58c2c4dc4f3f29 (diff) | |
| parent | 8fb42e50d70356300050048b57def3123e6d4552 (diff) | |
Merge branch 'main' into Caladius-patch-1Caladius-patch-1
Diffstat (limited to 'src/racing/memory.c')
| -rw-r--r-- | src/racing/memory.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/racing/memory.c b/src/racing/memory.c index 6607d08c4..69e697033 100644 --- a/src/racing/memory.c +++ b/src/racing/memory.c @@ -26,7 +26,7 @@ s32 sGfxSeekPosition; s32 sPackedSeekPosition; static u8 sMemoryPool[0x10000000] ALIGNED4096; -uintptr_t sPoolEnd = sMemoryPool + sizeof(sMemoryPool); +uintptr_t sPoolEnd = (uintptr_t) (sMemoryPool + sizeof(sMemoryPool)); uintptr_t sPoolFreeSpace; struct MainPoolBlock* sPoolListHeadL; @@ -63,25 +63,6 @@ void* get_next_available_memory_addr(uintptr_t size) { return (void*) freeSpace; } -static uintptr_t get_texture2(size_t offset, const course_texture* textures) { - if (!((offset >= 0x5000000) && (offset < 0x6000000))) { - return NULL; - } - size_t totalOffset = 0x5000000; - - while (textures->addr) { - if (totalOffset == offset) { - return (uintptr_t) (textures->addr); - } - totalOffset += textures->data_size; - textures++; - } - - printf("memory.c: get_texture()\n TEXTURE NOT FOUND DURING DISPLAYLIST EXTRACT\n"); - printf(" offset: 0x%zX\n", offset); - return NULL; -} - /** * @brief Sets the starting location for allocating memory and calculates pool size. * @@ -272,7 +253,7 @@ UNUSED void* func_802A80B0(u8* dest, u8* srcStart, u8* srcEnd) { return addr; } -uintptr_t MIO0_0F(u8* arg0, uintptr_t arg1, uintptr_t arg2) { +uintptr_t MIO0_0F(UNUSED u8* arg0, uintptr_t arg1, uintptr_t arg2) { uintptr_t oldHeapEndPtr; void* temp_v0; @@ -292,7 +273,6 @@ uintptr_t MIO0_0F(u8* arg0, uintptr_t arg1, uintptr_t arg2) { return oldHeapEndPtr; } - /* To help verify if ptrs are pointing within segments see gfx_pc.cpp gfx_step() */ uintptr_t vtxSegEnd; uintptr_t dlSegEnd; |
