seafoamislands1.asm 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. SeafoamIslands1Script:
  2. call EnableAutoTextBoxDrawing
  3. SetEvent EVENT_IN_SEAFOAM_ISLANDS
  4. ld hl, wFlags_0xcd60
  5. bit 7, [hl]
  6. res 7, [hl]
  7. jr z, .asm_4483b
  8. ld hl, Seafoam1HolesCoords
  9. call CheckBoulderCoords
  10. ret nc
  11. EventFlagAddress hl, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
  12. ld a, [wCoordIndex]
  13. cp $1
  14. jr nz, .asm_44819
  15. SetEventReuseHL EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
  16. ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1
  17. ld [wObjectToHide], a
  18. ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
  19. ld [wObjectToShow], a
  20. jr .asm_44825
  21. .asm_44819
  22. SetEventAfterBranchReuseHL EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
  23. ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2
  24. ld [wObjectToHide], a
  25. ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2
  26. ld [wObjectToShow], a
  27. .asm_44825
  28. ld a, [wObjectToHide]
  29. ld [wMissableObjectIndex], a
  30. predef HideObject
  31. ld a, [wObjectToShow]
  32. ld [wMissableObjectIndex], a
  33. predef_jump ShowObject
  34. .asm_4483b
  35. ld a, $9f
  36. ld [wDungeonWarpDestinationMap], a
  37. ld hl, Seafoam1HolesCoords
  38. jp IsPlayerOnDungeonWarp
  39. Seafoam1HolesCoords:
  40. db $06,$11
  41. db $06,$18
  42. db $ff
  43. SeafoamIslands1TextPointers:
  44. dw BoulderText
  45. dw BoulderText