From 0dfef62c2ebdab980497ca8c26bc3228f47b9069 Mon Sep 17 00:00:00 2001 From: Jeremy Thurgood Date: Fri, 16 May 2014 14:35:09 +0200 Subject: [PATCH] More tile juggling. --- naja/actions.py | 3 +-- naja/constants.py | 1 - naja/widgets/tile.py | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/naja/actions.py b/naja/actions.py index d6c4532..cf916b9 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -8,7 +8,7 @@ class LocationAction(object): """ TEXT = None - GLYPHS = () + GLYPHS = (ACTION_GLYPHS.NOTHING,) MSB_GLYPH = None def __init__(self, required_bits, **data): @@ -61,7 +61,6 @@ class LocationAction(object): class DoNothing(LocationAction): TEXT = "No effect." - GLYPHS = (ACTION_GLYPHS.NOTHING,) def perform_action(self, board, location): pass diff --git a/naja/constants.py b/naja/constants.py index dfc9e50..ca1394b 100644 --- a/naja/constants.py +++ b/naja/constants.py @@ -61,7 +61,6 @@ PLAYER_DEFAULTS = AttrDict({ # Game size constants TILE_SIZE = (96, 96) -# LOCK_HEIGHT = 48 LOCK_HEIGHT = 32 BOARD_SIZE = (5 * TILE_SIZE[0], 5 * TILE_SIZE[1]) BIT_SIZE = (5 * TILE_SIZE[0], (SCREEN[1] - 5 * TILE_SIZE[1]) // 2) diff --git a/naja/widgets/tile.py b/naja/widgets/tile.py index be02a35..93078a5 100644 --- a/naja/widgets/tile.py +++ b/naja/widgets/tile.py @@ -83,11 +83,6 @@ class TileWidget(Widget): else: img_name = img_name.replace('.png', '_small.png') x_offset = 4 - if y_offset >= TILE_SIZE[1] // 2: - # FIXME: Hack'ish - # Bump the lock down by some hand-tuned factor - # to not overlap with the robot - y_offset += LOCK_HEIGHT // 2 - 4 img = resources.get_image(img_name, transforms=(EIGHT_BIT,)) self.surface.blit(img, (x_offset, y_offset)) return x_offset + img.get_width() + 2 -- 2.34.1