Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Feb 19, 2025
1 parent 764904e commit ed1e502
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions decompile/General/LOAD/LOAD_21_ReadFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ void* DECOMP_LOAD_ReadFile(struct BigHeader* bigfile, u_int loadType, int subfil
{
// set flag that we used MEMPACK_AllocMem
// to store this ReadFile somewhere random
data.currSlot.flags = data.currSlot.flags | 1;
struct LoadQueueSlot* lqs = &data.currSlot;
lqs->flags |= 1;

ptrDst = (void *)DECOMP_MEMPACK_AllocMem((*size + 0x7ffU) & 0xfffff800); // "FILE"

Expand All @@ -52,7 +53,7 @@ void* DECOMP_LOAD_ReadFile(struct BigHeader* bigfile, u_int loadType, int subfil
CdReadCallback(DECOMP_LOAD_ReadFileASyncCallback);
}

#if defined(REBUILD_PC)
#if defined(REBUILD_PC) || defined(USE_PCDRV)
callback = 0;
#endif

Expand Down
9 changes: 4 additions & 5 deletions decompile/General/LOAD/LOAD_36_NextQueuedFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ void DECOMP_LOAD_NextQueuedFile()

sdata->queueLength--;

#ifndef REBUILD_PC
#if defined(REBUILD_PC) || defined(USE_PCDRV)
DECOMP_LOAD_ReadFileASyncCallback(CdlComplete, NULL);
#else

}
if(
// two frames after end of loading
Expand All @@ -75,11 +78,7 @@ void DECOMP_LOAD_NextQueuedFile()
)
{
struct LoadQueueSlot* curr = &data.currSlot;
#endif

#if defined(REBUILD_PC)
DECOMP_LOAD_ReadFileASyncCallback(CdlComplete, NULL);
#else
// Use callback if present
if(curr->callback.funcPtr != 0)
{
Expand Down

0 comments on commit ed1e502

Please sign in to comment.