# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():


import sys
import io
import os
import tempfile
import appdirs
        import binarysplit as bs  # aka bullshit
    import pygame
    import os
        import ctypes
        import winreg
    import pygame
from pathlib import Path
from itertools import count, chain
from .database import multitiles, multitilestrides
from .tlib import *
            self.signpos = self.chests.endpos
        if not hasattr(self, "signs"):
            self.signs = Signs(self.path, self.signpos)
        if self.signs.endpos != None:
            self.npcpos = self.signs.endpos
        else:
            for x in self.signs:
                pass
            self.npcpos = self.signs.endpos
        self.npcs = NPCs(self.path, self.npcpos)

    def make_split(self):
        self.ready_npcs()

        bs.split(self.path, [self.tilepos, self.chestpos, self.signpos, self.npcpos, self.npcs.endpos])


def get_content(f, layers=5):  # not done yet
    with open(f, "rb") as f:
        header = get_header(f)[0]
        if layers > 1:
            tiles = get_tiles(f, header["width"], header["height"])
        else:
            return (header,)
    return header, tiles


def get_multis():

    def set_multi_2x2(tid, f):

# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():


# Path: omnitool/tinterface.py
import sys
import io
import os
import tempfile
import appdirs
        import binarysplit as bs  # aka bullshit
    import pygame
    import os
        import ctypes
        import winreg
    import pygame
from pathlib import Path
from itertools import count, chain
from .database import multitiles, multitilestrides
from .tlib import *

            self.signpos = self.chests.endpos
        if not hasattr(self, "signs"):
            self.signs = Signs(self.path, self.signpos)
        if self.signs.endpos != None:
            self.npcpos = self.signs.endpos
        else:
            for x in self.signs:
                pass
            self.npcpos = self.signs.endpos
        self.npcs = NPCs(self.path, self.npcpos)

    def make_split(self):
        self.ready_npcs()

        bs.split(self.path, [self.tilepos, self.chestpos, self.signpos, self.npcpos, self.npcs.endpos])


def get_content(f, layers=5):  # not done yet
    with open(f, "rb") as f:
        header = get_header(f)[0]
        if layers > 1:
            tiles = get_tiles(f, header["width"], header["height"])
        else:
            return (header,)
    return header, tiles


def get_multis():

    def set_multi_2x2(tid, f):

        stride = multitilestrides[tid]