Fixed problem with no 2d maps working. Reordered rendering to give a faster feel.

This commit is contained in:
Martin Haye 2018-03-05 07:37:42 -08:00
parent 5ab08d6683
commit eaf266f828
2 changed files with 14 additions and 9 deletions

View File

@ -2050,18 +2050,20 @@ class A2PackPartitions
dataIn.map.each { map ->
def name = map?.@name
def shortName = name.replaceAll(/[\s-]*[23]D$/, '')
mapNames[name] = ['2D', num2D+1]
mapNames[shortName] = ['2D', num2D+1]
def rows = parseMap(map, dataIn.tile, true) // quick mode
def (width, height, nHorzSections, nVertSections) = calcMapExtent(rows)
num2D += (nHorzSections * nVertSections)
if (map?.@name =~ /\s*3D$/) {
if (map?.@name =~ /\s*2D$/) {
mapNames[name] = ['2D', num2D+1]
mapNames[shortName] = ['2D', num2D+1]
def rows = parseMap(map, dataIn.tile, true) // quick mode
def (width, height, nHorzSections, nVertSections) = calcMapExtent(rows)
num2D += (nHorzSections * nVertSections)
}
else if (map?.@name =~ /\s*3D$/) {
mapNames[name] = ['3D', num3D+1]
mapNames[shortName] = ['3D', num3D+1]
++num3D
}
else
printWarning "map name '${map?.@name}' should contain '2D' or '3D'. Skipping."
}
}

View File

@ -2387,8 +2387,11 @@ export def _scriptDisplayStr(str)#0
if pIntimate
pIntimate=>intimate_displayStr(str)
else
if renderLoaded and !curPortrait and !curFullscreenImg
doRender()
flipToPage1()
fin
if textClearCountdown; clearTextWindow(); fin
if renderLoaded; flipToPage1(); fin
displayStr(str)
textDrawn = TRUE
fin