mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2025-04-07 05:56:53 +02:00
Zero the memory allocated to hold extended actor data
This commit is contained in:
parent
59fd5f5b42
commit
06250b2a4e
@ -137,6 +137,11 @@ extern "C" void recomp_create_actor_data(uint8_t* rdram, recomp_context* ctx) {
|
||||
void* data = recomp::alloc(rdram, alloc_size);
|
||||
alloc_count++;
|
||||
data_ptr = reinterpret_cast<uint8_t*>(data) - rdram + 0xFFFFFFFF80000000U;
|
||||
// Zero the allocated memory.
|
||||
// A memset should be fine here since this data is aligned, but use a byteswapped loop just to be safe.
|
||||
for (size_t i = 0; i < alloc_size; i++) {
|
||||
MEM_B(i, data_ptr) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Add the actor's fields to the actor data slotmap.
|
||||
|
Loading…
x
Reference in New Issue
Block a user