mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-06-26 00:29:30 +00:00
Fix order of frame loading, and properly free temporary buffer.
This commit is contained in:
parent
4dd39aff55
commit
a6f68275d6
|
@ -1107,7 +1107,7 @@ def loadFrameImg(img)
|
|||
blit(tmpBuf, $2000, 192, 40)
|
||||
|
||||
// And clean up
|
||||
auxMmgr(UNLOCK_MEMORY, tmpBuf)
|
||||
auxMmgr(FREE_MEMORY, tmpBuf)
|
||||
frameLoaded = img
|
||||
end
|
||||
|
||||
|
@ -1287,8 +1287,9 @@ def initMap(x, y, dir)
|
|||
// Reset memory (our module will stay since memory manager locked it upon load)
|
||||
mmgr(RESET_MEMORY, 0)
|
||||
|
||||
// Load the raycaster or tile engine, and then the frame image.
|
||||
// Load the frame image, then raycaster or tile engine
|
||||
mmgr(START_LOAD, 1) // partition 1 is where code lives
|
||||
loadFrameImg(mapIs3D+2)
|
||||
mmgr(SET_MEM_TARGET, displayEngine)
|
||||
if mapIs3D
|
||||
mmgr(QUEUE_LOAD, CODE_RENDER<<8 | RES_TYPE_CODE)
|
||||
|
@ -1299,7 +1300,6 @@ def initMap(x, y, dir)
|
|||
fin
|
||||
mmgr(FINISH_LOAD, 0)
|
||||
renderLoaded = TRUE
|
||||
loadFrameImg(mapIs3D+2)
|
||||
|
||||
// Load the map
|
||||
mmgr(START_LOAD, 2) // partition 2 is where maps live
|
||||
|
|
Loading…
Reference in New Issue
Block a user