blueshouse.asm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. BluesHouseScript:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, BluesHouseScriptPointers
  4. ld a, [wBluesHouseCurScript]
  5. jp CallFunctionInTable
  6. BluesHouseScriptPointers:
  7. dw BluesHouseScript0
  8. dw BluesHouseScript1
  9. BluesHouseScript0:
  10. SetEvent EVENT_ENTERED_BLUES_HOUSE
  11. ; trigger the next script
  12. ld a, 1
  13. ld [wBluesHouseCurScript], a
  14. ret
  15. BluesHouseScript1:
  16. ret
  17. BluesHouseTextPointers:
  18. dw BluesHouseText1
  19. dw BluesHouseText2
  20. dw BluesHouseText3
  21. BluesHouseText1:
  22. TX_ASM
  23. CheckEvent EVENT_GOT_TOWN_MAP
  24. jr nz, .GotMap
  25. CheckEvent EVENT_GOT_POKEDEX
  26. jr nz, .GiveMap
  27. ld hl, DaisyInitialText
  28. call PrintText
  29. jr .done
  30. .GiveMap
  31. ld hl, DaisyOfferMapText
  32. call PrintText
  33. lb bc, TOWN_MAP, 1
  34. call GiveItem
  35. jr nc, .BagFull
  36. ld a, HS_TOWN_MAP
  37. ld [wMissableObjectIndex], a
  38. predef HideObject ; hide table map object
  39. ld hl, GotMapText
  40. call PrintText
  41. SetEvent EVENT_GOT_TOWN_MAP
  42. jr .done
  43. .GotMap
  44. ld hl, DaisyUseMapText
  45. call PrintText
  46. jr .done
  47. .BagFull
  48. ld hl, DaisyBagFullText
  49. call PrintText
  50. .done
  51. jp TextScriptEnd
  52. DaisyInitialText:
  53. TX_FAR _DaisyInitialText
  54. db "@"
  55. DaisyOfferMapText:
  56. TX_FAR _DaisyOfferMapText
  57. db "@"
  58. GotMapText:
  59. TX_FAR _GotMapText
  60. TX_SFX_KEY_ITEM
  61. db "@"
  62. DaisyBagFullText:
  63. TX_FAR _DaisyBagFullText
  64. db "@"
  65. DaisyUseMapText:
  66. TX_FAR _DaisyUseMapText
  67. db "@"
  68. BluesHouseText2: ; Daisy, walking around
  69. TX_FAR _BluesHouseText2
  70. db "@"
  71. BluesHouseText3: ; map on table
  72. TX_FAR _BluesHouseText3
  73. db "@"