Skip to content

Commit

Permalink
fixup api
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed Nov 15, 2023
1 parent bd512d0 commit 31dcb5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyboy/pyboy.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ cdef class PyBoyMemoryView:
cdef class PyBoy:
cdef Motherboard mb
cdef public PluginManager plugin_manager
cdef public uint64_t frame_count
cdef public str gamerom_file
cdef readonly uint64_t frame_count
cdef readonly str gamerom_file
cdef readonly bint paused

cdef double avg_pre
Expand Down
4 changes: 2 additions & 2 deletions pyboy/pyboy.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def tick(self, count, render):
running = False
while count != 0:
_render = render and count == 1 # Only render on last tick to improve performance
running = self._tick(render)
running = self._tick(_render)
count -= 1

if render and running:
Expand Down Expand Up @@ -724,7 +724,7 @@ def get_sprite_by_tile_identifier(self, tile_identifiers, on_screen=True):
for i in tile_identifiers:
match = []
for s in range(constants.SPRITES):
sprite = Sprite(self, s)
sprite = Sprite(self.mb, s)
for t in sprite.tiles:
if t.tile_identifier == i and (not on_screen or (on_screen and sprite.on_screen)):
match.append(s)
Expand Down

0 comments on commit 31dcb5b

Please sign in to comment.