mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-11-04 22:08:44 +00:00
Fix portrait debug switching in god mode.
This commit is contained in:
parent
706fec214b
commit
1efc0d3630
@ -1803,7 +1803,6 @@ export def lookupResourcePart(sectionNum, resourceNum)#1
|
|||||||
for i = 0 to 7
|
for i = 0 to 7
|
||||||
if n & (1<<i); return i+1; fin
|
if n & (1<<i); return i+1; fin
|
||||||
next
|
next
|
||||||
fatal("lkupFail2")
|
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -2344,6 +2343,7 @@ def initMap(x, y, dir)#0
|
|||||||
|
|
||||||
// Load the map
|
// Load the map
|
||||||
curMapPartition = lookupResourcePart(mapIs3D+1, mapNum)
|
curMapPartition = lookupResourcePart(mapIs3D+1, mapNum)
|
||||||
|
if !curMapPartition; fatal("lkupFail2"); fin
|
||||||
mmgr(START_LOAD, curMapPartition)
|
mmgr(START_LOAD, curMapPartition)
|
||||||
pCurMap = mmgr(QUEUE_LOAD, mapNum<<8 | (RES_TYPE_2D_MAP+mapIs3D))
|
pCurMap = mmgr(QUEUE_LOAD, mapNum<<8 | (RES_TYPE_2D_MAP+mapIs3D))
|
||||||
mmgr(FINISH_LOAD, 0)
|
mmgr(FINISH_LOAD, 0)
|
||||||
@ -2942,6 +2942,7 @@ export def setPortrait(portraitNum)#0
|
|||||||
|
|
||||||
// Load the portrait image and display it
|
// Load the portrait image and display it
|
||||||
part = lookupResourcePart(3, portraitNum)
|
part = lookupResourcePart(3, portraitNum)
|
||||||
|
if !part; fatal("lkupFail2"); fin
|
||||||
// Commented out below, because it prevents cycling thru all portraits (in god mode)
|
// Commented out below, because it prevents cycling thru all portraits (in god mode)
|
||||||
// NO: if part > 1; part = curMapPartition; fin // Look on disk 1 or current disk only
|
// NO: if part > 1; part = curMapPartition; fin // Look on disk 1 or current disk only
|
||||||
mmgr(START_LOAD, part)
|
mmgr(START_LOAD, part)
|
||||||
|
@ -128,11 +128,10 @@ end
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
def advPortrait(dir)#1
|
def advPortrait(dir)#1
|
||||||
while TRUE
|
while TRUE
|
||||||
portraitNum = portraitNum + dir
|
if dir < 0
|
||||||
if portraitNum > PO_LAST
|
portraitNum = portraitNum <= 1 ?? PO_LAST :: portraitNum-1
|
||||||
portraitNum = 1
|
else
|
||||||
elsif portraitNum < 1
|
portraitNum = portraitNum >= PO_LAST ?? 1 :: portraitNum+1
|
||||||
portraitNum = PO_LAST
|
|
||||||
fin
|
fin
|
||||||
if lookupResourcePart(3, portraitNum); break; fin
|
if lookupResourcePart(3, portraitNum); break; fin
|
||||||
loop
|
loop
|
||||||
|
@ -86,6 +86,7 @@ def loadStory(storyNum)#0
|
|||||||
byte storyPart
|
byte storyPart
|
||||||
word pAuxText, pEnd, pSrc, pDst, len
|
word pAuxText, pEnd, pSrc, pDst, len
|
||||||
storyPart = lookupResourcePart(4, 1) // special section just to record the partition
|
storyPart = lookupResourcePart(4, 1) // special section just to record the partition
|
||||||
|
if !storyPart; fatal("lkupFail2"); fin
|
||||||
auxMmgr(START_LOAD, storyPart)
|
auxMmgr(START_LOAD, storyPart)
|
||||||
pAuxText = auxMmgr(QUEUE_LOAD, storyNum<<8 | RES_TYPE_STORY)
|
pAuxText = auxMmgr(QUEUE_LOAD, storyNum<<8 | RES_TYPE_STORY)
|
||||||
auxMmgr(FINISH_LOAD, 0)
|
auxMmgr(FINISH_LOAD, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user