mirror of
https://github.com/jtauber/applepy.git
synced 2024-06-17 12:29:28 +00:00
character heights are really 8 not 9
This commit is contained in:
parent
7cc9e8bdad
commit
588f913eb2
12
applepy.py
12
applepy.py
|
@ -101,7 +101,7 @@ class Display:
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.screen = pygame.display.set_mode((560, 432))
|
self.screen = pygame.display.set_mode((560, 384))
|
||||||
pygame.display.set_caption("ApplePy")
|
pygame.display.set_caption("ApplePy")
|
||||||
|
|
||||||
def txtclr(self):
|
def txtclr(self):
|
||||||
|
@ -175,7 +175,7 @@ class Display:
|
||||||
b = self.characters[ch][line]
|
b = self.characters[ch][line]
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
x = 2 * (column * 7 + (5 - i))
|
x = 2 * (column * 7 + (5 - i))
|
||||||
y = 2 * (row * 9 + line)
|
y = 2 * (row * 8 + line)
|
||||||
bit = (b >> i) % 2
|
bit = (b >> i) % 2
|
||||||
pixels[x][y] = on if bit else off
|
pixels[x][y] = on if bit else off
|
||||||
pixels[x + 1][y] = on if bit else off
|
pixels[x + 1][y] = on if bit else off
|
||||||
|
@ -193,13 +193,13 @@ class Display:
|
||||||
|
|
||||||
pixels = pygame.PixelArray(self.screen)
|
pixels = pygame.PixelArray(self.screen)
|
||||||
for dx in range(14):
|
for dx in range(14):
|
||||||
for dy in range(9):
|
for dy in range(8):
|
||||||
x = column * 14 + dx
|
x = column * 14 + dx
|
||||||
y = row * 18 + dy
|
y = row * 16 + dy
|
||||||
pixels[x][y] = self.lores_colours[upper]
|
pixels[x][y] = self.lores_colours[upper]
|
||||||
for dy in range(9, 18):
|
for dy in range(8, 16):
|
||||||
x = column * 14 + dx
|
x = column * 14 + dx
|
||||||
y = row * 18 + dy
|
y = row * 16 + dy
|
||||||
pixels[x][y] = self.lores_colours[lower]
|
pixels[x][y] = self.lores_colours[lower]
|
||||||
del pixels
|
del pixels
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user