Reorganize source into playscii/ package
Move all root .py files into playscii/ package directory. Rename playscii.py to app.py, add __main__.py entry point. Convert bare imports to relative (within package) and absolute (in formats/ and games/). Data dirs stay at root.
This commit is contained in:
parent
9b7e7becc5
commit
d84d1d809b
89 changed files with 276 additions and 257 deletions
|
|
@ -7,7 +7,7 @@ we maintain our own git repo.
|
|||
|
||||
running
|
||||
-------
|
||||
just run launch the app (uv run python playscii.py)
|
||||
just run launch the app (uv run python -m playscii)
|
||||
just check lint gate (ruff check + format)
|
||||
just lint ruff check --fix + ruff format
|
||||
just typecheck ty check (601 errors, legacy code, not in check gate)
|
||||
|
|
@ -16,14 +16,19 @@ running
|
|||
|
||||
project structure
|
||||
-----------------
|
||||
all python source lives at the repo root (no src/ layout)
|
||||
~50 .py files, flat structure, no packages
|
||||
python source organized as playscii/ package (~50 .py files)
|
||||
data directories (charsets/, palettes/, etc.) live at repo root
|
||||
formats/ and games/ also at root (loaded dynamically via importlib)
|
||||
|
||||
playscii/
|
||||
__init__.py package marker
|
||||
__main__.py entry point for python -m playscii
|
||||
app.py main application, SDL2/OpenGL setup (was playscii.py)
|
||||
art.py art/canvas management, the core data model
|
||||
ui*.py ~20 UI modules (dialogs, panels, menus, toolbar, etc.)
|
||||
game_*.py game engine (objects, rooms, world, HUD)
|
||||
renderable*.py rendering pipeline (sprites, lines, framebuffer)
|
||||
|
||||
playscii.py main entry point, app init, SDL2/OpenGL setup
|
||||
art.py art/canvas management, the core data model
|
||||
ui*.py ~20 UI modules (dialogs, panels, menus, toolbar, etc.)
|
||||
game_*.py game engine (objects, rooms, world, HUD)
|
||||
renderable*.py rendering pipeline (sprites, lines, framebuffer)
|
||||
formats/ import/export handlers (ANS, ATA, BMP, EDSCII, PNG, GIF, TXT)
|
||||
games/ bundled example games (crawler, fireplace, flood, maze, shmup, etc.)
|
||||
charsets/ 30+ classic computer character sets (.char + .png)
|
||||
|
|
@ -44,6 +49,12 @@ dependencies
|
|||
|
||||
gotchas
|
||||
-------
|
||||
package structure:
|
||||
all python source now lives in playscii/ package. files use relative
|
||||
imports (from .art import ...). formats/ and games/ use absolute imports
|
||||
(from playscii.art import ...). data directories stay at root since the
|
||||
app uses CWD-relative paths to load charsets, shaders, etc.
|
||||
|
||||
art scripts and exec():
|
||||
art.py imports random at module level with a noqa comment. art scripts
|
||||
(.arsc files) are loaded via exec() in art.py's scope. they use random
|
||||
|
|
@ -52,14 +63,14 @@ gotchas
|
|||
in art.py — check before removing anything.
|
||||
|
||||
pdoc detection:
|
||||
playscii.py has a contextlib.suppress block that tries to import pdoc.
|
||||
app.py has a contextlib.suppress block that tries to import pdoc.
|
||||
the import MUST stay inside the suppress block. if it gets moved or
|
||||
removed, pdoc_available becomes unconditionally True and the help menu
|
||||
breaks when pdoc isn't installed.
|
||||
|
||||
SDL2 init ordering:
|
||||
many modules import from playscii.py's namespace or expect SDL2 to be
|
||||
initialized before they run. import order in playscii.py matters — E402
|
||||
many modules import from app.py's namespace or expect SDL2 to be
|
||||
initialized before they run. import order in app.py matters — E402
|
||||
is disabled for this reason.
|
||||
|
||||
mutable default arguments:
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
venv/*.*
|
||||
dist/*.*
|
||||
build/*.*
|
||||
playscii/__pycache__/*.*
|
||||
__pycache__/*.*
|
||||
.idea/*.*
|
||||
playscii.profile
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_import import ArtImporter
|
||||
from playscii.art_import import ArtImporter
|
||||
|
||||
DEFAULT_FG, DEFAULT_BG = 7, 0
|
||||
WIDTH = 80
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_import import ArtImporter
|
||||
from playscii.art_import import ArtImporter
|
||||
|
||||
# import as white on black for ease of edit + export
|
||||
DEFAULT_FG, DEFAULT_BG = 113, 1
|
||||
|
|
|
|||
|
|
@ -4,14 +4,13 @@
|
|||
import os
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from art import DEFAULT_CHARSET, DEFAULT_HEIGHT, DEFAULT_PALETTE, DEFAULT_WIDTH
|
||||
from art_import import ArtImporter
|
||||
from image_convert import ImageConverter
|
||||
from palette import PaletteFromFile
|
||||
from ui_art_dialog import ImportOptionsDialog
|
||||
from ui_dialog import Field, UIDialog
|
||||
from ui_file_chooser_dialog import ImageFileChooserDialog
|
||||
from playscii.art import DEFAULT_CHARSET, DEFAULT_HEIGHT, DEFAULT_PALETTE, DEFAULT_WIDTH
|
||||
from playscii.art_import import ArtImporter
|
||||
from playscii.image_convert import ImageConverter
|
||||
from playscii.palette import PaletteFromFile
|
||||
from playscii.ui_art_dialog import ImportOptionsDialog
|
||||
from playscii.ui_dialog import Field, UIDialog
|
||||
from playscii.ui_file_chooser_dialog import ImageFileChooserDialog
|
||||
|
||||
# custom chooser showing image previews, shares parent w/ "palette from image"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
import numpy as np
|
||||
|
||||
from formats.in_bitmap import (
|
||||
BitmapImageImporter,
|
||||
ConvertImageChooserDialog,
|
||||
ConvertImageOptionsDialog,
|
||||
)
|
||||
from image_convert import ImageConverter
|
||||
from ui_dialog import Field, SkipFieldType, UIDialog
|
||||
from playscii.image_convert import ImageConverter
|
||||
from playscii.ui_dialog import Field, SkipFieldType, UIDialog
|
||||
|
||||
|
||||
class TwoColorConvertImageOptionsDialog(ConvertImageOptionsDialog):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import os
|
|||
import time
|
||||
|
||||
import formats.in_bitmap as bm
|
||||
import image_convert
|
||||
from playscii import image_convert
|
||||
|
||||
|
||||
class ImageSequenceConverter:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from art_import import ArtImporter
|
||||
from ui_art_dialog import ImportOptionsDialog
|
||||
from ui_dialog import Field, UIDialog
|
||||
from playscii.art_import import ArtImporter
|
||||
from playscii.ui_art_dialog import ImportOptionsDialog
|
||||
from playscii.ui_dialog import Field, UIDialog
|
||||
|
||||
|
||||
class EDSCIIImportOptionsDialog(ImportOptionsDialog):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_import import ArtImporter
|
||||
from playscii.art_import import ArtImporter
|
||||
|
||||
|
||||
class EndDoomImporter(ArtImporter):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_import import ArtImporter
|
||||
from playscii.art_import import ArtImporter
|
||||
|
||||
|
||||
class TextImporter(ArtImporter):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_export import ArtExporter
|
||||
from playscii.art_export import ArtExporter
|
||||
|
||||
WIDTH = 80
|
||||
ENCODING = "cp1252" # old default
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from art import TileIter
|
||||
from art_export import ArtExporter
|
||||
from playscii.art import TileIter
|
||||
from playscii.art_export import ArtExporter
|
||||
|
||||
|
||||
class ANSExporter(ArtExporter):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_export import ArtExporter
|
||||
from playscii.art_export import ArtExporter
|
||||
|
||||
WIDTH, HEIGHT = 80, 25
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from art_export import ArtExporter
|
||||
from image_export import export_animation
|
||||
from playscii.art_export import ArtExporter
|
||||
from playscii.image_export import export_animation
|
||||
|
||||
|
||||
class GIFExporter(ArtExporter):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from art_export import ArtExporter
|
||||
from image_export import export_still_image
|
||||
from ui_art_dialog import ExportOptionsDialog
|
||||
from ui_dialog import Field, UIDialog
|
||||
from playscii.art_export import ArtExporter
|
||||
from playscii.image_export import export_still_image
|
||||
from playscii.ui_art_dialog import ExportOptionsDialog
|
||||
from playscii.ui_dialog import Field, UIDialog
|
||||
|
||||
DEFAULT_SCALE = 4
|
||||
DEFAULT_CRT = True
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import os
|
||||
|
||||
from art_export import ArtExporter
|
||||
from image_export import export_still_image
|
||||
from renderable import LAYER_VIS_FULL, LAYER_VIS_NONE
|
||||
from ui_art_dialog import ExportOptionsDialog
|
||||
from ui_dialog import Field, UIDialog
|
||||
from playscii.art_export import ArtExporter
|
||||
from playscii.image_export import export_still_image
|
||||
from playscii.renderable import LAYER_VIS_FULL, LAYER_VIS_NONE
|
||||
from playscii.ui_art_dialog import ExportOptionsDialog
|
||||
from playscii.ui_dialog import Field, UIDialog
|
||||
|
||||
FILE_EXTENSION = "png"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from art_export import ArtExporter
|
||||
from playscii.art_export import ArtExporter
|
||||
|
||||
|
||||
class TextExporter(ArtExporter):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from game_object import GameObject
|
||||
from playscii.game_object import GameObject
|
||||
|
||||
# initial work: 2019-02-17 and 18
|
||||
# FP view research: 2021-11-22
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import vector
|
||||
from game_object import GameObject
|
||||
from renderable_line import DebugLineRenderable
|
||||
from playscii import vector
|
||||
from playscii.game_object import GameObject
|
||||
from playscii.renderable_line import DebugLineRenderable
|
||||
|
||||
# stuff for troubleshooting "get tiles intersecting line" etc
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
from game_util_objects import Player
|
||||
from games.crawler.scripts.crawler import (
|
||||
DIR_EAST,
|
||||
DIR_NAMES,
|
||||
|
|
@ -9,6 +8,7 @@ from games.crawler.scripts.crawler import (
|
|||
OPPOSITE_DIRS,
|
||||
RIGHT_TURN_DIRS,
|
||||
)
|
||||
from playscii.game_util_objects import Player
|
||||
|
||||
|
||||
class CrawlPlayer(Player):
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
from art import TileIter
|
||||
from game_object import GameObject
|
||||
from games.crawler.scripts.crawler import (
|
||||
DIR_EAST,
|
||||
DIR_NORTH,
|
||||
DIR_SOUTH,
|
||||
DIR_WEST,
|
||||
)
|
||||
from vector import get_tiles_along_integer_line
|
||||
from playscii.art import TileIter
|
||||
from playscii.game_object import GameObject
|
||||
from playscii.vector import get_tiles_along_integer_line
|
||||
|
||||
|
||||
class CrawlTopDownView(GameObject):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
from game_util_objects import DynamicBoxObject, Pickup, StaticTileObject, TopDownPlayer
|
||||
from playscii.game_util_objects import (
|
||||
DynamicBoxObject,
|
||||
Pickup,
|
||||
StaticTileObject,
|
||||
TopDownPlayer,
|
||||
)
|
||||
|
||||
|
||||
class CronoPlayer(TopDownPlayer):
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import os
|
|||
import webbrowser
|
||||
from random import choice, randint
|
||||
|
||||
from art import TileIter
|
||||
from game_object import GameObject
|
||||
from playscii.art import TileIter
|
||||
from playscii.game_object import GameObject
|
||||
|
||||
#
|
||||
# some tuning knobs
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from random import choice
|
||||
|
||||
from art import TileIter
|
||||
from game_object import GameObject
|
||||
from playscii.art import TileIter
|
||||
from playscii.game_object import GameObject
|
||||
|
||||
# TODO:
|
||||
# solver? https://stackoverflow.com/questions/1430962/how-to-optimally-solve-the-flood-fill-puzzle
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from game_hud import GameHUD, GameHUDRenderable
|
||||
from playscii.game_hud import GameHUD, GameHUDRenderable
|
||||
|
||||
|
||||
class MazeHUD(GameHUD):
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import math
|
||||
import random
|
||||
|
||||
from art import TileIter
|
||||
from collision import (
|
||||
from playscii.art import TileIter
|
||||
from playscii.collision import (
|
||||
CST_CIRCLE,
|
||||
CST_TILE,
|
||||
CT_GENERIC_DYNAMIC,
|
||||
CT_GENERIC_STATIC,
|
||||
CT_NONE,
|
||||
)
|
||||
from game_object import GameObject
|
||||
from game_util_objects import Player, StaticTileBG
|
||||
from playscii.game_object import GameObject
|
||||
from playscii.game_util_objects import Player, StaticTileBG
|
||||
|
||||
|
||||
class MazeBG(StaticTileBG):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import math
|
||||
|
||||
from game_util_objects import BlobShadow, Player
|
||||
from games.maze.scripts.rooms import OutsideRoom
|
||||
from playscii.game_util_objects import BlobShadow, Player
|
||||
|
||||
|
||||
class PlayerBlobShadow(BlobShadow):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from game_room import GameRoom
|
||||
from playscii.game_room import GameRoom
|
||||
|
||||
|
||||
class MazeRoom(GameRoom):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import math
|
||||
import random
|
||||
|
||||
from game_util_objects import Character, Player, StaticTileBG, WarpTrigger
|
||||
from playscii.game_util_objects import Character, Player, StaticTileBG, WarpTrigger
|
||||
|
||||
|
||||
class PlatformWorld(StaticTileBG):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
import math
|
||||
import random
|
||||
|
||||
from game_object import GameObject
|
||||
from game_util_objects import Character, ObjectSpawner, Player, Projectile, StaticTileBG
|
||||
from playscii.game_object import GameObject
|
||||
from playscii.game_util_objects import (
|
||||
Character,
|
||||
ObjectSpawner,
|
||||
Player,
|
||||
Projectile,
|
||||
StaticTileBG,
|
||||
)
|
||||
|
||||
|
||||
class ShmupPlayer(Player):
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import random
|
||||
import time
|
||||
|
||||
from art import ART_DIR, UV_FLIPX, UV_FLIPY, UV_ROTATE180
|
||||
from game_object import GameObject
|
||||
from games.wildflowers.scripts.frond import Frond
|
||||
from games.wildflowers.scripts.petal import Petal
|
||||
from games.wildflowers.scripts.ramps import PALETTE_RAMPS
|
||||
from renderable import TileRenderable
|
||||
from playscii.art import ART_DIR, UV_FLIPX, UV_FLIPY, UV_ROTATE180
|
||||
from playscii.game_object import GameObject
|
||||
from playscii.renderable import TileRenderable
|
||||
|
||||
# TODO: random size range?
|
||||
# (should also change camera zoom, probably frond/petal counts)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from game_util_objects import GameObject, WorldGlobalsObject
|
||||
from image_export import export_still_image
|
||||
from playscii.game_util_objects import GameObject, WorldGlobalsObject
|
||||
from playscii.image_export import export_still_image
|
||||
|
||||
"""
|
||||
overall approach:
|
||||
|
|
|
|||
2
justfile
2
justfile
|
|
@ -11,4 +11,4 @@ test:
|
|||
check: lint
|
||||
|
||||
run:
|
||||
uv run python playscii.py
|
||||
uv run python -m playscii
|
||||
|
|
|
|||
1
playscii/__init__.py
Normal file
1
playscii/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# playscii package
|
||||
9
playscii/__main__.py
Normal file
9
playscii/__main__.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import sys
|
||||
|
||||
from .app import get_app
|
||||
|
||||
app = get_app()
|
||||
error = app.main_loop()
|
||||
app.quit()
|
||||
app.logger.close()
|
||||
sys.exit(error)
|
||||
|
|
@ -49,7 +49,7 @@ with contextlib.suppress(Exception):
|
|||
pdoc_available = True
|
||||
|
||||
# submodules - set here so cfg file can modify them all easily
|
||||
from art import (
|
||||
from .art import (
|
||||
ART_DIR,
|
||||
ART_FILE_EXTENSION,
|
||||
ART_SCRIPT_DIR,
|
||||
|
|
@ -61,25 +61,25 @@ from art import (
|
|||
Art,
|
||||
ArtFromDisk,
|
||||
)
|
||||
from art_export import ArtExporter
|
||||
from art_import import ArtImporter
|
||||
from audio import AudioLord
|
||||
from camera import Camera
|
||||
from charset import CHARSET_DIR, CharacterSet, CharacterSetLord
|
||||
from cursor import Cursor
|
||||
from framebuffer import Framebuffer
|
||||
from game_world import TOP_GAME_DIR, GameWorld
|
||||
from grid import ArtGrid
|
||||
from input_handler import InputLord
|
||||
from palette import PALETTE_DIR, Palette, PaletteLord
|
||||
from renderable import OnionTileRenderable, TileRenderable
|
||||
from .art_export import ArtExporter
|
||||
from .art_import import ArtImporter
|
||||
from .audio import AudioLord
|
||||
from .camera import Camera
|
||||
from .charset import CHARSET_DIR, CharacterSet, CharacterSetLord
|
||||
from .cursor import Cursor
|
||||
from .framebuffer import Framebuffer
|
||||
from .game_world import TOP_GAME_DIR, GameWorld
|
||||
from .grid import ArtGrid
|
||||
from .input_handler import InputLord
|
||||
from .palette import PALETTE_DIR, Palette, PaletteLord
|
||||
from .renderable import OnionTileRenderable, TileRenderable
|
||||
|
||||
# some classes are imported only so the cfg file can modify their defaults
|
||||
from renderable_line import DebugLineRenderable
|
||||
from renderable_sprite import SpriteRenderable, UIBGTextureRenderable
|
||||
from shader import ShaderLord
|
||||
from ui import OIS_WIDTH, UI
|
||||
from ui_file_chooser_dialog import THUMBNAIL_CACHE_DIR
|
||||
from .renderable_line import DebugLineRenderable
|
||||
from .renderable_sprite import SpriteRenderable, UIBGTextureRenderable
|
||||
from .shader import ShaderLord
|
||||
from .ui import OIS_WIDTH, UI
|
||||
from .ui_file_chooser_dialog import THUMBNAIL_CACHE_DIR
|
||||
|
||||
APP_NAME = "Playscii"
|
||||
VERSION_FILENAME = "version"
|
||||
|
|
@ -1145,7 +1145,8 @@ class Application:
|
|||
return
|
||||
for module_name in AUTOGEN_DOC_MODULES:
|
||||
# pdoc.pdoc takes module name as string, returns HTML doc string
|
||||
html = pdoc.pdoc(module_name)
|
||||
qualified_name = f"playscii.{module_name}"
|
||||
html = pdoc.pdoc(qualified_name)
|
||||
docfile = open(AUTOGEN_DOCS_PATH + module_name + ".html", "w")
|
||||
docfile.write(html)
|
||||
docfile.close()
|
||||
|
|
@ -1317,11 +1318,3 @@ def get_app():
|
|||
autoplay_game,
|
||||
)
|
||||
return app
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = get_app()
|
||||
error = app.main_loop()
|
||||
app.quit()
|
||||
app.logger.close()
|
||||
sys.exit(error)
|
||||
|
|
@ -6,8 +6,8 @@ import traceback
|
|||
|
||||
import numpy as np
|
||||
|
||||
from edit_command import CommandStack, EntireArtCommand
|
||||
from image_export import write_thumbnail
|
||||
from .edit_command import CommandStack, EntireArtCommand
|
||||
from .image_export import write_thumbnail
|
||||
|
||||
# X, Y, Z
|
||||
VERT_LENGTH = 3
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import traceback
|
||||
|
||||
from art import ART_DIR
|
||||
from .art import ART_DIR
|
||||
|
||||
|
||||
class ArtExporter:
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import os
|
||||
import traceback
|
||||
|
||||
from art import ART_FILE_EXTENSION, DEFAULT_CHARSET, DEFAULT_PALETTE
|
||||
from ui_file_chooser_dialog import GenericImportChooserDialog
|
||||
from .art import ART_FILE_EXTENSION, DEFAULT_CHARSET, DEFAULT_PALETTE
|
||||
from .ui_file_chooser_dialog import GenericImportChooserDialog
|
||||
|
||||
|
||||
class ArtImporter:
|
||||
|
|
@ -2,7 +2,7 @@ import math
|
|||
|
||||
import numpy as np
|
||||
|
||||
import vector
|
||||
from . import vector
|
||||
|
||||
|
||||
def clamp(val, lowest, highest):
|
||||
|
|
@ -4,7 +4,7 @@ import time
|
|||
|
||||
from PIL import Image
|
||||
|
||||
from texture import Texture
|
||||
from .texture import Texture
|
||||
|
||||
CHARSET_DIR = "charsets/"
|
||||
CHARSET_FILE_EXTENSION = "char"
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import math
|
||||
from collections import namedtuple
|
||||
|
||||
from renderable_line import (
|
||||
from .renderable_line import (
|
||||
BoxCollisionRenderable,
|
||||
CircleCollisionRenderable,
|
||||
TileBoxCollisionRenderable,
|
||||
|
|
@ -4,9 +4,9 @@ import math
|
|||
import numpy as np
|
||||
from OpenGL import GL
|
||||
|
||||
import vector
|
||||
from edit_command import EditCommand
|
||||
from renderable_sprite import UISpriteRenderable
|
||||
from . import vector
|
||||
from .edit_command import EditCommand
|
||||
from .renderable_sprite import UISpriteRenderable
|
||||
|
||||
"""
|
||||
reference diagram:
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from art import Art
|
||||
from renderable import TileRenderable
|
||||
from .art import Art
|
||||
from .renderable import TileRenderable
|
||||
|
||||
|
||||
class GameHUDArt(Art):
|
||||
|
|
@ -2,9 +2,9 @@ import math
|
|||
import os
|
||||
import random
|
||||
|
||||
import vector
|
||||
from art import ArtInstance
|
||||
from collision import (
|
||||
from . import vector
|
||||
from .art import ArtInstance
|
||||
from .collision import (
|
||||
CST_AABB,
|
||||
CST_CIRCLE,
|
||||
CST_NONE,
|
||||
|
|
@ -15,8 +15,8 @@ from collision import (
|
|||
Contact,
|
||||
point_in_box,
|
||||
)
|
||||
from renderable import GameObjectRenderable
|
||||
from renderable_line import BoundsIndicatorRenderable, OriginIndicatorRenderable
|
||||
from .renderable import GameObjectRenderable
|
||||
from .renderable_line import BoundsIndicatorRenderable, OriginIndicatorRenderable
|
||||
|
||||
# facings
|
||||
GOF_LEFT = 0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from game_object import GameObject
|
||||
from .game_object import GameObject
|
||||
|
||||
|
||||
class GameRoom:
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import os.path
|
||||
import random
|
||||
|
||||
from collision import (
|
||||
from .collision import (
|
||||
CST_AABB,
|
||||
CST_CIRCLE,
|
||||
CST_TILE,
|
||||
|
|
@ -10,7 +10,7 @@ from collision import (
|
|||
CT_NONE,
|
||||
CT_PLAYER,
|
||||
)
|
||||
from game_object import FACING_DIRS, GameObject
|
||||
from .game_object import FACING_DIRS, GameObject
|
||||
|
||||
|
||||
class GameObjectAttachment(GameObject):
|
||||
|
|
@ -9,17 +9,12 @@ from collections import namedtuple
|
|||
|
||||
import sdl2
|
||||
|
||||
import collision
|
||||
import game_hud
|
||||
import game_object
|
||||
import game_room
|
||||
import game_util_objects
|
||||
import vector
|
||||
from art import ART_DIR
|
||||
from camera import Camera
|
||||
from charset import CHARSET_DIR
|
||||
from grid import GameGrid
|
||||
from palette import PALETTE_DIR
|
||||
from . import collision, game_hud, game_object, game_room, game_util_objects, vector
|
||||
from .art import ART_DIR
|
||||
from .camera import Camera
|
||||
from .charset import CHARSET_DIR
|
||||
from .grid import GameGrid
|
||||
from .palette import PALETTE_DIR
|
||||
|
||||
TOP_GAME_DIR = "games/"
|
||||
DEFAULT_STATE_FILENAME = "start"
|
||||
|
|
@ -29,8 +24,8 @@ SOUNDS_DIR = "sounds/"
|
|||
|
||||
# generic starter script with a GO and Player subclass
|
||||
STARTER_SCRIPT = """
|
||||
from game_object import GameObject
|
||||
from game_util_objects import Player
|
||||
from playscii.game_object import GameObject
|
||||
from playscii.game_util_objects import Player
|
||||
|
||||
|
||||
class MyGamePlayer(Player):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import numpy as np
|
||||
|
||||
from renderable_line import LineRenderable
|
||||
from .renderable_line import LineRenderable
|
||||
|
||||
# grid that displays as guide for Cursor
|
||||
|
||||
|
|
@ -5,8 +5,8 @@ import time
|
|||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
from lab_color import lab_color_diff, rgb_to_lab
|
||||
from renderable_sprite import SpriteRenderable
|
||||
from .lab_color import lab_color_diff, rgb_to_lab
|
||||
from .renderable_sprite import SpriteRenderable
|
||||
|
||||
"""
|
||||
notes / future research
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from OpenGL import GL
|
||||
from PIL import GifImagePlugin, Image, ImageChops
|
||||
|
||||
from framebuffer import ExportFramebuffer, ExportFramebufferNoCRT
|
||||
from .framebuffer import ExportFramebuffer, ExportFramebufferNoCRT
|
||||
|
||||
|
||||
def get_frame_image(app, art, frame, allow_crt=True, scale=1, bg_color=(0, 0, 0, 0)):
|
||||
|
|
@ -5,12 +5,12 @@ from sys import exit
|
|||
|
||||
import sdl2
|
||||
|
||||
from art import ART_DIR, ART_FILE_EXTENSION
|
||||
from collision import CT_NONE
|
||||
from key_shifts import NUMLOCK_OFF_MAP, NUMLOCK_ON_MAP
|
||||
from renderable import LAYER_VIS_DIM, LAYER_VIS_FULL, LAYER_VIS_NONE
|
||||
from ui import OIS_FILL, OIS_HEIGHT, OIS_WIDTH, SCALE_INCREMENT
|
||||
from ui_art_dialog import (
|
||||
from .art import ART_DIR, ART_FILE_EXTENSION
|
||||
from .collision import CT_NONE
|
||||
from .key_shifts import NUMLOCK_OFF_MAP, NUMLOCK_ON_MAP
|
||||
from .renderable import LAYER_VIS_DIM, LAYER_VIS_FULL, LAYER_VIS_NONE
|
||||
from .ui import OIS_FILL, OIS_HEIGHT, OIS_WIDTH, SCALE_INCREMENT
|
||||
from .ui_art_dialog import (
|
||||
AddFrameDialog,
|
||||
AddLayerDialog,
|
||||
CloseUnsavedChangesDialog,
|
||||
|
|
@ -32,7 +32,7 @@ from ui_art_dialog import (
|
|||
SetLayerNameDialog,
|
||||
SetLayerZDialog,
|
||||
)
|
||||
from ui_file_chooser_dialog import (
|
||||
from .ui_file_chooser_dialog import (
|
||||
ArtChooserDialog,
|
||||
CharSetChooserDialog,
|
||||
OverlayImageFileChooserDialog,
|
||||
|
|
@ -40,7 +40,7 @@ from ui_file_chooser_dialog import (
|
|||
PaletteFromImageChooserDialog,
|
||||
RunArtScriptDialog,
|
||||
)
|
||||
from ui_game_dialog import (
|
||||
from .ui_game_dialog import (
|
||||
AddRoomDialog,
|
||||
NewGameDirDialog,
|
||||
RenameRoomDialog,
|
||||
|
|
@ -49,7 +49,7 @@ from ui_game_dialog import (
|
|||
SetRoomCamDialog,
|
||||
SetRoomEdgeWarpsDialog,
|
||||
)
|
||||
from ui_list_operations import (
|
||||
from .ui_list_operations import (
|
||||
LO_LOAD_STATE,
|
||||
LO_OPEN_GAME_DIR,
|
||||
LO_SELECT_OBJECTS,
|
||||
|
|
@ -5,8 +5,8 @@ from random import randint
|
|||
|
||||
from PIL import Image
|
||||
|
||||
from lab_color import lab_color_diff, rgb_to_lab
|
||||
from texture import Texture
|
||||
from .lab_color import lab_color_diff, rgb_to_lab
|
||||
from .texture import Texture
|
||||
|
||||
PALETTE_DIR = "palettes/"
|
||||
PALETTE_EXTENSIONS = ["png", "gif", "bmp"]
|
||||
|
|
@ -4,8 +4,8 @@ import math
|
|||
import numpy as np
|
||||
from OpenGL import GL
|
||||
|
||||
from art import VERT_LENGTH
|
||||
from palette import MAX_COLORS
|
||||
from .art import VERT_LENGTH
|
||||
from .palette import MAX_COLORS
|
||||
|
||||
# inactive layer alphas
|
||||
LAYER_VIS_FULL = 1
|
||||
|
|
@ -6,7 +6,7 @@ import time
|
|||
import numpy as np
|
||||
from OpenGL import GL
|
||||
|
||||
from renderable import TileRenderable
|
||||
from .renderable import TileRenderable
|
||||
|
||||
|
||||
class LineRenderable:
|
||||
|
|
@ -5,7 +5,7 @@ import numpy as np
|
|||
from OpenGL import GL
|
||||
from PIL import Image
|
||||
|
||||
from texture import Texture
|
||||
from .texture import Texture
|
||||
|
||||
|
||||
class SpriteRenderable:
|
||||
|
|
@ -2,7 +2,7 @@ import math
|
|||
|
||||
import numpy as np
|
||||
|
||||
from renderable_line import LineRenderable
|
||||
from .renderable_line import LineRenderable
|
||||
|
||||
|
||||
class SelectionRenderable(LineRenderable):
|
||||
|
|
@ -3,17 +3,17 @@ import sdl2
|
|||
from OpenGL import GL
|
||||
from PIL import Image
|
||||
|
||||
from art import (
|
||||
from .art import (
|
||||
UV_FLIP270,
|
||||
UV_NORMAL,
|
||||
uv_names,
|
||||
)
|
||||
from edit_command import EditCommand, EditCommandTile, EntireArtCommand
|
||||
from texture import Texture
|
||||
from ui_colors import UIColors
|
||||
from ui_console import ConsoleUI
|
||||
from ui_edit_panel import EditListPanel
|
||||
from ui_element import (
|
||||
from .edit_command import EditCommand, EditCommandTile, EntireArtCommand
|
||||
from .texture import Texture
|
||||
from .ui_colors import UIColors
|
||||
from .ui_console import ConsoleUI
|
||||
from .ui_edit_panel import EditListPanel
|
||||
from .ui_element import (
|
||||
DebugTextUI,
|
||||
FPSCounterUI,
|
||||
GameHoverLabel,
|
||||
|
|
@ -22,12 +22,12 @@ from ui_element import (
|
|||
ToolTip,
|
||||
UIArt,
|
||||
)
|
||||
from ui_menu_bar import ArtMenuBar, GameMenuBar
|
||||
from ui_menu_pulldown import PulldownMenu
|
||||
from ui_object_panel import EditObjectPanel
|
||||
from ui_popup import ToolPopup
|
||||
from ui_status_bar import StatusBarUI
|
||||
from ui_tool import (
|
||||
from .ui_menu_bar import ArtMenuBar, GameMenuBar
|
||||
from .ui_menu_pulldown import PulldownMenu
|
||||
from .ui_object_panel import EditObjectPanel
|
||||
from .ui_popup import ToolPopup
|
||||
from .ui_status_bar import StatusBarUI
|
||||
from .ui_tool import (
|
||||
EraseTool,
|
||||
FillTool,
|
||||
GrabTool,
|
||||
|
|
@ -37,7 +37,7 @@ from ui_tool import (
|
|||
SelectTool,
|
||||
TextTool,
|
||||
)
|
||||
from ui_toolbar import ArtToolBar
|
||||
from .ui_toolbar import ArtToolBar
|
||||
|
||||
UI_ASSET_DIR = "ui/"
|
||||
SCALE_INCREMENT = 0.25
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import os.path
|
||||
|
||||
from art import (
|
||||
from .art import (
|
||||
ART_DIR,
|
||||
ART_FILE_EXTENSION,
|
||||
DEFAULT_FRAME_DELAY,
|
||||
|
|
@ -8,10 +8,10 @@ from art import (
|
|||
DEFAULT_LAYER_Z_OFFSET,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
from palette import PaletteFromFile
|
||||
from ui_chooser_dialog import ChooserDialog, ChooserItem, ChooserItemButton
|
||||
from ui_console import SaveCommand
|
||||
from ui_dialog import Field, UIDialog
|
||||
from .palette import PaletteFromFile
|
||||
from .ui_chooser_dialog import ChooserDialog, ChooserItem, ChooserItemButton
|
||||
from .ui_console import SaveCommand
|
||||
from .ui_dialog import Field, UIDialog
|
||||
|
||||
|
||||
class BaseFileDialog(UIDialog):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ui_colors import UIColors
|
||||
from .ui_colors import UIColors
|
||||
|
||||
TEXT_LEFT = 0
|
||||
TEXT_CENTER = 1
|
||||
|
|
@ -2,11 +2,11 @@ import os
|
|||
|
||||
import sdl2
|
||||
|
||||
from art import UV_FLIPY, UV_NORMAL
|
||||
from renderable_sprite import UISpriteRenderable
|
||||
from ui_button import UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_dialog import Field, UIDialog
|
||||
from .art import UV_FLIPY, UV_NORMAL
|
||||
from .renderable_sprite import UISpriteRenderable
|
||||
from .ui_button import UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_dialog import Field, UIDialog
|
||||
|
||||
|
||||
class ChooserItemButton(UIButton):
|
||||
|
|
@ -4,12 +4,12 @@ from math import ceil
|
|||
import sdl2
|
||||
|
||||
# imports for console execution namespace - be careful!
|
||||
from art import UV_FLIPY
|
||||
from image_convert import ImageConverter
|
||||
from image_export import export_animation, export_still_image
|
||||
from key_shifts import SHIFT_MAP
|
||||
from palette import PaletteFromFile
|
||||
from ui_element import UIElement
|
||||
from .art import UV_FLIPY
|
||||
from .image_convert import ImageConverter
|
||||
from .image_export import export_animation, export_still_image
|
||||
from .key_shifts import SHIFT_MAP
|
||||
from .palette import PaletteFromFile
|
||||
from .ui_element import UIElement
|
||||
|
||||
CONSOLE_HISTORY_FILENAME = "console_history"
|
||||
|
||||
|
|
@ -3,10 +3,10 @@ from collections import namedtuple
|
|||
|
||||
import sdl2
|
||||
|
||||
from key_shifts import SHIFT_MAP
|
||||
from ui_button import TEXT_CENTER, UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_element import UIElement
|
||||
from .key_shifts import SHIFT_MAP
|
||||
from .ui_button import TEXT_CENTER, UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_element import UIElement
|
||||
|
||||
Field = namedtuple(
|
||||
"Field",
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
|
||||
from game_world import STATE_FILE_EXTENSION, TOP_GAME_DIR
|
||||
from ui_button import UIButton
|
||||
from ui_chooser_dialog import ScrollArrowButton
|
||||
from ui_colors import UIColors
|
||||
from ui_element import UIElement
|
||||
from ui_list_operations import (
|
||||
from .game_world import STATE_FILE_EXTENSION, TOP_GAME_DIR
|
||||
from .ui_button import UIButton
|
||||
from .ui_chooser_dialog import ScrollArrowButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_element import UIElement
|
||||
from .ui_list_operations import (
|
||||
LO_LOAD_STATE,
|
||||
LO_NONE,
|
||||
LO_OPEN_GAME_DIR,
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import time
|
||||
from math import ceil
|
||||
|
||||
import vector
|
||||
from art import Art
|
||||
from renderable import TileRenderable
|
||||
from . import vector
|
||||
from .art import Art
|
||||
from .renderable import TileRenderable
|
||||
|
||||
|
||||
class UIElement:
|
||||
|
|
@ -4,20 +4,20 @@ import time
|
|||
|
||||
from PIL import Image
|
||||
|
||||
from art import (
|
||||
from .art import (
|
||||
ART_DIR,
|
||||
ART_FILE_EXTENSION,
|
||||
ART_SCRIPT_DIR,
|
||||
SCRIPT_FILE_EXTENSION,
|
||||
THUMBNAIL_CACHE_DIR,
|
||||
)
|
||||
from charset import CHARSET_DIR, CHARSET_FILE_EXTENSION
|
||||
from image_export import write_thumbnail
|
||||
from palette import PALETTE_DIR, PALETTE_EXTENSIONS
|
||||
from texture import Texture
|
||||
from ui_art_dialog import ImportOptionsDialog, PaletteFromFileDialog
|
||||
from ui_chooser_dialog import ChooserDialog, ChooserItem
|
||||
from ui_console import OpenCommand
|
||||
from .charset import CHARSET_DIR, CHARSET_FILE_EXTENSION
|
||||
from .image_export import write_thumbnail
|
||||
from .palette import PALETTE_DIR, PALETTE_EXTENSIONS
|
||||
from .texture import Texture
|
||||
from .ui_art_dialog import ImportOptionsDialog, PaletteFromFileDialog
|
||||
from .ui_chooser_dialog import ChooserDialog, ChooserItem
|
||||
from .ui_console import OpenCommand
|
||||
|
||||
|
||||
class BaseFileChooserItem(ChooserItem):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from ui_console import LoadGameStateCommand, SaveGameStateCommand
|
||||
from ui_dialog import Field, UIDialog
|
||||
from ui_list_operations import (
|
||||
from .ui_console import LoadGameStateCommand, SaveGameStateCommand
|
||||
from .ui_dialog import Field, UIDialog
|
||||
from .ui_list_operations import (
|
||||
LO_NONE,
|
||||
)
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ui_menu_pulldown_item import (
|
||||
from .ui_menu_pulldown_item import (
|
||||
FileQuitItem,
|
||||
PulldownMenuData,
|
||||
PulldownMenuItem,
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import sdl2
|
||||
|
||||
from ui_dialog import UIDialog
|
||||
from ui_element import UIElement
|
||||
from .ui_dialog import UIDialog
|
||||
from .ui_element import UIElement
|
||||
|
||||
|
||||
class PagedInfoDialog(UIDialog):
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
from math import ceil
|
||||
|
||||
from renderable_sprite import UISpriteRenderable
|
||||
from ui_button import TEXT_CENTER, UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_element import UIElement
|
||||
from ui_game_menu_pulldown_item import (
|
||||
from .renderable_sprite import UISpriteRenderable
|
||||
from .ui_button import TEXT_CENTER, UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_element import UIElement
|
||||
from .ui_game_menu_pulldown_item import (
|
||||
GameMenuData,
|
||||
GameObjectMenuData,
|
||||
GameRoomMenuData,
|
||||
|
|
@ -12,8 +12,8 @@ from ui_game_menu_pulldown_item import (
|
|||
GameViewMenuData,
|
||||
GameWorldMenuData,
|
||||
)
|
||||
from ui_info_dialog import AboutDialog
|
||||
from ui_menu_pulldown_item import (
|
||||
from .ui_info_dialog import AboutDialog
|
||||
from .ui_menu_pulldown_item import (
|
||||
ArtMenuData,
|
||||
CharColorMenuData,
|
||||
EditMenuData,
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
from art import UV_FLIPX, UV_FLIPY, UV_ROTATE180
|
||||
from ui_button import UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_element import UIElement
|
||||
from ui_menu_pulldown_item import PulldownMenuData, PulldownMenuItem, SeparatorItem
|
||||
from .art import UV_FLIPX, UV_FLIPY, UV_ROTATE180
|
||||
from .ui_button import UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_element import UIElement
|
||||
from .ui_menu_pulldown_item import PulldownMenuData, PulldownMenuItem, SeparatorItem
|
||||
|
||||
|
||||
class MenuItemButton(UIButton):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from renderable import LAYER_VIS_DIM, LAYER_VIS_FULL, LAYER_VIS_NONE
|
||||
from ui_tool import (
|
||||
from .renderable import LAYER_VIS_DIM, LAYER_VIS_FULL, LAYER_VIS_NONE
|
||||
from .ui_tool import (
|
||||
EraseTool,
|
||||
FillTool,
|
||||
GrabTool,
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import os
|
||||
|
||||
from ui_button import TEXT_RIGHT, UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_dialog import Field, UIDialog
|
||||
from ui_edit_panel import GamePanel
|
||||
from .ui_button import TEXT_RIGHT, UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_dialog import Field, UIDialog
|
||||
from .ui_edit_panel import GamePanel
|
||||
|
||||
|
||||
class ResetObjectButton(UIButton):
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
from art import UV_FLIPX, UV_FLIPY, UV_NORMAL, UV_ROTATE90, UV_ROTATE180, UV_ROTATE270
|
||||
from renderable_line import SwatchSelectionBoxRenderable
|
||||
from ui_button import TEXT_CENTER, UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_element import UIArt, UIElement
|
||||
from ui_file_chooser_dialog import CharSetChooserDialog, PaletteChooserDialog
|
||||
from ui_swatch import MIN_CHARSET_WIDTH, CharacterSetSwatch, PaletteSwatch
|
||||
from ui_tool import FILL_BOUND_BG_COLOR, FILL_BOUND_CHAR, FILL_BOUND_FG_COLOR, FillTool
|
||||
from .art import UV_FLIPX, UV_FLIPY, UV_NORMAL, UV_ROTATE90, UV_ROTATE180, UV_ROTATE270
|
||||
from .renderable_line import SwatchSelectionBoxRenderable
|
||||
from .ui_button import TEXT_CENTER, UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_element import UIArt, UIElement
|
||||
from .ui_file_chooser_dialog import CharSetChooserDialog, PaletteChooserDialog
|
||||
from .ui_swatch import MIN_CHARSET_WIDTH, CharacterSetSwatch, PaletteSwatch
|
||||
from .ui_tool import FILL_BOUND_BG_COLOR, FILL_BOUND_CHAR, FILL_BOUND_FG_COLOR, FillTool
|
||||
|
||||
TOOL_PANE_WIDTH = 10
|
||||
|
||||
|
|
@ -2,11 +2,11 @@ import os.path
|
|||
import time
|
||||
from math import ceil
|
||||
|
||||
from art import uv_names
|
||||
from renderable_line import UIRenderableX
|
||||
from ui_button import TEXT_CENTER, TEXT_RIGHT, UIButton
|
||||
from ui_colors import UIColors
|
||||
from ui_element import UIArt, UIElement, UIRenderable
|
||||
from .art import uv_names
|
||||
from .renderable_line import UIRenderableX
|
||||
from .ui_button import TEXT_CENTER, TEXT_RIGHT, UIButton
|
||||
from .ui_colors import UIColors
|
||||
from .ui_element import UIArt, UIElement, UIRenderable
|
||||
|
||||
# buttons to toggle "affects" status / cycle through choices, respectively
|
||||
|
||||
|
|
@ -3,8 +3,8 @@ import time
|
|||
|
||||
import numpy as np
|
||||
|
||||
from renderable_line import LineRenderable, SwatchSelectionBoxRenderable, UIRenderableX
|
||||
from ui_element import UIArt, UIElement, UIRenderable
|
||||
from .renderable_line import LineRenderable, SwatchSelectionBoxRenderable, UIRenderableX
|
||||
from .ui_element import UIArt, UIElement, UIRenderable
|
||||
|
||||
# min width for charset; if charset is tiny adjust to this
|
||||
MIN_CHARSET_WIDTH = 16
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import sdl2
|
||||
from PIL import Image
|
||||
|
||||
from art import (
|
||||
from .art import (
|
||||
UV_FLIP90,
|
||||
UV_FLIP270,
|
||||
UV_FLIPX,
|
||||
|
|
@ -11,10 +11,10 @@ from art import (
|
|||
UV_ROTATE180,
|
||||
UV_ROTATE270,
|
||||
)
|
||||
from edit_command import EditCommandTile
|
||||
from key_shifts import SHIFT_MAP
|
||||
from selection import SelectionRenderable
|
||||
from texture import Texture
|
||||
from .edit_command import EditCommandTile
|
||||
from .key_shifts import SHIFT_MAP
|
||||
from .selection import SelectionRenderable
|
||||
from .texture import Texture
|
||||
|
||||
|
||||
class UITool:
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from renderable_line import ToolSelectionBoxRenderable
|
||||
from renderable_sprite import UISpriteRenderable
|
||||
from ui_button import UIButton
|
||||
from ui_element import UIElement
|
||||
from .renderable_line import ToolSelectionBoxRenderable
|
||||
from .renderable_sprite import UISpriteRenderable
|
||||
from .ui_button import UIButton
|
||||
from .ui_element import UIElement
|
||||
|
||||
|
||||
class ToolBar(UIElement):
|
||||
|
|
@ -23,7 +23,7 @@ requires = ["hatchling"]
|
|||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.ruff]
|
||||
src = ["."]
|
||||
src = ["playscii"]
|
||||
line-length = 88
|
||||
|
||||
[tool.ruff.lint]
|
||||
|
|
|
|||
Loading…
Reference in a new issue