mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Battle intro animation function
This commit is contained in:
parent
da7849d800
commit
f53d65c536
@ -5587,7 +5587,7 @@ Function3e4bc: ; 3e4bc
|
||||
call GetPartyParamLocation
|
||||
|
||||
.asm_3e4e2
|
||||
ld de, wd25e
|
||||
ld de, wListMoves_MoveIndicesBuffer
|
||||
ld bc, NUM_MOVES
|
||||
call CopyBytes
|
||||
xor a
|
||||
@ -8589,7 +8589,7 @@ Function3f607: ; 3f607
|
||||
|
||||
Function3f662: ; 3f662
|
||||
ld hl, EnemyMonMoves
|
||||
ld de, wd25e
|
||||
ld de, wListMoves_MoveIndicesBuffer
|
||||
ld b, NUM_MOVES
|
||||
.loop
|
||||
ld a, [de]
|
||||
|
@ -149,3 +149,10 @@ const_value = 1
|
||||
const HAPPINESS_MASSAGE ; 12
|
||||
const HAPPINESS_GAINLEVELATHOME ; 13
|
||||
|
||||
|
||||
const_def
|
||||
const LINK_NULL
|
||||
const LINK_TIMECAPSULE
|
||||
const LINK_TRADECENTER
|
||||
const LINK_COLOSSEUM
|
||||
const LINK_MOBILE
|
||||
|
@ -2202,7 +2202,7 @@ Script_name: ; 0x97716
|
||||
; memory (SingleByteParam)
|
||||
|
||||
call GetScriptByte
|
||||
ld [wcf61], a
|
||||
ld [wNamedObjectTypeBuffer], a
|
||||
|
||||
ContinueToGetName: ; 0x9771c
|
||||
call GetScriptByte
|
||||
@ -2219,7 +2219,7 @@ Script_trainerclassname: ; 0x9772b
|
||||
; memory (SingleByteParam)
|
||||
|
||||
ld a, TRAINER_NAME
|
||||
ld [wcf61], a
|
||||
ld [wNamedObjectTypeBuffer], a
|
||||
jr ContinueToGetName ; 0x97730 $ea
|
||||
; 0x97732
|
||||
|
||||
|
@ -86,7 +86,7 @@ SpecialBuenaPrize: ; 8afd4
|
||||
call Function8b0e2
|
||||
jr z, .asm_8b05f
|
||||
ld [wcf75], a
|
||||
call GetBuenaPrize
|
||||
call Buena_getprize
|
||||
ld a, [hl]
|
||||
ld [wd265], a
|
||||
call GetItemName
|
||||
@ -95,7 +95,7 @@ SpecialBuenaPrize: ; 8afd4
|
||||
call YesNoBox
|
||||
jr c, .asm_8afeb
|
||||
ld a, [wcf75]
|
||||
call GetBuenaPrize
|
||||
call Buena_getprize
|
||||
inc hl
|
||||
ld a, [hld]
|
||||
ld c, a
|
||||
@ -205,7 +205,7 @@ Function8b09e: ; 8b09e
|
||||
call GetMemTileCoord
|
||||
ld bc, $0015
|
||||
add hl, bc
|
||||
ld de, String_8b0ca
|
||||
ld de, .Points_string
|
||||
call PlaceString
|
||||
ld h, b
|
||||
ld l, c
|
||||
@ -219,7 +219,7 @@ Function8b09e: ; 8b09e
|
||||
ret
|
||||
; 8b0ca
|
||||
|
||||
String_8b0ca:
|
||||
.Points_string:
|
||||
db "Points@"
|
||||
; 8b0d1
|
||||
|
||||
@ -230,19 +230,19 @@ MenuDataHeader_0x8b0d1: ; 0x8b0d1
|
||||
; 8b0d6
|
||||
|
||||
Function8b0d6: ; 8b0d6
|
||||
ld hl, MenuDataHeader_0x8b0dd
|
||||
ld hl, .menudataheader
|
||||
call LoadMenuDataHeader
|
||||
ret
|
||||
; 8b0dd
|
||||
|
||||
MenuDataHeader_0x8b0dd: ; 0x8b0dd
|
||||
.menudataheader: ; 0x8b0dd
|
||||
db $40 ; flags
|
||||
db 00, 00 ; start coords
|
||||
db 11, 17 ; end coords
|
||||
; 8b0e2
|
||||
|
||||
Function8b0e2: ; 8b0e2
|
||||
ld hl, MenuDataHeader_0x8b113
|
||||
ld hl, .MenuDataHeader
|
||||
call CopyMenuDataHeader
|
||||
ld a, [MenuSelection]
|
||||
ld [wcf88], a
|
||||
@ -268,45 +268,46 @@ Function8b0e2: ; 8b0e2
|
||||
ret
|
||||
; 8b113
|
||||
|
||||
MenuDataHeader_0x8b113: ; 0x8b113
|
||||
.MenuDataHeader: ; 0x8b113
|
||||
db $40 ; flags
|
||||
db 01, 01 ; start coords
|
||||
db 09, 16 ; end coords
|
||||
dw MenuData2_0x8b11c
|
||||
dw .MenuData2
|
||||
db 1 ; default option
|
||||
; 0x8b11b
|
||||
|
||||
db 0
|
||||
|
||||
MenuData2_0x8b11c: ; 0x8b11c
|
||||
.MenuData2: ; 0x8b11c
|
||||
db $10 ; flags
|
||||
db 4 ; items
|
||||
db $d, $1
|
||||
dbw BANK(Unknown_8b129), Unknown_8b129
|
||||
dbw BANK(BuenaPrizeItem), BuenaPrizeItem
|
||||
dbw BANK(BuenaPrizePoints), BuenaPrizePoints
|
||||
dba .indices
|
||||
dba .prizeitem
|
||||
dba .prizepoints
|
||||
; 8b129
|
||||
|
||||
Unknown_8b129: ; 8b129
|
||||
.indices: ; 8b129
|
||||
db 9
|
||||
db 1, 2, 3, 4, 5, 6, 7, 8, 9, $ff
|
||||
db 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
db -1
|
||||
; 8b134
|
||||
|
||||
BuenaPrizeItem: ; 8b134
|
||||
.prizeitem: ; 8b134
|
||||
ld a, [MenuSelection]
|
||||
call GetBuenaPrize
|
||||
call Buena_getprize
|
||||
ld a, [hl]
|
||||
push de
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetItemName
|
||||
pop hl
|
||||
call PlaceString
|
||||
ret
|
||||
; 8b147
|
||||
|
||||
BuenaPrizePoints: ; 8b147
|
||||
.prizepoints: ; 8b147
|
||||
ld a, [MenuSelection]
|
||||
call GetBuenaPrize
|
||||
call Buena_getprize
|
||||
inc hl
|
||||
ld a, [hl]
|
||||
ld c, "0"
|
||||
@ -315,9 +316,9 @@ BuenaPrizePoints: ; 8b147
|
||||
ret
|
||||
; 8b154
|
||||
|
||||
GetBuenaPrize: ; 8b154
|
||||
Buena_getprize: ; 8b154
|
||||
dec a
|
||||
ld hl, BuenaPrizes
|
||||
ld hl, .prizes
|
||||
ld b, 0
|
||||
ld c, a
|
||||
rept 2
|
||||
@ -326,7 +327,7 @@ endr
|
||||
ret
|
||||
; 8b15e
|
||||
|
||||
BuenaPrizes: ; 8b15e
|
||||
.prizes: ; 8b15e
|
||||
db ULTRA_BALL, 2
|
||||
db FULL_RESTORE, 2
|
||||
db NUGGET, 3
|
||||
|
16
home.asm
16
home.asm
@ -836,7 +836,7 @@ Function33c0:
|
||||
; 33c3
|
||||
|
||||
GetName:: ; 33c3
|
||||
; Return name CurSpecies from name list wcf61 in StringBuffer1.
|
||||
; Return name CurSpecies from name list wNamedObjectTypeBuffer in StringBuffer1.
|
||||
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@ -844,7 +844,7 @@ GetName:: ; 33c3
|
||||
push bc
|
||||
push de
|
||||
|
||||
ld a, [wcf61]
|
||||
ld a, [wNamedObjectTypeBuffer]
|
||||
cp PKMN_NAME
|
||||
jr nz, .NotPokeName
|
||||
|
||||
@ -858,7 +858,7 @@ GetName:: ; 33c3
|
||||
jr .done
|
||||
|
||||
.NotPokeName
|
||||
ld a, [wcf61]
|
||||
ld a, [wNamedObjectTypeBuffer]
|
||||
dec a
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@ -994,7 +994,7 @@ GetItemName:: ; 3468
|
||||
|
||||
ld [CurSpecies], a
|
||||
ld a, ITEM_NAME
|
||||
ld [wcf61], a
|
||||
ld [wNamedObjectTypeBuffer], a
|
||||
call GetName
|
||||
jr .Copied
|
||||
.TM
|
||||
@ -1123,7 +1123,7 @@ GetMoveName:: ; 34f8
|
||||
push hl
|
||||
|
||||
ld a, MOVE_NAME
|
||||
ld [wcf61], a
|
||||
ld [wNamedObjectTypeBuffer], a
|
||||
|
||||
ld a, [wNamedObjectIndexBuffer] ; move id
|
||||
ld [CurSpecies], a
|
||||
@ -1736,7 +1736,7 @@ PrintLevel:: ; 382d
|
||||
; Print TempMonLevel at hl
|
||||
|
||||
ld a, [TempMonLevel]
|
||||
ld [hl], LV_CHAR
|
||||
ld [hl], "<LV>"
|
||||
inc hl
|
||||
|
||||
; How many digits?
|
||||
@ -1752,7 +1752,7 @@ PrintLevel:: ; 382d
|
||||
|
||||
Function383d:: ; 383d
|
||||
; Print :L and all 3 digits
|
||||
ld [hl], LV_CHAR
|
||||
ld [hl], "<LV>"
|
||||
inc hl
|
||||
ld c, 3
|
||||
; 3842
|
||||
@ -1766,7 +1766,7 @@ Function3842:: ; 3842
|
||||
|
||||
|
||||
Function384d:: ; 384d
|
||||
ld hl, wd25e
|
||||
ld hl, wListMoves_MoveIndicesBuffer
|
||||
ld c, a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
|
@ -131,9 +131,9 @@ YesNoBox:: ; 1dcf
|
||||
PlaceYesNoBox:: ; 1dd2
|
||||
jr _YesNoBox
|
||||
|
||||
Function1dd4:: ; 1dd4
|
||||
PlaceGenericTwoOptionBox:: ; 1dd4
|
||||
call LoadMenuDataHeader
|
||||
jr Function1dfe
|
||||
jr InterpretTwoOptionMenu
|
||||
|
||||
_YesNoBox:: ; 1dd9
|
||||
; Return nc (yes) or c (no).
|
||||
@ -141,13 +141,15 @@ _YesNoBox:: ; 1dd9
|
||||
ld hl, YesNoMenuDataHeader
|
||||
call CopyMenuDataHeader
|
||||
pop bc
|
||||
; This seems to be an overflow prevention, but
|
||||
; it was coded wrong.
|
||||
ld a, b
|
||||
cp $e
|
||||
jr nz, .asm_1de9
|
||||
ld a, $e
|
||||
cp SCREEN_WIDTH - 6
|
||||
jr nz, .okay ; should this be "jr nc"?
|
||||
ld a, SCREEN_WIDTH - 6
|
||||
ld b, a
|
||||
|
||||
.asm_1de9
|
||||
.okay
|
||||
ld a, b
|
||||
ld [wcf83], a
|
||||
add $5
|
||||
@ -158,7 +160,7 @@ _YesNoBox:: ; 1dd9
|
||||
ld [wcf84], a
|
||||
call Function1c00
|
||||
|
||||
Function1dfe:: ; 1dfe
|
||||
InterpretTwoOptionMenu:: ; 1dfe
|
||||
call InterpretMenu2
|
||||
push af
|
||||
ld c, $f
|
||||
|
@ -78,6 +78,13 @@ bigdw: MACRO ; big-endian word
|
||||
dx 2, \1
|
||||
ENDM
|
||||
|
||||
dba: MACRO ; dbw bank, address
|
||||
dbw BANK(\1), \1
|
||||
ENDM
|
||||
|
||||
dab: MACRO ; dwb address, bank
|
||||
dwb \1, BANK(\1)
|
||||
ENDM
|
||||
|
||||
lb: MACRO ; r, hi, lo
|
||||
ld \1, (\2) << 8 + (\3)
|
||||
|
@ -1,8 +1,44 @@
|
||||
charmap "@", $50
|
||||
; Control characters
|
||||
charmap "<START>", $00
|
||||
charmap "<PLAY_G>", $14 ; <PLAYER> + gender
|
||||
charmap "<DAY>", $15
|
||||
charmap "<LNBRK>", $22
|
||||
charmap "<POKE>", $24
|
||||
charmap "<RED>", $38
|
||||
charmap "<GREEN>", $39
|
||||
charmap "<ENEMY>", $3f
|
||||
charmap "<MOM>", $49
|
||||
charmap "<PKMN>", $4a
|
||||
charmap "<NEXT>", $4e
|
||||
charmap "<LINE>", $4f
|
||||
|
||||
charmap "@", $50
|
||||
charmap "<PARA>", $51
|
||||
charmap "<PLAYER>", $52
|
||||
charmap "<RIVAL>", $53
|
||||
charmap "#", $54
|
||||
charmap "<CONT>", $55
|
||||
charmap "<......>", $56
|
||||
charmap "<DONE>", $57
|
||||
charmap "<PROMPT>", $58
|
||||
charmap "<TARGET>", $59
|
||||
charmap "<USER>", $5a
|
||||
charmap "<PC>", $5b
|
||||
charmap "<TM>", $5c
|
||||
charmap "<TRNER>", $5d
|
||||
charmap "<ROCKET>", $5e
|
||||
charmap "<DEXEND>", $5f
|
||||
|
||||
; Actual characters
|
||||
charmap "′", $6e
|
||||
charmap "<LV>", $6e
|
||||
charmap "″", $6f
|
||||
|
||||
charmap "<PO>", $70
|
||||
charmap "<KE>", $71
|
||||
charmap "№", $74
|
||||
charmap "…", $75
|
||||
|
||||
charmap "┌", $79
|
||||
charmap "─", $7a
|
||||
charmap "┐", $7b
|
||||
@ -10,9 +46,6 @@
|
||||
charmap "└", $7d
|
||||
charmap "┘", $7e
|
||||
charmap " ", $7f
|
||||
charmap "′", $6e
|
||||
charmap "″", $6f
|
||||
|
||||
|
||||
charmap "A", $80
|
||||
charmap "B", $81
|
||||
@ -91,6 +124,8 @@
|
||||
charmap "'v", $d6
|
||||
|
||||
charmap "'", $e0
|
||||
charmap "<PK>", $e1
|
||||
charmap "<MN>", $e2
|
||||
charmap "-", $e3
|
||||
|
||||
charmap "?", $e6
|
||||
@ -122,6 +157,9 @@
|
||||
charmap "8", $fe
|
||||
charmap "9", $ff
|
||||
|
||||
; Japanese, for those bits of text that
|
||||
; were not translated to English.
|
||||
|
||||
charmap "ガ", $5
|
||||
charmap "ギ", $6
|
||||
charmap "グ", $7
|
||||
@ -277,34 +315,3 @@
|
||||
charmap "ー", $e3
|
||||
|
||||
charmap "ァ", $e9
|
||||
|
||||
charmap "<PLAYER>", $52
|
||||
charmap "<RIVAL>", $53
|
||||
charmap "<RED>", $38
|
||||
charmap "<GREEN>", $39
|
||||
charmap "<TARGET>", $59
|
||||
charmap "<USER>", $5a
|
||||
charmap "<ENEMY>", $3f
|
||||
charmap "<PKMN>", $4a
|
||||
charmap "<PK>", $e1
|
||||
charmap "<MN>", $e2
|
||||
charmap "<PO>", $70
|
||||
charmap "<KE>", $71
|
||||
charmap "<MOM>", $49
|
||||
charmap "<POKE>", $24
|
||||
charmap "<PLAY_G>", $14 ; <PLAYER> + gender
|
||||
charmap "<PARA>", $51
|
||||
charmap "<LINE>", $4f
|
||||
charmap "<NEXT>", $4e
|
||||
charmap "<CONT>", $55
|
||||
charmap "<DONE>", $57
|
||||
charmap "<PROMPT>", $58
|
||||
charmap "<DAY>", $15
|
||||
charmap "<PC>", $5b
|
||||
charmap "<TM>", $5c
|
||||
charmap "<TRNER>", $5d
|
||||
charmap "<ROCKET>", $5e
|
||||
charmap "<......>", $56
|
||||
charmap "<START>", $00
|
||||
charmap "<DEXEND>", $5f
|
||||
charmap "<LNBRK>", $22
|
||||
|
@ -1959,7 +1959,7 @@ Function100c74: ; 100c74
|
||||
ld c, 8
|
||||
call TextBox
|
||||
ld hl, BattleMonMoves
|
||||
ld de, wd25e
|
||||
ld de, wListMoves_MoveIndicesBuffer
|
||||
ld bc, NUM_MOVES
|
||||
call CopyBytes
|
||||
ld a, SCREEN_WIDTH * 2
|
||||
|
6
sram.asm
6
sram.asm
@ -7,8 +7,10 @@ SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
|
||||
|
||||
s0_a600:: ds $11a
|
||||
s0_a71a:: ds $11a
|
||||
s0_a834:: ds $1d7
|
||||
s0_aa0b:: ds $1d7
|
||||
s0_a834:: ds 1
|
||||
s0_a835:: ds 10 * (PartyMon1StatsEnd - PartyMon1Item)
|
||||
s0_aa0b:: ds 1
|
||||
s0_aa0c:: ds 10 * (PartyMon1StatsEnd - PartyMon1Item)
|
||||
|
||||
sMysteryGiftItem:: ds 1
|
||||
s0_abe3:: ds 1
|
||||
|
7
wram.asm
7
wram.asm
@ -1179,7 +1179,7 @@ MonType:: ; cf5f
|
||||
CurSpecies:: ; cf60
|
||||
ds 1
|
||||
|
||||
wcf61:: ds 2
|
||||
wNamedObjectTypeBuffer:: ds 2
|
||||
wIntroSceneIndex::
|
||||
wcf63:: ds 1
|
||||
wNrOfBeatenBattleTowerTrainers::
|
||||
@ -1594,7 +1594,8 @@ wd195:: ds 1
|
||||
wd196:: ds 1
|
||||
wd197:: ds 2
|
||||
wd199:: ds 1
|
||||
wPermission:: ds 3
|
||||
wPermission:: ds 1
|
||||
ds 2
|
||||
|
||||
; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
|
||||
MapHeader:: ; d19d
|
||||
@ -1855,7 +1856,7 @@ CurDamage:: ; d256
|
||||
ds 2
|
||||
wd25a:: ds 3
|
||||
wd25d:: ds 1
|
||||
wd25e:: ds 4
|
||||
wListMoves_MoveIndicesBuffer:: ds 4
|
||||
wd262:: ds 1
|
||||
wd263:: ds 1
|
||||
wd264:: ds 1
|
||||
|
Loading…
Reference in New Issue
Block a user