diff options
author | Daniel Harding <33dannye@gmail.com> | 2019-01-13 22:38:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-13 22:38:16 -0600 |
commit | 725b86ebbec23bd1f53fd60bf0201c904fee951d (patch) | |
tree | a37f4d33c5b77635c7ff72b91a73fcd90c4af915 /scripts/HallOfFame.asm | |
parent | 108245cb21abb3abac051b7db84ed6c694192a61 (diff) | |
parent | c7796024590fec48ac79756793c1a6e3b54daf8f (diff) |
Merge pull request #196 from Rangi42/polishedmaps
Rename map files, labels, and constants to be consistent and work with Polished Map
Diffstat (limited to 'scripts/HallOfFame.asm')
-rwxr-xr-x | scripts/HallOfFame.asm | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm new file mode 100755 index 00000000..511c9754 --- /dev/null +++ b/scripts/HallOfFame.asm @@ -0,0 +1,109 @@ +HallOfFame_Script: + call EnableAutoTextBoxDrawing + ld hl, HallOfFame_ScriptPointers + ld a, [wHallOfFameCurScript] + jp CallFunctionInTable + +HallofFameRoomScript_5a4aa: + xor a + ld [wJoyIgnore], a + ld [wHallOfFameCurScript], a + ret + +HallOfFame_ScriptPointers: + dw HallofFameRoomScript0 + dw HallofFameRoomScript1 + dw HallofFameRoomScript2 + dw HallofFameRoomScript3 + +HallofFameRoomScript3: + ret + +HallofFameRoomScript2: + call Delay3 + ld a, [wLetterPrintingDelayFlags] + push af + xor a + ld [wJoyIgnore], a + predef HallOfFamePC + pop af + ld [wLetterPrintingDelayFlags], a + ld hl, wFlags_D733 + res 1, [hl] + inc hl + set 0, [hl] + xor a + ld hl, wLoreleisRoomCurScript + ld [hli], a ; wLoreleisRoomCurScript + ld [hli], a ; wBrunosRoomCurScript + ld [hl], a ; wAgathasRoomCurScript + ld [wLancesRoomCurScript], a + ld [wHallOfFameCurScript], a + ; Elite 4 events + ResetEventRange ELITE4_EVENTS_START, ELITE4_CHAMPION_EVENTS_END, 1 + xor a + ld [wHallOfFameCurScript], a + ld a, PALLET_TOWN + ld [wLastBlackoutMap], a + callba SaveSAVtoSRAM + ld b, 5 +.delayLoop + ld c, 600 / 5 + call DelayFrames + dec b + jr nz, .delayLoop + call WaitForTextScrollButtonPress + jp Init + +HallofFameRoomScript0: + ld a, $ff + ld [wJoyIgnore], a + ld hl, wSimulatedJoypadStatesEnd + ld de, RLEMovement5a528 + call DecodeRLEList + dec a + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates + ld a, $1 + ld [wHallOfFameCurScript], a + ret + +RLEMovement5a528: + db D_UP,$5 + db $ff + +HallofFameRoomScript1: + ld a, [wSimulatedJoypadStatesIndex] + and a + ret nz + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a + ld a, $1 + ld [H_SPRITEINDEX], a + call SetSpriteMovementBytesToFF + ld a, SPRITE_FACING_LEFT + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + call Delay3 + xor a + ld [wJoyIgnore], a + inc a ; PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a + ld a, $1 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + ld a, $ff + ld [wJoyIgnore], a + ld a, HS_UNKNOWN_DUNGEON_GUY + ld [wMissableObjectIndex], a + predef HideObject + ld a, $2 + ld [wHallOfFameCurScript], a + ret + +HallOfFame_TextPointers: + dw HallofFameRoomText1 + +HallofFameRoomText1: + TX_FAR _HallofFameRoomText1 + db "@" |