当前位置: 首页>>代码示例>>Python>>正文


Python EbModule.readAsmPointer方法代码示例

本文整理汇总了Python中EbModule.readAsmPointer方法的典型用法代码示例。如果您正苦于以下问题:Python EbModule.readAsmPointer方法的具体用法?Python EbModule.readAsmPointer怎么用?Python EbModule.readAsmPointer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EbModule的用法示例。


在下文中一共展示了EbModule.readAsmPointer方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: readGasFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readGasFromRom(self, rom):
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_GAS_GFX)))
         self._gas_gfx.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_GAS_ARR)))
         self._gas_arr.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_GAS_PAL1)))
         self._gas_pal1.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_GAS_PAL2)))
         self._gas_pal2.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_GAS_PAL3)))
         self._gas_pal3.readFromBlock(cb)
开发者ID:NichtJens,项目名称:CoilSnake,代码行数:33,代码来源:CompressedGraphicsModule.py

示例2: readTownMapIconsFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readTownMapIconsFromRom(self, rom):
     self._townmap_icons_pal.readFromBlock(rom,
             loc=EbModule.toRegAddr(
                 EbModule.readAsmPointer(rom,
                     self._ASMPTR_TOWN_MAP_ICON_PAL)))
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_TOWN_MAP_ICON_GFX)))
         self._townmap_icons.readFromBlock(cb)
开发者ID:NichtJens,项目名称:CoilSnake,代码行数:13,代码来源:CompressedGraphicsModule.py

示例3: readFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
    def readFromRom(self, rom):
        self._bbgTbl.readFromRom(rom)
        pct = 50.0/(6+self._bbgTbl.height())
        self._bbgGfxPtrTbl.readFromRom(rom,
                EbModule.toRegAddr(EbModule.readAsmPointer(rom,
                    self._ASMPTRS_GFX[0])))
        updateProgress(pct)
        self._bbgArrPtrTbl.readFromRom(rom,
                EbModule.toRegAddr(EbModule.readAsmPointer(rom, 
                    self._ASMPTRS_ARR[0])))
        updateProgress(pct)
        self._bbgPalPtrTbl.readFromRom(rom,
                EbModule.toRegAddr(EbModule.readAsmPointer(rom, 
                    self._ASMPTRS_PAL[0])))
        updateProgress(pct)

        self._bbgGfxArrs = [ None for i in range(self._bbgGfxPtrTbl.height()) ]
        self._bbgPals = [ None for i in range(self._bbgPalPtrTbl.height()) ]
        updateProgress(pct)
        self._bbgScrollTbl.readFromRom(rom)
        updateProgress(pct)
        self._bbgDistorTbl.readFromRom(rom)
        updateProgress(pct)
        for i in range(self._bbgTbl.height()):
            gfxNum = self._bbgTbl[i,0].val()
            colorDepth = self._bbgTbl[i,2].val()
            if (self._bbgGfxArrs[gfxNum] == None):
                # Max size used in rom: 421 (2bpp) 442 (4bpp)
                tg = EbTileGraphics(512, 8, colorDepth)
                with EbCompressedData() as tgb:
                    tgb.readFromRom(rom, EbModule.toRegAddr(
                        self._bbgGfxPtrTbl[gfxNum,0].val()))
                    tg.readFromBlock(tgb)
                a = EbArrangement(32, 32)
                with EbCompressedData() as ab:
                    ab.readFromRom(rom, EbModule.toRegAddr(
                        self._bbgArrPtrTbl[gfxNum,0].val()))
                    a.readFromBlock(ab)
                
                self._bbgGfxArrs[gfxNum] = (tg, a)
            palNum = self._bbgTbl[i,1].val()
            if (self._bbgPals[palNum] == None):
                with DataBlock(32) as pb:
                    pb.readFromRom(rom,
                            EbModule.toRegAddr(self._bbgPalPtrTbl[palNum,0].val()))
                    p = EbPalettes(1, 16)
                    p.readFromBlock(pb)
                    self._bbgPals[palNum] = p
            updateProgress(pct)
开发者ID:Herringway,项目名称:CoilSnake,代码行数:51,代码来源:BattleBgModule.py

示例4: readCreditsFontFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readCreditsFontFromRom(self, rom):
     self._cpal.readFromBlock(rom, loc=self._ADDR_CREDITS_PAL)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(
                         rom, self._ASMPTR_CREDITS_GFX)))
         self._cfont.readFromBlock(cb)
开发者ID:NichtJens,项目名称:CoilSnake,代码行数:10,代码来源:FontModule.py

示例5: readFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readFromRom(self, rom):
     with EbCompressedData() as gb:
         gb.readFromRom(rom, EbModule.toRegAddr(
             EbModule.readAsmPointer(rom, self._gfxPtrLoc)))
         self._gfx.readFromBlock(gb)
     with EbCompressedData() as ab:
         ab.readFromRom(rom, EbModule.toRegAddr(
             EbModule.readAsmPointer(rom, self._arrPtrLoc)))
         self._arr.readFromBlock(ab)
     with EbCompressedData() as pb:
         pb.readFromRom(rom, EbModule.toRegAddr(
             EbModule.readAsmPointer(rom, self._palPtrLoc)))
         self._pals.readFromBlock(pb)
     
     # The first color of every subpalette after subpal0 is ignored and
     # drawn as the first color of subpal0 instead
     c = self._pals[0,0]
     for i in range(1,len(self._pals)):
         self._pals[i,0] = c
开发者ID:jeffman,项目名称:CoilSnake,代码行数:21,代码来源:CompressedGraphicsModule.py

示例6: readFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
    def readFromRom(self, rom):
        self._bsPtrTbl.readFromRom(rom,
                EbModule.toRegAddr(EbModule.readAsmPointer(rom,
                    self._ASMPTR_GFX)))
        self._bsPalsTable.readFromRom(rom,
                EbModule.toRegAddr(EbModule.readAsmPointer(rom,
                    self._ASMPTR_PAL)))
        pct = 45.0/(self._bsPtrTbl.height()
                + self._bsPalsTable.height() + 1)
        self._enemyCfgTable.readFromRom(rom)
        updateProgress(pct)
        # Read the palettes
        for i in range(self._bsPalsTable.height()):
            pal = EbPalettes(1,16)
            pal.set(0, self._bsPalsTable[i,0].val())
            self._bsPals.append(pal)
            updateProgress(pct)
        # Read the sprites
        for i in range(self._bsPtrTbl.height()):
            with EbCompressedData() as bsb:
                bsb.readFromRom(rom,
                        EbModule.toRegAddr(self._bsPtrTbl[i,0].val()))
                bs = EbBattleSprite()
                bs.readFromBlock(bsb, self._bsPtrTbl[i,1].val())
                self._bsprites.append(bs)
            updateProgress(pct)

        # Read the group data
        self._enemyGroupTbl.readFromRom(rom)
        self._enemyGroupBgTbl.readFromRom(rom)
        self._enemyGroups = [ ]
        pct = 5.0/self._enemyGroupTbl.height()
        for i in range(self._enemyGroupTbl.height()):
            group = [ ]
            ptr = EbModule.toRegAddr(self._enemyGroupTbl[i,0].val())
            while(rom[ptr] != 0xff):
                group.append((rom.readMulti(ptr+1,2), rom[ptr]))
                ptr += 3
            self._enemyGroups.append(group)
            updateProgress(pct)
开发者ID:jeffman,项目名称:CoilSnake,代码行数:42,代码来源:EnemyModule.py

示例7: readFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readFromRom(self, rom):
     with EbCompressedData() as tgb1:
         tgb1.readFromRom(rom, EbModule.toRegAddr(
             EbModule.readAsmPointer(rom, self._ASMPTR_1)))
         self._gfx1.readFromBlock(tgb1)
     updateProgress(20)
     with EbCompressedData() as tgb2:
         tgb2.readFromRom(rom, EbModule.toRegAddr(
             EbModule.readAsmPointer(rom, self._ASMPTR_2)))
         self._gfx2.readFromBlock(tgb2)
     updateProgress(20)
     # Read palettes
     loc = 0x201fc8
     for pal in self._flavPals:
         pal.readFromBlock(rom, loc=loc)
         loc += 64
     updateProgress(5)
     # Read names
     for ptr, field in self._flavNames:
         field.readFromRom(rom, EbModule.toRegAddr(
             EbModule.readAsmPointer(rom, ptr)))
     updateProgress(5)
开发者ID:NichtJens,项目名称:CoilSnake,代码行数:24,代码来源:WindowGraphicsModule.py

示例8: readFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readFromRom(self, rom):
     self._ptrTbl.readFromRom(rom,
             EbModule.toRegAddr(EbModule.readAsmPointer(rom,
                 self._ASMPTR_PTR_TBL)))
     updateProgress(5)
     for i in range(self._ptrTbl.height()):
         loc = EbModule.toRegAddr(self._ptrTbl[i,0].val())
         entry = []
         while True:
             x = rom[loc]
             if x == 0xff:
                 break
             y = rom[loc+1]
             icon = rom[loc+2]
             flag = rom.readMulti(loc+3, 2)
             entry.append((x, y, icon, flag))
             loc += 5
         self._entries.append(entry)
         i += 1
     updateProgress(45)
开发者ID:NichtJens,项目名称:CoilSnake,代码行数:22,代码来源:TownMapIconModule.py

示例9: readProducedPresentedFromRom

# 需要导入模块: import EbModule [as 别名]
# 或者: from EbModule import readAsmPointer [as 别名]
 def readProducedPresentedFromRom(self, rom):
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_PRODUCED_PAL)))
         self._produced_pal.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_PRODUCED_GFX)))
         self._produced_gfx.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_PRODUCED_ARR)))
         self._produced_arr.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_PRESENTED_PAL)))
         self._presented_pal.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_PRESENTED_GFX)))
         self._presented_gfx.readFromBlock(cb)
     with EbCompressedData() as cb:
         cb.readFromRom(rom,
                 EbModule.toRegAddr(
                     EbModule.readAsmPointer(rom,
                     self._ASMPTR_PRESENTED_ARR)))
         self._presented_arr.readFromBlock(cb)
开发者ID:NichtJens,项目名称:CoilSnake,代码行数:39,代码来源:CompressedGraphicsModule.py


注:本文中的EbModule.readAsmPointer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。