Пример #1
0
    def __init__(self, pointer=None, default_offset=None, maximum_size=None, null_terminated=False):
        if pointer and default_offset:
            raise ValueError("Only one of pointer and default_offset can be provided to EbStandardMiscText")
        if not maximum_size:
            raise ValueError("maximum_size must be provided")

        self.pointer = pointer
        self.default_offset = default_offset
        if null_terminated:
            self.table_entry = EbStandardNullTerminatedTextTableEntry.create(maximum_size)
        else:
            self.table_entry = EbStandardTextTableEntry.create(maximum_size)
Пример #2
0
    def __init__(self,
                 pointer=None,
                 default_offset=None,
                 maximum_size=None,
                 null_terminated=False):
        if pointer and default_offset:
            raise ValueError(
                "Only one of pointer and default_offset can be provided to EbStandardMiscText"
            )
        if not maximum_size:
            raise ValueError("maximum_size must be provided")

        self.pointer = pointer
        self.default_offset = default_offset
        if null_terminated:
            self.table_entry = EbStandardNullTerminatedTextTableEntry.create(
                maximum_size)
        else:
            self.table_entry = EbStandardTextTableEntry.create(maximum_size)
Пример #3
0
from coilsnake.model.eb.blocks import EbCompressibleBlock
from coilsnake.model.eb.graphics import EbGraphicTileset, EbTileArrangement
from coilsnake.model.eb.palettes import EbPalette
from coilsnake.model.eb.table import EbStandardTextTableEntry
from coilsnake.modules.eb.EbModule import EbModule
from coilsnake.util.common.image import open_indexed_image
from coilsnake.util.eb.pointer import from_snes_address, read_asm_pointer, write_asm_pointer, to_snes_address

GRAPHICS_1_ASM_POINTER_OFFSET = 0x47c47
GRAPHICS_2_ASM_POINTER_OFFSET = 0x47caa
FLAVOR_NAME_ASM_POINTER_OFFSETS = [0x1F70F, 0x1F72A, 0x1F745, 0x1F760, 0x1F77B]
FLAVOR_NAME_ENTRY = EbStandardTextTableEntry.create(size=25)
FLAVOR_PALETTES_OFFSET = 0x201fc8

ARRANGEMENT_PREVIEW_SUBPALETTES = [
    0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 4, 6, 6, 6, 6, 6,
    7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 6, 6, 6, 6, 6,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6,
    0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,