Mercurial > touhou
comparison pytouhou/interfaces/eosd.py @ 596:ab131d04987d
Fix a regression introduced in the previous commit when the interface has a different resolution than 640×480 and framebuffer_blit is enabled.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 25 Oct 2014 18:49:41 +0200 |
parents | e15672733c93 |
children |
comparison
equal
deleted
inserted
replaced
595:b7b4a234bf70 | 596:ab131d04987d |
---|---|
15 from pytouhou.game.effect import Effect | 15 from pytouhou.game.effect import Effect |
16 from pytouhou.game.text import Text, Counter, Gauge, NativeText | 16 from pytouhou.game.text import Text, Counter, Gauge, NativeText |
17 | 17 |
18 | 18 |
19 class EoSDInterface(object): | 19 class EoSDInterface(object): |
20 width = 640 | |
21 height = 480 | |
22 game_pos = (32, 16) | |
23 | |
20 def __init__(self, resource_loader, player_state): | 24 def __init__(self, resource_loader, player_state): |
21 self.game = None | 25 self.game = None |
22 self.player_state = player_state | 26 self.player_state = player_state |
23 front = resource_loader.get_single_anm('front.anm') | 27 front = resource_loader.get_single_anm('front.anm') |
24 self.ascii_anm = resource_loader.get_single_anm('ascii.anm') | 28 self.ascii_anm = resource_loader.get_single_anm('ascii.anm') |
25 | |
26 self.width = 640 | |
27 self.height = 480 | |
28 self.game_pos = (32, 16) | |
29 | 29 |
30 self.highscore = 1000000 #TODO: read score.dat | 30 self.highscore = 1000000 #TODO: read score.dat |
31 self.items = ([Effect((0, 32 * i), 6, front) for i in range(15)] + | 31 self.items = ([Effect((0, 32 * i), 6, front) for i in range(15)] + |
32 [Effect((416 + 32 * i, 32 * j), 6, front) for i in range(7) for j in range(15)] + | 32 [Effect((416 + 32 * i, 32 * j), 6, front) for i in range(7) for j in range(15)] + |
33 [Effect((32 + 32 * i, 0), 7, front) for i in range(12)] + | 33 [Effect((32 + 32 * i, 0), 7, front) for i in range(12)] + |