league_pc.asm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. PKMNLeaguePC:
  2. ld hl, AccessedHoFPCText
  3. call PrintText
  4. ld hl, wd730
  5. set 6, [hl]
  6. push hl
  7. ld a, [wUpdateSpritesEnabled]
  8. push af
  9. ld a, [hTilesetType]
  10. push af
  11. xor a
  12. ld [hTilesetType], a
  13. ld [wSpriteFlipped], a
  14. ld [wUpdateSpritesEnabled], a
  15. ld [wHoFTeamIndex2], a
  16. ld [wHoFTeamNo], a
  17. ld a, [wNumHoFTeams]
  18. ld b, a
  19. cp HOF_TEAM_CAPACITY + 1
  20. jr c, .loop
  21. ; If the total number of hall of fame teams is greater than the storage
  22. ; capacity, then calculate the number of the first team that is still recorded.
  23. ld b, HOF_TEAM_CAPACITY
  24. sub b
  25. ld [wHoFTeamNo], a
  26. .loop
  27. ld hl, wHoFTeamNo
  28. inc [hl]
  29. push bc
  30. ld a, [wHoFTeamIndex2]
  31. ld [wHoFTeamIndex], a
  32. callba LoadHallOfFameTeams
  33. call LeaguePCShowTeam
  34. pop bc
  35. jr c, .doneShowingTeams
  36. ld hl, wHoFTeamIndex2
  37. inc [hl]
  38. ld a, [hl]
  39. cp b
  40. jr nz, .loop
  41. .doneShowingTeams
  42. pop af
  43. ld [hTilesetType], a
  44. pop af
  45. ld [wUpdateSpritesEnabled], a
  46. pop hl
  47. res 6, [hl]
  48. call GBPalWhiteOutWithDelay3
  49. call ClearScreen
  50. call RunDefaultPaletteCommand
  51. jp GBPalNormal
  52. LeaguePCShowTeam:
  53. ld c, PARTY_LENGTH
  54. .loop
  55. push bc
  56. call LeaguePCShowMon
  57. call WaitForTextScrollButtonPress
  58. ld a, [hJoyHeld]
  59. bit 1, a
  60. jr nz, .exit
  61. ld hl, wHallOfFame + HOF_MON
  62. ld de, wHallOfFame
  63. ld bc, HOF_TEAM - HOF_MON
  64. call CopyData
  65. pop bc
  66. ld a, [wHallOfFame + 0]
  67. cp $ff
  68. jr z, .done
  69. dec c
  70. jr nz, .loop
  71. .done
  72. and a
  73. ret
  74. .exit
  75. pop bc
  76. scf
  77. ret
  78. LeaguePCShowMon:
  79. call GBPalWhiteOutWithDelay3
  80. call ClearScreen
  81. ld hl, wHallOfFame
  82. ld a, [hli]
  83. ld [wHoFMonSpecies], a
  84. ld [wcf91], a
  85. ld [wd0b5], a
  86. ld [wBattleMonSpecies2], a
  87. ld [wWholeScreenPaletteMonSpecies], a
  88. ld a, [hli]
  89. ld [wHoFMonLevel], a
  90. ld de, wcd6d
  91. ld bc, NAME_LENGTH
  92. call CopyData
  93. ld b, SET_PAL_POKEMON_WHOLE_SCREEN
  94. ld c, 0
  95. call RunPaletteCommand
  96. coord hl, 12, 5
  97. call GetMonHeader
  98. call LoadFrontSpriteByMonIndex
  99. call GBPalNormal
  100. coord hl, 0, 13
  101. ld b, 2
  102. ld c, $12
  103. call TextBoxBorder
  104. coord hl, 1, 15
  105. ld de, HallOfFameNoText
  106. call PlaceString
  107. coord hl, 16, 15
  108. ld de, wHoFTeamNo
  109. lb bc, 1, 3
  110. call PrintNumber
  111. jpba HoFDisplayMonInfo
  112. HallOfFameNoText:
  113. db "HALL OF FAME No @"
  114. AccessedHoFPCText:
  115. TX_FAR _AccessedHoFPCText
  116. db "@"