seafoamislands3.asm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SeafoamIslands3Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, wFlags_0xcd60
  4. bit 7, [hl]
  5. res 7, [hl]
  6. jr z, .asm_4649e
  7. ld hl, Seafoam3HolesCoords
  8. call CheckBoulderCoords
  9. ret nc
  10. EventFlagAddress hl, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
  11. ld a, [wCoordIndex]
  12. cp $1
  13. jr nz, .asm_4647c
  14. SetEventReuseHL EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
  15. ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1
  16. ld [wObjectToHide], a
  17. ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3
  18. ld [wObjectToShow], a
  19. jr .asm_46488
  20. .asm_4647c
  21. SetEventAfterBranchReuseHL EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
  22. ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2
  23. ld [wObjectToHide], a
  24. ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_4
  25. ld [wObjectToShow], a
  26. .asm_46488
  27. ld a, [wObjectToHide]
  28. ld [wMissableObjectIndex], a
  29. predef HideObject
  30. ld a, [wObjectToShow]
  31. ld [wMissableObjectIndex], a
  32. predef_jump ShowObject
  33. .asm_4649e
  34. ld a, $a1
  35. ld [wDungeonWarpDestinationMap], a
  36. ld hl, Seafoam3HolesCoords
  37. jp IsPlayerOnDungeonWarp
  38. Seafoam3HolesCoords:
  39. db $06,$13
  40. db $06,$16
  41. db $ff
  42. SeafoamIslands3TextPointers:
  43. dw BoulderText
  44. dw BoulderText