Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pokemon tilemap wapper for 2.0 #325

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pyboy/plugins/game_wrapper_pokemon_gen1.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ def post_tick(self):

def _get_screen_background_tilemap(self):
### SIMILAR TO CURRENT pyboy.game_wrapper.game_area(), BUT ONLY FOR BACKGROUND TILEMAP, SO NPC ARE SKIPPED
bsm = self.pyboy.botsupport_manager()
((scx, scy), (wx, wy)) = bsm.screen().tilemap_position()
tilemap = np.array(bsm.tilemap_background[:, :])
((scx, scy), (wx, wy)) = self.pyboy.screen.get_tilemap_position()
tilemap = np.array(self.pyboy.tilemap_background[:, :])
return np.roll(np.roll(tilemap, -scy // 8, axis=0), -scx // 8, axis=1)[:18, :20]

def _get_screen_walkable_matrix(self):
Expand Down
Loading