Prog
All checks were successful
Build Dusk / build-linux (push) Successful in 1m3s
Build Dusk / build-psp (push) Successful in 1m10s

This commit is contained in:
2025-11-19 09:14:32 -06:00
parent 6e7a0cba76
commit 2179a27bf5
5 changed files with 22 additions and 17 deletions

View File

@@ -1,9 +1,11 @@
from OpenGL.GL import *
from editortool.map.mapdefs import TILE_WIDTH, TILE_HEIGHT, TILE_DEPTH, CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH
from enum import Enum
class Tile:
def __init__(self, chunk, x, y, z, tileIndex):
self.tileId = 0
def __init__(self, chunk, x, y, z):
self.shape = TILE_SHAPE_NULL
self.chunk = chunk
self.x = x
self.y = y
@@ -14,7 +16,7 @@ class Tile:
self.posZ = z * TILE_DEPTH + chunk.z * CHUNK_DEPTH * TILE_DEPTH
def buffer(self, vertexBuffer):
if self.z != 0:
if self.shape == TILE_SHAPE_NULL:
return
# if self.x != 0 or self.y != 0 or self.z != 0:
# return # Only buffer the tile at (0,0,0)

View File

@@ -7,7 +7,7 @@ from editortool.map.mapinfopanel import MapInfoPanel
from editortool.map.menubar import MapMenubar
from editortool.map.statusbar import StatusBar
from editortool.map.map import Map
from editortool.map.mapdefs import TILE_WIDTH, TILE_HEIGHT, TILE_DEPTH
from editortool.map.mapdefs import CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_DEPTH
from editortool.map.selectbox import SelectBox
from editortool.map.camera import Camera
from editortool.map.grid import Grid
@@ -101,9 +101,9 @@ class MapWindow(QMainWindow):
amtZ = -1
if event.modifiers() & Qt.ShiftModifier:
amtX *= int(TILE_WIDTH)
amtY *= int(TILE_HEIGHT)
amtZ *= int(TILE_DEPTH)
amtX *= CHUNK_WIDTH
amtY *= CHUNK_HEIGHT
amtZ *= CHUNK_DEPTH
if amtX != 0 or amtY != 0 or amtZ != 0:
self.map.moveRelative(amtX, amtY, amtZ)