Skip to content

Commit

Permalink
fixup get_sprite_by_tile_identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed Nov 16, 2023
1 parent de34205 commit e14a50e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyboy/plugins/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def draw_overlay(self):
sprite_height = 16 if self.mb.lcd._LCDC.sprite_height else 8
# Mark selected tiles
for m, matched_sprites in zip(
marked_tiles, self.pyboy.sprite_by_tile_identifier([m.tile_identifier for m in marked_tiles])
marked_tiles, self.pyboy.get_sprite_by_tile_identifier([m.tile_identifier for m in marked_tiles])
):
for sprite_index in matched_sprites:
xx = (sprite_index*8) % self.width
Expand Down Expand Up @@ -758,7 +758,7 @@ def draw_overlay(self):
sprite_height = 16 if self.mb.lcd._LCDC.sprite_height else 8
# Mark selected tiles
for m, matched_sprites in zip(
marked_tiles, self.pyboy.sprite_by_tile_identifier([m.tile_identifier for m in marked_tiles])
marked_tiles, self.pyboy.get_sprite_by_tile_identifier([m.tile_identifier for m in marked_tiles])
):
for sprite_index in matched_sprites:
sprite = Sprite(self.mb, sprite_index)
Expand Down
2 changes: 1 addition & 1 deletion pyboy/pyboy.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def get_sprite_by_tile_identifier(self, tile_identifiers, on_screen=True):
Example:
```
>>> print(pyboy.api_manager().sprite_by_tile_identifier([43, 123]))
>>> print(pyboy.get_sprite_by_tile_identifier([43, 123]))
[[0, 2, 4], []]
```
Expand Down

0 comments on commit e14a50e

Please sign in to comment.