Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed May 22, 2024
1 parent 9939547 commit 183bf9d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
16 changes: 16 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,12 @@ <h2 id="kwargs">Kwargs</h2>

```

**NOTE**:

Don&#39;t register hooks to something that isn&#39;t executable (graphics data etc.). This will cause your game to show
weird behavior or crash. Hooks are installed by replacing the instruction at the bank and address with a special
opcode (`0xDB`). If the address is read by the game instead of executed as code, this value will be read instead.

Args:
bank (int or None): ROM or RAM bank (None for symbol lookup)
addr (int or str): Address in the Game Boy&#39;s address space (str for symbol lookup)
Expand Down Expand Up @@ -2407,6 +2413,10 @@ <h2 id="returns">Returns</h2>
True

</code></pre>
<p><strong>NOTE</strong>:</p>
<p>Don't register hooks to something that isn't executable (graphics data etc.). This will cause your game to show
weird behavior or crash. Hooks are installed by replacing the instruction at the bank and address with a special
opcode (<code>0xDB</code>). If the address is read by the game instead of executed as code, this value will be read instead.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>bank</code></strong> :&ensp;<code>int</code> or <code>None</code></dt>
Expand Down Expand Up @@ -2457,6 +2467,12 @@ <h2 id="args">Args</h2>

```

**NOTE**:

Don&#39;t register hooks to something that isn&#39;t executable (graphics data etc.). This will cause your game to show
weird behavior or crash. Hooks are installed by replacing the instruction at the bank and address with a special
opcode (`0xDB`). If the address is read by the game instead of executed as code, this value will be read instead.

Args:
bank (int or None): ROM or RAM bank (None for symbol lookup)
addr (int or str): Address in the Game Boy&#39;s address space (str for symbol lookup)
Expand Down
10 changes: 4 additions & 6 deletions docs/plugins/game_wrapper_pokemon_gen1.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ <h1 class="title">Module <code>pyboy.plugins.game_wrapper_pokemon_gen1</code></h

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 Expand Up @@ -161,9 +160,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>

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

0 comments on commit 183bf9d

Please sign in to comment.