(cls, instr, filename=None, *args, **kwargs)
return new_game
Reads a game from a .p8.png file.

        Args:
          instr: The input stream.
          filename: The filename, if any, for tool messages.

        Returns:
          A Game containing the game data.
Reads a game from a .p8.png file.
Reads a game from a . p8 . png file .
def from_file(cls, instr, filename=None, *args, **kwargs):
        """Reads a game from a .p8.png file.

        Args:
          instr: The input stream.
          filename: The filename, if any, for tool messages.

        Returns:
          A Game containing the game data.
        """
        data = get_raw_data_from_p8png_file(instr, filename=filename)

        new_game = Game(
            filename=filename, compressed_size=data.compressed_size)
        new_game.version = data.version
        new_game.lua = Lua.from_lines(
            [data.code], version=data.version)
        new_game.gfx = Gfx.from_bytes(
            data.gfx, version=data.version)
        new_game.gff = Gff.from_bytes(
            data.gfx_props, version=data.version)
        new_game.map = Map.from_bytes(
            data.p8map, version=data.version, gfx=new_game.gfx)
        new_game.sfx = Sfx.from_bytes(
            data.sfx, version=data.version)
        new_game.music = Music.from_bytes(
            data.song, version=data.version)

        return new_game
def from_file ( cls , instr , filename = None , * args , * * kwargs ) : data = get_raw_data_from_p8png_file ( instr , filename = filename ) new_game = Game ( filename = filename , compressed_size = data . compressed_size ) new_game . version = data . version new_game . lua = Lua . from_lines ( [ data . code ] , version = data . version ) new_game . gfx = Gfx . from_bytes ( data . gfx , version = data . version ) new_game . gff = Gff . from_bytes ( data . gfx_props , version = data . version ) new_game . map = Map . from_bytes ( data . p8map , version = data . version , gfx = new_game . gfx ) new_game . sfx = Sfx . from_bytes ( data . sfx , version = data . version ) new_game . music = Music . from_bytes ( data . song , version = data . version ) return new_game