daily pastebin goal
63%
SHARE
TWEET

safari zone rest houses

a guest Aug 1st, 2012 501 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; [03:12:31]  <stag019>  i have two piece of evidence to support this discovery too
  2. ; [03:13:18]  <stag019>  3 of the 4 rest houses in the safari zone (the secret house where you get surf is not considered a rest house) were once pokecenters, or at least makeshift pokecenters
  3. ; [03:13:34]  <stag019>  evidence 1:
  4. ; [03:14:45]  <stag019>  3 rest houses (2, 3, and 4) all have PCs as hidden objects (PCs are hidden objects for some reason or another)
  5. ; [03:15:30]  <stag019>  they're even positioned in the same exact positions as in any pokecenter
  6. ; [03:15:35]  <stag019>  evidence 2:
  7. ; [03:16:20]  <stag019>  whenever you heal at a pokecenter, the map for the town you're in is saved in the ram so that if you teleport, dig, or use an escape rope, you go back to in front of that pokecenter
  8. ; [03:16:48]  <stag019>  there's code telling it not to set that if you're current map is one of those same three rest houses
  9. ; [03:17:30]  <stag019>  so that you couldnt, say, heal there, leave the safari zone, and then go to some other cave (without healing anywhere else) and then teleport back into the safari zone
  10.  
  11. ; additionally, here's some assembly of the latter piece of evidence, copied from the pokered disassembly, and commented by me so I could understand what the hell was going on
  12.  
  13. Unknown_7078: ; 0x7078
  14.     push hl                       ; put contents of hl into stack
  15.     ld hl, SafariZoneRestHouses   ; put pointer to house table in hl
  16.     ld a, [W_CURMAP]              ; put current map id in a
  17.     ld b, a                       ; put a (current map id) in b
  18. .asm_7080                         ; loop_start:
  19.     ld a, [hli]                   ; load hl (one of the rest house ids) into a and then increment hl
  20.     cp $ff                        ; compare a against $FF
  21.     jr z, .asm_708a ; 0x7083 $5   ; if 0 (a is $FF, which means the current map id is not any of the rest house ids), go to "not_rest_house"
  22.     cp b                          ; compare a against b (current map id)
  23.     jr nz, .asm_7080 ; 0x7086 $f8 ; if non-zero (b, current map id, is not that rest house) go to "loop_start"
  24.     jr .asm_7090 ; 0x7088 $6      ; go to "done" (only executes if above doesn't, which means b, the current map id, is one of the rest house ids)
  25. .asm_708a                         ; not_rest_house:
  26.     ld a, [$d365]                 ; ld $D365 into a (this is the only thing I'm unsure of, but I'm assuming it's the map id of the last visited map that contains a pokecenter)
  27.     ld [$d719], a                 ; load a into $D719 (this address is the map id you will warp to if you teleport, dig, or use an escape rope)
  28. .asm_7090                         ; done:
  29.     pop hl                        ; put the contents of the stack into hl (restore it)
  30.     ret                           ; ret... urn
  31. ; 0x7092
  32.  
  33. SafariZoneRestHouses: ; 0x7092
  34.     db SAFARI_ZONE_REST_HOUSE_2
  35.     db SAFARI_ZONE_REST_HOUSE_3
  36.     db SAFARI_ZONE_REST_HOUSE_4
  37.     db $ff ; terminator
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top