Refactor
This commit is contained in:
@@ -113,16 +113,6 @@ if(ENABLE_TESTS)
|
||||
endif()
|
||||
|
||||
# Build assets
|
||||
# add_custom_target(DUSK_ASSETS_BUILT ALL
|
||||
# COMMAND
|
||||
# ${Python3_EXECUTABLE} ${DUSK_TOOLS_DIR}/assettool.py
|
||||
# --assets ${DUSK_GAME_ASSETS_DIR}
|
||||
# --output-assets ${DUSK_BUILT_ASSETS_DIR}
|
||||
# --output-file ${DUSK_BUILD_DIR}/dusk.dsk
|
||||
# --headers-dir ${DUSK_GENERATED_HEADERS_DIR}
|
||||
# --input ${DUSK_ASSETS}
|
||||
# )
|
||||
# add_dependencies(${DUSK_LIBRARY_TARGET_NAME} DUSK_ASSETS_BUILT)
|
||||
dusk_run_python(
|
||||
DUSK_ASSETS_BUILT
|
||||
tools.asset.bundle
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import sys, os
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.processasset import processAsset
|
||||
from tools.assetstool.processpalette import processPaletteList
|
||||
from tools.assetstool.processtileset import processTilesetList
|
||||
from tools.assetstool.processlanguage import processLanguageList
|
||||
from tools.assetstool.assethelpers import getBuiltAssetsRelativePath
|
||||
from tools.asset.args import args
|
||||
from tools.asset.process.asset import processAsset
|
||||
from tools.asset.process.palette import processPaletteList
|
||||
from tools.asset.process.tileset import processTilesetList
|
||||
from tools.asset.process.language import processLanguageList
|
||||
from tools.asset.path import getBuiltAssetsRelativePath
|
||||
import zipfile
|
||||
|
||||
# Parse input file args.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
from tools.assetstool.args import args
|
||||
from tools.asset.args import args
|
||||
|
||||
def getAssetRelativePath(fullPath):
|
||||
# Get the relative path to the asset
|
||||
@@ -1,11 +1,11 @@
|
||||
import sys
|
||||
# from processtileset import processTileset
|
||||
from tools.assetstool.processimage import processImage
|
||||
from tools.assetstool.processpalette import processPalette
|
||||
from tools.assetstool.processtileset import processTileset
|
||||
from tools.assetstool.processmap import processMap
|
||||
from tools.assetstool.processlanguage import processLanguage
|
||||
from tools.assetstool.processscript import processScript
|
||||
from tools.asset.process.image import processImage
|
||||
from tools.asset.process.palette import processPalette
|
||||
from tools.asset.process.tileset import processTileset
|
||||
from tools.asset.process.map import processMap
|
||||
from tools.asset.process.language import processLanguage
|
||||
from tools.asset.process.script import processScript
|
||||
|
||||
processedAssets = []
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
import sys
|
||||
from PIL import Image
|
||||
from tools.assetstool.processpalette import extractPaletteFromImage, palettes
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.assethelpers import getAssetRelativePath
|
||||
from tools.assetstool.assetcache import assetGetCache, assetCache
|
||||
from tools.asset.process.palette import extractPaletteFromImage, palettes
|
||||
from tools.asset.args import args
|
||||
from tools.asset.path import getAssetRelativePath
|
||||
from tools.asset.cache import assetGetCache, assetCache
|
||||
|
||||
images = []
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
import os
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.assetcache import assetCache, assetGetCache
|
||||
from tools.assetstool.assethelpers import getAssetRelativePath
|
||||
from tools.asset.args import args
|
||||
from tools.asset.cache import assetCache, assetGetCache
|
||||
from tools.asset.path import getAssetRelativePath
|
||||
from tools.dusk.defs import defs
|
||||
import polib
|
||||
import re
|
||||
@@ -2,9 +2,9 @@ import struct
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.assetcache import assetCache, assetGetCache
|
||||
from tools.assetstool.assethelpers import getAssetRelativePath
|
||||
from tools.asset.args import args
|
||||
from tools.asset.cache import assetCache, assetGetCache
|
||||
from tools.asset.path import getAssetRelativePath
|
||||
from tools.dusk.defs import TILE_WIDTH, TILE_HEIGHT, TILE_DEPTH, CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH, CHUNK_TILE_COUNT
|
||||
from tools.dusk.map import Map
|
||||
from tools.dusk.chunk import Chunk
|
||||
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
from PIL import Image
|
||||
import datetime
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.assetcache import assetCache, assetGetCache
|
||||
from tools.asset.args import args
|
||||
from tools.asset.cache import assetCache, assetGetCache
|
||||
|
||||
palettes = []
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
import os
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.assetcache import assetCache, assetGetCache
|
||||
from tools.assetstool.assethelpers import getAssetRelativePath
|
||||
from tools.asset.args import args
|
||||
from tools.asset.cache import assetCache, assetGetCache
|
||||
from tools.asset.path import getAssetRelativePath
|
||||
from tools.dusk.defs import fileDefs
|
||||
|
||||
def processScript(asset):
|
||||
@@ -3,10 +3,10 @@ import sys
|
||||
import os
|
||||
import datetime
|
||||
from xml.etree import ElementTree
|
||||
from tools.assetstool.processimage import processImage
|
||||
from tools.assetstool.assethelpers import getAssetRelativePath
|
||||
from tools.assetstool.args import args
|
||||
from tools.assetstool.assetcache import assetGetCache, assetCache
|
||||
from tools.asset.process.image import processImage
|
||||
from tools.asset.path import getAssetRelativePath
|
||||
from tools.asset.args import args
|
||||
from tools.asset.cache import assetGetCache, assetCache
|
||||
|
||||
tilesets = []
|
||||
|
||||
@@ -5,7 +5,7 @@ from tools.dusk.defs import CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH, CHUNK_VERTEX
|
||||
from tools.dusk.tile import Tile
|
||||
from tools.dusk.entity import Entity
|
||||
from tools.dusk.region import Region
|
||||
from tools.editortool.map.vertexbuffer import VertexBuffer
|
||||
from tools.editor.map.vertexbuffer import VertexBuffer
|
||||
from OpenGL.GL import *
|
||||
|
||||
class Chunk:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from tools.dusk.defs import ENTITY_TYPE_NULL, ENTITY_TYPE_NPC, CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH, TILE_WIDTH, TILE_HEIGHT, TILE_DEPTH
|
||||
from tools.editortool.map.vertexbuffer import VertexBuffer
|
||||
from tools.editor.map.vertexbuffer import VertexBuffer
|
||||
|
||||
class Entity:
|
||||
def __init__(self, chunk, localX=0, localY=0, localZ=0):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from tools.dusk.defs import CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH, TILE_WIDTH, TILE_HEIGHT, TILE_DEPTH
|
||||
from tools.editortool.map.vertexbuffer import VertexBuffer
|
||||
from tools.editor.map.vertexbuffer import VertexBuffer
|
||||
from OpenGL.GL import *
|
||||
from OpenGL.GLU import *
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ from PyQt5.QtWidgets import (
|
||||
)
|
||||
from OpenGL.GL import *
|
||||
from OpenGL.GLU import *
|
||||
from tools.editortool.maptool import MapWindow
|
||||
from tools.editortool.langtool import LangToolWindow
|
||||
from tools.editortool.cutscenetool import CutsceneToolWindow
|
||||
from tools.editor.maptool import MapWindow
|
||||
from tools.editor.langtool import LangToolWindow
|
||||
from tools.editor.cutscenetool import CutsceneToolWindow
|
||||
|
||||
DEFAULT_TOOL = None
|
||||
DEFAULT_TOOL = "map"
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QListWidget, QListWidgetItem, QMenuBar, QAction, QFileDialog, QMessageBox
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from tools.editortool.cutscene.cutsceneitemeditor import CutsceneItemEditor
|
||||
from tools.editortool.cutscene.cutscenemenubar import CutsceneMenuBar
|
||||
from tools.editor.cutscene.cutsceneitemeditor import CutsceneItemEditor
|
||||
from tools.editor.cutscene.cutscenemenubar import CutsceneMenuBar
|
||||
import sys
|
||||
|
||||
class CutsceneToolWindow(QMainWindow):
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QGridLayout, QPushButton, QTabWidget, QLabel
|
||||
from tools.editortool.map.chunkpanel import ChunkPanel
|
||||
from tools.editortool.map.entitypanel import EntityPanel
|
||||
from tools.editortool.map.regionpanel import RegionPanel
|
||||
from tools.editor.map.chunkpanel import ChunkPanel
|
||||
from tools.editor.map.entitypanel import EntityPanel
|
||||
from tools.editor.map.regionpanel import RegionPanel
|
||||
|
||||
class MapLeftPanel(QWidget):
|
||||
def __init__(self, parent):
|
||||
@@ -1,16 +1,16 @@
|
||||
import os
|
||||
from PyQt5.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QMessageBox
|
||||
from PyQt5.QtCore import Qt
|
||||
from tools.editortool.map.glwidget import GLWidget
|
||||
from tools.editortool.map.mapleftpanel import MapLeftPanel
|
||||
from tools.editortool.map.mapinfopanel import MapInfoPanel
|
||||
from tools.editortool.map.menubar import MapMenubar
|
||||
from tools.editortool.map.statusbar import StatusBar
|
||||
from tools.editor.map.glwidget import GLWidget
|
||||
from tools.editor.map.mapleftpanel import MapLeftPanel
|
||||
from tools.editor.map.mapinfopanel import MapInfoPanel
|
||||
from tools.editor.map.menubar import MapMenubar
|
||||
from tools.editor.map.statusbar import StatusBar
|
||||
from tools.dusk.map import Map
|
||||
from tools.dusk.defs import CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH, TILE_SHAPE_NULL, TILE_SHAPE_FLOOR
|
||||
from tools.editortool.map.selectbox import SelectBox
|
||||
from tools.editortool.map.camera import Camera
|
||||
from tools.editortool.map.grid import Grid
|
||||
from tools.editor.map.selectbox import SelectBox
|
||||
from tools.editor.map.camera import Camera
|
||||
from tools.editor.map.grid import Grid
|
||||
|
||||
class MapWindow(QMainWindow):
|
||||
def __init__(self):
|
||||
Reference in New Issue
Block a user