本文整理汇总了Python中EbModule.writeAsmPointers方法的典型用法代码示例。如果您正苦于以下问题:Python EbModule.writeAsmPointers方法的具体用法?Python EbModule.writeAsmPointers怎么用?Python EbModule.writeAsmPointers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EbModule
的用法示例。
在下文中一共展示了EbModule.writeAsmPointers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointers [as 别名]
def writeToRom(self, rom):
self._bbgGfxPtrTbl.clear(len(self._bbgGfxArrs))
self._bbgArrPtrTbl.clear(len(self._bbgGfxArrs))
self._bbgPalPtrTbl.clear(len(self._bbgPals))
# Write gfx+arrs
i = 0
pct = (50.0/3)/len(self._bbgGfxArrs)
for (tg, a) in self._bbgGfxArrs:
with EbCompressedData(tg.sizeBlock()) as tgb:
tg.writeToBlock(tgb)
self._bbgGfxPtrTbl[i,0].setVal(EbModule.toSnesAddr(
tgb.writeToFree(rom)))
with EbCompressedData(a.sizeBlock()) as ab:
a.writeToBlock(ab)
self._bbgArrPtrTbl[i,0].setVal(EbModule.toSnesAddr(
ab.writeToFree(rom)))
i += 1
updateProgress(pct)
EbModule.writeAsmPointers(rom, self._ASMPTRS_GFX,
EbModule.toSnesAddr(self._bbgGfxPtrTbl.writeToFree(rom)))
EbModule.writeAsmPointers(rom, self._ASMPTRS_ARR,
EbModule.toSnesAddr(self._bbgArrPtrTbl.writeToFree(rom)))
# Write pals
i = 0
pct = (50.0/3)/len(self._bbgPals)
for p in self._bbgPals:
with DataBlock(32) as pb:
p.writeToBlock(pb)
self._bbgPalPtrTbl[i,0].setVal(EbModule.toSnesAddr(
pb.writeToFree(rom)))
i += 1
updateProgress(pct)
EbModule.writeAsmPointers(rom, self._ASMPTRS_PAL,
EbModule.toSnesAddr(self._bbgPalPtrTbl.writeToFree(rom)))
# Write the data table
pct = (50.0/3)/3
self._bbgTbl.writeToRom(rom)
updateProgress(pct)
self._bbgScrollTbl.writeToRom(rom)
updateProgress(pct)
self._bbgDistorTbl.writeToRom(rom)
updateProgress(pct)