mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-09 14:56:07 -04:00
load course dl textures from otr and move objects
This commit is contained in:
@@ -94,7 +94,7 @@ void Course::Load() {
|
||||
func_802A86A8(reinterpret_cast<CourseVtx*>(LOAD_ASSET_RAW(this->vtx)), vtx, vtxSize / sizeof(Vtx));
|
||||
|
||||
// Load and allocate memory for course textures
|
||||
const course_texture* asset = this->textures;
|
||||
const course_texture* asset = this->Props.textures;
|
||||
u8* freeMemory = NULL;
|
||||
u8* texture = NULL;
|
||||
size_t size = 0;
|
||||
@@ -103,12 +103,14 @@ void Course::Load() {
|
||||
size = ResourceGetTexSizeByName(asset->addr);
|
||||
freeMemory = (u8*) allocate_memory(size);
|
||||
|
||||
texture = reinterpret_cast<u8*>(LOAD_ASSET_RAW(asset->addr));
|
||||
texture = (u8*)(asset->addr);
|
||||
printf("TEXTURE: 0x%llX\n",texture);
|
||||
if (texture) {
|
||||
if (asset == &textures[0]) {
|
||||
if (asset == &this->Props.textures[0]) {
|
||||
gSegmentTable[5] = reinterpret_cast<uintptr_t>(&freeMemory[0]);
|
||||
}
|
||||
memcpy(freeMemory, texture, size);
|
||||
strcpy(reinterpret_cast<char*>(freeMemory), asset->addr);
|
||||
//memcpy(freeMemory, texture, size);
|
||||
texSegSize += size;
|
||||
// printf("Texture Addr: 0x%llX, size 0x%X\n", &freeMemory[0], size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user