diff options
-rw-r--r-- | src/sliceitoff/assets/fonts.lst | 2 | ||||
-rw-r--r-- | src/sliceitoff/assets/images.lst | 39 | ||||
-rw-r--r-- | src/sliceitoff/images/fonts.py | 5 | ||||
-rw-r--r-- | src/sliceitoff/status/status.py | 14 |
4 files changed, 14 insertions, 46 deletions
diff --git a/src/sliceitoff/assets/fonts.lst b/src/sliceitoff/assets/fonts.lst index 0e85a1c..f832c79 100644 --- a/src/sliceitoff/assets/fonts.lst +++ b/src/sliceitoff/assets/fonts.lst @@ -1 +1,3 @@ lcd assets gnufonts UTIL GNUFONTS LCD.FNT +script assets gnufonts UTIL GNUFONTS SCRIPT.FNT +8x8 assets gnufonts UTIL GNUFONTS 8X8.FNT diff --git a/src/sliceitoff/assets/images.lst b/src/sliceitoff/assets/images.lst index e15a2d4..cf8107d 100644 --- a/src/sliceitoff/assets/images.lst +++ b/src/sliceitoff/assets/images.lst @@ -1,41 +1,2 @@ -letter_0 assets hack 0.png -letter_1 assets hack 1.png -letter_2 assets hack 2.png -letter_3 assets hack 3.png -letter_4 assets hack 4.png -letter_5 assets hack 5.png -letter_6 assets hack 6.png -letter_7 assets hack 7.png -letter_8 assets hack 8.png -letter_9 assets hack 9.png -letter_A assets hack A.png -letter_B assets hack B.png -letter_C assets hack C.png -letter_D assets hack D.png -letter_E assets hack E.png -letter_F assets hack F.png -letter_G assets hack G.png -letter_H assets hack H.png -letter_I assets hack I.png -letter_J assets hack J.png -letter_K assets hack K.png -letter_L assets hack L.png -letter_M assets hack M.png -letter_N assets hack N.png -letter_O assets hack O.png -letter_P assets hack P.png -letter_Q assets hack Q.png -letter_R assets hack R.png -letter_S assets hack S.png -letter_T assets hack T.png -letter_U assets hack U.png -letter_V assets hack V.png -letter_W assets hack W.png -letter_X assets hack X.png -letter_Y assets hack Y.png -letter_Z assets hack Z.png -letter_Å assets hack Å.png -letter_Ä assets hack Ä.png -letter_Ö assets hack Ö.png player_00 assets player 00.png ball assets ball 00.png diff --git a/src/sliceitoff/images/fonts.py b/src/sliceitoff/images/fonts.py index d3d15cf..98aa6e6 100644 --- a/src/sliceitoff/images/fonts.py +++ b/src/sliceitoff/images/fonts.py @@ -1,8 +1,6 @@ import os import pygame -from display import Scaling - DEBUG = os.getenv("DEBUG") class Fonts: @@ -15,7 +13,6 @@ class Fonts: for line in fontlist_file: name, *path = line.strip().split() filename = os.path.join(base_path, *path) - font = Font(filename) __class__.fonts[name] = Font(filename) return True @@ -39,4 +36,4 @@ class Font: self.surfaces.append(surface) def get(self, ch): - return self.surfaces[ch.encode('cp437')[0]%256] + return self.surfaces[ord(ch)%256] diff --git a/src/sliceitoff/status/status.py b/src/sliceitoff/status/status.py index a63a7db..f6517da 100644 --- a/src/sliceitoff/status/status.py +++ b/src/sliceitoff/status/status.py @@ -35,11 +35,19 @@ class Status(): self.bonus = max(0, self.bonus - dt) - score_str="LEVEL{:02d}LIVES{:02d}{:010d}".format(self.level, self.lives, self.bonus) + score_str = ( + "{:02d}\x12 {:02d}\xfe {:02d}\x03 " + "{:02d}\x0e {:08d}\x0f").format( + self.level, + 99 if 100 == 100 else 99, + self.lives, + self.bonus // 1000, + self.score) self.sprites = TextGroup( score_str, - (0, 280_000), - size = 10_000) + (0, 282_000), + size = 16_000, + font = '8x8') def lose_life(self): """ Lose 1 life and return true if no lives left """ |