seafoamislands2.asm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SeafoamIslands2Script:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, wFlags_0xcd60
  4. bit 7, [hl]
  5. res 7, [hl]
  6. jr z, .asm_46362
  7. ld hl, Seafoam2HolesCoords
  8. call CheckBoulderCoords
  9. ret nc
  10. EventFlagAddress hl, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
  11. ld a, [wCoordIndex]
  12. cp $1
  13. jr nz, .asm_46340
  14. SetEventReuseHL EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
  15. ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
  16. ld [wObjectToHide], a
  17. ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1
  18. ld [wObjectToShow], a
  19. jr .asm_4634c
  20. .asm_46340
  21. SetEventAfterBranchReuseHL EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
  22. ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2
  23. ld [wObjectToHide], a
  24. ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2
  25. ld [wObjectToShow], a
  26. .asm_4634c
  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_46362
  34. ld a, $a0
  35. ld [wDungeonWarpDestinationMap], a
  36. ld hl, Seafoam2HolesCoords
  37. jp IsPlayerOnDungeonWarp
  38. Seafoam2HolesCoords:
  39. db $06,$12
  40. db $06,$17
  41. db $ff
  42. SeafoamIslands2TextPointers:
  43. dw BoulderText
  44. dw BoulderText