commit ef6b7541c0b544dc2335e17a6bfa9475a8689b29
parent 61849f08f0b6f992b89d71ead80da5cdf95ca384
Author: Erik Letson <hmagellan@hmagellan.com>
Date: Wed, 26 Aug 2020 18:10:52 -0500
Fixed alpha issues and settled on tile size
Diffstat:
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/data/img/jisella_1.png b/data/img/jisella_1.png
Binary files differ.
diff --git a/src/constants.py b/src/constants.py
@@ -11,8 +11,8 @@ SCREEN_WIDTH = 1024
SCREEN_HEIGHT = 768
FRAMERATE = 60
-TILE_WIDTH = 32
-TILE_HEIGHT = 32
+TILE_WIDTH = 64
+TILE_HEIGHT = 64
COLORKEY = (255, 0, 255)
# Paths
diff --git a/src/game.py b/src/game.py
@@ -1,7 +1,7 @@
import pygame
from . import interface, vgo
from .images import SHEETS
-from .constants import SCREEN_WIDTH, SCREEN_HEIGHT, FRAMERATE
+from .constants import SCREEN_WIDTH, SCREEN_HEIGHT, FRAMERATE, COLORKEY
class Game(object):
@@ -17,6 +17,13 @@ class Game(object):
#TESTING
self.testvgo = vgo.Entity(SHEETS["jisella_1"].sprites[(0, 0)], (100, 100))
+ # This should go somewhere in the images.py file, or somewhere that
+ # sheets will live permanently, but the display has to be initialized
+ # before we can convert.
+ for s in SHEETS:
+ for p in SHEETS[s].sprites:
+ SHEETS[s].sprites[p].convert()
+ SHEETS[s].sprites[p].set_colorkey(COLORKEY)
# Utility methods
def toggle_on(self):