pewterpokecenter.asm 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. PewterPokecenterScript:
  2. call Serial_TryEstablishingExternallyClockedConnection
  3. jp EnableAutoTextBoxDrawing
  4. PewterPokecenterTextPointers:
  5. dw PewterHealNurseText
  6. dw PewterPokecenterText2
  7. dw PewterJigglypuffText
  8. dw PewterTradeNurseText
  9. PewterHealNurseText:
  10. TX_POKECENTER_NURSE
  11. PewterPokecenterText2:
  12. TX_FAR _PewterPokecenterText2
  13. db "@"
  14. PewterJigglypuffText:
  15. TX_ASM
  16. ld a, $1
  17. ld [wDoNotWaitForButtonPressAfterDisplayingText], a
  18. ld hl, .Text
  19. call PrintText
  20. StopAllMusic
  21. ld c, 32
  22. call DelayFrames
  23. ld hl, JigglypuffFacingDirections
  24. ld de, wJigglypuffFacingDirections
  25. ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
  26. call CopyData
  27. ld a, [Sprite03SpriteImageIdx]
  28. ld hl, wJigglypuffFacingDirections
  29. .findMatchingFacingDirectionLoop
  30. cp [hl]
  31. inc hl
  32. jr nz, .findMatchingFacingDirectionLoop
  33. dec hl
  34. push hl
  35. ld c, BANK(Music_JigglypuffSong)
  36. ld a, MUSIC_JIGGLYPUFF_SONG
  37. call PlayMusic
  38. pop hl
  39. .loop
  40. ld a, [hl]
  41. ld [Sprite03SpriteImageIdx], a
  42. ; rotate the array
  43. push hl
  44. ld hl, wJigglypuffFacingDirections
  45. ld de, wJigglypuffFacingDirections - 1
  46. ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
  47. call CopyData
  48. ld a, [wJigglypuffFacingDirections - 1]
  49. ld [wJigglypuffFacingDirections + 3], a
  50. pop hl
  51. ld c, 24
  52. call DelayFrames
  53. ld a, [wChannelSoundIDs]
  54. ld b, a
  55. ld a, [wChannelSoundIDs + Ch1]
  56. or b
  57. jr nz, .loop
  58. ld c, 48
  59. call DelayFrames
  60. call PlayDefaultMusic
  61. jp TextScriptEnd
  62. .Text
  63. TX_FAR _PewterJigglypuffText
  64. db "@"
  65. JigglypuffFacingDirections:
  66. db $30 | SPRITE_FACING_DOWN
  67. db $30 | SPRITE_FACING_LEFT
  68. db $30 | SPRITE_FACING_UP
  69. db $30 | SPRITE_FACING_RIGHT
  70. JigglypuffFacingDirectionsEnd:
  71. PewterTradeNurseText:
  72. TX_CABLE_CLUB_RECEPTIONIST