mirror of
https://github.com/ApfelTeeSaft/lightspeed64.git
synced 2026-08-26 19:33:24 +00:00
Added support for 00 geolayout command.
This commit is contained in:
@@ -88,8 +88,8 @@ nodeCmds = [
|
||||
]
|
||||
|
||||
geoCmdStatic = {
|
||||
0x04: [0x00, 0x01, 0x03, 0x04, 0x05, 0x09, 0x0B, 0x0C, 0x17, 0x20],
|
||||
0x08: [0x02, 0x0D, 0x0E, 0x12, 0x14, 0x15, 0x16, 0x18, 0x19],
|
||||
0x04: [0x01, 0x03, 0x04, 0x05, 0x09, 0x0B, 0x0C, 0x17, 0x20],
|
||||
0x08: [0x00, 0x02, 0x0D, 0x0E, 0x12, 0x14, 0x15, 0x16, 0x18, 0x19],
|
||||
0x0C: [0x08, 0x13, 0x1C],
|
||||
0x14: [0x0F],
|
||||
}
|
||||
|
||||
@@ -180,7 +180,12 @@ def parseNode(romfile, geoStartAddress, currentAddress, currentCmd, jumps,
|
||||
armatureObj = armatureMeshTuple[0]
|
||||
switchLevel = switchCount
|
||||
|
||||
if currentCmd[0] == GEO_BRANCH and not ignoreNode: # 0x02
|
||||
if currentCmd[0] == GEO_BRANCH_STORE and not ignoreNode: #0x00
|
||||
currentAddress = parseBranchStore(romfile, currentCmd, currentAddress,
|
||||
jumps, segmentData = segmentData)
|
||||
singleChildStack.append(False)
|
||||
nodeIndex.append(0)
|
||||
elif currentCmd[0] == GEO_BRANCH and not ignoreNode: # 0x02
|
||||
currentAddress = parseBranch(romfile, currentCmd, currentAddress,
|
||||
jumps, segmentData = segmentData)
|
||||
singleChildStack.append(False)
|
||||
@@ -687,6 +692,19 @@ def parseBranch(romfile, currentCmd, currentAddress, jumps,
|
||||
|
||||
return currentAddress
|
||||
|
||||
def parseBranchStore(romfile, currentCmd, currentAddress, jumps,
|
||||
segmentData = None):
|
||||
print("BRANCH AND STORE " + hex(currentAddress))
|
||||
romfile.seek(currentAddress)
|
||||
postJumpAddr = currentAddress + getGeoLayoutCmdLength(*currentCmd)
|
||||
currentCmd = romfile.read(getGeoLayoutCmdLength(*currentCmd))
|
||||
|
||||
jumps.append(postJumpAddr)
|
||||
currentAddress = decodeSegmentedAddr(currentCmd[4:8],
|
||||
segmentData = segmentData)
|
||||
|
||||
return currentAddress
|
||||
|
||||
def parseReturn(currentCmd, currentAddress, jumps):
|
||||
print("RETURN " + hex(currentAddress))
|
||||
currentAddress = jumps.pop()
|
||||
|
||||
Reference in New Issue
Block a user