Fixed many bugs (#586)

* Fixed some includes

* Fix allocation bugs

* More fixes and trying to get 3D rendering done

* Fixed many bugs
This commit is contained in:
Dávid Balatoni 2025-04-22 03:40:10 +02:00 committed by GitHub
parent 59c19c8046
commit b05b70d6b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 167 additions and 96 deletions

View file

@ -337,7 +337,12 @@ void *HuDataReadNum(s32 data_num, s32 num)
}
read_stat = &ReadDataStat[status];
GetFileInfo(read_stat, data_num & 0xFFFF);
#ifdef TARGET_PC
// TODO PC why is the allocation invalid if we use HEAP_SYSTEM?
buf = HuMemDirectMallocNum(HEAP_DATA, DATA_EFF_SIZE(read_stat->raw_len), num);
#else
buf = HuMemDirectMallocNum(HEAP_SYSTEM, DATA_EFF_SIZE(read_stat->raw_len), num);
#endif
if(buf) {
HuDecodeData(read_stat->file, buf, read_stat->raw_len, read_stat->comp_type);
}