resfileloader.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:bfres 作者: Syroot 项目源码 文件源码
def load_dict(self, value_type: type):
        """
        Reads and returns a ResDict instance with elements of the given value_type from the following offset or returns
        an empty instance if the read offset is 0.
        :param value_type: The type of the elements.
        :return: The ResDict instance.
        """
        offset = self.read_offset()
        resdict = bfres.ResDict(value_type)
        if not offset:
            return resdict
        with self.temporary_seek(offset, io.SEEK_SET):
            resdict.load(self)
            return resdict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号