Finish labels in engine/namingscreen.asm

This commit is contained in:
PikalaxALT 2016-01-09 19:34:14 -05:00
parent 6d1b7f28c8
commit f7ee74c3b8
6 changed files with 79 additions and 69 deletions

View File

@ -2799,7 +2799,7 @@ PlayerAttackDamage: ; 352e2
call ResetDamage call ResetDamage
ld hl, wPlayerMoveStruct + MOVE_POWER ld hl, wPlayerMoveStructPower
ld a, [hli] ld a, [hli]
and a and a
ld d, a ld d, a
@ -2946,7 +2946,7 @@ GetDamageStats: ; 3537e
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr nz, .enemy jr nz, .enemy
ld a, [wPlayerMoveStruct + MOVE_TYPE] ld a, [wPlayerMoveStructType]
cp SPECIAL cp SPECIAL
; special ; special
ld a, [PlayerSAtkLevel] ld a, [PlayerSAtkLevel]
@ -2960,7 +2960,7 @@ GetDamageStats: ; 3537e
jr .end jr .end
.enemy .enemy
ld a, [wEnemyMoveStruct + MOVE_TYPE] ld a, [wEnemyMoveStructType]
cp SPECIAL cp SPECIAL
; special ; special
ld a, [EnemySAtkLevel] ld a, [EnemySAtkLevel]
@ -3063,8 +3063,8 @@ EnemyAttackDamage: ; 353f6
call ResetDamage call ResetDamage
; No damage dealt with 0 power. ; No damage dealt with 0 power.
ld hl, wEnemyMoveStruct + MOVE_POWER ld hl, wEnemyMoveStructPower
ld a, [hli] ; hl = wEnemyMoveStruct + MOVE_TYPE ld a, [hli] ; hl = wEnemyMoveStructType
ld d, a ld d, a
and a and a
ret z ret z
@ -3211,7 +3211,7 @@ BattleCommand_BeatUp: ; 35461
ld a, [hl] ld a, [hl]
ld e, a ld e, a
pop bc pop bc
ld a, [wPlayerMoveStruct + MOVE_POWER] ld a, [wPlayerMoveStructPower]
ld d, a ld d, a
ret ret
@ -3317,7 +3317,7 @@ BattleCommand_BeatUp: ; 35461
ld a, [hl] ld a, [hl]
ld e, a ld e, a
pop bc pop bc
ld a, [wEnemyMoveStruct + MOVE_POWER] ld a, [wEnemyMoveStructPower]
ld d, a ld d, a
ret ret
@ -3401,7 +3401,7 @@ endr
ld l, [hl] ld l, [hl]
ld h, a ld h, a
call TruncateHL_BC call TruncateHL_BC
ld d, $28 ld d, 40
pop af pop af
ld e, a ld e, a
ret ret
@ -3806,14 +3806,14 @@ BattleCommand_ConstantDamage: ; 35726
ld a, [hl] ld a, [hl]
jr nz, .notPlayersTurn jr nz, .notPlayersTurn
ld hl, wPlayerMoveStruct + MOVE_POWER ld hl, wPlayerMoveStructPower
ld [hl], a ld [hl], a
push hl push hl
call PlayerAttackDamage call PlayerAttackDamage
jr .notEnemysTurn jr .notEnemysTurn
.notPlayersTurn .notPlayersTurn
ld hl, wEnemyMoveStruct + MOVE_POWER ld hl, wEnemyMoveStructPower
ld [hl], a ld [hl], a
push hl push hl
call EnemyAttackDamage call EnemyAttackDamage
@ -6521,8 +6521,8 @@ BattleCommand_UnleashEnergy: ; 366e5
ld [de], a ld [de], a
inc de inc de
ld [de], a ld [de], a
ld [wPlayerMoveStruct + MOVE_EFFECT], a ld [wPlayerMoveStructEffect], a
ld [wEnemyMoveStruct + MOVE_EFFECT], a ld [wEnemyMoveStructEffect], a
call BattleRandom call BattleRandom
and 1 and 1
inc a inc a
@ -6752,7 +6752,7 @@ BattleCommand_ForceSwitch: ; 3680f
inc a inc a
ld [wForcedSwitch], a ld [wForcedSwitch], a
call SetBattleDraw call SetBattleDraw
ld a, [wPlayerMoveStruct + MOVE_ANIM] ld a, [wPlayerMoveStructAnimation]
jp .succeed jp .succeed
.trainer .trainer
@ -6845,7 +6845,7 @@ BattleCommand_ForceSwitch: ; 3680f
inc a inc a
ld [wForcedSwitch], a ld [wForcedSwitch], a
call SetBattleDraw call SetBattleDraw
ld a, [wEnemyMoveStruct + MOVE_ANIM] ld a, [wEnemyMoveStructAnimation]
jr .succeed jr .succeed
.vs_trainer .vs_trainer

View File

@ -1173,7 +1173,7 @@ endr
ret ret
.a .a
call Function12185 call NamingScreen_PressedA_GetCursorCommand
cp $1 cp $1
jr z, .select jr z, .select
cp $2 cp $2
@ -1181,7 +1181,7 @@ endr
cp $3 cp $3
jr z, .finished jr z, .finished
call NamingScreen_GetLastCharacter call NamingScreen_GetLastCharacter
call Function121ac call MailComposition_TryAddLastCharacter
jr c, .start jr c, .start
ld hl, wNamingScreenCurrNameLength ld hl, wNamingScreenCurrNameLength
ld a, [hl] ld a, [hl]
@ -1242,8 +1242,8 @@ endr
ret ret
; called from engine/sprite_anims.asm ; called from engine/sprite_anims.asm
Function120c1: ; 120c1 (4:60c1) ComposeMail_AnimateCursor: ; 120c1 (4:60c1)
call Function1210c call .GetDPad
ld hl, SPRITEANIMSTRUCT_0D ld hl, SPRITEANIMSTRUCT_0D
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -1253,12 +1253,12 @@ Function120c1: ; 120c1 (4:60c1)
add hl, bc add hl, bc
ld [hl], e ld [hl], e
cp $5 cp $5
ld de, Unknown_120f8 ld de, .LetterEntries
ld a, 0 ld a, 0
jr nz, .asm_120df jr nz, .got_pointer
ld de, Unknown_12102 ld de, .CaseDelEnd
ld a, 1 ld a, 1
.asm_120df .got_pointer
ld hl, SPRITEANIMSTRUCT_0E ld hl, SPRITEANIMSTRUCT_0E
add hl, bc add hl, bc
add [hl] add [hl]
@ -1278,14 +1278,14 @@ Function120c1: ; 120c1 (4:60c1)
; 120f8 (4:60f8) ; 120f8 (4:60f8)
Unknown_120f8: ; 120f8 .LetterEntries: ; 120f8
db $00, $10, $20, $30, $40, $50, $60, $70, $80, $90 db $00, $10, $20, $30, $40, $50, $60, $70, $80, $90
Unknown_12102: ; 12102 .CaseDelEnd: ; 12102
db $00, $00, $00, $30, $30, $30, $60, $60, $60, $60 db $00, $00, $00, $30, $30, $30, $60, $60, $60, $60
; 1210c ; 1210c
Function1210c: ; 1210c (4:610c) .GetDPad: ; 1210c (4:610c)
ld hl, hJoyLast ld hl, hJoyLast
ld a, [hl] ld a, [hl]
and D_UP and D_UP
@ -1302,26 +1302,26 @@ Function1210c: ; 1210c (4:610c)
ret ret
.right .right
call Function1218b call ComposeMail_GetCursorPosition
and a and a
jr nz, .asm_12138 jr nz, .case_del_done_right
ld hl, SPRITEANIMSTRUCT_0C ld hl, SPRITEANIMSTRUCT_0C
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $9 cp $9
jr nc, .asm_12135 jr nc, .wrap_around_letter_right
inc [hl] inc [hl]
ret ret
.asm_12135 .wrap_around_letter_right
ld [hl], $0 ld [hl], $0
ret ret
.asm_12138 .case_del_done_right
cp $3 cp $3
jr nz, .asm_1213d jr nz, .wrap_around_command_right
xor a xor a
.asm_1213d .wrap_around_command_right
ld e, a ld e, a
add a add a
add e add e
@ -1331,26 +1331,26 @@ Function1210c: ; 1210c (4:610c)
ret ret
.left .left
call Function1218b call ComposeMail_GetCursorPosition
and a and a
jr nz, .asm_12159 jr nz, .caps_del_done_left
ld hl, SPRITEANIMSTRUCT_0C ld hl, SPRITEANIMSTRUCT_0C
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_12156 jr z, .wrap_around_letter_left
dec [hl] dec [hl]
ret ret
.asm_12156 .wrap_around_letter_left
ld [hl], $9 ld [hl], $9
ret ret
.asm_12159 .caps_del_done_left
cp $1 cp $1
jr nz, .asm_1215f jr nz, .wrap_around_command_left
ld a, $4 ld a, $4
.asm_1215f .wrap_around_command_left
rept 2 rept 2
dec a dec a
endr endr
@ -1367,11 +1367,11 @@ endr
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $5 cp $5
jr nc, .asm_12175 jr nc, .wrap_around_down
inc [hl] inc [hl]
ret ret
.asm_12175 .wrap_around_down
ld [hl], $0 ld [hl], $0
ret ret
@ -1380,54 +1380,54 @@ endr
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_12182 jr z, .wrap_around_up
dec [hl] dec [hl]
ret ret
.asm_12182 .wrap_around_up
ld [hl], $5 ld [hl], $5
ret ret
Function12185: ; 12185 (4:6185) NamingScreen_PressedA_GetCursorCommand: ; 12185 (4:6185)
ld hl, wNamingScreenCursorObjectPointer ld hl, wNamingScreenCursorObjectPointer
ld c, [hl] ld c, [hl]
inc hl inc hl
ld b, [hl] ld b, [hl]
Function1218b: ; 1218b (4:618b) ComposeMail_GetCursorPosition: ; 1218b (4:618b)
ld hl, SPRITEANIMSTRUCT_0D ld hl, SPRITEANIMSTRUCT_0D
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $5 cp $5
jr nz, .asm_121aa jr nz, .letter
ld hl, SPRITEANIMSTRUCT_0C ld hl, SPRITEANIMSTRUCT_0C
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $3 cp $3
jr c, .asm_121a4 jr c, .case
cp $6 cp $6
jr c, .asm_121a7 jr c, .del
ld a, $3 ld a, $3
ret ret
.asm_121a4 .case
ld a, $1 ld a, $1
ret ret
.asm_121a7 .del
ld a, $2 ld a, $2
ret ret
.asm_121aa .letter
xor a xor a
ret ret
Function121ac: ; 121ac (4:61ac) MailComposition_TryAddLastCharacter: ; 121ac (4:61ac)
ld a, [wNamingScreenLastCharacter] ld a, [wNamingScreenLastCharacter]
jp MailComposition_TryAddCharacter jp MailComposition_TryAddCharacter
; 121b2 (4:61b2) ; 121b2 (4:61b2)
Function121b2: ; unreferenced ; XXX
ld a, [wNamingScreenCurrNameLength] ld a, [wNamingScreenCurrNameLength]
and a and a
ret z ret z

View File

@ -222,7 +222,7 @@ DoAnimFrame: ; 8d24b
ret ret
.twelve: ; 8d373 (23:5373) .twelve: ; 8d373 (23:5373)
callab Function120c1 callab ComposeMail_AnimateCursor
ret ret
.GameFreakLogo: ; 8d37a (23:537a) .GameFreakLogo: ; 8d37a (23:537a)

View File

@ -218,19 +218,19 @@ endr
.lastmoveopp db ENEMY_LAST_MOVE, PLAYER_LAST_MOVE .lastmoveopp db ENEMY_LAST_MOVE, PLAYER_LAST_MOVE
.vars .vars
dw PlayerSubStatus1, EnemySubStatus1 dw PlayerSubStatus1, EnemySubStatus1
dw PlayerSubStatus2, EnemySubStatus2 dw PlayerSubStatus2, EnemySubStatus2
dw PlayerSubStatus3, EnemySubStatus3 dw PlayerSubStatus3, EnemySubStatus3
dw PlayerSubStatus4, EnemySubStatus4 dw PlayerSubStatus4, EnemySubStatus4
dw PlayerSubStatus5, EnemySubStatus5 dw PlayerSubStatus5, EnemySubStatus5
dw BattleMonStatus, EnemyMonStatus dw BattleMonStatus, EnemyMonStatus
dw wPlayerMoveStruct + MOVE_ANIM, wEnemyMoveStruct + MOVE_ANIM dw wPlayerMoveStructAnimation, wEnemyMoveStructAnimation
dw wPlayerMoveStruct + MOVE_EFFECT, wEnemyMoveStruct + MOVE_EFFECT dw wPlayerMoveStructEffect, wEnemyMoveStructEffect
dw wPlayerMoveStruct + MOVE_POWER, wEnemyMoveStruct + MOVE_POWER dw wPlayerMoveStructPower, wEnemyMoveStructPower
dw wPlayerMoveStruct + MOVE_TYPE, wEnemyMoveStruct + MOVE_TYPE dw wPlayerMoveStructType, wEnemyMoveStructType
dw CurPlayerMove, CurEnemyMove dw CurPlayerMove, CurEnemyMove
dw LastEnemyCounterMove, LastPlayerCounterMove dw LastEnemyCounterMove, LastPlayerCounterMove
dw LastPlayerMove, LastEnemyMove dw LastPlayerMove, LastEnemyMove
; 3a90 ; 3a90

View File

@ -222,3 +222,13 @@ trademon: MACRO
\1CaughtData:: ds 1 ; wc701 | wc733 \1CaughtData:: ds 1 ; wc701 | wc733
\1End:: \1End::
ENDM ENDM
move_struct: MACRO
\1Animation:: ds 1
\1Effect:: ds 1
\1Power:: ds 1
\1Type:: ds 1
\1Accuracy:: ds 1
\1PP:: ds 1
\1EffectChance:: ds 1
endm

View File

@ -374,9 +374,9 @@ wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
wBattle:: wBattle::
wc608:: wc608::
wEnemyMoveStruct:: ds MOVE_LENGTH ; c608 wEnemyMoveStruct:: move_struct wEnemyMoveStruct
wc60f:: wc60f::
wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f wPlayerMoveStruct:: move_struct wPlayerMoveStruct
wc616:: wc616::
ds -4 ds -4
wc612:: ds 4 wc612:: ds 4