Added w3 and w5 labels for misc/mobile_40.asm

This commit is contained in:
PikalaxALT
2015-11-10 23:23:28 -05:00
parent 03f0815679
commit 4b35fa0582
12 changed files with 1330 additions and 1290 deletions

View File

@@ -3,7 +3,7 @@ BattleCore:
; Core components of the battle engine. ; Core components of the battle engine.
Function3c000: ; 3c000 SendOutFirstMons: ; 3c000
xor a xor a
ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsNotFainted], a
ld [wc6fc], a ld [wc6fc], a
@@ -2506,7 +2506,7 @@ WinTrainerBattle: ; 3cfa4
.mobile .mobile
call Function3ebd8 call Function3ebd8
ld c, $28 ld c, 40
call DelayFrames call DelayFrames
ld c, $4 ld c, $4
callba Function4ea0a callba Function4ea0a
@@ -2514,12 +2514,12 @@ WinTrainerBattle: ; 3cfa4
.battle_tower .battle_tower
call Function3ebd8 call Function3ebd8
ld c, $28 ld c, 40
call DelayFrames call DelayFrames
call EmptyBattleTextBox call EmptyBattleTextBox
ld c, $3 ld c, $3
callba BattleTowerText callba BattleTowerText
call Functiona80 call WaitPressAorB_BlinkCursor
ld hl, wPayDayMoney ld hl, wPayDayMoney
ld a, [hli] ld a, [hli]
or [hl] or [hl]
@@ -3135,7 +3135,7 @@ LostBattle: ; 3d38e
call EmptyBattleTextBox call EmptyBattleTextBox
ld c, 2 ld c, 2
callba BattleTowerText callba BattleTowerText
call Functiona80 call WaitPressAorB_BlinkCursor
call ClearTileMap call ClearTileMap
call WhiteBGMap call WhiteBGMap
ret ret
@@ -7713,7 +7713,7 @@ endr
predef PrintTempMonStats predef PrintTempMonStats
ld c, $1e ld c, $1e
call DelayFrames call DelayFrames
call Functiona80 call WaitPressAorB_BlinkCursor
call Call_LoadTempTileMapToTileMap call Call_LoadTempTileMapToTileMap
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
@@ -8474,8 +8474,8 @@ StartBattle: ; 3f4c1
ld a, [TimeOfDayPal] ld a, [TimeOfDayPal]
push af push af
call BattleIntro call BattleIntro
call Function3c000 call SendOutFirstMons
call Function3f69e call ExitBattle
pop af pop af
ld [TimeOfDayPal], a ld [TimeOfDayPal], a
scf scf
@@ -8483,8 +8483,9 @@ StartBattle: ; 3f4c1
; 3f4d9 ; 3f4d9
Function3f4d9: ; 3f4d9 _SendOutFirstMons: ; 3f4d9
call Function3c000 ; unreferenced
call SendOutFirstMons
ret ret
; 3f4dd ; 3f4dd
@@ -8716,9 +8717,9 @@ Function3f662: ; 3f662
; 3f69e ; 3f69e
Function3f69e: ; 3f69e ExitBattle: ; 3f69e
call Function3f6a5 call Function3f6a5
call Function3f6d0 call CleanUpBattleRAM
ret ret
; 3f6a5 ; 3f6a5
@@ -8726,7 +8727,7 @@ Function3f6a5: ; 3f6a5
ld a, [wLinkMode] ld a, [wLinkMode]
and a and a
jr z, .not_linked jr z, .not_linked
call Function3f759 call ShowLinkBattleParticipantsAfterEnd
ld c, 150 ld c, 150
call DelayFrames call DelayFrames
call Function3f77c call Function3f77c
@@ -8736,7 +8737,7 @@ Function3f6a5: ; 3f6a5
ld a, [wBattleResult] ld a, [wBattleResult]
and $f and $f
ret nz ret nz
call Function3f71d call CheckPayDay
xor a xor a
ld [wd1e9], a ld [wd1e9], a
predef Function421e6 predef Function421e6
@@ -8744,7 +8745,7 @@ Function3f6a5: ; 3f6a5
ret ret
; 3f6d0 ; 3f6d0
Function3f6d0: ; 3f6d0 CleanUpBattleRAM: ; 3f6d0
call Function3f998 call Function3f998
xor a xor a
ld [Danger], a ld [Danger], a
@@ -8777,7 +8778,7 @@ Function3f6d0: ; 3f6d0
ret ret
; 3f71d ; 3f71d
Function3f71d: ; 3f71d CheckPayDay: ; 3f71d
ld hl, wPayDayMoney ld hl, wPayDayMoney
ld a, [hli] ld a, [hli]
or [hl] or [hl]
@@ -8786,21 +8787,21 @@ Function3f71d: ; 3f71d
ret z ret z
ld a, [wc73d] ld a, [wc73d]
and a and a
jr z, .asm_3f73d jr z, .okay
ld hl, wPayDayMoney + 2 ld hl, wPayDayMoney + 2
sla [hl] sla [hl]
dec hl dec hl
rl [hl] rl [hl]
dec hl dec hl
rl [hl] rl [hl]
jr nc, .asm_3f73d jr nc, .okay
ld a, $ff ld a, $ff
rept 2 rept 2
ld [hli], a ld [hli], a
endr endr
ld [hl], a ld [hl], a
.asm_3f73d .okay
ld hl, wPayDayMoney + 2 ld hl, wPayDayMoney + 2
ld de, Money + 2 ld de, Money + 2
call Function3d0be call Function3d0be
@@ -8814,7 +8815,7 @@ endr
ret ret
; 3f759 ; 3f759
Function3f759: ; 3f759 ShowLinkBattleParticipantsAfterEnd: ; 3f759
callba MobileFn_1060df callba MobileFn_1060df
callba BackupMobileEventIndex callba BackupMobileEventIndex
ld a, [CurOTMon] ld a, [CurOTMon]
@@ -8829,13 +8830,15 @@ Function3f759: ; 3f759
Function3f77c: ; 3f77c Function3f77c: ; 3f77c
callba CheckMobileBattleError callba CheckMobileBattleError
jp c, Function3f80f jp c, .Mobile_InvalidBattle
call Function3f830 call IsMobileBattle2
jr nz, .proceed jr nz, .proceed
ld hl, wcd2a ld hl, wcd2a
bit 4, [hl] bit 4, [hl]
jr z, .proceed jr z, .proceed
callba Function2b930
callba DetermineLinkBattleResult
.proceed .proceed
ld a, [wBattleResult] ld a, [wBattleResult]
@@ -8843,17 +8846,17 @@ Function3f77c: ; 3f77c
cp $1 cp $1
jr c, .victory jr c, .victory
jr z, .loss jr z, .loss
callba MobileFn_106107 callba MobileFn_SaveBattleResult_Draw
ld de, .Draw ld de, .Draw
jr .store_result jr .store_result
.victory .victory
callba MobileFn_1060fb callba MobileFn_SaveBattleResult_Win
ld de, .Win ld de, .Win
jr .store_result jr .store_result
.loss .loss
callba MobileFn_106101 callba MobileFn_SaveBattleResult_Lose
ld de, .Lose ld de, .Lose
jr .store_result jr .store_result
@@ -8872,13 +8875,13 @@ Function3f77c: ; 3f77c
call CloseSRAM call CloseSRAM
call Function3f830 call IsMobileBattle2
jr z, .asm_3f7ee jr z, .mobile
call Functiona80 call WaitPressAorB_BlinkCursor
call ClearTileMap call ClearTileMap
ret ret
.asm_3f7ee .mobile
ld c, 200 ld c, 200
call DelayFrames call DelayFrames
call ClearTileMap call ClearTileMap
@@ -8894,11 +8897,11 @@ Function3f77c: ; 3f77c
; 3f80f ; 3f80f
Function3f80f: ; 3f80f .Mobile_InvalidBattle: ; 3f80f
hlcoord 6, 8 hlcoord 6, 8
ld de, .Invalid ld de, .Invalid
call PlaceString call PlaceString
ld c, $c8 ld c, 200
call DelayFrames call DelayFrames
call ClearTileMap call ClearTileMap
ret ret
@@ -8909,7 +8912,7 @@ Function3f80f: ; 3f80f
; 3f830 ; 3f830
Function3f830: ; 3f830 IsMobileBattle2: ; 3f830
ld a, [wLinkMode] ld a, [wLinkMode]
cp LINK_MOBILE cp LINK_MOBILE
ret ret
@@ -8919,7 +8922,9 @@ Function3f830: ; 3f830
Function3f836: ; 3f836 Function3f836: ; 3f836
ld a, BANK(sLinkBattleStats) ld a, BANK(sLinkBattleStats)
call GetSRAMBank call GetSRAMBank
call Function3f85f call Function3f85f
call CloseSRAM call CloseSRAM
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
xor a xor a
@@ -8931,7 +8936,7 @@ Function3f836: ; 3f836
call SetPalettes call SetPalettes
ld c, $8 ld c, $8
call DelayFrames call DelayFrames
call Functiona80 call WaitPressAorB_BlinkCursor
ret ret
; 3f85f ; 3f85f
@@ -9634,7 +9639,7 @@ BattleStartMessage: ; 3fc8b
pop hl pop hl
call StdBattleTextBox call StdBattleTextBox
call Function3f830 call IsMobileBattle2
ret nz ret nz
ld c, $2 ld c, $2

View File

@@ -894,7 +894,7 @@ Special_DayCareMon2: ; 17440
jp PrintText jp PrintText
Function1745f: ; 1745f Function1745f: ; 1745f
jp Functiona80 jp WaitPressAorB_BlinkCursor
; 17462 ; 17462
UnknownText_0x17462: ; 0x17462 UnknownText_0x17462: ; 0x17462

View File

@@ -99,7 +99,7 @@ RestartClock: ; 20021 (8:4021)
call .PrintTime call .PrintTime
ld hl, .Text_ClockReset ld hl, .Text_ClockReset
call PrintText call PrintText
call Functiona80 call WaitPressAorB_BlinkCursor
xor a xor a
ret ret

View File

@@ -1,7 +1,7 @@
Function1dd702: ; 1dd702 Function1dd702: ; 1dd702
call Function1dd709 call Function1dd709
call Functiona80 call WaitPressAorB_BlinkCursor
ret ret
; 1dd709 ; 1dd709

View File

@@ -1623,7 +1623,7 @@ PrintWinLossText:: ; 3718
call GetMapScriptHeaderBank call GetMapScriptHeaderBank
call FarPrintText call FarPrintText
call WaitBGMap call WaitBGMap
call Functiona80 call WaitPressAorB_BlinkCursor
ret ret
; 3741 ; 3741

View File

@@ -98,7 +98,9 @@ FarCopyWRAM:: ; 306b
push af push af
ld a, [hBuffer] ld a, [hBuffer]
ld [rSVBK], a ld [rSVBK], a
call CopyBytes call CopyBytes
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret

View File

@@ -355,7 +355,7 @@ JoyTextDelay:: ; a57
ret ret
; a80 ; a80
Functiona80:: ; a80 WaitPressAorB_BlinkCursor:: ; a80
ld a, [hMapObjectIndexBuffer] ld a, [hMapObjectIndexBuffer]
push af push af
ld a, [hObjectStructIndexBuffer] ld a, [hObjectStructIndexBuffer]
@@ -368,7 +368,7 @@ Functiona80:: ; a80
.loop .loop
push hl push hl
hlcoord 18, 17 hlcoord 18, 17
call Functionb06 call BlinkCursor
pop hl pop hl
call JoyTextDelay call JoyTextDelay
@@ -383,7 +383,7 @@ Functiona80:: ; a80
ret ret
; aa5 ; aa5
Functionaa5:: ; aa5 SimpleWaitPressAorB:: ; aa5
.loop .loop
call JoyTextDelay call JoyTextDelay
ld a, [hJoyLast] ld a, [hJoyLast]
@@ -451,14 +451,14 @@ KeepTextOpen:: ; aaf
ret ret
; b06 ; b06
Functionb06:: ; b06 BlinkCursor:: ; b06
push bc push bc
ld a, [hl] ld a, [hl]
ld b, a ld b, a
ld a, "▼" ld a, "▼"
cp b cp b
pop bc pop bc
jr nz, .asm_b27 jr nz, .place_arrow
ld a, [hMapObjectIndexBuffer] ld a, [hMapObjectIndexBuffer]
dec a dec a
ld [hMapObjectIndexBuffer], a ld [hMapObjectIndexBuffer], a
@@ -475,7 +475,7 @@ Functionb06:: ; b06
ld [hObjectStructIndexBuffer], a ld [hObjectStructIndexBuffer], a
ret ret
.asm_b27 .place_arrow
ld a, [hMapObjectIndexBuffer] ld a, [hMapObjectIndexBuffer]
and a and a
ret z ret z
@@ -488,9 +488,9 @@ Functionb06:: ; b06
dec a dec a
ld [hObjectStructIndexBuffer], a ld [hObjectStructIndexBuffer], a
ret nz ret nz
ld a, $6 ld a, 6
ld [hObjectStructIndexBuffer], a ld [hObjectStructIndexBuffer], a
ld a, $ee ld a, "▼"
ld [hl], a ld [hl], a
ret ret
; b40 ; b40

View File

@@ -1438,7 +1438,7 @@ RareCandy: ; ef14
ld bc, $0004 ld bc, $0004
predef PrintTempMonStats predef PrintTempMonStats
call Functiona80 call WaitPressAorB_BlinkCursor
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
@@ -1921,7 +1921,7 @@ Functionf279: ; f279 (3:7279)
ld [hBGMapMode], a ld [hBGMapMode], a
ld c, $32 ld c, $32
call DelayFrames call DelayFrames
jp Functiona80 jp WaitPressAorB_BlinkCursor
Functionf299: ; f299 (3:7299) Functionf299: ; f299 (3:7299)
call WontHaveAnyEffectMessage call WontHaveAnyEffectMessage
@@ -2943,7 +2943,7 @@ Functionf789: ; f789
ld hl, UsedItemText ld hl, UsedItemText
call PrintText call PrintText
call Play_SFX_FULL_HEAL call Play_SFX_FULL_HEAL
call Functiona80 call WaitPressAorB_BlinkCursor
; fallthrough ; fallthrough
; f795 ; f795

1224
main.asm

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1094
misc/mobile_41.asm Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -757,6 +757,7 @@ AlreadyFailed:: ; c6fb
wc6fc:: ds 1 wc6fc:: ds 1
wc6fd:: ds 1 wc6fd:: ds 1
wc6fe::
wPlayerMinimized:: ds 1 ; c6fe wPlayerMinimized:: ds 1 ; c6fe
wc6ff:: wc6ff::
PlayerScreens:: ; c6ff PlayerScreens:: ; c6ff
@@ -2741,7 +2742,9 @@ wPokeAnimStructEnd::
SECTION "WRAM 3", WRAMX, BANK [3] SECTION "WRAM 3", WRAMX, BANK [3]
w3_d000:: ; d000 w3_d000:: ; d000
ds $90 ds $80
w3_d080::
ds $10
w3_d090:: w3_d090::
ds $70 ds $70
@@ -2753,7 +2756,9 @@ BT_TrainerTextIndex::
ds $600 ds $600
wBTChoiceOfLvlGroup:: wBTChoiceOfLvlGroup::
w3_d800:: ds 1 w3_d800:: ds $400
w3_dc00:: ds $168
w3_dd68::
SECTION "GBC Video", WRAMX, BANK [5] SECTION "GBC Video", WRAMX, BANK [5]
@@ -2819,7 +2824,18 @@ BattleAnimTemps:: ; d419
w5_d422:: ds $32 w5_d422:: ds $32
wBattleAnimEnd:: wBattleAnimEnd::
ds $e ds $e
; d462
SECTION "WRAM 5 MOBILE", WRAMX [$d800], BANK [5]
w5_d800:: ds $200
w5_da00:: ds $200
w5_dc00:: ds $d
w5_dc0d:: ds 4
w5_dc11:: ds 9
w5_dc1a:: ds $c
w5_dc26:: ds $c
w5_dc32:: ds $c
w5_dc3e:: ds $c
SECTION "WRAM 6", WRAMX, BANK [6] SECTION "WRAM 6", WRAMX, BANK [6]