本文整理汇总了Python中EbModule.writeAsmPointer方法的典型用法代码示例。如果您正苦于以下问题:Python EbModule.writeAsmPointer方法的具体用法?Python EbModule.writeAsmPointer怎么用?Python EbModule.writeAsmPointer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EbModule
的用法示例。
在下文中一共展示了EbModule.writeAsmPointer方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
for f in self._fonts:
f.writeToRom(rom)
updateProgress(self._pct)
self._cpal.writeToBlock(rom, loc=self._ADDR_CREDITS_PAL)
with EbCompressedData(self._cfont.sizeBlock()) as cb:
self._cfont.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_CREDITS_GFX,
EbModule.toSnesAddr(cb.writeToFree(rom)))
updateProgress(self._pct)
示例2: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
pct = 40.0/(len(self._bsprites) + len(self._bsPals) + 3)
# Write the main table
self._enemyCfgTable.writeToRom(rom)
updateProgress(pct)
# Write the gfx ptr table
self._bsPtrTbl.clear(len(self._bsprites))
i = 0
for bs in self._bsprites:
with EbCompressedData(bs.sizeBlock()) as bsb:
bs.writeToBlock(bsb)
self._bsPtrTbl[i,0].setVal(EbModule.toSnesAddr(
bsb.writeToFree(rom)))
self._bsPtrTbl[i,1].setVal(bs.size())
i += 1
updateProgress(pct)
gfxAddr = EbModule.toSnesAddr(self._bsPtrTbl.writeToFree(rom))
EbModule.writeAsmPointer(rom, self._ASMPTR_GFX, gfxAddr)
updateProgress(pct)
for p in self._REGPTR_GFX:
rom.writeMulti(p, gfxAddr, 3)
# Write the pal table
self._bsPalsTable.clear(len(self._bsPals))
i = 0
for p in self._bsPals:
self._bsPalsTable[i,0].setVal(p.getSubpal(0))
i += 1
updateProgress(pct)
EbModule.writeAsmPointer(rom, self._ASMPTR_PAL,
EbModule.toSnesAddr(self._bsPalsTable.writeToFree(rom)))
updateProgress(pct)
# Write the groups
self._enemyGroupBgTbl.writeToRom(rom)
updateProgress(5)
i=0
for group in self._enemyGroups:
loc = rom.getFreeLoc(len(group)*3 + 1)
self._enemyGroupTbl[i,0].setVal(EbModule.toSnesAddr(loc))
i += 1
for enemyID, amount in group:
rom[loc] = amount
rom[loc+1] = enemyID & 0xff
rom[loc+2] = enemyID >> 8
loc += 3
rom[loc] = 0xff
self._enemyGroupTbl.writeToRom(rom)
updateProgress(5)
示例3: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
for (t, a, asmPtrs, regPtrs, regPtrsOff) in self._tables:
try:
addr = EbModule.toSnesAddr(t.writeToFree(rom))
except Exception as inst:
print t._name
raise inst
for asmPtr in asmPtrs:
EbModule.writeAsmPointer(rom, asmPtr, addr)
for regPtr in regPtrs:
rom.writeMulti(regPtr, addr, 3)
for (ptr, off) in regPtrsOff:
rom.writeMulti(ptr, addr + off, 3)
# Hardcoded number of entries in PSI Ability Table
# if t._addr == 0xd58a50:
# rom.writeMulti(0x1c843, t.height(), 2)
updateProgress(self._pct)
示例4: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
self._ptrTbl.clear(6)
i = 0
for entry in self._entries:
writeLoc = rom.getFreeLoc(len(entry)*5 + 1)
self._ptrTbl[i,0].setVal(
EbModule.toSnesAddr(writeLoc))
for (x, y, icon, flag) in entry:
rom[writeLoc] = x
rom[writeLoc+1] = y
rom[writeLoc+2] = icon
rom.writeMulti(writeLoc+3, flag, 2)
writeLoc += 5
rom[writeLoc] = 0xff
i += 1
updateProgress(45)
EbModule.writeAsmPointer(rom, self._ASMPTR_PTR_TBL,
EbModule.toSnesAddr(
self._ptrTbl.writeToFree(rom)))
updateProgress(5)
示例5: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
with EbCompressedData(self._gfx.sizeBlock()) as gb:
self._gfx.writeToBlock(gb)
EbModule.writeAsmPointer(rom, self._gfxPtrLoc,
EbModule.toSnesAddr(gb.writeToFree(rom)))
with EbCompressedData(self._arr.sizeBlock()) as ab:
self._arr.writeToBlock(ab)
EbModule.writeAsmPointer(rom, self._arrPtrLoc,
EbModule.toSnesAddr(ab.writeToFree(rom)))
with EbCompressedData(self._pals.sizeBlock()) as pb:
self._pals.writeToBlock(pb)
EbModule.writeAsmPointer(rom, self._palPtrLoc,
EbModule.toSnesAddr(pb.writeToFree(rom)))
示例6: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
with EbCompressedData(self._gfx1.sizeBlock()) as gb:
self._gfx1.writeToBlock(gb)
EbModule.writeAsmPointer(rom, self._ASMPTR_1,
EbModule.toSnesAddr(gb.writeToFree(rom)))
updateProgress(20)
with EbCompressedData(self._gfx2.sizeBlock()) as gb:
self._gfx2.writeToBlock(gb)
EbModule.writeAsmPointer(rom, self._ASMPTR_2,
EbModule.toSnesAddr(gb.writeToFree(rom)))
updateProgress(20)
# Write pals
loc = 0x201fc8
for pal in self._flavPals:
pal.writeToBlock(rom, loc=loc)
loc += 64
updateProgress(5)
# Write names
for ptr, field in self._flavNames:
loc = EbModule.toSnesAddr(field.writeToFree(rom))
EbModule.writeAsmPointer(rom, ptr, loc)
updateProgress(5)
示例7: writeToRom
# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import writeAsmPointer [as 别名]
def writeToRom(self, rom):
for logo in self._logos:
logo.writeToRom(rom)
updateProgress(self._pct)
for tmap in self._townmaps:
tmap.writeToRom(rom)
updateProgress(self._pct)
with DataBlock(self._townmap_icons_pal.sizeBlock()) as b:
self._townmap_icons_pal.writeToBlock(b)
EbModule.writeAsmPointer(rom, self._ASMPTR_TOWN_MAP_ICON_PAL,
EbModule.toSnesAddr(b.writeToFree(rom)))
with EbCompressedData(self._townmap_icons.sizeBlock()) as cb:
self._townmap_icons.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_TOWN_MAP_ICON_GFX,
EbModule.toSnesAddr(cb.writeToFree(rom)))
updateProgress(self._pct)
with EbCompressedData(self._produced_pal.sizeBlock()) as cb:
self._produced_pal.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_PRODUCED_PAL,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._produced_gfx.sizeBlock()) as cb:
self._produced_gfx.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_PRODUCED_GFX,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._produced_arr.sizeBlock()) as cb:
self._produced_arr.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_PRODUCED_ARR,
EbModule.toSnesAddr(cb.writeToFree(rom)))
updateProgress(self._pct)
with EbCompressedData(self._presented_pal.sizeBlock()) as cb:
self._presented_pal.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_PRESENTED_PAL,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._presented_gfx.sizeBlock()) as cb:
self._presented_gfx.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_PRESENTED_GFX,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._presented_arr.sizeBlock()) as cb:
self._presented_arr.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_PRESENTED_ARR,
EbModule.toSnesAddr(cb.writeToFree(rom)))
updateProgress(self._pct)
with EbCompressedData(self._gas_gfx.sizeBlock()) as cb:
self._gas_gfx.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_GAS_GFX,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._gas_arr.sizeBlock()) as cb:
self._gas_arr.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_GAS_ARR,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._gas_pal1.sizeBlock()) as cb:
self._gas_pal1.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_GAS_PAL1,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._gas_pal2.sizeBlock()) as cb:
self._gas_pal2.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_GAS_PAL2,
EbModule.toSnesAddr(cb.writeToFree(rom)))
with EbCompressedData(self._gas_pal3.sizeBlock()) as cb:
self._gas_pal3.writeToBlock(cb)
EbModule.writeAsmPointer(rom, self._ASMPTR_GAS_PAL3,
EbModule.toSnesAddr(cb.writeToFree(rom)))
updateProgress(self._pct)