diff options
author | Daniel Harding <33dannye@gmail.com> | 2018-02-10 15:52:58 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-10 15:52:58 -0600 |
commit | 24f40989d472407dc51653f2a671348126c6e816 (patch) | |
tree | 3aa0db9181a57a8dd5456955f7957a1950fe1400 /src | |
parent | 9b373dbff462614e484c0a5584e089e668bfd469 (diff) | |
parent | f541f5e03adadf0b9315cc642da9a5b377b52c12 (diff) |
Merge pull request #34 from xCrystal/master
Some Home disasm ; Misc style fixes, constants and labeling ; Split macros ; Create linkerscript and arrange Sections ; Bump extras
Diffstat (limited to 'src')
52 files changed, 5485 insertions, 5093 deletions
diff --git a/src/audio.asm b/src/audio.asm index f3649f0..03bd5b1 100755 --- a/src/audio.asm +++ b/src/audio.asm @@ -1,11 +1,11 @@ -INCLUDE "constants.asm" INCLUDE "macros.asm" +INCLUDE "constants.asm" -SECTION "bank3D",ROMX,BANK[$3D] +SECTION "Audio 1", ROMX INCLUDE "audio/music1.asm" -SECTION "bank3E",ROMX,BANK[$3E] +SECTION "Audio 2", ROMX INCLUDE "audio/music2.asm" -SECTION "bank3F",ROMX,BANK[$3F] +SECTION "Audio 3", ROMX INCLUDE "audio/sfx.asm" diff --git a/src/audio/music1.asm b/src/audio/music1.asm index aa4ef5c..2db31c7 100755 --- a/src/audio/music1.asm +++ b/src/audio/music1.asm @@ -1,14 +1,14 @@ -SetupSound_Ext:: ; f4000 (3d:4000) +_SetupSound:: ; f4000 (3d:4000) jp Music1_Init -SoundTimerHandler_Ext:: ; f4003 (3d:4003) +SoundTimerHandler:: ; f4003 (3d:4003) jp Music1_Update -Func_f4006:: ; f4006 (3d:4006) +_PlaySong:: ; f4006 (3d:4006) jp Music1_PlaySong -Func_f4009:: ; f4009 (3d:4009) - jp Func_f402d +_PlaySFX:: ; f4009 (3d:4009) + jp Music1_PlaySFX Func_f400c:: ; f400c (3d:400c) jp Func_f404e @@ -41,7 +41,7 @@ Music1_PlaySong: ; f4021 (3d:4021) pop hl ret -Func_f402d: ; f402d (3d:402d) +Music1_PlaySFX: ; f402d (3d:402d) push bc push hl ld b, $0 @@ -165,7 +165,7 @@ Music1_Init: ; f407d (3d:407d) Music1_Update: ; f40e9 (3d:40e9) call Music1_EmptyFunc call Music1_CheckForNewSound - ld hl, Func_fc003 + ld hl, SFX_UpdateSFX call Bankswitch3dTo3f ld a, [wCurSongBank] ldh [hBankROM], a @@ -200,7 +200,7 @@ Music1_CheckForNewSound: ; f411c (3d:411c) rla jr c, .noNewSound ld a, [wCurSfxID] - ld hl, Func_fc000 + ld hl, SFX_PlaySFX call Bankswitch3dTo3f ld a, [wCurSfxID] or $80 @@ -1853,10 +1853,10 @@ Music1_ChannelLoopStacks: ; f4c20 (3d:4c20) dw wMusicCh4Stack Unknown_f4c28: ; f4c28 (3d:4c28) -INCBIN "baserom.gbc",$f4c28,$f4c30 - $f4c28 + INCROM $f4c28, $f4c30 Unknown_f4c30: ; f4c30 (3d:4c30) -INCBIN "baserom.gbc",$f4c30,$f4cda - $f4c30 + INCROM $f4c30, $f4cda Music1_WaveInstruments: ; f4cda (3d:4cda) INCLUDE "audio/wave_instruments.asm" @@ -1868,7 +1868,7 @@ Music1_VibratoTypes: ; f4dde (3d:4dde) INCLUDE "audio/vibrato_types.asm" Unknown_f4e85: ; f4e85 (3d:4e85) -INCBIN "baserom.gbc",$f4e85,$f4ee5 - $f4e85 + INCROM $f4e85, $f4ee5 INCLUDE "audio/music1_headers.asm" @@ -1890,5 +1890,5 @@ INCLUDE "audio/music/boosterpack.asm" INCLUDE "audio/music/medal.asm" rept $138 -db $ff + db $ff endr diff --git a/src/audio/music1_headers.asm b/src/audio/music1_headers.asm index 3344365..f5008fe 100755 --- a/src/audio/music1_headers.asm +++ b/src/audio/music1_headers.asm @@ -1,4 +1,4 @@ -NumberOfSongs1: ; 4fee5 (3d:4ee5) +NumberOfSongs1: ; f4ee5 (3d:4ee5) db $1f SongBanks1: ; f4ee6 (3d:4ee6) diff --git a/src/audio/music2.asm b/src/audio/music2.asm index aac0de8..ddae2bb 100755 --- a/src/audio/music2.asm +++ b/src/audio/music2.asm @@ -8,7 +8,7 @@ Func_f8006: ; f8006 (3e:4006) jp Music2_PlaySong Func_f8009: ; f8009 (3e:4009) - jp Func_f802d + jp Music2_PlaySFX Func_f800c: ; f800c (3e:400c) jp Func_f804e @@ -41,7 +41,7 @@ Music2_PlaySong: ; f8021 (3e:4021) pop hl ret -Func_f802d: ; f802d (3e:402d) +Music2_PlaySFX: ; f802d (3e:402d) push bc push hl ld b, $0 @@ -165,7 +165,7 @@ Music2_Init: ; f807d (3e:407d) Music2_Update: ; f80e9 (3e:40e9) call Music2_EmptyFunc call Music2_CheckForNewSound - ld hl, Func_fc003 + ld hl, SFX_UpdateSFX call Bankswitch3dTo3f ld a, [wCurSongBank] ldh [hBankROM], a @@ -200,7 +200,7 @@ Music2_CheckForNewSound: ; f811c (3e:411c) rla jr c, .noNewSound ld a, [wCurSfxID] - ld hl, Func_fc000 + ld hl, SFX_PlaySFX call Bankswitch3dTo3f ld a, [wCurSfxID] or $80 @@ -1853,10 +1853,10 @@ Music2_ChannelLoopStacks: ; f8c20 (3e:4c20) dw wMusicCh4Stack Unknown_f8c28: ; f8c28 (3e:4c28) -INCBIN "baserom.gbc",$f8c28,$f8c30 - $f8c28 + INCROM $f8c28, $f8c30 Unknown_f8c30: ; f8c30 (3e:4c30) -INCBIN "baserom.gbc",$f8c30,$f8cda - $f8c30 + INCROM $f8c30, $f8cda Music2_WaveInstruments: ; f8cda (3e:4cda) INCLUDE "audio/wave_instruments.asm" @@ -1868,7 +1868,7 @@ Music2_VibratoTypes: ; f8dde (3e:4dde) INCLUDE "audio/vibrato_types.asm" Unknown_f8e85: ; f8e85 (3e:4e85) -INCBIN "baserom.gbc",$f8e85,$f8ee5 - $f8e85 + INCROM $f8e85, $f8ee5 INCLUDE "audio/music2_headers.asm" @@ -1884,5 +1884,5 @@ INCLUDE "audio/music/hallofhonor.asm" INCLUDE "audio/music/credits.asm" rept $109 -db $ff + db $ff endr diff --git a/src/audio/sfx.asm b/src/audio/sfx.asm index a94596d..6b3e2bc 100755 --- a/src/audio/sfx.asm +++ b/src/audio/sfx.asm @@ -1,10 +1,10 @@ -Func_fc000: ; fc000 (3f:4000) - jp SFX_PlaySfx +SFX_PlaySFX: ; fc000 (3f:4000) + jp SFX_Play -Func_fc003: ; fc003 (3f:4003) - jp Func_fc059 +SFX_UpdateSFX: ; fc003 (3f:4003) + jp SFX_Update -SFX_PlaySfx: ; fc006 (3f:4006) +SFX_Play: ; fc006 (3f:4006) ld hl, NumberOfSFX cp [hl] jr nc, .invalidID @@ -59,7 +59,7 @@ SFX_PlaySfx: ; fc006 (3f:4006) .invalidID ret -Func_fc059: ; fc059 (3f:4059) +SFX_Update: ; fc059 (3f:4059) ld a, [wdd8c] or a jr nz, .asm_fc063 @@ -595,5 +595,5 @@ INCLUDE "audio/sfx/sfx_5e.asm" INCLUDE "audio/sfx/sfx_5f.asm" rept $c1 -db $ff + db $ff endr diff --git a/src/constants/booster_constants.asm b/src/constants/booster_constants.asm index e58f428..f5efb9b 100755 --- a/src/constants/booster_constants.asm +++ b/src/constants/booster_constants.asm @@ -1,41 +1,45 @@ -BOOSTER_CARD_TYPE_GRASS EQU $00
-BOOSTER_CARD_TYPE_FIRE EQU $01
-BOOSTER_CARD_TYPE_LIGHTNING EQU $03
-BOOSTER_CARD_TYPE_WATER EQU $02
-BOOSTER_CARD_TYPE_FIGHTING EQU $04
-BOOSTER_CARD_TYPE_PSYCHIC EQU $05
-BOOSTER_CARD_TYPE_COLORLESS EQU $06
-BOOSTER_CARD_TYPE_TRAINER EQU $07
-BOOSTER_CARD_TYPE_ENERGY EQU $08
-BOOSTER_CARD_TYPE_AMOUNT EQU $09
-
-BOOSTER_ColoNeutral EQU $00
-BOOSTER_ColoGrass EQU $01
-BOOSTER_ColoFire EQU $02
-BOOSTER_ColoWater EQU $03
-BOOSTER_ColoLightning EQU $04
-BOOSTER_ColoFighting EQU $05
-BOOSTER_ColoTrainer EQU $06
-BOOSTER_EvoNeutral EQU $07
-BOOSTER_EvoGrass EQU $08
-BOOSTER_EvoNeutralFireEnergy EQU $09
-BOOSTER_EvoWater EQU $0a
-BOOSTER_EvoFighting EQU $0b
-BOOSTER_EvoPsychic EQU $0c
-BOOSTER_EvoTrainer EQU $0d
-BOOSTER_MysteryNeutral EQU $0e
-BOOSTER_MysteryGrassColorless EQU $0f
-BOOSTER_MysteryWaterColorless EQU $10
-BOOSTER_LightningColorless EQU $11
-BOOSTER_MysteryFightingColorless EQU $12
-BOOSTER_MysteryTrainerColorless EQU $13
-BOOSTER_LabTrainerLessFighting EQU $14
-BOOSTER_LabGrass EQU $15
-BOOSTER_LabWater EQU $16
-BOOSTER_LabPsychic EQU $17
-BOOSTER_LabTrainer EQU $18
-BOOSTER_EnergyLightningFire EQU $19
-BOOSTER_EnergyWaterFighting EQU $1a
-BOOSTER_EnergyGrassPsychic EQU $1b
-BOOSTER_RandomEnergies EQU $1c
-NO_BOOSTER EQU $ff
+NUM_CARDS_IN_BOOSTER EQU 10 + + const_def + const BOOSTER_CARD_TYPE_GRASS ; $00 + const BOOSTER_CARD_TYPE_FIRE ; $01 + const BOOSTER_CARD_TYPE_WATER ; $02 + const BOOSTER_CARD_TYPE_LIGHTNING ; $03 + const BOOSTER_CARD_TYPE_FIGHTING ; $04 + const BOOSTER_CARD_TYPE_PSYCHIC ; $05 + const BOOSTER_CARD_TYPE_COLORLESS ; $06 + const BOOSTER_CARD_TYPE_TRAINER ; $07 + const BOOSTER_CARD_TYPE_ENERGY ; $08 +NUM_BOOSTER_CARD_TYPES EQU const_value + + const_def + const BOOSTER_COLOSSEUM_NEUTRAL ; $00 + const BOOSTER_COLOSSEUM_GRASS ; $01 + const BOOSTER_COLOSSEUM_FIRE ; $02 + const BOOSTER_COLOSSEUM_WATER ; $03 + const BOOSTER_COLOSSEUM_LIGHTNING ; $04 + const BOOSTER_COLOSSEUM_FIGHTING ; $05 + const BOOSTER_COLOSSEUM_TRAINER ; $06 + const BOOSTER_EVOLUTION_NEUTRAL ; $07 + const BOOSTER_EVOLUTION_GRASS ; $08 + const BOOSTER_EVOLUTION_FIRE ; $09 + const BOOSTER_EVOLUTION_WATER ; $0a + const BOOSTER_EVOLUTION_FIGHTING ; $0b + const BOOSTER_EVOLUTION_PSYCHIC ; $0c + const BOOSTER_EVOLUTION_TRAINER ; $0d + const BOOSTER_MYSTERY_NEUTRAL ; $0e + const BOOSTER_MYSTERY_GRASS_COLORLESS ; $0f + const BOOSTER_MYSTERY_WATER_COLORLESS ; $10 + const BOOSTER_MYSTERY_LIGHTNING_COLORLESS ; $11 + const BOOSTER_MYSTERY_FIGHTING_COLORLESS ; $12 + const BOOSTER_MYSTERY_TRAINER_COLORLESS ; $13 + const BOOSTER_LABORATORY_NEUTRAL ; $14 + const BOOSTER_LABORATORY_GRASS ; $15 + const BOOSTER_LABORATORY_WATER ; $16 + const BOOSTER_LABORATORY_PSYCHIC ; $17 + const BOOSTER_LABORATORY_TRAINER ; $18 + const BOOSTER_ENERGY_LIGHTNING_FIRE ; $19 + const BOOSTER_ENERGY_WATER_FIGHTING ; $1a + const BOOSTER_ENERGY_GRASS_PSYCHIC ; $1b + const BOOSTER_ENERGY_RANDOM ; $1c +NO_BOOSTER EQU $ff diff --git a/src/constants/card_constants.asm b/src/constants/card_constants.asm index dd96647..30560c2 100755 --- a/src/constants/card_constants.asm +++ b/src/constants/card_constants.asm @@ -1,230 +1,230 @@ -GRASS_ENERGY EQU $01 -FIRE_ENERGY EQU $02 -WATER_ENERGY EQU $03 -LIGHTNING_ENERGY EQU $04 -FIGHTING_ENERGY EQU $05 -PSYCHIC_ENERGY EQU $06 -DOUBLE_COLORLESS_ENERGY EQU $07 -BULBASAUR EQU $08 -IVYSAUR EQU $09 -VENUSAUR1 EQU $0A -VENUSAUR2 EQU $0B -CATERPIE EQU $0C -METAPOD EQU $0D -BUTTERFREE EQU $0E -WEEDLE EQU $0F -KAKUNA EQU $10 -BEEDRILL EQU $11 -EKANS EQU $12 -ARBOK EQU $13 -NIDORANF EQU $14 -NIDORINA EQU $15 -NIDOQUEEN EQU $16 -NIDORANM EQU $17 -NIDORINO EQU $18 -NIDOKING EQU $19 -ZUBAT EQU $1A -GOLBAT EQU $1B -ODDISH EQU $1C -GLOOM EQU $1D -VILEPLUME EQU $1E -PARAS EQU $1F -PARASECT EQU $20 -VENONAT EQU $21 -VENOMOTH EQU $22 -BELLSPROUT EQU $23 -WEEPINBELL EQU $24 -VICTREEBEL EQU $25 -GRIMER EQU $26 -MUK EQU $27 -EXEGGCUTE EQU $28 -EXEGGUTOR EQU $29 -KOFFING EQU $2A -WEEZING EQU $2B -TANGELA1 EQU $2C -TANGELA2 EQU $2D -SCYTHER EQU $2E -PINSIR EQU $2F -CHARMANDER EQU $30 -CHARMELEON EQU $31 -CHARIZARD EQU $32 -VULPIX EQU $33 -NINETAILS1 EQU $34 -NINETAILS2 EQU $35 -GROWLITHE EQU $36 -ARCANINE1 EQU $37 -ARCANINE2 EQU $38 -PONYTA EQU $39 -RAPIDASH EQU $3A -MAGMAR1 EQU $3B -MAGMAR2 EQU $3C -FLAREON1 EQU $3D -FLAREON2 EQU $3E -MOLTRES1 EQU $3F -MOLTRES2 EQU $40 -SQUIRTLE EQU $41 -WARTORTLE EQU $42 -BLASTOISE EQU $43 -PSYDUCK EQU $44 -GOLDUCK EQU $45 -POLIWAG EQU $46 -POLIWHIRL EQU $47 -POLIWRATH EQU $48 -TENTACOOL EQU $49 -TENTACRUEL EQU $4A -SEEL EQU $4B -DEWGONG EQU $4C -SHELLDER EQU $4D -CLOYSTER EQU $4E -KRABBY EQU $4F -KINGLER EQU $50 -HORSEA EQU $51 -SEADRA EQU $52 -GOLDEEN EQU $53 -SEAKING EQU $54 -STARYU EQU $55 -STARMIE EQU $56 -MAGIKARP EQU $57 -GYARADOS EQU $58 -LAPRAS EQU $59 -VAPOREON1 EQU $5A -VAPOREON2 EQU $5B -OMANYTE EQU $5C -OMASTAR EQU $5D -ARTICUNO1 EQU $5E -ARTICUNO2 EQU $5F -PIKACHU1 EQU $60 -PIKACHU2 EQU $61 -PIKACHU3 EQU $62 -PIKACHU4 EQU $63 -FLYING_PIKACHU EQU $64 -SURFING_PIKACHU1 EQU $65 -SURFING_PIKACHU2 EQU $66 -RAICHU1 EQU $67 -RAICHU2 EQU $68 -MAGNEMITE1 EQU $69 -MAGNEMITE2 EQU $6A -MAGNETON1 EQU $6B -MAGNETON2 EQU $6C -VOLTORB EQU $6D -ELECTRODE1 EQU $6E -ELECTRODE2 EQU $6F -ELECTABUZZ1 EQU $70 -ELECTABUZZ2 EQU $71 -JOLTEON1 EQU $72 -JOLTEON2 EQU $73 -ZAPDOS1 EQU $74 -ZAPDOS2 EQU $75 -ZAPDOS3 EQU $76 -SANDSHREW EQU $77 -SANDSLASH EQU $78 -DIGLETT EQU $79 -DUGTRIO EQU $7A -MANKEY EQU $7B -PRIMEAPE EQU $7C -MACHOP EQU $7D -MACHOKE EQU $7E -MACHAMP EQU $7F -GEODUDE EQU $80 -GRAVELER EQU $81 -GOLEM EQU $82 -ONIX EQU $83 -CUBONE EQU $84 -MAROWAK1 EQU $85 -MAROWAK2 EQU $86 -HITMONLEE EQU $87 -HITMONCHAN EQU $88 -RHYHORN EQU $89 -RHYDON EQU $8A -KABUTO EQU $8B -KABUTOPS EQU $8C -AERODACTYL EQU $8D -ABRA EQU $8E -KADABRA EQU $8F -ALAKAZAM EQU $90 -SLOWPOKE1 EQU $91 -SLOWPOKE2 EQU $92 -SLOWBRO EQU $93 -GASTLY1 EQU $94 -GASTLY2 EQU $95 -HAUNTER1 EQU $96 -HAUNTER2 EQU $97 -GENGAR EQU $98 -DROWZEE EQU $99 -HYPNO EQU $9A -MR_MIME EQU $9B -JYNX EQU $9C -MEWTWO1 EQU $9D -MEWTWO2 EQU $9E -MEWTWO3 EQU $9F -MEW1 EQU $A0 -MEW2 EQU $A1 -MEW3 EQU $A2 -PIDGEY EQU $A3 -PIDGEOTTO EQU $A4 -PIDGEOT1 EQU $A5 -PIDGEOT2 EQU $A6 -RATTATA EQU $A7 -RATICATE EQU $A8 -SPEAROW EQU $A9 -FEAROW EQU $AA -CLEFAIRY EQU $AB -CLEFABLE EQU $AC -JIGGLYPUFF1 EQU $AD -JIGGLYPUFF2 EQU $AE -JIGGLYPUFF3 EQU $AF -WIGGLYTUFF EQU $B0 -MEOWTH1 EQU $B1 -MEOWTH2 EQU $B2 -PERSIAN EQU $B3 -FARFETCHD EQU $B4 -DODUO EQU $B5 -DODRIO EQU $B6 -LICKITUNG EQU $B7 -CHANSEY EQU $B8 -KANGASKHAN EQU $B9 -TAUROS EQU $BA -DITTO EQU $BB -EEVEE EQU $BC -PORYGON EQU $BD -SNORLAX EQU $BE -DRATINI EQU $BF -DRAGONAIR EQU $C0 -DRAGONITE1 EQU $C1 -DRAGONITE2 EQU $C2 -PROFESSOR_OAK EQU $C3 -IMPOSTER_PROFESSOR_OAK EQU $C4 -BILL EQU $C5 -MR_FUJI EQU $C6 -LASS EQU $C7 -IMAKUNI_CARD EQU $C8 -POKEMON_TRADER EQU $C9 -POKEMON_BREEDER EQU $CA -CLEFAIRY_DOLL EQU $CB -MYSTERIOUS_FOSSIL EQU $CC -ENERGY_RETRIEVAL EQU $CD -SUPER_ENERGY_RETRIEVAL EQU $CE -ENERGY_SEARCH EQU $CF -ENERGY_REMOVAL EQU $D0 -SUPER_ENERGY_REMOVAL EQU $D1 -SWITCH EQU $D2 -POKEMON_CENTER EQU $D3 -POKE_BALL EQU $D4 -SCOOP_UP EQU $D5 -COMPUTER_SEARCH EQU $D6 -POKEDEX EQU $D7 -PLUSPOWER EQU $D8 -DEFENDER EQU $D9 -ITEM_FINDER EQU $DA -GUST_OF_WIND EQU $DB -DEVOLUTION_SPRAY EQU $DC -POTION EQU $DD -SUPER_POTION EQU $DE -FULL_HEAL EQU $DF -REVIVE EQU $E0 -MAINTENANCE EQU $E1 -POKEMON_FLUTE EQU $E2 -GAMBLER EQU $E3 -RECYCLE EQU $E4 - -NUM_CARDS EQU RECYCLE + const_def 1 + const GRASS_ENERGY ; $01 + const FIRE_ENERGY ; $02 + const WATER_ENERGY ; $03 + const LIGHTNING_ENERGY ; $04 + const FIGHTING_ENERGY ; $05 + const PSYCHIC_ENERGY ; $06 + const DOUBLE_COLORLESS_ENERGY ; $07 + const BULBASAUR ; $08 + const IVYSAUR ; $09 + const VENUSAUR1 ; $0A + const VENUSAUR2 ; $0B + const CATERPIE ; $0C + const METAPOD ; $0D + const BUTTERFREE ; $0E + const WEEDLE ; $0F + const KAKUNA ; $10 + const BEEDRILL ; $11 + const EKANS ; $12 + const ARBOK ; $13 + const NIDORANF ; $14 + const NIDORINA ; $15 + const NIDOQUEEN ; $16 + const NIDORANM ; $17 + const NIDORINO ; $18 + const NIDOKING ; $19 + const ZUBAT ; $1A + const GOLBAT ; $1B + const ODDISH ; $1C + const GLOOM ; $1D + const VILEPLUME ; $1E + const PARAS ; $1F + const PARASECT ; $20 + const VENONAT ; $21 + const VENOMOTH ; $22 + const BELLSPROUT ; $23 + const WEEPINBELL ; $24 + const VICTREEBEL ; $25 + const GRIMER ; $26 + const MUK ; $27 + const EXEGGCUTE ; $28 + const EXEGGUTOR ; $29 + const KOFFING ; $2A + const WEEZING ; $2B + const TANGELA1 ; $2C + const TANGELA2 ; $2D + const SCYTHER ; $2E + const PINSIR ; $2F + const CHARMANDER ; $30 + const CHARMELEON ; $31 + const CHARIZARD ; $32 + const VULPIX ; $33 + const NINETAILS1 ; $34 + const NINETAILS2 ; $35 + const GROWLITHE ; $36 + const ARCANINE1 ; $37 + const ARCANINE2 ; $38 + const PONYTA ; $39 + const RAPIDASH ; $3A + const MAGMAR1 ; $3B + const MAGMAR2 ; $3C + const FLAREON1 ; $3D + const FLAREON2 ; $3E + const MOLTRES1 ; $3F + const MOLTRES2 ; $40 + const SQUIRTLE ; $41 + const WARTORTLE ; $42 + const BLASTOISE ; $43 + const PSYDUCK ; $44 + const GOLDUCK ; $45 + const POLIWAG ; $46 + const POLIWHIRL ; $47 + const POLIWRATH ; $48 + const TENTACOOL ; $49 + const TENTACRUEL ; $4A + const SEEL ; $4B + const DEWGONG ; $4C + const SHELLDER ; $4D + const CLOYSTER ; $4E + const KRABBY ; $4F + const KINGLER ; $50 + const HORSEA ; $51 + const SEADRA ; $52 + const GOLDEEN ; $53 + const SEAKING ; $54 + const STARYU ; $55 + const STARMIE ; $56 + const MAGIKARP ; $57 + const GYARADOS ; $58 + const LAPRAS ; $59 + const VAPOREON1 ; $5A + const VAPOREON2 ; $5B + const OMANYTE ; $5C + const OMASTAR ; $5D + const ARTICUNO1 ; $5E + const ARTICUNO2 ; $5F + const PIKACHU1 ; $60 + const PIKACHU2 ; $61 + const PIKACHU3 ; $62 + const PIKACHU4 ; $63 + const FLYING_PIKACHU ; $64 + const SURFING_PIKACHU1 ; $65 + const SURFING_PIKACHU2 ; $66 + const RAICHU1 ; $67 + const RAICHU2 ; $68 + const MAGNEMITE1 ; $69 + const MAGNEMITE2 ; $6A + const MAGNETON1 ; $6B + const MAGNETON2 ; $6C + const VOLTORB ; $6D + const ELECTRODE1 ; $6E + const ELECTRODE2 ; $6F + const ELECTABUZZ1 ; $70 + const ELECTABUZZ2 ; $71 + const JOLTEON1 ; $72 + const JOLTEON2 ; $73 + const ZAPDOS1 ; $74 + const ZAPDOS2 ; $75 + const ZAPDOS3 ; $76 + const SANDSHREW ; $77 + const SANDSLASH ; $78 + const DIGLETT ; $79 + const DUGTRIO ; $7A + const MANKEY ; $7B + const PRIMEAPE ; $7C + const MACHOP ; $7D + const MACHOKE ; $7E + const MACHAMP ; $7F + const GEODUDE ; $80 + const GRAVELER ; $81 + const GOLEM ; $82 + const ONIX ; $83 + const CUBONE ; $84 + const MAROWAK1 ; $85 + const MAROWAK2 ; $86 + const HITMONLEE ; $87 + const HITMONCHAN ; $88 + const RHYHORN ; $89 + const RHYDON ; $8A + const KABUTO ; $8B + const KABUTOPS ; $8C + const AERODACTYL ; $8D + const ABRA ; $8E + const KADABRA ; $8F + const ALAKAZAM ; $90 + const SLOWPOKE1 ; $91 + const SLOWPOKE2 ; $92 + const SLOWBRO ; $93 + const GASTLY1 ; $94 + const GASTLY2 ; $95 + const HAUNTER1 ; $96 + const HAUNTER2 ; $97 + const GENGAR ; $98 + const DROWZEE ; $99 + const HYPNO ; $9A + const MR_MIME ; $9B + const JYNX ; $9C + const MEWTWO1 ; $9D + const MEWTWO2 ; $9E + const MEWTWO3 ; $9F + const MEW1 ; $A0 + const MEW2 ; $A1 + const MEW3 ; $A2 + const PIDGEY ; $A3 + const PIDGEOTTO ; $A4 + const PIDGEOT1 ; $A5 + const PIDGEOT2 ; $A6 + const RATTATA ; $A7 + const RATICATE ; $A8 + const SPEAROW ; $A9 + const FEAROW ; $AA + const CLEFAIRY ; $AB + const CLEFABLE ; $AC + const JIGGLYPUFF1 ; $AD + const JIGGLYPUFF2 ; $AE + const JIGGLYPUFF3 ; $AF + const WIGGLYTUFF ; $B0 + const MEOWTH1 ; $B1 + const MEOWTH2 ; $B2 + const PERSIAN ; $B3 + const FARFETCHD ; $B4 + const DODUO ; $B5 + const DODRIO ; $B6 + const LICKITUNG ; $B7 + const CHANSEY ; $B8 + const KANGASKHAN ; $B9 + const TAUROS ; $BA + const DITTO ; $BB + const EEVEE ; $BC + const PORYGON ; $BD + const SNORLAX ; $BE + const DRATINI ; $BF + const DRAGONAIR ; $C0 + const DRAGONITE1 ; $C1 + const DRAGONITE2 ; $C2 + const PROFESSOR_OAK ; $C3 + const IMPOSTER_PROFESSOR_OAK ; $C4 + const BILL ; $C5 + const MR_FUJI ; $C6 + const LASS ; $C7 + const IMAKUNI_CARD ; $C8 + const POKEMON_TRADER ; $C9 + const POKEMON_BREEDER ; $CA + const CLEFAIRY_DOLL ; $CB + const MYSTERIOUS_FOSSIL ; $CC + const ENERGY_RETRIEVAL ; $CD + const SUPER_ENERGY_RETRIEVAL ; $CE + const ENERGY_SEARCH ; $CF + const ENERGY_REMOVAL ; $D0 + const SUPER_ENERGY_REMOVAL ; $D1 + const SWITCH ; $D2 + const POKEMON_CENTER ; $D3 + const POKE_BALL ; $D4 + const SCOOP_UP ; $D5 + const COMPUTER_SEARCH ; $D6 + const POKEDEX ; $D7 + const PLUSPOWER ; $D8 + const DEFENDER ; $D9 + const ITEM_FINDER ; $DA + const GUST_OF_WIND ; $DB + const DEVOLUTION_SPRAY ; $DC + const POTION ; $DD + const SUPER_POTION ; $DE + const FULL_HEAL ; $DF + const REVIVE ; $E0 + const MAINTENANCE ; $E1 + const POKEMON_FLUTE ; $E2 + const GAMBLER ; $E3 + const RECYCLE ; $E4 +NUM_CARDS EQU const_value + -1 diff --git a/src/constants/card_data_constants.asm b/src/constants/card_data_constants.asm index 637eb90..a98a0c7 100644 --- a/src/constants/card_data_constants.asm +++ b/src/constants/card_data_constants.asm @@ -1,33 +1,45 @@ +NONE EQU $0 + PKMN_CARD_DATA_LENGTH EQU $41 TRN_CARD_DATA_LENGTH EQU $0e ENERGY_CARD_DATA_LENGTH EQU $0e -DECK_NAME_SIZE EQU 24 -DECK_SIZE EQU 60 -BENCH_SIZE EQU 5 +;;; generic type constants +; double up as Pokemon card types + const_def + const FIRE ; $0 + const GRASS ; $1 + const LIGHTNING ; $2 + const WATER ; $3 + const FIGHTING ; $4 + const PSYCHIC ; $5 + const COLORLESS ; $6 + const UNUSED_TYPE ; $7 +NUM_TYPES EQU const_value ;;; card types -FIRE EQU $0 -GRASS EQU $1 -LIGHTNING EQU $2 -WATER EQU $3 -FIGHTING EQU $4 -PSYCHIC EQU $5 -COLORLESS EQU $6 - -FIRE_ENERGY_CARD EQU $8 -GRASS_ENERGY_CARD EQU $9 -LIGHTNING_ENERGY_CARD EQU $A -WATER_ENERGY_CARD EQU $B -FIGHTING_ENERGY_CARD EQU $C -PSYCHIC_ENERGY_CARD EQU $D -DOUBLE_COLORLESS_ENERGY_CARD EQU $E - -TRAINER_CARD EQU $10 - -NUM_TYPES EQU FIRE_ENERGY_CARD - FIRE - -ENERGY_CARD_F EQU 3 +TYPE_PKMN_FIRE EQUS "FIRE" +TYPE_PKMN_GRASS EQUS "GRASS" +TYPE_PKMN_LIGHTNING EQUS "LIGHTNING" +TYPE_PKMN_WATER EQUS "WATER" +TYPE_PKMN_FIGHTING EQUS "FIGHTING" +TYPE_PKMN_PSYCHIC EQUS "PSYCHIC" +TYPE_PKMN_COLORLESS EQUS "COLORLESS" +TYPE_PKMN_UNUSED EQUS "UNUSED_TYPE" + const_def TYPE_PKMN_UNUSED + 1 - TYPE_PKMN_FIRE + const TYPE_ENERGY_FIRE ; $8 + const TYPE_ENERGY_GRASS ; $9 + const TYPE_ENERGY_LIGHTNING ; $A + const TYPE_ENERGY_WATER ; $B + const TYPE_ENERGY_FIGHTING ; $C + const TYPE_ENERGY_PSYCHIC ; $D + const TYPE_ENERGY_DOUBLE_COLORLESS ; $E + const TYPE_ENERGY_UNUSED ; $F + const TYPE_TRAINER ; $10 + const TYPE_TRAINER_UNUSED ; $11 +NUM_CARD_TYPES EQU const_value + -1 + +TYPE_ENERGY_F EQU 3 ;;; rarity CIRCLE EQU $0 @@ -35,7 +47,7 @@ DIAMOND EQU $1 STAR EQU $2 PROMOSTAR EQU $FF -;;; set +;;; set 1 COLOSSEUM EQU $00 EVOLUTION EQU $10 MYSTERY EQU $20 @@ -43,7 +55,7 @@ LABORATORY EQU $30 PROMOTIONAL EQU $40 ENERGY EQU $50 -NONE EQU $0 +;;; set 2 JUNGLE EQU $1 FOSSIL EQU $2 GB EQU $7 diff --git a/src/constants/deck_constants.asm b/src/constants/deck_constants.asm index 9f2198b..d6e5b1a 100755 --- a/src/constants/deck_constants.asm +++ b/src/constants/deck_constants.asm @@ -1,57 +1,57 @@ -UNNAMED_DECK_DECK EQU $00 -UNNAMED_DECK_DECK2 EQU $01 -SAMS_PRACTICE_DECK EQU $02 -PRACTICE_PLAYER_DECK EQU $03 -SAMS_NORMAL_DECK EQU $04 -CHARMANDER_AND_FRIENDS_DECK EQU $05 -CHARMANDER_EXTRA_DECK EQU $06 -SQUIRTLE_AND_FRIENDS_DECK EQU $07 -SQUIRTLE_EXTRA_DECK EQU $08 -BULBASAUR_AND_FRIENDS_DECK EQU $09 -BULBASAUR_EXTRA_DECK EQU $0A -LIGHTNING_AND_FIRE_DECK EQU $0B -WATER_AND_FIGHTING_DECK EQU $0C -GRASS_AND_PSYCHIC_DECK EQU $0D -LEGENDARY_MOLTRES_DECK EQU $0E -LEGENDARY_ZAPDOS_DECK EQU $0F -LEGENDARY_ARTICUNO_DECK EQU $10 -LEGENDARY_DRAGONITE_DECK EQU $11 -FIRST_STRIKE_DECK EQU $12 -ROCK_CRUSHER_DECK EQU $13 -GO_GO_RAIN_DANCE_DECK EQU $14 -ZAPPING_SELFDESTRUCT_DECK EQU $15 -FLOWER_POWER_DECK EQU $16 -STRANGE_PSYSHOCK_DECK EQU $17 -WONDERS_OF_SCIENCE_DECK EQU $18 -FIRE_CHARGE_DECK EQU $19 -IM_RONALD_DECK EQU $1A -POWERFUL_RONALD_DECK EQU $1B -INVINCIBLE_RONALD_DECK EQU $1C -LEGENDARY_RONALD_DECK EQU $1D -MUSCLES_FOR_BRAINS_DECK EQU $1E -HEATED_BATTLE_DECK EQU $1F -LOVE_TO_BATTLE_DECK EQU $20 -EXCAVATION_DECK EQU $21 -BLISTERING_POKEMON_DECK EQU $22 -HARD_POKEMON_DECK EQU $23 -WATERFRONT_POKEMON_DECK EQU $24 -LONELY_FRIENDS_DECK EQU $25 -SOUND_OF_THE_WAVES_DECK EQU $26 -PIKACHU_DECK EQU $27 -BOOM_BOOM_SELFDESTRUCT_DECK EQU $28 -POWER_GENERATOR_DECK EQU $29 -ETCETERA_DECK EQU $2A -FLOWER_GARDEN_DECK EQU $2B -KALEIDOSCOPE_DECK EQU $2C -GHOST_DECK EQU $2D -NAP_TIME_DECK EQU $2E -STRANGE_POWER_DECK EQU $2F -FLYIN_POKEMON_DECK EQU $30 -LOVELY_NIDORAN_DECK EQU $31 -POISON_DECK EQU $32 -ANGER_DECK EQU $33 -FLAMETHROWER_DECK EQU $34 -RESHUFFLE_DECK EQU $35 -IMAKUNI_DECK EQU $36 - -NUMBER_OF_DECKS EQU $36 + const_def + const UNNAMED_DECK ; $00 + const UNNAMED_DECK_2 ; $01 + const SAMS_PRACTICE_DECK ; $02 + const PRACTICE_PLAYER_DECK ; $03 + const SAMS_NORMAL_DECK ; $04 + const CHARMANDER_AND_FRIENDS_DECK ; $05 + const CHARMANDER_EXTRA_DECK ; $06 + const SQUIRTLE_AND_FRIENDS_DECK ; $07 + const SQUIRTLE_EXTRA_DECK ; $08 + const BULBASAUR_AND_FRIENDS_DECK ; $09 + const BULBASAUR_EXTRA_DECK ; $0A + const LIGHTNING_AND_FIRE_DECK ; $0B + const WATER_AND_FIGHTING_DECK ; $0C + const GRASS_AND_PSYCHIC_DECK ; $0D + const LEGENDARY_MOLTRES_DECK ; $0E + const LEGENDARY_ZAPDOS_DECK ; $0F + const LEGENDARY_ARTICUNO_DECK ; $10 + const LEGENDARY_DRAGONITE_DECK ; $11 + const FIRST_STRIKE_DECK ; $12 + const ROCK_CRUSHER_DECK ; $13 + const GO_GO_RAIN_DANCE_DECK ; $14 + const ZAPPING_SELFDESTRUCT_DECK ; $15 + const FLOWER_POWER_DECK ; $16 + const STRANGE_PSYSHOCK_DECK ; $17 + const WONDERS_OF_SCIENCE_DECK ; $18 + const FIRE_CHARGE_DECK ; $19 + const IM_RONALD_DECK ; $1A + const POWERFUL_RONALD_DECK ; $1B + const INVINCIBLE_RONALD_DECK ; $1C + const LEGENDARY_RONALD_DECK ; $1D + const MUSCLES_FOR_BRAINS_DECK ; $1E + const HEATED_BATTLE_DECK ; $1F + const LOVE_TO_BATTLE_DECK ; $20 + const EXCAVATION_DECK ; $21 + const BLISTERING_POKEMON_DECK ; $22 + const HARD_POKEMON_DECK ; $23 + const WATERFRONT_POKEMON_DECK ; $24 + const LONELY_FRIENDS_DECK ; $25 + const SOUND_OF_THE_WAVES_DECK ; $26 + const PIKACHU_DECK ; $27 + const BOOM_BOOM_SELFDESTRUCT_DECK ; $28 + const POWER_GENERATOR_DECK ; $29 + const ETCETERA_DECK ; $2A + const FLOWER_GARDEN_DECK ; $2B + const KALEIDOSCOPE_DECK ; $2C + const GHOST_DECK ; $2D + const NAP_TIME_DECK ; $2E + const STRANGE_POWER_DECK ; $2F + const FLYIN_POKEMON_DECK ; $30 + const LOVELY_NIDORAN_DECK ; $31 + const POISON_DECK ; $32 + const ANGER_DECK ; $33 + const FLAMETHROWER_DECK ; $34 + const RESHUFFLE_DECK ; $35 + const IMAKUNI_DECK ; $36 +DECKS_END EQU const_value + -1 diff --git a/src/constants/duel_constants.asm b/src/constants/duel_constants.asm index 104799d..ee964b3 100644 --- a/src/constants/duel_constants.asm +++ b/src/constants/duel_constants.asm @@ -1,3 +1,7 @@ +DECK_NAME_SIZE EQU 24 +DECK_SIZE EQU 60 +BENCH_SIZE EQU 5 + PLAYER_TURN EQUS "wPlayerDuelVariables >> $8" OPPONENT_TURN EQUS "wOpponentDuelVariables >> $8" @@ -41,6 +45,7 @@ CARD_LOCATION_BENCH_2 EQU $12 CARD_LOCATION_BENCH_3 EQU $13 CARD_LOCATION_BENCH_4 EQU $14 CARD_LOCATION_BENCH_5 EQU $15 +CARD_LOCATION_JUST_DRAWN EQU $40 ;;; duelist types DUELIST_TYPE_PLAYER EQU $00 diff --git a/src/constants/map_constants.asm b/src/constants/map_constants.asm index c2e2388..4b74a29 100755 --- a/src/constants/map_constants.asm +++ b/src/constants/map_constants.asm @@ -1,34 +1,35 @@ -OVERWORLD_MAP EQU $00 -MASON_LABORATORY EQU $01 -DECK_MACHINE_ROOM EQU $02 -ISHIHARAS_HOUSE EQU $03 -FIGHTING_CLUB_ENTRANCE EQU $04 -FIGHTING_CLUB_LOBBY EQU $05 -FIGHTING_CLUB EQU $06 -ROCK_CLUB_ENTRANCE EQU $07 -ROCK_CLUB_LOBBY EQU $08 -ROCK_CLUB EQU $09 -WATER_CLUB_ENTRANCE EQU $0A -WATER_CLUB_LOBBY EQU $0B -WATER_CLUB EQU $0C -LIGHTNING_CLUB_ENTRANCE EQU $0D -LIGHTNING_CLUB_LOBBY EQU $0E -LIGHTNING_CLUB EQU $0F -GRASS_CLUB_ENTRANCE EQU $10 -GRASS_CLUB_LOBBY EQU $11 -GRASS_CLUB EQU $12 -PSYCHIC_CLUB_ENTRANCE EQU $13 -PSYCHIC_CLUB_LOBBY EQU $14 -PSYCHIC_CLUB EQU $15 -SCIENCE_CLUB_ENTRANCE EQU $16 -SCIENCE_CLUB_LOBBY EQU $17 -SCIENCE_CLUB EQU $18 -FIRE_CLUB_ENTRANCE EQU $19 -FIRE_CLUB_LOBBY EQU $1A -FIRE_CLUB EQU $1B -CHALLENGE_HALL_ENTRANCE EQU $1C -CHALLENGE_HALL_LOBBY EQU $1D -CHALLENGE_HALL EQU $1E -POKEMON_DOME_ENTRANCE EQU $1F -POKEMON_DOME EQU $20 -HALL_OF_HONOR EQU $21 + const_def + const OVERWORLD_MAP ; $00 + const MASON_LABORATORY ; $01 + const DECK_MACHINE_ROOM ; $02 + const ISHIHARAS_HOUSE ; $03 + const FIGHTING_CLUB_ENTRANCE ; $04 + const FIGHTING_CLUB_LOBBY ; $05 + const FIGHTING_CLUB ; $06 + const ROCK_CLUB_ENTRANCE ; $07 + const ROCK_CLUB_LOBBY ; $08 + const ROCK_CLUB ; $09 + const WATER_CLUB_ENTRANCE ; $0A + const WATER_CLUB_LOBBY ; $0B + const WATER_CLUB ; $0C + const LIGHTNING_CLUB_ENTRANCE ; $0D + const LIGHTNING_CLUB_LOBBY ; $0E + const LIGHTNING_CLUB ; $0F + const GRASS_CLUB_ENTRANCE ; $10 + const GRASS_CLUB_LOBBY ; $11 + const GRASS_CLUB ; $12 + const PSYCHIC_CLUB_ENTRANCE ; $13 + const PSYCHIC_CLUB_LOBBY ; $14 + const PSYCHIC_CLUB ; $15 + const SCIENCE_CLUB_ENTRANCE ; $16 + const SCIENCE_CLUB_LOBBY ; $17 + const SCIENCE_CLUB ; $18 + const FIRE_CLUB_ENTRANCE ; $19 + const FIRE_CLUB_LOBBY ; $1A + const FIRE_CLUB ; $1B + const CHALLENGE_HALL_ENTRANCE ; $1C + const CHALLENGE_HALL_LOBBY ; $1D + const CHALLENGE_HALL ; $1E + const POKEMON_DOME_ENTRANCE ; $1F + const POKEMON_DOME ; $20 + const HALL_OF_HONOR ; $21 diff --git a/src/constants/misc_constants.asm b/src/constants/misc_constants.asm index 11693b4..422fda4 100644 --- a/src/constants/misc_constants.asm +++ b/src/constants/misc_constants.asm @@ -1,3 +1,11 @@ +; screen size +SCREEN_WIDTH EQU 20 ; tiles +SCREEN_HEIGHT EQU 18 ; tiles + +; background map size +BG_MAP_WIDTH EQU 32 ; tiles +BG_MAP_HEIGHT EQU 32 ; tiles + ; console types (for wConsole) CONSOLE_DMG EQU $00 CONSOLE_SGB EQU $01 diff --git a/src/constants/music_constants.asm b/src/constants/music_constants.asm index a4c2526..ebcd75f 100755 --- a/src/constants/music_constants.asm +++ b/src/constants/music_constants.asm @@ -1,31 +1,32 @@ -MUSIC_STOP EQU $00 -MUSIC_TITLESCREEN EQU $01 -MUSIC_DUELTHEME1 EQU $02 -MUSIC_DUELTHEME2 EQU $03 -MUSIC_DUELTHEME3 EQU $04 -MUSIC_PAUSEMENU EQU $05 -MUSIC_PCMAINMENU EQU $06 -MUSIC_DECKMACHINE EQU $07 -MUSIC_CARDPOP EQU $08 -MUSIC_OVERWORLD EQU $09 -MUSIC_POKEMONDOME EQU $0A -MUSIC_CHALLENGEHALL EQU $0B -MUSIC_CLUB1 EQU $0C -MUSIC_CLUB2 EQU $0D -MUSIC_CLUB3 EQU $0E -MUSIC_RONALD EQU $0F -MUSIC_IMAKUNI EQU $10 -MUSIC_HALLOFHONOR EQU $11 -MUSIC_CREDITS EQU $12 -;MUSIC_UNUSED13 EQU $13 -;MUSIC_UNUSED14 EQU $14 -MUSIC_MATCHSTART1 EQU $15 -MUSIC_MATCHSTART2 EQU $16 -MUSIC_MATCHSTART3 EQU $17 -MUSIC_MATCHVICTORY EQU $18 -MUSIC_MATCHLOSS EQU $19 -MUSIC_DARKDIDDLY EQU $1A -;MUSIC_UNUSED1B EQU $1B -MUSIC_BOOSTERPACK EQU $1C -MUSIC_MEDAL EQU $1D -;MUSIC_UNUSED1E EQU $1E + const_def + const MUSIC_STOP ; $00 + const MUSIC_TITLESCREEN ; $01 + const MUSIC_DUELTHEME1 ; $02 + const MUSIC_DUELTHEME2 ; $03 + const MUSIC_DUELTHEME3 ; $04 + const MUSIC_PAUSEMENU ; $05 + const MUSIC_PCMAINMENU ; $06 + const MUSIC_DECKMACHINE ; $07 + const MUSIC_CARDPOP ; $08 + const MUSIC_OVERWORLD ; $09 + const MUSIC_POKEMONDOME ; $0A + const MUSIC_CHALLENGEHALL ; $0B + const MUSIC_CLUB1 ; $0C + const MUSIC_CLUB2 ; $0D + const MUSIC_CLUB3 ; $0E + const MUSIC_RONALD ; $0F + const MUSIC_IMAKUNI ; $10 + const MUSIC_HALLOFHONOR ; $11 + const MUSIC_CREDITS ; $12 + const MUSIC_UNUSED_13 ; $13 + const MUSIC_UNUSED_14 ; $14 + const MUSIC_MATCHSTART1 ; $15 + const MUSIC_MATCHSTART2 ; $16 + const MUSIC_MATCHSTART3 ; $17 + const MUSIC_MATCHVICTORY ; $18 + const MUSIC_MATCHLOSS ; $19 + const MUSIC_DARKDIDDLY ; $1A + const MUSIC_UNUSED_1B ; $1B + const MUSIC_BOOSTERPACK ; $1C + const MUSIC_MEDAL ; $1D + const MUSIC_UNUSED_1E ; $1E diff --git a/src/constants/npc_constants.asm b/src/constants/npc_constants.asm index 58b137a..f4972dc 100755 --- a/src/constants/npc_constants.asm +++ b/src/constants/npc_constants.asm @@ -1,44 +1,45 @@ -PLAYER_PIC EQU $01 -RONALD_PIC EQU $02 -SAM_PIC EQU $03 -IMAKUNI_PIC EQU $04 -NIKKI_PIC EQU $05 -RICK_PIC EQU $06 -KEN_PIC EQU $07 -AMY_PIC EQU $08 -ISAAC_PIC EQU $09 -MITCH_PIC EQU $0A -GENE_PIC EQU $0B -MURRAY_PIC EQU $0C -COURTNEY_PIC EQU $0D -STEVE_PIC EQU $0E -JACK_PIC EQU $0F -ROD_PIC EQU $10 -JOSEPH_PIC EQU $11 -DAVID_PIC EQU $12 -ERIK_PIC EQU $13 -JOHN_PIC EQU $14 -ADAM_PIC EQU $15 -JONATHAN_PIC EQU $16 -JOSHUA_PIC EQU $17 -NICHOLAS_PIC EQU $18 -BRANDON_PIC EQU $19 -MATTHEW_PIC EQU $1A -RYAN_PIC EQU $1B -ANDREW_PIC EQU $1C -CHRIS_PIC EQU $1D -MICHAEL_PIC EQU $1E -DANIEL_PIC EQU $1F -ROBERT_PIC EQU $20 -BRITTANY_PIC EQU $21 -KRISTIN_PIC EQU $22 -HEATHER_PIC EQU $23 -SARA_PIC EQU $24 -AMANDA_PIC EQU $25 -JENNIFER_PIC EQU $26 -JESSICA_PIC EQU $27 -STEPHANIE_PIC EQU $28 -AARON_PIC EQU $29 + const_def 1 + const PLAYER_PIC ; $01 + const RONALD_PIC ; $02 + const SAM_PIC ; $03 + const IMAKUNI_PIC ; $04 + const NIKKI_PIC ; $05 + const RICK_PIC ; $06 + const KEN_PIC ; $07 + const AMY_PIC ; $08 + const ISAAC_PIC ; $09 + const MITCH_PIC ; $0A + const GENE_PIC ; $0B + const MURRAY_PIC ; $0C + const COURTNEY_PIC ; $0D + const STEVE_PIC ; $0E + const JACK_PIC ; $0F + const ROD_PIC ; $10 + const JOSEPH_PIC ; $11 + const DAVID_PIC ; $12 + const ERIK_PIC ; $13 + const JOHN_PIC ; $14 + const ADAM_PIC ; $15 + const JONATHAN_PIC ; $16 + const JOSHUA_PIC ; $17 + const NICHOLAS_PIC ; $18 + const BRANDON_PIC ; $19 + const MATTHEW_PIC ; $1A + const RYAN_PIC ; $1B + const ANDREW_PIC ; $1C + const CHRIS_PIC ; $1D + const MICHAEL_PIC ; $1E + const DANIEL_PIC ; $1F + const ROBERT_PIC ; $20 + const BRITTANY_PIC ; $21 + const KRISTIN_PIC ; $22 + const HEATHER_PIC ; $23 + const SARA_PIC ; $24 + const AMANDA_PIC ; $25 + const JENNIFER_PIC ; $26 + const JESSICA_PIC ; $27 + const STEPHANIE_PIC ; $28 + const AARON_PIC ; $29 -SARA EQU $1f -AMANDA EQU $20 +SARA EQU $1F +AMANDA EQU $20 diff --git a/src/constants/overworld_script_constants.asm b/src/constants/overworld_script_constants.asm index fed849d..167537c 100755 --- a/src/constants/overworld_script_constants.asm +++ b/src/constants/overworld_script_constants.asm @@ -1,111 +1,109 @@ -start_script EQUS "rst $20" - -OWScript_EndScriptLoop1_index EQU $00 -OWScript_CloseTextBox_index EQU $01 -OWScript_PrintTextString_index EQU $02 -Func_ccdc_index EQU $03 -OWScript_AskQuestionJump_index EQU $04 -OWScript_StartBattle_index EQU $05 -Func_cd83_index EQU $06 -Func_cda8_index EQU $07 -OWScript_PrintTextCloseBox_index EQU $08 -Func_cdcb_index EQU $09 -Func_ce26_index EQU $0a -Func_ce84_index EQU $0b -OWScript_GiveBoosterPacks_index EQU $0c -Func_cf0c_index EQU $0d -Func_cf12_index EQU $0e -Func_cf3f_index EQU $0f -Func_cf4c_index EQU $10 -Func_cf53_index EQU $11 -Func_cf7b_index EQU $12 -Func_cf2d_index EQU $13 -Func_cf96_index EQU $14 -Func_cfc6_index EQU $15 -Func_cfd4_index EQU $16 -Func_d00b_index EQU $17 -Func_d025_index EQU $18 -Func_d032_index EQU $19 -Func_d03f_index EQU $1a -OWScript_ScriptJump_index EQU $1b -Func_d04f_index EQU $1c -Func_d055_index EQU $1d -OWScript_MovePlayer_index EQU $1e -Func_cee2_index EQU $1f -Func_d080_index EQU $20 -Func_d088_index EQU $21 -Func_d095_index EQU $22 -Func_d0be_index EQU $23 -Func_d0ce_index EQU $24 -Func_d0d9_index EQU $25 -Func_d0f2_index EQU $26 -Func_ce4a_index EQU $27 -Func_ceba_index EQU $28 -Func_d103_index EQU $29 -Func_d125_index EQU $2a -Func_d135_index EQU $2b -Func_d16b_index EQU $2c -Func_cd4f_index EQU $2d -Func_cd94_index EQU $2e -Func_ce52_index EQU $2f -Func_cdd8_index EQU $30 -Func_cdf5_index EQU $31 -Func_d195_index EQU $32 -Func_d1ad_index EQU $33 -Func_d1b3_index EQU $34 -OWScript_EndScriptCloseText_index EQU $35 -Func_d244_index EQU $36 -Func_d24c_index EQU $37 -DeckMachine_d336_index EQU $38 -Func_d271_index EQU $39 -Func_d36d_index EQU $3a -Func_ce6f_index EQU $3b -Func_d209_index EQU $3c -Func_d38f_index EQU $3d -Func_d396_index EQU $3e -Func_cd76_index EQU $3f -Func_d39d_index EQU $40 -Func_d3b9_index EQU $41 -Func_d3c9_index EQU $42 -Func_d3d1_index EQU $43 -Func_d3d4_index EQU $44 -Func_d3e0_index EQU $45 -Func_d3fe_index EQU $46 -Func_d408_index EQU $47 -Func_d40f_index EQU $48 -Func_d416_index EQU $49 -Func_d423_index EQU $4a -Func_d429_index EQU $4b -Func_d41d_index EQU $4c -Func_d42f_index EQU $4d -Func_d435_index EQU $4e -Func_cce4_index EQU $4f -Func_d2f6_index EQU $50 -Func_d317_index EQU $51 -Func_d43d_index EQU $52 -OWScript_EndScriptLoop2_index EQU $53 -OWScript_EndScriptLoop3_index EQU $54 -OWScript_EndScriptLoop4_index EQU $55 -OWScript_EndScriptLoop5_index EQU $56 -OWScript_EndScriptLoop6_index EQU $57 -OWScript_CustomModifyEventFlags_index EQU $58 -Func_d460_index EQU $59 -OWScript_JumpIfFlagSet_index EQU $5a -Func_d484_index EQU $5b -Func_d49e_index EQU $5c -Func_d4a6_index EQU $5d -Func_d4ae_index EQU $5e -OWScript_SetEventFlags_index EQU $5f -Func_d4c3_index EQU $60 -Func_d4ca_index EQU $61 -OWScript_JumpIfFlagNotSet_index EQU $62 -Func_d452_index EQU $63 -OWScript_EndScriptLoop7_index EQU $64 -OWScript_EndScriptLoop8_index EQU $65 -OWScript_EndScriptLoop9_index EQU $66 -OWScript_EndScriptLoop10_index EQU $67 + const_def + const OWScript_EndScriptLoop1_index ; $00 + const OWScript_CloseTextBox_index ; $01 + const OWScript_PrintTextString_index ; $02 + const Func_ccdc_index ; $03 + const OWScript_AskQuestionJump_index ; $04 + const OWScript_StartBattle_index ; $05 + const Func_cd83_index ; $06 + const Func_cda8_index ; $07 + const OWScript_PrintTextCloseBox_index ; $08 + const Func_cdcb_index ; $09 + const Func_ce26_index ; $0a + const Func_ce84_index ; $0b + const OWScript_GiveBoosterPacks_index ; $0c + const Func_cf0c_index ; $0d + const Func_cf12_index ; $0e + const Func_cf3f_index ; $0f + const Func_cf4c_index ; $10 + const Func_cf53_index ; $11 + const Func_cf7b_index ; $12 + const Func_cf2d_index ; $13 + const Func_cf96_index ; $14 + const Func_cfc6_index ; $15 + const Func_cfd4_index ; $16 + const Func_d00b_index ; $17 + const Func_d025_index ; $18 + const Func_d032_index ; $19 + const Func_d03f_index ; $1a + const OWScript_ScriptJump_index ; $1b + const Func_d04f_index ; $1c + const Func_d055_index ; $1d + const OWScript_MovePlayer_index ; $1e + const Func_cee2_index ; $1f + const Func_d080_index ; $20 + const Func_d088_index ; $21 + const Func_d095_index ; $22 + const Func_d0be_index ; $23 + const Func_d0ce_index ; $24 + const Func_d0d9_index ; $25 + const Func_d0f2_index ; $26 + const Func_ce4a_index ; $27 + const Func_ceba_index ; $28 + const Func_d103_index ; $29 + const Func_d125_index ; $2a + const Func_d135_index ; $2b + const Func_d16b_index ; $2c + const Func_cd4f_index ; $2d + const Func_cd94_index ; $2e + const Func_ce52_index ; $2f + const Func_cdd8_index ; $30 + const Func_cdf5_index ; $31 + const Func_d195_index ; $32 + const Func_d1ad_index ; $33 + const Func_d1b3_index ; $34 + const OWScript_EndScriptCloseText_index ; $35 + const Func_d244_index ; $36 + const Func_d24c_index ; $37 + const DeckMachine_d336_index ; $38 + const Func_d271_index ; $39 + const Func_d36d_index ; $3a + const Func_ce6f_index ; $3b + const Func_d209_index ; $3c + const Func_d38f_index ; $3d + const Func_d396_index ; $3e + const Func_cd76_index ; $3f + const Func_d39d_index ; $40 + const Func_d3b9_index ; $41 + const Func_d3c9_index ; $42 + const Func_d3d1_index ; $43 + const Func_d3d4_index ; $44 + const Func_d3e0_index ; $45 + const Func_d3fe_index ; $46 + const Func_d408_index ; $47 + const Func_d40f_index ; $48 + const Func_d416_index ; $49 + const Func_d423_index ; $4a + const Func_d429_index ; $4b + const Func_d41d_index ; $4c + const Func_d42f_index ; $4d + const Func_d435_index ; $4e + const Func_cce4_index ; $4f + const Func_d2f6_index ; $50 + const Func_d317_index ; $51 + const Func_d43d_index ; $52 + const OWScript_EndScriptLoop2_index ; $53 + const OWScript_EndScriptLoop3_index ; $54 + const OWScript_EndScriptLoop4_index ; $55 + const OWScript_EndScriptLoop5_index ; $56 + const OWScript_EndScriptLoop6_index ; $57 + const OWScript_CustomModifyEventFlags_index ; $58 + const Func_d460_index ; $59 + const OWScript_JumpIfFlagSet_index ; $5a + const Func_d484_index ; $5b + const Func_d49e_index ; $5c + const Func_d4a6_index ; $5d + const Func_d4ae_index ; $5e + const OWScript_SetEventFlags_index ; $5f + const Func_d4c3_index ; $60 + const Func_d4ca_index ; $61 + const OWScript_JumpIfFlagNotSet_index ; $62 + const Func_d452_index ; $63 + const OWScript_EndScriptLoop7_index ; $64 + const OWScript_EndScriptLoop8_index ; $65 + const OWScript_EndScriptLoop9_index ; $66 + const OWScript_EndScriptLoop10_index ; $67 ; Script Flags FLAG_BEAT_SARA EQU $15 FLAG_BEAT_AMANDA EQU $16 - diff --git a/src/constants/sgb_constants.asm b/src/constants/sgb_constants.asm index beb69b6..e956881 100644 --- a/src/constants/sgb_constants.asm +++ b/src/constants/sgb_constants.asm @@ -8,12 +8,12 @@ ATTR_DIV EQU $06 ; "Divide" Area Designation Mode ATTR_CHR EQU $07 ; "1CHR" Area Designation Mode SOUND EQU $08 ; Sound On/Off SOU_TRN EQU $09 ; Transfer Sound PRG/DATA -PAL_SET EQU $0A ; Set SGB Palette Indirect -PAL_TRN EQU $0B ; Set System Color Palette Data -ATRC_EN EQU $0C ; Enable/disable Attraction Mode -TEST_EN EQU $0D ; Speed Function -ICON_EN EQU $0E ; SGB Function -DATA_SND EQU $0F ; SUPER NES WRAM Transfer 1 +PAL_SET EQU $0a ; Set SGB Palette Indirect +PAL_TRN EQU $0b ; Set System Color Palette Data +ATRC_EN EQU $0c ; Enable/disable Attraction Mode +TEST_EN EQU $0d ; Speed Function +ICON_EN EQU $0e ; SGB Function +DATA_SND EQU $0f ; SUPER NES WRAM Transfer 1 DATA_TRN EQU $10 ; SUPER NES WRAM Transfer 2 MLT_REQ EQU $11 ; Controller 2 Request JUMP EQU $12 ; Set SNES Program Counter diff --git a/src/engine/boosters.asm b/src/data/booster_packs.asm index 7537897..8f8d8c2 100755..100644 --- a/src/engine/boosters.asm +++ b/src/data/booster_packs.asm @@ -1,561 +1,18 @@ -GenerateBoosterPack: ; 1e1c4 (7:61c4) - push hl - push bc - push de - ld [wBoosterDataIndex], a -.noCardsFoundLoop - call InitBoosterData - call GenerateBoosterEnergy - call GenerateBoosterCard - jr c, .noCardsFoundLoop - call CopyBoosterEnergiesToBooster - call AddBoosterCardsToCollection - pop de - pop bc - pop hl - ret - -GenerateBoosterCard: ; 1e1df (7:61df) - ld a, STAR - ld [wBoosterCurrRarity], a -.generateCardLoop - call FindCurrRarityChance - ld a, [hl] - or a - jr z, .noMoreOfCurrentRarity - call FindCardsInSetAndRarity - call FindTotalTypeChances - or a - jr z, .noValidCards - call Random - call DetermineBoosterCardType - call FindBoosterCard - call UpdateBoosterCardTypesChanceByte - call AddCardToBoosterList - call FindCurrRarityChance - dec [hl] - jr .generateCardLoop -.noMoreOfCurrentRarity - ld a, [wBoosterCurrRarity] - dec a - ld [wBoosterCurrRarity], a - bit 7, a - jr z, .generateCardLoop - or a - ret -.noValidCards - rst $38 - scf - ret - -FindCurrRarityChance: ; 1e219 (7:6219) - push bc - ld hl, wBoosterDataCommonAmount - ld a, [wBoosterCurrRarity] - ld c, a - ld b, $0 - add hl, bc - pop bc - ret - -FindCardsInSetAndRarity: ; 1e226 (7:6226) - ld c, BOOSTER_CARD_TYPE_AMOUNT - ld hl, wBoosterAmountOfCardTypeTable - xor a -.deleteTypeTableLoop - ld [hli], a - dec c - jr nz, .deleteTypeTableLoop - xor a - ld hl, wBoosterViableCardList - ld [hl], a - ld de, $1 -.checkCardViableLoop - push de - ld a, e - ld [wBoosterTempData], a - call CheckByteInWramZeroed - jr c, .finishedWithCurrentCard - call CheckCardViable - jr c, .finishedWithCurrentCard - ld a, [wBoosterCurrentCardType] - call GetCardType - push af - push hl - ld c, a - ld b, $00 - ld hl, wBoosterAmountOfCardTypeTable - add hl, bc - inc [hl] - pop hl - ld a, [wBoosterTempData] - ld [hli], a - pop af - ld [hli], a - xor a - ld [hl], a -.finishedWithCurrentCard - pop de - inc e - ld a, e - cp NUM_CARDS + 1 - jr c, .checkCardViableLoop - ret - -CheckCardViable: ; 1e268 (7:6268) - push bc - ld a, e - call GetCardHeader - ld [wBoosterCurrentCardType], a - ld a, b - ld [wBoosterCurrentCardRarity], a - ld a, c - ld [wBoosterCurrentCardSet], a - ld a, [wBoosterCurrentCardRarity] - ld c, a - ld a, [wBoosterCurrRarity] - cp c - jr nz, .invalidCard - ld a, [wBoosterCurrentCardType] - call GetCardType - cp BOOSTER_CARD_TYPE_ENERGY - jr z, .returnValidCard - ld a, [wBoosterCurrentCardSet] - swap a - and $0f - ld c, a - ld a, [wBoosterDataCurrSet] - cp c - jr nz, .invalidCard -.returnValidCard - or a - jr .return -.invalidCard - scf -.return - pop bc - ret - -GetCardType: ; 1e2a0 (7:62a0) - push hl - push bc - ld hl, CardTypeTable - cp $11 - jr nc, .skipToTypeLoad - ld c, a - ld b, $00 - add hl, bc -.skipToTypeLoad - ld a, [hl] - pop bc - pop hl - ret - -CardTypeTable: ; 1e2b1 (7:62b1) - db BOOSTER_CARD_TYPE_FIRE - db BOOSTER_CARD_TYPE_GRASS - db BOOSTER_CARD_TYPE_LIGHTNING - db BOOSTER_CARD_TYPE_WATER - db BOOSTER_CARD_TYPE_FIGHTING - db BOOSTER_CARD_TYPE_PSYCHIC - db BOOSTER_CARD_TYPE_COLORLESS - db BOOSTER_CARD_TYPE_TRAINER - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_ENERGY - db BOOSTER_CARD_TYPE_TRAINER - db BOOSTER_CARD_TYPE_TRAINER - -FindTotalTypeChances: ; 1e2c2 (7:62c2) - ld c, BOOSTER_CARD_TYPE_AMOUNT - xor a - ld hl, wBoosterTempTypeChanceTable -.deleteTempTypeChanceTableLoop - ld [hli], a - dec c - jr nz, .deleteTempTypeChanceTableLoop - ld [wd4ca], a - ld bc, $00 -.checkIfTypeIsValid - push bc - ld hl, wBoosterAmountOfCardTypeTable - add hl, bc - ld a, [hl] - or a - jr z, .amountOfTypeOrChanceZero - ld hl, wBoosterDataTypeChanceData - add hl, bc - ld a, [hl] - or a - jr z, .amountOfTypeOrChanceZero - ld hl, wBoosterTempTypeChanceTable - add hl, bc - ld [hl], a - ld a, [wd4ca] - add [hl] - ld [wd4ca], a -.amountOfTypeOrChanceZero - pop bc - inc c - ld a, c - cp $09 - jr c, .checkIfTypeIsValid - ld a, [wd4ca] - ret - -DetermineBoosterCardType: ; 1e2fa (7:62fa) - ld [wd4ca], a - ld c, $00 - ld hl, wBoosterTempTypeChanceTable -.loopThroughCardTypes - ld a, [hl] - or a - jr z, .skipNoChanceType - ld a, [wd4ca] - sub [hl] - ld [wd4ca], a - jr c, .foundCardType -.skipNoChanceType - inc hl - inc c - ld a, c - cp a, BOOSTER_CARD_TYPE_AMOUNT - jr c, .loopThroughCardTypes - ld a, $08 -.foundCardType - ld a, c - ld [wBoosterSelectedCardType], a - ret - -FindBoosterCard: ; 1e31d (7:631d) - ld a, [wBoosterSelectedCardType] - ld c, a - ld b, $00 - ld hl, wBoosterAmountOfCardTypeTable - add hl, bc - ld a, [hl] - call Random - ld [wd4ca], a - ld hl, wBoosterViableCardList -.findMatchingCardLoop - ld a, [hli] - or a - jr z, .noValidCardFound - ld [wBoosterTempData], a - ld a, [wBoosterSelectedCardType] - cp [hl] - jr nz, .cardIncorrectType - ld a, [wd4ca] - or a - jr z, .returnWithCurrentCard - dec a - ld [wd4ca], a -.cardIncorrectType - inc hl - jr .findMatchingCardLoop -.returnWithCurrentCard - or a - ret -.noValidCardFound - rst $38 - scf - ret - -;lowers the chance of getting the same type multiple times -UpdateBoosterCardTypesChanceByte: ; 1e350 (7:6350) - push hl - push bc - ld a, [wBoosterSelectedCardType] - ld c, a - ld b, $00 - ld hl, wBoosterDataTypeChanceData - add hl, bc - ld a,[wBoosterDataAveragedChance] - ld c, a - ld a, [hl] - sub c - ld [hl], a - jr z, .chanceLessThanOne - jr nc, .stillSomeChanceLeft -.chanceLessThanOne - ld a, $01 - ld [hl], a -.stillSomeChanceLeft - pop bc - pop hl - ret - -GenerateBoosterEnergy: ; 1e3db (7:63db) - ld hl, wBoosterDataEnergyFunctionPointer + 1 - ld a, [hld] - or a - jr z, .noFunctionPointer - ld l, [hl] - ld h, a - jp hl -.noFunctionPointer - ld a, [hl] - or a - ret z - push af - call AddBoosterEnergyToWram - pop af - ret - -AddBoosterEnergyToWram: ; 1e380 (7:6380) - ld [wBoosterTempData], a - call AddCardToBoosterEnergies - ret - -GenerateEndingEnergy: ; 1e387 (7:6387) - ld a, $06 - call Random - add a, $01 - jr AddBoosterEnergyToWram - -GenerateRandomEnergyBoosterPack: ; 1e390 (7:6390) - ld a, $0a -.generateEnergyLoop - push af - call GenerateEndingEnergy - pop af - dec a - jr nz, .generateEnergyLoop - jr ZeroBoosterRarityData - -GenerateEnergyBoosterLightningFire: ; 1e39c (7:639c) - ld hl, EnergyBoosterLightningFireData - jr CreateEnergyBooster - -GenerateEnergyBoosterWaterFighting: ; 1e3a1 (7:63a1) - ld hl, EnergyBoosterWaterFightingData - jr CreateEnergyBooster - -GenerateEnergyBoosterGrassPsychic: ; 1e3a6 (7:63a6) - ld hl, EnergyBoosterGrassPsychicData - jr CreateEnergyBooster - -CreateEnergyBooster: ; 1e3ab (7:63ab) - ld b, $02 -.addTwoEnergiesToBoosterLoop - ld c, $05 -.addEnergyToBoosterLoop - push hl - push bc - ld a, [hl] - call AddBoosterEnergyToWram - pop bc - pop hl - dec c - jr nz, .addEnergyToBoosterLoop - inc hl - dec b - jr nz, .addTwoEnergiesToBoosterLoop -ZeroBoosterRarityData: - xor a - ld [wBoosterDataCommonAmount], a - ld [wBoosterDataUncommonAmount], a - ld [wBoosterDataRareAmount], a - ret - -EnergyBoosterLightningFireData: - db LIGHTNING_ENERGY, FIRE_ENERGY -EnergyBoosterWaterFightingData: - db WATER_ENERGY, FIGHTING_ENERGY -EnergyBoosterGrassPsychicData: - db GRASS_ENERGY, PSYCHIC_ENERGY - -AddCardToBoosterEnergies: ; 1e3cf (7:63cf) - push hl - ld hl, wPlayerDeck + $b - call CopyToFirstEmptyByte - call AddBoosterCardToTempCardCollection - pop hl - ret - -AddCardToBoosterList: ; 1e3db (7:63db) - push hl - ld hl, wPlayerDeck - call CopyToFirstEmptyByte - call AddBoosterCardToTempCardCollection - pop hl - ret - -CopyToFirstEmptyByte: ; 1e3e7 (7:63e7) - ld a, [hli] - or a - jr nz, CopyToFirstEmptyByte - dec hl - ld a, [wBoosterTempData] - ld [hli], a - xor a - ld [hl], a - ret - -CopyBoosterEnergiesToBooster: ; 1e3f3 (7:63f3) - push hl - ld hl, wPlayerDeck + $b -.loopThroughExtraCards - ld a, [hli] - or a - jr z, .endOfCards - ld [wBoosterTempData], a - push hl - ld hl, wPlayerDeck - call CopyToFirstEmptyByte - pop hl - jr .loopThroughExtraCards -.endOfCards - pop hl - ret - -AddBoosterCardsToCollection:; 1e40a (7:640a) - push hl - ld hl, wPlayerDeck -.addCardsLoop - ld a, [hli] - or a - jr z, .noCardsLeft - call AddCardToCollection - jr .addCardsLoop -.noCardsLeft - pop hl - ret - -AddBoosterCardToTempCardCollection: ; 1e419 (7:6419) - push hl - ld h, wTempCardCollection >> 8 - ld a, [wBoosterTempData] - ld l, a - inc [hl] - pop hl - ret - -CheckByteInWramZeroed: ; 1e423 (7:6423) - push hl - ld h, wTempCardCollection >> 8 - ld a, [wBoosterTempData] - ld l, a - ld a, [hl] - pop hl - cp $01 - ccf - ret - -;clears wPlayerDeck and wTempCardCollection -;copies rarity amounts to ram and averages them into wBoosterDataAveragedChance -InitBoosterData: ; 1e430 (7:6430) - ld c, $16 - ld hl, wPlayerDeck - xor a -.clearPlayerDeckLoop - ld [hli], a - dec c - jr nz, .clearPlayerDeckLoop - ld c, $00 - ld hl, wTempCardCollection - xor a -.clearTempCardCollectionLoop - ld [hli], a - dec c - jr nz, .clearTempCardCollectionLoop - call FindBoosterDataPointer - ld de, wBoosterDataCurrSet - ld bc, $c - call CopyData - call LoadRarityAmountsToWram - ld bc, $0 - ld d, BOOSTER_CARD_TYPE_AMOUNT - ld e, $0 - ld hl, wBoosterDataTypeChanceData -.addChanceBytesLoop - ld a, [hli] - or a - jr z, .skipChanceByte - add c - ld c, a - inc e -.skipChanceByte - dec d - jr nz, .addChanceBytesLoop - call DivideBCbyDE - ld a, c - ld [wBoosterDataAveragedChance], a - ret - -FindBoosterDataPointer: ; 1e46f (7:646f) - push bc - ld a, [wBoosterDataIndex] - add a - ld c, a - ld b, $0 - ld hl, BoosterData_PtrTbl - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a - pop bc - ret - -BoosterData_PtrTbl: ; 1e480 (7:6480) - dw PackColoNeutral - dw PackColoGrass - dw PackColoFire - dw PackColoWater - dw PackColoLightning - dw PackColoFighting - dw PackColoTrainer - dw PackEvoNeutral - dw PackEvoGrass - dw PackEvoNeutralFireEnergy - dw PackEvoWater - dw PackEvoFighting - dw PackEvoPsychic - dw PackEvoTrainer - dw PackMysteryNeutral - dw PackMysteryGrassColorless - dw PackMysteryWaterColorless - dw PackLightningColorless - dw PackMysteryFightingColorless - dw PackMysteryTrainerColorless - dw PackLabTrainerLessFighting - dw PackLabGrass - dw PackLabWater - dw PackLabPsychic - dw PackLabTrainer - dw PackEnergyLightningFire - dw PackEnergyWaterFighting - dw PackEnergyGrassPsychic - dw PackRandomEnergies - -LoadRarityAmountsToWram: ; 1e4ba (7:64ba) - ld a, [wBoosterDataCurrSet] - add a - add a - ld c, a - ld b, $00 - ld hl, BoosterSetRarityAmountTable - add hl, bc - inc hl - ld a, [hli] - ld [wBoosterDataCommonAmount], a - ld a, [hli] - ld [wBoosterDataUncommonAmount], a - ld a, [hli] - ld [wBoosterDataRareAmount], a - ret - BoosterSetRarityAmountTable: ; 1e4d4 (7::64d4) - db $01, $05, $03, $01 ; other, commons, uncommons, rares - db $01, $05, $03, $01 ; other, commons, uncommons, rares - db $00, $06, $03, $01 ; other, commons, uncommons, rares - db $00, $06, $03, $01 ; other, commons, uncommons, rares - -PackColoNeutral:: ; 1e4e4 (7:64e4) +; energies, commons, uncommons, rares +; commons + uncommons + rares needs to be equal to 10 minus the number of energy cards +; defined in the pack's data below; otherwise, the number of cards in the pack won't be 10. + db $01, $05, $03, $01 ; COLOSSEUM >> 4 + db $01, $05, $03, $01 ; EVOLUTION >> 4 + db $00, $06, $03, $01 ; MYSTERY >> 4 + db $00, $06, $03, $01 ; LABORATORY >> 4 + +; For the energy or energy generation function, there are three options: +; - Ponter to a function that generates energies (some generate one, some generate a full pack) +; - A single energy of a specific type +; - $0000 if no card in the pack is an energy + +PackColosseumNeutral:: ; 1e4e4 (7:64e4) db COLOSSEUM >> 4 ; booster pack set dw GenerateEndingEnergy ; energy or energy generation function @@ -570,7 +27,7 @@ PackColoNeutral:: ; 1e4e4 (7:64e4) db $14 ; Trainer Card Chance db $00 ; Energy Card Chance -PackColoGrass:: ; 1e4f0 (7:64f0) +PackColosseumGrass:: ; 1e4f0 (7:64f0) db COLOSSEUM >> 4 ; booster pack set dw GRASS_ENERGY ; energy or energy generation function @@ -585,7 +42,7 @@ PackColoGrass:: ; 1e4f0 (7:64f0) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackColoFire:: ; 1e4fc (7:64fc) +PackColosseumFire:: ; 1e4fc (7:64fc) db COLOSSEUM >> 4 ; booster pack set dw FIRE_ENERGY ; energy or energy generation function @@ -600,7 +57,7 @@ PackColoFire:: ; 1e4fc (7:64fc) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackColoWater:: ; 1e508 (7:6508) +PackColosseumWater:: ; 1e508 (7:6508) db COLOSSEUM >> 4 ; booster pack set dw WATER_ENERGY ; energy or energy generation function @@ -615,7 +72,7 @@ PackColoWater:: ; 1e508 (7:6508) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackColoLightning:: ; 1e514 (7:6514) +PackColosseumLightning:: ; 1e514 (7:6514) db COLOSSEUM >> 4 ; booster pack set dw LIGHTNING_ENERGY ; energy or energy generation function @@ -630,7 +87,7 @@ PackColoLightning:: ; 1e514 (7:6514) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackColoFighting:: ; 1e520 (7:6520) +PackColosseumFighting:: ; 1e520 (7:6520) db COLOSSEUM >> 4 ; booster pack set dw FIGHTING_ENERGY ; energy or energy generation function @@ -645,7 +102,7 @@ PackColoFighting:: ; 1e520 (7:6520) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackColoTrainer:: ; 1e52c (7:652c) +PackColosseumTrainer:: ; 1e52c (7:652c) db COLOSSEUM >> 4 ; booster pack set dw GenerateEndingEnergy ; energy or energy generation function @@ -660,7 +117,7 @@ PackColoTrainer:: ; 1e52c (7:652c) db $30 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoNeutral:: ; 1e538 (7:6538) +PackEvolutionNeutral:: ; 1e538 (7:6538) db EVOLUTION >> 4 ; booster pack set dw GenerateEndingEnergy ; energy or energy generation function @@ -675,7 +132,7 @@ PackEvoNeutral:: ; 1e538 (7:6538) db $14 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoGrass:: ; 1e544 (7:6544) +PackEvolutionGrass:: ; 1e544 (7:6544) db EVOLUTION >> 4 ; booster pack set dw GRASS_ENERGY ; energy or energy generation function @@ -690,7 +147,7 @@ PackEvoGrass:: ; 1e544 (7:6544) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoNeutralFireEnergy:: ; 1e550 (7:6550) +PackEvolutionNeutralFireEnergy:: ; 1e550 (7:6550) db EVOLUTION >> 4 ; booster pack set dw FIRE_ENERGY ; energy or energy generation function @@ -705,7 +162,7 @@ PackEvoNeutralFireEnergy:: ; 1e550 (7:6550) db $14 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoWater:: ; 1e55c (7:655c) +PackEvolutionWater:: ; 1e55c (7:655c) db EVOLUTION >> 4 ; booster pack set dw WATER_ENERGY ; energy or energy generation function @@ -720,7 +177,7 @@ PackEvoWater:: ; 1e55c (7:655c) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoFighting:: ; 1e568 (7:6568) +PackEvolutionFighting:: ; 1e568 (7:6568) db EVOLUTION >> 4 ; booster pack set dw FIGHTING_ENERGY ; energy or energy generation function @@ -735,7 +192,7 @@ PackEvoFighting:: ; 1e568 (7:6568) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoPsychic:: ; 1e574 (7:6574) +PackEvolutionPsychic:: ; 1e574 (7:6574) db EVOLUTION >> 4 ; booster pack set dw PSYCHIC_ENERGY ; energy or energy generation function @@ -750,7 +207,7 @@ PackEvoPsychic:: ; 1e574 (7:6574) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackEvoTrainer:: ; 1e580 (7:6580) +PackEvolutionTrainer:: ; 1e580 (7:6580) db EVOLUTION >> 4 ; booster pack set dw GenerateEndingEnergy ; energy or energy generation function @@ -810,7 +267,7 @@ PackMysteryWaterColorless:: ; 1e5a4 (7:65a4) db $0C ; Trainer Card Chance db $0C ; Energy Card Chance -PackLightningColorless:: ; 1e5b0 (7:65b0) +PackMysteryLightningColorless:: ; 1e5b0 (7:65b0) db MYSTERY >> 4 ; booster pack set dw $0000 ; energy or energy generation function @@ -855,7 +312,7 @@ PackMysteryTrainerColorless:: ; 1e5c8 (7:65c8) db $30 ; Trainer Card Chance db $0C ; Energy Card Chance -PackLabTrainerLessFighting:: ; 1e5d4 (7:65d4) +PackLaboratoryMostlyNeutral:: ; 1e5d4 (7:65d4) db LABORATORY >> 4 ; booster pack set dw $0000 ; energy or energy generation function @@ -870,7 +327,7 @@ PackLabTrainerLessFighting:: ; 1e5d4 (7:65d4) db $18 ; Trainer Card Chance db $00 ; Energy Card Chance -PackLabGrass:: ; 1e5e0 (7:65e0) +PackLaboratoryGrass:: ; 1e5e0 (7:65e0) db LABORATORY >> 4 ; booster pack set dw $0000 ; energy or energy generation function @@ -885,7 +342,7 @@ PackLabGrass:: ; 1e5e0 (7:65e0) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackLabWater:: ; 1e5ec (7:65ec) +PackLaboratoryWater:: ; 1e5ec (7:65ec) db LABORATORY >> 4 ; booster pack set dw $0000 ; energy or energy generation function @@ -900,7 +357,7 @@ PackLabWater:: ; 1e5ec (7:65ec) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackLabPsychic:: ; 1e5f8 (7:65f8) +PackLaboratoryPsychic:: ; 1e5f8 (7:65f8) db LABORATORY >> 4 ; booster pack set dw $0000 ; energy or energy generation function @@ -915,7 +372,7 @@ PackLabPsychic:: ; 1e5f8 (7:65f8) db $10 ; Trainer Card Chance db $00 ; Energy Card Chance -PackLabTrainer:: ; 1e604 (7:6604) +PackLaboratoryTrainer:: ; 1e604 (7:6604) db LABORATORY >> 4 ; booster pack set dw $0000 ; energy or energy generation function @@ -977,7 +434,7 @@ PackEnergyGrassPsychic:: ; 1e628 (7:6628) PackRandomEnergies:: ; 1e634 (7:6634) db COLOSSEUM >> 4 ; booster pack set - dw GenerateRandomEnergyBoosterPack ; energy or energy generation function + dw GenerateRandomEnergyBooster ; energy or energy generation function ; Card Type Chances db $00 ; Grass Type Chance @@ -989,5 +446,3 @@ PackRandomEnergies:: ; 1e634 (7:6634) db $00 ; Colorless Type Chance db $00 ; Trainer Card Chance db $00 ; Energy Card Chance - -INCBIN "baserom.gbc",$1e640,$20000 - $1e640 diff --git a/src/data/cards.asm b/src/data/cards.asm index c93a533..b246f59 100755 --- a/src/data/cards.asm +++ b/src/data/cards.asm @@ -1,3 +1,6 @@ +; TODO: Make card data structures more compact and rearrange the fields for +; convenience once the meaning of all fields is figured out. + CardPointers: ; 30c5c (c:4c5c) dw $0000 dw GrassEnergyCard @@ -231,11 +234,11 @@ CardPointers: ; 30c5c (c:4c5c) dw $0000 BulbasaurCard: ; 30e28 (c:4e28) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx BulbasaurCardGfx ; gfx tx BulbasaurName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db BULBASAUR db 40 ; hp db BASIC ; stage @@ -282,11 +285,11 @@ BulbasaurCard: ; 30e28 (c:4e28) db 16 IvysaurCard: ; 30e69 (c:4e69) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx IvysaurCardGfx ; gfx tx IvysaurName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db IVYSAUR db 60 ; hp db STAGE1 ; stage @@ -333,11 +336,11 @@ IvysaurCard: ; 30e69 (c:4e69) db 16 Venusaur1Card: ; 30eaa (c:4eaa) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx Venusaur1CardGfx ; gfx tx VenusaurName ; name db STAR ; rarity - db PROMOTIONAL | GB ; set + db PROMOTIONAL | GB ; sets db VENUSAUR1 db 100 ; hp db STAGE2 ; stage @@ -384,11 +387,11 @@ Venusaur1Card: ; 30eaa (c:4eaa) db 0 Venusaur2Card: ; 30eeb (c:4eeb) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx Venusaur2CardGfx ; gfx tx VenusaurName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db VENUSAUR2 db 100 ; hp db STAGE2 ; stage @@ -435,11 +438,11 @@ Venusaur2Card: ; 30eeb (c:4eeb) db 0 CaterpieCard: ; 30f2c (c:4f2c) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx CaterpieCardGfx ; gfx tx CaterpieName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db CATERPIE db 40 ; hp db BASIC ; stage @@ -486,11 +489,11 @@ CaterpieCard: ; 30f2c (c:4f2c) db 19 MetapodCard: ; 30f6d (c:4f6d) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx MetapodCardGfx ; gfx tx MetapodName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db METAPOD db 70 ; hp db STAGE1 ; stage @@ -537,11 +540,11 @@ MetapodCard: ; 30f6d (c:4f6d) db 16 ButterfreeCard: ; 30fae (c:4fae) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ButterfreeCardGfx ; gfx tx ButterfreeName ; name db DIAMOND ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db BUTTERFREE db 70 ; hp db STAGE2 ; stage @@ -588,11 +591,11 @@ ButterfreeCard: ; 30fae (c:4fae) db 0 WeedleCard: ; 30fef (c:4fef) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx WeedleCardGfx ; gfx tx WeedleName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db WEEDLE db 40 ; hp db BASIC ; stage @@ -639,11 +642,11 @@ WeedleCard: ; 30fef (c:4fef) db 19 KakunaCard: ; 31030 (c:5030) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx KakunaCardGfx ; gfx tx KakunaName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db KAKUNA db 80 ; hp db STAGE1 ; stage @@ -690,11 +693,11 @@ KakunaCard: ; 31030 (c:5030) db 16 BeedrillCard: ; 31071 (c:5071) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx BeedrillCardGfx ; gfx tx BeedrillName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db BEEDRILL db 80 ; hp db STAGE2 ; stage @@ -741,11 +744,11 @@ BeedrillCard: ; 31071 (c:5071) db 0 EkansCard: ; 310b2 (c:50b2) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx EkansCardGfx ; gfx tx EkansName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db EKANS db 40 ; hp db BASIC ; stage @@ -792,11 +795,11 @@ EkansCard: ; 310b2 (c:50b2) db 19 ArbokCard: ; 310f3 (c:50f3) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ArbokCardGfx ; gfx tx ArbokName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db ARBOK db 60 ; hp db STAGE1 ; stage @@ -843,11 +846,11 @@ ArbokCard: ; 310f3 (c:50f3) db 0 NidoranFCard: ; 31134 (c:5134) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx NidoranFCardGfx ; gfx tx NidoranFName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db NIDORANF db 60 ; hp db BASIC ; stage @@ -894,11 +897,11 @@ NidoranFCard: ; 31134 (c:5134) db 19 NidorinaCard: ; 31175 (c:5175) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx NidorinaCardGfx ; gfx tx NidorinaName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db NIDORINA db 70 ; hp db STAGE1 ; stage @@ -945,11 +948,11 @@ NidorinaCard: ; 31175 (c:5175) db 16 NidoqueenCard: ; 311b6 (c:51b6) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx NidoqueenCardGfx ; gfx tx NidoqueenName ; name db STAR ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db NIDOQUEEN db 90 ; hp db STAGE2 ; stage @@ -996,11 +999,11 @@ NidoqueenCard: ; 311b6 (c:51b6) db 0 NidoranMCard: ; 311f7 (c:51f7) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx NidoranMCardGfx ; gfx tx NidoranMName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db NIDORANM db 40 ; hp db BASIC ; stage @@ -1047,11 +1050,11 @@ NidoranMCard: ; 311f7 (c:51f7) db 19 NidorinoCard: ; 31238 (c:5238) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx NidorinoCardGfx ; gfx tx NidorinoName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db NIDORINO db 60 ; hp db STAGE1 ; stage @@ -1098,11 +1101,11 @@ NidorinoCard: ; 31238 (c:5238) db 16 NidokingCard: ; 31279 (c:5279) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx NidokingCardGfx ; gfx tx NidokingName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db NIDOKING db 90 ; hp db STAGE2 ; stage @@ -1149,11 +1152,11 @@ NidokingCard: ; 31279 (c:5279) db 0 ZubatCard: ; 312ba (c:52ba) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ZubatCardGfx ; gfx tx ZubatName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db ZUBAT db 40 ; hp db BASIC ; stage @@ -1200,11 +1203,11 @@ ZubatCard: ; 312ba (c:52ba) db 16 GolbatCard: ; 312fb (c:52fb) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx GolbatCardGfx ; gfx tx GolbatName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db GOLBAT db 60 ; hp db STAGE1 ; stage @@ -1251,11 +1254,11 @@ GolbatCard: ; 312fb (c:52fb) db 0 OddishCard: ; 3133c (c:533c) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx OddishCardGfx ; gfx tx OddishName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db ODDISH db 50 ; hp db BASIC ; stage @@ -1302,11 +1305,11 @@ OddishCard: ; 3133c (c:533c) db 16 GloomCard: ; 3137d (c:537d) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx GloomCardGfx ; gfx tx GloomName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db GLOOM db 60 ; hp db STAGE1 ; stage @@ -1353,11 +1356,11 @@ GloomCard: ; 3137d (c:537d) db 16 VileplumeCard: ; 313be (c:53be) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx VileplumeCardGfx ; gfx tx VileplumeName ; name db STAR ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db VILEPLUME db 80 ; hp db STAGE2 ; stage @@ -1404,11 +1407,11 @@ VileplumeCard: ; 313be (c:53be) db 0 ParasCard: ; 313ff (c:53ff) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ParasCardGfx ; gfx tx ParasName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db PARAS db 40 ; hp db BASIC ; stage @@ -1455,11 +1458,11 @@ ParasCard: ; 313ff (c:53ff) db 16 ParasectCard: ; 31440 (c:5440) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ParasectCardGfx ; gfx tx ParasectName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db PARASECT db 60 ; hp db STAGE1 ; stage @@ -1506,11 +1509,11 @@ ParasectCard: ; 31440 (c:5440) db 0 VenonatCard: ; 31481 (c:5481) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx VenonatCardGfx ; gfx tx VenonatName ; name db CIRCLE ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db VENONAT db 40 ; hp db BASIC ; stage @@ -1557,11 +1560,11 @@ VenonatCard: ; 31481 (c:5481) db 19 VenomothCard: ; 314c2 (c:54c2) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx VenomothCardGfx ; gfx tx VenomothName ; name db STAR ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db VENOMOTH db 70 ; hp db STAGE1 ; stage @@ -1608,11 +1611,11 @@ VenomothCard: ; 314c2 (c:54c2) db 0 BellsproutCard: ; 31503 (c:5503) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx BellsproutCardGfx ; gfx tx BellsproutName ; name db CIRCLE ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db BELLSPROUT db 40 ; hp db BASIC ; stage @@ -1659,11 +1662,11 @@ BellsproutCard: ; 31503 (c:5503) db 19 WeepinbellCard: ; 31544 (c:5544) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx WeepinbellCardGfx ; gfx tx WeepinbellName ; name db DIAMOND ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db WEEPINBELL db 70 ; hp db STAGE1 ; stage @@ -1710,11 +1713,11 @@ WeepinbellCard: ; 31544 (c:5544) db 16 VictreebelCard: ; 31585 (c:5585) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx VictreebelCardGfx ; gfx tx VictreebelName ; name db STAR ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db VICTREEBEL db 80 ; hp db STAGE2 ; stage @@ -1761,11 +1764,11 @@ VictreebelCard: ; 31585 (c:5585) db 0 GrimerCard: ; 315c6 (c:55c6) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx GrimerCardGfx ; gfx tx GrimerName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db GRIMER db 50 ; hp db BASIC ; stage @@ -1812,11 +1815,11 @@ GrimerCard: ; 315c6 (c:55c6) db 19 MukCard: ; 31607 (c:5607) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx MukCardGfx ; gfx tx MukName ; name db STAR ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db MUK db 70 ; hp db STAGE1 ; stage @@ -1863,11 +1866,11 @@ MukCard: ; 31607 (c:5607) db 0 ExeggcuteCard: ; 31648 (c:5648) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ExeggcuteCardGfx ; gfx tx ExeggcuteName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db EXEGGCUTE db 50 ; hp db BASIC ; stage @@ -1914,11 +1917,11 @@ ExeggcuteCard: ; 31648 (c:5648) db 18 ExeggutorCard: ; 31689 (c:5689) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ExeggutorCardGfx ; gfx tx ExeggutorName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db EXEGGUTOR db 80 ; hp db STAGE1 ; stage @@ -1965,11 +1968,11 @@ ExeggutorCard: ; 31689 (c:5689) db 0 KoffingCard: ; 316ca (c:56ca) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx KoffingCardGfx ; gfx tx KoffingName ; name db CIRCLE ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db KOFFING db 50 ; hp db BASIC ; stage @@ -2016,11 +2019,11 @@ KoffingCard: ; 316ca (c:56ca) db 16 WeezingCard: ; 3170b (c:570b) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx WeezingCardGfx ; gfx tx WeezingName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db WEEZING db 60 ; hp db STAGE1 ; stage @@ -2067,11 +2070,11 @@ WeezingCard: ; 3170b (c:570b) db 0 Tangela1Card: ; 3174c (c:574c) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx Tangela1CardGfx ; gfx tx TangelaName ; name db CIRCLE ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db TANGELA1 db 50 ; hp db BASIC ; stage @@ -2118,11 +2121,11 @@ Tangela1Card: ; 3174c (c:574c) db 0 Tangela2Card: ; 3178d (c:578d) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx Tangela2CardGfx ; gfx tx TangelaName ; name db CIRCLE ; rarity - db COLOSSEUM | GB ; set + db COLOSSEUM | GB ; sets db TANGELA2 db 50 ; hp db BASIC ; stage @@ -2169,11 +2172,11 @@ Tangela2Card: ; 3178d (c:578d) db 0 ScytherCard: ; 317ce (c:57ce) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx ScytherCardGfx ; gfx tx ScytherName ; name db STAR ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db SCYTHER db 70 ; hp db BASIC ; stage @@ -2220,11 +2223,11 @@ ScytherCard: ; 317ce (c:57ce) db 0 PinsirCard: ; 3180f (c:580f) - db GRASS ; type + db TYPE_PKMN_GRASS ; type gfx PinsirCardGfx ; gfx tx PinsirName ; name db STAR ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db PINSIR db 60 ; hp db BASIC ; stage @@ -2271,11 +2274,11 @@ PinsirCard: ; 3180f (c:580f) db 0 CharmanderCard: ; 31850 (c:5850) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx CharmanderCardGfx ; gfx tx CharmanderName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db CHARMANDER db 50 ; hp db BASIC ; stage @@ -2322,11 +2325,11 @@ CharmanderCard: ; 31850 (c:5850) db 21 CharmeleonCard: ; 31891 (c:5891) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx CharmeleonCardGfx ; gfx tx CharmeleonName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db CHARMELEON db 80 ; hp db STAGE1 ; stage @@ -2373,11 +2376,11 @@ CharmeleonCard: ; 31891 (c:5891) db 18 CharizardCard: ; 318d2 (c:58d2) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx CharizardCardGfx ; gfx tx CharizardName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db CHARIZARD db 120 ; hp db STAGE2 ; stage @@ -2424,11 +2427,11 @@ CharizardCard: ; 318d2 (c:58d2) db 0 VulpixCard: ; 31913 (c:5913) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx VulpixCardGfx ; gfx tx VulpixName ; name db CIRCLE ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db VULPIX db 50 ; hp db BASIC ; stage @@ -2475,11 +2478,11 @@ VulpixCard: ; 31913 (c:5913) db 18 Ninetails1Card: ; 31954 (c:5954) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Ninetails1CardGfx ; gfx tx NinetailsName ; name db STAR ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db NINETAILS1 db 80 ; hp db STAGE1 ; stage @@ -2526,11 +2529,11 @@ Ninetails1Card: ; 31954 (c:5954) db 0 Ninetails2Card: ; 31995 (c:5995) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Ninetails2CardGfx ; gfx tx NinetailsName ; name db STAR ; rarity - db LABORATORY | GB ; set + db LABORATORY | GB ; sets db NINETAILS2 db 80 ; hp db STAGE1 ; stage @@ -2577,11 +2580,11 @@ Ninetails2Card: ; 31995 (c:5995) db 0 GrowlitheCard: ; 319d6 (c:59d6) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx GrowlitheCardGfx ; gfx tx GrowlitheName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db GROWLITHE db 60 ; hp db BASIC ; stage @@ -2628,11 +2631,11 @@ GrowlitheCard: ; 319d6 (c:59d6) db 16 Arcanine1Card: ; 31a17 (c:5a17) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Arcanine1CardGfx ; gfx tx ArcanineName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db ARCANINE1 db 70 ; hp db STAGE1 ; stage @@ -2679,11 +2682,11 @@ Arcanine1Card: ; 31a17 (c:5a17) db 0 Arcanine2Card: ; 31a58 (c:5a58) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Arcanine2CardGfx ; gfx tx ArcanineName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db ARCANINE2 db 100 ; hp db STAGE1 ; stage @@ -2730,11 +2733,11 @@ Arcanine2Card: ; 31a58 (c:5a58) db 0 PonytaCard: ; 31a99 (c:5a99) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx PonytaCardGfx ; gfx tx PonytaName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db PONYTA db 40 ; hp db BASIC ; stage @@ -2781,11 +2784,11 @@ PonytaCard: ; 31a99 (c:5a99) db 16 RapidashCard: ; 31ada (c:5ada) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx RapidashCardGfx ; gfx tx RapidashName ; name db DIAMOND ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db RAPIDASH db 70 ; hp db STAGE1 ; stage @@ -2832,11 +2835,11 @@ RapidashCard: ; 31ada (c:5ada) db 0 Magmar1Card: ; 31b1b (c:5b1b) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Magmar1CardGfx ; gfx tx MagmarName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db MAGMAR1 db 50 ; hp db BASIC ; stage @@ -2883,11 +2886,11 @@ Magmar1Card: ; 31b1b (c:5b1b) db 0 Magmar2Card: ; 31b5c (c:5b5c) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Magmar2CardGfx ; gfx tx MagmarName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db MAGMAR2 db 70 ; hp db BASIC ; stage @@ -2934,11 +2937,11 @@ Magmar2Card: ; 31b5c (c:5b5c) db 3 Flareon1Card: ; 31b9d (c:5b9d) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Flareon1CardGfx ; gfx tx FlareonName ; name db DIAMOND ; rarity - db MYSTERY | GB ; set + db MYSTERY | GB ; sets db FLAREON1 db 60 ; hp db STAGE1 ; stage @@ -2985,11 +2988,11 @@ Flareon1Card: ; 31b9d (c:5b9d) db 0 Flareon2Card: ; 31bde (c:5bde) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Flareon2CardGfx ; gfx tx FlareonName ; name db STAR ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db FLAREON2 db 70 ; hp db STAGE1 ; stage @@ -3036,11 +3039,11 @@ Flareon2Card: ; 31bde (c:5bde) db 0 Moltres1Card: ; 31c1f (c:5c1f) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Moltres1CardGfx ; gfx tx MoltresName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db MOLTRES1 db 70 ; hp db BASIC ; stage @@ -3087,11 +3090,11 @@ Moltres1Card: ; 31c1f (c:5c1f) db 0 Moltres2Card: ; 31c60 (c:5c60) - db FIRE ; type + db TYPE_PKMN_FIRE ; type gfx Moltres2CardGfx ; gfx tx MoltresName ; name db STAR ; rarity - db PROMOTIONAL | GB ; set + db PROMOTIONAL | GB ; sets db MOLTRES2 db 100 ; hp db BASIC ; stage @@ -3138,11 +3141,11 @@ Moltres2Card: ; 31c60 (c:5c60) db 0 SquirtleCard: ; 31ca1 (c:5ca1) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx SquirtleCardGfx ; gfx tx SquirtleName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db SQUIRTLE db 40 ; hp db BASIC ; stage @@ -3189,11 +3192,11 @@ SquirtleCard: ; 31ca1 (c:5ca1) db 21 WartortleCard: ; 31ce2 (c:5ce2) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx WartortleCardGfx ; gfx tx WartortleName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db WARTORTLE db 70 ; hp db STAGE1 ; stage @@ -3240,11 +3243,11 @@ WartortleCard: ; 31ce2 (c:5ce2) db 18 BlastoiseCard: ; 31d23 (c:5d23) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx BlastoiseCardGfx ; gfx tx BlastoiseName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db BLASTOISE db 100 ; hp db STAGE2 ; stage @@ -3291,11 +3294,11 @@ BlastoiseCard: ; 31d23 (c:5d23) db 0 PsyduckCard: ; 31d64 (c:5d64) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx PsyduckCardGfx ; gfx tx PsyduckName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db PSYDUCK db 50 ; hp db BASIC ; stage @@ -3342,11 +3345,11 @@ PsyduckCard: ; 31d64 (c:5d64) db 19 GolduckCard: ; 31da5 (c:5da5) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx GolduckCardGfx ; gfx tx GolduckName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db GOLDUCK db 70 ; hp db STAGE1 ; stage @@ -3393,11 +3396,11 @@ GolduckCard: ; 31da5 (c:5da5) db 3 PoliwagCard: ; 31de6 (c:5de6) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx PoliwagCardGfx ; gfx tx PoliwagName ; name db CIRCLE ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db POLIWAG db 40 ; hp db BASIC ; stage @@ -3444,11 +3447,11 @@ PoliwagCard: ; 31de6 (c:5de6) db 19 PoliwhirlCard: ; 31e27 (c:5e27) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx PoliwhirlCardGfx ; gfx tx PoliwhirlName ; name db DIAMOND ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db POLIWHIRL db 60 ; hp db STAGE1 ; stage @@ -3495,11 +3498,11 @@ PoliwhirlCard: ; 31e27 (c:5e27) db 16 PoliwrathCard: ; 31e68 (c:5e68) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx PoliwrathCardGfx ; gfx tx PoliwrathName ; name db STAR ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db POLIWRATH db 90 ; hp db STAGE2 ; stage @@ -3546,11 +3549,11 @@ PoliwrathCard: ; 31e68 (c:5e68) db 0 TentacoolCard: ; 31ea9 (c:5ea9) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx TentacoolCardGfx ; gfx tx TentacoolName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db TENTACOOL db 30 ; hp db BASIC ; stage @@ -3597,11 +3600,11 @@ TentacoolCard: ; 31ea9 (c:5ea9) db 19 TentacruelCard: ; 31eea (c:5eea) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx TentacruelCardGfx ; gfx tx TentacruelName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db TENTACRUEL db 60 ; hp db STAGE1 ; stage @@ -3648,11 +3651,11 @@ TentacruelCard: ; 31eea (c:5eea) db 0 SeelCard: ; 31f2b (c:5f2b) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx SeelCardGfx ; gfx tx SeelName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db SEEL db 60 ; hp db BASIC ; stage @@ -3699,11 +3702,11 @@ SeelCard: ; 31f2b (c:5f2b) db 19 DewgongCard: ; 31f6c (c:5f6c) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx DewgongCardGfx ; gfx tx DewgongName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db DEWGONG db 80 ; hp db STAGE1 ; stage @@ -3750,11 +3753,11 @@ DewgongCard: ; 31f6c (c:5f6c) db 0 ShellderCard: ; 31fad (c:5fad) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx ShellderCardGfx ; gfx tx ShellderName ; name db CIRCLE ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db SHELLDER db 30 ; hp db BASIC ; stage @@ -3801,11 +3804,11 @@ ShellderCard: ; 31fad (c:5fad) db 19 CloysterCard: ; 31fee (c:5fee) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx CloysterCardGfx ; gfx tx CloysterName ; name db DIAMOND ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db CLOYSTER db 50 ; hp db STAGE1 ; stage @@ -3852,11 +3855,11 @@ CloysterCard: ; 31fee (c:5fee) db 0 KrabbyCard: ; 3202f (c:602f) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx KrabbyCardGfx ; gfx tx KrabbyName ; name db CIRCLE ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db KRABBY db 50 ; hp db BASIC ; stage @@ -3903,11 +3906,11 @@ KrabbyCard: ; 3202f (c:602f) db 16 KinglerCard: ; 32070 (c:6070) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx KinglerCardGfx ; gfx tx KinglerName ; name db DIAMOND ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db KINGLER db 60 ; hp db STAGE1 ; stage @@ -3954,11 +3957,11 @@ KinglerCard: ; 32070 (c:6070) db 0 HorseaCard: ; 320b1 (c:60b1) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx HorseaCardGfx ; gfx tx HorseaName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db HORSEA db 40 ; hp db BASIC ; stage @@ -4005,11 +4008,11 @@ HorseaCard: ; 320b1 (c:60b1) db 19 SeadraCard: ; 320f2 (c:60f2) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx SeadraCardGfx ; gfx tx SeadraName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db SEADRA db 60 ; hp db STAGE1 ; stage @@ -4056,11 +4059,11 @@ SeadraCard: ; 320f2 (c:60f2) db 0 GoldeenCard: ; 32133 (c:6133) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx GoldeenCardGfx ; gfx tx GoldeenName ; name db CIRCLE ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db GOLDEEN db 40 ; hp db BASIC ; stage @@ -4107,11 +4110,11 @@ GoldeenCard: ; 32133 (c:6133) db 21 SeakingCard: ; 32174 (c:6174) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx SeakingCardGfx ; gfx tx SeakingName ; name db DIAMOND ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db SEAKING db 70 ; hp db STAGE1 ; stage @@ -4158,11 +4161,11 @@ SeakingCard: ; 32174 (c:6174) db 0 StaryuCard: ; 321b5 (c:61b5) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx StaryuCardGfx ; gfx tx StaryuName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db STARYU db 40 ; hp db BASIC ; stage @@ -4209,11 +4212,11 @@ StaryuCard: ; 321b5 (c:61b5) db 19 StarmieCard: ; 321f6 (c:61f6) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx StarmieCardGfx ; gfx tx StarmieName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db STARMIE db 60 ; hp db STAGE1 ; stage @@ -4260,11 +4263,11 @@ StarmieCard: ; 321f6 (c:61f6) db 0 MagikarpCard: ; 32237 (c:6237) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx MagikarpCardGfx ; gfx tx MagikarpName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db MAGIKARP db 30 ; hp db BASIC ; stage @@ -4311,11 +4314,11 @@ MagikarpCard: ; 32237 (c:6237) db 18 GyaradosCard: ; 32278 (c:6278) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx GyaradosCardGfx ; gfx tx GyaradosName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db GYARADOS db 100 ; hp db STAGE1 ; stage @@ -4362,11 +4365,11 @@ GyaradosCard: ; 32278 (c:6278) db 0 LaprasCard: ; 322b9 (c:62b9) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx LaprasCardGfx ; gfx tx LaprasName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db LAPRAS db 80 ; hp db BASIC ; stage @@ -4413,11 +4416,11 @@ LaprasCard: ; 322b9 (c:62b9) db 0 Vaporeon1Card: ; 322fa (c:62fa) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx Vaporeon1CardGfx ; gfx tx VaporeonName ; name db DIAMOND ; rarity - db MYSTERY | GB ; set + db MYSTERY | GB ; sets db VAPOREON1 db 60 ; hp db STAGE1 ; stage @@ -4464,11 +4467,11 @@ Vaporeon1Card: ; 322fa (c:62fa) db 0 Vaporeon2Card: ; 3233b (c:633b) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx Vaporeon2CardGfx ; gfx tx VaporeonName ; name db STAR ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db VAPOREON2 db 80 ; hp db STAGE1 ; stage @@ -4515,11 +4518,11 @@ Vaporeon2Card: ; 3233b (c:633b) db 0 OmanyteCard: ; 3237c (c:637c) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx OmanyteCardGfx ; gfx tx OmanyteName ; name db CIRCLE ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db OMANYTE db 40 ; hp db STAGE1 ; stage @@ -4566,11 +4569,11 @@ OmanyteCard: ; 3237c (c:637c) db 17 OmastarCard: ; 323bd (c:63bd) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx OmastarCardGfx ; gfx tx OmastarName ; name db DIAMOND ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db OMASTAR db 70 ; hp db STAGE2 ; stage @@ -4617,11 +4620,11 @@ OmastarCard: ; 323bd (c:63bd) db 0 Articuno1Card: ; 323fe (c:63fe) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx Articuno1CardGfx ; gfx tx ArticunoName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db ARTICUNO1 db 70 ; hp db BASIC ; stage @@ -4668,11 +4671,11 @@ Articuno1Card: ; 323fe (c:63fe) db 0 Articuno2Card: ; 3243f (c:643f) - db WATER ; type + db TYPE_PKMN_WATER ; type gfx Articuno2CardGfx ; gfx tx ArticunoName ; name db STAR ; rarity - db PROMOTIONAL | GB ; set + db PROMOTIONAL | GB ; sets db ARTICUNO2 db 100 ; hp db BASIC ; stage @@ -4719,11 +4722,11 @@ Articuno2Card: ; 3243f (c:643f) db 0 Pikachu1Card: ; 32480 (c:6480) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Pikachu1CardGfx ; gfx tx PikachuName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db PIKACHU1 db 40 ; hp db BASIC ; stage @@ -4770,11 +4773,11 @@ Pikachu1Card: ; 32480 (c:6480) db 19 Pikachu2Card: ; 324c1 (c:64c1) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Pikachu2CardGfx ; gfx tx PikachuName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db PIKACHU2 db 50 ; hp db BASIC ; stage @@ -4821,11 +4824,11 @@ Pikachu2Card: ; 324c1 (c:64c1) db 16 Pikachu3Card: ; 32502 (c:6502) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Pikachu3CardGfx ; gfx tx PikachuName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db PIKACHU3 db 60 ; hp db BASIC ; stage @@ -4872,11 +4875,11 @@ Pikachu3Card: ; 32502 (c:6502) db 16 Pikachu4Card: ; 32543 (c:6543) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Pikachu4CardGfx ; gfx tx PikachuName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db PIKACHU4 db 60 ; hp db BASIC ; stage @@ -4923,11 +4926,11 @@ Pikachu4Card: ; 32543 (c:6543) db 16 FlyingPikachuCard: ; 32584 (c:6584) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx FlyingPikachuCardGfx ; gfx tx FlyingPikachuName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db FLYING_PIKACHU db 40 ; hp db BASIC ; stage @@ -4974,11 +4977,11 @@ FlyingPikachuCard: ; 32584 (c:6584) db 3 SurfingPikachu1Card: ; 325c5 (c:65c5) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx SurfingPikachu1CardGfx ; gfx tx SurfingPikachuName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db SURFING_PIKACHU1 db 50 ; hp db BASIC ; stage @@ -5025,11 +5028,11 @@ SurfingPikachu1Card: ; 325c5 (c:65c5) db 0 SurfingPikachu2Card: ; 32606 (c:6606) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx SurfingPikachu2CardGfx ; gfx tx SurfingPikachuName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db SURFING_PIKACHU2 db 50 ; hp db BASIC ; stage @@ -5076,11 +5079,11 @@ SurfingPikachu2Card: ; 32606 (c:6606) db 0 Raichu1Card: ; 32647 (c:6647) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Raichu1CardGfx ; gfx tx RaichuName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db RAICHU1 db 80 ; hp db STAGE1 ; stage @@ -5127,11 +5130,11 @@ Raichu1Card: ; 32647 (c:6647) db 0 Raichu2Card: ; 32688 (c:6688) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Raichu2CardGfx ; gfx tx RaichuName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db RAICHU2 db 90 ; hp db STAGE1 ; stage @@ -5178,11 +5181,11 @@ Raichu2Card: ; 32688 (c:6688) db 0 Magnemite1Card: ; 326c9 (c:66c9) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Magnemite1CardGfx ; gfx tx MagnemiteName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db MAGNEMITE1 db 40 ; hp db BASIC ; stage @@ -5229,11 +5232,11 @@ Magnemite1Card: ; 326c9 (c:66c9) db 19 Magnemite2Card: ; 3270a (c:670a) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Magnemite2CardGfx ; gfx tx MagnemiteName ; name db CIRCLE ; rarity - db LABORATORY | GB ; set + db LABORATORY | GB ; sets db MAGNEMITE2 db 40 ; hp db BASIC ; stage @@ -5280,11 +5283,11 @@ Magnemite2Card: ; 3270a (c:670a) db 19 Magneton1Card: ; 3274b (c:674b) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Magneton1CardGfx ; gfx tx MagnetonName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db MAGNETON1 db 60 ; hp db STAGE1 ; stage @@ -5331,11 +5334,11 @@ Magneton1Card: ; 3274b (c:674b) db 0 Magneton2Card: ; 3278c (c:678c) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Magneton2CardGfx ; gfx tx MagnetonName ; name db STAR ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db MAGNETON2 db 80 ; hp db STAGE1 ; stage @@ -5382,11 +5385,11 @@ Magneton2Card: ; 3278c (c:678c) db 0 VoltorbCard: ; 327cd (c:67cd) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx VoltorbCardGfx ; gfx tx VoltorbName ; name db CIRCLE ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db VOLTORB db 40 ; hp db BASIC ; stage @@ -5433,11 +5436,11 @@ VoltorbCard: ; 327cd (c:67cd) db 21 Electrode1Card: ; 3280e (c:680e) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Electrode1CardGfx ; gfx tx ElectrodeName ; name db STAR ; rarity - db LABORATORY | GB ; set + db LABORATORY | GB ; sets db ELECTRODE1 db 70 ; hp db STAGE1 ; stage @@ -5484,11 +5487,11 @@ Electrode1Card: ; 3280e (c:680e) db 0 Electrode2Card: ; 3284f (c:684f) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Electrode2CardGfx ; gfx tx ElectrodeName ; name db STAR ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db ELECTRODE2 db 90 ; hp db STAGE1 ; stage @@ -5535,11 +5538,11 @@ Electrode2Card: ; 3284f (c:684f) db 0 Electabuzz1Card: ; 32890 (c:6890) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Electabuzz1CardGfx ; gfx tx ElectabuzzName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db ELECTABUZZ1 db 60 ; hp db BASIC ; stage @@ -5586,11 +5589,11 @@ Electabuzz1Card: ; 32890 (c:6890) db 0 Electabuzz2Card: ; 328d1 (c:68d1) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Electabuzz2CardGfx ; gfx tx ElectabuzzName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db ELECTABUZZ2 db 70 ; hp db BASIC ; stage @@ -5637,11 +5640,11 @@ Electabuzz2Card: ; 328d1 (c:68d1) db 0 Jolteon1Card: ; 32912 (c:6912) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Jolteon1CardGfx ; gfx tx JolteonName ; name db DIAMOND ; rarity - db MYSTERY | GB ; set + db MYSTERY | GB ; sets db JOLTEON1 db 60 ; hp db STAGE1 ; stage @@ -5688,11 +5691,11 @@ Jolteon1Card: ; 32912 (c:6912) db 0 Jolteon2Card: ; 32953 (c:6953) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Jolteon2CardGfx ; gfx tx JolteonName ; name db STAR ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db JOLTEON2 db 70 ; hp db STAGE1 ; stage @@ -5739,11 +5742,11 @@ Jolteon2Card: ; 32953 (c:6953) db 0 Zapdos1Card: ; 32994 (c:6994) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Zapdos1CardGfx ; gfx tx ZapdosName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db ZAPDOS1 db 80 ; hp db BASIC ; stage @@ -5790,11 +5793,11 @@ Zapdos1Card: ; 32994 (c:6994) db 0 Zapdos2Card: ; 329d5 (c:69d5) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Zapdos2CardGfx ; gfx tx ZapdosName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db ZAPDOS2 db 90 ; hp db BASIC ; stage @@ -5841,11 +5844,11 @@ Zapdos2Card: ; 329d5 (c:69d5) db 0 Zapdos3Card: ; 32a16 (c:6a16) - db LIGHTNING ; type + db TYPE_PKMN_LIGHTNING ; type gfx Zapdos3CardGfx ; gfx tx ZapdosName ; name db STAR ; rarity - db PROMOTIONAL | GB ; set + db PROMOTIONAL | GB ; sets db ZAPDOS3 db 100 ; hp db BASIC ; stage @@ -5892,11 +5895,11 @@ Zapdos3Card: ; 32a16 (c:6a16) db 0 SandshrewCard: ; 32a57 (c:6a57) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx SandshrewCardGfx ; gfx tx SandshrewName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db SANDSHREW db 40 ; hp db BASIC ; stage @@ -5943,11 +5946,11 @@ SandshrewCard: ; 32a57 (c:6a57) db 19 SandslashCard: ; 32a98 (c:6a98) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx SandslashCardGfx ; gfx tx SandslashName ; name db DIAMOND ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db SANDSLASH db 70 ; hp db STAGE1 ; stage @@ -5994,11 +5997,11 @@ SandslashCard: ; 32a98 (c:6a98) db 0 DiglettCard: ; 32ad9 (c:6ad9) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx DiglettCardGfx ; gfx tx DiglettName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db DIGLETT db 30 ; hp db BASIC ; stage @@ -6045,11 +6048,11 @@ DiglettCard: ; 32ad9 (c:6ad9) db 19 DugtrioCard: ; 32b1a (c:6b1a) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx DugtrioCardGfx ; gfx tx DugtrioName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db DUGTRIO db 70 ; hp db STAGE1 ; stage @@ -6096,11 +6099,11 @@ DugtrioCard: ; 32b1a (c:6b1a) db 0 MankeyCard: ; 32b5b (c:6b5b) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx MankeyCardGfx ; gfx tx MankeyName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db MANKEY db 30 ; hp db BASIC ; stage @@ -6147,11 +6150,11 @@ MankeyCard: ; 32b5b (c:6b5b) db 17 PrimeapeCard: ; 32b9c (c:6b9c) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx PrimeapeCardGfx ; gfx tx PrimeapeName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db PRIMEAPE db 70 ; hp db STAGE1 ; stage @@ -6198,11 +6201,11 @@ PrimeapeCard: ; 32b9c (c:6b9c) db 0 MachopCard: ; 32bdd (c:6bdd) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx MachopCardGfx ; gfx tx MachopName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db MACHOP db 50 ; hp db BASIC ; stage @@ -6249,11 +6252,11 @@ MachopCard: ; 32bdd (c:6bdd) db 21 MachokeCard: ; 32c1e (c:6c1e) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx MachokeCardGfx ; gfx tx MachokeName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db MACHOKE db 80 ; hp db STAGE1 ; stage @@ -6300,11 +6303,11 @@ MachokeCard: ; 32c1e (c:6c1e) db 16 MachampCard: ; 32c5f (c:6c5f) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx MachampCardGfx ; gfx tx MachampName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db MACHAMP db 100 ; hp db STAGE2 ; stage @@ -6351,11 +6354,11 @@ MachampCard: ; 32c5f (c:6c5f) db 0 GeodudeCard: ; 32ca0 (c:6ca0) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx GeodudeCardGfx ; gfx tx GeodudeName ; name db CIRCLE ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db GEODUDE db 50 ; hp db BASIC ; stage @@ -6402,11 +6405,11 @@ GeodudeCard: ; 32ca0 (c:6ca0) db 19 GravelerCard: ; 32ce1 (c:6ce1) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx GravelerCardGfx ; gfx tx GravelerName ; name db DIAMOND ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db GRAVELER db 60 ; hp db STAGE1 ; stage @@ -6453,11 +6456,11 @@ GravelerCard: ; 32ce1 (c:6ce1) db 16 GolemCard: ; 32d22 (c:6d22) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx GolemCardGfx ; gfx tx GolemName ; name db DIAMOND ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db GOLEM db 80 ; hp db STAGE2 ; stage @@ -6504,11 +6507,11 @@ GolemCard: ; 32d22 (c:6d22) db 0 OnixCard: ; 32d63 (c:6d63) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx OnixCardGfx ; gfx tx OnixName ; name db CIRCLE ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db ONIX db 90 ; hp db BASIC ; stage @@ -6555,11 +6558,11 @@ OnixCard: ; 32d63 (c:6d63) db 0 CuboneCard: ; 32da4 (c:6da4) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx CuboneCardGfx ; gfx tx CuboneName ; name db CIRCLE ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db CUBONE db 40 ; hp db BASIC ; stage @@ -6606,11 +6609,11 @@ CuboneCard: ; 32da4 (c:6da4) db 19 Marowak1Card: ; 32de5 (c:6de5) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx Marowak1CardGfx ; gfx tx MarowakName ; name db DIAMOND ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db MAROWAK1 db 60 ; hp db STAGE1 ; stage @@ -6657,11 +6660,11 @@ Marowak1Card: ; 32de5 (c:6de5) db 0 Marowak2Card: ; 32e26 (c:6e26) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx Marowak2CardGfx ; gfx tx MarowakName ; name db DIAMOND ; rarity - db EVOLUTION | GB ; set + db EVOLUTION | GB ; sets db MAROWAK2 db 70 ; hp db STAGE1 ; stage @@ -6708,11 +6711,11 @@ Marowak2Card: ; 32e26 (c:6e26) db 0 HitmonleeCard: ; 32e67 (c:6e67) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx HitmonleeCardGfx ; gfx tx HitmonleeName ; name db STAR ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db HITMONLEE db 60 ; hp db BASIC ; stage @@ -6759,11 +6762,11 @@ HitmonleeCard: ; 32e67 (c:6e67) db 0 HitmonchanCard: ; 32ea8 (c:6ea8) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx HitmonchanCardGfx ; gfx tx HitmonchanName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db HITMONCHAN db 70 ; hp db BASIC ; stage @@ -6810,11 +6813,11 @@ HitmonchanCard: ; 32ea8 (c:6ea8) db 0 RhyhornCard: ; 32ee9 (c:6ee9) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx RhyhornCardGfx ; gfx tx RhyhornName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db RHYHORN db 70 ; hp db BASIC ; stage @@ -6861,11 +6864,11 @@ RhyhornCard: ; 32ee9 (c:6ee9) db 16 RhydonCard: ; 32f2a (c:6f2a) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx RhydonCardGfx ; gfx tx RhydonName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db RHYDON db 100 ; hp db STAGE1 ; stage @@ -6912,11 +6915,11 @@ RhydonCard: ; 32f2a (c:6f2a) db 0 KabutoCard: ; 32f6b (c:6f6b) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx KabutoCardGfx ; gfx tx KabutoName ; name db CIRCLE ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db KABUTO db 30 ; hp db STAGE1 ; stage @@ -6963,11 +6966,11 @@ KabutoCard: ; 32f6b (c:6f6b) db 19 KabutopsCard: ; 32fac (c:6fac) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx KabutopsCardGfx ; gfx tx KabutopsName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db KABUTOPS db 60 ; hp db STAGE2 ; stage @@ -7014,11 +7017,11 @@ KabutopsCard: ; 32fac (c:6fac) db 0 AerodactylCard: ; 32fed (c:6fed) - db FIGHTING ; type + db TYPE_PKMN_FIGHTING ; type gfx AerodactylCardGfx ; gfx tx AerodactylName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db AERODACTYL db 60 ; hp db STAGE1 ; stage @@ -7065,11 +7068,11 @@ AerodactylCard: ; 32fed (c:6fed) db 1 AbraCard: ; 3302e (c:702e) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx AbraCardGfx ; gfx tx AbraName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db ABRA db 30 ; hp db BASIC ; stage @@ -7116,11 +7119,11 @@ AbraCard: ; 3302e (c:702e) db 16 KadabraCard: ; 3306f (c:706f) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx KadabraCardGfx ; gfx tx KadabraName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db KADABRA db 60 ; hp db STAGE1 ; stage @@ -7167,11 +7170,11 @@ KadabraCard: ; 3306f (c:706f) db 16 AlakazamCard: ; 330b0 (c:70b0) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx AlakazamCardGfx ; gfx tx AlakazamName ; name db STAR ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db ALAKAZAM db 80 ; hp db STAGE2 ; stage @@ -7218,11 +7221,11 @@ AlakazamCard: ; 330b0 (c:70b0) db 0 Slowpoke1Card: ; 330f1 (c:70f1) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Slowpoke1CardGfx ; gfx tx SlowpokeName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db SLOWPOKE1 db 40 ; hp db BASIC ; stage @@ -7269,11 +7272,11 @@ Slowpoke1Card: ; 330f1 (c:70f1) db 19 Slowpoke2Card: ; 33132 (c:7132) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Slowpoke2CardGfx ; gfx tx SlowpokeName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db SLOWPOKE2 db 50 ; hp db BASIC ; stage @@ -7320,11 +7323,11 @@ Slowpoke2Card: ; 33132 (c:7132) db 16 SlowbroCard: ; 33173 (c:7173) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx SlowbroCardGfx ; gfx tx SlowbroName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db SLOWBRO db 60 ; hp db STAGE1 ; stage @@ -7371,11 +7374,11 @@ SlowbroCard: ; 33173 (c:7173) db 1 Gastly1Card: ; 331b4 (c:71b4) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Gastly1CardGfx ; gfx tx GastlyName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db GASTLY1 db 30 ; hp db BASIC ; stage @@ -7422,11 +7425,11 @@ Gastly1Card: ; 331b4 (c:71b4) db 16 Gastly2Card: ; 331f5 (c:71f5) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Gastly2CardGfx ; gfx tx GastlyName ; name db DIAMOND ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db GASTLY2 db 50 ; hp db BASIC ; stage @@ -7473,11 +7476,11 @@ Gastly2Card: ; 331f5 (c:71f5) db 19 Haunter1Card: ; 33236 (c:7236) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Haunter1CardGfx ; gfx tx HaunterName ; name db STAR ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db HAUNTER1 db 50 ; hp db STAGE1 ; stage @@ -7524,11 +7527,11 @@ Haunter1Card: ; 33236 (c:7236) db 16 Haunter2Card: ; 33277 (c:7277) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Haunter2CardGfx ; gfx tx HaunterName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db HAUNTER2 db 60 ; hp db STAGE1 ; stage @@ -7575,11 +7578,11 @@ Haunter2Card: ; 33277 (c:7277) db 16 GengarCard: ; 332b8 (c:72b8) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx GengarCardGfx ; gfx tx GengarName ; name db STAR ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db GENGAR db 80 ; hp db STAGE2 ; stage @@ -7626,11 +7629,11 @@ GengarCard: ; 332b8 (c:72b8) db 1 DrowzeeCard: ; 332f9 (c:72f9) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx DrowzeeCardGfx ; gfx tx DrowzeeName ; name db CIRCLE ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db DROWZEE db 50 ; hp db BASIC ; stage @@ -7677,11 +7680,11 @@ DrowzeeCard: ; 332f9 (c:72f9) db 19 HypnoCard: ; 3333a (c:733a) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx HypnoCardGfx ; gfx tx HypnoName ; name db STAR ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db HYPNO db 90 ; hp db STAGE1 ; stage @@ -7728,11 +7731,11 @@ HypnoCard: ; 3333a (c:733a) db 0 MrMimeCard: ; 3337b (c:737b) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx MrMimeCardGfx ; gfx tx MrMimeName ; name db STAR ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db MR_MIME db 40 ; hp db BASIC ; stage @@ -7779,11 +7782,11 @@ MrMimeCard: ; 3337b (c:737b) db 3 JynxCard: ; 333bc (c:73bc) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx JynxCardGfx ; gfx tx JynxName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db JYNX db 70 ; hp db BASIC ; stage @@ -7830,11 +7833,11 @@ JynxCard: ; 333bc (c:73bc) db 0 Mewtwo1Card: ; 333fd (c:73fd) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Mewtwo1CardGfx ; gfx tx MewtwoName ; name db STAR ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db MEWTWO1 db 60 ; hp db BASIC ; stage @@ -7881,11 +7884,11 @@ Mewtwo1Card: ; 333fd (c:73fd) db 0 Mewtwo2Card: ; 3343e (c:743e) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Mewtwo2CardGfx ; gfx tx MewtwoName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db MEWTWO2 db 70 ; hp db BASIC ; stage @@ -7932,11 +7935,11 @@ Mewtwo2Card: ; 3343e (c:743e) db 0 Mewtwo3Card: ; 3347f (c:747f) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Mewtwo3CardGfx ; gfx tx MewtwoName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db MEWTWO3 db 70 ; hp db BASIC ; stage @@ -7983,11 +7986,11 @@ Mewtwo3Card: ; 3347f (c:747f) db 0 Mew1Card: ; 334c0 (c:74c0) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Mew1CardGfx ; gfx tx MewName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db MEW1 db 40 ; hp db BASIC ; stage @@ -8034,11 +8037,11 @@ Mew1Card: ; 334c0 (c:74c0) db 3 Mew2Card: ; 33501 (c:7501) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Mew2CardGfx ; gfx tx MewName ; name db STAR ; rarity - db PROMOTIONAL | GB ; set + db PROMOTIONAL | GB ; sets db MEW2 db 50 ; hp db BASIC ; stage @@ -8085,11 +8088,11 @@ Mew2Card: ; 33501 (c:7501) db 0 Mew3Card: ; 33542 (c:7542) - db PSYCHIC ; type + db TYPE_PKMN_PSYCHIC ; type gfx Mew3CardGfx ; gfx tx MewName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db MEW3 db 50 ; hp db BASIC ; stage @@ -8136,11 +8139,11 @@ Mew3Card: ; 33542 (c:7542) db 8 PidgeyCard: ; 33583 (c:7583) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx PidgeyCardGfx ; gfx tx PidgeyName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db PIDGEY db 40 ; hp db BASIC ; stage @@ -8187,11 +8190,11 @@ PidgeyCard: ; 33583 (c:7583) db 18 PidgeottoCard: ; 335c4 (c:75c4) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx PidgeottoCardGfx ; gfx tx PidgeottoName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db PIDGEOTTO db 60 ; hp db STAGE1 ; stage @@ -8238,11 +8241,11 @@ PidgeottoCard: ; 335c4 (c:75c4) db 16 Pidgeot1Card: ; 33605 (c:7605) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Pidgeot1CardGfx ; gfx tx PidgeotName ; name db STAR ; rarity - db LABORATORY | GB ; set + db LABORATORY | GB ; sets db PIDGEOT1 db 80 ; hp db STAGE2 ; stage @@ -8289,11 +8292,11 @@ Pidgeot1Card: ; 33605 (c:7605) db 0 Pidgeot2Card: ; 33646 (c:7646) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Pidgeot2CardGfx ; gfx tx PidgeotName ; name db STAR ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db PIDGEOT2 db 80 ; hp db STAGE2 ; stage @@ -8340,11 +8343,11 @@ Pidgeot2Card: ; 33646 (c:7646) db 0 RattataCard: ; 33687 (c:7687) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx RattataCardGfx ; gfx tx RattataName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db RATTATA db 30 ; hp db BASIC ; stage @@ -8391,11 +8394,11 @@ RattataCard: ; 33687 (c:7687) db 19 RaticateCard: ; 336c8 (c:76c8) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx RaticateCardGfx ; gfx tx RaticateName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db RATICATE db 60 ; hp db STAGE1 ; stage @@ -8442,11 +8445,11 @@ RaticateCard: ; 336c8 (c:76c8) db 3 SpearowCard: ; 33709 (c:7709) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx SpearowCardGfx ; gfx tx SpearowName ; name db CIRCLE ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db SPEAROW db 50 ; hp db BASIC ; stage @@ -8493,11 +8496,11 @@ SpearowCard: ; 33709 (c:7709) db 19 FearowCard: ; 3374a (c:774a) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx FearowCardGfx ; gfx tx FearowName ; name db DIAMOND ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db FEAROW db 70 ; hp db STAGE1 ; stage @@ -8544,11 +8547,11 @@ FearowCard: ; 3374a (c:774a) db 0 ClefairyCard: ; 3378b (c:778b) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx ClefairyCardGfx ; gfx tx ClefairyName ; name db STAR ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db CLEFAIRY db 40 ; hp db BASIC ; stage @@ -8595,11 +8598,11 @@ ClefairyCard: ; 3378b (c:778b) db 18 ClefableCard: ; 337cc (c:77cc) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx ClefableCardGfx ; gfx tx ClefableName ; name db STAR ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db CLEFABLE db 70 ; hp db STAGE1 ; stage @@ -8646,11 +8649,11 @@ ClefableCard: ; 337cc (c:77cc) db 0 Jigglypuff1Card: ; 3380d (c:780d) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Jigglypuff1CardGfx ; gfx tx JigglypuffName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db JIGGLYPUFF1 db 50 ; hp db BASIC ; stage @@ -8697,11 +8700,11 @@ Jigglypuff1Card: ; 3380d (c:780d) db 16 Jigglypuff2Card: ; 3384e (c:784e) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Jigglypuff2CardGfx ; gfx tx JigglypuffName ; name db CIRCLE ; rarity - db EVOLUTION | GB ; set + db EVOLUTION | GB ; sets db JIGGLYPUFF2 db 50 ; hp db BASIC ; stage @@ -8748,11 +8751,11 @@ Jigglypuff2Card: ; 3384e (c:784e) db 16 Jigglypuff3Card: ; 3388f (c:788f) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Jigglypuff3CardGfx ; gfx tx JigglypuffName ; name db CIRCLE ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db JIGGLYPUFF3 db 60 ; hp db BASIC ; stage @@ -8799,11 +8802,11 @@ Jigglypuff3Card: ; 3388f (c:788f) db 16 WigglytuffCard: ; 338d0 (c:78d0) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx WigglytuffCardGfx ; gfx tx WigglytuffName ; name db STAR ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db WIGGLYTUFF db 80 ; hp db STAGE1 ; stage @@ -8850,11 +8853,11 @@ WigglytuffCard: ; 338d0 (c:78d0) db 0 Meowth1Card: ; 33911 (c:7911) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Meowth1CardGfx ; gfx tx MeowthName ; name db CIRCLE ; rarity - db COLOSSEUM | GB ; set + db COLOSSEUM | GB ; sets db MEOWTH1 db 50 ; hp db BASIC ; stage @@ -8901,11 +8904,11 @@ Meowth1Card: ; 33911 (c:7911) db 16 Meowth2Card: ; 33952 (c:7952) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Meowth2CardGfx ; gfx tx MeowthName ; name db CIRCLE ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db MEOWTH2 db 50 ; hp db BASIC ; stage @@ -8952,11 +8955,11 @@ Meowth2Card: ; 33952 (c:7952) db 16 PersianCard: ; 33993 (c:7993) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx PersianCardGfx ; gfx tx PersianName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db PERSIAN db 70 ; hp db STAGE1 ; stage @@ -9003,11 +9006,11 @@ PersianCard: ; 33993 (c:7993) db 0 FarfetchdCard: ; 339d4 (c:79d4) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx FarfetchdCardGfx ; gfx tx FarfetchdName ; name db DIAMOND ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db FARFETCHD db 50 ; hp db BASIC ; stage @@ -9054,11 +9057,11 @@ FarfetchdCard: ; 339d4 (c:79d4) db 3 DoduoCard: ; 33a15 (c:7a15) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx DoduoCardGfx ; gfx tx DoduoName ; name db CIRCLE ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db DODUO db 50 ; hp db BASIC ; stage @@ -9105,11 +9108,11 @@ DoduoCard: ; 33a15 (c:7a15) db 19 DodrioCard: ; 33a56 (c:7a56) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx DodrioCardGfx ; gfx tx DodrioName ; name db DIAMOND ; rarity - db LABORATORY | JUNGLE ; set + db LABORATORY | JUNGLE ; sets db DODRIO db 70 ; hp db STAGE1 ; stage @@ -9156,11 +9159,11 @@ DodrioCard: ; 33a56 (c:7a56) db 1 LickitungCard: ; 33a97 (c:7a97) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx LickitungCardGfx ; gfx tx LickitungName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db LICKITUNG db 90 ; hp db BASIC ; stage @@ -9207,11 +9210,11 @@ LickitungCard: ; 33a97 (c:7a97) db 0 ChanseyCard: ; 33ad8 (c:7ad8) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx ChanseyCardGfx ; gfx tx ChanseyName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db CHANSEY db 120 ; hp db BASIC ; stage @@ -9258,11 +9261,11 @@ ChanseyCard: ; 33ad8 (c:7ad8) db 8 KangaskhanCard: ; 33b19 (c:7b19) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx KangaskhanCardGfx ; gfx tx KangaskhanName ; name db STAR ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db KANGASKHAN db 90 ; hp db BASIC ; stage @@ -9309,11 +9312,11 @@ KangaskhanCard: ; 33b19 (c:7b19) db 0 TaurosCard: ; 33b5a (c:7b5a) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx TaurosCardGfx ; gfx tx TaurosName ; name db DIAMOND ; rarity - db MYSTERY | JUNGLE ; set + db MYSTERY | JUNGLE ; sets db TAUROS db 60 ; hp db BASIC ; stage @@ -9360,11 +9363,11 @@ TaurosCard: ; 33b5a (c:7b5a) db 0 DittoCard: ; 33b9b (c:7b9b) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx DittoCardGfx ; gfx tx DittoName ; name db STAR ; rarity - db LABORATORY | GB ; set + db LABORATORY | GB ; sets db DITTO db 50 ; hp db BASIC ; stage @@ -9411,11 +9414,11 @@ DittoCard: ; 33b9b (c:7b9b) db 0 EeveeCard: ; 33bdc (c:7bdc) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx EeveeCardGfx ; gfx tx EeveeName ; name db CIRCLE ; rarity - db EVOLUTION | JUNGLE ; set + db EVOLUTION | JUNGLE ; sets db EEVEE db 50 ; hp db BASIC ; stage @@ -9462,11 +9465,11 @@ EeveeCard: ; 33bdc (c:7bdc) db 17 PorygonCard: ; 33c1d (c:7c1d) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx PorygonCardGfx ; gfx tx PorygonName ; name db DIAMOND ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db PORYGON db 30 ; hp db BASIC ; stage @@ -9513,11 +9516,11 @@ PorygonCard: ; 33c1d (c:7c1d) db 0 SnorlaxCard: ; 33c5e (c:7c5e) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx SnorlaxCardGfx ; gfx tx SnorlaxName ; name db STAR ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db SNORLAX db 90 ; hp db BASIC ; stage @@ -9564,11 +9567,11 @@ SnorlaxCard: ; 33c5e (c:7c5e) db 0 DratiniCard: ; 33c9f (c:7c9f) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx DratiniCardGfx ; gfx tx DratiniName ; name db DIAMOND ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db DRATINI db 40 ; hp db BASIC ; stage @@ -9615,11 +9618,11 @@ DratiniCard: ; 33c9f (c:7c9f) db 18 DragonairCard: ; 33ce0 (c:7ce0) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx DragonairCardGfx ; gfx tx DragonairName ; name db STAR ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db DRAGONAIR db 80 ; hp db STAGE1 ; stage @@ -9666,11 +9669,11 @@ DragonairCard: ; 33ce0 (c:7ce0) db 16 Dragonite1Card: ; 33d21 (c:7d21) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Dragonite1CardGfx ; gfx tx DragoniteName ; name db STAR ; rarity - db PROMOTIONAL | GB ; set + db PROMOTIONAL | GB ; sets db DRAGONITE1 db 100 ; hp db STAGE2 ; stage @@ -9717,11 +9720,11 @@ Dragonite1Card: ; 33d21 (c:7d21) db 0 Dragonite2Card: ; 33d62 (c:7d62) - db COLORLESS ; type + db TYPE_PKMN_COLORLESS ; type gfx Dragonite2CardGfx ; gfx tx DragoniteName ; name db STAR ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db DRAGONITE2 db 100 ; hp db STAGE2 ; stage @@ -9768,456 +9771,456 @@ Dragonite2Card: ; 33d62 (c:7d62) db 0 GrassEnergyCard: ; 33da3 (c:7da3) - db GRASS_ENERGY_CARD ; type + db TYPE_ENERGY_GRASS ; type gfx GrassEnergyCardGfx ; gfx tx GrassEnergyName ; name db CIRCLE ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db GRASS_ENERGY dw GrassEnergyEffectCommands ; effect commands tx GrassEnergyDescription ; description dw NONE ; description (cont) FireEnergyCard: ; 33db1 (c:7db1) - db FIRE_ENERGY_CARD ; type + db TYPE_ENERGY_FIRE ; type gfx FireEnergyCardGfx ; gfx tx FireEnergyName ; name db CIRCLE ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db FIRE_ENERGY dw FireEnergyEffectCommands ; effect commands tx FireEnergyDescription ; description dw NONE ; description (cont) WaterEnergyCard: ; 33dbf (c:7dbf) - db WATER_ENERGY_CARD ; type + db TYPE_ENERGY_WATER ; type gfx WaterEnergyCardGfx ; gfx tx WaterEnergyName ; name db CIRCLE ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db WATER_ENERGY dw WaterEnergyEffectCommands ; effect commands tx WaterEnergyDescription ; description dw NONE ; description (cont) LightningEnergyCard: ; 33dcd (c:7dcd) - db LIGHTNING_ENERGY_CARD ; type + db TYPE_ENERGY_LIGHTNING ; type gfx LightningEnergyCardGfx ; gfx tx LightningEnergyName ; name db CIRCLE ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db LIGHTNING_ENERGY dw LightningEnergyEffectCommands ; effect commands tx LightningEnergyDescription ; description dw NONE ; description (cont) FightingEnergyCard: ; 33ddb (c:7ddb) - db FIGHTING_ENERGY_CARD ; type + db TYPE_ENERGY_FIGHTING ; type gfx FightingEnergyCardGfx ; gfx tx FightingEnergyName ; name db CIRCLE ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db FIGHTING_ENERGY dw FightingEnergyEffectCommands ; effect commands tx FightingEnergyDescription ; description dw NONE ; description (cont) PsychicEnergyCard: ; 33de9 (c:7de9) - db PSYCHIC_ENERGY_CARD ; type + db TYPE_ENERGY_PSYCHIC ; type gfx PsychicEnergyCardGfx ; gfx tx PsychicEnergyName ; name db CIRCLE ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db PSYCHIC_ENERGY dw PsychicEnergyEffectCommands ; effect commands tx PsychicEnergyDescription ; description dw NONE ; description (cont) DoubleColorlessEnergyCard: ; 33df7 (c:7df7) - db DOUBLE_COLORLESS_ENERGY_CARD ; type + db TYPE_ENERGY_DOUBLE_COLORLESS ; type gfx DoubleColorlessEnergyCardGfx ; gfx tx DoubleColorlessEnergyName ; name db DIAMOND ; rarity - db ENERGY | NONE ; set + db ENERGY | NONE ; sets db DOUBLE_COLORLESS_ENERGY dw DoubleColorlessEnergyEffectCommands ; effect commands tx DoubleColorlessEnergyDescription ; description dw NONE ; description (cont) ProfessorOakCard: ; 33e05 (c:7e05) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ProfessorOakCardGfx ; gfx tx ProfessorOakName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db PROFESSOR_OAK dw ProfessorOakEffectCommands ; effect commands tx ProfessorOakDescription ; description dw NONE ; description (cont) ImposterProfessorOakCard: ; 33e13 (c:7e13) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ImposterProfessorOakCardGfx ; gfx tx ImposterProfessorOakName ; name db STAR ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db IMPOSTER_PROFESSOR_OAK dw ImposterProfessorOakEffectCommands ; effect commands tx ImposterProfessorOakDescription ; description dw NONE ; description (cont) BillCard: ; 33e21 (c:7e21) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx BillCardGfx ; gfx tx BillName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db BILL dw BillEffectCommands ; effect commands tx BillDescription ; description dw NONE ; description (cont) MrFujiCard: ; 33e2f (c:7e2f) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx MrFujiCardGfx ; gfx tx MrFujiName ; name db DIAMOND ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db MR_FUJI dw MrFujiEffectCommands ; effect commands tx MrFujiDescription ; description dw NONE ; description (cont) LassCard: ; 33e3d (c:7e3d) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx LassCardGfx ; gfx tx LassName ; name db STAR ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db LASS dw LassEffectCommands ; effect commands tx LassDescription ; description dw NONE ; description (cont) ImakuniCard: ; 33e4b (c:7e4b) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ImakuniCardGfx ; gfx tx ImakuniName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db IMAKUNI_CARD dw ImakuniEffectCommands ; effect commands tx ImakuniDescription ; description dw NONE ; description (cont) PokemonTraderCard: ; 33e59 (c:7e59) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PokemonTraderCardGfx ; gfx tx PokemonTraderName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db POKEMON_TRADER dw PokemonTraderEffectCommands ; effect commands tx PokemonTraderDescription ; description dw NONE ; description (cont) PokemonBreederCard: ; 33e67 (c:7e67) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PokemonBreederCardGfx ; gfx tx PokemonBreederName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db POKEMON_BREEDER dw PokemonBreederEffectCommands ; effect commands tx PokemonBreederDescription ; description dw NONE ; description (cont) ClefairyDollCard: ; 33e75 (c:7e75) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ClefairyDollCardGfx ; gfx tx ClefairyDollName ; name db STAR ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db CLEFAIRY_DOLL dw ClefairyDollEffectCommands ; effect commands tx ClefairyDollDescription ; description tx ClefairyDollDescriptionCont ; description (cont) MysteriousFossilCard: ; 33e83 (c:7e83) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx MysteriousFossilCardGfx ; gfx tx MysteriousFossilName ; name db CIRCLE ; rarity - db MYSTERY | FOSSIL ; set + db MYSTERY | FOSSIL ; sets db MYSTERIOUS_FOSSIL dw MysteriousFossilEffectCommands ; effect commands tx MysteriousFossilDescription ; description tx MysteriousFossilDescriptionCont ; description (cont) EnergyRetrievalCard: ; 33e91 (c:7e91) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx EnergyRetrievalCardGfx ; gfx tx EnergyRetrievalName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db ENERGY_RETRIEVAL dw EnergyRetrievalEffectCommands ; effect commands tx EnergyRetrievalDescription ; description dw NONE ; description (cont) SuperEnergyRetrievalCard: ; 33e9f (c:7e9f) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx SuperEnergyRetrievalCardGfx ; gfx tx SuperEnergyRetrievalName ; name db PROMOSTAR ; rarity - db PROMOTIONAL | PRO ; set + db PROMOTIONAL | PRO ; sets db SUPER_ENERGY_RETRIEVAL dw SuperEnergyRetrievalEffectCommands ; effect commands tx SuperEnergyRetrievalDescription ; description dw NONE ; description (cont) EnergySearchCard: ; 33ead (c:7ead) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx EnergySearchCardGfx ; gfx tx EnergySearchName ; name db CIRCLE ; rarity - db EVOLUTION | FOSSIL ; set + db EVOLUTION | FOSSIL ; sets db ENERGY_SEARCH dw EnergySearchEffectCommands ; effect commands tx EnergySearchDescription ; description dw NONE ; description (cont) EnergyRemovalCard: ; 33ebb (c:7ebb) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx EnergyRemovalCardGfx ; gfx tx EnergyRemovalName ; name db CIRCLE ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db ENERGY_REMOVAL dw EnergyRemovalEffectCommands ; effect commands tx EnergyRemovalDescription ; description dw NONE ; description (cont) SuperEnergyRemovalCard: ; 33ec9 (c:7ec9) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx SuperEnergyRemovalCardGfx ; gfx tx SuperEnergyRemovalName ; name db STAR ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db SUPER_ENERGY_REMOVAL dw SuperEnergyRemovalEffectCommands ; effect commands tx SuperEnergyRemovalDescription ; description dw NONE ; description (cont) SwitchCard: ; 33ed7 (c:7ed7) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx SwitchCardGfx ; gfx tx SwitchName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db SWITCH dw SwitchEffectCommands ; effect commands tx SwitchDescription ; description dw NONE ; description (cont) PokemonCenterCard: ; 33ee5 (c:7ee5) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PokemonCenterCardGfx ; gfx tx PokemonCenterName ; name db DIAMOND ; rarity - db MYSTERY | NONE ; set + db MYSTERY | NONE ; sets db POKEMON_CENTER dw PokemonCenterEffectCommands ; effect commands tx PokemonCenterDescription ; description dw NONE ; description (cont) PokeBallCard: ; 33ef3 (c:7ef3) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PokeBallCardGfx ; gfx tx PokeBallName ; name db CIRCLE ; rarity - db COLOSSEUM | JUNGLE ; set + db COLOSSEUM | JUNGLE ; sets db POKE_BALL dw PokeBallEffectCommands ; effect commands tx PokeBallDescription ; description dw NONE ; description (cont) ScoopUpCard: ; 33f01 (c:7f01) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ScoopUpCardGfx ; gfx tx ScoopUpName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db SCOOP_UP dw ScoopUpEffectCommands ; effect commands tx ScoopUpDescription ; description dw NONE ; description (cont) ComputerSearchCard: ; 33f0f (c:7f0f) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ComputerSearchCardGfx ; gfx tx ComputerSearchName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db COMPUTER_SEARCH dw ComputerSearchEffectCommands ; effect commands tx ComputerSearchDescription ; description dw NONE ; description (cont) PokedexCard: ; 33f1d (c:7f1d) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PokedexCardGfx ; gfx tx PokedexName ; name db DIAMOND ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db POKEDEX dw PokedexEffectCommands ; effect commands tx PokedexDescription ; description dw NONE ; description (cont) PlusPowerCard: ; 33f2b (c:7f2b) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PlusPowerCardGfx ; gfx tx PlusPowerName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db PLUSPOWER dw PlusPowerEffectCommands ; effect commands tx PlusPowerDescription ; description dw NONE ; description (cont) DefenderCard: ; 33f39 (c:7f39) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx DefenderCardGfx ; gfx tx DefenderName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db DEFENDER dw DefenderEffectCommands ; effect commands tx DefenderDescription ; description dw NONE ; description (cont) ItemFinderCard: ; 33f47 (c:7f47) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ItemFinderCardGfx ; gfx tx ItemFinderName ; name db STAR ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db ITEM_FINDER dw ItemFinderEffectCommands ; effect commands tx ItemFinderDescription ; description dw NONE ; description (cont) GustofWindCard: ; 33f55 (c:7f55) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx GustofWindCardGfx ; gfx tx GustofWindName ; name db CIRCLE ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db GUST_OF_WIND dw GustofWindEffectCommands ; effect commands tx GustofWindDescription ; description dw NONE ; description (cont) DevolutionSprayCard: ; 33f63 (c:7f63) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx DevolutionSprayCardGfx ; gfx tx DevolutionSprayName ; name db STAR ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db DEVOLUTION_SPRAY dw DevolutionSprayEffectCommands ; effect commands tx DevolutionSprayDescription ; description tx DevolutionSprayDescriptionCont ; description (cont) PotionCard: ; 33f71 (c:7f71) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PotionCardGfx ; gfx tx PotionName ; name db CIRCLE ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db POTION dw PotionEffectCommands ; effect commands tx PotionDescription ; description dw NONE ; description (cont) SuperPotionCard: ; 33f7f (c:7f7f) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx SuperPotionCardGfx ; gfx tx SuperPotionName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db SUPER_POTION dw SuperPotionEffectCommands ; effect commands tx SuperPotionDescription ; description dw NONE ; description (cont) FullHealCard: ; 33f8d (c:7f8d) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx FullHealCardGfx ; gfx tx FullHealName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db FULL_HEAL dw FullHealEffectCommands ; effect commands tx FullHealDescription ; description dw NONE ; description (cont) ReviveCard: ; 33f9b (c:7f9b) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx ReviveCardGfx ; gfx tx ReviveName ; name db DIAMOND ; rarity - db COLOSSEUM | NONE ; set + db COLOSSEUM | NONE ; sets db REVIVE dw ReviveEffectCommands ; effect commands tx ReviveDescription ; description dw NONE ; description (cont) MaintenanceCard: ; 33fa9 (c:7fa9) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx MaintenanceCardGfx ; gfx tx MaintenanceName ; name db DIAMOND ; rarity - db LABORATORY | NONE ; set + db LABORATORY | NONE ; sets db MAINTENANCE dw MaintenanceEffectCommands ; effect commands tx MaintenanceDescription ; description dw NONE ; description (cont) PokemonFluteCard: ; 33fb7 (c:7fb7) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx PokemonFluteCardGfx ; gfx tx PokemonFluteName ; name db DIAMOND ; rarity - db EVOLUTION | NONE ; set + db EVOLUTION | NONE ; sets db POKEMON_FLUTE dw PokemonFluteEffectCommands ; effect commands tx PokemonFluteDescription ; description dw NONE ; description (cont) GamblerCard: ; 33fc5 (c:7fc5) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx GamblerCardGfx ; gfx tx GamblerName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db GAMBLER dw GamblerEffectCommands ; effect commands tx GamblerDescription ; description dw NONE ; description (cont) RecycleCard: ; 33fd3 (c:7fd3) - db TRAINER_CARD ; type + db TYPE_TRAINER ; type gfx RecycleCardGfx ; gfx tx RecycleName ; name db CIRCLE ; rarity - db LABORATORY | FOSSIL ; set + db LABORATORY | FOSSIL ; sets db RECYCLE dw RecycleEffectCommands ; effect commands tx RecycleDescription ; description dw NONE ; description (cont) rept $1f -db $ff + db $ff endr diff --git a/src/data/decks.asm b/src/data/decks.asm index 78b549d..129b6d9 100755 --- a/src/data/decks.asm +++ b/src/data/decks.asm @@ -76,7 +76,7 @@ UnnamedDeck: ; 30070 (c:4070) db 1, DEVOLUTION_SPRAY db 1, POTION db 1, SUPER_POTION - db 0 + db 0 ; end ; 30097 (c:4097) db 8, LIGHTNING_ENERGY @@ -92,7 +92,7 @@ UnnamedDeck: ; 30070 (c:4070) db 4, BULBASAUR db 4, IVYSAUR db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 300b2 (c:40b2) db 24, FIRE_ENERGY @@ -111,7 +111,7 @@ UnnamedDeck: ; 30070 (c:4070) db 1, POTION db 1, SUPER_POTION db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 300d3 (c:40d3) db 4, PSYCHIC_ENERGY @@ -129,7 +129,7 @@ UnnamedDeck: ; 30070 (c:4070) db 4, PIDGEOT2 db 4, JIGGLYPUFF2 db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 300f2 (c:40f2) db 10, PSYCHIC_ENERGY @@ -153,7 +153,7 @@ UnnamedDeck: ; 30070 (c:4070) db 1, PROFESSOR_OAK db 2, POKEMON_BREEDER db 2, BILL - db 0 + db 0 ; end ; 3011d (c:411d) db 10, PSYCHIC_ENERGY @@ -168,7 +168,7 @@ UnnamedDeck: ; 30070 (c:4070) db 4, HAUNTER1 db 4, GENGAR db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 30136 (c:4136) db 24, FIRE_ENERGY @@ -183,7 +183,7 @@ UnnamedDeck: ; 30070 (c:4070) db 2, SCOOP_UP db 1, POTION db 1, SUPER_POTION - db 0 + db 0 ; end ; 3014f (c:414f) db 20, PSYCHIC_ENERGY @@ -197,7 +197,7 @@ UnnamedDeck: ; 30070 (c:4070) db 4, GENGAR db 4, MEW3 db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 30166 (c:4166) db 24, PSYCHIC_ENERGY @@ -210,7 +210,7 @@ UnnamedDeck: ; 30070 (c:4070) db 4, PORYGON db 4, VENONAT db 4, VENOMOTH - db 0 + db 0 ; end ; 3017b (c:417b) db 24, PSYCHIC_ENERGY @@ -225,7 +225,7 @@ UnnamedDeck: ; 30070 (c:4070) db 2, SCOOP_UP db 1, POTION db 1, SUPER_POTION - db 0 + db 0 ; end ; 30194 (c:4194) db 24, PSYCHIC_ENERGY @@ -241,7 +241,7 @@ UnnamedDeck: ; 30070 (c:4070) db 2, SCOOP_UP db 1, POTION db 1, SUPER_POTION - db 0 + db 0 ; end ; 301af (c:41af) db 12, LIGHTNING_ENERGY @@ -257,7 +257,7 @@ UnnamedDeck: ; 30070 (c:4070) db 4, PIKACHU1 db 4, PIKACHU2 db 4, RAICHU1 - db 0 + db 0 ; end ; 301ca (c:41ca) db 24, FIGHTING_ENERGY @@ -274,7 +274,7 @@ UnnamedDeck: ; 30070 (c:4070) db 2, SCOOP_UP db 1, POTION db 1, SUPER_POTION - db 0 + db 0 ; end UnnamedDeck2: ; 301e7 (c:41e7) db 4, FIRE_ENERGY @@ -294,7 +294,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 2, PROFESSOR_OAK db 2, GUST_OF_WIND db 2, DOUBLE_COLORLESS_ENERGY - db 0 + db 0 ; end ; 3020a (c:420a) db 4, FIRE_ENERGY @@ -312,7 +312,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 2, PROFESSOR_OAK db 2, GUST_OF_WIND db 2, DOUBLE_COLORLESS_ENERGY - db 0 + db 0 ; end ; 30229 (c:4229) db 4, PSYCHIC_ENERGY @@ -330,7 +330,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, PIDGEOT1 db 4, JIGGLYPUFF2 db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 30248 (c:4248) db 24, GRASS_ENERGY @@ -343,7 +343,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, JIGGLYPUFF3 db 4, WEEDLE db 4, AERODACTYL - db 0 + db 0 ; end ; 3025d (c:425d) db 8, LIGHTNING_ENERGY @@ -359,7 +359,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, BULBASAUR db 4, IVYSAUR db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 30278 (c:4278) db 24, FIRE_ENERGY @@ -372,7 +372,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, ARTICUNO2 db 4, VAPOREON1 db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 3028d (c:428d) db 20, GRASS_ENERGY @@ -386,7 +386,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, BULBASAUR db 4, IVYSAUR db 4, VENUSAUR2 - db 0 + db 0 ; end ; 302a4 (c:42a4) db 24, GRASS_ENERGY @@ -399,7 +399,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, PARAS db 4, JIGGLYPUFF3 db 4, WEEDLE - db 0 + db 0 ; end ; 302b9 (c:42b9) db 24, WATER_ENERGY @@ -412,7 +412,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, TENTACOOL db 4, AERODACTYL db 4, POKEMON_BREEDER - db 0 + db 0 ; end ; 302ce (c:42ce) db 24, WATER_ENERGY @@ -425,7 +425,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, MYSTERIOUS_FOSSIL db 4, AERODACTYL db 4, POTION - db 0 + db 0 ; end ; 302e3 (c:42e3) db 24, GRASS_ENERGY @@ -439,7 +439,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 3, PLUSPOWER db 2, PROFESSOR_OAK db 3, BILL - db 0 + db 0 ; end ; 302fa (c:42fa) db 12, LIGHTNING_ENERGY @@ -455,7 +455,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, PIKACHU1 db 4, PIKACHU2 db 4, RAICHU1 - db 0 + db 0 ; end ; 30315 (c:4315) db 4, RAICHU2 @@ -471,7 +471,7 @@ UnnamedDeck2: ; 301e7 (c:41e7) db 4, KINGLER db 4, KRABBY db 4, MAGIKARP - db 0 + db 0 ; end ; 30330 (c:4330) dw $4544 @@ -541,8 +541,7 @@ PracticePlayerDeck: ; 30344 (c:4344) db 1, RATICATE db 1, RATICATE db 1, ALAKAZAM - db 0 - + db 0 ; end tx PracticePlayerDeckName SamsPracticeDeck: ; 303b5 (c:43b5) @@ -602,8 +601,7 @@ SamsPracticeDeck: ; 303b5 (c:43b5) db 1, RATTATA db 1, EEVEE db 1, EEVEE - db 0 - + db 0 ; end tx SamsPracticeDeckName CharmanderAndFriendsDeck: ; 30428 (c:4428) @@ -636,8 +634,7 @@ CharmanderAndFriendsDeck: ; 30428 (c:4428) db 1, PLUSPOWER db 2, POTION db 2, FULL_HEAL - db 0 - + db 0 ; end tx CharmanderAndFriendsDeckName CharmanderExtraDeck: ; 30465 (c:4465) @@ -659,8 +656,7 @@ CharmanderExtraDeck: ; 30465 (c:4465) db 1, KADABRA db 1, GASTLY1 db 30, GRASS_ENERGY - db 0 - + db 0 ; end tx CharmanderExtraDeckName SquirtleAndFriendsDeck: ; 3048c (c:448c) @@ -696,8 +692,7 @@ SquirtleAndFriendsDeck: ; 3048c (c:448c) db 1, ITEM_FINDER db 1, POTION db 1, FULL_HEAL - db 0 - + db 0 ; end tx SquirtleAndFriendsDeckName SquirtleExtraDeck: ; 304cf (c:44cf) @@ -721,8 +716,7 @@ SquirtleExtraDeck: ; 304cf (c:44cf) db 1, MAGNETON1 db 1, ELECTABUZZ2 db 30, GRASS_ENERGY - db 0 - + db 0 ; end tx SquirtleExtraDeckName BulbasaurAndFriendsDeck: ; 304fa (c:44fa) @@ -757,8 +751,7 @@ BulbasaurAndFriendsDeck: ; 304fa (c:44fa) db 1, DEFENDER db 2, FULL_HEAL db 1, REVIVE - db 0 - + db 0 ; end tx BulbasaurAndFriendsDeckName BulbasaurExtraDeck: ; 3053b (c:453b) @@ -781,8 +774,7 @@ BulbasaurExtraDeck: ; 3053b (c:453b) db 2, POTION db 1, GUST_OF_WIND db 30, GRASS_ENERGY - db 0 - + db 0 ; end tx BulbasaurExtraDeckName LightningAndFireDeck: ; 30564 (c:4564) @@ -815,8 +807,7 @@ LightningAndFireDeck: ; 30564 (c:4564) db 2, PLUSPOWER db 2, DEFENDER db 1, POTION - db 0 - + db 0 ; end tx LightningAndFireDeckName WaterAndFightingDeck: ; 305a1 (c:45a1) @@ -845,8 +836,7 @@ WaterAndFightingDeck: ; 305a1 (c:45a1) db 2, ENERGY_SEARCH db 3, POTION db 2, FULL_HEAL - db 0 - + db 0 ; end tx WaterAndFightingDeckName GrassAndPsychicDeck: ; 305d6 (c:45d6) @@ -874,8 +864,7 @@ GrassAndPsychicDeck: ; 305d6 (c:45d6) db 2, GUST_OF_WIND db 2, POTION db 2, FULL_HEAL - db 0 - + db 0 ; end tx GrassAndPsychicDeckName LegendaryMoltresDeck: ; 30609 (c:4609) @@ -897,8 +886,7 @@ LegendaryMoltresDeck: ; 30609 (c:4609) db 2, SWITCH db 1, POTION db 1, SUPER_POTION - db 0 - + db 0 ; end tx LegendaryMoltresDeckName LegendaryZapdosDeck: ; 30630 (c:4630) @@ -917,8 +905,7 @@ LegendaryZapdosDeck: ; 30630 (c:4630) db 3, PLUSPOWER db 3, POTION db 1, GAMBLER - db 0 - + db 0 ; end tx LegendaryZapdosDeckName LegendaryArticunoDeck: ; 30651 (c:4651) @@ -936,8 +923,7 @@ LegendaryArticunoDeck: ; 30651 (c:4651) db 3, SWITCH db 4, SCOOP_UP db 1, GAMBLER - db 0 - + db 0 ; end tx LegendaryArticunoDeckName LegendaryDragoniteDeck: ; 30670 (c:4670) @@ -960,8 +946,7 @@ LegendaryDragoniteDeck: ; 30670 (c:4670) db 1, SUPER_ENERGY_RETRIEVAL db 2, SWITCH db 1, GAMBLER - db 0 - + db 0 ; end tx LegendaryDragoniteDeckName FirstStrikeDeck: ; 30699 (c:4699) @@ -979,8 +964,7 @@ FirstStrikeDeck: ; 30699 (c:4699) db 2, SWITCH db 3, GUST_OF_WIND db 4, BILL - db 0 - + db 0 ; end tx FirstStrikeDeckName RockCrusherDeck: ; 306b8 (c:46b8) @@ -1001,8 +985,7 @@ RockCrusherDeck: ; 306b8 (c:46b8) db 2, DEFENDER db 1, SUPER_POTION db 2, POTION - db 0 - + db 0 ; end tx RockCrusherDeckName GoGoRainDanceDeck: ; 306dd (c:46dd) @@ -1024,8 +1007,7 @@ GoGoRainDanceDeck: ; 306dd (c:46dd) db 2, SWITCH db 2, POTION db 1, GAMBLER - db 0 - + db 0 ; end tx GoGoRainDanceDeckName ZappingSelfdestructDeck: ; 30704 (c:4704) @@ -1044,8 +1026,7 @@ ZappingSelfdestructDeck: ; 30704 (c:4704) db 4, DEFENDER db 1, GUST_OF_WIND db 4, POTION - db 0 - + db 0 ; end tx ZappingSelfdestructDeckName FlowerPowerDeck: ; 30725 (c:4725) @@ -1065,8 +1046,7 @@ FlowerPowerDeck: ; 30725 (c:4725) db 2, ENERGY_RETRIEVAL db 2, SWITCH db 2, POTION - db 0 - + db 0 ; end tx FlowerPowerDeckName StrangePsyshockDeck: ; 30748 (c:4748) @@ -1085,8 +1065,7 @@ StrangePsyshockDeck: ; 30748 (c:4748) db 4, SCOOP_UP db 4, SWITCH db 1, GAMBLER - db 0 - + db 0 ; end tx StrangePsyshockDeckName WondersofScienceDeck: ; 30769 (c:4769) @@ -1109,8 +1088,7 @@ WondersofScienceDeck: ; 30769 (c:4769) db 2, POKEDEX db 2, MAINTENANCE db 2, FULL_HEAL - db 0 - + db 0 ; end tx WondersofScienceDeckName FireChargeDeck: ; 30792 (c:4792) @@ -1134,8 +1112,7 @@ FireChargeDeck: ; 30792 (c:4792) db 1, FULL_HEAL db 3, RECYCLE db 1, GAMBLER - db 0 - + db 0 ; end tx FireChargeDeckName ImRonaldDeck: ; 307bd (c:47bd) @@ -1160,8 +1137,7 @@ ImRonaldDeck: ; 307bd (c:47bd) db 1, PLUSPOWER db 1, DEFENDER db 2, GUST_OF_WIND - db 0 - + db 0 ; end tx ImRonaldDeckName PowerfulRonaldDeck: ; 307ea (c:47ea) @@ -1189,8 +1165,7 @@ PowerfulRonaldDeck: ; 307ea (c:47ea) db 2, GUST_OF_WIND db 1, FULL_HEAL db 1, GAMBLER - db 0 - + db 0 ; end tx PowerfulRonaldDeckName InvincibleRonaldDeck: ; 3081d (c:481d) @@ -1214,8 +1189,7 @@ InvincibleRonaldDeck: ; 3081d (c:481d) db 2, GUST_OF_WIND db 2, PLUSPOWER db 1, GAMBLER - db 0 - + db 0 ; end tx InvincibleRonaldDeckName LegendaryRonaldDeck: ; 30848 (c:4848) @@ -1239,8 +1213,7 @@ LegendaryRonaldDeck: ; 30848 (c:4848) db 3, ENERGY_REMOVAL db 3, SCOOP_UP db 1, GAMBLER - db 0 - + db 0 ; end tx LegendaryRonaldDeckName MusclesforBrainsDeck: ; 30873 (c:4873) @@ -1266,8 +1239,7 @@ MusclesforBrainsDeck: ; 30873 (c:4873) db 1, SUPER_POTION db 1, FULL_HEAL db 1, REVIVE - db 0 - + db 0 ; end tx MusclesforBrainsDeckName HeatedBattleDeck: ; 308a2 (c:48a2) @@ -1287,8 +1259,7 @@ HeatedBattleDeck: ; 308a2 (c:48a2) db 2, DEFENDER db 3, POTION db 2, FULL_HEAL - db 0 - + db 0 ; end tx HeatedBattleDeckName LovetoBattleDeck: ; 308c5 (c:48c5) @@ -1307,8 +1278,7 @@ LovetoBattleDeck: ; 308c5 (c:48c5) db 4, DEFENDER db 3, POTION db 2, FULL_HEAL - db 0 - + db 0 ; end tx LovetoBattleDeckName ExcavationDeck: ; 308e6 (c:48e6) @@ -1330,8 +1300,7 @@ ExcavationDeck: ; 308e6 (c:48e6) db 2, BILL db 2, POKEMON_BREEDER db 4, MYSTERIOUS_FOSSIL - db 0 - + db 0 ; end tx ExcavationDeckName BlisteringPokemonDeck: ; 3090d (c:490d) @@ -1355,8 +1324,7 @@ BlisteringPokemonDeck: ; 3090d (c:490d) db 3, SWITCH db 3, DEFENDER db 2, GUST_OF_WIND - db 0 - + db 0 ; end tx BlisteringPokemonDeckName HardPokemonDeck: ; 30938 (c:4938) @@ -1375,8 +1343,7 @@ HardPokemonDeck: ; 30938 (c:4938) db 4, DEFENDER db 3, GUST_OF_WIND db 2, POTION - db 0 - + db 0 ; end tx HardPokemonDeckName WaterfrontPokemonDeck: ; 30959 (c:4959) @@ -1406,8 +1373,7 @@ WaterfrontPokemonDeck: ; 30959 (c:4959) db 1, GUST_OF_WIND db 2, POTION db 1, SUPER_POTION - db 0 - + db 0 ; end tx WaterfrontPokemonDeckName LonelyFriendsDeck: ; 30990 (c:4990) @@ -1429,8 +1395,7 @@ LonelyFriendsDeck: ; 30990 (c:4990) db 2, SCOOP_UP db 4, POTION db 1, SUPER_POTION - db 0 - + db 0 ; end tx LonelyFriendsDeckName SoundoftheWavesDeck: ; 309b7 (c:49b7) @@ -1451,8 +1416,7 @@ SoundoftheWavesDeck: ; 309b7 (c:49b7) db 2, ENERGY_REMOVAL db 3, PLUSPOWER db 2, FULL_HEAL - db 0 - + db 0 ; end tx SoundoftheWavesDeckName PikachuDeck: ; 309dc (c:49dc) @@ -1473,8 +1437,7 @@ PikachuDeck: ; 309dc (c:49dc) db 4, POTION db 2, SUPER_POTION db 4, FULL_HEAL - db 0 - + db 0 ; end tx PikachuDeckName BoomBoomSelfdestructDeck: ; 30a01 (c:4a01) @@ -1492,8 +1455,7 @@ BoomBoomSelfdestructDeck: ; 30a01 (c:4a01) db 2, PROFESSOR_OAK db 2, ENERGY_SEARCH db 2, DEFENDER - db 0 - + db 0 ; end tx BoomBoomSelfdestructDeckName PowerGeneratorDeck: ; 30a20 (c:4a20) @@ -1517,8 +1479,7 @@ PowerGeneratorDeck: ; 30a20 (c:4a20) db 2, POKEMON_TRADER db 2, SWITCH db 4, DEFENDER - db 0 - + db 0 ; end tx PowerGeneratorDeckName EtceteraDeck: ; 30a4b (c:4a4b) @@ -1546,8 +1507,7 @@ EtceteraDeck: ; 30a4b (c:4a4b) db 3, POKE_BALL db 3, PLUSPOWER db 2, DEFENDER - db 0 - + db 0 ; end tx EtceteraDeckName FlowerGardenDeck: ; 30a7e (c:4a7e) @@ -1571,8 +1531,7 @@ FlowerGardenDeck: ; 30a7e (c:4a7e) db 2, SWITCH db 2, POTION db 1, FULL_HEAL - db 0 - + db 0 ; end tx FlowerGardenDeckName KaleidoscopeDeck: ; 30aa9 (c:4aa9) @@ -1597,8 +1556,7 @@ KaleidoscopeDeck: ; 30aa9 (c:4aa9) db 2, ENERGY_SEARCH db 4, SWITCH db 2, GUST_OF_WIND - db 0 - + db 0 ; end tx KaleidoscopeDeckName GhostDeck: ; 30ad6 (c:4ad6) @@ -1621,8 +1579,7 @@ GhostDeck: ; 30ad6 (c:4ad6) db 2, POTION db 1, FULL_HEAL db 2, RECYCLE - db 0 - + db 0 ; end tx GhostDeckName NapTimeDeck: ; 30aff (c:4aff) @@ -1640,8 +1597,7 @@ NapTimeDeck: ; 30aff (c:4aff) db 3, PLUSPOWER db 2, GUST_OF_WIND db 2, POTION - db 0 - + db 0 ; end tx NapTimeDeckName StrangePowerDeck: ; 30b1e (c:4b1e) @@ -1665,8 +1621,7 @@ StrangePowerDeck: ; 30b1e (c:4b1e) db 1, ITEM_FINDER db 1, GUST_OF_WIND db 1, FULL_HEAL - db 0 - + db 0 ; end tx StrangePowerDeckName FlyinPokemonDeck: ; 30b49 (c:4b49) @@ -1686,8 +1641,7 @@ FlyinPokemonDeck: ; 30b49 (c:4b49) db 2, LASS db 2, BILL db 4, POTION - db 0 - + db 0 ; end tx FlyinPokemonDeckName LovelyNidoranDeck: ; 30b6c (c:4b6c) @@ -1712,8 +1666,7 @@ LovelyNidoranDeck: ; 30b6c (c:4b6c) db 1, SWITCH db 2, POKE_BALL db 1, GAMBLER - db 0 - + db 0 ; end tx LovelyNidoranDeckName PoisonDeck: ; 30b99 (c:4b99) @@ -1734,8 +1687,7 @@ PoisonDeck: ; 30b99 (c:4b99) db 2, POTION db 2, FULL_HEAL db 1, GAMBLER - db 0 - + db 0 ; end tx PoisonDeckName AngerDeck: ; 30bbe (c:4bbe) @@ -1757,8 +1709,7 @@ AngerDeck: ; 30bbe (c:4bbe) db 4, PLUSPOWER db 2, DEFENDER db 2, GUST_OF_WIND - db 0 - + db 0 ; end tx AngerDeckName FlamethrowerDeck: ; 30be5 (c:4be5) @@ -1781,8 +1732,7 @@ FlamethrowerDeck: ; 30be5 (c:4be5) db 2, SWITCH db 2, PLUSPOWER db 3, GUST_OF_WIND - db 0 - + db 0 ; end tx FlamethrowerDeckName ReshuffleDeck: ; 30c0e (c:4c0e) @@ -1808,8 +1758,7 @@ ReshuffleDeck: ; 30c0e (c:4c0e) db 2, SWITCH db 1, POKEMON_CENTER db 2, POTION - db 0 - + db 0 ; end tx ReshuffleDeckName ImakuniDeck: ; 30c3d (c:4c3d) @@ -1827,6 +1776,5 @@ ImakuniDeck: ; 30c3d (c:4c3d) db 2, MAINTENANCE db 2, POKEMON_FLUTE db 1, GAMBLER - db 0 - + db 0 ; end tx ImakuniDeckName diff --git a/src/data/unknownNPCData.asm b/src/data/npcs.asm index 2786188..d7a3a61 100755..100644 --- a/src/data/unknownNPCData.asm +++ b/src/data/npcs.asm @@ -1,1513 +1,1513 @@ -; When you press the a button in front of something it will find a data entry somewhere on this list
-; it will then jump to the pointer in the data item. All jumps lead to an RST20 operation.
-PointerTable_118f5:
- dw Data_119dd
- dw Data_119dd
- dw Data_119ea
- dw Data_11a11
- dw Data_11a1e
- dw Data_119dd
- dw Data_119dd
- dw Data_11a2b
- dw Data_11a38
- dw Data_11a45
- dw Data_11a52
- dw Data_11a5f
- dw Data_11a6c
- dw Data_11a79
- dw Data_11a86
- dw Data_11a93
- dw Data_11aa0
- dw Data_11aad
- dw Data_11aba
- dw Data_11ac7
- dw Data_11ad4
- dw Data_11ae1
- dw Data_11aee
- dw Data_11afb
- dw Data_11b08
- dw Data_11b15
- dw Data_11b22
- dw Data_11b2f
- dw Data_11b3c
- dw Data_11b49
- dw Data_11b56
- dw SaraData
- dw AmandaData
- dw Data_11b7d
- dw Data_11b8a
- dw Data_11b97
- dw Data_11ba4
- dw Data_11bb1
- dw Data_11bbe
- dw Data_11bcb
- dw Data_11bd8
- dw Data_11be5
- dw Data_11bf2
- dw Data_11bff
- dw Data_11c0c
- dw Data_11c19
- dw Data_11c26
- dw Data_11c40
- dw Data_11c4d
- dw Data_11c5a
- dw Data_11c67
- dw Data_11c74
- dw Data_11c81
- dw Data_11c8e
- dw Data_11c9b
- dw Data_11ca8
- dw Data_11cb5
- dw Data_11cc2
- dw Data_11ccf
- dw Data_11cdc
- dw Data_11ce9
- dw Data_11cf6
- dw Data_11d03
- dw Data_11d10
- dw Data_11d1d
- dw Data_11d2a
- dw Data_11d37
- dw Data_11d44
- dw Data_11d51
- dw Data_11d5e
- dw Data_11d6b
- dw Data_11d78
- dw Data_11d85
- dw Data_11d92
- dw Data_11d9f
- dw Data_11dac
- dw Data_11db9
- dw Data_11dc6
- dw Data_11dd3
- dw Data_11de0
- dw Data_11ded
- dw Data_11dfa
- dw Data_11e07
- dw Data_11e14
- dw Data_11e21
- dw Data_11e2e
- dw Data_11e3b
- dw Data_11e48
- dw Data_11e55
- dw Data_11e62
- dw Data_11e6f
- dw Data_11e7c
- dw Data_11e89
- dw Data_11e96
- dw Data_11ea3
- dw Data_11eb0
- dw Data_11ebd
- dw Data_11eca
- dw Data_11ed7
- dw Data_11ee4
- dw Data_11ef1
- dw Data_11efe
- dw Data_11f0b
- dw Data_11f18
- dw Data_11f1f
- dw Data_11f26
- dw Data_11f2d
- dw Data_11f34
- dw Data_11f3b
- dw Data_11f42
- dw Data_11f49
- dw Data_11f49
- dw Data_11c33
- dw Data_119f7
- dw Data_11a04
- dw Data_11f49
-Data_119dd:
- db $01
- db $02
- db $00
- db $26
- db $00
- dw $5727 ; Pointer to NPC Data
- db $ac
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_119ea:
- db $02
- db $01
- db $04
- db $0e
- db $00
- dw $5c4b ; Pointer to NPC Data
- db $ad
- db $03
- db $02
- db $1a
- db $0f
- db $16
-Data_119f7:
- db $71
- db $01
- db $04
- db $0e
- db $00
- dw $5c4b ; Pointer to NPC Data
- db $ad
- db $03
- db $02
- db $1a
- db $0f
- db $16
-Data_11a04:
- db $72
- db $01
- db $04
- db $0e
- db $00
- dw $5c4b ; Pointer to NPC Data
- db $ad
- db $03
- db $02
- db $1a
- db $0f
- db $16
-Data_11a11:
- db $03
- db $03
- db $04
- db $22
- db $00
- dw $5b4a ; Pointer to NPC Data
- db $ae
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a1e:
- db $04
- db $04
- db $00
- db $0e
- db $00
- dw $5d0d ; Pointer to NPC Data
- db $af
- db $03
- db $04
- db $34
- db $10
- db $15
-Data_11a2b:
- db $07
- db $18
- db $00
- db $0e
- db $00
- dw $561d ; Pointer to NPC Data
- db $b1
- db $03
- db $03
- db $02
- db $02
- db $15
-Data_11a38:
- db $08
- db $18
- db $00
- db $0e
- db $00
- dw $5583 ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a45:
- db $09
- db $18
- db $00
- db $0e
- db $00
- dw $55ca ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a52:
- db $0a
- db $18
- db $00
- db $0e
- db $00
- dw $55d5 ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a5f:
- db $0b
- db $18
- db $00
- db $0e
- db $00
- dw $55e0 ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a6c:
- db $0c
- db $18
- db $00
- db $0e
- db $00
- dw $55f9 ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a79:
- db $0d
- db $18
- db $00
- db $0e
- db $00
- dw $58bb ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a86:
- db $0e
- db $21
- db $0a
- db $30
- db $00
- dw $5c64 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11a93:
- db $0f
- db $21
- db $0a
- db $30
- db $00
- dw $5ed1 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11aa0:
- db $10
- db $21
- db $0a
- db $30
- db $00
- dw $609e ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11aad:
- db $11
- db $21
- db $0a
- db $30
- db $00
- dw $6369 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11aba:
- db $12
- db $21
- db $0a
- db $30
- db $00
- dw $6566 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ac7:
- db $13
- db $21
- db $0a
- db $30
- db $00
- dw $684c ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ad4:
- db $14
- db $21
- db $0a
- db $30
- db $00
- dw $6b53 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ae1:
- db $15
- db $21
- db $0a
- db $30
- db $00
- dw $6d45 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11aee:
- db $16
- db $21
- db $0a
- db $30
- db $00
- dw $7025 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11afb:
- db $17
- db $15
- db $00
- db $26
- db $00
- dw $5ef2 ; Pointer to NPC Data
- db $b4
- db $03
- db $1d
- db $1c
- db $03
- db $15
-Data_11b08:
- db $18
- db $15
- db $00
- db $26
- db $00
- dw $6573 ; Pointer to NPC Data
- db $b5
- db $03
- db $1e
- db $1d
- db $03
- db $15
-Data_11b15:
- db $19
- db $1f
- db $04
- db $1a
- db $00
- dw $6d96 ; Pointer to NPC Data
- db $b6
- db $03
- db $27
- db $1e
- db $03
- db $15
-Data_11b22:
- db $1a
- db $0a
- db $00
- db $0e
- db $00
- dw $5dc3 ; Pointer to NPC Data
- db $b7
- db $03
- db $0a
- db $10
- db $03
- db $16
-Data_11b2f:
- db $1b
- db $15
- db $00
- db $16
- db $00
- dw $5f39 ; Pointer to NPC Data
- db $b8
- db $03
- db $1a
- db $21
- db $03
- db $15
-Data_11b3c:
- db $1c
- db $11
- db $00
- db $26
- db $00
- dw $5ff0 ; Pointer to NPC Data
- db $b9
- db $03
- db $1b
- db $1f
- db $03
- db $15
-Data_11b49:
- db $1d
- db $1a
- db $00
- db $16
- db $00
- dw $6017 ; Pointer to NPC Data
- db $ba
- db $03
- db $1c
- db $20
- db $03
- db $15
-Data_11b56:
- db $1e
- db $0b
- db $04
- db $1e
- db $00
- dw $603e ; Pointer to NPC Data
- db $bb
- db $03
- db $0b
- db $11
- db $03
- db $16
-SaraData:
- db SARA ; trainer id
- db $20
- db $00
- db $0e
- db $00
- dw OWSequence_Sara ; Pointer to NPC Data
- db $bc
- db $03
- db SARA_PIC ; battle profile picture
- db $22
- db $03
- db $15
-AmandaData:
- db AMANDA
- db $20
- db $00
- db $16
- db $00
- dw OWSequence_Amanda ; Pointer to NPC Data
- db $bd
- db $03
- db AMANDA_PIC
- db $23
- db $03
- db $15
-Data_11b7d:
- db $21
- db $16
- db $00
- db $26
- db $00
- dw OWSequence_Joshua ; Pointer to NPC Data
- db $be
- db $03
- db $17
- db $24
- db $03
- db $15
-Data_11b8a:
- db $22
- db $08
- db $08
- db $2e
- db $10
- dw $6304 ; Pointer to NPC Data
- db $bf
- db $03
- db $08
- db $12
- db $03
- db $16
-Data_11b97:
- db $23
- db $1c
- db $04
- db $0e
- db $00
- dw $6408 ; Pointer to NPC Data
- db $c0
- db $03
- db $26
- db $25
- db $03
- db $15
-Data_11ba4:
- db $24
- db $17
- db $04
- db $1e
- db $00
- dw $642f ; Pointer to NPC Data
- db $c1
- db $03
- db $18
- db $26
- db $03
- db $15
-Data_11bb1:
- db $25
- db $17
- db $04
- db $1e
- db $00
- dw $6456 ; Pointer to NPC Data
- db $c2
- db $03
- db $19
- db $27
- db $03
- db $15
-Data_11bbe:
- db $26
- db $09
- db $00
- db $16
- db $00
- dw $64ad ; Pointer to NPC Data
- db $c3
- db $03
- db $09
- db $13
- db $03
- db $16
-Data_11bcb:
- db $27
- db $1c
- db $04
- db $0e
- db $00
- dw $65d2 ; Pointer to NPC Data
- db $c4
- db $03
- db $21
- db $28
- db $03
- db $15
-Data_11bd8:
- db $28
- db $1e
- db $00
- db $1e
- db $00
- dw $6701 ; Pointer to NPC Data
- db $c5
- db $03
- db $22
- db $29
- db $03
- db $15
-Data_11be5:
- db $29
- db $1d
- db $04
- db $22
- db $00
- dw $6745 ; Pointer to NPC Data
- db $c6
- db $03
- db $23
- db $2a
- db $03
- db $15
-Data_11bf2:
- db $2a
- db $05
- db $00
- db $1a
- db $00
- dw $679e ; Pointer to NPC Data
- db $c7
- db $03
- db $05
- db $14
- db $03
- db $16
-Data_11bff:
- db $2b
- db $11
- db $04
- db $16
- db $00
- dw $6980 ; Pointer to NPC Data
- db $c8
- db $03
- db $20
- db $2b
- db $03
- db $15
-Data_11c0c:
- db $2c
- db $12
- db $04
- db $1a
- db $00
- dw $6a60 ; Pointer to NPC Data
- db $c9
- db $03
- db $1f
- db $2c
- db $03
- db $15
-Data_11c19:
- db $2d
- db $1c
- db $04
- db $0e
- db $00
- dw $6aa2 ; Pointer to NPC Data
- db $ca
- db $03
- db $28
- db $2d
- db $03
- db $15
-Data_11c26:
- db $2e
- db $0c
- db $00
- db $12
- db $00
- dw $6adf ; Pointer to NPC Data
- db $cb
- db $03
- db $0c
- db $15
- db $03
- db $16
-Data_11c33:
- db $70
- db $0c
- db $03
- db $15
- db $10
- dw $6adf ; Pointer to NPC Data
- db $cb
- db $03
- db $0c
- db $15
- db $03
- db $16
-Data_11c40:
- db $2f
- db $18
- db $00
- db $0e
- db $00
- dw $6cdb ; Pointer to NPC Data
- db $cc
- db $03
- db $11
- db $2e
- db $03
- db $15
-Data_11c4d:
- db $30
- db $18
- db $00
- db $0e
- db $00
- dw $6c11 ; Pointer to NPC Data
- db $cd
- db $03
- db $12
- db $2f
- db $03
- db $15
-Data_11c5a:
- db $31
- db $18
- db $00
- db $0e
- db $00
- dw $6c42 ; Pointer to NPC Data
- db $ce
- db $03
- db $13
- db $30
- db $03
- db $15
-Data_11c67:
- db $32
- db $06
- db $00
- db $0e
- db $00
- dw $6c67 ; Pointer to NPC Data
- db $cf
- db $03
- db $06
- db $16
- db $03
- db $16
-Data_11c74:
- db $33
- db $12
- db $04
- db $1a
- db $00
- dw $6eb3 ; Pointer to NPC Data
- db $d0
- db $03
- db $14
- db $31
- db $03
- db $15
-Data_11c81:
- db $34
- db $13
- db $00
- db $22
- db $00
- dw $6ed8 ; Pointer to NPC Data
- db $d1
- db $03
- db $15
- db $32
- db $03
- db $15
-Data_11c8e:
- db $35
- db $11
- db $04
- db $16
- db $00
- dw $6efd ; Pointer to NPC Data
- db $d2
- db $03
- db $16
- db $33
- db $03
- db $15
-Data_11c9b:
- db $36
- db $07
- db $04
- db $1e
- db $00
- dw $6f22 ; Pointer to NPC Data
- db $d3
- db $03
- db $07
- db $17
- db $03
- db $16
-Data_11ca8:
- db $37
- db $0d
- db $00
- db $12
- db $00
- dw $771f ; Pointer to NPC Data
- db $d4
- db $03
- db $0d
- db $0c
- db $04
- db $17
-Data_11cb5:
- db $38
- db $0e
- db $00
- db $2a
- db $00
- dw $772a ; Pointer to NPC Data
- db $d5
- db $03
- db $0e
- db $0d
- db $04
- db $17
-Data_11cc2:
- db $39
- db $0f
- db $00
- db $26
- db $00
- dw $7735 ; Pointer to NPC Data
- db $d6
- db $03
- db $0f
- db $0e
- db $04
- db $17
-Data_11ccf:
- db $3a
- db $10
- db $00
- db $0e
- db $00
- dw $7740 ; Pointer to NPC Data
- db $d7
- db $03
- db $10
- db $0f
- db $04
- db $17
-Data_11cdc:
- db $3b
- db $21
- db $0a
- db $30
- db $00
- dw $4c3e ; Pointer to NPC Data
- db $b0
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ce9:
- db $3c
- db $21
- db $0a
- db $30
- db $00
- dw $4c3e ; Pointer to NPC Data
- db $b0
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11cf6:
- db $3d
- db $1a
- db $00
- db $16
- db $00
- dw $5c76 ; Pointer to NPC Data
- db $d8
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d03:
- db $3e
- db $23
- db $04
- db $1e
- db $00
- dw $5f83 ; Pointer to NPC Data
- db $d9
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d10:
- db $3f
- db $19
- db $00
- db $1a
- db $00
- dw $5fc0 ; Pointer to NPC Data
- db $da
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d1d:
- db $40
- db $22
- db $00
- db $16
- db $00
- dw $60cf ; Pointer to NPC Data
- db $db
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d2a:
- db $41
- db $1e
- db $00
- db $1e
- db $00
- dw $6111 ; Pointer to NPC Data
- db $dc
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d37:
- db $42
- db $19
- db $00
- db $1a
- db $00
- dw $639a ; Pointer to NPC Data
- db $da
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d44:
- db $43
- db $1e
- db $00
- db $1e
- db $00
- dw $661f ; Pointer to NPC Data
- db $dc
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d51:
- db $44
- db $1b
- db $00
- db $22
- db $00
- dw $69a5 ; Pointer to NPC Data
- db $dd
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d5e:
- db $45
- db $12
- db $04
- db $1a
- db $00
- dw $6b84 ; Pointer to NPC Data
- db $de
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d6b:
- db $46
- db $11
- db $04
- db $16
- db $00
- dw $6e2c ; Pointer to NPC Data
- db $de
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d78:
- db $47
- db $19
- db $00
- db $1a
- db $00
- dw $6de8 ; Pointer to NPC Data
- db $da
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d85:
- db $48
- db $22
- db $00
- db $16
- db $00
- dw $7295 ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d92:
- db $49
- db $22
- db $00
- db $16
- db $00
- dw $726c ; Pointer to NPC Data
- db $b3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11d9f:
- db $4a
- db $22
- db $00
- db $16
- db $00
- dw $7352 ; Pointer to NPC Data
- db $df
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11dac:
- db $4b
- db $13
- db $00
- db $22
- db $00
- dw $5d82 ; Pointer to NPC Data
- db $e0
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11db9:
- db $4c
- db $14
- db $00
- db $16
- db $00
- dw $5d8d ; Pointer to NPC Data
- db $e1
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11dc6:
- db $4d
- db $24
- db $00
- db $16
- db $00
- dw $5d9f ; Pointer to NPC Data
- db $e5
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11dd3:
- db $4e
- db $1d
- db $04
- db $22
- db $00
- dw $5fd2 ; Pointer to NPC Data
- db $dc
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11de0:
- db $4f
- db $1a
- db $00
- db $16
- db $00
- dw $6137 ; Pointer to NPC Data
- db $d8
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ded:
- db $50
- db $1b
- db $00
- db $22
- db $00
- dw $613b ; Pointer to NPC Data
- db $dd
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11dfa:
- db $51
- db $1d
- db $04
- db $22
- db $00
- dw $63d9 ; Pointer to NPC Data
- db $dc
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e07:
- db $52
- db $17
- db $04
- db $1e
- db $00
- dw $63dd ; Pointer to NPC Data
- db $e2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e14:
- db $53
- db $24
- db $00
- db $16
- db $00
- dw $66d8 ; Pointer to NPC Data
- db $e5
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e21:
- db $54
- db $22
- db $00
- db $16
- db $00
- dw $66e3 ; Pointer to NPC Data
- db $db
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e2e:
- db $55
- db $12
- db $04
- db $1a
- db $00
- dw $6850 ; Pointer to NPC Data
- db $de
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e3b:
- db $56
- db $22
- db $00
- db $16
- db $00
- dw $6a30 ; Pointer to NPC Data
- db $db
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e48:
- db $57
- db $19
- db $00
- db $1a
- db $00
- dw $6a3b ; Pointer to NPC Data
- db $da
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e55:
- db $58
- db $1a
- db $00
- db $16
- db $00
- dw $6bc1 ; Pointer to NPC Data
- db $d8
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e62:
- db $59
- db $18
- db $00
- db $0e
- db $00
- dw $6bc5 ; Pointer to NPC Data
- db $e0
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e6f:
- db $5a
- db $13
- db $00
- db $22
- db $00
- dw $6bed ; Pointer to NPC Data
- db $e0
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e7c:
- db $5b
- db $23
- db $04
- db $1e
- db $00
- dw $4c3e ; Pointer to NPC Data
- db $d9
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e89:
- db $5c
- db $15
- db $00
- db $26
- db $00
- dw $6e88 ; Pointer to NPC Data
- db $e4
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11e96:
- db $5d
- db $1b
- db $00
- db $22
- db $00
- dw $709c ; Pointer to NPC Data
- db $dd
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ea3:
- db $5e
- db $22
- db $00
- db $16
- db $00
- dw $70a0 ; Pointer to NPC Data
- db $db
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11eb0:
- db $5f
- db $15
- db $00
- db $26
- db $00
- dw $70a4 ; Pointer to NPC Data
- db $e3
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ebd:
- db $60
- db $17
- db $04
- db $1e
- db $00
- dw $70a8 ; Pointer to NPC Data
- db $e2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11eca:
- db $61
- db $1f
- db $04
- db $1a
- db $00
- dw $70ac ; Pointer to NPC Data
- db $dc
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ed7:
- db $62
- db $19
- db $00
- db $1a
- db $00
- dw $70b0 ; Pointer to NPC Data
- db $da
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11ee4:
- db $63
- db $18
- db $00
- db $0e
- db $00
- dw $58dd ; Pointer to NPC Data
- db $e7
- db $03
- db $29
- db $09
- db $02
- db $15
-Data_11ef1:
- db $64
- db $1a
- db $00
- db $16
- db $00
- dw $7283 ; Pointer to NPC Data
- db $e6
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11efe:
- db $65
- db $18
- db $00
- db $0e
- db $00
- dw $58c6 ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11f0b:
- db $66
- db $18
- db $00
- db $0e
- db $00
- dw $58d1 ; Pointer to NPC Data
- db $b2
- db $03
- db $00
- db $00
- db $00
- db $00
-Data_11f18:
- db $67
- db $26
- db $3a
- db $3a
- db $10
- dw $4c3e ; Pointer to NPC Data
-Data_11f1f:
- db $68
- db $27
- db $3b
- db $41
- db $50
- dw $4c3e ; Pointer to NPC Data
-Data_11f26:
- db $69
- db $27
- db $3c
- db $42
- db $50
- dw $4c3e ; Pointer to NPC Data
-Data_11f2d:
- db $6a
- db $27
- db $3d
- db $43
- db $50
- dw $4c3e ; Pointer to NPC Data
-Data_11f34:
- db $6b
- db $27
- db $3e
- db $44
- db $50
- dw $4c3e ; Pointer to NPC Data
-Data_11f3b:
- db $6c
- db $27
- db $3f
- db $45
- db $50
- dw $4c3e ; Pointer to NPC Data
-Data_11f42:
- db $6d
- db $27
- db $40
- db $46
- db $50
- dw $4c3e ; Pointer to NPC Data
-Data_11f49:
- db $00
- db $00
- db $00
- db $1e
- db $00
+; When you press the a button in front of something it will find a data entry somewhere on this list +; it will then jump to the pointer in the data item. All jumps lead to an RST20 operation. +PointerTable_118f5: + dw Data_119dd + dw Data_119dd + dw Data_119ea + dw Data_11a11 + dw Data_11a1e + dw Data_119dd + dw Data_119dd + dw Data_11a2b + dw Data_11a38 + dw Data_11a45 + dw Data_11a52 + dw Data_11a5f + dw Data_11a6c + dw Data_11a79 + dw Data_11a86 + dw Data_11a93 + dw Data_11aa0 + dw Data_11aad + dw Data_11aba + dw Data_11ac7 + dw Data_11ad4 + dw Data_11ae1 + dw Data_11aee + dw Data_11afb + dw Data_11b08 + dw Data_11b15 + dw Data_11b22 + dw Data_11b2f + dw Data_11b3c + dw Data_11b49 + dw Data_11b56 + dw SaraData + dw AmandaData + dw Data_11b7d + dw Data_11b8a + dw Data_11b97 + dw Data_11ba4 + dw Data_11bb1 + dw Data_11bbe + dw Data_11bcb + dw Data_11bd8 + dw Data_11be5 + dw Data_11bf2 + dw Data_11bff + dw Data_11c0c + dw Data_11c19 + dw Data_11c26 + dw Data_11c40 + dw Data_11c4d + dw Data_11c5a + dw Data_11c67 + dw Data_11c74 + dw Data_11c81 + dw Data_11c8e + dw Data_11c9b + dw Data_11ca8 + dw Data_11cb5 + dw Data_11cc2 + dw Data_11ccf + dw Data_11cdc + dw Data_11ce9 + dw Data_11cf6 + dw Data_11d03 + dw Data_11d10 + dw Data_11d1d + dw Data_11d2a + dw Data_11d37 + dw Data_11d44 + dw Data_11d51 + dw Data_11d5e + dw Data_11d6b + dw Data_11d78 + dw Data_11d85 + dw Data_11d92 + dw Data_11d9f + dw Data_11dac + dw Data_11db9 + dw Data_11dc6 + dw Data_11dd3 + dw Data_11de0 + dw Data_11ded + dw Data_11dfa + dw Data_11e07 + dw Data_11e14 + dw Data_11e21 + dw Data_11e2e + dw Data_11e3b + dw Data_11e48 + dw Data_11e55 + dw Data_11e62 + dw Data_11e6f + dw Data_11e7c + dw Data_11e89 + dw Data_11e96 + dw Data_11ea3 + dw Data_11eb0 + dw Data_11ebd + dw Data_11eca + dw Data_11ed7 + dw Data_11ee4 + dw Data_11ef1 + dw Data_11efe + dw Data_11f0b + dw Data_11f18 + dw Data_11f1f + dw Data_11f26 + dw Data_11f2d + dw Data_11f34 + dw Data_11f3b + dw Data_11f42 + dw Data_11f49 + dw Data_11f49 + dw Data_11c33 + dw Data_119f7 + dw Data_11a04 + dw Data_11f49 +Data_119dd: + db $01 + db $02 + db $00 + db $26 + db $00 + dw $5727 ; Pointer to NPC Data + db $ac + db $03 + db $00 + db $00 + db $00 + db $00 +Data_119ea: + db $02 + db $01 + db $04 + db $0e + db $00 + dw $5c4b ; Pointer to NPC Data + db $ad + db $03 + db $02 + db $1a + db $0f + db $16 +Data_119f7: + db $71 + db $01 + db $04 + db $0e + db $00 + dw $5c4b ; Pointer to NPC Data + db $ad + db $03 + db $02 + db $1a + db $0f + db $16 +Data_11a04: + db $72 + db $01 + db $04 + db $0e + db $00 + dw $5c4b ; Pointer to NPC Data + db $ad + db $03 + db $02 + db $1a + db $0f + db $16 +Data_11a11: + db $03 + db $03 + db $04 + db $22 + db $00 + dw $5b4a ; Pointer to NPC Data + db $ae + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a1e: + db $04 + db $04 + db $00 + db $0e + db $00 + dw $5d0d ; Pointer to NPC Data + db $af + db $03 + db $04 + db $34 + db $10 + db $15 +Data_11a2b: + db $07 + db $18 + db $00 + db $0e + db $00 + dw $561d ; Pointer to NPC Data + db $b1 + db $03 + db $03 + db $02 + db $02 + db $15 +Data_11a38: + db $08 + db $18 + db $00 + db $0e + db $00 + dw $5583 ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a45: + db $09 + db $18 + db $00 + db $0e + db $00 + dw $55ca ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a52: + db $0a + db $18 + db $00 + db $0e + db $00 + dw $55d5 ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a5f: + db $0b + db $18 + db $00 + db $0e + db $00 + dw $55e0 ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a6c: + db $0c + db $18 + db $00 + db $0e + db $00 + dw $55f9 ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a79: + db $0d + db $18 + db $00 + db $0e + db $00 + dw $58bb ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a86: + db $0e + db $21 + db $0a + db $30 + db $00 + dw $5c64 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11a93: + db $0f + db $21 + db $0a + db $30 + db $00 + dw $5ed1 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11aa0: + db $10 + db $21 + db $0a + db $30 + db $00 + dw $609e ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11aad: + db $11 + db $21 + db $0a + db $30 + db $00 + dw $6369 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11aba: + db $12 + db $21 + db $0a + db $30 + db $00 + dw $6566 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ac7: + db $13 + db $21 + db $0a + db $30 + db $00 + dw $684c ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ad4: + db $14 + db $21 + db $0a + db $30 + db $00 + dw $6b53 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ae1: + db $15 + db $21 + db $0a + db $30 + db $00 + dw $6d45 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11aee: + db $16 + db $21 + db $0a + db $30 + db $00 + dw $7025 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11afb: + db $17 + db $15 + db $00 + db $26 + db $00 + dw $5ef2 ; Pointer to NPC Data + db $b4 + db $03 + db $1d + db $1c + db $03 + db $15 +Data_11b08: + db $18 + db $15 + db $00 + db $26 + db $00 + dw $6573 ; Pointer to NPC Data + db $b5 + db $03 + db $1e + db $1d + db $03 + db $15 +Data_11b15: + db $19 + db $1f + db $04 + db $1a + db $00 + dw $6d96 ; Pointer to NPC Data + db $b6 + db $03 + db $27 + db $1e + db $03 + db $15 +Data_11b22: + db $1a + db $0a + db $00 + db $0e + db $00 + dw $5dc3 ; Pointer to NPC Data + db $b7 + db $03 + db $0a + db $10 + db $03 + db $16 +Data_11b2f: + db $1b + db $15 + db $00 + db $16 + db $00 + dw $5f39 ; Pointer to NPC Data + db $b8 + db $03 + db $1a + db $21 + db $03 + db $15 +Data_11b3c: + db $1c + db $11 + db $00 + db $26 + db $00 + dw $5ff0 ; Pointer to NPC Data + db $b9 + db $03 + db $1b + db $1f + db $03 + db $15 +Data_11b49: + db $1d + db $1a + db $00 + db $16 + db $00 + dw $6017 ; Pointer to NPC Data + db $ba + db $03 + db $1c + db $20 + db $03 + db $15 +Data_11b56: + db $1e + db $0b + db $04 + db $1e + db $00 + dw $603e ; Pointer to NPC Data + db $bb + db $03 + db $0b + db $11 + db $03 + db $16 +SaraData: + db SARA ; trainer id + db $20 + db $00 + db $0e + db $00 + dw OWSequence_Sara ; Pointer to NPC Data + db $bc + db $03 + db SARA_PIC ; battle profile picture + db $22 + db $03 + db $15 +AmandaData: + db AMANDA + db $20 + db $00 + db $16 + db $00 + dw OWSequence_Amanda ; Pointer to NPC Data + db $bd + db $03 + db AMANDA_PIC ; battle profile picture + db $23 + db $03 + db $15 +Data_11b7d: + db $21 + db $16 + db $00 + db $26 + db $00 + dw OWSequence_Joshua ; Pointer to NPC Data + db $be + db $03 + db $17 + db $24 + db $03 + db $15 +Data_11b8a: + db $22 + db $08 + db $08 + db $2e + db $10 + dw $6304 ; Pointer to NPC Data + db $bf + db $03 + db $08 + db $12 + db $03 + db $16 +Data_11b97: + db $23 + db $1c + db $04 + db $0e + db $00 + dw $6408 ; Pointer to NPC Data + db $c0 + db $03 + db $26 + db $25 + db $03 + db $15 +Data_11ba4: + db $24 + db $17 + db $04 + db $1e + db $00 + dw $642f ; Pointer to NPC Data + db $c1 + db $03 + db $18 + db $26 + db $03 + db $15 +Data_11bb1: + db $25 + db $17 + db $04 + db $1e + db $00 + dw $6456 ; Pointer to NPC Data + db $c2 + db $03 + db $19 + db $27 + db $03 + db $15 +Data_11bbe: + db $26 + db $09 + db $00 + db $16 + db $00 + dw $64ad ; Pointer to NPC Data + db $c3 + db $03 + db $09 + db $13 + db $03 + db $16 +Data_11bcb: + db $27 + db $1c + db $04 + db $0e + db $00 + dw $65d2 ; Pointer to NPC Data + db $c4 + db $03 + db $21 + db $28 + db $03 + db $15 +Data_11bd8: + db $28 + db $1e + db $00 + db $1e + db $00 + dw $6701 ; Pointer to NPC Data + db $c5 + db $03 + db $22 + db $29 + db $03 + db $15 +Data_11be5: + db $29 + db $1d + db $04 + db $22 + db $00 + dw $6745 ; Pointer to NPC Data + db $c6 + db $03 + db $23 + db $2a + db $03 + db $15 +Data_11bf2: + db $2a + db $05 + db $00 + db $1a + db $00 + dw $679e ; Pointer to NPC Data + db $c7 + db $03 + db $05 + db $14 + db $03 + db $16 +Data_11bff: + db $2b + db $11 + db $04 + db $16 + db $00 + dw $6980 ; Pointer to NPC Data + db $c8 + db $03 + db $20 + db $2b + db $03 + db $15 +Data_11c0c: + db $2c + db $12 + db $04 + db $1a + db $00 + dw $6a60 ; Pointer to NPC Data + db $c9 + db $03 + db $1f + db $2c + db $03 + db $15 +Data_11c19: + db $2d + db $1c + db $04 + db $0e + db $00 + dw $6aa2 ; Pointer to NPC Data + db $ca + db $03 + db $28 + db $2d + db $03 + db $15 +Data_11c26: + db $2e + db $0c + db $00 + db $12 + db $00 + dw $6adf ; Pointer to NPC Data + db $cb + db $03 + db $0c + db $15 + db $03 + db $16 +Data_11c33: + db $70 + db $0c + db $03 + db $15 + db $10 + dw $6adf ; Pointer to NPC Data + db $cb + db $03 + db $0c + db $15 + db $03 + db $16 +Data_11c40: + db $2f + db $18 + db $00 + db $0e + db $00 + dw $6cdb ; Pointer to NPC Data + db $cc + db $03 + db $11 + db $2e + db $03 + db $15 +Data_11c4d: + db $30 + db $18 + db $00 + db $0e + db $00 + dw $6c11 ; Pointer to NPC Data + db $cd + db $03 + db $12 + db $2f + db $03 + db $15 +Data_11c5a: + db $31 + db $18 + db $00 + db $0e + db $00 + dw $6c42 ; Pointer to NPC Data + db $ce + db $03 + db $13 + db $30 + db $03 + db $15 +Data_11c67: + db $32 + db $06 + db $00 + db $0e + db $00 + dw $6c67 ; Pointer to NPC Data + db $cf + db $03 + db $06 + db $16 + db $03 + db $16 +Data_11c74: + db $33 + db $12 + db $04 + db $1a + db $00 + dw $6eb3 ; Pointer to NPC Data + db $d0 + db $03 + db $14 + db $31 + db $03 + db $15 +Data_11c81: + db $34 + db $13 + db $00 + db $22 + db $00 + dw $6ed8 ; Pointer to NPC Data + db $d1 + db $03 + db $15 + db $32 + db $03 + db $15 +Data_11c8e: + db $35 + db $11 + db $04 + db $16 + db $00 + dw $6efd ; Pointer to NPC Data + db $d2 + db $03 + db $16 + db $33 + db $03 + db $15 +Data_11c9b: + db $36 + db $07 + db $04 + db $1e + db $00 + dw $6f22 ; Pointer to NPC Data + db $d3 + db $03 + db $07 + db $17 + db $03 + db $16 +Data_11ca8: + db $37 + db $0d + db $00 + db $12 + db $00 + dw $771f ; Pointer to NPC Data + db $d4 + db $03 + db $0d + db $0c + db $04 + db $17 +Data_11cb5: + db $38 + db $0e + db $00 + db $2a + db $00 + dw $772a ; Pointer to NPC Data + db $d5 + db $03 + db $0e + db $0d + db $04 + db $17 +Data_11cc2: + db $39 + db $0f + db $00 + db $26 + db $00 + dw $7735 ; Pointer to NPC Data + db $d6 + db $03 + db $0f + db $0e + db $04 + db $17 +Data_11ccf: + db $3a + db $10 + db $00 + db $0e + db $00 + dw $7740 ; Pointer to NPC Data + db $d7 + db $03 + db $10 + db $0f + db $04 + db $17 +Data_11cdc: + db $3b + db $21 + db $0a + db $30 + db $00 + dw $4c3e ; Pointer to NPC Data + db $b0 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ce9: + db $3c + db $21 + db $0a + db $30 + db $00 + dw $4c3e ; Pointer to NPC Data + db $b0 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11cf6: + db $3d + db $1a + db $00 + db $16 + db $00 + dw $5c76 ; Pointer to NPC Data + db $d8 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d03: + db $3e + db $23 + db $04 + db $1e + db $00 + dw $5f83 ; Pointer to NPC Data + db $d9 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d10: + db $3f + db $19 + db $00 + db $1a + db $00 + dw $5fc0 ; Pointer to NPC Data + db $da + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d1d: + db $40 + db $22 + db $00 + db $16 + db $00 + dw $60cf ; Pointer to NPC Data + db $db + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d2a: + db $41 + db $1e + db $00 + db $1e + db $00 + dw $6111 ; Pointer to NPC Data + db $dc + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d37: + db $42 + db $19 + db $00 + db $1a + db $00 + dw $639a ; Pointer to NPC Data + db $da + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d44: + db $43 + db $1e + db $00 + db $1e + db $00 + dw $661f ; Pointer to NPC Data + db $dc + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d51: + db $44 + db $1b + db $00 + db $22 + db $00 + dw $69a5 ; Pointer to NPC Data + db $dd + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d5e: + db $45 + db $12 + db $04 + db $1a + db $00 + dw $6b84 ; Pointer to NPC Data + db $de + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d6b: + db $46 + db $11 + db $04 + db $16 + db $00 + dw $6e2c ; Pointer to NPC Data + db $de + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d78: + db $47 + db $19 + db $00 + db $1a + db $00 + dw $6de8 ; Pointer to NPC Data + db $da + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d85: + db $48 + db $22 + db $00 + db $16 + db $00 + dw $7295 ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d92: + db $49 + db $22 + db $00 + db $16 + db $00 + dw $726c ; Pointer to NPC Data + db $b3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11d9f: + db $4a + db $22 + db $00 + db $16 + db $00 + dw $7352 ; Pointer to NPC Data + db $df + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11dac: + db $4b + db $13 + db $00 + db $22 + db $00 + dw $5d82 ; Pointer to NPC Data + db $e0 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11db9: + db $4c + db $14 + db $00 + db $16 + db $00 + dw $5d8d ; Pointer to NPC Data + db $e1 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11dc6: + db $4d + db $24 + db $00 + db $16 + db $00 + dw $5d9f ; Pointer to NPC Data + db $e5 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11dd3: + db $4e + db $1d + db $04 + db $22 + db $00 + dw $5fd2 ; Pointer to NPC Data + db $dc + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11de0: + db $4f + db $1a + db $00 + db $16 + db $00 + dw $6137 ; Pointer to NPC Data + db $d8 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ded: + db $50 + db $1b + db $00 + db $22 + db $00 + dw $613b ; Pointer to NPC Data + db $dd + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11dfa: + db $51 + db $1d + db $04 + db $22 + db $00 + dw $63d9 ; Pointer to NPC Data + db $dc + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e07: + db $52 + db $17 + db $04 + db $1e + db $00 + dw $63dd ; Pointer to NPC Data + db $e2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e14: + db $53 + db $24 + db $00 + db $16 + db $00 + dw $66d8 ; Pointer to NPC Data + db $e5 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e21: + db $54 + db $22 + db $00 + db $16 + db $00 + dw $66e3 ; Pointer to NPC Data + db $db + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e2e: + db $55 + db $12 + db $04 + db $1a + db $00 + dw $6850 ; Pointer to NPC Data + db $de + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e3b: + db $56 + db $22 + db $00 + db $16 + db $00 + dw $6a30 ; Pointer to NPC Data + db $db + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e48: + db $57 + db $19 + db $00 + db $1a + db $00 + dw $6a3b ; Pointer to NPC Data + db $da + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e55: + db $58 + db $1a + db $00 + db $16 + db $00 + dw $6bc1 ; Pointer to NPC Data + db $d8 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e62: + db $59 + db $18 + db $00 + db $0e + db $00 + dw $6bc5 ; Pointer to NPC Data + db $e0 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e6f: + db $5a + db $13 + db $00 + db $22 + db $00 + dw $6bed ; Pointer to NPC Data + db $e0 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e7c: + db $5b + db $23 + db $04 + db $1e + db $00 + dw $4c3e ; Pointer to NPC Data + db $d9 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e89: + db $5c + db $15 + db $00 + db $26 + db $00 + dw $6e88 ; Pointer to NPC Data + db $e4 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11e96: + db $5d + db $1b + db $00 + db $22 + db $00 + dw $709c ; Pointer to NPC Data + db $dd + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ea3: + db $5e + db $22 + db $00 + db $16 + db $00 + dw $70a0 ; Pointer to NPC Data + db $db + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11eb0: + db $5f + db $15 + db $00 + db $26 + db $00 + dw $70a4 ; Pointer to NPC Data + db $e3 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ebd: + db $60 + db $17 + db $04 + db $1e + db $00 + dw $70a8 ; Pointer to NPC Data + db $e2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11eca: + db $61 + db $1f + db $04 + db $1a + db $00 + dw $70ac ; Pointer to NPC Data + db $dc + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ed7: + db $62 + db $19 + db $00 + db $1a + db $00 + dw $70b0 ; Pointer to NPC Data + db $da + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11ee4: + db $63 + db $18 + db $00 + db $0e + db $00 + dw $58dd ; Pointer to NPC Data + db $e7 + db $03 + db $29 + db $09 + db $02 + db $15 +Data_11ef1: + db $64 + db $1a + db $00 + db $16 + db $00 + dw $7283 ; Pointer to NPC Data + db $e6 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11efe: + db $65 + db $18 + db $00 + db $0e + db $00 + dw $58c6 ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11f0b: + db $66 + db $18 + db $00 + db $0e + db $00 + dw $58d1 ; Pointer to NPC Data + db $b2 + db $03 + db $00 + db $00 + db $00 + db $00 +Data_11f18: + db $67 + db $26 + db $3a + db $3a + db $10 + dw $4c3e ; Pointer to NPC Data +Data_11f1f: + db $68 + db $27 + db $3b + db $41 + db $50 + dw $4c3e ; Pointer to NPC Data +Data_11f26: + db $69 + db $27 + db $3c + db $42 + db $50 + dw $4c3e ; Pointer to NPC Data +Data_11f2d: + db $6a + db $27 + db $3d + db $43 + db $50 + dw $4c3e ; Pointer to NPC Data +Data_11f34: + db $6b + db $27 + db $3e + db $44 + db $50 + dw $4c3e ; Pointer to NPC Data +Data_11f3b: + db $6c + db $27 + db $3f + db $45 + db $50 + dw $4c3e ; Pointer to NPC Data +Data_11f42: + db $6d + db $27 + db $40 + db $46 + db $50 + dw $4c3e ; Pointer to NPC Data +Data_11f49: + db $00 + db $00 + db $00 + db $1e + db $00 diff --git a/src/data/warp_data.asm b/src/data/warps.asm index cb34721..cb34721 100755..100644 --- a/src/data/warp_data.asm +++ b/src/data/warps.asm diff --git a/src/engine/bank1.asm b/src/engine/bank1.asm index 1008822..b5894d2 100755 --- a/src/engine/bank1.asm +++ b/src/engine/bank1.asm @@ -16,20 +16,21 @@ Func_4000: ; 4000 (1:4000) farcall Func_1a6cc ldh a, [hButtonsHeld] cp A_BUTTON | B_BUTTON - jr z, .asm_4035 + jr z, .ask_erase_backup_ram farcall Func_126d1 jr Func_4000 -.asm_4035 +.ask_erase_backup_ram call Func_405a call Func_04a2 - text_hl ResetBackUpRamText - call Func_2af0 - jr c, .asm_404d + ldtx hl, ResetBackUpRamText + call YesOrNoMenuWithText + jr c, .reset_game +; erase sram call EnableExtRAM xor a ld [$a000], a call DisableExtRAM -.asm_404d +.reset_game jp Reset Func_4050: ; 4050 (1:4050) @@ -39,10 +40,10 @@ Func_4050: ; 4050 (1:4050) ret Func_405a: ; 405a (1:405a) -INCBIN "baserom.gbc",$405a,$406f - $405a + INCROM $405a, $406f Func_406f: ; 406f (1:406f) -INCBIN "baserom.gbc",$406f,$409f - $406f + INCROM $406f, $409f ; this function begins the duel after the opponent's ; graphics, name and deck have been introduced @@ -128,7 +129,7 @@ StartDuel: ; 409f (1:409f) call Func_04a2 ld a, $3 call Func_2167 - text_hl DecisionText + ldtx hl, DecisionText call DrawWideTextBox_WaitForInput call Func_04a2 ldh a, [hWhoseTurn] @@ -147,7 +148,7 @@ StartDuel: ; 409f (1:409f) jr z, .activeDuelistLostBattle ld a, $5f ld c, MUSIC_DARKDIDDLY - text_hl DuelWasDrawText + ldtx hl, DuelWasDrawText jr .handleDuelFinished .activeDuelistWonBattle @@ -159,7 +160,7 @@ StartDuel: ; 409f (1:409f) ld [wd0c3], a ld a, $5d ld c, MUSIC_MATCHVICTORY - text_hl WonDuelText + ldtx hl, WonDuelText jr .handleDuelFinished .activeDuelistLostBattle @@ -171,7 +172,7 @@ StartDuel: ; 409f (1:409f) ld [wd0c3], a ld a, $5e ld c, MUSIC_MATCHLOSS - text_hl LostDuelText + ldtx hl, LostDuelText .handleDuelFinished call Func_3b6a @@ -202,7 +203,7 @@ StartDuel: ; 409f (1:409f) call Func_3b31 ld a, [wDuelTheme] call PlaySong - text_hl StartSuddenDeathMatchText + ldtx hl, StartSuddenDeathMatchText call DrawWideTextBox_WaitForInput ld a, $1 ld [wcc08], a @@ -231,7 +232,7 @@ StartDuel: ; 409f (1:409f) ret ; 0x420b -INCBIN "baserom.gbc",$420b,$4225 - $420b + INCROM $420b, $4225 HandleTurn: ; 4225 (1:4225) ld a, DUELVARS_DUELIST_TYPE @@ -245,7 +246,7 @@ HandleTurn: ; 4225 (1:4225) .asm_4237 call $70e6 call $4933 - call _DrawCardFromDeck + call DrawCardFromDeck jr nc, .deckNotEmpty ld a, DUEL_LOST ld [wDuelFinished], a @@ -282,8 +283,8 @@ Func_426d: xor a ld [wVBlankCtr], a ld [wcbf9], a - text_hl DuelistIsThinkingText - call Func_2a36 + ldtx hl, DuelistIsThinkingText + call DrawWideTextBox_PrintTextNoDelay call Func_2bbf ld a, $ff ld [wcc11], a @@ -299,7 +300,7 @@ PrintDuelMenu: or a ret nz ld a, [wCurrentDuelMenuItem] - call Func_2710 + call SetMenuItem Func_42ac: call DoFrame @@ -333,18 +334,18 @@ Func_42ac: ld [wCurrentDuelMenuItem], a jr nc, Func_42ac ldh a, [hCurrentMenuItem] - ld hl, BattleMenuFunctionTable + ld hl, DuelMenuFunctionTable jp JumpToFunctionInTable -BattleMenuFunctionTable: ; 42f1 (1:42f1) - dw OpenHandMenu - dw OpenBattleAttackMenu - dw OpenBattleCheckMenu - dw OpenPokemonPowerMenu - dw PlayerRetreat - dw PlayerEndTurn +DuelMenuFunctionTable: ; 42f1 (1:42f1) + dw DuelMenu_Hand + dw DuelMenu_Attack + dw DuelMenu_Check + dw DuelMenu_PkmnPower + dw DuelMenu_Retreat + dw DuelMenu_Done -INCBIN "baserom.gbc",$42fd, $430b - $42fd + INCROM $42fd, $430b Func_430b: ; 430b (1:430b) call Func_4329 @@ -382,15 +383,15 @@ Func_4339: ; 4339 (1:4339) Func_4342: ; 4342 (1:4342) jp $5550 -INCBIN "baserom.gbc",$4345, $438e - $4345 + INCROM $4345, $438e -OpenPokemonPowerMenu: ; 438e (1:438e) +DuelMenu_PkmnPower: ; 438e (1:438e) call $6431 jp c, Func_426d call Func_1730 jp Func_426d -PlayerEndTurn: ; 439a (1:439a) +DuelMenu_Done: ; 439a (1:439a) ld a, $08 call $51e7 jp c, Func_4268 @@ -399,7 +400,7 @@ PlayerEndTurn: ; 439a (1:439a) call $717a ret -PlayerRetreat: ; 43ab (1:43ab) +DuelMenu_Retreat: ; 43ab (1:43ab) ld a, DUELVARS_ARENA_CARD_STATUS call GetTurnDuelistVariable and a,PASSIVE_STATUS_MASK @@ -413,7 +414,7 @@ PlayerRetreat: ; 43ab (1:43ab) jr c, Func_441f call $4611 jr c, Func_441c - text_hl SelectMonOnBenchToSwitchWithActiveText + ldtx hl, SelectMonOnBenchToSwitchWithActiveText call DrawWideTextBox_WaitForInput call $600c jr c, Func_441c @@ -427,7 +428,7 @@ PlayerRetreat: ; 43ab (1:43ab) call $4f9d Func_43e8: ; 43e8 - text_hl UnableToRetreatText + ldtx hl, UnableToRetreatText call DrawWideTextBox_WaitForInput jp PrintDuelMenu @@ -437,7 +438,7 @@ Func_43f1: ; 43f1 (1:43f1) call $4611 jr c, Func_441c call $6558 - text_hl SelectMonOnBenchToSwitchWithActiveText + ldtx hl, SelectMonOnBenchToSwitchWithActiveText call DrawWideTextBox_WaitForInput call $600c ld [wBenchSelectedPokemon], a @@ -457,22 +458,22 @@ Func_441f: ; 441f (1:441f) call DrawWideTextBox_WaitForInput jp PrintDuelMenu -OpenHandMenu: ; 4425 (1:4425) +DuelMenu_Hand: ; 4425 (1:4425) ld a, DUELVARS_NUMBER_OF_CARDS_IN_HAND call GetTurnDuelistVariable or a jr nz, Func_4436 - text_hl NoCardsInHandText + ldtx hl, NoCardsInHandText call DrawWideTextBox_WaitForInput jp PrintDuelMenu Func_4436: ; 4436 (1:4436) -INCBIN "baserom.gbc",$4436, $4477 - $4436 + INCROM $4436, $4477 -; c contains the energy card being played +; c contains the type of energy card being played PlayerUseEnergyCard: ; 4477 (1:4477) ld a, c - cp WATER_ENERGY_CARD ; XXX why treat water energy card differently? + cp TYPE_ENERGY_WATER ; XXX why treat water energy card differently? jr nz, .notWaterEnergy call $3615 jr c, .waterEnergy @@ -509,28 +510,28 @@ PlayerUseEnergyCard: ; 4477 (1:4477) ld a, [wAlreadyPlayedEnergy] or a jr z, .asm_4490 - text_hl OnlyOneEnergyCardText + ldtx hl, OnlyOneEnergyCardText call DrawWideTextBox_WaitForInput jp Func_4436 .alreadyPlayedEnergy - text_hl OnlyOneEnergyCardText + ldtx hl, OnlyOneEnergyCardText call DrawWideTextBox_WaitForInput - call $123b + call CreateHandCardBuffer call $55be jp $4447 ; 0x44db -INCBIN "baserom.gbc",$44db, $4585 - $44db + INCROM $44db, $4585 -OpenBattleCheckMenu: ; 4585 (1:4585) +DuelMenu_Check: ; 4585 (1:4585) call Func_3b31 call Func_3096 jp Func_426d -INCBIN "baserom.gbc",$458e, $46fc - $458e + INCROM $458e, $46fc -OpenBattleAttackMenu: ; 46fc (1:46fc) +DuelMenu_Attack: ; 46fc (1:46fc) call HandleCantAttackSubstatus jr c, .alertCantAttackAndCancelMenu call CheckIfActiveCardParalyzedOrAsleep @@ -548,7 +549,7 @@ OpenBattleAttackMenu: ; 46fc (1:46fc) call LoadPokemonMovesToDuelCardOrAttackList or a jr nz, .openAttackMenu - text_hl NoSelectableAttackText + ldtx hl, NoSelectableAttackText call DrawWideTextBox_WaitForInput jp PrintDuelMenu @@ -570,14 +571,14 @@ OpenBattleAttackMenu: ; 46fc (1:46fc) ldh a, [hButtonsPressed] and START jr nz, .displaySelectedMoveInfo - call MenuCursorAcceptInput + call HandleMenuInput jr nc, .waitForInput cp $ff ; was B pressed? jp z, PrintDuelMenu ld [wSelectedDuelSubMenuItem], a call CheckIfEnoughEnergies jr nc, .enoughEnergy - text_hl NotEnoughEnergyCardsText + ldtx hl, NotEnoughEnergyCardsText call DrawWideTextBox_WaitForInput jr .tryOpenAttackMenu @@ -660,14 +661,12 @@ Func_478b: ; 478b (1:478b) ret AttackMenuCursorData: - db $01 - db $0d - db $02 - db $02 - db $0f - db $00 - db $00 - db $00 + db 1, 13 ; x, y + db 2 ; y displacement between items + db 2 ; number of items + db $0f ; cursor tile number + db $00 ; tile behind cursor + dw $0000 ; unknown function pointer if non-0 Func_47ec: ; $47ec (1:47ec) ld a, [wcc04] @@ -919,17 +918,17 @@ CheckIfActiveCardParalyzedOrAsleep: ; 4918 (1:4918) ret .paralyzed - text_hl UnableDueToParalysisText + ldtx hl, UnableDueToParalysisText jr .returnWithStatusCondition .asleep - text_hl UnableDueToSleepText + ldtx hl, UnableDueToSleepText .returnWithStatusCondition: scf ret -INCBIN "baserom.gbc",$4933, $4b60 - $4933 + INCROM $4933, $4b60 Func_4b60: ; 4b60 (1:4b60) call $7107 @@ -994,7 +993,7 @@ Func_4b60: ; 4b60 (1:4b60) call Func_4cd5 call SwapTurn jp c, $4c77 - call $311d + call Func_311d ld hl, $0072 call DrawWideTextBox_WaitForInput call Func_0f58 @@ -1058,7 +1057,7 @@ Func_4b60: ; 4b60 (1:4b60) ; 0x4c77 -INCBIN "baserom.gbc",$4c77, $4cd5 - $4c77 + INCROM $4c77, $4cd5 ; Select Basic Pokemon From Hand Func_4cd5: ; 4cd5 (1:4cd5) @@ -1117,7 +1116,7 @@ Func_4cd5: ; 4cd5 (1:4cd5) call $51e7 jr c, .asm_4d28 ld a, [$ff98] - call $1485 + call Func_1485 ld a, [$ff98] ld hl, $0062 call $4b31 @@ -1141,7 +1140,7 @@ Func_4cd5: ; 4cd5 (1:4cd5) cp $6 jr nc, .asm_4d86 ld a, [$ff98] - call $1485 + call Func_1485 ld a, [$ff98] ld hl, $0061 call $4b31 @@ -1163,13 +1162,13 @@ Func_4cd5: ; 4cd5 (1:4cd5) ; 0x4d97 -INCBIN "baserom.gbc",$4d97, $5aeb - $4d97 + INCROM $4d97, $5aeb Func_5aeb: ; 5aeb (1:5aeb) -INCBIN "baserom.gbc",$5aeb,$6785 - $5aeb + INCROM $5aeb, $6785 Func_6785: ; 6785 (1:6785) -INCBIN "baserom.gbc",$6785,$6793 - $6785 + INCROM $6785, $6793 ; loads player deck from SRAM to wPlayerDeck LoadPlayerDeck: ; 6793 (1:6793) @@ -1192,7 +1191,7 @@ LoadPlayerDeck: ; 6793 (1:6793) ret ; 0x67b2 -INCBIN "baserom.gbc",$67b2,$67be - $67b2 + INCROM $67b2, $67be ; related to ai taking their turn in a duel ; called multiple times during one ai turn @@ -1224,7 +1223,7 @@ AIMakeDecision: ; 67be (1:67be) ret nz ld [wVBlankCtr], a ld hl, $0088 - call Func_2a36 + call DrawWideTextBox_PrintTextNoDelay or a ret @@ -1233,7 +1232,7 @@ AIMakeDecision: ; 67be (1:67be) ret ; 0x67fb -INCBIN "baserom.gbc",$67fb,$695e - $67fb + INCROM $67fb, $695e AIMoveTable: ; 695e (1:695e) dw Func_0f35 @@ -1260,7 +1259,7 @@ AIMoveTable: ; 695e (1:695e) dw $6b15 dw $6b20 -INCBIN "baserom.gbc",$698c,$69a5 - $698c + INCROM $698c, $69a5 AIUseEnergyCard: ; 69a5 (1:69a5) ld a, [$ffa1] @@ -1279,20 +1278,20 @@ AIUseEnergyCard: ; 69a5 (1:69a5) ret ; 0x69c5 -INCBIN "baserom.gbc",$69c5,$6d84 - $69c5 + INCROM $69c5, $6d84 ; converts clefairy doll/mysterious fossil at specified wLoadedCard to pokemon card ConvertTrainerCardToPokemon: ld c, a ld a, [hl] - cp TRAINER_CARD + cp TYPE_TRAINER ret nz push hl ldh a, [hWhoseTurn] ld h, a ld l, c ld a, [hl] - and TRAINER_CARD + and TYPE_TRAINER pop hl ret z ld a, e @@ -1336,7 +1335,7 @@ ConvertTrainerCardToPokemon: db UNABLE_RETREAT ; retreat cost ds $0d ; PKMN_CARD_DATA_LENGTH - (wLoadedCard1RetreatCost + 1 - wLoadedCard1) -INCBIN "baserom.gbc",$6df1,$7107 - $6df1 + INCROM $6df1, $7107 ; initializes duel variables such as cards in deck and in hand, or Pokemon in play area ; player turn: [c200, c2ff] @@ -1381,7 +1380,7 @@ InitializeDuelVariables: ; 7107 (1:7107) ret ; 0x7133 -INCBIN "baserom.gbc",$7133,$71ad - $7133 + INCROM $7133, $71ad _TossCoin: ; 71ad (1:71ad) ld [wcd9c], a @@ -1391,7 +1390,7 @@ _TossCoin: ; 71ad (1:71ad) xor a ld [wcd9f], a call Func_04a2 - call $210f + call Func_210f .asm_71c1 ld a, [wcd9f] @@ -1515,7 +1514,7 @@ _TossCoin: ; 71ad (1:71ad) .asm_7292 ld a, d - call Func_3796 + call PlaySFX ld a, [wcd9c] dec a jr z, .asm_72b9 @@ -1577,29 +1576,29 @@ _TossCoin: ; 71ad (1:71ad) ret ; 0x72ff -INCBIN "baserom.gbc",$72ff,$7354 - $72ff + INCROM $72ff, $7354 BuildVersion: ; 7354 (1:7354) db "VER 12/20 09:36",TX_END -INCBIN "baserom.gbc",$7364,$7571 - $7364 + INCROM $7364, $7571 Func_7571: ; 7571 (1:7571) -INCBIN "baserom.gbc",$7571,$7576 - $7571 + INCROM $7571, $7576 Func_7576: ; 7576 (1:7576) farcallx $6, $591f ret ; 0x757b -INCBIN "baserom.gbc",$757b,$758f - $757b + INCROM $757b, $758f Func_758f: ; 758f (1:758f) -INCBIN "baserom.gbc",$758f,$7594 - $758f + INCROM $758f, $7594 Func_7594: ; 7594 (1:7594) farcallx $6, $661f ret ; 0x7599 -INCBIN "baserom.gbc",$7599,$8000 - $7599
\ No newline at end of file + INCROM $7599, $8000
\ No newline at end of file diff --git a/src/engine/bank1c.asm b/src/engine/bank1c.asm index 9abadde..c7ae122 100755 --- a/src/engine/bank1c.asm +++ b/src/engine/bank1c.asm @@ -22,7 +22,7 @@ Func_70018: ; 70018 (1c:4018) ret ; 0x70024 -INCBIN "baserom.gbc",$70024,$70044 - $70024 + INCROM $70024, $70044 Func_70044: ; 70044 (1c:4044) push hl @@ -41,7 +41,7 @@ Func_70044: ; 70044 (1c:4044) ret Unknown_70057: ; 70057 (1c:4057) -INCBIN "baserom.gbc",$70057,$70082 - $70057 + INCROM $70057, $70082 Func_70082: ; 70082 (1c:4082) ld a, [wConsole] @@ -80,7 +80,7 @@ Func_700a3: ; 700a3 (1c:40a3) ld a, [hli] ld h, [hl] ld l, a - ld de, $8800 + ld de, vTiles1 call Func_701e9 call Func_701fe ld hl, SGB_700de @@ -96,7 +96,7 @@ Func_700a3: ; 700a3 (1c:40a3) jr z, .asm_700da call Func_70136 dec hl - ld de, $8800 + ld de, vTiles1 call Func_701e9 ld hl, SGB_700ee call Func_70177 @@ -108,11 +108,11 @@ Func_700a3: ; 700a3 (1c:40a3) ; CHR_TRN: tiles $00-$7F, BG (border) tiles (from SNES $000-$FFF) SGB_700de: ; 700de (1c:40de) -INCBIN "baserom.gbc",$700de,$700ee - $700de + INCROM $700de, $700ee ; CHR_TRN: tiles $80-$FF, BG (border) tiles (from SNES $000-$FFF) SGB_700ee: ; 700ee (1c:40ee) -INCBIN "baserom.gbc",$700ee,$700fe - $700ee + INCROM $700ee, $700fe Func_700fe: ; 700fe (1c:40fe) push hl @@ -123,10 +123,10 @@ Func_700fe: ; 700fe (1c:40fe) push hl call Func_70136 pop hl - ld de, $8800 + ld de, vTiles1 call Func_701e9 pop hl - ld de, $9000 + ld de, vTiles2 call Func_701e9 call Func_701fe pop hl @@ -140,7 +140,7 @@ Func_700fe: ; 700fe (1c:40fe) ; PCT_TRN: read tile map & palette data into VRAM (from SNES $000-$87F) SGB_70126: ; 70126 (1c:4126) -INCBIN "baserom.gbc",$70126,$70136 - $70126 + INCROM $70126, $70136 Func_70136: ; 70136 (1c:4136) push hl @@ -200,11 +200,11 @@ Func_70177: ; 70177 (1c:4177) ; MASK_EN on SGB_MASK_EN_ON_701a0: ; 701a0 (1c:41a0) -INCBIN "baserom.gbc",$701a0,$701b0 - $701a0 + INCROM $701a0, $701b0 ; MASK_EN off SGB_MASK_EN_OFF_701b0: ; 701b0 (1c:41b0) -INCBIN "baserom.gbc",$701b0,$701c0 - $701b0 + INCROM $701b0, $701c0 Func_701c0: ; 701c0 (1c:41c0) push hl @@ -212,7 +212,7 @@ Func_701c0: ; 701c0 (1c:41c0) call DisableLCD xor a ld c, $10 - ld hl, $9000 + ld hl, vTiles2 .asm_701cb ld [hli], a dec c @@ -251,7 +251,7 @@ Func_701e9: ; 701e9 (1c:41e9) ret Func_701fe: ; 701fe (1c:41fe) - ld hl, $9800 + ld hl, vBGMapTiles ld de, $000c ld a, $80 ld c, $d @@ -311,4 +311,4 @@ Func_70214: ; 70214 (1c:4214) ret Unknown_7024a: ; 7024a (1c:424a) -INCBIN "baserom.gbc",$7024a,$74000 - $7024a + INCROM $7024a, $74000 diff --git a/src/engine/bank2.asm b/src/engine/bank2.asm index a721a74..fea3d9b 100755 --- a/src/engine/bank2.asm +++ b/src/engine/bank2.asm @@ -1,4 +1,4 @@ -INCBIN "baserom.gbc",$8000,$8cd4 - $8000 + INCROM $8000, $8cd4 Func_8cd4: ; 8cd4 (2:4cd4) push bc @@ -17,7 +17,7 @@ Func_8cd4: ; 8cd4 (2:4cd4) ret ; 0x8ce7 -INCBIN "baserom.gbc",$8ce7,$8cf9 - $8ce7 + INCROM $8ce7, $8cf9 Func_8cf9: ; 8cf9 (2:4cf9) call EnableExtRAM @@ -37,7 +37,7 @@ Func_8d0b: ; 8d0b (2:4d0b) ret Unknown_8d15: ; 8d15 (2:4d15) -INCBIN "baserom.gbc",$8d15,$8d56 - $8d15 + INCROM $8d15, $8d56 Func_8d56: ; 8d56 (2:4d56) xor a @@ -55,7 +55,7 @@ Func_8d56: ; 8d56 (2:4d56) ret ; 0x8d78 -INCBIN "baserom.gbc",$8d78,$8d9d - $8d78 + INCROM $8d78, $8d9d Func_8d9d: ; 8d9d (2:4d9d) ld de, $cfd1 @@ -69,7 +69,7 @@ Func_8d9d: ; 8d9d (2:4d9d) ret Unknown_8da9: ; 8da9 (2:4da9) -INCBIN "baserom.gbc",$8da9,$8db0 - $8da9 + INCROM $8da9, $8db0 Func_8db0: ; 8db0 (2:4db0) ld hl, Unknown_8da9 @@ -81,14 +81,14 @@ Func_8db0: ; 8db0 (2:4db0) Func_8dbc: ; 8dbc (2:4dbc) ld hl, Unknown_8de2 call InitializeCursorParameters - text_hl PleaseSelectDeckText + ldtx hl, PleaseSelectDeckText call DrawWideTextBox_PrintText .asm_8dc8 call DoFrame jr c, Func_8dbc call Func_8dea jr c, Func_8dbc - call MenuCursorAcceptInput + call HandleMenuInput jr nc, .asm_8dc8 ldh a, [hCurrentMenuItem] cp $ff @@ -97,7 +97,7 @@ Func_8dbc: ; 8dbc (2:4dbc) jp Func_8e42 Unknown_8de2: ; 8de2 (2:4de2) -INCBIN "baserom.gbc",$8de2,$8dea - $8de2 + INCROM $8de2, $8dea Func_8dea: ; 8dea (2:4dea) ldh a, [hButtonsPressed2] @@ -348,13 +348,13 @@ Func_8f9d: ; 8f9d (2:4f9d) xor a ld [wce3f], a ld [wce40], a - text_hl ChosenAsDuelingDeckText + ldtx hl, ChosenAsDuelingDeckText call DrawWideTextBox_WaitForInput ld a, [wceb1] jp Func_8dbc Func_8fe8: ; 8fe8 (2:4fe8) - text_hl ThereIsNoDeckHereText + ldtx hl, ThereIsNoDeckHereText call DrawWideTextBox_WaitForInput ld a, [wceb1] ret @@ -372,13 +372,13 @@ Func_8ff2: ; 8ff2 (2:4ff2) ret ; 0x9001 -INCBIN "baserom.gbc",$9001,$9026 - $9001 + INCROM $9001, $9026 Func_9026: ; 9026 (2:5026) ret Unknown_9027: ; 9027 (2:5027) -INCBIN "baserom.gbc",$9027,$9038 - $9027 + INCROM $9027, $9038 Func_9038: ; 9038 (2:5038) ld a, [wceb1] @@ -471,7 +471,7 @@ Func_9065: ; 9065 (2:5065) ld a, [wcfe3] or a jr z, .asm_90ca - call Func_3796 + call PlaySFX .asm_90ca ld hl, $cea3 ld a, [hl] @@ -515,7 +515,7 @@ Func_90fb: ; 90fb (2:50fb) .asm_9103 ld a, $3 .asm_9105 - call Func_3796 + call PlaySFX pop af ret @@ -540,7 +540,7 @@ Func_910a: ; 910a (2:510a) ret ; 0x9120 -INCBIN "baserom.gbc",$9120,$9152 - $9120 + INCROM $9120, $9152 Func_9152: ; 9152 (2:5152) push hl @@ -662,7 +662,7 @@ Func_9168: ; 9168 (2:5168) ret Unknown_9242: ; 9242 (2:5242) -INCBIN "baserom.gbc",$9242,$9253 - $9242 + INCROM $9242, $9253 Func_9253: ; 9253 (2:5253) ld de, wc590 @@ -703,13 +703,13 @@ Func_926e: ; 926e (2:526e) ret .asm_929c call Func_22ae - text_hl NewDeckText + ldtx hl, NewDeckText call Func_2c29 scf ret Unknown_92a7: ; 92a7 (2:52a7) -INCBIN "baserom.gbc",$92a7,$92ad - $92a7 + INCROM $92a7, $92ad Func_92ad: ; 92ad (2:52ad) ld a, [hli] @@ -726,7 +726,7 @@ Func_92b4: ; 92b4 (2:52b4) ret ; 0x92be -INCBIN "baserom.gbc",$92be,$9314 - $92be + INCROM $92be, $9314 Func_9314: ; 9314 (2:5314) ld bc, $0018 @@ -759,31 +759,31 @@ Func_9326: ; 9326 (2:5326) ret Func_9345: ; 9345 (2:5345) -INCBIN "baserom.gbc",$9345,$9843 - $9345 + INCROM $9345, $9843 Func_9843: ; 9843 (2:5843) -INCBIN "baserom.gbc",$9843,$9e41 - $9843 + INCROM $9843, $9e41 Func_9e41: ; 9e41 (2:5e41) -INCBIN "baserom.gbc",$9e41,$a288 - $9e41 + INCROM $9e41, $a288 Func_a288: ; a288 (2:6288) -INCBIN "baserom.gbc",$a288,$a763 - $a288 + INCROM $a288, $a763 Unknown_a763: ; a763 (2:6763) -INCBIN "baserom.gbc",$a763,$a76c - $a763 + INCROM $a763, $a76c Unknown_a76c: ; a76c (2:676c) -INCBIN "baserom.gbc",$a76c,$a775 - $a76c + INCROM $a76c, $a775 Unknown_a775: ; a775 (2:6775) -INCBIN "baserom.gbc",$a775,$a77e - $a775 + INCROM $a775, $a77e Unknown_a77e: ; a77e (2:677e) -INCBIN "baserom.gbc",$a77e,$b177 - $a77e + INCROM $a77e, $b177 Func_b177: ; b177 (2:7177) -INCBIN "baserom.gbc",$b177,$b19d - $b177 + INCROM $b177, $b19d Func_b19d: ; b19d (2:719d) xor a @@ -842,7 +842,7 @@ Func_b19d: ; b19d (2:719d) .asm_b216 ld hl, $0272 - call Func_2af0 + call YesOrNoMenuWithText ld a, [$d086] jr c, .asm_b1b3 call $7592 @@ -888,7 +888,7 @@ Func_b19d: ; b19d (2:719d) ret ; 0xb274 -INCBIN "baserom.gbc",$b274,$ba04 - $b274 + INCROM $b274, $ba04 Func_ba04: ; ba04 (2:7a04) ld a, [wd0a9] @@ -923,7 +923,7 @@ Func_ba04: ; ba04 (2:7a04) ld [hl], d .asm_ba40 call DoFrame - call MenuCursorAcceptInput + call HandleMenuInput jr c, .asm_baa3 ld a, [$ff8f] and $c0 @@ -973,7 +973,7 @@ Func_ba04: ; ba04 (2:7a04) jp $7a25 .asm_baa3 - call Func_270b + call DrawCursor2 ld a, [$cea1] ld [$d087], a ld a, [wCurMenuItem] @@ -1071,4 +1071,4 @@ Func_ba04: ; ba04 (2:7a04) jp $7a25 ; 0xbb6e -INCBIN "baserom.gbc",$bb6e,$c000 - $bb6e + INCROM $bb6e, $c000 diff --git a/src/engine/bank20.asm b/src/engine/bank20.asm index 0142e93..b551e73 100755 --- a/src/engine/bank20.asm +++ b/src/engine/bank20.asm @@ -1,5 +1,5 @@ Func_80000: ; 80000 (20:4000) -INCBIN "baserom.gbc",$80000,$80028 - $80000 + INCROM $80000, $80028 Func_80028: ; 80028 (20:4028) call Func_801f1 @@ -11,7 +11,7 @@ Func_80028: ; 80028 (20:4028) ret ; 0x8003d -INCBIN "baserom.gbc",$8003d,$80077 - $8003d + INCROM $8003d, $80077 Func_80077: ; 80077 (20:4077) ld a, $1 @@ -25,7 +25,7 @@ Func_80077: ; 80077 (20:4077) push hl push bc push de - call Func_04cf + call BCCoordToBGMap0Address ld hl, wd4c2 ld [hl], e inc hl @@ -55,7 +55,7 @@ Func_80077: ; 80077 (20:4077) ret ; 0x800bd -INCBIN "baserom.gbc",$800bd,$801a1 - $800bd + INCROM $800bd, $801a1 Func_801a1: ; 801a1 (20:41a1) push hl @@ -65,17 +65,17 @@ Func_801a1: ; 801a1 (20:41a1) push af ld a, $1 call BankswitchRAM - ld hl, $a000 - ld de, $9800 + ld hl, vEnd + ld de, vBGMapTiles ld c, $20 .asm_801b4 push bc push hl push de ld b, $20 - call $06fc + call SafeCopyDataHLtoDE ld a, [wConsole] - cp $2 + cp CONSOLE_CGB jr nz, .asm_801d6 pop de pop hl @@ -85,7 +85,7 @@ Func_801a1: ; 801a1 (20:41a1) add hl, bc call BankswitchVRAM_1 ld b, $20 - call $06fc + call SafeCopyDataHLtoDE call BankswitchVRAM_0 .asm_801d6 @@ -157,7 +157,7 @@ Func_80229: ; 80229 (20:4229) ret ; 0x80238 -INCBIN "baserom.gbc",$80238,$8025b - $80238 + INCROM $80238, $8025b Func_8025b: ; 8025b (20:425b) push hl @@ -234,19 +234,19 @@ Func_802bb: ; 802bb (20:42bb) ret ; 0x802d4 -INCBIN "baserom.gbc",$802d4,$80418 - $802d4 + INCROM $802d4, $80418 Func_80418: ; 80418 (20:4418) -INCBIN "baserom.gbc",$80418,$80480 - $80418 + INCROM $80418, $80480 Func_80480: ; 80480 (20:4480) -INCBIN "baserom.gbc",$80480,$804d8 - $80480 + INCROM $80480, $804d8 Func_804d8: ; 804d8 (20:44d8) -INCBIN "baserom.gbc",$804d8,$80b7a - $804d8 + INCROM $804d8, $80b7a Func_80b7a: ; 80b7a (20:4b7a) -INCBIN "baserom.gbc",$80b7a,$80ba4 - $80b7a + INCROM $80b7a, $80ba4 Func_80ba4: ; 80ba4 (20:4ba4) push af @@ -288,7 +288,7 @@ Func_80ba4: ; 80ba4 (20:4ba4) ld c, [hl] inc hl ld a, [wConsole] - cp $2 + cp CONSOLE_CGB jr nz, .asm_80be7 inc hl @@ -327,10 +327,10 @@ Func_80ba4: ; 80ba4 (20:4ba4) ret ; 0x80c21 -INCBIN "baserom.gbc",$80c21,$80e5a - $80c21 + INCROM $80c21, $80e5a Unknown_80e5a: ; 80e5a (20:4e5a) -INCBIN "baserom.gbc",$80e5a,$80e5d - $80e5a + INCROM $80e5a, $80e5d MapDataPointers: ; 80e5d (20:4e5d) -INCBIN "baserom.gbc",$80e5d,$84000 - $80e5d + INCROM $80e5d, $84000 diff --git a/src/engine/bank3.asm b/src/engine/bank3.asm index 6fb124e..563a667 100755 --- a/src/engine/bank3.asm +++ b/src/engine/bank3.asm @@ -65,7 +65,7 @@ LoadMap: ; c000 (3:4000) bit 4, [hl] jr z, .asm_c0b6 ld a, $c - call Func_3796 + call PlaySFX jp .asm_c037 .asm_c0b6 farcall Func_10ab4 @@ -336,7 +336,7 @@ Func_c268: ; c268 (3:4268) ret Unknown_c27c: ; c27c (3:427c) -INCBIN "baserom.gbc",$c27c,$c280 - $c27c + INCROM $c27c, $c280 Func_c280: ; c280 (3:4280) call Func_c228 @@ -440,7 +440,7 @@ Func_c335: ; c335 (3:4335) ld hl, $cb30 ld de, $d0cc ld bc, $0040 - call CopyData_SaveRegisters + call CopyDataHLtoDE_SaveRegisters ret Func_c34e: ; c34e (3:434e) @@ -451,7 +451,7 @@ Func_c34e: ; c34e (3:434e) ld hl, $d0cc ld de, $cb30 ld bc, $0040 - call CopyData_SaveRegisters + call CopyDataHLtoDE_SaveRegisters call Func_0404 ret @@ -467,7 +467,7 @@ Func_c36a: ; c36a (3:436a) ret ; 0xc37a -INCBIN "baserom.gbc",$c37a,$c41c - $c37a + INCROM $c37a, $c41c Func_c41c: ; c41c (3:441c) ld a, [wd332] @@ -986,7 +986,7 @@ MainMenu_c75a: ; c75a (3:475a) call Func_c29b .asm_c76a call DoFrameIfLCDEnabled - call MenuCursorAcceptInput + call HandleMenuInput jr nc, .asm_c76a ld a, e ld [wd0b8], a @@ -1062,7 +1062,7 @@ PC_c7ea: ; c7ea (3:47ea) call Func_c241 call $4915 call DoFrameIfLCDEnabled - text_hl TurnedPCOnText + ldtx hl, TurnedPCOnText call Func_2c73 call $484e .asm_c801 @@ -1070,7 +1070,7 @@ PC_c7ea: ; c7ea (3:47ea) call Func_c29b .asm_c806 call DoFrameIfLCDEnabled - call MenuCursorAcceptInput + call HandleMenuInput jr nc, .asm_c806 ld a, e ld [wd0b9], a @@ -1089,7 +1089,7 @@ PC_c7ea: ; c7ea (3:47ea) .asm_c82f call Func_c135 call DoFrameIfLCDEnabled - text_hl TurnedPCOffText + ldtx hl, TurnedPCOffText call Func_c891 call CloseDialogueBox xor a @@ -1098,7 +1098,7 @@ PC_c7ea: ; c7ea (3:47ea) ret ; 0xc846 -INCBIN "baserom.gbc",$c846,$c891 - $c846 + INCROM $c846, $c891 Func_c891: ; c891 (3:4891) push hl @@ -1177,11 +1177,11 @@ Func_c8ed: ; c8ed (3:c8ed) ld [hli], a ld [hl], a pop hl - call Func_2af0 + call YesOrNoMenuWithText jr .asm_c911 .asm_c90e - call $2af3 + call YesOrNoMenu .asm_c911 pop de @@ -1351,7 +1351,7 @@ Func_c9e8: ; c9e8 (3:49e8) ret Unknown_ca0a: ; ca0a (3:4a04) -INCBIN "baserom.gbc",$ca0a,$ca0e - $ca0a + INCROM $ca0a, $ca0e Func_ca0e: ; ca0e (3:4a0e) ld a, [wd32e] @@ -1430,7 +1430,7 @@ CheckIfEventFlagSet: ; ca6c (3:4a6c) ret ; 0xca84 -INCBIN "baserom.gbc",$ca84,$ca8f - $ca84 + INCROM $ca84, $ca8f Func_ca8f: ; ca8f (3:4a8f) call Func_cab3 @@ -1477,7 +1477,7 @@ Func_cab3: ; cab3 (3:4ab3) ret ; 0xcac2 -INCBIN "baserom.gbc",$cac2,$cac5 - $cac2 + INCROM $cac2, $cac5 SetEventFlags: ; cac5 (3:4ac5) push bc @@ -1487,7 +1487,7 @@ SetEventFlags: ; cac5 (3:4ac5) ret ; 0xcacd -INCBIN "baserom.gbc",$cacd,$cad0 - $cacd + INCROM $cacd, $cad0 Func_cad0: ; cad0 (3:4ad0) push bc @@ -1541,7 +1541,7 @@ Func_cad8: ; cad8 (3:4ad8) ret ; 0xcb15 -INCBIN "baserom.gbc",$cb15,$cb1d - $cb15 + INCROM $cb15, $cb1d GetEventFlagMod: ; cb1d (3:4b1d) push bc @@ -1563,7 +1563,7 @@ GetEventFlagMod: ; cb1d (3:4b1d) ; offset - bytes to set or reset EventFlagMods: ; cb37 (3:4b37) -INCBIN "baserom.gbc",$cb37,$cc32 - $cb37 + INCROM $cb37, $cc32 Func_cc32: ; cc32 (3:4c32) push hl @@ -1576,7 +1576,7 @@ Func_cc32: ; cc32 (3:4c32) ret ; 0xcc3e -INCBIN "baserom.gbc",$cc3e,$cc42 - $cc3e + INCROM $cc3e, $cc42 ; called when pressing a in front of an object. creates a pointer to the data right after an RST20 ; was called, then runs RunOverworldScript to handle that data @@ -1590,7 +1590,7 @@ RST20: ; cc42 (3:4c42) ld [wBreakOWScriptLoop], a .asm_cc4f call RunOverworldScript - ld a, [wBreakOWScriptLoop] ; if you break out, it jumps + ld a, [wBreakOWScriptLoop] ; if you break out, it jumps or a jr z, .asm_cc4f ld hl, wOWScriptPointer @@ -1639,7 +1639,7 @@ SetOWScriptPointer: ; cc8b (3:4c8b) ret ; 0xcc92 -INCBIN "baserom.gbc",$cc92,$cc96 - $cc92 + INCROM $cc92, $cc96 GetOWSArgs1AfterPointer: ; cc96 (3:4c96) ld a, $1 @@ -1701,7 +1701,7 @@ OWScript_EndScriptCloseText: ; cccc (3:4ccc) pop hl ret -;args: 2-Text String Index +; args: 2-Text String Index OWScript_PrintTextString: ; ccd4 (3:4cd4) ld l, c ld h, b @@ -1781,7 +1781,7 @@ Func_cd4f: ; cd4f (3:4d4f) jr asm_cd2f Unknown_dd63: ; cd4f (3:4d4f) -INCBIN "baserom.gbc",$cd63,$cd66 - $cd63 + INCROM $cd63, $cd66 Func_cd66: ; cd66 (3:4d66) ld a, c @@ -1999,7 +1999,7 @@ Func_ceba: ; ceba (3:4eba) jp IncreaseOWScriptPointerBy1 ; 0xcedd -INCBIN "baserom.gbc",$cedd,$cee2 - $cedd + INCROM $cedd, $cee2 Func_cee2: ; cee2 (3:4ee2) call Func_c2a3 @@ -2032,7 +2032,7 @@ Func_cf0c: ; cf0c (3:4f0c) Func_cf12: ; cf12 (3:4f12) ld a, c - call $1d1d + call Func_1d1d asm_cf16 or a @@ -2207,7 +2207,7 @@ Func_cfd4: ; cfd4 (3:4fd4) dec hl jp IncreaseOWScriptPointerBy1 -INCBIN "baserom.gbc",$d006,$d00b - $d006 + INCROM $d006, $d00b Func_d00b: ; d00b (3:500b) sla c @@ -2236,7 +2236,7 @@ Func_d025: ; d025 (3:5025) Func_d032: ; d032 (3:5032) call Func_ca69 dec hl - call $1d1d + call Func_1d1d jp c, Func_cf67 jp Func_cf6d @@ -2405,7 +2405,7 @@ Func_d135: ; d135 (3:5135) ld [hl], d jp IncreaseOWScriptPointerBy2 -INCBIN "baserom.gbc",$d153,$d16b - $d153 + INCROM $d153, $d16b Func_d16b: ; d16b (3:516b) ld hl, wd0c8 @@ -2477,7 +2477,7 @@ asm_d1c6 ld [wce40], a jp IncreaseOWScriptPointerBy1 -INCBIN "baserom.gbc",$d1dc,$d209 - $d1dc + INCROM $d1dc, $d209 Func_d209: ; d209 (3:5209) call Func_ca69 @@ -2510,7 +2510,7 @@ Func_d209: ; d209 (3:5209) ld a, c jr asm_d1c6 -INCBIN "baserom.gbc",$d234,$d244 - $d234 + INCROM $d234, $d244 Func_d244: ; d244 (3:5244) ld a, c @@ -2527,7 +2527,7 @@ Func_d24c: ; d24c (3:524c) halt jp IncreaseOWScriptPointerBy1 -INCBIN "baserom.gbc",$d25e,$d271 - $d25e + INCROM $d25e, $d271 Func_d271: ; d271 (3:5271) ld hl, $527b @@ -2536,7 +2536,7 @@ Func_d271: ; d271 (3:5271) jp IncreaseOWScriptPointerBy1 ; 0xd27b -INCBIN "baserom.gbc",$d27b,$d28c - $d27b + INCROM $d27b, $d28c Func_d28c: ; d28c (3:528c) ld [$d416], a @@ -2576,7 +2576,7 @@ Func_d28c: ; d28c (3:528c) .asm_d2c1 call DoFrameIfLCDEnabled - call MenuCursorAcceptInput + call HandleMenuInput jr nc, .asm_d2c1 ld a, [hCurrentMenuItem] cp e @@ -2627,7 +2627,7 @@ Func_d2f6: ; d2f6 (3:52f6) jp IncreaseOWScriptPointerBy1 ; 0xd30c -INCBIN "baserom.gbc",$d30c,$d317 - $d30c + INCROM $d30c, $d317 Func_d317: ; d317 (3:5317) ld hl, $532b @@ -2640,7 +2640,7 @@ Func_d317: ; d317 (3:5317) jp IncreaseOWScriptPointerBy1 -INCBIN "baserom.gbc",$d32b,$d336 - $d32b + INCROM $d32b, $d336 DeckMachine_d336: ; d336 (3:5336) push bc @@ -2736,7 +2736,7 @@ Func_d3d4: ; d3d4 (3:53d4) bank1call Func_7576 jp IncreaseOWScriptPointerBy1 -INCBIN "baserom.gbc",$d3dd,$d3e0 - $d3dd + INCROM $d3dd, $d3e0 Func_d3e0: ; d3e0 (3:53e0) ld a, $1 @@ -2769,7 +2769,7 @@ Func_d40f: ; d40f (3:540f) Func_d416: ; d416 (3:5416) ld a, c - call Func_3796 + call PlaySFX jp IncreaseOWScriptPointerBy2 Func_d41d: ; d41d (3:541d) @@ -2876,7 +2876,7 @@ Func_d4ae: ; d4ae (3:54ae) cp c jr c, Func_d490 ; 0xd4b2 $dc jr Func_d48a ; 0xd4b4 $d4 - + Func_d4b6: ; d4b6 (3:54b6) ld a, c ld c, b @@ -2916,7 +2916,7 @@ asm_d4e6 jp IncreaseOWScriptPointerBy4 ; 0xd4ec -INCBIN "baserom.gbc",$d4ec,$d753 - $d4ec + INCROM $d4ec, $d753 OWSequence_d753: ; d753 (3:5753) start_script @@ -2962,10 +2962,10 @@ OWSequence_d753: ; d753 (3:5753) db $80 db $58 db $02 - + ; there's more to this script but it hasn't been disassembled yet -INCBIN "baserom.gbc",$d77e,$e13f - $d77e + INCROM $d77e, $e13f WaterClubMovePlayer: ; e13f (3:613f) ld a, [wPlayerYCoord] @@ -3029,8 +3029,8 @@ OWSequence_BeatSara: ; e18c (3:618c) run_script OWScript_PrintTextString tx Text0430 run_script OWScript_GiveBoosterPacks - db BOOSTER_ColoWater - db BOOSTER_ColoWater + db BOOSTER_COLOSSEUM_WATER + db BOOSTER_COLOSSEUM_WATER db NO_BOOSTER run_script OWScript_PrintTextString tx Text0431 @@ -3067,8 +3067,8 @@ OWSequence_BeatAmanda: ; e1b3 (03:61b3) run_script OWScript_PrintTextString tx Text0437 run_script OWScript_GiveBoosterPacks - db BOOSTER_LightningColorless - db BOOSTER_LightningColorless + db BOOSTER_MYSTERY_LIGHTNING_COLORLESS + db BOOSTER_MYSTERY_LIGHTNING_COLORLESS db NO_BOOSTER run_script OWScript_PrintTextString tx Text0438 @@ -3080,7 +3080,7 @@ OWSequence_LostToAmanda: ; e1c1 (03:61c1) tx Text0439 OWSequence_NotReadyToSeeAmy: -INCBIN "baserom.gbc",$e1c5,$e21c - $e1c5 + INCROM $e1c5, $e21c OWSequence_Joshua: start_script @@ -3113,8 +3113,8 @@ OWSequence_Joshua: run_script Func_d484 db $33 db $01 - -INCBIN "baserom.gbc",$e23f,$e52c - $e23f + + INCROM $e23f, $e52c FindEndOfBattleScript: ; e52c (3:652c) ld c, $0 @@ -3147,7 +3147,7 @@ FindEndOfBattleScript: ; e52c (3:652c) jp Func_c926 ; 0xe553 -INCBIN "baserom.gbc",$e553,$f580 - $e553 + INCROM $e553, $f580 Func_f580: ; f580 (3:7580) call Func_ca69 @@ -3183,7 +3183,7 @@ Func_f580: ; f580 (3:7580) ret ; 0xf5b3 -INCBIN "baserom.gbc",$f5b3,$fc2b - $f5b3 + INCROM $f5b3, $fc2b Func_fc2b: ; fc2b (3:7c2b) ld a, [wd0c3] @@ -3210,16 +3210,16 @@ PointerTable_fc4c: ; fc4c (3:7c4c) dw Unknown_fc68 dw Unknown_fc60 -INCBIN "baserom.gbc",$fc52,$fc60 - $fc52 + INCROM $fc52, $fc60 Unknown_fc60: ; fc60 (3:7c60) -INCBIN "baserom.gbc",$fc60,$fc64 - $fc60 + INCROM $fc60, $fc64 Unknown_fc64: ; fc64 (3:7c64) -INCBIN "baserom.gbc",$fc64,$fc68 - $fc64 + INCROM $fc64, $fc68 Unknown_fc68: ; fc68 (3:7c68) -INCBIN "baserom.gbc",$fc68,$fcad - $fc68 + INCROM $fc68, $fcad Func_fcad: ; fcad (3:7cad) -INCBIN "baserom.gbc",$fcad,$10000 - $fcad + INCROM $fcad, $10000 diff --git a/src/engine/bank4.asm b/src/engine/bank4.asm index 394804f..29d96fc 100755 --- a/src/engine/bank4.asm +++ b/src/engine/bank4.asm @@ -42,10 +42,10 @@ Func_10031: ; 10031 (4:4031) ret Func_10059: ; 10059 (4:4059) -INCBIN "baserom.gbc",$10059,$100a2 - $10059 + INCROM $10059, $100a2 Func_100a2: ; 100a2 (4:40a2) -INCBIN "baserom.gbc",$100a2,$1029e - $100a2 + INCROM $100a2, $1029e Medal_1029e: ; 1029e (4:429e) sub $8 @@ -90,7 +90,7 @@ Medal_1029e: ; 1029e (4:429e) ld a, [wd116] cp $e0 jr nz, .asm_102e2 - text_hl WonTheMedalText + ldtx hl, WonTheMedalText call Func_2c73 call Func_3c96 call Func_37a0 @@ -99,7 +99,7 @@ Medal_1029e: ; 1029e (4:429e) ret Unknown_1030b: ; 1030b (4:430b) -INCBIN "baserom.gbc",$1030b,$1031b - $1030b + INCROM $1030b, $1031b BoosterPack_1031b: ; 1031b (4:431b) ld c, a @@ -142,16 +142,16 @@ BoosterPack_1031b: ; 1031b (4:431b) pop bc ld a, c farcall GenerateBoosterPack - text_hl ReceivedBoosterPackText + ldtx hl, ReceivedBoosterPackText ld a, [wd117] cp $1 jr nz, .asm_10373 - text_hl AndAnotherBoosterPackText + ldtx hl, AndAnotherBoosterPackText .asm_10373 call Func_2c73 call Func_3c96 call Func_37a0 - text_hl CheckedCardsInBoosterPackText + ldtx hl, CheckedCardsInBoosterPackText call Func_2c73 call DisableLCD call Func_1288c @@ -168,10 +168,10 @@ BoosterPack_1031b: ; 1031b (4:431b) ret ; 0x103a5 -INCBIN "baserom.gbc",$103a5,$103d2 - $103a5 + INCROM $103a5, $103d2 Func_103d2: ; 103d2 (4:43d2) -INCBIN "baserom.gbc",$103d2,$103d3 - $103d2 + INCROM $103d2, $103d3 Duel_Init: ; 103d3 (4:43d3) ld a, [wd291] @@ -220,10 +220,10 @@ Duel_Init: ; 103d3 (4:43d3) call PlaySong call $4031 call DoFrameIfLCDEnabled - ld bc, $2f1d - ld de, $1211 - call Func_2a1a - call Func_2a00 ; wait for the user to press a or b + lb bc, $2f, $1d ; cursor tile, tile behind cursor + lb de, 18, 17 ; x, y + call SetCursorParametersForTextBox + call WaitForButtonAorB ; wait for the user to press a or b call Func_3c96 call Func_10ab4 ; fade out pop af @@ -231,13 +231,13 @@ Duel_Init: ; 103d3 (4:43d3) ret ; 0x10451 -INCBIN "baserom.gbc",$10451,$10548 - $10451 + INCROM $10451, $10548 Func_10548: ; 10548 (4:4548) -INCBIN "baserom.gbc",$10548,$10756 - $10548 + INCROM $10548, $10756 Func_10756: ; 10756 (4:4756) -INCBIN "baserom.gbc",$10756,$10a70 - $10756 + INCROM $10756, $10a70 Func_10a70: ; 10a70 (4:4a70) push hl @@ -277,13 +277,13 @@ Func_10a70: ; 10a70 (4:4a70) ret Func_10a9b: ; 10a9b (4:4a9b) -INCBIN "baserom.gbc",$10a9b,$10ab4 - $10a9b + INCROM $10a9b, $10ab4 Func_10ab4: ; 10ab4 (4:4ab4) -INCBIN "baserom.gbc",$10ab4,$10af9 - $10ab4 + INCROM $10ab4, $10af9 Func_10af9: ; 10af9 (4:4af9) -INCBIN "baserom.gbc",$10af9,$10c96 - $10af9 + INCROM $10af9, $10c96 Func_10c96: ; 10c96 (4:4c96) ld a, [$ff81] @@ -308,7 +308,7 @@ Func_10c96: ; 10c96 (4:4c96) ret ; 0x10cbb -INCBIN "baserom.gbc",$10cbb,$10dba - $10cbb + INCROM $10cbb, $10dba Func_10dba: ; 10dba (4:4dba) ld a, $1 @@ -318,7 +318,7 @@ Func_10dba: ; 10dba (4:4dba) farcall Func_111e9 .asm_10dca call DoFrameIfLCDEnabled - call MenuCursorAcceptInput + call HandleMenuInput jr nc, .asm_10dca ld a, e ld [wd0ba], a @@ -338,10 +338,10 @@ Func_10dba: ; 10dba (4:4dba) ret ; 0x10df0 -INCBIN "baserom.gbc",$10df0,$10e28 - $10df0 + INCROM $10df0, $10e28 Func_10e28: ; 10e28 (4:4e28) -INCBIN "baserom.gbc",$10e28,$10e55 - $10e28 + INCROM $10e28, $10e55 Func_10e55: ; 10e55 (4:4e55) ld a, [wd336] @@ -373,7 +373,7 @@ Func_10e71: ; 10e71 (4:4e71) and A_BUTTON jr z, .asm_10e96 ld a, $2 - call Func_3796 + call PlaySFX call Func_11016 call Func_11024 jr .asm_10e96 @@ -399,14 +399,14 @@ Func_10e97: ; 10e97 (4:4e97) ld [wd32e], a call Func_10f2e ld a, $1 - call Func_3796 + call PlaySFX .asm_10eb9 pop bc pop hl ret Unknown_10ebc: ; 10ebc (4:4ebc) -INCBIN "baserom.gbc",$10ebc,$10efd - $10ebc + INCROM $10ebc, $10efd Func_10efd: ; 10efd (4:4efd) push hl @@ -429,7 +429,7 @@ Func_10efd: ; 10efd (4:4efd) ret Unknown_10f14: ; 10f14 (4:4f14) -INCBIN "baserom.gbc",$10f14,$10f2e - $10f14 + INCROM $10f14, $10f2e Func_10f2e: ; 10f2e (4:4f2e) push hl @@ -549,7 +549,7 @@ Func_11016: ; 11016 (4:5016) Func_11024: ; 11024 (4:5024) ld a, $57 - call Func_3796 + call PlaySFX ld a, [wd336] ld [wd4cf], a ld c, $f @@ -789,22 +789,22 @@ Func_11184: ; 11184 (4:5184) ret ; 0x111b3 -INCBIN "baserom.gbc",$111b3,$111e9 - $111b3 + INCROM $111b3, $111e9 Func_111e9: ; 111e9 (4:51e9) -INCBIN "baserom.gbc",$111e9,$1124d - $111e9 + INCROM $111e9, $1124d Func_1124d: ; 1124d (4:524d) -INCBIN "baserom.gbc",$1124d,$11320 - $1124d + INCROM $1124d, $11320 Func_11320: ; 11320 (4:5320) -INCBIN "baserom.gbc",$11320,$11416 - $11320 + INCROM $11320, $11416 Func_11416: ; 11416 (4:5416) -INCBIN "baserom.gbc",$11416,$11430 - $11416 + INCROM $11416, $11430 Func_11430: ; 11430 (4:5430) -INCBIN "baserom.gbc",$11430,$1157c - $11430 + INCROM $11430, $1157c Func_1157c: ; 1157c (4:557c) ld a, c @@ -831,7 +831,7 @@ Func_1157c: ; 1157c (4:557c) ; 0x115a3 -INCBIN "baserom.gbc",$115a3,$1162a - $115a3 + INCROM $115a3, $1162a INCLUDE "data/map_scripts.asm" @@ -958,9 +958,9 @@ Func_118d3: ; 118d3 (4:58d3) pop hl ret -INCLUDE "data/unknownNPCData.asm" +INCLUDE "data/npcs.asm" -INCBIN "baserom.gbc",$11f4e,$1217b - $11f4e + INCROM $11f4e, $1217b OverworldScriptTable: ; 1217b (4:617b) dw OWScript_EndScriptLoop1 @@ -1068,10 +1068,10 @@ OverworldScriptTable: ; 1217b (4:617b) dw OWScript_EndScriptLoop9 dw OWScript_EndScriptLoop10 -INCBIN "baserom.gbc",$1224b,$1229f - $1224b + INCROM $1224b, $1229f Unknown_1229f: ; 1229f (4:629f) -INCBIN "baserom.gbc",$1229f,$126d1 - $1229f + INCROM $1229f, $126d1 Func_126d1: ; 126d1 (4:66d1) call Func_099c @@ -1164,19 +1164,19 @@ Func_1277e: ; 1277e (4:677e) ret ; 0x1279a -INCBIN "baserom.gbc",$1279a,$12871 - $1279a + INCROM $1279a, $12871 Func_12871: ; 12871 (4:6871) -INCBIN "baserom.gbc",$12871,$1288c - $12871 + INCROM $12871, $1288c Func_1288c: ; 1288c (4:688c) -INCBIN "baserom.gbc",$1288c,$128a9 - $1288c + INCROM $1288c, $128a9 Func_128a9: ; 128a9 (4:68a9) -INCBIN "baserom.gbc",$128a9,$1296e - $128a9 + INCROM $128a9, $1296e Func_1296e: ; 1296e (4:696e) -INCBIN "baserom.gbc",$1296e,$1299f - $1296e + INCROM $1296e, $1299f Func_1299f: ; 1299f (4:699f) push af @@ -1245,10 +1245,10 @@ Func_129d9: ; 129d9 (4:69d9) ret ; 0x129fa -INCBIN "baserom.gbc",$129fa,$12a21 - $129fa + INCROM $129fa, $12a21 Func_12a21: ; 12a21 (4:6a21) -INCBIN "baserom.gbc",$12a21,$12ab5 - $12a21 + INCROM $12a21, $12ab5 Func_12ab5: ; 12ab5 (4:6ab5) push hl @@ -1266,7 +1266,7 @@ Func_12ab5: ; 12ab5 (4:6ab5) ret ; 0x12ac9 -INCBIN "baserom.gbc",$12ac9,$12ae2 - $12ac9 + INCROM $12ac9, $12ae2 Func_12ae2: ; 12ae2 (4:6ae2) push bc @@ -1409,10 +1409,10 @@ Func_12b89: ; 12b89 (4:6b89) ret Func_12ba7: ; 12ba7 (4:6ba7) -INCBIN "baserom.gbc",$12ba7,$12bcd - $12ba7 + INCROM $12ba7, $12bcd Func_12bcd: ; 12bcd (4:6bcd) -INCBIN "baserom.gbc",$12bcd,$12c05 - $12bcd + INCROM $12bcd, $12c05 Func_12c05: ; 12c05 (4:6c05) push hl @@ -1487,29 +1487,29 @@ Func_12c4f: ; 12c4f (4:6c4f) ret Func_12c5e: ; 12c5e (4:6c5e) -INCBIN "baserom.gbc",$12c5e,$12c7f - $12c5e + INCROM $12c5e, $12c7f Func_12c7f: ; 12c7f (4:6c7f) -INCBIN "baserom.gbc",$12c7f,$131b3 - $12c7f + INCROM $12c7f, $131b3 Func_131b3: ; 131b3 (4:71b3) -INCBIN "baserom.gbc",$131b3,$131d3 - $131b3 + INCROM $131b3, $131d3 Func_131d3: ; 131d3 (4:71d3) -INCBIN "baserom.gbc",$131d3,$1344d - $131d3 + INCROM $131d3, $1344d Func_1344d: ; 1344d (4:744d) call Func_379b ld a, MUSIC_MEDAL call PlaySong - text_hl DefeatedFiveOpponentsText + ldtx hl, DefeatedFiveOpponentsText call Func_2c73 call Func_3c96 call Func_37a0 ret ; 0x13462 -INCBIN "baserom.gbc",$13462,$13485 - $13462 + INCROM $13462, $13485 Func_13485: ; 13485 (4:7485) call EnableExtRAM @@ -1524,11 +1524,11 @@ Func_13485: ; 13485 (4:7485) call Func_379b ld a, MUSIC_MEDAL call PlaySong - text_hl ConsecutiveWinRecordIncreasedText + ldtx hl, ConsecutiveWinRecordIncreasedText call Func_2c73 call Func_3c96 call Func_37a0 ret ; 0x134b1 -INCBIN "baserom.gbc",$134b1,$14000 - $134b1 + INCROM $134b1, $14000 diff --git a/src/engine/bank5.asm b/src/engine/bank5.asm index d65c21b..3f0e5a2 100755 --- a/src/engine/bank5.asm +++ b/src/engine/bank5.asm @@ -1,323 +1,323 @@ -PointerTable_14000: ; 14000 (05:4000)
- dw $47bd ; SAMS_PRACTICE_DECK
- dw PointerTable_14668 ; PRACTICE_PLAYER_DECK
- dw PointerTable_14668 ; SAMS_NORMAL_DECK
- dw PointerTable_14668 ; CHARMANDER_AND_FRIENDS_DECK
- dw PointerTable_14668 ; CHARMANDER_EXTRA_DECK
- dw PointerTable_14668 ; SQUIRTLE_AND_FRIENDS_DECK
- dw PointerTable_14668 ; SQUIRTLE_EXTRA_DECK
- dw PointerTable_14668 ; BULBASAUR_AND_FRIENDS_DECK
- dw PointerTable_14668 ; BULBASAUR_EXTRA_DECK
- dw PointerTable_14668 ; LIGHTNING_AND_FIRE_DECK
- dw PointerTable_14668 ; WATER_AND_FIGHTING_DECK
- dw PointerTable_14668 ; GRASS_AND_PSYCHIC_DECK
- dw $49e8 ; LEGENDARY_MOLTRES_DECK
- dw $4b0f ; LEGENDARY_ZAPDOS_DECK
- dw $4c0b ; LEGENDARY_ARTICUNO_DECK
- dw $4d60 ; LEGENDARY_DRAGONITE_DECK
- dw $4e89 ; FIRST_STRIKE_DECK
- dw $4f0e ; ROCK_CRUSHER_DECK
- dw $4f8f ; GO_GO_RAIN_DANCE_DECK
- dw $5019 ; ZAPPING_SELFDESTRUCT_DECK
- dw $509b ; FLOWER_POWER_DECK
- dw $5122 ; STRANGE_PSYSHOCK_DECK
- dw $51ad ; WONDERS_OF_SCIENCE_DECK
- dw $5232 ; FIRE_CHARGE_DECK
- dw $52bd ; IM_RONALD_DECK
- dw $534b ; POWERFUL_RONALD_DECK
- dw $53e8 ; INVINCIBLE_RONALD_DECK
- dw $546f ; LEGENDARY_RONALD_DECK
- dw $48dc ; MUSCLES_FOR_BRAINS_DECK
- dw PointerTable_14668 ; HEATED_BATTLE_DECK
- dw PointerTable_14668 ; LOVE_TO_BATTLE_DECK
- dw PointerTable_14668 ; EXCAVATION_DECK
- dw PointerTable_14668 ; BLISTERING_POKEMON_DECK
- dw PointerTable_14668 ; HARD_POKEMON_DECK
- dw PointerTable_14668 ; WATERFRONT_POKEMON_DECK
- dw PointerTable_14668 ; LONELY_FRIENDS_DECK
- dw PointerTable_14668 ; SOUND_OF_THE_WAVES_DECK
- dw PointerTable_14668 ; PIKACHU_DECK
- dw PointerTable_14668 ; BOOM_BOOM_SELFDESTRUCT_DECK
- dw PointerTable_14668 ; POWER_GENERATOR_DECK
- dw PointerTable_14668 ; ETCETERA_DECK
- dw PointerTable_14668 ; FLOWER_GARDEN_DECK
- dw PointerTable_14668 ; KALEIDOSCOPE_DECK
- dw PointerTable_14668 ; GHOST_DECK
- dw PointerTable_14668 ; NAP_TIME_DECK
- dw PointerTable_14668 ; STRANGE_POWER_DECK
- dw PointerTable_14668 ; FLYIN_POKEMON_DECK
- dw PointerTable_14668 ; LOVELY_NIDORAN_DECK
- dw PointerTable_14668 ; POISON_DECK
- dw PointerTable_14668 ; ANGER_DECK
- dw PointerTable_14668 ; FLAMETHROWER_DECK
- dw PointerTable_14668 ; RESHUFFLE_DECK
- dw $48dc ; IMAKUNI_DECK
-; 1406a
-
-INCBIN "baserom.gbc",$1406a,$14226 - $1406a
-
-Func_14226: ; 14226 (5:4226)
- call CreateHandCardBuffer
- ld hl, wDuelCardOrAttackList
-.checkForNextPokemon
- ld a, [hli]
- ld [$ff98], a
- cp $ff
- ret z
- call LoadDeckCardToBuffer1
- ld a, [wLoadedCard1Type]
- cp FIRE_ENERGY_CARD
- jr nc, .checkForNextPokemon
- ld a, [wLoadedCard1Stage]
- or a
- jr nz, .checkForNextPokemon
- push hl
- ld a, [$ff98]
- call $1485
- pop hl
- jr .checkForNextPokemon
-; 0x1424b
-
-INCBIN "baserom.gbc",$1424b,$14663 - $1424b
-
-Func_14663: ; 14663 (5:4663)
- farcall Func_200e5
- ret
-
-; GENERAL DECK POINTER LIST - Not sure on all of these.
-; This is an example of an AI pointer table, there's one for each AI type.
-PointerTable_14668: ; 14668 (05:4668)
- dw Func_14674 ; not used
- dw Func_14674 ; general AI for battles
- dw Func_14678 ; basic pokemon placement / cheater shuffling on better AI
- dw Func_1467f
- dw Func_14683
- dw Func_14687
-
-; when battle AI gets called
-Func_14674: ; 14674 (5:4674)
- call Func_1468b
- ret
-
-Func_14678: ; 14678 (5:4678)
- call Func_15636
- call $4226
- ret
-
-Func_1467f: ; 1467f (5:467f)
- call $5b72
- ret
-
-Func_14683: ; 14683 (5:4683)
- call $5b72
- ret
-
-Func_14687: ; 14687 (5:4687)
- call $41e5
- ret
-
-; AI for general decks i think
-Func_1468b: ; 1468b (5:468b)
- call Func_15649
- ld a, $1
- call Func_14663
- farcallx $8, $67d3
- jp nc, $4776
- farcallx $8, $6790
- farcallx $8, $66a3
- farcallx $8, $637f
- ret c
- farcallx $8, $662d
- ld a, $2
- call Func_14663
- ld a, $3
- call Func_14663
- ld a, $4
- call Func_14663
- call $5eae
- ret c
- ld a, $5
- call Func_14663
- ld a, $6
- call Func_14663
- ld a, $7
- call Func_14663
- ld a, $8
- call Func_14663
- call $4786
- ld a, $a
- call Func_14663
- ld a, $b
- call Func_14663
- ld a, $c
- call Func_14663
- ld a, [wAlreadyPlayedEnergy]
- or a
- jr nz, .asm_146ed
- call $64e8
-
-.asm_146ed
- call $5eae
- farcallx $8, $66a3
- farcallx $8, $637f
- ret c
- farcallx $8, $6790
- ld a, $d
- farcallx $8, $619b
- ld a, $d
- call Func_14663
- ld a, $f
- call Func_14663
- ld a, [$ce20]
- and $4
- jr z, .asm_14776
- ld a, $1
- call Func_14663
- ld a, $2
- call Func_14663
- ld a, $3
- call Func_14663
- ld a, $4
- call Func_14663
- call $5eae
- ret c
- ld a, $5
- call Func_14663
- ld a, $6
- call Func_14663
- ld a, $7
- call Func_14663
- ld a, $8
- call Func_14663
- call $4786
- ld a, $a
- call Func_14663
- ld a, $b
- call Func_14663
- ld a, $c
- call Func_14663
- ld a, [wAlreadyPlayedEnergy]
- or a
- jr nz, .asm_1475b
- call $64e8
-
-.asm_1475b
- call $5eae
- farcallx $8, $66a3
- farcallx $8, $637f
- ret c
- farcallx $8, $6790
- ld a, $d
- farcallx $8, $619b
- ld a, $d
- call Func_14663
-
-.asm_14776
- ld a, $e
- farcallx $8, $619b
- call $69f8
- ret c
- ld a, $5
- bank1call $67be
- ret
-; 0x14786
-
-
-INCBIN "baserom.gbc",$14786,$15636 - $14786
-Func_15636: ; 15636 (5:5636)
- ld a, $10
- ld hl, $cda5
- call ZeroData
- ld a, $5
- ld [$cda6], a
- ld a, $ff
- ld [$cda5], a
- ret
-
-Func_15649: ; 15649 (5:5649)
- ld a, [$cda6]
- inc a
- ld [$cda6], a
- xor a
- ld [$ce20], a
- ld [$cddb], a
- ld [$cddc], a
- ld [$ce03], a
- ld a, [wcc10]
- cp $ff
- jr z, .asm_156b1
- or a
- jr z, .asm_156b1
- ld a, [wcc11]
- cp $ff
- jr z, .asm_156b1
- call SwapTurn
- call GetCardInDeckPosition
- call SwapTurn
- ld a, e
- cp MEWTWO1 ; I believe this is a check for Mewtwo1's Barrier move
- jr nz, .asm_156b1
- ld a, [$cda7]
- bit 7, a
- jr nz, .asm_156aa
- inc a
- ld [$cda7], a
- cp $3
- jr c, .asm_156c2
- ld a, (wPlayerArenaCard & $FF)
- call GetNonTurnDuelistVariable
- call SwapTurn
- call GetCardInDeckPosition
- call SwapTurn
- ld a, e
- cp MEWTWO1
- jr nz, .asm_156a4
- farcallx $8, $67a9
- jr nc, .asm_156aa
-
-.asm_156a4
- xor a
- ld [$cda7], a
- jr .asm_156c2
-
-.asm_156aa
- ld a, $80
- ld [$cda7], a
- jr .asm_156c2
-
-.asm_156b1
- ld a, [$cda7]
- bit 7, a
- jr z, .asm_156be
- inc a
- ld [$cda7], a
- jr .asm_156c2
-
-.asm_156be
- xor a
- ld [$cda7], a
-
-.asm_156c2
- ret
-; 0x156c3
-
-INCBIN "baserom.gbc",$156c3,$1575e - $156c3
-
-; zeroes a bytes starting at hl
-ZeroData: ; 1575e (5:575e)
- push af
- push bc
- push hl
- ld b, a
- xor a
-.clearLoop
- ld [hli], a
- dec b
- jr nz, .clearLoop
- pop hl
- pop bc
- pop af
- ret
-; 0x1576b
-
-INCBIN "baserom.gbc",$1576b,$18000 - $1576b
+PointerTable_14000: ; 14000 (05:4000) + dw $47bd ; SAMS_PRACTICE_DECK + dw PointerTable_14668 ; PRACTICE_PLAYER_DECK + dw PointerTable_14668 ; SAMS_NORMAL_DECK + dw PointerTable_14668 ; CHARMANDER_AND_FRIENDS_DECK + dw PointerTable_14668 ; CHARMANDER_EXTRA_DECK + dw PointerTable_14668 ; SQUIRTLE_AND_FRIENDS_DECK + dw PointerTable_14668 ; SQUIRTLE_EXTRA_DECK + dw PointerTable_14668 ; BULBASAUR_AND_FRIENDS_DECK + dw PointerTable_14668 ; BULBASAUR_EXTRA_DECK + dw PointerTable_14668 ; LIGHTNING_AND_FIRE_DECK + dw PointerTable_14668 ; WATER_AND_FIGHTING_DECK + dw PointerTable_14668 ; GRASS_AND_PSYCHIC_DECK + dw $49e8 ; LEGENDARY_MOLTRES_DECK + dw $4b0f ; LEGENDARY_ZAPDOS_DECK + dw $4c0b ; LEGENDARY_ARTICUNO_DECK + dw $4d60 ; LEGENDARY_DRAGONITE_DECK + dw $4e89 ; FIRST_STRIKE_DECK + dw $4f0e ; ROCK_CRUSHER_DECK + dw $4f8f ; GO_GO_RAIN_DANCE_DECK + dw $5019 ; ZAPPING_SELFDESTRUCT_DECK + dw $509b ; FLOWER_POWER_DECK + dw $5122 ; STRANGE_PSYSHOCK_DECK + dw $51ad ; WONDERS_OF_SCIENCE_DECK + dw $5232 ; FIRE_CHARGE_DECK + dw $52bd ; IM_RONALD_DECK + dw $534b ; POWERFUL_RONALD_DECK + dw $53e8 ; INVINCIBLE_RONALD_DECK + dw $546f ; LEGENDARY_RONALD_DECK + dw $48dc ; MUSCLES_FOR_BRAINS_DECK + dw PointerTable_14668 ; HEATED_BATTLE_DECK + dw PointerTable_14668 ; LOVE_TO_BATTLE_DECK + dw PointerTable_14668 ; EXCAVATION_DECK + dw PointerTable_14668 ; BLISTERING_POKEMON_DECK + dw PointerTable_14668 ; HARD_POKEMON_DECK + dw PointerTable_14668 ; WATERFRONT_POKEMON_DECK + dw PointerTable_14668 ; LONELY_FRIENDS_DECK + dw PointerTable_14668 ; SOUND_OF_THE_WAVES_DECK + dw PointerTable_14668 ; PIKACHU_DECK + dw PointerTable_14668 ; BOOM_BOOM_SELFDESTRUCT_DECK + dw PointerTable_14668 ; POWER_GENERATOR_DECK + dw PointerTable_14668 ; ETCETERA_DECK + dw PointerTable_14668 ; FLOWER_GARDEN_DECK + dw PointerTable_14668 ; KALEIDOSCOPE_DECK + dw PointerTable_14668 ; GHOST_DECK + dw PointerTable_14668 ; NAP_TIME_DECK + dw PointerTable_14668 ; STRANGE_POWER_DECK + dw PointerTable_14668 ; FLYIN_POKEMON_DECK + dw PointerTable_14668 ; LOVELY_NIDORAN_DECK + dw PointerTable_14668 ; POISON_DECK + dw PointerTable_14668 ; ANGER_DECK + dw PointerTable_14668 ; FLAMETHROWER_DECK + dw PointerTable_14668 ; RESHUFFLE_DECK + dw $48dc ; IMAKUNI_DECK +; 1406a + + INCROM $1406a, $14226 + +Func_14226: ; 14226 (5:4226) + call CreateHandCardBuffer + ld hl, wDuelCardOrAttackList +.checkForNextPokemon + ld a, [hli] + ld [$ff98], a + cp $ff + ret z + call LoadDeckCardToBuffer1 + ld a, [wLoadedCard1Type] + cp TYPE_ENERGY_FIRE + jr nc, .checkForNextPokemon + ld a, [wLoadedCard1Stage] + or a + jr nz, .checkForNextPokemon + push hl + ld a, [$ff98] + call Func_1485 + pop hl + jr .checkForNextPokemon +; 0x1424b + + INCROM $1424b, $14663 + +Func_14663: ; 14663 (5:4663) + farcall Func_200e5 + ret + +; GENERAL DECK POINTER LIST - Not sure on all of these. +; This is an example of an AI pointer table, there's one for each AI type. +PointerTable_14668: ; 14668 (05:4668) + dw Func_14674 ; not used + dw Func_14674 ; general AI for battles + dw Func_14678 ; basic pokemon placement / cheater shuffling on better AI + dw Func_1467f + dw Func_14683 + dw Func_14687 + +; when battle AI gets called +Func_14674: ; 14674 (5:4674) + call Func_1468b + ret + +Func_14678: ; 14678 (5:4678) + call Func_15636 + call $4226 + ret + +Func_1467f: ; 1467f (5:467f) + call $5b72 + ret + +Func_14683: ; 14683 (5:4683) + call $5b72 + ret + +Func_14687: ; 14687 (5:4687) + call $41e5 + ret + +; AI for general decks i think +Func_1468b: ; 1468b (5:468b) + call Func_15649 + ld a, $1 + call Func_14663 + farcallx $8, $67d3 + jp nc, $4776 + farcallx $8, $6790 + farcallx $8, $66a3 + farcallx $8, $637f + ret c + farcallx $8, $662d + ld a, $2 + call Func_14663 + ld a, $3 + call Func_14663 + ld a, $4 + call Func_14663 + call $5eae + ret c + ld a, $5 + call Func_14663 + ld a, $6 + call Func_14663 + ld a, $7 + call Func_14663 + ld a, $8 + call Func_14663 + call $4786 + ld a, $a + call Func_14663 + ld a, $b + call Func_14663 + ld a, $c + call Func_14663 + ld a, [wAlreadyPlayedEnergy] + or a + jr nz, .asm_146ed + call $64e8 + +.asm_146ed + call $5eae + farcallx $8, $66a3 + farcallx $8, $637f + ret c + farcallx $8, $6790 + ld a, $d + farcallx $8, $619b + ld a, $d + call Func_14663 + ld a, $f + call Func_14663 + ld a, [$ce20] + and $4 + jr z, .asm_14776 + ld a, $1 + call Func_14663 + ld a, $2 + call Func_14663 + ld a, $3 + call Func_14663 + ld a, $4 + call Func_14663 + call $5eae + ret c + ld a, $5 + call Func_14663 + ld a, $6 + call Func_14663 + ld a, $7 + call Func_14663 + ld a, $8 + call Func_14663 + call $4786 + ld a, $a + call Func_14663 + ld a, $b + call Func_14663 + ld a, $c + call Func_14663 + ld a, [wAlreadyPlayedEnergy] + or a + jr nz, .asm_1475b + call $64e8 + +.asm_1475b + call $5eae + farcallx $8, $66a3 + farcallx $8, $637f + ret c + farcallx $8, $6790 + ld a, $d + farcallx $8, $619b + ld a, $d + call Func_14663 + +.asm_14776 + ld a, $e + farcallx $8, $619b + call $69f8 + ret c + ld a, $5 + bank1call $67be + ret +; 0x14786 + + + INCROM $14786, $15636 +Func_15636: ; 15636 (5:5636) + ld a, $10 + ld hl, $cda5 + call ZeroData + ld a, $5 + ld [$cda6], a + ld a, $ff + ld [$cda5], a + ret + +Func_15649: ; 15649 (5:5649) + ld a, [$cda6] + inc a + ld [$cda6], a + xor a + ld [$ce20], a + ld [$cddb], a + ld [$cddc], a + ld [$ce03], a + ld a, [wcc10] + cp $ff + jr z, .asm_156b1 + or a + jr z, .asm_156b1 + ld a, [wcc11] + cp $ff + jr z, .asm_156b1 + call SwapTurn + call GetCardInDeckPosition + call SwapTurn + ld a, e + cp MEWTWO1 ; I believe this is a check for Mewtwo1's Barrier move + jr nz, .asm_156b1 + ld a, [$cda7] + bit 7, a + jr nz, .asm_156aa + inc a + ld [$cda7], a + cp $3 + jr c, .asm_156c2 + ld a, (wPlayerArenaCard & $FF) + call GetNonTurnDuelistVariable + call SwapTurn + call GetCardInDeckPosition + call SwapTurn + ld a, e + cp MEWTWO1 + jr nz, .asm_156a4 + farcallx $8, $67a9 + jr nc, .asm_156aa + +.asm_156a4 + xor a + ld [$cda7], a + jr .asm_156c2 + +.asm_156aa + ld a, $80 + ld [$cda7], a + jr .asm_156c2 + +.asm_156b1 + ld a, [$cda7] + bit 7, a + jr z, .asm_156be + inc a + ld [$cda7], a + jr .asm_156c2 + +.asm_156be + xor a + ld [$cda7], a + +.asm_156c2 + ret +; 0x156c3 + + INCROM $156c3, $1575e + +; zeroes a bytes starting at hl +ZeroData: ; 1575e (5:575e) + push af + push bc + push hl + ld b, a + xor a +.clearLoop + ld [hli], a + dec b + jr nz, .clearLoop + pop hl + pop bc + pop af + ret +; 0x1576b + + INCROM $1576b, $18000 diff --git a/src/engine/bank6.asm b/src/engine/bank6.asm index c66e669..6428c3f 100755 --- a/src/engine/bank6.asm +++ b/src/engine/bank6.asm @@ -1,8 +1,8 @@ -INCBIN "baserom.gbc",$18000,$186f7 - $18000 + INCROM $18000, $186f7 INCLUDE "data/effect_commands.asm" -INCBIN "baserom.gbc",$18f9c,$1996e - $18f9c + INCROM $18f9c, $1996e Func_1996e: ; 1996e (6:596e) call EnableExtRAM @@ -108,7 +108,7 @@ Func_19a12: ; 19a12 (6:5a12) ret ; 0x19a1f -INCBIN "baserom.gbc",$19a1f,$1a61f - $19a1f + INCROM $19a1f, $1a61f Func_1a61f: ; 1a61f (6:661f) push af @@ -124,23 +124,23 @@ Func_1a61f: ; 1a61f (6:661f) ld a, $76 call $663b ld a, $c1 - text_hl ReceivedLegendaryCardText + ldtx hl, ReceivedLegendaryCardText jr .asm_1a660 .asm_1a640 - text_hl ReceivedCardText + ldtx hl, ReceivedCardText cp $1e jr z, .asm_1a660 cp $43 jr z, .asm_1a660 - text_hl ReceivedPromotionalFlyingPikachuText + ldtx hl, ReceivedPromotionalFlyingPikachuText cp $64 jr z, .asm_1a660 - text_hl ReceivedPromotionalSurfingPikachuText + ldtx hl, ReceivedPromotionalSurfingPikachuText cp $65 jr z, .asm_1a660 cp $66 jr z, .asm_1a660 - text_hl ReceivedPromotionalCardText + ldtx hl, ReceivedPromotionalCardText .asm_1a660 push hl ld e, a @@ -167,13 +167,13 @@ Func_1a61f: ; 1a61f (6:661f) ret ; 0x1a68d -INCBIN "baserom.gbc",$1a68d,$1a6cc - $1a68d + INCROM $1a68d, $1a6cc Func_1a6cc: ; 1a6cc (6:66cc) ret ; 0x1a6cd -INCBIN "baserom.gbc",$1a6cd,$1ad89 - $1a6cd + INCROM $1a6cd, $1ad89 Func_1ad89: ; 1ad89 (6:6d89) -INCBIN "baserom.gbc",$1ad89,$1c000 - $1ad89 + INCROM $1ad89, $1c000 diff --git a/src/engine/bank7.asm b/src/engine/bank7.asm index 160092d..9d2d603 100755 --- a/src/engine/bank7.asm +++ b/src/engine/bank7.asm @@ -1,4 +1,4 @@ -INCBIN "baserom.gbc",$1c000,$1c056 - $1c000 + INCROM $1c000, $1c056 Func_1c056: ; 1c056 (7:4056) push hl @@ -48,7 +48,7 @@ Func_1c056: ; 1c056 (7:4056) pop hl ret -INCLUDE "data/warp_data.asm" +INCLUDE "data/warps.asm" Func_1c33b: ; 1c33b (7:433b) push hl @@ -91,7 +91,7 @@ Func_1c33b: ; 1c33b (7:433b) INCLUDE "data/map_songs.asm" Func_1c440: ; 1c440 (7:4440) -INCBIN "baserom.gbc",$1c440,$1c455 - $1c440 + INCROM $1c440, $1c455 Func_1c455: ; 1c455 (7:4455) push hl @@ -129,13 +129,13 @@ Func_1c477: ; 1c477 (7:4477) ret Func_1c485: ; 1c485 (7:4485) -INCBIN "baserom.gbc",$1c485,$1c50a - $1c485 + INCROM $1c485, $1c50a Func_1c50a: ; 1c50a (7:450a) push hl call Func_1c719 ld a, [wd3aa] - call $39a7 + call Func_39a7 ld a, [hl] or a jr z, .asm_1c52c @@ -224,16 +224,16 @@ Func_1c57b: ; 1c57b (7:457b) ret Func_1c58e: ; 1c58e (7:458e) -INCBIN "baserom.gbc",$1c58e,$1c5e9 - $1c58e + INCROM $1c58e, $1c5e9 Func_1c5e9: ; 1c5e9 (7:45e9) -INCBIN "baserom.gbc",$1c5e9,$1c610 - $1c5e9 + INCROM $1c5e9, $1c610 Func_1c610: ; 1c610 (7:4610) -INCBIN "baserom.gbc",$1c610,$1c6f8 - $1c610 + INCROM $1c610, $1c6f8 Func_1c6f8: ; 1c6f8 (7:46f8) -INCBIN "baserom.gbc",$1c6f8,$1c719 - $1c6f8 + INCROM $1c6f8, $1c719 Func_1c719: ; 1c719 (7:4719) push hl @@ -251,7 +251,7 @@ Func_1c719: ; 1c719 (7:4719) ret Func_1c72e: ; 1c72e (7:472e) -INCBIN "baserom.gbc",$1c72e,$1c768 - $1c72e + INCROM $1c72e, $1c768 Func_1c768: ; 1c768 (7:4768) push hl @@ -265,7 +265,7 @@ Func_1c768: ; 1c768 (7:4768) ld a, $02 farcall Func_c29b ld a, [wd3aa] - call $39a7 + call Func_39a7 ld a, [hl] farcall Func_1187d pop hl @@ -334,10 +334,10 @@ Func_1c7de: ; 1c7de (7:47de) ret ; 0x1c7e4 -INCBIN "baserom.gbc",$1c7e4,$1c82e - $1c7e4 + INCROM $1c7e4, $1c82e Func_1c82e: ; 1c82e (7:482e) -INCBIN "baserom.gbc",$1c82e,$1c83d - $1c82e + INCROM $1c82e, $1c83d Func_1c83d: ; 1c83d (7:483d) push hl @@ -367,7 +367,7 @@ Func_1c83d: ; 1c83d (7:483d) ret ; 0x1c858 -INCBIN "baserom.gbc",$1c858,$1d078 - $1c858 + INCROM $1c858, $1d078 Func_1d078: ; 1d078 (7:5078) ld a, [wd627] @@ -406,7 +406,7 @@ Func_1d078: ; 1d078 (7:5078) and A_BUTTON | START jr z, .asm_1d095 ld a, $2 - call Func_3796 + call PlaySFX farcall Func_10ab4 .asm_1d0c7 @@ -436,7 +436,7 @@ Func_1d078: ; 1d078 (7:5078) ret ; 0x1d0fa -INCBIN "baserom.gbc",$1d0fa,$1d11c - $1d0fa + INCROM $1d0fa, $1d11c Func_1d11c: ; 1d11c (7:511c) ld a, MUSIC_PCMAINMENU @@ -466,7 +466,7 @@ Func_1d11c: ; 1d11c (7:511c) .asm_1d15a call DoFrameIfLCDEnabled call UpdateRNGSources - call MenuCursorAcceptInput + call HandleMenuInput push af call $51e9 pop af @@ -486,10 +486,10 @@ Func_1d11c: ; 1d11c (7:511c) ret ; 0x1d17f -INCBIN "baserom.gbc",$1d17f,$1d306 - $1d17f + INCROM $1d17f, $1d306 Func_1d306: ; 1d306 (7:5306) -INCBIN "baserom.gbc",$1d306,$1d386 - $1d306 + INCROM $1d306, $1d386 Titlescreen_1d386: ; 1d386 (7:5386) call Func_378a @@ -509,10 +509,10 @@ Titlescreen_1d386: ; 1d386 (7:5386) ret Func_1d3a9: ; 1d3a9 (7:53a9) -INCBIN "baserom.gbc",$1d3a9,$1d42e - $1d3a9 + INCROM $1d3a9, $1d42e Func_1d42e: ; 1d42e (7:542e) -INCBIN "baserom.gbc",$1d42e,$1d519 - $1d42e + INCROM $1d42e, $1d519 Titlescreen_1d519: ; 1d519 (7:5519) ld a, MUSIC_TITLESCREEN @@ -522,10 +522,10 @@ Titlescreen_1d519: ; 1d519 (7:5519) ret ; 0x1d523 -INCBIN "baserom.gbc",$1d523,$1d59c - $1d523 + INCROM $1d523, $1d59c Func_1d59c: ; 1d59c (7:559c) -INCBIN "baserom.gbc",$1d59c,$1d6ad - $1d59c + INCROM $1d59c, $1d6ad Credits_1d6ad: ; 1d6ad (7:56ad) ld a, MUSIC_STOP @@ -563,4 +563,4 @@ Credits_1d6ad: ; 1d6ad (7:56ad) ret ; 0x1d705 -INCBIN "baserom.gbc",$1d705,$1e1c4 - $1d705 + INCROM $1d705, $1e1c4 diff --git a/src/engine/bank8.asm b/src/engine/bank8.asm index fca29ba..aa47756 100755 --- a/src/engine/bank8.asm +++ b/src/engine/bank8.asm @@ -1,132 +1,132 @@ -INCBIN "baserom.gbc",$20000,$200e5 - $20000
-
-; 0 - e4 is a big set of data, seems to be one entry for each card
-
-Func_200e5: ; 200e5 (8:40e5)
- ld [$ce18], a
- call CreateHandCardBuffer
- ld hl, wDuelCardOrAttackList
- ld de, wHandCardBuffer
- call CopyBuffer
- ld hl, wHandCardBuffer
- ld a, [hli]
- ld [$ce16], a
- cp $ff
- ret z
- push hl
- ld a, [$ce18]
- ld d, a
- ld hl, $4000
-.asm_4106
- xor a
- ld [$ce21], a
- ld a, [hli]
- cp $ff
- jp z, $41b1
- cp d
- jp nz, .incHL5
- ld a, [hli]
- ld [$ce17], a
- ld a, [$ce16]
- call LoadDeckCardToBuffer1
- cp $d2
- jr nz, .asm_2012b
- ld b, a
- ld a, [$ce20]
- and $2
- jr nz, .incHL4
- ld a, b
-
-.asm_2012b
- ld b, a
- ld a, [$ce17]
- cp b
- jr nz, .incHL4
- push hl
- push de
- ld a, [$ce16]
- ld [$ff9f], a
- bank1call $35a9
- jp c, $41a8
- call $1944
- ld a, $1
- call TryExecuteEffectCommandFunction
- jp c, $41a8
- farcallx $5, $743b
- jr c, .asm_201a8
- pop de
- pop hl
- push hl
- call CallIndirect
- pop hl
- jr nc, .incHL4
- inc hl
- inc hl
- ld [$ce19], a
- push de
- push hl
- ld a, [$ce16]
- ld [$ff9f], a
- ld a, $6
- bank1call $67be
- pop hl
- pop de
- jr c, .incHL2
- push hl
- call CallIndirect
- pop hl
- inc hl
- inc hl
- ld a, [$ce20]
- ld b, a
- ld a, [$ce21]
- or b
- ld [$ce20], a
- pop hl
- and $8
- jp z, $40f7
- call $123b
- ld hl, wDuelCardOrAttackList
- ld de, $cf68
- call $697b
- ld hl, $cf68
- ld a, [$ce20]
- and $f7
- ld [$ce20], a
- jp $40f7
-
-.incHL5
- inc hl
-
-.incHL4
- inc hl
- inc hl
-
-.incHL2
- inc hl
- inc hl
- jp .asm_4106
-
-.asm_201a8
- pop de
- pop hl
- inc hl
- inc hl
- inc hl
- inc hl
- jp .asm_4106
-; 0x201b1
-
-INCBIN "baserom.gbc",$201b1,$2297b - $201b1
-
-; copies $ff terminated buffer from hl to de
-CopyBuffer: ; 2297b (8:697b)
- ld a, [hli]
- ld [de], a
- cp $ff
- ret z
- inc de
- jr CopyBuffer
-; 0x22983
-
-INCBIN "baserom.gbc",$22983,$24000 - $22983
+ INCROM $20000, $200e5 + +; 0 - e4 is a big set of data, seems to be one entry for each card + +Func_200e5: ; 200e5 (8:40e5) + ld [$ce18], a + call CreateHandCardBuffer + ld hl, wDuelCardOrAttackList + ld de, wHandCardBuffer + call CopyBuffer + ld hl, wHandCardBuffer + ld a, [hli] + ld [$ce16], a + cp $ff + ret z + push hl + ld a, [$ce18] + ld d, a + ld hl, $4000 +.asm_4106 + xor a + ld [$ce21], a + ld a, [hli] + cp $ff + jp z, $41b1 + cp d + jp nz, .incHL5 + ld a, [hli] + ld [$ce17], a + ld a, [$ce16] + call LoadDeckCardToBuffer1 + cp $d2 + jr nz, .asm_2012b + ld b, a + ld a, [$ce20] + and $2 + jr nz, .incHL4 + ld a, b + +.asm_2012b + ld b, a + ld a, [$ce17] + cp b + jr nz, .incHL4 + push hl + push de + ld a, [$ce16] + ld [$ff9f], a + bank1call $35a9 + jp c, $41a8 + call Func_1944 + ld a, $1 + call TryExecuteEffectCommandFunction + jp c, $41a8 + farcallx $5, $743b + jr c, .asm_201a8 + pop de + pop hl + push hl + call CallIndirect + pop hl + jr nc, .incHL4 + inc hl + inc hl + ld [$ce19], a + push de + push hl + ld a, [$ce16] + ld [$ff9f], a + ld a, $6 + bank1call $67be + pop hl + pop de + jr c, .incHL2 + push hl + call CallIndirect + pop hl + inc hl + inc hl + ld a, [$ce20] + ld b, a + ld a, [$ce21] + or b + ld [$ce20], a + pop hl + and $8 + jp z, $40f7 + call CreateHandCardBuffer + ld hl, wDuelCardOrAttackList + ld de, $cf68 + call $697b + ld hl, $cf68 + ld a, [$ce20] + and $f7 + ld [$ce20], a + jp $40f7 + +.incHL5 + inc hl + +.incHL4 + inc hl + inc hl + +.incHL2 + inc hl + inc hl + jp .asm_4106 + +.asm_201a8 + pop de + pop hl + inc hl + inc hl + inc hl + inc hl + jp .asm_4106 +; 0x201b1 + + INCROM $201b1, $2297b + +; copies $ff terminated buffer from hl to de +CopyBuffer: ; 2297b (8:697b) + ld a, [hli] + ld [de], a + cp $ff + ret z + inc de + jr CopyBuffer +; 0x22983 + + INCROM $22983, $24000 diff --git a/src/engine/booster_packs.asm b/src/engine/booster_packs.asm new file mode 100644 index 0000000..e3180fe --- /dev/null +++ b/src/engine/booster_packs.asm @@ -0,0 +1,566 @@ +GenerateBoosterPack: ; 1e1c4 (7:61c4) + push hl + push bc + push de + ld [wBoosterIndex], a +.noCardsFoundLoop + call InitBoosterData + call GenerateBoosterEnergies + call GenerateBoosterNonEnergies + jr c, .noCardsFoundLoop + call PutEnergiesAndNonEnergiesTogether + call AddBoosterCardsToCollection + pop de + pop bc + pop hl + ret + +; generate all Pokemon or Trainer cards (if any) for the current booster pack +GenerateBoosterNonEnergies: ; 1e1df (7:61df) + ld a, STAR + ld [wBoosterCurRarity], a +.generateCardLoop + call FindCurRarityChance + ld a, [hl] + or a + jr z, .noMoreOfCurrentRarity + call FindCardsInSetAndRarity + call FindTotalTypeChances + or a + jr z, .noValidCards + call Random + call DetermineBoosterCardType + call FindBoosterCard + call UpdateBoosterCardTypesChanceByte + call AddBoosterCardToDrawnNonEnergies + call FindCurRarityChance + dec [hl] + jr .generateCardLoop +.noMoreOfCurrentRarity + ld a, [wBoosterCurRarity] + dec a + ld [wBoosterCurRarity], a + bit 7, a ; any rarity left to check? + jr z, .generateCardLoop + or a + ret +.noValidCards + rst $38 + scf + ret + +; return hl pointing to wBoosterData<Rarity>Amount[wBoosterCurRarity] +FindCurRarityChance: ; 1e219 (7:6219) + push bc + ld hl, wBoosterDataCommonAmount + ld a, [wBoosterCurRarity] + ld c, a + ld b, $0 + add hl, bc + pop bc + ret + +FindCardsInSetAndRarity: ; 1e226 (7:6226) + ld c, NUM_BOOSTER_CARD_TYPES + ld hl, wBoosterAmountOfCardTypeTable + xor a +.deleteTypeTableLoop + ld [hli], a + dec c + jr nz, .deleteTypeTableLoop + xor a + ld hl, wBoosterViableCardList + ld [hl], a + ld de, $1 +.checkCardViableLoop + push de + ld a, e + ld [wBoosterTempCard], a + call IsByteInTempCardCollectionZero + jr c, .finishedWithCurrentCard + call CheckCardViable + jr c, .finishedWithCurrentCard + ld a, [wBoosterCurrentCardType] + call GetCardType + push af + push hl + ld c, a + ld b, $00 + ld hl, wBoosterAmountOfCardTypeTable + add hl, bc + inc [hl] + pop hl + ld a, [wBoosterTempCard] + ld [hli], a + pop af + ld [hli], a + xor a + ld [hl], a +.finishedWithCurrentCard + pop de + inc e + ld a, e + cp NUM_CARDS + 1 + jr c, .checkCardViableLoop + ret + +CheckCardViable: ; 1e268 (7:6268) + push bc + ld a, e + call GetCardHeader + ld [wBoosterCurrentCardType], a + ld a, b + ld [wBoosterCurrentCardRarity], a + ld a, c + ld [wBoosterCurrentCardSet], a + ld a, [wBoosterCurrentCardRarity] + ld c, a + ld a, [wBoosterCurRarity] + cp c + jr nz, .invalidCard + ld a, [wBoosterCurrentCardType] + call GetCardType + cp BOOSTER_CARD_TYPE_ENERGY + jr z, .returnValidCard + ld a, [wBoosterCurrentCardSet] + swap a + and $0f + ld c, a + ld a, [wBoosterDataSet] + cp c + jr nz, .invalidCard +.returnValidCard + or a + jr .return +.invalidCard + scf +.return + pop bc + ret + +; Map a card's TYPE_* constant given in a to its BOOSTER_CARD_TYPE_* constant +GetCardType: ; 1e2a0 (7:62a0) + push hl + push bc + ld hl, CardTypeTable + cp NUM_CARD_TYPES + jr nc, .loadType + ld c, a + ld b, $00 + add hl, bc +.loadType + ld a, [hl] + pop bc + pop hl + ret + +CardTypeTable: ; 1e2b1 (7:62b1) + db BOOSTER_CARD_TYPE_FIRE ; TYPE_PKMN_FIRE + db BOOSTER_CARD_TYPE_GRASS ; TYPE_PKMN_GRASS + db BOOSTER_CARD_TYPE_LIGHTNING ; TYPE_PKMN_LIGHTNING + db BOOSTER_CARD_TYPE_WATER ; TYPE_PKMN_WATER + db BOOSTER_CARD_TYPE_FIGHTING ; TYPE_PKMN_FIGHTING + db BOOSTER_CARD_TYPE_PSYCHIC ; TYPE_PKMN_PSYCHIC + db BOOSTER_CARD_TYPE_COLORLESS ; TYPE_PKMN_COLORLESS + db BOOSTER_CARD_TYPE_TRAINER ; TYPE_PKMN_UNUSED + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_FIRE + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_GRASS + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_LIGHTNING + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_WATER + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_FIGHTING + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_PSYCHIC + db BOOSTER_CARD_TYPE_ENERGY ; TYPE_ENERGY_COLORLESS + db BOOSTER_CARD_TYPE_TRAINER ; TYPE_ENERGY_UNUSED + db BOOSTER_CARD_TYPE_TRAINER ; TYPE_TRAINER + +FindTotalTypeChances: ; 1e2c2 (7:62c2) + ld c, NUM_BOOSTER_CARD_TYPES + xor a + ld hl, wBoosterTempTypeChanceTable +.deleteTempTypeChanceTableLoop + ld [hli], a + dec c + jr nz, .deleteTempTypeChanceTableLoop + ld [wd4ca], a + ld bc, $00 +.checkIfTypeIsValid + push bc + ld hl, wBoosterAmountOfCardTypeTable + add hl, bc + ld a, [hl] + or a + jr z, .amountOfTypeOrChanceZero + ld hl, wBoosterDataTypeChances + add hl, bc + ld a, [hl] + or a + jr z, .amountOfTypeOrChanceZero + ld hl, wBoosterTempTypeChanceTable + add hl, bc + ld [hl], a + ld a, [wd4ca] + add [hl] + ld [wd4ca], a +.amountOfTypeOrChanceZero + pop bc + inc c + ld a, c + cp NUM_BOOSTER_CARD_TYPES + jr c, .checkIfTypeIsValid + ld a, [wd4ca] + ret + +DetermineBoosterCardType: ; 1e2fa (7:62fa) + ld [wd4ca], a + ld c, $00 + ld hl, wBoosterTempTypeChanceTable +.loopThroughCardTypes + ld a, [hl] + or a + jr z, .skipNoChanceType + ld a, [wd4ca] + sub [hl] + ld [wd4ca], a + jr c, .foundCardType +.skipNoChanceType + inc hl + inc c + ld a, c + cp a, NUM_BOOSTER_CARD_TYPES + jr c, .loopThroughCardTypes + ld a, BOOSTER_CARD_TYPE_ENERGY +.foundCardType + ld a, c + ld [wBoosterSelectedCardType], a + ret + +FindBoosterCard: ; 1e31d (7:631d) + ld a, [wBoosterSelectedCardType] + ld c, a + ld b, $00 + ld hl, wBoosterAmountOfCardTypeTable + add hl, bc + ld a, [hl] + call Random + ld [wd4ca], a + ld hl, wBoosterViableCardList +.findMatchingCardLoop + ld a, [hli] + or a + jr z, .noValidCardFound + ld [wBoosterTempCard], a + ld a, [wBoosterSelectedCardType] + cp [hl] + jr nz, .cardIncorrectType + ld a, [wd4ca] + or a + jr z, .returnWithCurrentCard + dec a + ld [wd4ca], a +.cardIncorrectType + inc hl + jr .findMatchingCardLoop +.returnWithCurrentCard + or a + ret +.noValidCardFound + rst $38 + scf + ret + +; lowers the chance of getting the same type multiple times. +; more specifically, when a card of type T is drawn, T's new chances become +; min (1, wBoosterDataTypeChances[T] - wBoosterAveragedTypeChances). +UpdateBoosterCardTypesChanceByte: ; 1e350 (7:6350) + push hl + push bc + ld a, [wBoosterSelectedCardType] + ld c, a + ld b, $00 + ld hl, wBoosterDataTypeChances + add hl, bc + ld a,[wBoosterAveragedTypeChances] + ld c, a + ld a, [hl] + sub c + ld [hl], a + jr z, .chanceLessThanOne + jr nc, .stillSomeChanceLeft +.chanceLessThanOne + ld a, $01 + ld [hl], a +.stillSomeChanceLeft + pop bc + pop hl + ret + +; generates between 0 and 10 energy cards for the current booster. +; the amount of energies and their probabilities vary with each booster. +GenerateBoosterEnergies: ; 1e3db (7:63db) + ld hl, wBoosterDataEnergyFunctionPointer + 1 + ld a, [hld] + or a + jr z, .noFunctionPointer + ld l, [hl] + ld h, a + jp hl +.noFunctionPointer + ld a, [hl] + or a + ret z ; return if no hardcoded energy either + push af + call AddBoosterEnergyToDrawnEnergies + pop af + ret + +AddBoosterEnergyToDrawnEnergies: ; 1e380 (7:6380) + ld [wBoosterTempCard], a + call AddBoosterCardToDrawnEnergies + ret + +; generates a random energy card +GenerateEndingEnergy: ; 1e387 (7:6387) + ld a, COLORLESS - FIRE + call Random + add a, $01 + jr AddBoosterEnergyToDrawnEnergies + +; generates a booster with 10 random energies +GenerateRandomEnergyBooster: ; 1e390 (7:6390) + ld a, NUM_CARDS_IN_BOOSTER +.generateEnergyLoop + push af + call GenerateEndingEnergy + pop af + dec a + jr nz, .generateEnergyLoop + jr ZeroBoosterRarityData + +GenerateEnergyBoosterLightningFire: ; 1e39c (7:639c) + ld hl, EnergyBoosterLightningFireData + jr GenerateTwoTypesEnergyBooster + +GenerateEnergyBoosterWaterFighting: ; 1e3a1 (7:63a1) + ld hl, EnergyBoosterWaterFightingData + jr GenerateTwoTypesEnergyBooster + +GenerateEnergyBoosterGrassPsychic: ; 1e3a6 (7:63a6) + ld hl, EnergyBoosterGrassPsychicData + jr GenerateTwoTypesEnergyBooster + +; generates a booster with 5 energies of 2 different types each +GenerateTwoTypesEnergyBooster: ; 1e3ab (7:63ab) + ld b, $02 +.addTwoEnergiesToBoosterLoop + ld c, NUM_CARDS_IN_BOOSTER / 2 +.addEnergyToBoosterLoop + push hl + push bc + ld a, [hl] + call AddBoosterEnergyToDrawnEnergies + pop bc + pop hl + dec c + jr nz, .addEnergyToBoosterLoop + inc hl + dec b + jr nz, .addTwoEnergiesToBoosterLoop +ZeroBoosterRarityData: + xor a + ld [wBoosterDataCommonAmount], a + ld [wBoosterDataUncommonAmount], a + ld [wBoosterDataRareAmount], a + ret + +EnergyBoosterLightningFireData: + db LIGHTNING_ENERGY, FIRE_ENERGY +EnergyBoosterWaterFightingData: + db WATER_ENERGY, FIGHTING_ENERGY +EnergyBoosterGrassPsychicData: + db GRASS_ENERGY, PSYCHIC_ENERGY + +AddBoosterCardToDrawnEnergies: ; 1e3cf (7:63cf) + push hl + ld hl, wBoosterTempEnergiesDrawn + call CopyToFirstEmptyByte + call AddBoosterCardToTempCardCollection + pop hl + ret + +AddBoosterCardToDrawnNonEnergies: ; 1e3db (7:63db) + push hl + ld hl, wBoosterTempNonEnergiesDrawn + call CopyToFirstEmptyByte + call AddBoosterCardToTempCardCollection + pop hl + ret + +CopyToFirstEmptyByte: ; 1e3e7 (7:63e7) + ld a, [hli] + or a + jr nz, CopyToFirstEmptyByte + dec hl + ld a, [wBoosterTempCard] + ld [hli], a + xor a + ld [hl], a + ret + +; trim empty slots in wBoosterCardsDrawn between regular cards and energies +PutEnergiesAndNonEnergiesTogether: ; 1e3f3 (7:63f3) + push hl + ld hl, wBoosterTempEnergiesDrawn +.loopThroughExtraCards + ld a, [hli] + or a + jr z, .endOfCards + ld [wBoosterTempCard], a + push hl + ld hl, wBoosterTempNonEnergiesDrawn + call CopyToFirstEmptyByte + pop hl + jr .loopThroughExtraCards +.endOfCards + pop hl + ret + +AddBoosterCardsToCollection:; 1e40a (7:640a) + push hl + ld hl, wBoosterCardsDrawn +.addCardsLoop + ld a, [hli] + or a + jr z, .noCardsLeft + call AddCardToCollection + jr .addCardsLoop +.noCardsLeft + pop hl + ret + +AddBoosterCardToTempCardCollection: ; 1e419 (7:6419) + push hl + ld h, wTempCardCollection >> 8 + ld a, [wBoosterTempCard] + ld l, a + inc [hl] + pop hl + ret + +IsByteInTempCardCollectionZero: ; 1e423 (7:6423) + push hl + ld h, wTempCardCollection >> 8 + ld a, [wBoosterTempCard] + ld l, a + ld a, [hl] + pop hl + cp $01 + ccf + ret + +; clears wBoosterCardsDrawn and wTempCardCollection +; copies booster data to wBoosterData* *CurSet, *EnergyFunctionPointer, and *TypeChances +; copies rarity amounts to wBoosterData*Amount and averages them into wBoosterAveragedTypeChances +InitBoosterData: ; 1e430 (7:6430) + ld c, wBoosterCardsDrawnEnd - wBoosterCardsDrawn + ld hl, wBoosterCardsDrawn + xor a +.clearPlayerDeckLoop + ld [hli], a + dec c + jr nz, .clearPlayerDeckLoop + ld c, $00 ; $100 + ld hl, wTempCardCollection + xor a +.clearTempCardCollectionLoop + ld [hli], a + dec c + jr nz, .clearTempCardCollectionLoop + call FindBoosterDataPointer + ld de, wBoosterDataSet + ld bc, wBoosterDataTypeChances - wBoosterDataSet + NUM_BOOSTER_CARD_TYPES ; Pack2 - Pack1 + call CopyDataHLtoDE ; load booster pack data to wram + call LoadRarityAmountsToWram + ld bc, $0 + ld d, NUM_BOOSTER_CARD_TYPES + ld e, $0 + ld hl, wBoosterDataTypeChances +.addChanceBytesLoop + ld a, [hli] + or a + jr z, .skipChanceByte + add c + ld c, a + inc e +.skipChanceByte + dec d + jr nz, .addChanceBytesLoop + call DivideBCbyDE + ld a, c + ld [wBoosterAveragedTypeChances], a + ret + +FindBoosterDataPointer: ; 1e46f (7:646f) + push bc + ld a, [wBoosterIndex] + add a + ld c, a + ld b, $0 + ld hl, BoosterDataJumptable + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + pop bc + ret + +BoosterDataJumptable: ; 1e480 (7:6480) + dw PackColosseumNeutral + dw PackColosseumGrass + dw PackColosseumFire + dw PackColosseumWater + dw PackColosseumLightning + dw PackColosseumFighting + dw PackColosseumTrainer + dw PackEvolutionNeutral + dw PackEvolutionGrass + dw PackEvolutionNeutralFireEnergy + dw PackEvolutionWater + dw PackEvolutionFighting + dw PackEvolutionPsychic + dw PackEvolutionTrainer + dw PackMysteryNeutral + dw PackMysteryGrassColorless + dw PackMysteryWaterColorless + dw PackMysteryLightningColorless + dw PackMysteryFightingColorless + dw PackMysteryTrainerColorless + dw PackLaboratoryMostlyNeutral + dw PackLaboratoryGrass + dw PackLaboratoryWater + dw PackLaboratoryPsychic + dw PackLaboratoryTrainer + dw PackEnergyLightningFire + dw PackEnergyWaterFighting + dw PackEnergyGrassPsychic + dw PackRandomEnergies + +LoadRarityAmountsToWram: ; 1e4ba (7:64ba) + ld a, [wBoosterDataSet] + add a + add a + ld c, a + ld b, $00 + ld hl, BoosterSetRarityAmountTable + add hl, bc + inc hl + ld a, [hli] + ld [wBoosterDataCommonAmount], a + ld a, [hli] + ld [wBoosterDataUncommonAmount], a + ld a, [hli] + ld [wBoosterDataRareAmount], a + ret + +INCLUDE "data/booster_packs.asm" + + INCROM $1e640, $20000
\ No newline at end of file diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm index 9a4b63e..dc05043 100644 --- a/src/engine/effect_functions.asm +++ b/src/engine/effect_functions.asm @@ -1,5 +1,5 @@ Poison50PercentEffect: ; 2c000 (b:4000) - text_de PoisonCheckText + ldtx de, PoisonCheckText call TossCoin_BankB ret nc @@ -11,14 +11,14 @@ PoisonEffect: ; 2c007 (b:4007) jr applyEffect Paralysis50PercentEffect: ; 2c011 (b:4011) - text_de ParalysisCheckText + ldtx de, ParalysisCheckText call TossCoin_BankB ret nc lb bc, $f0, PARALYZED jr applyEffect Confusion50PercentEffect: ; 2c01d (b:401d) - text_de ConfusionCheckText + ldtx de, ConfusionCheckText call TossCoin_BankB ret nc @@ -26,7 +26,7 @@ ConfusionEffect: ; 2c024 (b:4024) lb bc, $f0, CONFUSED jr applyEffect - text_de SleepCheckText + ldtx de, SleepCheckText call TossCoin_BankB ret nc @@ -128,7 +128,7 @@ Func_2c0a2: ; 2c0a2 (b:40a2) ret ; 0x2c0a8 -INCBIN "baserom.gbc",$2c0a8,$2c0d4 - $2c0a8 + INCROM $2c0a8, $2c0d4 ; Sets some flags for AI use ; if target double poisoned @@ -181,7 +181,7 @@ Func_2c0fb: ; 2c0fb (b:40fb) ret ; 0x2c10b -INCBIN "baserom.gbc",$2c10b,$2c140 - $2c10b + INCROM $2c10b, $2c140 ; apply a status condition of type 1 identified by register a to the target ApplySubstatus1ToDefendingCard: ; 2c140 (b:4140) @@ -218,7 +218,7 @@ ApplySubstatus2ToDefendingCard: ; 2c149 (b:4149) ret ; 0x2c166 -INCBIN "baserom.gbc",$2c166,$2c6f0 - $2c166 + INCROM $2c166, $2c6f0 SpitPoison_AIEffect: ; 2c6f0 (b:46f0) ld a, $5 @@ -227,7 +227,7 @@ SpitPoison_AIEffect: ; 2c6f0 (b:46f0) ; 0x2c6f8 SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8) - text_de PoisonCheckText + ldtx de, PoisonCheckText call TossCoin_BankB jp c, PoisonEffect ld a, $8c @@ -236,7 +236,7 @@ SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8) ret ; 0x2c70a -INCBIN "baserom.gbc",$2c70a,$2c730 - $2c70a + INCROM $2c70a, $2c730 PoisonFang_AIEffect: ; 2c730 (b:4730) ld a, $a @@ -250,10 +250,10 @@ WeepinbellPoisonPowder_AIEffect: ; 2c738 (b:4738) jp Func_2c0d4 ; 0x2c740 -INCBIN "baserom.gbc",$2c740,$2c77e - $2c740 + INCROM $2c740, $2c77e AcidEffect: ; 2c77e (b:477e) - text_de AcidCheckText + ldtx de, AcidCheckText call TossCoin_BankB ret nc ld a, SUBSTATUS2_UNABLE_RETREAT @@ -277,7 +277,7 @@ FoulOdorEffect: ; 2c793 (b:4793) ; 0x2c7a0 KakunaStiffenEffect: ; 2c7a0 (b:47a0) - text_de IfHeadsNoDamageNextTurnText + ldtx de, IfHeadsNoDamageNextTurnText call TossCoin_BankB jp nc, Func_2c0a2 ld a, $4f @@ -293,7 +293,7 @@ KakunaPoisonPowder_AIEffect: ; 2c7b4 (b:47b4) jp Func_2c0d4 ; 0x2c7bc -INCBIN "baserom.gbc",$2c7bc,$2c7d0 - $2c7bc + INCROM $2c7bc, $2c7d0 SwordsDanceEffect: ; 2c7d0 (b:47d0) ld a, [wTempTurnDuelistCardId] @@ -310,11 +310,11 @@ ZubatSupersonicEffect: ; 2c7dc (b:47dc) ret ; 0x2c7e3 -INCBIN "baserom.gbc",$2c7e3,$2c836 - $2c7e3 + INCROM $2c7e3, $2c836 ; an exact copy of KakunaStiffenEffect MetapodStiffenEffect: ; 2c836 (b:4836) - text_de IfHeadsNoDamageNextTurnText + ldtx de, IfHeadsNoDamageNextTurnText call TossCoin_BankB jp nc, Func_2c0a2 ld a, $4f @@ -324,4 +324,4 @@ MetapodStiffenEffect: ; 2c836 (b:4836) ret ; 0x2c84a -INCBIN "baserom.gbc",$2c84a,$30000 - $2c84a + INCROM $2c84a, $30000 diff --git a/src/engine/home.asm b/src/engine/home.asm index c47a7a2..2f57dce 100755 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -1,42 +1,39 @@ -GLOBAL CardGraphics -GLOBAL TextOffsets - ; rst vectors -SECTION "rst00",ROM0[0] +SECTION "rst00", ROM0 ret -SECTION "rst08",ROM0[8] +SECTION "rst08", ROM0 ret -SECTION "rst10",ROM0[$10] +SECTION "rst10", ROM0 ret -SECTION "rst18",ROM0[$18] +SECTION "rst18", ROM0 jp RST18 -SECTION "rst20",ROM0[$20] +SECTION "rst20", ROM0 jp RST20 -SECTION "rst28",ROM0[$28] +SECTION "rst28", ROM0 jp RST28 -SECTION "rst30",ROM0[$30] +SECTION "rst30", ROM0 ret -SECTION "rst38",ROM0[$38] +SECTION "rst38", ROM0 ret ; interrupts -SECTION "vblank",ROM0[$40] +SECTION "vblank", ROM0 jp VBlankHandler -SECTION "lcdc",ROM0[$48] +SECTION "lcdc", ROM0 call wLCDCFunctiontrampoline reti -SECTION "timer",ROM0[$50] +SECTION "timer", ROM0 jp TimerHandler -SECTION "serial",ROM0[$58] +SECTION "serial", ROM0 jp SerialHandler -SECTION "joypad",ROM0[$60] +SECTION "joypad", ROM0 reti -SECTION "romheader",ROM0[$100] +SECTION "romheader", ROM0 nop jp Start -SECTION "start",ROM0[$150] +SECTION "start", ROM0 Start: ; 0150 (0:0150) di ld sp, $fffe @@ -59,7 +56,7 @@ Start: ; 0150 (0:0150) call SetupVRAM call SetupLCD call SetupPalettes - call SetupSound_T + call SetupSound call SetupTimer call ResetSerial call CopyDMAFunction @@ -137,9 +134,9 @@ TimerHandler: ; 01e6 (0:01e6) set 1, [hl] ldh a, [hBankROM] push af - ld a, BANK(SoundTimerHandler_Ext) + ld a, BANK(SoundTimerHandler) call BankswitchHome - call SoundTimerHandler_Ext + call SoundTimerHandler pop af call BankswitchHome ; clear in-timer flag @@ -213,7 +210,7 @@ CheckForCGB: ; 025c (0:025c) WaitForVBlank: ; 0264 (0:0264) push hl ld a, [wLCDC] - bit 7, a + bit rLCDC_ENABLE, a jr z, .asm_275 ld hl, wVBlankCtr ld a, [hl] @@ -229,19 +226,19 @@ WaitForVBlank: ; 0264 (0:0264) ; turn LCD on EnableLCD: ; 0277 (0:0277) ld a, [wLCDC] ; - bit 7, a ; + bit rLCDC_ENABLE, a ; ret nz ; assert that LCD is off - or $80 ; + or rLCDC_ENABLE_MASK ; ld [wLCDC], a ; ld [rLCDC], a ; turn LCD on - ld a, $c0 + ld a, %11000000 ld [wFlushPaletteFlags], a ret ; wait for vblank, then turn LCD off DisableLCD: ; 028a (0:028a) ld a, [rLCDC] ; - bit 7, a ; + bit rLCDC_ENABLE, a ; ret z ; assert that LCD is on ld a, [rIE] ld [wIE], a @@ -249,7 +246,7 @@ DisableLCD: ; 028a (0:028a) ld [rIE], a ; disable vblank interrupt .asm_298 ld a, [rLY] ; - cp $91 ; + cp LY_VBLANK ; jr nz, .asm_298 ; wait for vblank ld a, [rLCDC] ; and $7f ; @@ -353,7 +350,7 @@ SetupLCD: ; 030b (0:030b) ld [wLCDC], a ld a, $1 ld [MBC3LatchClock], a - ld a, $a + ld a, SRAM_ENABLE ld [MBC3SRamEnable], a NopF: ; 0348 (0:0348) ret @@ -374,13 +371,13 @@ DetectConsole: ; 0349 (0:0349) ret nz ld a, CONSOLE_SGB ld [rSVBK], a - call Func_07e7 + call SwitchToCGBDoubleSpeed ret ; initialize the palettes (both monochrome and color) SetupPalettes: ; 036a (0:036a) ld hl, wBGP - ld a, $e4 + ld a, %11100100 ld [rBGP], a ld [hli], a ld [rOBP0], a @@ -422,8 +419,8 @@ SetupVRAM: ; 03a1 (0:03a1) call .asm_3b2 call BankswitchVRAM_0 .asm_3b2 - ld hl, $8000 - ld bc, $1800 + ld hl, vTiles0 + ld bc, vBGMapTiles - vTiles0 .asm_3b8 xor a ld [hli], a @@ -436,8 +433,8 @@ SetupVRAM: ; 03a1 (0:03a1) ; fill VARM tile map banks with [wTileMapFill] FillTileMap: ; 03c0 (0:03c0) call BankswitchVRAM_0 - ld hl, $9800 - ld bc, $0400 + ld hl, vBGMapTiles + ld bc, vBGMapAttrs - vBGMapTiles .asm_3c9 ld a, [wTileMapFill] ld [hli], a @@ -449,8 +446,8 @@ FillTileMap: ; 03c0 (0:03c0) cp CONSOLE_CGB ret nz call BankswitchVRAM_1 - ld hl, $9800 - ld bc, $0400 + ld hl, vBGMapTiles + ld bc, vBGMapAttrs - vBGMapTiles .asm_3e1 xor a ld [hli], a @@ -463,23 +460,23 @@ FillTileMap: ; 03c0 (0:03c0) ; zero work RAM, stack area & high RAM ($C000-$DFFF, $FF80-$FFEF) ZeroRAM: ; 03ec (0:03ec) - ld hl, wTempCardCollection - ld bc, $2000 -.asm_3f2 + ld hl, $c000 + ld bc, $e000 - $c000 +.zero_wram_loop xor a ld [hli], a dec bc ld a, c or b - jr nz, .asm_3f2 - ld c, $80 - ld b, $70 + jr nz, .zero_wram_loop + ld c, LOW($ff80) + ld b, $fff0 - $ff80 xor a -.asm_3fe +.zero_hram_loop ld [$ff00+c], a inc c dec b - jr nz, .asm_3fe + jr nz, .zero_hram_loop ret Func_0404: ; 0404 (0:0404) @@ -601,7 +598,7 @@ Func_0492: ; 0492 (0:0492) ld b, a ld a, [hli] ld c, a - call Func_04cf + call BCCoordToBGMap0Address jr .asm_49d .asm_49b ld [de], a @@ -630,7 +627,9 @@ SGB_ATTR_BLK_04bf: ; 04bf (0:04bf) sgb ATTR_BLK, 1 ; sgb_command, length db $01,$03,$00,$00,$00,$13,$11,$00,$00,$00,$00,$00,$00,$00,$00 -Func_04cf: ; 04cf (0:04cf) +; returns vBGMapTiles + BG_MAP_WIDTH * c + b in de. +; used to map coordinates at bc to a BGMap0 address. +BCCoordToBGMap0Address: ; 04cf (0:04cf) ld l, c ld h, $0 add hl, hl @@ -639,7 +638,7 @@ Func_04cf: ; 04cf (0:04cf) add hl, hl add hl, hl ld c, b - ld b, $98 + ld b, HIGH(vBGMapTiles) add hl, bc ld e, l ld d, h @@ -735,13 +734,13 @@ DoFrame: ; 053f (0:053f) ldh a, [hButtonsPressed] and SELECT jr z, .done -.gamePausedLoop +.game_paused_loop call WaitForVBlank call ReadJoypad call HandleDPadRepeat ldh a, [hButtonsPressed] and SELECT - jr z, .gamePausedLoop + jr z, .game_paused_loop .done pop bc pop de @@ -825,7 +824,85 @@ CallHL: ; 05c1 (0:05c1) jp hl ; 0x5c2 -INCBIN "baserom.gbc",$05c2,$0663 - $05c2 +Func_05c2: ; 5c2 (0:5c2) + push hl + push bc + push de + ld hl, wcaa0 + push hl + push bc + call Func_0614 + pop bc + call BCCoordToBGMap0Address + pop hl + ld b, $02 + call JumpToHblankCopyDataHLtoDE + pop de + pop bc + pop hl + ret +; 0x5db + +Func_05db: ; 5db (0:5db) + push hl + push bc + push de + ld hl, wcaa0 + push hl + push bc + call Func_061b + pop bc + call BCCoordToBGMap0Address + pop hl + ld b, $01 + call JumpToHblankCopyDataHLtoDE + pop de + pop bc + pop hl + ret +; 0x5f4 + +Func_05f4: ; 5f4 (0:5f4) + push hl + push bc + push de + ld e, l + ld d, h + ld hl, wcaa0 + push hl + push bc + ld a, d + call Func_0614 + ld a, e + call Func_0614 + pop bc + call BCCoordToBGMap0Address + pop hl + ld b, $04 + call JumpToHblankCopyDataHLtoDE + pop de + pop bc + pop hl + ret +; 0x614 + +Func_0614: ; 614 (0:614) + push af + swap a + call Func_061b + pop af +Func_061b: + and $0f + add $30 + cp $3a + jr c, .asm_625 + add $07 +.asm_625 + ld [hli], a + ret +; 0x627 + + INCROM $0627, $0663 Func_0663: ; 0663 (0:0663) push bc @@ -861,47 +938,114 @@ Func_0686: ; 0686 (0:0686) ret ; 0x695 -INCBIN "baserom.gbc",$0695,$06c3 - $0695 +Func_0695: ; 0695 (0:0695) + call Func_069d + bit 7, [hl] + jr z, Func_0695 + ret +; 0x69d + +Func_069d: ; 069d (0:069d) + ld b, [hl] + inc hl + ld c, [hl] + inc hl + push hl + push bc + ld b, $ff +.asm_6a5 + inc b + ld a, [hli] + or a + jr nz, .asm_6a5 + ld a, b + pop bc + push af + call BCCoordToBGMap0Address + pop af + ld b, a + pop hl + or a + jr z, .asm_6bd + push bc + push hl + call SafeCopyDataHLtoDE + pop hl + pop bc + +.asm_6bd + inc b + ld c, b + ld b, $0 + add hl, bc + ret +; 0x6c3 Func_06c3: ; 06c3 (0:06c3) push af ld a, [wLCDC] rla - jr c, .asm_6d8 + jr c, .lcd_on pop af push hl push de push bc push af - call Func_04cf + call BCCoordToBGMap0Address pop af ld [de], a pop bc pop de pop hl ret -.asm_6d8 +.lcd_on pop af push hl push de push bc - ld hl, $cac1 + ld hl, wcac1 push hl ld [hl], a - call Func_04cf + call BCCoordToBGMap0Address pop hl ld b, $1 - call MemcpyHLDE_hblank + call HblankCopyDataHLtoDE pop bc pop de pop hl ret ; 0x6ee -INCBIN "baserom.gbc",$06ee,$0709 - $06ee +; copy a bytes of data from hl to vBGMap0 address pointed to by coord at bc +Func_06ee: ; 06ee (0:06ee) + push bc + push hl + push af + call BCCoordToBGMap0Address + pop af + ld b, a + pop hl + call SafeCopyDataHLtoDE + pop bc + ret +; 0x6fc -Func_0709: ; 0709 (0:0709) - jp MemcpyHLDE_hblank +; memcpy(DE, HL, B) +; if LCD on, copy during h-blank only +SafeCopyDataHLtoDE: ; 6fc (0:6fc) + ld a, [wLCDC] + rla + jr c, JumpToHblankCopyDataHLtoDE +.lcd_off_loop + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .lcd_off_loop + ret +JumpToHblankCopyDataHLtoDE: ; 0709 (0:0709) + jp HblankCopyDataHLtoDE +; 0x70c CopyGfxData: ; 070c (0:070c) ld a, [wLCDC] @@ -912,7 +1056,7 @@ CopyGfxData: ; 070c (0:070c) push hl push de ld b, c - call Func_0709 + call JumpToHblankCopyDataHLtoDE ld b, $0 pop hl add hl, bc @@ -937,25 +1081,25 @@ CopyGfxData: ; 070c (0:070c) jr nz, .asm_726 ret -CopyData_SaveRegisters: ; 0732 (0:0732) +CopyDataHLtoDE_SaveRegisters: ; 0732 (0:0732) push hl push de push bc - call CopyData + call CopyDataHLtoDE pop bc pop de pop hl ret ; copies bc bytes from hl to de -CopyData: ; 073c (0:073c) +CopyDataHLtoDE: ; 073c (0:073c) ld a, [hli] ld [de], a inc de dec bc ld a, c or b - jr nz, CopyData + jr nz, CopyDataHLtoDE ret ; switch to rombank (A + top2 of H shifted down), @@ -1059,7 +1203,7 @@ BankswitchRAM: ; 07a9 (0:07a9) push af ldh [hBankRAM], a ld [MBC3SRamBank], a - ld a, $a + ld a, SRAM_ENABLE ld [MBC3SRamEnable], a pop af ret @@ -1067,7 +1211,7 @@ BankswitchRAM: ; 07a9 (0:07a9) ; enable external RAM EnableExtRAM: ; 07b6 (0:07b6) push af - ld a, $a + ld a, SRAM_ENABLE ld [MBC3SRamEnable], a pop af ret @@ -1075,7 +1219,7 @@ EnableExtRAM: ; 07b6 (0:07b6) ; disable external RAM DisableExtRAM: ; 07be (0:07be) push af - xor a + xor a ; SRAM_DISABLE ld [MBC3SRamEnable], a pop af ret @@ -1106,14 +1250,22 @@ BankswitchVRAM: ; 07d6 (0:07d6) ret ; 0x7db -INCBIN "baserom.gbc",$07db,$07e7 - $07db +SwitchToCGBNormalSpeed: ; 7db (0:7db) + call CheckForCGB + ret c + ld hl, rKEY1 + bit 7, [hl] + ret z + jr CGBSpeedSwitch -Func_07e7: ; 07e7 (0:07e7) +SwitchToCGBDoubleSpeed: ; 07e7 (0:07e7) call CheckForCGB ret c ld hl, rKEY1 bit 7, [hl] ret nz +; fallthrough +CGBSpeedSwitch: ; 07f1 (0:07f1) ld a, [rIE] push af xor a @@ -1223,7 +1375,7 @@ HtimesL: ; 0879 (0:0879) ret ; 0x88f -; return a random number between 0 and a in a +; return a random number between 0 and a (exclusive) in a Random: ; 088f (0:088f) push hl ld h, a @@ -1391,7 +1543,7 @@ Func_08ef: ; 08ef (0:08ef) jr .asm_93c ; 0x950 -INCBIN "baserom.gbc",$0950,$099c - $0950 + INCROM $0950, $099c Func_099c: ; 099c (0:099c) xor a @@ -1453,7 +1605,18 @@ Func_09ce: ; 09ce (0:09ce) ret ; 0x9dc -INCBIN "baserom.gbc",$09dc,$09e9 - $09dc +SwitchToBankAtSP: ; 9dc (0:9dc) + push af + push hl + ld hl, sp+$04 + ld a, [hl] + call BankswitchHome + pop hl + pop af + inc sp + inc sp + ret +; 0x9e9 ; this function affects the stack so that it returns ; to the three byte pointer following the rst call @@ -1660,7 +1823,48 @@ SGB_MLT_REQ_2: ; 0bbb (0:0bbb) sgb MLT_REQ, 1 ; sgb_command, length db $01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 -INCBIN "baserom.gbc",$0bcb,$0c08 - $0bcb +Func_0bcb: ; 0bcb (0:0bcb) + di + push de +.wait_vbalnk + ld a, [rLY] + cp LY_VBLANK + 3 + jr nz, .wait_vbalnk + ld a, $43 + ld [rLCDC], a + ld a, %11100100 + ld [rBGP], a + ld de, vTiles1 + ld bc, vBGMapTiles - vTiles1 +.loop + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .loop + ld hl, vBGMapTiles + ld de, $000c + ld a, $80 + ld c, $d +.asm_bf3 + ld b, $14 +.asm_bf5 + ld [hli], a + inc a + dec b + jr nz, .asm_bf5 + add hl, de + dec c + jr nz, .asm_bf3 + ld a, $c3 + ld [rLCDC], a + pop hl + call SendSGB + ei + ret +; 0xc08 ; loops 63000 * bc cycles (~15 * bc ms) Wait: ; 0c08 (0:0c08) @@ -1680,7 +1884,7 @@ Wait: ; 0c08 (0:0c08) ret ; memcpy(DE, HL, B), but only during hblank -MemcpyHLDE_hblank: ; 0c19 (0:0c19) +HblankCopyDataHLtoDE: ; 0c19 (0:0c19) push bc .loop ei @@ -1701,30 +1905,30 @@ MemcpyHLDE_hblank: ; 0c19 (0:0c19) pop bc ret -; memcpy(HL, DE, B), but only during hblank -MemcpyDEHL_hblank: ; 0c32 (0:0c32) +; memcpy(HL, DE, C), but only during hblank +HblankCopyDataDEtoHL: ; 0c32 (0:0c32) push bc -.asm_c33 +.loop ei di ld a, [rSTAT] and $3 - jr nz, .asm_c33 + jr nz, .loop ld a, [de] ld [hl], a ld a, [rSTAT] and $3 - jr nz, .asm_c33 + jr nz, .loop ei inc hl inc de dec c - jr nz, .asm_c33 + jr nz, .loop pop bc ret ; 0xc4b -INCBIN "baserom.gbc",$0c4b,$0c91 - $0c4b + INCROM $0c4b, $0c91 ; called at roughly 240Hz by TimerHandler SerialTimerHandler: ; 0c91 (0:0c91) @@ -1764,7 +1968,7 @@ SerialTimerHandler: ; 0c91 (0:0c91) ret ; 0xcc5 -INCBIN "baserom.gbc",$0cc5,$0d26 - $0cc5 + INCROM $0cc5, $0d26 SerialHandler: ; 0d26 (0:0d26) push af @@ -2093,14 +2297,40 @@ Func_0ebf: ; 0ebf (0:0ebf) ret ; 0xed5 -INCBIN "baserom.gbc",$0ed5,$0f35 - $0ed5 +Func_0ed5: ; 0ed5 (0:0ed5) + push bc +.asm_ed6 + call Func_0e39 + jr nc, .asm_edf + halt + nop + jr .asm_ed6 +.asm_edf + ld [hli], a + ld a, [wSerialFlags] + or a + jr nz, .asm_eee + dec bc + ld a, c + or b + jr nz, .asm_ed6 + pop bc + or a + ret +.asm_eee + pop bc + scf + ret +; 0xef1 + + INCROM $0ef1, $0f35 Func_0f35: ; 0f35 (0:0f35) ld a, [wSerialFlags] ld l, a ld h, $0 call Func_2ec4 - text_hl TransmissionErrorText + ldtx hl, TransmissionErrorText call DrawWideTextBox_WaitForInput ld a, $ff ld [wd0c3], a @@ -2143,18 +2373,28 @@ Func_0f7f: ; 0f7f (0:0f7f) ld a, DUELVARS_DUELIST_TYPE call GetNonTurnDuelistVariable cp DUELIST_TYPE_LINK_OPP - jr nz, .notLink + jr nz, .not_link ld hl, $ff9e ld bc, $000a call Func_0ebf call Func_0f58 -.notLink +.not_link pop bc pop hl ret ; 0xf9b -INCBIN "baserom.gbc",$0f9b,$0fac - $0f9b +Func_0f9b: ; 0f9b (0:0f9b) + push hl + push bc + ld hl, $ff9e + ld bc, $000a + call Func_0ed5 + call Func_0f58 + pop bc + pop hl + ret +; 0xfac Func_0fac: ; 0fac (0:0fac) push hl @@ -2177,7 +2417,7 @@ Func_0fac: ; 0fac (0:0fac) push de push hl push af - ld hl, $cbed + ld hl, wcbed pop de ld [hl], e inc hl @@ -2196,7 +2436,7 @@ Func_0fac: ; 0fac (0:0fac) ld [hl], c inc hl ld [hl], b - ld hl, $cbed + ld hl, wcbed ld bc, $0008 call Func_0ebf jp c, Func_0f35 @@ -2207,7 +2447,34 @@ Func_0fac: ; 0fac (0:0fac) ret ; 0xfe9 -INCBIN "baserom.gbc",$0fe9,$100b - $0fe9 +Func_0fe9: ; 0fe9 (0:0fe9) + ld hl, wcbed + ld bc, $0008 + push hl + call Func_0ed5 + jp c, Func_0f35 + pop hl + ld e, [hl] + inc hl + ld d, [hl] + inc hl + push de + ld e, [hl] + inc hl + ld d, [hl] + inc hl + push de + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld c, [hl] + inc hl + ld b, [hl] + pop hl + pop af + ret +; 0x100b Func_100b: ; 100b (0:100b) ld a, $2 @@ -2266,9 +2533,9 @@ CopyDeckData: ; 1072 (0:1072) ld hl, wPlayerDeck ldh a, [hWhoseTurn] cp PLAYER_TURN - jr z, .copyDeckData + jr z, .copy_deck_data ld hl, wOpponentDeck -.copyDeckData +.copy_deck_data ; start by putting a terminator at the end of the deck push hl ld bc, DECK_SIZE - 1 @@ -2276,7 +2543,7 @@ CopyDeckData: ; 1072 (0:1072) ld [hl], $0 pop hl push hl -.nextCard +.next_card ld a, [de] inc de ld b, a @@ -2285,12 +2552,12 @@ CopyDeckData: ; 1072 (0:1072) ld a, [de] inc de ld c, a -.cardQuantityLoop +.card_quantity_loop ld [hl], c inc hl dec b - jr nz, .cardQuantityLoop - jr .nextCard + jr nz, .card_quantity_loop + jr .next_card .done ld hl, $cce9 ld a, [de] @@ -2309,7 +2576,21 @@ CopyDeckData: ; 1072 (0:1072) ret ; 0x10aa -INCBIN "baserom.gbc",$10aa,$10bc - $10aa +Func_10aa: ; 10aa (0:10aa) + push hl + ld a, DUELVARS_PRIZES + call GetTurnDuelistVariable + ld l, a + xor a +.asm_10b2 + rr l + adc $00 + inc l + dec l + jr nz, .asm_10b2 + pop hl + ret +; 0x10bc ; shuffles the deck specified by hWhoseTurn ; if less than 60 cards remain in the deck, make sure the rest are ignored @@ -2323,38 +2604,37 @@ ShuffleDeck: ; 10bc (0:10bc) ld b, a ld a, DUELVARS_DECK_CARDS add [hl] - ld l, a ; hl = position in the wPlayerDeckCards or wOpponentDeckCards array - ; of the first (top) card in the deck + ld l, a ; hl = position of the first (top) deck card in the wPlayerDeckCards or wOpponentDeckCards array ld a, b ; a = number of cards in the deck call ShuffleCards ret -; draw a card from the deck, saving its location as $40 +; draw a card from the deck, saving its location as CARD_LOCATION_JUST_DRAWN ; returns c if deck is empty, nc if a card was succesfully drawn -_DrawCardFromDeck: ; 10cf (0:10cf) +DrawCardFromDeck: ; 10cf (0:10cf) push hl ld a, DUELVARS_NUMBER_OF_CARDS_NOT_IN_DECK call GetTurnDuelistVariable cp DECK_SIZE - jr nc, .emptyDeck + jr nc, .empty_deck inc a ld [hl], a ; increment number of cards not in deck add DUELVARS_DECK_CARDS - 1 ; point to top card in the deck ld l, a ld a, [hl] ; grab card number (0-59) from wPlayerDeckCards or wOpponentDeckCards array ld l, a - ld [hl], $40 ; temporarily write $40 to corresponding card location variable + ld [hl], CARD_LOCATION_JUST_DRAWN ; temporarily write to corresponding card location variable pop hl or a ret -.emptyDeck +.empty_deck pop hl scf ret ; 0x10e8 -INCBIN "baserom.gbc",$10e8,$1123 - $10e8 + INCROM $10e8, $1123 ; adds a card to the hand and increments the number of cards in the hand ; the card is identified by register a, which contains the card number within the deck (0-59) @@ -2366,8 +2646,8 @@ AddCardToHand: ; 1123 (0:1123) ld l, a ldh a, [hWhoseTurn] ld h, a - ; write $1 (hand) into the location of this card - ld [hl], $1 + ; write $1 (CARD_LOCATION_HAND) into the location of this card + ld [hl], CARD_LOCATION_HAND ; increment number of cards in hand ld l, DUELVARS_NUMBER_OF_CARDS_IN_HAND inc [hl] @@ -2382,26 +2662,26 @@ AddCardToHand: ; 1123 (0:1123) ret ; 0x1139 -INCBIN "baserom.gbc",$1139,$123b - $1139 + INCROM $1139, $123b CreateHandCardBuffer: ; 123b (0:123b) call FindLastCardInHand inc b - jr .skipCard + jr .skip_card -.checkNextCardLoop +.check_next_card_loop ld a, [hld] push hl ld l, a bit 6, [hl] pop hl - jr nz, .skipCard + jr nz, .skip_card ld [de], a inc de -.skipCard +.skip_card dec b - jr nz, .checkNextCardLoop + jr nz, .check_next_card_loop ld a, $ff ld [de], a ld l, (wPlayerNumberOfCardsInHand & $ff) @@ -2412,7 +2692,7 @@ CreateHandCardBuffer: ; 123b (0:123b) ret ; 0x1258 -INCBIN "baserom.gbc",$1258,$1271 - $1258 + INCROM $1258, $1271 ; puts an index to the last (newest) card in current player's hand into hl. FindLastCardInHand: ; 1271 (0:1271) @@ -2440,7 +2720,7 @@ ShuffleCards: ; 127f (0:127f) ld b, a ld e, l ld d, h -.shuffleNextCardLoop +.shuffle_next_card_loop push bc push de ld a, c @@ -2459,14 +2739,14 @@ ShuffleCards: ; 127f (0:127f) pop bc inc hl dec b - jr nz, .shuffleNextCardLoop + jr nz, .shuffle_next_card_loop pop bc pop de pop hl ret ; 0x12a3 -INCBIN "baserom.gbc",$12a3,$1312 - $12a3 + INCROM $12a3, $1312 ; given a position in wDuelCardOrAttackList (c510), return: @@ -2499,7 +2779,7 @@ GetCardInDeckPosition: ; 1324 (0:1324) ret ; 0x132f -INCBIN "baserom.gbc",$132f,$1362 - $132f + INCROM $132f, $1362 ; returns, in register a, the id of the card in the deck position specified in register a _GetCardInDeckPosition: ; 1362 (0:1362) @@ -2509,14 +2789,15 @@ _GetCardInDeckPosition: ; 1362 (0:1362) ld hl, wPlayerDeck ldh a, [hWhoseTurn] cp PLAYER_TURN - jr z, .loadCardFromDeck + jr z, .load_card_from_deck ld hl, wOpponentDeck -.loadCardFromDeck +.load_card_from_deck add hl, de ld a, [hl] pop de ret +; load data of card in position a to wLoadedCard1 LoadDeckCardToBuffer1: ; 1376 (0:1376) push hl push de @@ -2533,6 +2814,7 @@ LoadDeckCardToBuffer1: ; 1376 (0:1376) pop hl ret +; load data of card in position a to wLoadedCard2 LoadDeckCardToBuffer2: ; 138c (0:138c) push hl push de @@ -2550,14 +2832,14 @@ LoadDeckCardToBuffer2: ; 138c (0:138c) ret ; 0x13a2 -INCBIN "baserom.gbc",$13a2,$1485 - $13a2 + INCROM $13a2, $1485 Func_1485: ; 1485 (0:1485) push af ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY call GetTurnDuelistVariable cp MAX_POKEMON_IN_PLAY - jr nc, .tooManyPokemonInPlay + jr nc, .too_many_pokemon_in_play inc [hl] ld e, a pop af @@ -2602,13 +2884,13 @@ Func_1485: ; 1485 (0:1485) or a ret -.tooManyPokemonInPlay +.too_many_pokemon_in_play pop af scf ret ; 0x14d2 -INCBIN "baserom.gbc",$14d2,$159f - $14d2 + INCROM $14d2, $159f ; This function iterates through the card locations array to find out which and how many ; energy cards are in arena (i.e. attached to the active pokemon). @@ -2622,10 +2904,10 @@ GetAttachedEnergies: ; 159f (0:159f) xor a ld c, NUM_TYPES ld hl, wAttachedEnergies -.zeroEnergiesLoop +.zero_energies_loop ld [hli], a dec c - jr nz, .zeroEnergiesLoop + jr nz, .zero_energies_loop ld a, CARD_LOCATION_ARENA or e ; if e is non-0, arena is not the only location that counts ld e, a @@ -2633,10 +2915,10 @@ GetAttachedEnergies: ; 159f (0:159f) ld h, a ld l, DUELVARS_CARD_LOCATIONS ld c, DECK_SIZE -.nextCard +.next_card ld a, [hl] cp e - jr nz, .notInRequestedLocation + jr nz, .not_in_requested_location push hl push de @@ -2644,8 +2926,8 @@ GetAttachedEnergies: ; 159f (0:159f) ld a, l call LoadDeckCardToBuffer2 ld a, [wLoadedCard2Type] - bit ENERGY_CARD_F, a - jr z, .notAnEnergyCard + bit TYPE_ENERGY_F, a + jr z, .not_an_energy_card and $7 ; zero bit 3 to extract the type ld e, a ld d, $0 @@ -2653,18 +2935,18 @@ GetAttachedEnergies: ; 159f (0:159f) add hl, de inc [hl] ; increment the number of energy cards of this type cp COLORLESS - jr nz, .notColorless + jr nz, .not_colorless inc [hl] ; each colorless energy counts as two -.notAnEnergyCard -.notColorless +.not_an_energy_card +.not_colorless pop bc pop de pop hl -.notInRequestedLocation +.not_in_requested_location inc l dec c - jr nz, .nextCard + jr nz, .next_card ; all 60 cards checked ld hl, wAttachedEnergies ld c, NUM_TYPES @@ -2689,22 +2971,22 @@ CountCardIDInLocation: ; 15ef (0:15ef) push bc ld l, $0 ld c, $0 -.nextCard +.next_card ld a, [hl] cp b - jr nz, .unmatchingCardLocationOrID + jr nz, .unmatching_card_location_orID ld a, l push hl call _GetCardInDeckPosition cp e pop hl - jr nz, .unmatchingCardLocationOrID + jr nz, .unmatching_card_location_orID inc c -.unmatchingCardLocationOrID +.unmatching_card_location_orID inc l ld a, l cp DECK_SIZE - jr c, .nextCard + jr c, .next_card ld a, c pop bc ret @@ -2732,7 +3014,7 @@ GetNonTurnDuelistVariable: ; 1611 (0:1611) ret ; 0x161e -INCBIN "baserom.gbc",$161e,$16c0 - $161e + INCROM $161e, $16c0 CopyMoveDataAndDamageToBuffer: ; 16c0 (0:16c0) ld a, e @@ -2744,17 +3026,17 @@ CopyMoveDataAndDamageToBuffer: ; 16c0 (0:16c0) ld [wTempCardId], a ld hl, wLoadedCard1Move1 dec e - jr nz, .gotMove + jr nz, .got_move ld hl, wLoadedCard1Move2 -.gotMove +.got_move ld de, wLoadedMove ld c, wLoadedCard1Move2 - wLoadedCard1Move1 -.copyLoop +.copy_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .copyLoop + jr nz, .copy_loop ld a, [wLoadedMoveDamage] ld hl, wDamage ld [hli], a @@ -2918,7 +3200,7 @@ DealConfusionDamageToSelf: ; 1828 (0:1828) bank1call $4f9d ld a, $1 ld [wcce6], a - text_hl DamageToSelfDueToConfusionText + ldtx hl, DamageToSelfDueToConfusionText call DrawWideTextBox_PrintText ld a, $75 ld [wLoadedMoveAnimation], a @@ -3017,20 +3299,39 @@ CheckSelfConfusionDamage: ; 18d7 (0:18d7) or a ret .confused - text_de ConfusionCheckDamageText + ldtx de, ConfusionCheckDamageText call TossCoin - jr c, .noConfusionDamage + jr c, .no_confusion_damage ld a, $1 ld [wccc9], a scf ret -.noConfusionDamage +.no_confusion_damage or a ret ; 0x18f9 -INCBIN "baserom.gbc",$18f9,$195c - $18f9 + INCROM $18f9, $1944 +; this loads HP and Stage (1 byte each) of card with id at $ff9f into wLoadedMoveEffectCommands +Func_1944: ; 1944 (0:1944) + ld a, [$ff9f] + call LoadDeckCardToBuffer1 + ld hl, wLoadedCard1HP + ld de, wLoadedMoveEffectCommands + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ret +; 0x1955 + +Func_1955: ; 1955 (0:1955) + push af + ld a, $7a + ld [wLoadedMoveAnimation], a + pop af ; this function appears to apply several damage modifiers Func_195c: ; 195c (0:195c) ld hl, wDamage @@ -3065,10 +3366,10 @@ Func_1994: ; 1994 (0:1994) ld hl, wDamage ld a, [hli] or [hl] - jr nz, .nonZeroDamage + jr nz, .non_zero_damage ld de, $0000 ret -.nonZeroDamage +.non_zero_damage xor a ld [$ff9d], a ld d, [hl] @@ -3080,7 +3381,7 @@ Func_1994: ; 1994 (0:1994) xor a ld [wccc1], a call HandleDoubleDamageSubstatus - jr .checkPluspowerAndDefender + jr .check_pluspower_and_defender .safe call HandleDoubleDamageSubstatus ld a, e @@ -3104,14 +3405,14 @@ Func_1994: ; 1994 (0:1994) call Func_374a call SwapTurn and b - jr z, .checkPluspowerAndDefender + jr z, .check_pluspower_and_defender ld hl, $ffe2 add hl, de ld e, l ld d, h ld hl, $ccc1 set 2, [hl] -.checkPluspowerAndDefender +.check_pluspower_and_defender ld b, CARD_LOCATION_ARENA call ApplyAttachedPluspower call SwapTurn @@ -3119,9 +3420,9 @@ Func_1994: ; 1994 (0:1994) call ApplyAttachedDefender call HandleDamageReduction bit 7, d - jr z, .noUnderflow + jr z, .no_underflow ld de, $0000 -.noUnderflow +.no_underflow call SwapTurn ret @@ -3137,7 +3438,7 @@ Func_1a0e: ; 1a0e (0:1a0e) ret ; 0x1a1a -INCBIN "baserom.gbc",$1a1a,$1a22 - $1a1a + INCROM $1a1a, $1a22 Func_1a22: ; 1a22 (0:1a22) xor a @@ -3146,7 +3447,7 @@ Func_1a22: ; 1a22 (0:1a22) ld a, [hli] or [hl] or a - jr z, .noDamage + jr z, .no_damage ld d, [hl] dec hl ld e, [hl] @@ -3177,7 +3478,7 @@ Func_1a22: ; 1a22 (0:1a22) call ApplyAttachedDefender bit 7, d ; test for underflow ret z -.noDamage +.no_damage ld de, $0000 ret @@ -3226,9 +3527,9 @@ SubstractHP: ; 1a96 (0:1a96) ld a, $0 sbc d and $80 - jr z, .noUnderflow + jr z, .no_underflow ld [hl], $0 -.noUnderflow +.no_underflow ld a, [hl] or a jr z, .zero @@ -3271,7 +3572,7 @@ Func_1ad3: ; 1ad3 (0:1ad3) ld h, [hl] ld l, a call Func_2ebb - text_hl WasKnockedOutText + ldtx hl, WasKnockedOutText call DrawWideTextBox_PrintText ld a, $28 .asm_1aeb @@ -3282,7 +3583,7 @@ Func_1ad3: ; 1ad3 (0:1ad3) ret ; 0x1af3 -INCBIN "baserom.gbc",$1af3,$1b8d - $1af3 + INCROM $1af3, $1b8d Func_1b8d: ; 1b8d (0:1b8d) bank1call $4f9d @@ -3300,7 +3601,7 @@ Func_1b8d: ; 1b8d (0:1b8d) ld [hli], a ld a, [wLoadedMoveName + 1] ld [hli], a - text_hl PokemonsAttackText ; text when using an attack + ldtx hl, PokemonsAttackText ; text when using an attack call DrawWideTextBox_PrintText ret @@ -3337,7 +3638,7 @@ Func_1bca: ; 1bca (0:1bca) inc de ld a, [hli] ld [de], a - text_hl WasUnsuccessfulText + ldtx hl, WasUnsuccessfulText call DrawWideTextBox_PrintText scf ret @@ -3348,7 +3649,7 @@ Func_1bca: ; 1bca (0:1bca) ret ; 0x1c05 -INCBIN "baserom.gbc",$1c05,$1c72 - $1c05 + INCROM $1c05, $1c72 ; returns [hWhoseTurn] <-- ([hWhoseTurn] ^ $1) ; As a side effect, this also returns a duelist variable in a similar manner to @@ -3381,19 +3682,19 @@ PrintOpponentName: ; 1c8e (0:1c8e) ld hl, $cc16 ld a, [hli] or [hl] - jr z, .specialName + jr z, .special_name ld a, [hld] ld l, [hl] ld h, a jp PrintTextBoxBorderLabel -.specialName +.special_name ld hl, $c500 ld a, [hl] or a - jr z, .printPlayer2 + jr z, .print_player2 jr printNameLoop -.printPlayer2 - text_hl Player2 +.print_player2 + ldtx hl, Player2Text jp PrintTextBoxBorderLabel Func_1caa: ; 1caa (0:1caa) @@ -3502,13 +3803,13 @@ Func_1d1d: ; 1d1d (0:1d1d) scf ret -;creates a list at $c000 of every card the player owns and how many +; creates a list at $c000 of every card the player owns and how many CreateTempCardCollection: ; 1d2e (0:1d2e) call EnableExtRAM ld hl, sCardCollection ld de, wTempCardCollection ld bc, CARD_COLLECTION_SIZE - call CopyData + call CopyDataHLtoDE ld de, sDeck1Name call AddDeckCardsToTempCardCollection ld de, sDeck2Name @@ -3539,7 +3840,7 @@ AddDeckCardsToTempCardCollection: ; 1d59 (0:1d59) jr nz, .asm_1d66 ret -;adds card a to collection, provided the player has less than 99 of them +; adds card a to collection, provided the player has less than 99 of them AddCardToCollection: ; 1d6e (0:1d6e) push hl push de @@ -3583,26 +3884,27 @@ Func_1d91: ; 1d91 (0:1d91) ret ; 0x1da4 -INCBIN "baserom.gbc",$1da4,$1dca - $1da4 + INCROM $1da4, $1dca ; memcpy(HL, DE, C) -Memcpy: ; 1dca (0:1dca) +; if LCD on, copy during h-blank only +SafeCopyDataDEtoHL: ; 1dca (0:1dca) ld a, [wLCDC] ; - bit 7, a ; - jr nz, .asm_1dd8 ; assert that LCD is on -.asm_1dd1 + bit rLCDC_ENABLE, a ; + jr nz, .lcd_on ; assert that LCD is on +.lcd_off_loop ld a, [de] inc de ld [hli], a dec c - jr nz, .asm_1dd1 + jr nz, .lcd_off_loop ret -.asm_1dd8 - jp MemcpyDEHL_hblank +.lcd_on + jp HblankCopyDataDEtoHL -; calculates $9800 + SCREEN_WIDTH * e + d to map the screen coordinates at de -; to the corresponding BG Map 0 address in VRAM. -CalculateBGMap0Address: ; 1ddb (0:1ddb) +; returns vBGMapTiles + BG_MAP_WIDTH * e + d in hl. +; used to map coordinates at de to a BGMap0 address. +DECoordToBGMap0Address: ; 1ddb (0:1ddb) ld l, e ld h, $0 add hl, hl @@ -3614,7 +3916,7 @@ CalculateBGMap0Address: ; 1ddb (0:1ddb) add d ld l, a ld a, h - adc $98 + adc HIGH(vBGMapTiles) ld h, a ret @@ -3644,20 +3946,20 @@ AdjustCoordinatesForWindow: ; 1deb (0:1deb) DrawLabeledTextBox: ; 1e00 (0:1e00) ld a, [wConsole] cp CONSOLE_SGB - jr nz, .drawTopBorder + jr nz, .draw_top_border ld a, [wFrameType] or a - jr z, .drawTopBorder + jr z, .draw_top_border ; Console is SGB and frame type is != 0. ; The text box will be colorized so a SGB command needs to be transferred push de push bc - call .drawTopBorder ; this falls through to drawing the whole box + call .draw_top_border ; this falls through to drawing the whole box pop bc pop de jp ColorizeTextBoxSGB -.drawTopBorder +.draw_top_border push de push bc push hl @@ -3688,17 +3990,17 @@ DrawLabeledTextBox: ; 1e00 (0:1e00) ld a, d sub b sub $4 - jr z, .drawTopBorderRightTile + jr z, .draw_top_border_right_tile ld b, a -.drawTopBorderLineLoop +.draw_top_border_line_loop ld a, $5 ld [hli], a ld a, $1c ld [hli], a dec b - jr nz, .drawTopBorderLineLoop + jr nz, .draw_top_border_line_loop -.drawTopBorderRightTile +.draw_top_border_right_tile ld a, $5 ld [hli], a ld a, $19 @@ -3718,12 +4020,12 @@ DrawLabeledTextBox: ; 1e00 (0:1e00) jr z, .cgb ; DMG or SGB inc e - call CalculateBGMap0Address + call DECoordToBGMap0Address ; top border done, draw the rest of the text box jr ContinueDrawingTextBoxDMGorSGB .cgb - call CalculateBGMap0Address + call DECoordToBGMap0Address push de call CopyCurrentLineAttrCGB ; BG Map attributes for current line, which is the top border pop de @@ -3742,32 +4044,32 @@ DrawRegularTextBox: ; 1e7c (0:1e7c) jp z, DrawRegularTextBoxSGB ; fallthrough DrawRegularTextBoxDMG: ; 1e88 (0:1e88) - call CalculateBGMap0Address + call DECoordToBGMap0Address ; top line (border) of the text box ld a, $1c - ld de, $1819 + lb de, $18, $19 call CopyLine ContinueDrawingTextBoxDMGorSGB dec c dec c -.drawTextBoxBodyLoop +.draw_text_box_body_loop ld a, $0 - ld de, $1e1f + lb de, $1e, $1f call CopyLine dec c - jr nz, .drawTextBoxBodyLoop + jr nz, .draw_text_box_body_loop ; bottom line (border) of the text box ld a, $1d - ld de, $1a1b + lb de, $1a, $1b ; fallthrough -; copies b bytes of data to sp+$1c and to hl, and returns hl += SCREEN_WIDTH +; copies b bytes of data to sp+$1c and to hl, and returns hl += BG_MAP_WIDTH ; d = value of byte 0 ; e = value of byte b ; a = value of bytes [1, b-1] -; b is supposed to be SCREEN_WIDTH or smaller, else the stack would get corrupted +; b is supposed to be BG_MAP_WIDTH or smaller, else the stack would get corrupted CopyLine: ; 1ea5 (0:1ea5) - add sp, -$20 + add sp, -BG_MAP_WIDTH push hl push bc ld hl, sp+$4 @@ -3788,27 +4090,27 @@ CopyLine: ; 1ea5 (0:1ea5) push bc ld c, b ld b, $0 - call Memcpy + call SafeCopyDataDEtoHL pop bc pop de - ; advance pointer SCREEN_WIDTH positions and restore stack pointer - ld hl, $0020 + ; advance pointer BG_MAP_WIDTH positions and restore stack pointer + ld hl, BG_MAP_WIDTH add hl, de - add sp, $20 + add sp, BG_MAP_WIDTH ret DrawRegularTextBoxCGB: - call CalculateBGMap0Address + call DECoordToBGMap0Address ; top line (border) of the text box ld a, $1c - ld de, $1819 + lb de, $18, $19 call CopyCurrentLineTilesAndAttrCGB ContinueDrawingTextBoxCGB dec c dec c -.drawTextBoxBodyLoop +.draw_text_box_body_loop ld a, $0 - ld de, $1e1f + lb de, $1e, $1f push hl call CopyLine pop hl @@ -3820,10 +4122,10 @@ ContinueDrawingTextBoxCGB call CopyLine call BankswitchVRAM_0 dec c - jr nz, .drawTextBoxBodyLoop + jr nz, .draw_text_box_body_loop ; bottom line (border) of the text box ld a, $1d - ld de, $1a1b + lb de, $1a, $1b call CopyCurrentLineTilesAndAttrCGB ret @@ -3859,12 +4161,12 @@ ColorizeTextBoxSGB ld hl, $cae0 ld de, SGB_ATTR_BLK_1f4f ld c, $10 -.copySGBCommandLoop +.copy_sgb_command_loop ld a, [de] inc de ld [hli], a dec c - jr nz, .copySGBCommandLoop + jr nz, .copy_sgb_command_loop pop de pop bc ld hl, $cae4 @@ -3899,7 +4201,7 @@ Func_1f5f: ; 1f5f (0:1f5f) push af push hl add sp, $e0 - call CalculateBGMap0Address + call DECoordToBGMap0Address .asm_1f67 push hl push bc @@ -3921,7 +4223,7 @@ Func_1f5f: ; 1f5f (0:1f5f) push bc ld c, b ld b, $0 - call Memcpy + call SafeCopyDataDEtoHL ld hl, sp+$24 ld a, [hl] ld hl, sp+$27 @@ -3938,7 +4240,7 @@ Func_1f5f: ; 1f5f (0:1f5f) ret ; 0x1f96 -INCBIN "baserom.gbc",$1f96,$20b0 - $1f96 + INCROM $1f96, $20b0 Func_20b0: ; 20b0 (0:20b0) ld hl, $2fe8 @@ -3947,7 +4249,7 @@ Func_20b0: ; 20b0 (0:20b0) jr nz, .asm_20bd ld hl, $37f8 .asm_20bd - ld de, $8d00 + ld de, vTiles1 + $500 ld b, $30 jr asm_2121 @@ -3958,7 +4260,7 @@ Func_20c4: ; 20c4 (0:20c4) jr nz, .asm_20d1 ld hl, $3838 .asm_20d1 - ld de, $8d40 + ld de, vTiles1 + $540 ld b, $c jr asm_2121 @@ -3975,12 +4277,12 @@ asm_20de jr nz, .asm_20eb ld hl, $3af8 .asm_20eb - ld de, $8d00 + ld de, vTiles1 + $500 jr asm_2121 Func_20f0: ; 20f0 (0:20f0) ld hl, $4008 - ld de, $8a00 + ld de, vTiles1 + $200 ld b, $d call asm_2121 ld hl, $3528 @@ -3989,19 +4291,19 @@ Func_20f0: ; 20f0 (0:20f0) jr nz, .asm_2108 ld hl, $3d38 .asm_2108 - ld de, $8d00 + ld de, vTiles1 + $500 ld b, $30 jr asm_2121 Func_210f: ; 210f (0:210f) ld hl, $40d8 - ld de, $9300 + ld de, vTiles2 + $300 ld b, $8 jr asm_2121 Func_2119: ; 2119 (0:2119) ld hl, DuelGraphics - Fonts - ld de, $9000 ; destination + ld de, vTiles2 ; destination ld b, $38 ; number of tiles asm_2121 ld a, BANK(Fonts) @@ -4012,7 +4314,7 @@ asm_2121 ret ; 0x212f -INCBIN "baserom.gbc",$212f,$2167 - $212f + INCROM $212f, $2167 Func_2167: ; 2167 (0:2167) ld l, a @@ -4032,7 +4334,7 @@ Func_2167: ; 2167 (0:2167) jp Func_1f5f ; 0x2189 -INCBIN "baserom.gbc",$2189,$21c5 - $2189 + INCROM $2189, $21c5 Func_21c5: ; 21c5 (0:21c5) push de @@ -4193,7 +4495,7 @@ Func_22ae: ; 22ae (0:22ae) xor a ldh [$ffae], a ld [wcd09], a - call CalculateBGMap0Address + call DECoordToBGMap0Address ld a, l ldh [$ffaa], a ld a, h @@ -4246,7 +4548,7 @@ Func_22f2: ; 22f2 (0:22f2) ld h, d ld de, $cd05 ld c, $1 - call Memcpy + call SafeCopyDataDEtoHL ld hl, $ffac inc [hl] ret @@ -4439,12 +4741,12 @@ Func_23d3: ; 23d3 (0:23d3) ret ; 0x23fd -INCBIN "baserom.gbc",$23fd,$245d - $23fd + INCROM $23fd, $245d Func_245d: ; 245d (0:245d) push de push bc - ld de, $caa0 + ld de, wcaa0 push de ld bc, $d8f0 call Func_2499 @@ -4504,7 +4806,7 @@ Func_24ac: ; 24ac (0:24ac) or a jr nz, .asm_24bf call Func_2510 - call Memcpy + call SafeCopyDataDEtoHL .asm_24bb pop bc pop de @@ -4513,7 +4815,7 @@ Func_24ac: ; 24ac (0:24ac) .asm_24bf call Func_24ca call Func_2518 - call Memcpy + call SafeCopyDataDEtoHL jr .asm_24bb Func_24ca: ; 24ca (0:24ca) @@ -4659,121 +4961,124 @@ Func_256d: ; 256d (0:256d) ret ; 0x2589 -INCBIN "baserom.gbc",$2589,$2636 - $2589 + INCROM $2589, $2636 ; initializes cursor parameters given the 8 bytes starting at hl, ; which represent the following: ; x position, y position, y displacement between items, number of items, -; cursor tile number, tile behind cursor, ??, ?? +; cursor tile number, tile behind cursor, ???? (unknown function pointer if non-0) +; also sets the current menu item to the one specified in register a InitializeCursorParameters: ; 2636 (0:2636) ld [wCurMenuItem], a ldh [hCurrentMenuItem], a ld de, wCursorXPosition ld b, $8 -.asm_2640 +.loop ld a, [hli] ld [de], a inc de dec b - jr nz, .asm_2640 + jr nz, .loop xor a ld [wCursorBlinkCounter], a ret ; returns with the carry flag set if A or B were pressed ; returns a = 0 if A was pressed, a = -1 if B was pressed -MenuCursorAcceptInput: ; 264b (0:264b) +HandleMenuInput: ; 264b (0:264b) xor a - ld [wcd99], a + ld [wRefreshMenuCursorSFX], a ldh a, [hButtonsPressed2] or a - jr z, .asm_2685 + jr z, .up_down_done ld b, a ld a, [wNumMenuItems] ld c, a ld a, [wCurMenuItem] bit D_UP_F, b - jr z, .asm_266b + jr z, .not_up dec a bit 7, a - jr z, .asm_2674 + jr z, .handle_up_or_down ld a, [wNumMenuItems] - dec a - jr .asm_2674 -.asm_266b + dec a ; wrapping around, so load the bottommost item + jr .handle_up_or_down +.not_up bit D_DOWN_F, b - jr z, .asm_2685 + jr z, .up_down_done inc a cp c - jr c, .asm_2674 - xor a -.asm_2674 + jr c, .handle_up_or_down + xor a ; wrapping around, so load the topmost item +.handle_up_or_down push af ld a, $1 - ld [wcd99], a + ld [wRefreshMenuCursorSFX], a ; buffer sound for up/down call EraseCursor pop af ld [wCurMenuItem], a xor a ld [wCursorBlinkCounter], a -.asm_2685 +.up_down_done ld a, [wCurMenuItem] ldh [hCurrentMenuItem], a - ld hl, $cd17 + ld hl, wcd17 ld a, [hli] or [hl] - jr z, asm_26a9 + jr z, .check_A_or_B ld a, [hld] ld l, [hl] ld h, a ldh a, [hCurrentMenuItem] call CallHL - jr nc, HandleMenuInput -asm_269b: - call Func_270b - -Func_269e: ; 269e (0:269e) - call Func_26c0 + jr nc, RefreshMenuCursor_CheckPlaySFX +.A_pressed_draw_cursor + call DrawCursor2 +.A_pressed + call PlayOpenOrExitScreenSFX ld a, [wCurMenuItem] ld e, a ldh a, [hCurrentMenuItem] scf ret -asm_26a9: +.check_A_or_B ldh a, [hButtonsPressed] and A_BUTTON | B_BUTTON - jr z, HandleMenuInput + jr z, RefreshMenuCursor_CheckPlaySFX and A_BUTTON - jr nz, asm_269b + jr nz, HandleMenuInput.A_pressed_draw_cursor + ; b button pressed ld a, [wCurMenuItem] ld e, a ld a, $ff ldh [hCurrentMenuItem], a - call Func_26c0 + call PlayOpenOrExitScreenSFX scf ret -Func_26c0: ; 26c0 (0:26c0) +; plays an "open screen" sound if [hCurrentMenuItem] != 0xff +; plays a "exit screen" sound if [hCurrentMenuItem] == 0xff +PlayOpenOrExitScreenSFX: ; 26c0 (0:26c0) push af ldh a, [hCurrentMenuItem] inc a - jr z, .asm_26ca + jr z, .play_exit_sfx ld a, $2 - jr .asm_26cc -.asm_26ca + jr .play_sfx +.play_exit_sfx ld a, $3 -.asm_26cc - call Func_3796 +.play_sfx + call PlaySFX pop af ret -HandleMenuInput: ; 26d1 (0:26d1) - ld a, [wcd99] +RefreshMenuCursor_CheckPlaySFX: ; 26d1 (0:26d1) + ld a, [wRefreshMenuCursorSFX] or a - jr z, HandleTextBoxInput - call Func_3796 + jr z, RefreshMenuCursor + call PlaySFX ; fallthrough -HandleTextBoxInput: ; 26da (0:26da) +RefreshMenuCursor: ; 26da (0:26da) ld hl, wCursorBlinkCounter ld a, [hl] inc [hl] @@ -4806,11 +5111,12 @@ DrawCursor: or a ret -Func_270b: ; 270b (0:270b) +; unlike DrawCursor, read cursor tile from wCursorTileNumber instead of register a +DrawCursor2: ; 270b (0:270b) ld a, [wCursorTileNumber] jr DrawCursor -Func_2710: ; 2710 (0:2710) +SetMenuItem: ; 2710 (0:2710) ld [wCurMenuItem], a ldh [hCurrentMenuItem], a xor a @@ -4829,7 +5135,7 @@ Func_271a: ; 271a (0:271a) xor $1 jr .asm_2748 .asm_272c - bit 5, b + bit D_LEFT_F, b jr z, .asm_273b ld a, [hl] sub $2 @@ -4838,7 +5144,7 @@ Func_271a: ; 271a (0:271a) add $4 jr .asm_2748 .asm_273b - bit 4, b + bit D_RIGHT_F, b jr z, .asm_275d ld a, [hl] add $2 @@ -4848,7 +5154,7 @@ Func_271a: ; 271a (0:271a) .asm_2748 push af ld a, $1 - call Func_3796 + call PlaySFX call .asm_2772 pop af ld [wCurMenuItem], a @@ -4859,7 +5165,7 @@ Func_271a: ; 271a (0:271a) .asm_275d ldh a, [hButtonsPressed2] and A_BUTTON - jp nz, Func_269e + jp nz, HandleMenuInput.A_pressed .asm_2764 ld hl, wCursorBlinkCounter ld a, [hl] @@ -4890,64 +5196,70 @@ Func_271a: ; 271a (0:271a) ret ; 0x278d -INCBIN "baserom.gbc",$278d,$29f5 - $278d + INCROM $278d, $29f5 Func_29f5: ; 29f5 (0:29f5) farcallx $6, $4000 ret ; 0x29fa -INCBIN "baserom.gbc",$29fa,$2a00 - $29fa - -Func_2a00: ; 2a00 (0:2a00) +Func_29fa: ; 29fa (0:29fa) + lb bc, $0f, $00 ; cursor tile, tile behind cursor + call SetCursorParametersForTextBox +WaitForButtonAorB: ; 2a00 (0:2a00) call DoFrame - call HandleTextBoxInput + call RefreshMenuCursor ldh a, [hButtonsPressed] bit A_BUTTON_F, a - jr nz, .asm_2a15 + jr nz, .a_pressed bit B_BUTTON_F, a - jr z, Func_2a00 + jr z, WaitForButtonAorB call EraseCursor scf ret -.asm_2a15 +.a_pressed call EraseCursor or a ret -Func_2a1a: ; 2a1a (0:2a1a) +SetCursorParametersForTextBox: ; 2a1a (0:2a1a) xor a ld hl, wCurMenuItem ld [hli], a - ld [hl], d + ld [hl], d ; wCursorXPosition inc hl - ld [hl], e + ld [hl], e ; wCursorYPosition inc hl - ld [hl], $0 + ld [hl], 0 ; wYDisplacementBetweenMenuItems inc hl - ld [hl], $1 + ld [hl], 1 ; wNumMenuItems inc hl - ld [hl], b + ld [hl], b ; wCursorTileNumber inc hl - ld [hl], c + ld [hl], c ; wTileBehindCursor ld [wCursorBlinkCounter], a ret ; 0x2a30 -INCBIN "baserom.gbc",$2a30,$2a36 - $2a30 +Func_2a30: ; 2a30 (0:2a30) + call DrawWideTextBox_PrintTextNoDelay + jp WaitForWideTextBoxInput +; 0x2a36 -Func_2a36: ; 2a36 (0:2a36) +DrawWideTextBox_PrintTextNoDelay: ; 2a36 (0:2a36) push hl call DrawWideTextBox ld a, $13 jr Func_2a44 -DrawNarrowTextBox_PrintText: ; 2a3e (0:2a3e) +DrawNarrowTextBox_PrintTextNoDelay: ; 2a3e (0:2a3e) push hl call DrawNarrowTextBox ld a, $b +; fallthrough + Func_2a44: ; 2a44 (0:2a44) - ld de, $010e + lb de, 1, 14 call AdjustCoordinatesForWindow call Func_22a6 pop hl @@ -4961,7 +5273,7 @@ DrawWideTextBox_PrintText: ; 2a59 (0:2a59) push hl call DrawWideTextBox ld a, $13 - ld de, $010e + lb de, 1, 14 call AdjustCoordinatesForWindow call Func_22a6 call EnableLCD @@ -4970,33 +5282,38 @@ DrawWideTextBox_PrintText: ; 2a59 (0:2a59) ; draws a 12x6 text box aligned to the bottom left of the screen DrawNarrowTextBox: ; 2a6f (0:2a6f) - ld de, $000c - ld bc, $0c06 + lb de, 0, 12 + lb bc, 12, 6 call AdjustCoordinatesForWindow call DrawRegularTextBox ret DrawNarrowTextBox_WaitForInput: ; 2a7c (0:2a7c) - call DrawNarrowTextBox_PrintText + call DrawNarrowTextBox_PrintTextNoDelay xor a ld hl, NarrowTextBoxPromptCursorData call InitializeCursorParameters call EnableLCD -.waitAorBLoop +.wait_A_or_B_loop call DoFrame - call HandleTextBoxInput + call RefreshMenuCursor ldh a, [hButtonsPressed] and A_BUTTON | B_BUTTON - jr z, .waitAorBLoop + jr z, .wait_A_or_B_loop ret NarrowTextBoxPromptCursorData: ; 2a96 (0:2a96) - db $a, $11, $1, $1, $2f, $1d, $0, $0 + db 10, 17 ; x, y + db 1 ; y displacement between items + db 1 ; number of items + db $2f ; cursor tile number + db $1d ; tile behind cursor + dw $0000 ; unknown function pointer if non-0 ; draws a 20x6 text box aligned to the bottom of the screen DrawWideTextBox: ; 2a9e (0:2a9e) - ld de, $000c - ld bc, $1406 + lb de, 0, 12 + lb bc, 20, 6 call AdjustCoordinatesForWindow call DrawRegularTextBox ret @@ -5009,88 +5326,121 @@ WaitForWideTextBoxInput: ; 2aae (0:2aae) ld hl, WideTextBoxPromptCursorData call InitializeCursorParameters call EnableLCD -.waitAorBLoop +.wait_A_or_B_loop call DoFrame - call HandleTextBoxInput + call RefreshMenuCursor ldh a, [hButtonsPressed] and A_BUTTON | B_BUTTON - jr z, .waitAorBLoop + jr z, .wait_A_or_B_loop call EraseCursor ret WideTextBoxPromptCursorData: ; 2ac8 (0:2ac8) - db $12, $11, $1, $1, $2f, $1d, $0, $0 + db 18, 17 ; x, y + db 1 ; y displacement between items + db 1 ; number of items + db $2f ; cursor tile number + db $1d ; tile behind cursor + dw $0000 ; unknown function pointer if non-0 + +TwoItemHorizontalMenu: ; 2ad0 (0:2ad0) + call DrawWideTextBox_PrintText + lb de, 6, 16 ; x, y + ld a, d + ld [wLeftmostItemCursorX], a + lb bc, $0f, $00 ; cursor tile, tile behind cursor + call SetCursorParametersForTextBox + ld a, 1 + ld [wCurMenuItem], a + call EnableLCD + jp HandleYesOrNoMenu.refresh_menu +; 0x2aeb -INCBIN "baserom.gbc",$2ad0,$2af0 - $2ad0 +Func_2aeb: ; 2aeb (0:2aeb) + ld a, $01 + ld [wcd9a], a +; fallthrough -Func_2af0: ; 2af0 (0:2af0) +; handle a yes / no menu with custom text provided in hl +; returns carry if "no" selected +YesOrNoMenuWithText: ; 2af0 (0:2af0) call DrawWideTextBox_PrintText - ld de, $0710 - call Func_2b66 - ld de, $0610 - jr .asm_2b0a - call DrawNarrowTextBox_PrintText - ld de, $0310 - call Func_2b66 - ld de, $0210 -.asm_2b0a +; fallthrough +YesOrNoMenu: ; 2af3 (0:2af3) + lb de, 7, 16 ; x, y + call PrintYesOrNoItems + lb de, 6, 16 ; x, y + jr HandleYesOrNoMenu + +YesOrNoMenuWithText_LeftAligned: ; 2afe (0:2afe) + call DrawNarrowTextBox_PrintTextNoDelay + lb de, 3, 16 ; x, y + call PrintYesOrNoItems + lb de, 2, 16 ; x, y +; fallthrough +HandleYesOrNoMenu: ld a, d - ld [wcd98], a - ld bc, $0f00 - call Func_2a1a + ld [wLeftmostItemCursorX], a + lb bc, $0f, $00 ; cursor tile, tile behind cursor + call SetCursorParametersForTextBox ld a, [wcd9a] ld [wCurMenuItem], a call EnableLCD - jr .asm_2b39 -.asm_2b1f + jr .refresh_menu +.wait_button_loop call DoFrame - call HandleTextBoxInput + call RefreshMenuCursor ldh a, [hButtonsPressed] bit A_BUTTON_F, a - jr nz, .asm_2b50 + jr nz, .a_pressed ldh a, [hButtonsPressed2] and D_RIGHT | D_LEFT - jr z, .asm_2b1f + jr z, .wait_button_loop + ; left or right pressed, so switch to the other menu item ld a, $1 - call Func_3796 + call PlaySFX call EraseCursor -.asm_2b39 - ld a, [wcd98] +.refresh_menu + ld a, [wLeftmostItemCursorX] ld c, a + ; default to the second option (NO) ld hl, wCurMenuItem ld a, [hl] xor $1 ld [hl], a + ; x separation between left and right items is 4 tiles add a add a add c ld [wCursorXPosition], a xor a ld [wCursorBlinkCounter], a - jr .asm_2b1f -.asm_2b50 + jr .wait_button_loop +.a_pressed ld a, [wCurMenuItem] ldh [hCurrentMenuItem], a or a - jr nz, .asm_2b5c - ld [wcd9a], a + jr nz, .no +;.yes + ld [wcd9a], a ; 0 ret -.asm_2b5c +.no xor a - ld [wcd9a], a + ld [wcd9a], a ; 0 ld a, $1 ldh [hCurrentMenuItem], a scf ret -Func_2b66: ; 2b66 (0:2b66) +; prints YES NO at de +PrintYesOrNoItems: ; 2b66 (0:2b66) call AdjustCoordinatesForWindow - text_hl YesOrNoText + ldtx hl, YesOrNoText call Func_2c1b ret ; 0x2b70 -INCBIN "baserom.gbc",$2b70,$2b78 - $2b70 + INCROM $2b70, $2b78 ; loads opponent deck to wOpponentDeck LoadOpponentDeck: ; 2b78 (0:2b78) @@ -5098,17 +5448,17 @@ LoadOpponentDeck: ; 2b78 (0:2b78) ld [wIsPracticeDuel], a ld a, [wOpponentDeckId] cp SAMS_NORMAL_DECK - 2 - jr z, .normalSamDuel + jr z, .normal_sam_duel or a ; cp SAMS_PRACTICE_DECK - 2 - jr nz, .notPracticeDuel + jr nz, .not_practice_duel ; only practice duels will display help messages, but ; any duel with Sam will force the PRACTICE_PLAYER_DECK -;.practiceSamDuel +;.practice_sam_duel inc a ld [wIsPracticeDuel], a -.normalSamDuel +.normal_sam_duel xor a ld [wOpponentDeckId], a call SwapTurn @@ -5122,17 +5472,17 @@ LoadOpponentDeck: ; 2b78 (0:2b78) ld [hl], a xor a -.notPracticeDuel +.not_practice_duel inc a inc a call LoadDeck ld a, [wOpponentDeckId] - cp NUMBER_OF_DECKS - jr c, .validDeck + cp DECKS_END + jr c, .valid_deck ld a, PRACTICE_PLAYER_DECK - 2 ld [wOpponentDeckId], a -.validDeck +.valid_deck ; set opponent as controlled by AI ld a, DUELVARS_DUELIST_TYPE call GetTurnDuelistVariable @@ -5235,17 +5585,17 @@ Func_2c29: ; 2c29 (0:2c29) ret ; 0x2c37 -INCBIN "baserom.gbc",$2c37,$2c73 - $2c37 + INCROM $2c37, $2c73 Func_2c73: ; 2c73 (0:2c73) xor a call Func_2c84 Func_2c77: ; 2c77 (0:2c77) - ld bc, $2f1d - ld de, $1211 - call Func_2a1a - call Func_2a00 + lb bc, $2f, $1d ; cursor tile, tile behind cursor + lb de, 18, 17 ; x, y + call SetCursorParametersForTextBox + call WaitForButtonAorB ret Func_2c84: ; 2c84 (0:2c84) @@ -5343,8 +5693,8 @@ Func_2d06: ; 2d06 (0:2d06) Func_2d15: ; 2d15 (0:2d15) push hl - ld de, $000c - ld bc, $1406 + lb de, 0, 12 + lb bc, 20, 6 call AdjustCoordinatesForWindow ld a, [wce4b] or a @@ -5359,7 +5709,7 @@ Func_2d15: ; 2d15 (0:2d15) ld l, a call DrawLabeledTextBox .asm_2d36 - ld de, $010e + lb de, 1, 14 call AdjustCoordinatesForWindow ld a, $13 call Func_22a6 @@ -5496,7 +5846,7 @@ Func_2e12: ; 2e12 (0:2e12) ld a, [wcd0a] or a jp z, Func_245d - ld de, $caa0 + ld de, wcaa0 push de call Func_0663 pop hl @@ -5511,15 +5861,15 @@ Func_2e12: ; 2e12 (0:2e12) ret Func_2e2c: ; 2e2c (0:2e2c) - ld de, $caa0 + ld de, wcaa0 push de ldh a, [hWhoseTurn] cp OPPONENT_TURN - jp z, .opponentTurn + jp z, .opponent_turn call PrintPlayerName pop hl ret -.opponentTurn +.opponent_turn call PrintOpponentName pop hl ret @@ -5528,38 +5878,38 @@ Func_2e2c: ; 2e2c (0:2e2c) PrintText: ; 2e41 (0:2e41) ld a, l or h - jr z, .fromRAM + jr z, .from_ram ldh a, [hBankROM] push af call ReadTextOffset - call .printText + call .print_text pop af call BankswitchHome ret -.fromRAM +.from_ram ld hl, wc590 -.printText +.print_text call Func_2cc8 -.nextTileLoop +.next_tile_loop ldh a, [hButtonsHeld] ld b, a ld a, [wTextSpeed] inc a cp $3 - jr nc, .applyDelay + jr nc, .apply_delay ; if text speed is 1, pressing b ignores it bit B_BUTTON_F, b - jr nz, .skipDelay - jr .applyDelay -.textDelayLoop + jr nz, .skip_delay + jr .apply_delay +.text_delay_loop ; wait a number of frames equal to wTextSpeed between printing each text tile call DoFrame -.applyDelay +.apply_delay dec a - jr nz, .textDelayLoop -.skipDelay + jr nz, .text_delay_loop +.skip_delay call Func_2d43 - jr nc, .nextTileLoop + jr nc, .next_tile_loop ret ; prints text with id at hl without letter delay in a textbox area @@ -5568,9 +5918,9 @@ PrintTextNoDelay: ; 2e76 (0:2e76) push af call ReadTextOffset call Func_2cc8 -.nextTileLoop +.next_tile_loop call Func_2d43 - jr nc, .nextTileLoop + jr nc, .next_tile_loop pop af call BankswitchHome ret @@ -5586,12 +5936,12 @@ PrintTextBoxBorderLabel: ; 2e89 (0:2e89) ldh a, [hBankROM] push af call ReadTextOffset -.nextTileLoop +.next_tile_loop ld a, [hli] ld [de], a inc de or a - jr nz, .nextTileLoop + jr nz, .next_tile_loop pop af call BankswitchHome dec de @@ -5603,7 +5953,7 @@ PrintTextBoxBorderLabel: ; 2e89 (0:2e89) jp PrintPlayerName ; 0x2ea9 -INCBIN "baserom.gbc",$2ea9,$2ebb - $2ea9 + INCROM $2ea9, $2ebb Func_2ebb: ; 2ebb (0:2ebb) ld a, l @@ -5620,7 +5970,7 @@ Func_2ec4: ; 2ec4 (0:2ec4) ret ; 0x2ecd -INCBIN "baserom.gbc",$2ecd,$2f0a - $2ecd + INCROM $2ecd, $2f0a ; load data of card with id at e to wLoadedCard1 or wLoadedCard2 LoadCardDataToBuffer2: ; 2f0a (0:2f0a) @@ -5642,12 +5992,12 @@ LoadCardDataToRAM: ; 2f14 (0:2f14) ld a, BANK(CardPointers) call BankpushHome2 ld b, PKMN_CARD_DATA_LENGTH -.copyCardDataLoop +.copy_card_data_loop ld a, [hli] ld [de], a inc de dec b - jr nz, .copyCardDataLoop + jr nz, .copy_card_data_loop call BankpopHome or a @@ -5696,7 +6046,7 @@ GetCardHeader: ; 2f5d (0:2f5d) ld d, $00 ld e, a call GetCardPointer - jr c, .cardNotFound + jr c, .card_not_found ld a, $0c call BankpushHome2 ld e, [hl] @@ -5708,7 +6058,7 @@ GetCardHeader: ; 2f5d (0:2f5d) call BankpopHome ld a, e or a -.cardNotFound +.card_not_found pop de pop hl ret @@ -5730,7 +6080,7 @@ GetCardPointer: ; 2f7c (0:2f7c) cp a, (CardPointers + 2 + (2 * NUM_CARDS)) % $100 .nz ccf - jr c, .outOfBounds + jr c, .out_of_bounds ld a, BANK(CardPointers) call BankpushHome2 ld a, [hli] @@ -5738,7 +6088,7 @@ GetCardPointer: ; 2f7c (0:2f7c) ld l,a call BankpopHome or a -.outOfBounds +.out_of_bounds pop bc pop de ret @@ -5762,12 +6112,12 @@ LoadCardGfx: ; 2fa0 (0:2fa0) call CopyGfxData ld b, $8 ; length of palette ld de, $ce23 -.copyCardPalette +.copy_card_palette ld a, [hli] ld [de], a inc de dec b - jr nz, .copyCardPalette + jr nz, .copy_card_palette pop af call BankswitchHome ret @@ -5794,12 +6144,12 @@ TryExecuteEffectCommandFunction: ; 2fd9 (0:2fd9) ld l, a pop af call CheckMatchingCommand - jr nc, .executeFunction + jr nc, .execute_function ; return if no matching command was found or a ret -.executeFunction +.execute_function ; executes the function at [wce22]:hl ldh a, [hBankROM] push af @@ -5824,12 +6174,12 @@ CheckMatchingCommand: ; 2ffe (0:2ffe) ld c, a ld a, l or h - jr nz, .notNullPointer + jr nz, .not_null_pointer ; return c if pointer is $0000 scf ret -.notNullPointer +.not_null_pointer ldh a, [hBankROM] push af ld a, BANK(EffectCommands) @@ -5837,18 +6187,18 @@ CheckMatchingCommand: ; 2ffe (0:2ffe) ; store the bank number of command functions ($b) in wce22 ld a, $b ld [wce22],a -.checkCommandLoop +.check_command_loop ld a, [hli] or a - jr z, .noMoreCommands + jr z, .no_more_commands cp c - jr z, .matchingCommandFound + jr z, .matching_command_found ; skip function pointer for this command and move to the next one inc hl inc hl - jr .checkCommandLoop + jr .check_command_loop -.matchingCommandFound +.matching_command_found ; load function pointer for this command ld a, [hli] ld h, [hl] @@ -5859,7 +6209,7 @@ CheckMatchingCommand: ; 2ffe (0:2ffe) or a ret ; restore bank and return c -.noMoreCommands +.no_more_commands pop af call BankswitchHome scf @@ -5883,14 +6233,14 @@ LoadDeck: ; 302c (0:302c) ld d, [hl] ld a, d or e - jr z, .nullPointer + jr z, .null_pointer call CopyDeckData pop af call BankswitchHome pop hl or a ret -.nullPointer +.null_pointer pop af call BankswitchHome pop hl @@ -6262,19 +6612,19 @@ HandleDamageReduction: ; 3244 (0:3244) or a ret z cp SUBSTATUS2_REDUCE_BY_20 - jr z, .reduceDamageBy20 + jr z, .reduce_damage_by_20 cp SUBSTATUS2_POUNCE - jr z, .reduceDamageBy10 + jr z, .reduce_damage_by_10 cp SUBSTATUS2_GROWL - jr z, .reduceDamageBy10 + jr z, .reduce_damage_by_10 ret -.reduceDamageBy20 +.reduce_damage_by_20 ld hl, -20 add hl, de ld e, l ld d, h ret -.reduceDamageBy10 +.reduce_damage_by_10 ld hl, -10 add hl, de ld e, l @@ -6284,28 +6634,28 @@ HandleDamageReduction: ; 3244 (0:3244) HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ld a, [wNoDamageOrEffect] or a - jr nz, .noDamage + jr nz, .no_damage ld a, DUELVARS_ARENA_CARD_SUBSTATUS1 call GetTurnDuelistVariable or a - jr z, .notAffectedBySubstatus1 + jr z, .not_affected_by_substatus1 cp SUBSTATUS1_NO_DAMAGE_STIFFEN - jr z, .noDamage + jr z, .no_damage cp SUBSTATUS1_NO_DAMAGE_10 - jr z, .noDamage + jr z, .no_damage cp SUBSTATUS1_NO_DAMAGE_11 - jr z, .noDamage + jr z, .no_damage cp SUBSTATUS1_NO_DAMAGE_17 - jr z, .noDamage + jr z, .no_damage cp SUBSTATUS1_REDUCE_BY_10 - jr z, .reduceDamageBy10 + jr z, .reduce_damage_by_10 cp SUBSTATUS1_REDUCE_BY_20 - jr z, .reduceDamageBy20 + jr z, .reduce_damage_by_20 cp SUBSTATUS1_HARDEN - jr z, .preventLessThan40Damage + jr z, .prevent_less_than_40_damage cp SUBSTATUS1_HALVE_DAMAGE - jr z, .halveDamage -.notAffectedBySubstatus1 + jr z, .halve_damage +.not_affected_by_substatus1 call CheckIfUnderAnyCannotUseStatus ret c ld a, [wLoadedMoveCategory] @@ -6313,32 +6663,32 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ret z ld a, [wTempNonTurnDuelistCardId] cp MR_MIME - jr z, .preventLessThan30Damage ; invisible wall + jr z, .prevent_less_than_30_damage ; invisible wall cp KABUTO - jr z, .halveDamage2 ; kabuto armor + jr z, .halve_damage2 ; kabuto armor ret -.noDamage +.no_damage ld de, 0 ret -.reduceDamageBy10 +.reduce_damage_by_10 ld hl, -10 add hl, de ld e, l ld d, h ret -.reduceDamageBy20 +.reduce_damage_by_20 ld hl, -20 add hl, de ld e, l ld d, h ret -.preventLessThan40Damage +.prevent_less_than_40_damage ld bc, 40 call CompareDEtoBC ret nc ld de, 0 ret -.halveDamage +.halve_damage sla d rr e bit 0, e @@ -6348,7 +6698,7 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ld e, l ld d, h ret -.preventLessThan30Damage +.prevent_less_than_30_damage ld a, [wLoadedMoveCategory] cp POKEMON_POWER ret z @@ -6357,7 +6707,7 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ret c ld de, 0 ret -.halveDamage2 +.halve_damage2 sla d rr e bit 0, e @@ -6369,7 +6719,7 @@ HandleDamageReductionExceptSubstatus2: ; 3269 (0:3269) ret ; 0x32f7 -INCBIN "baserom.gbc",$32f7,$33c1 - $32f7 + INCROM $32f7, $33c1 ; return carry if card is under a condition that makes it unable to attack ; also return in hl the text id to be displayed @@ -6378,18 +6728,18 @@ HandleCantAttackSubstatus: ; 33c1 (0:33c1) call GetTurnDuelistVariable or a ret z - text_hl UnableToAttackDueToTailWagText + ldtx hl, UnableToAttackDueToTailWagText cp SUBSTATUS2_TAIL_WAG - jr z, .returnWithCantAttack - text_hl UnableToAttackDueToLeerText + jr z, .return_with_cant_attack + ldtx hl, UnableToAttackDueToLeerText cp SUBSTATUS2_LEER - jr z, .returnWithCantAttack - text_hl UnableToAttackDueToBoneAttackText + jr z, .return_with_cant_attack + ldtx hl, UnableToAttackDueToBoneAttackText cp SUBSTATUS2_BONE_ATTACK - jr z, .returnWithCantAttack + jr z, .return_with_cant_attack or a ret -.returnWithCantAttack +.return_with_cant_attack scf ret @@ -6398,12 +6748,12 @@ HandleAmnesiaSubstatus: ; 33e1 (0:33e1) ld a, DUELVARS_ARENA_CARD_SUBSTATUS2 call GetTurnDuelistVariable or a - jr nz, .checkAmnesia + jr nz, .check_amnesia ret -.checkAmnesia +.check_amnesia cp SUBSTATUS2_AMNESIA jr z, .affectedByAmnesia -.notTheMoveDisabledByAmnesia +.not_the_disabled_move or a ret .affectedByAmnesia @@ -6411,8 +6761,8 @@ HandleAmnesiaSubstatus: ; 33e1 (0:33e1) call GetTurnDuelistVariable ld a, [wSelectedMoveIndex] cp [hl] - jr nz, .notTheMoveDisabledByAmnesia - text_hl UnableToUseAttackDueToAmnesiaText + jr nz, .not_the_disabled_move + ldtx hl, UnableToUseAttackDueToAmnesiaText scf ret @@ -6424,7 +6774,7 @@ HandleSandAttackOrSmokescreenSubstatus: ; 3400 (0:3400) ld [wcc0a], a ccf ret nc - text_hl AttackUnsuccessfulText + ldtx hl, AttackUnsuccessfulText call DrawWideTextBox_WaitForInput scf ret @@ -6435,15 +6785,15 @@ CheckSandAttackOrSmokescreenSubstatus: ; 3414 (0:3414) call GetTurnDuelistVariable or a ret z - text_de SandAttackCheckText + ldtx de, SandAttackCheckText cp SUBSTATUS2_SAND_ATTACK - jr z, .cardIsAffected - text_de SmokescreenCheckText + jr z, .card_is_affected + ldtx de, SmokescreenCheckText cp SUBSTATUS2_SMOKESCREEN - jr z, .cardIsAffected + jr z, .card_is_affected or a ret -.cardIsAffected +.card_is_affected ld a, [wcc0a] or a ret nz @@ -6462,31 +6812,31 @@ HandleNoDamageOrEffectSubstatus: ; 3432 (0:3432) ld a, DUELVARS_ARENA_CARD_SUBSTATUS1 call GetTurnDuelistVariable ld e, NO_DAMAGE_OR_EFFECT_FLY - text_hl NoDamageOrEffectDueToFlyText + ldtx hl, NoDamageOrEffectDueToFlyText cp SUBSTATUS1_FLY - jr z, .noDamageOrEffect + jr z, .no_damage_or_effect ld e, NO_DAMAGE_OR_EFFECT_BARRIER - text_hl NoDamageOrEffectDueToBarrierText + ldtx hl, NoDamageOrEffectDueToBarrierText cp SUBSTATUS1_BARRIER - jr z, .noDamageOrEffect + jr z, .no_damage_or_effect ld e, NO_DAMAGE_OR_EFFECT_AGILITY - text_hl NoDamageOrEffectDueToAgilityText + ldtx hl, NoDamageOrEffectDueToAgilityText cp SUBSTATUS1_AGILITY - jr z, .noDamageOrEffect + jr z, .no_damage_or_effect call CheckIfUnderAnyCannotUseStatus ccf ret nc ld a, [wTempNonTurnDuelistCardId] cp MEW1 - jr z, .neutralizingShield + jr z, .neutralizing_shield or a ret -.noDamageOrEffect +.no_damage_or_effect ld a, e ld [wNoDamageOrEffect], a scf ret -.neutralizingShield +.neutralizing_shield ld a, [wcce6] or a ret nz @@ -6498,8 +6848,8 @@ HandleNoDamageOrEffectSubstatus: ; 3432 (0:3432) or a ret z ld e, NO_DAMAGE_OR_EFFECT_NSHIELD - text_hl NoDamageOrEffectDueToNShieldText - jr .noDamageOrEffect + ldtx hl, NoDamageOrEffectDueToNShieldText + jr .no_damage_or_effect ; if the Pokemon being attacked is Haunter1, and its Transparency is active, ; there is a 50% chance that any damage or effect is prevented @@ -6519,12 +6869,12 @@ HandleTransparency: ; 348a (0:348a) jr c, .asm_3491 xor a ld [wcac2], a - text_de TransparencyCheckText + ldtx de, TransparencyCheckText call TossCoin ret nc ld a, NO_DAMAGE_OR_EFFECT_TRANSPARENCY ld [wNoDamageOrEffect], a - text_hl NoDamageOrEffectDueToTransparencyText + ldtx hl, NoDamageOrEffectDueToTransparencyText scf ret ; 0x34b7 @@ -6536,7 +6886,7 @@ CheckNoDamageOrEffect: ; 34b7 (0:34b7) or a ret z bit 7, a - jr nz, .dontPrintText ; already been here so don't repeat the text + jr nz, .dont_print_text ; already been here so don't repeat the text ld hl, wNoDamageOrEffect set 7, [hl] dec a @@ -6551,7 +6901,7 @@ CheckNoDamageOrEffect: ; 34b7 (0:34b7) scf ret -.dontPrintText +.dont_print_text ld hl, $0000 scf ret @@ -6582,17 +6932,17 @@ CheckIfUnderAnyCannotUseStatus: ; 34ef (0:34ef) ; same as above, but if a is non-0, only toxic gas is checked CheckIfUnderAnyCannotUseStatus2: ; 34f0 (0:34f0) or a - jr nz, .checkToxicGas + jr nz, .check_toxic_gas ld a, DUELVARS_ARENA_CARD_STATUS call GetTurnDuelistVariable and PASSIVE_STATUS_MASK - text_hl CannotUseDueToStatusText + ldtx hl, CannotUseDueToStatusText scf jr nz, .done ; return carry -.checkToxicGas +.check_toxic_gas ld a, MUK call Func_3509 - text_hl UnableDueToToxicGasText + ldtx hl, UnableDueToToxicGasText .done ret @@ -6661,7 +7011,7 @@ Func_3525: ; 3525 (0:3525) ret ; 0x356a -INCBIN "baserom.gbc",$356a,$35e6 - $356a + INCROM $356a, $35e6 ; if swords dance or focus energy was used this turn, ; mark that the base power of the next turn's attack has to be doubled @@ -6697,7 +7047,7 @@ UpdateSubstatusConditions: ; 35fa (0:35fa) ret ; 0x3615 -INCBIN "baserom.gbc",$3615,$363b - $3615 + INCROM $3615, $363b ; if the target card's HP is 0 and the attacking card's HP is not, ; the attacking card faints if it was affected by destiny bond @@ -6705,10 +7055,10 @@ HandleDestinyBondSubstatus: ; 363b (0:363b) ld a, DUELVARS_ARENA_CARD_SUBSTATUS1 call GetNonTurnDuelistVariable cp SUBSTATUS1_DESTINY_BOND - jr z, .checkHP + jr z, .check_hp ret -.checkHP +.check_hp ld a, DUELVARS_ARENA_CARD call GetNonTurnDuelistVariable cp $ff @@ -6734,7 +7084,7 @@ HandleDestinyBondSubstatus: ; 363b (0:363b) ld h, [hl] ld l, a call Func_2ebb - text_hl KnockedOutDueToDestinyBondText + ldtx hl, KnockedOutDueToDestinyBondText call DrawWideTextBox_WaitForInput ret ; 0x367b @@ -6744,9 +7094,9 @@ HandleDestinyBondSubstatus: ; 363b (0:363b) HandleStrikesBack: ; 367b (0:367b) ld a, [wTempNonTurnDuelistCardId] cp MACHAMP - jr z, .strikesBack + jr z, .strikes_back ret -.strikesBack +.strikes_back ld a, [wLoadedMoveCategory] and RESIDUAL ret nz @@ -6780,7 +7130,7 @@ ApplyStrikesBack: ; 36a2 (0:36a2) push af push hl call SubstractHP - text_hl ReceivesDamageDueToStrikesBackText + ldtx hl, ReceivesDamageDueToStrikesBackText call DrawWideTextBox_PrintText pop hl pop af @@ -6794,7 +7144,7 @@ ApplyStrikesBack: ; 36a2 (0:36a2) ret ; 0x36d9 -INCBIN "baserom.gbc",$36d9,$36f6 - $36d9 + INCROM $36d9, $36f6 Func_36f6: ; 36f6 (0:36f6) xor a @@ -6833,7 +7183,7 @@ Func_36f7: ; 36f7 (0:36f7) ret ; 0x3729 -INCBIN "baserom.gbc",$3729,$3730 - $3729 + INCROM $3729, $3730 Func_3730: ; 3730 (0:3730) ld a, DUELVARS_ARENA_CARD_SUBSTATUS3 @@ -6847,7 +7197,7 @@ Func_3730: ; 3730 (0:3730) ret ; 0x3743 -INCBIN "baserom.gbc",$3743,$374a - $3743 + INCROM $3743, $374a Func_374a: ; 374a (0:374a) ld a, DUELVARS_ARENA_CARD_SUBSTATUS4 @@ -6876,23 +7226,23 @@ HandleEnergyBurn: ; 375d (0:375d) ld hl, wAttachedEnergies ld c, COLORLESS - FIRE xor a -.zeroNextEnergy +.zero_next_energy ld [hli], a dec c - jr nz, .zeroNextEnergy + jr nz, .zero_next_energy ld a, [wTotalAttachedEnergies] ld [wAttachedEnergies], a ret ; 0x377f -SetupSound_T: ; 377f (0:377f) - farcall SetupSound_Ext +SetupSound: ; 377f (0:377f) + farcall _SetupSound ret Func_3784: ; 3784 (0:3784) xor a PlaySong: ; 3785 (0:3785) - farcall Func_f4006 + farcall _PlaySong ret Func_378a: ; 378a (0:378a) @@ -6905,8 +7255,8 @@ Func_378f: ; 378f (0:378f) Func_3794: ; 3794 (0:3794) ld a, $04 -Func_3796: ; 3796 (0:3796) - farcall Func_f4009 +PlaySFX: ; 3796 (0:3796) + farcall _PlaySFX ret Func_379b: ; 379b (0:379b) @@ -6918,7 +7268,7 @@ Func_37a0: ; 37a0 (0:37a0) ret ; 0x37a5 -INCBIN "baserom.gbc",$37a5,$380e - $37a5 + INCROM $37a5, $380e Func_380e: ; 380e (0:380e) ld a, [wd0c1] @@ -7079,7 +7429,7 @@ GetFloorObjectFromPos: ; 3927 (0:3927) ret ; 0x392e -INCBIN "baserom.gbc",$392e,$3946 - $392e + INCROM $392e, $3946 ; puts a floor tile in hc given coords in bc (x,y. measured in tiles) FindFloorTileFromPos: ; 3946 (0:3946) @@ -7108,7 +7458,7 @@ Func_395a: ; 395a (0:395a) ret Unknown_396b: ; 396b (0:396b) -INCBIN "baserom.gbc",$396b,$3973 - $396b + INCROM $396b, $3973 ; Movement offsets for scripted movements ScriptedMovementOffsetTable: ; 3973 (0:3973) @@ -7118,7 +7468,7 @@ ScriptedMovementOffsetTable: ; 3973 (0:3973) db -$02, $00 ; move 2 tiles left Unknown_397b: ; 397b (0:397b) -INCBIN "baserom.gbc",$397b,$3997 - $397b + INCROM $397b, $3997 Func_3997: ; 3997 (0:3997) ldh a, [hBankROM] @@ -7186,7 +7536,7 @@ Func_39c3: ; 39c3 (0:39c3) ret ; 0x39ea -INCBIN "baserom.gbc",$39ea,$39fc - $39ea + INCROM $39ea, $39fc Func_39fc: ; 39fc (0:39fc) push hl @@ -7239,7 +7589,7 @@ Func_3a40: ; 3a40 (0:3a40) ret ; 0x3a45 -INCBIN "baserom.gbc",$3a45,$3a5e - $3a45 + INCROM $3a45, $3a5e Func_3a5e: ; 3a5e (0:3a5e) ldh a, [hBankROM] @@ -7333,7 +7683,7 @@ Func_3abd: ; 3abd (0:3abd) ret ; 0x3ae8 -INCBIN "baserom.gbc",$3ae8,$3aed - $3ae8 + INCROM $3ae8, $3aed ; finds an OWScript from the first byte and puts the next two bytes (usually arguments?) into cb RunOverworldScript: ; 3aed (0:3aed) @@ -7364,7 +7714,7 @@ RunOverworldScript: ; 3aed (0:3aed) jp hl ; 0x3b11 -INCBIN "baserom.gbc",$3b11,$3b21 - $3b11 + INCROM $3b11, $3b21 Func_3b21: ; 3b21 (0:3b21) ldh a, [hBankROM] @@ -7446,7 +7796,7 @@ Func_3b6a: ; 3b6a (0:3b6a) ret ; 0x3ba2 -INCBIN "baserom.gbc",$3ba2,$3bd2 - $3ba2 + INCROM $3ba2, $3bd2 ; writes from hl the pointer to the function to be called by DoFrame SetDoFrameFunction: ; 3bd2 (0:3bd2) @@ -7464,7 +7814,7 @@ ResetDoFrameFunction: ; 3bdb (0:3bdb) ret ; 0x3be4 -INCBIN "baserom.gbc",$3be4,$3bf5 - $3be4 + INCROM $3be4, $3bf5 Func_3bf5: ; 3bf5 (0:3bf5) ldh a, [hBankROM] @@ -7476,25 +7826,25 @@ Func_3bf5: ; 3bf5 (0:3bf5) ld l, a ld a, [wd4c5] ld h, a - call CopyData_SaveRegisters + call CopyDataHLtoDE_SaveRegisters pop hl pop af call BankswitchHome ret ; 0x3c10 -INCBIN "baserom.gbc",$3c10,$3c45 - $3c10 + INCROM $3c10, $3c45 Func_3c45: ; 3c45 (0:3c45) jp hl ; 0x3c46 -INCBIN "baserom.gbc",$3c46,$3c48 - $3c46 + INCROM $3c46, $3c48 DoFrameIfLCDEnabled: ; 3c48 (0:3c48) push af ld a, [rLCDC] - bit 7, a + bit rLCDC_ENABLE, a jr z, .done push bc push de @@ -7544,7 +7894,7 @@ Func_3c83: ; 3c83 (0:3c83) ret ; 0x3c87 -INCBIN "baserom.gbc",$3c87,$3c96 - $3c87 + INCROM $3c87, $3c96 Func_3c96: ; 3c96 (0:3c96) call DoFrameIfLCDEnabled @@ -7578,7 +7928,7 @@ Func_3cb4: ; 3cb4 (0:3cb4) ret ; 0x3cc4 -INCBIN "baserom.gbc",$3cc4,$3d72 - $3cc4 + INCROM $3cc4, $3d72 Func_3d72: ; 3d72 (0:3d72) ldh a, [hBankROM] @@ -7657,7 +8007,7 @@ ModifyUnknownOAMBufferProperty: ; 3dbf (0:3dbf) ret ; 0x3ddb -INCBIN "baserom.gbc",$3ddb,$3df3 - $3ddb + INCROM $3ddb, $3df3 Func_3df3: ; 3df3 (0:3df3) push af @@ -7678,8 +8028,10 @@ Func_3df3: ; 3df3 (0:3df3) ret ; 0x3e10 -INCBIN "baserom.gbc",$3e10,$3e17 - $3e10 - +Func_3e10: ; 3e10 (0:3e10) + ld a, $1 + ld [wd61e], a + ld a, $62 Func_3e17: ; 3e17 (0:3e17) ld [wd131], a ldh a, [hBankROM] @@ -7697,7 +8049,7 @@ Func_3e2a: ; 3e2a (0:3e2a) jr Func_3e17 ; 0x3e31 -INCBIN "baserom.gbc",$3e31,$3fe0 - $3e31 + INCROM $3e31, $3fe0 ; jumps to 3f:hl Bankswitch3dTo3f:: ; 3fe0 (0:3fe0) @@ -7717,5 +8069,5 @@ Bankswitch3d: ; 3fe0 (0:3fe0) ret rept $a -db $ff + db $ff endr diff --git a/src/gfx.asm b/src/gfx.asm index 9714ff3..7ee87f7 100644 --- a/src/gfx.asm +++ b/src/gfx.asm @@ -1,6 +1,6 @@ INCLUDE "macros.asm" -SECTION "bank1D",ROMX,BANK[$1D] +SECTION "Gfx 1", ROMX Fonts:: ; 74000 (1d:4000) INCBIN "gfx/fonts.t3.1bpp" @@ -10,19 +10,19 @@ INCBIN "gfx/vwf.1bpp" DuelGraphics:: ; 76968 (1d:6968) INCBIN "gfx/duel/duel1.t5.2bpp",$0,$1698 -SECTION "bank1E",ROMX,BANK[$1E] +SECTION "Gfx 2", ROMX INCBIN "gfx/duel/duel1.t5.2bpp",$1698,$318 INCBIN "gfx/duel/duel2.2bpp" rept $2b68 -db $ff + db $ff endr -SECTION "bank1F",ROMX,BANK[$1F] +SECTION "Empty Bank 1F", ROMX emptybank -SECTION "bank21",ROMX,BANK[$21] -INCBIN "baserom.gbc",$84000,$87828 - $84000 +SECTION "Gfx 3", ROMX + INCROM $84000, $87828 IshiharaTilesetGfx: ; 87828 (21:7828) dw $4d @@ -48,9 +48,9 @@ Unnamed2Gfx: ; 87fe2 (21:7fe2) dw $1 INCBIN "gfx/unnamed/2.2bpp" -INCBIN "baserom.gbc",$87ff4,$88000 - $87ff4 + INCROM $87ff4, $88000 -SECTION "bank22",ROMX,BANK[$22] +SECTION "Gfx 4", ROMX OverworldMapTiles: ; 88000 (22:4000) dw $c1 INCBIN "gfx/overworld_map.t15.2bpp" @@ -91,9 +91,9 @@ Unnamed3Gfx: ; 8bfd2 (22:7fd2) dw $1 INCBIN "gfx/unnamed/3.2bpp" -INCBIN "baserom.gbc",$8bfe4,$8C000 - $8bfe4 + INCROM $8bfe4, $8C000 -SECTION "bank23",ROMX,BANK[$23] +SECTION "Gfx 5", ROMX LightningClubTilesetGfx: ; 8c000 (23:4000) dw $83 INCBIN "gfx/tilesets/lightningclub.t13.2bpp" @@ -155,9 +155,9 @@ PoisonGfx: ; 8ffa4 (23:7fa4) dw $4 INCBIN "gfx/duel/poison.2bpp" -INCBIN "baserom.gbc",$8ffe6,$90000 - $8ffe6 + INCROM $8ffe6, $90000 -SECTION "bank24",ROMX,BANK[$24] +SECTION "Gfx 6", ROMX CardPop1Gfx: ; 90000 (24:4000) dw $bd INCBIN "gfx/cardpop1.t3.2bpp" @@ -215,10 +215,10 @@ Unnamed5Gfx: ; 93fda (24:7fda) INCBIN "gfx/unnamed/5.2bpp" rept $4 -db $ff + db $ff endr -SECTION "bank25",ROMX,BANK[$25] +SECTION "Gfx 7", ROMX Laboratory1Gfx: ; 94000 (25:4000) dw $60 INCBIN "gfx/boosterpacks/laboratory1.2bpp" @@ -267,9 +267,9 @@ RonaldOWGfx: ; 97ea6 (25:7ea6) dw $14 INCBIN "gfx/ow/ronald.2bpp" -INCBIN "baserom.gbc",$97fe8,$98000 - $97fe8 + INCROM $97fe8, $98000 -SECTION "bank26",ROMX,BANK[$26] +SECTION "Gfx 8", ROMX Titlescreen3Gfx: ; 98000 (26:4000) dw $f4 INCBIN "gfx/titlescreen/titlescreen3.t12.2bpp" @@ -302,7 +302,7 @@ Unnamed7Gfx: ; 9bfee (26:7fee) dw $1 INCBIN "gfx/unnamed/7.2bpp" -SECTION "bank27",ROMX,BANK[$27] +SECTION "Gfx 9", ROMX SamGfx: ; 9c000 (27:4000) dw $24 INCBIN "gfx/duelists/sam.2bpp" @@ -424,10 +424,10 @@ Unnamed9Gfx: ; 9ffda (27:7fda) INCBIN "gfx/unnamed/9.2bpp" rept $4 -db $ff + db $ff endr -SECTION "bank28",ROMX,BANK[$28] +SECTION "Gfx 10", ROMX DanielGfx: ; a0000 (28:4000) dw $24 INCBIN "gfx/duelists/daniel.2bpp" @@ -600,9 +600,9 @@ Unnamed11Gfx: ; a3fb4 (28:7fb4) dw $4 INCBIN "gfx/unnamed/11.2bpp" -INCBIN "baserom.gbc",$a3ff6,$a4000 - $a3ff6 + INCROM $a3ff6, $a4000 -SECTION "bank29",ROMX,BANK[$29] +SECTION "Gfx 11", ROMX OWSprite30: ; a4000 (29:4000) dw $14 INCBIN "gfx/ow/sprite30.2bpp" @@ -799,9 +799,9 @@ Duel45Gfx: ; a7fb0 (29:7fb0) dw $03 INCBIN "gfx/duel/45.2bpp" -INCBIN "baserom.gbc",$a7fe2,$a8000 - $a7fe2 + INCROM $a7fe2, $a8000 -SECTION "bank2A",ROMX,BANK[$2A] +SECTION "Gfx 12", ROMX Duel46Gfx: ; a8000 (2a:4000) dw $08 INCBIN "gfx/duel/46.2bpp" @@ -874,27 +874,27 @@ FightingGfx: ; a8e12 (2a:4e12) dw $04 INCBIN "gfx/titlescreen/fighting.2bpp" -INCBIN "baserom.gbc",$a8e54,$ac000 - $a8e54 + INCROM $a8e54, $ac000 -SECTION "bank2B",ROMX,BANK[$2B] +SECTION "Gfx 13", ROMX INCBIN "baserom.gbc",$AC000,$4000 -SECTION "bank2C",ROMX,BANK[$2C] +SECTION "Gfx 14", ROMX INCBIN "baserom.gbc",$B0000,$4000 -SECTION "bank2D",ROMX,BANK[$2D] +SECTION "Gfx 15", ROMX INCBIN "baserom.gbc",$B4000,$4000 -SECTION "bank2E",ROMX,BANK[$2E] +SECTION "Gfx 16", ROMX INCBIN "baserom.gbc",$B8000,$4000 -SECTION "bank2F",ROMX,BANK[$2F] +SECTION "Empty Bank 2F", ROMX emptybank -SECTION "bank30",ROMX,BANK[$30] +SECTION "Empty Bank 30", ROMX emptybank -SECTION "bank31",ROMX,BANK[$31] +SECTION "Card Gfx 1", ROMX CardGraphics:: ; c4000 (31:4000) GrassEnergyCardGfx:: ; c4000 (31:4000) @@ -981,7 +981,7 @@ NidorinaCardGfx:: ; c7ca0 (31:7ca0) INCBIN "gfx/cards/nidorina.8x6.2bpp" INCBIN "gfx/cards/nidorina.pal" -SECTION "bank32",ROMX,BANK[$32] +SECTION "Card Gfx 2", ROMX NidoqueenCardGfx:: ; c8000 (32:4000) INCBIN "gfx/cards/nidoqueen.8x6.2bpp" INCBIN "gfx/cards/nidoqueen.pal" @@ -1066,7 +1066,7 @@ KoffingCardGfx:: ; cbca0 (32:7ca0) INCBIN "gfx/cards/koffing.8x6.2bpp" INCBIN "gfx/cards/koffing.pal" -SECTION "bank33",ROMX,BANK[$33] +SECTION "Card Gfx 3", ROMX WeezingCardGfx:: ; cc000 (33:4000) INCBIN "gfx/cards/weezing.8x6.2bpp" INCBIN "gfx/cards/weezing.pal" @@ -1151,7 +1151,7 @@ Moltres1CardGfx:: ; cfca0 (33:7ca0) INCBIN "gfx/cards/moltres1.8x6.2bpp" INCBIN "gfx/cards/moltres1.pal" -SECTION "bank34",ROMX,BANK[$34] +SECTION "Card Gfx 4", ROMX Moltres2CardGfx:: ; d0000 (34:4000) INCBIN "gfx/cards/moltres2.8x6.2bpp" INCBIN "gfx/cards/moltres2.pal" @@ -1236,7 +1236,7 @@ SeakingCardGfx:: ; d3ca0 (34:7ca0) INCBIN "gfx/cards/seaking.8x6.2bpp" INCBIN "gfx/cards/seaking.pal" -SECTION "bank35",ROMX,BANK[$35] +SECTION "Card Gfx 5", ROMX StaryuCardGfx:: ; d4000 (35:4000) INCBIN "gfx/cards/staryu.8x6.2bpp" INCBIN "gfx/cards/staryu.pal" @@ -1321,7 +1321,7 @@ Magnemite1CardGfx:: ; d7ca0 (35:7ca0) INCBIN "gfx/cards/magnemite1.8x6.2bpp" INCBIN "gfx/cards/magnemite1.pal" -SECTION "bank36",ROMX,BANK[$36] +SECTION "Card Gfx 6", ROMX Magnemite2CardGfx:: ; d8000 (36:4000) INCBIN "gfx/cards/magnemite2.8x6.2bpp" INCBIN "gfx/cards/magnemite2.pal" @@ -1406,7 +1406,7 @@ MachokeCardGfx:: ; dbca0 (36:7ca0) INCBIN "gfx/cards/machoke.8x6.2bpp" INCBIN "gfx/cards/machoke.pal" -SECTION "bank37",ROMX,BANK[$37] +SECTION "Card Gfx 7", ROMX MachampCardGfx:: ; dc000 (37:4000) INCBIN "gfx/cards/machamp.8x6.2bpp" INCBIN "gfx/cards/machamp.pal" @@ -1491,7 +1491,7 @@ SlowbroCardGfx:: ; dfca0 (37:7ca0) INCBIN "gfx/cards/slowbro.8x6.2bpp" INCBIN "gfx/cards/slowbro.pal" -SECTION "bank38",ROMX,BANK[$38] +SECTION "Card Gfx 8", ROMX Gastly1CardGfx:: ; e0000 (38:4000) INCBIN "gfx/cards/gastly1.8x6.2bpp" INCBIN "gfx/cards/gastly1.pal" @@ -1576,7 +1576,7 @@ RaticateCardGfx:: ; e3ca0 (38:7ca0) INCBIN "gfx/cards/raticate.8x6.2bpp" INCBIN "gfx/cards/raticate.pal" -SECTION "bank39",ROMX,BANK[$39] +SECTION "Card Gfx 9", ROMX SpearowCardGfx:: ; e4000 (39:4000) INCBIN "gfx/cards/spearow.8x6.2bpp" INCBIN "gfx/cards/spearow.pal" @@ -1661,7 +1661,7 @@ PorygonCardGfx:: ; e7ca0 (39:7ca0) INCBIN "gfx/cards/porygon.8x6.2bpp" INCBIN "gfx/cards/porygon.pal" -SECTION "bank3A",ROMX,BANK[$3A] +SECTION "Card Gfx 10", ROMX SnorlaxCardGfx:: ; e8000 (3a:4000) INCBIN "gfx/cards/snorlax.8x6.2bpp" INCBIN "gfx/cards/snorlax.pal" @@ -1746,7 +1746,7 @@ SwitchCardGfx:: ; ebca0 (3a:7ca0) INCBIN "gfx/cards/switch.8x6.2bpp" INCBIN "gfx/cards/switch.pal" -SECTION "bank3B",ROMX,BANK[$3B] +SECTION "Card Gfx 11", ROMX PokemonCenterCardGfx:: ; ec000 (3b:4000) INCBIN "gfx/cards/pokemoncenter.8x6.2bpp" INCBIN "gfx/cards/pokemoncenter.pal" @@ -1820,8 +1820,8 @@ RecycleCardGfx:: ; ef388 (3b:7388) INCBIN "gfx/cards/recycle.pal" rept $970 -db $ff + db $ff endr -SECTION "bank3C",ROMX,BANK[$3C] +SECTION "Empty Bank 3C", ROMX emptybank diff --git a/src/macros.asm b/src/macros.asm index 9d4728a..837bfb2 100755 --- a/src/macros.asm +++ b/src/macros.asm @@ -1,409 +1,5 @@ -;;; engine macros - -const_def: MACRO -IF _NARG > 0 -const_value = \1 -ELSE -const_value = 0 -ENDC -ENDM - -const: MACRO -\1 EQU const_value -const_value = const_value + 1 -ENDM - -dbw: MACRO - db \1 - dw \2 -ENDM - -dwb: MACRO - dw \1 - db \2 -ENDM - -dx: MACRO -x = 8 * ((\1) - 1) - rept \1 - db ((\2) >> x) & $ff -x = x + -8 - endr - ENDM - -dt: MACRO ; three-byte (big-endian) - dx 3, \1 - ENDM - -dd: MACRO ; four-byte (big-endian) - dx 4, \1 - ENDM - -bigdw: MACRO ; big-endian word - dx 2, \1 - ENDM - -lb: MACRO ; r, hi, lo - ld \1, (\2) << 8 + ((\3) & $ff) -ENDM - -bank1call: MACRO - rst $18 - dw \1 -ENDM - -farcall: MACRO - rst $28 - db BANK(\1) - dw \1 -ENDM - -; used when the specified bank does not match the bank of the specified function -; otherwise, farcall is preferred -farcallx: MACRO - rst $28 - db \1 - dw \2 -ENDM - -emptybank: MACRO - rept $4000 - db $ff - endr -ENDM - -rgb: MACRO - dw (\3 << 10 | \2 << 5 | \1) -ENDM - -textpointer: MACRO - dw ((\1 + ($4000 * (BANK(\1) - 1))) - (TextOffsets + ($4000 * (BANK(TextOffsets) - 1)))) & $ffff - db ((\1 + ($4000 * (BANK(\1) - 1))) - (TextOffsets + ($4000 * (BANK(TextOffsets) - 1)))) >> 16 - const \1_ -GLOBAL \1_ -ENDM - -text_hl: MACRO - ld hl, \1_ -ENDM - -text_de: MACRO - ld de, \1_ -ENDM - -sgb: MACRO - db \1 * 8 + \2 ; sgb_command * 8 + length -ENDM - -run_script: MACRO - db \1_index -ENDM - -;;; notes/instruments macros - -C_: MACRO - db $10 | (\1 - 1) -ENDM - -C#: MACRO - db $20 | (\1 - 1) -ENDM - -D_: MACRO - db $30 | (\1 - 1) -ENDM - -D#: MACRO - db $40 | (\1 - 1) -ENDM - -E_: MACRO - db $50 | (\1 - 1) -ENDM - -F_: MACRO - db $60 | (\1 - 1) -ENDM - -F#: MACRO - db $70 | (\1 - 1) -ENDM - -G_: MACRO - db $80 | (\1 - 1) -ENDM - -G#: MACRO - db $90 | (\1 - 1) -ENDM - -A_: MACRO - db $A0 | (\1 - 1) -ENDM - -A#: MACRO - db $B0 | (\1 - 1) -ENDM - -B_: MACRO - db $C0 | (\1 - 1) -ENDM - -bass: MACRO - db $10 | (\1 - 1) -ENDM - -snare1: MACRO ; medium length - db $30 | (\1 - 1) -ENDM - -snare2: MACRO ; medium length - db $50 | (\1 - 1) -ENDM - -snare3: MACRO ; short - db $70 | (\1 - 1) -ENDM - -snare4: MACRO ; long - db $90 | (\1 - 1) -ENDM - -snare5: MACRO ; long - db $C0 | (\1 - 1) -ENDM - -rest: MACRO - db \1 - 1 -ENDM - -speed: MACRO - db $d0, \1 -ENDM - -octave: MACRO - db ($d << 4) | \1 -ENDM - -inc_octave: MACRO - db $d7 -ENDM - -dec_octave: MACRO - db $d8 -ENDM - -tie: MACRO - db $d9 -ENDM - -musicdc: MACRO - db $dc, \1 -ENDM - -MainLoop: MACRO - db $dd -ENDM - -EndMainLoop: MACRO - db $de -ENDM - -Loop: MACRO - db $df, \1 -ENDM - -EndLoop: MACRO - db $e0 -ENDM - -; unused -;music_jp: MACRO -; db $e1 -; dw \1 -;ENDM - -music_call: MACRO - db $e2 - dw \1 -ENDM - -music_ret: MACRO - db $e3 -ENDM - -musice4: MACRO - db $e4, \1 -ENDM - -duty: MACRO - db $e5, \1 << 6 -ENDM - -volume: MACRO - db $e6, \1 -ENDM - -wave: MACRO - db $e7, \1 -ENDM - -musice8: MACRO - db $e8, \1 -ENDM - -musice9: MACRO - db $e9, \1 -ENDM - -vibrato_type: MACRO - db $ea, \1 -ENDM - -vibrato_delay: MACRO - db $eb, \1 -ENDM - -; unused -;musicec: MACRO -; db $ec, \1 -;ENDM - -; unused -;musiced: MACRO -; db $ed, \1 -;ENDM - -music_end: MACRO - db $ff -ENDM - -sfx_0: MACRO - db \1, \2 -ENDM - -sfx_1: MACRO - db $10, \1 -ENDM - -sfx_2: MACRO - db $20 | \1 -ENDM - -sfx_loop: MACRO - db $30, \1 -ENDM - -sfx_endloop: MACRO - db $40 -ENDM - -sfx_5: MACRO - db $50, \1 -ENDM - -sfx_6: MACRO - db $60, \1 -ENDM - -sfx_8: MACRO - db $80, \1 -ENDM - -sfx_end: MACRO - db $f0 -ENDM - -;;; card macros - -energy: MACRO -fg = 0 -lw = 0 -fp = 0 -c_ = 0 - - if _NARG > 1 - - rept _NARG / 2 - - if \1 == FIRE -fg = fg + \2 * $10 - endc - if \1 == GRASS -fg = fg + \2 - endc - if \1 == LIGHTNING -lw = lw + \2 * $10 - endc - if \1 == WATER -lw = lw + \2 - endc - if \1 == FIGHTING -fp = fp + \2 * $10 - endc - if \1 == PSYCHIC -fp = fp + \2 - endc - if \1 == COLORLESS -c_ = c_ + \2 * $10 - endc - - shift - shift - - endr - - endc - db fg, lw, fp, c_ -ENDM - -gfx: MACRO - dw ($4000 * (BANK(\1) - BANK(CardGraphics)) + (\1 - $4000)) / 8 -ENDM - -tx: MACRO - dw \1_ -ENDM - -card_data_struct: MACRO -\1Type:: db -\1Gfx:: dw -\1Name:: dw -\1Rarity:: db -\1Set:: db -\1ID:: db -\1EnergyCardEffectCommands:: ; dw -\1TrainerCardEffectCommands:: ; dw -\1HP:: db -\1Stage:: db -\1EnergyCardDescription:: ; dw -\1TrainerCardDescription:: ; dw -\1PreEvoName:: dw -\1Move1:: move_data_struct \1Move1 -\1Move2:: move_data_struct \1Move2 -\1RetreatCost:: db -\1Weakness:: db -\1Resistance:: db -\1Kind:: dw -\1PokedexNumber:: db -\1Unknown1:: db -\1Level:: db -\1Length:: dw -\1Weight:: dw -\1Description:: dw -\1Unknown2:: db -ENDM - -move_data_struct: MACRO -\1Energy:: ds $4 -\1Name:: dw -\1Description:: ds $4 -\1Damage:: db -\1Category:: db -\1EffectCommands:: dw -\1Flag1:: db -\1Flag2:: db -\1Flag3:: db -\1Unknown1:: db -\1Animation:: db -ENDM +INCLUDE "macros/audio.asm" +INCLUDE "macros/code.asm" +INCLUDE "macros/data.asm" +INCLUDE "macros/scripts.asm" +INCLUDE "macros/wram.asm" diff --git a/src/macros/audio.asm b/src/macros/audio.asm new file mode 100644 index 0000000..f79ee8f --- /dev/null +++ b/src/macros/audio.asm @@ -0,0 +1,212 @@ +C_: MACRO + db $10 | (\1 - 1) +ENDM + +C#: MACRO + db $20 | (\1 - 1) +ENDM + +D_: MACRO + db $30 | (\1 - 1) +ENDM + +D#: MACRO + db $40 | (\1 - 1) +ENDM + +E_: MACRO + db $50 | (\1 - 1) +ENDM + +F_: MACRO + db $60 | (\1 - 1) +ENDM + +F#: MACRO + db $70 | (\1 - 1) +ENDM + +G_: MACRO + db $80 | (\1 - 1) +ENDM + +G#: MACRO + db $90 | (\1 - 1) +ENDM + +A_: MACRO + db $A0 | (\1 - 1) +ENDM + +A#: MACRO + db $B0 | (\1 - 1) +ENDM + +B_: MACRO + db $C0 | (\1 - 1) +ENDM + +bass: MACRO + db $10 | (\1 - 1) +ENDM + +snare1: MACRO ; medium length + db $30 | (\1 - 1) +ENDM + +snare2: MACRO ; medium length + db $50 | (\1 - 1) +ENDM + +snare3: MACRO ; short + db $70 | (\1 - 1) +ENDM + +snare4: MACRO ; long + db $90 | (\1 - 1) +ENDM + +snare5: MACRO ; long + db $C0 | (\1 - 1) +ENDM + +rest: MACRO + db \1 - 1 +ENDM + +speed: MACRO + db $d0, \1 +ENDM + +octave: MACRO + db ($d << 4) | \1 +ENDM + +inc_octave: MACRO + db $d7 +ENDM + +dec_octave: MACRO + db $d8 +ENDM + +tie: MACRO + db $d9 +ENDM + +musicdc: MACRO + db $dc, \1 +ENDM + +MainLoop: MACRO + db $dd +ENDM + +EndMainLoop: MACRO + db $de +ENDM + +Loop: MACRO + db $df, \1 +ENDM + +EndLoop: MACRO + db $e0 +ENDM + +; unused +;music_jp: MACRO +; db $e1 +; dw \1 +;ENDM + +music_call: MACRO + db $e2 + dw \1 +ENDM + +music_ret: MACRO + db $e3 +ENDM + +musice4: MACRO + db $e4, \1 +ENDM + +duty: MACRO + db $e5, \1 << 6 +ENDM + +volume: MACRO + db $e6, \1 +ENDM + +wave: MACRO + db $e7, \1 +ENDM + +musice8: MACRO + db $e8, \1 +ENDM + +musice9: MACRO + db $e9, \1 +ENDM + +vibrato_type: MACRO + db $ea, \1 +ENDM + +vibrato_delay: MACRO + db $eb, \1 +ENDM + +; unused +;musicec: MACRO +; db $ec, \1 +;ENDM + +; unused +;musiced: MACRO +; db $ed, \1 +;ENDM + +music_end: MACRO + db $ff +ENDM + +sfx_0: MACRO + db \1, \2 +ENDM + +sfx_1: MACRO + db $10, \1 +ENDM + +sfx_2: MACRO + db $20 | \1 +ENDM + +sfx_loop: MACRO + db $30, \1 +ENDM + +sfx_endloop: MACRO + db $40 +ENDM + +sfx_5: MACRO + db $50, \1 +ENDM + +sfx_6: MACRO + db $60, \1 +ENDM + +sfx_8: MACRO + db $80, \1 +ENDM + +sfx_end: MACRO + db $f0 +ENDM diff --git a/src/macros/code.asm b/src/macros/code.asm new file mode 100644 index 0000000..47b698f --- /dev/null +++ b/src/macros/code.asm @@ -0,0 +1,56 @@ +INCROM: MACRO +INCBIN "baserom.gbc", \1, \2 - \1 +ENDM + +const_def: MACRO +if _NARG > 0 +const_value = \1 +else +const_value = 0 +endc +ENDM + +const: MACRO +\1 EQU const_value +const_value = const_value + 1 +ENDM + +lb: MACRO ; r, hi, lo + ld \1, (\2) << 8 + ((\3) & $ff) +ENDM + +ldtx: MACRO + ld \1, \2_ +ENDM + +bank1call: MACRO + rst $18 + dw \1 +ENDM + +farcall: MACRO + rst $28 + db BANK(\1) + dw \1 +ENDM + +; used when the specified bank does not match the bank of the specified function +; otherwise, farcall is preferred +farcallx: MACRO + rst $28 + db \1 + dw \2 +ENDM + +emptybank: MACRO + rept $4000 + db $ff + endr +ENDM + +textpointer: MACRO + dw ((\1 + ($4000 * (BANK(\1) - 1))) - (TextOffsets + ($4000 * (BANK(TextOffsets) - 1)))) & $ffff + db ((\1 + ($4000 * (BANK(\1) - 1))) - (TextOffsets + ($4000 * (BANK(TextOffsets) - 1)))) >> 16 + const \1_ +GLOBAL \1_ +ENDM diff --git a/src/macros/data.asm b/src/macros/data.asm new file mode 100644 index 0000000..4f66742 --- /dev/null +++ b/src/macros/data.asm @@ -0,0 +1,69 @@ +dn: MACRO + db \1 << 4 | \2 +ENDM + +dbw: MACRO + db \1 + dw \2 +ENDM + +dwb: MACRO + dw \1 + db \2 +ENDM + +dx: MACRO +x = 8 * ((\1) - 1) + rept \1 + db ((\2) >> x) & $ff +x = x + -8 + endr + ENDM + +dt: MACRO ; three-byte (big-endian) + dx 3, \1 + ENDM + +dd: MACRO ; four-byte (big-endian) + dx 4, \1 + ENDM + +bigdw: MACRO ; big-endian word + dx 2, \1 + ENDM + +sgb: MACRO + db \1 * 8 + \2 ; sgb_command * 8 + length +ENDM + +rgb: MACRO + dw (\3 << 10 | \2 << 5 | \1) +ENDM + +; macros used in data/cards.asm, but might be useful elsewhere eventually + +energy: MACRO +en = 0 +if _NARG > 1 + rept _NARG / 2 +x = 4 - 8 * (\1 % 2) +en = en + \2 << ((\1 * 4) + x) + shift + shift + endr + rept NUM_TYPES / 2 + db LOW(en) +en = en >> 8 + endr +else + db 0, 0, 0, 0 +endc +ENDM + +gfx: MACRO + dw ($4000 * (BANK(\1) - BANK(CardGraphics)) + (\1 - $4000)) / 8 +ENDM + +tx: MACRO + dw \1_ +ENDM diff --git a/src/macros/scripts.asm b/src/macros/scripts.asm new file mode 100644 index 0000000..9c46f96 --- /dev/null +++ b/src/macros/scripts.asm @@ -0,0 +1,7 @@ +start_script EQUS "rst $20" + +run_script: MACRO + db \1_index +ENDM + +; TODO: macros for scripts (constants/overworld_scripts_constants.asm) diff --git a/src/macros/wram.asm b/src/macros/wram.asm new file mode 100644 index 0000000..cea20fa --- /dev/null +++ b/src/macros/wram.asm @@ -0,0 +1,42 @@ +card_data_struct: MACRO +\1Type:: db +\1Gfx:: dw +\1Name:: dw +\1Rarity:: db +\1Set:: db +\1ID:: db +\1EnergyCardEffectCommands:: ; dw +\1TrainerCardEffectCommands:: ; dw +\1HP:: db +\1Stage:: db +\1EnergyCardDescription:: ; dw +\1TrainerCardDescription:: ; dw +\1PreEvoName:: dw +\1Move1:: move_data_struct \1Move1 +\1Move2:: move_data_struct \1Move2 +\1RetreatCost:: db +\1Weakness:: db +\1Resistance:: db +\1Kind:: dw +\1PokedexNumber:: db +\1Unknown1:: db +\1Level:: db +\1Length:: dw +\1Weight:: dw +\1Description:: dw +\1Unknown2:: db +ENDM + +move_data_struct: MACRO +\1Energy:: ds $4 +\1Name:: dw +\1Description:: ds $4 +\1Damage:: db +\1Category:: db +\1EffectCommands:: dw +\1Flag1:: db +\1Flag2:: db +\1Flag3:: db +\1Unknown1:: db +\1Animation:: db +ENDM diff --git a/src/main.asm b/src/main.asm index 3f294cb..6e89c9d 100755 --- a/src/main.asm +++ b/src/main.asm @@ -1,48 +1,52 @@ -INCLUDE "constants.asm" INCLUDE "macros.asm" +INCLUDE "constants.asm" INCLUDE "engine/home.asm" -SECTION "bank1",ROMX,BANK[$1] +SECTION "bank1", ROMX INCLUDE "engine/bank1.asm" -SECTION "bank2",ROMX,BANK[$2] +SECTION "bank2", ROMX INCLUDE "engine/bank2.asm" -SECTION "bank3",ROMX,BANK[$3] +SECTION "bank3", ROMX INCLUDE "engine/bank3.asm" -SECTION "bank4",ROMX,BANK[$4] +SECTION "bank4", ROMX INCLUDE "engine/bank4.asm" -SECTION "bank5",ROMX,BANK[$5] +SECTION "bank5", ROMX INCLUDE "engine/bank5.asm" -SECTION "bank6",ROMX,BANK[$6] +SECTION "bank6", ROMX INCLUDE "engine/bank6.asm" -SECTION "bank7",ROMX,BANK[$7] +SECTION "bank7", ROMX INCLUDE "engine/bank7.asm" -INCLUDE "engine/boosters.asm" -SECTION "bank8",ROMX,BANK[$8] +SECTION "Booster Packs", ROMX +INCLUDE "engine/booster_packs.asm" + +SECTION "bank8", ROMX INCLUDE "engine/bank8.asm" -SECTION "bank9",ROMX,BANK[$9] +SECTION "bank9", ROMX emptybank -SECTION "bankA",ROMX,BANK[$A] +SECTION "bankA", ROMX emptybank -SECTION "bankB",ROMX,BANK[$B] +SECTION "Effect Functions", ROMX INCLUDE "engine/effect_functions.asm" -SECTION "bankC",ROMX,BANK[$C] +SECTION "Decks", ROMX INCLUDE "data/decks.asm" + +SECTION "Cards", ROMX INCLUDE "data/cards.asm" -SECTION "bank1C",ROMX,BANK[$1C] +SECTION "bank1C", ROMX INCLUDE "engine/bank1c.asm" -SECTION "bank20",ROMX,BANK[$20] +SECTION "bank20", ROMX INCLUDE "engine/bank20.asm" diff --git a/src/sram.asm b/src/sram.asm index 0cf593d..40e1f93 100755 --- a/src/sram.asm +++ b/src/sram.asm @@ -1,6 +1,6 @@ -SECTION "Working Cards", SRAM, BANK[0] +SECTION "Working Cards", SRAM -ds $100 + ds $100 sCardCollection:: ds $100 ; a100 diff --git a/src/text.asm b/src/text.asm index 3bb3aee..c818938 100755 --- a/src/text.asm +++ b/src/text.asm @@ -1,48 +1,48 @@ -INCLUDE "constants.asm" INCLUDE "macros.asm" +INCLUDE "constants.asm" -SECTION "bankD",ROMX,BANK[$D] +SECTION "Text 1", ROMX INCLUDE "text/text_offsets.asm" INCLUDE "text/text1.asm" -SECTION "bankE",ROMX,BANK[$E] +SECTION "Text 2", ROMX INCLUDE "text/text2.asm" -SECTION "bankF",ROMX,BANK[$F] +SECTION "Text 3", ROMX INCLUDE "text/text3.asm" -SECTION "bank10",ROMX,BANK[$10] +SECTION "Text 4", ROMX INCLUDE "text/text4.asm" -SECTION "bank11",ROMX,BANK[$11] +SECTION "Text 5", ROMX INCLUDE "text/text5.asm" -SECTION "bank12",ROMX,BANK[$12] +SECTION "Text 6", ROMX INCLUDE "text/text6.asm" -SECTION "bank13",ROMX,BANK[$13] +SECTION "Text 7", ROMX INCLUDE "text/text7.asm" -SECTION "bank14",ROMX,BANK[$14] +SECTION "Text 8", ROMX INCLUDE "text/text8.asm" -SECTION "bank15",ROMX,BANK[$15] +SECTION "Text 9", ROMX INCLUDE "text/text9.asm" -SECTION "bank16",ROMX,BANK[$16] -INCLUDE "text/texta.asm" +SECTION "Text 10", ROMX +INCLUDE "text/text10.asm" -SECTION "bank17",ROMX,BANK[$17] -INCLUDE "text/textb.asm" +SECTION "Text 11", ROMX +INCLUDE "text/text11.asm" -SECTION "bank18",ROMX,BANK[$18] -INCLUDE "text/textc.asm" +SECTION "Text 12", ROMX +INCLUDE "text/text12.asm" -SECTION "bank19",ROMX,BANK[$19] -INCLUDE "text/textd.asm" +SECTION "Text 13", ROMX +INCLUDE "text/text13.asm" -SECTION "bank1A",ROMX,BANK[$1A] +SECTION "Empty Bank 1A", ROMX emptybank -SECTION "bank1B",ROMX,BANK[$1B] +SECTION "Empty Bank 1B", ROMX emptybank diff --git a/src/text/text1.asm b/src/text/text1.asm index e6b0034..eb11f83 100755 --- a/src/text/text1.asm +++ b/src/text/text1.asm @@ -58,7 +58,7 @@ Text000f: ; 36382 (d:6382) db $03,$4c done -lbsText: ; 36385 (d:6385) +LbsText: ; 36385 (d:6385) text "lbs." done @@ -645,7 +645,7 @@ Text0091: ; 36fca (d:6fca) text "Player 1" done -Player2: ; 36fd4 (d:6fd4) +Player2Text: ; 36fd4 (d:6fd4) text "Player 2" done diff --git a/src/text/texta.asm b/src/text/text10.asm index 385fc69..385fc69 100644 --- a/src/text/texta.asm +++ b/src/text/text10.asm diff --git a/src/text/textb.asm b/src/text/text11.asm index b99e881..b99e881 100644 --- a/src/text/textb.asm +++ b/src/text/text11.asm diff --git a/src/text/textc.asm b/src/text/text12.asm index 37622bb..37622bb 100644 --- a/src/text/textc.asm +++ b/src/text/text12.asm diff --git a/src/text/textd.asm b/src/text/text13.asm index dea889e..6dec01b 100644 --- a/src/text/textd.asm +++ b/src/text/text13.asm @@ -185,5 +185,5 @@ RecycleDescription: ; 6495e (19:495e) done rept $3655 -db $ff + db $ff endr diff --git a/src/text/text_offsets.asm b/src/text/text_offsets.asm index d2b5709..29fc093 100755 --- a/src/text/text_offsets.asm +++ b/src/text/text_offsets.asm @@ -18,7 +18,7 @@ TextOffsets:: ; 34000 (d:4000) textpointer WeightText textpointer PokemonText textpointer Text000f - textpointer lbsText + textpointer LbsText textpointer Text0011 textpointer Text0012 textpointer Text0013 @@ -148,7 +148,7 @@ TextOffsets:: ; 34000 (d:4000) textpointer Text008f textpointer Text0090 textpointer Text0091 - textpointer Player2 + textpointer Player2Text textpointer Text0093 textpointer Text0094 textpointer Text0095 diff --git a/src/vram.asm b/src/vram.asm new file mode 100644 index 0000000..b4a34b2 --- /dev/null +++ b/src/vram.asm @@ -0,0 +1,10 @@ +SECTION "VRAM", VRAM + +vTiles0:: ds $800 ; 8000 +vTiles1:: ds $800 ; 8800 +vTiles2:: ds $800 ; 9000 + +vBGMapTiles:: ds $400 ; 9800 +vBGMapAttrs:: ds $400 ; 9c00 + +vEnd:: ; a000 diff --git a/src/wram.asm b/src/wram.asm index ba63201..4431587 100755 --- a/src/wram.asm +++ b/src/wram.asm @@ -1,17 +1,16 @@ -INCLUDE "constants.asm" INCLUDE "macros.asm" +INCLUDE "constants.asm" -;---------------------------------------------------------- -;--- Bank 0: $Cxxx ---------------------------------------- -;---------------------------------------------------------- +INCLUDE "vram.asm" -SECTION "WRAM0", WRAM0 +SECTION "WRAM 0", WRAM0 -wTempCardCollection:: +wTempCardCollection:: ; c000 ds $100 + ds $100 -;--- Duel variables ---------------------------------------------- +SECTION "WRAM Duels 1", WRAM0 wPlayerDuelVariables:: ; c200 @@ -28,6 +27,7 @@ wPlayerDuelVariables:: ; c200 ; $1X - bench (where X is bench position from 1 to 5) wPlayerCardLocations:: ; c200 ds DECK_SIZE + ds $6 ; Which cards are in player's hand, as numbers 0 to 59 @@ -40,8 +40,8 @@ wPlayerDeckCards:: ; c27e ds DECK_SIZE ; Stores x = (60 - deck remaining cards) -; The first x cards in the wPlayerDeckCards array are not actually in the deck -; For example, the top card of the player's deck is at wPlayerDeckCards + [wPlayerNumberOfCardsNotInDeck] +; The first x cards in the wPlayerDeckCards array are no longer in the drawable deck this duel +; The top card of the player's deck is at wPlayerDeckCards + [wPlayerNumberOfCardsNotInDeck] wPlayerNumberOfCardsNotInDeck:: ; c2ba ds $1 @@ -52,6 +52,7 @@ wPlayerArenaCard:: ; c2bb ; Which cards are in player's bench, as numbers 0 to 59 wPlayerBench:: ; c2bc ds BENCH_SIZE + ds $7 wPlayerArenaCardHP:: ; c2c8 @@ -66,6 +67,7 @@ wPlayerBench4CardHP:: ; c2cc ds $1 wPlayerBench5CardHP:: ; c2cd ds $1 + ds $19 wPlayerArenaCardSubstatus1:: ; c2e7 @@ -109,12 +111,14 @@ wPlayerDuelistType:: ; c2f1 ; if under the effects of amnesia, which move (0 or 1) can't be used wPlayerArenaCardDisabledMoveIndex:: ; c2f2 ds $1 + ds $d wOpponentDuelVariables:: ; c300 wOpponentCardLocations:: ; c300 ds DECK_SIZE + ds $6 wOpponentHand:: ; c342 @@ -131,6 +135,7 @@ wOpponentArenaCard:: ; c3bb wOpponentBench:: ; c3bc ds BENCH_SIZE + ds $7 wOpponentArenaCardHP:: ; c3c8 @@ -145,6 +150,7 @@ wOpponentBench4CardHP:: ; c3cc ds $1 wOpponentBench5CardHP:: ; c3cd ds $1 + ds $19 wOpponentArenaCardSubstatus1:: ; c3e7 @@ -185,13 +191,29 @@ wOpponentDuelistType:: ; c3f1 wOpponentArenaCardDisabledMoveIndex:: ; c3f2 ds $1 + ds $d +UNION + +wBoosterCardsDrawn:: ; c400 +wBoosterTempNonEnergiesDrawn:: ; c400 + ds $b +wBoosterTempEnergiesDrawn:: ; c40b + ds $b +wBoosterCardsDrawnEnd:: + ds $6a + +NEXTU + wPlayerDeck:: ; c400 ds $80 +ENDU + wOpponentDeck:: ; c480 ds $80 + ds $10 ; this holds a list of cards (e.g. in hand or in bench) or the attack list of a pokemon card @@ -203,7 +225,7 @@ wDuelCardOrAttackList:: ; c510 wc590:: ; c590 ds $70 -;--- Text engine ------------------------------------------ +SECTION "WRAM Text Engine", WRAM0 wc600:: ; c600 ds $100 @@ -217,7 +239,7 @@ wc800:: ; c800 wc900:: ; c900 ds $100 -;--- Engine ----------------------------------------------- +SECTION "WRAM Engine 1", WRAM0 wBufOAM:: ; ca00 ds $a0 @@ -254,6 +276,7 @@ wIE:: ; cab7 wVBlankCtr:: ; cab8 ds $1 + ds $1 ; bit0: is in vblank interrupt? @@ -278,6 +301,8 @@ wFlushPaletteFlags:: ; cabf wVBlankOAMCopyToggle:: ; cac0 ds $1 + +wcac1:: ; cac1 ds $1 wcac2:: ; cac2 @@ -321,6 +346,7 @@ wcad4:: ; cad4 wcad5:: ; cad5 ds $1 + ds $8 wcade:: ; cade @@ -331,9 +357,10 @@ wcae2:: ; cae2 wBufPalette:: ; caf0 ds $80 + ds $4 -;--- Serial transfer bytes (cb74-cbc4) -------------------- +SECTION "WRAM Serial transfer bytes", WRAM0 wSerialOp:: ; cb74 ds $1 @@ -349,6 +376,7 @@ wSerialCounter2:: ; cb77 wSerialTimeoutCounter:: ; cb78 ds $1 + ds $4 wSerialSendSave:: ; cb7d @@ -380,9 +408,10 @@ wSerialRecvIndex:: ; cba4 wSerialRecvBuf:: ; cba5 - cbc4 ds $20 + ds $1 -;--- Engine ---------------------------------------------- +SECTION "WRAM Duels 2", WRAM0 ; In a duel, the main menu current or last selected menu item ; From 0 to 5: Hand, Attack, Check, Pkmn Power, Retreat, Done @@ -395,6 +424,7 @@ wCurrentDuelMenuItem:: ; cbc6 ; For Trainer cards, $d or $e (two pages for trainer card descriptions) wCardPageNumber:: ; cbc7 ds $1 + ds $1 wcbc9:: ; cbc9 @@ -402,6 +432,7 @@ wcbc9:: ; cbc9 wBenchSelectedPokemon:: ; cbcb ds $1 + ds $2 wAttachedEnergiesAccum:: ; cbce @@ -424,7 +455,10 @@ wcbe6:: ; cbe6 ds $1 wcbe7:: ; cbe7 - ds $12 + ds $6 + +wcbed:: ; cbed + ds $c wcbf9:: ; cbf9 ds $b @@ -468,6 +502,7 @@ wcc0d:: ; cc0d ; beginning of DeckPointers wOpponentDeckId:: ; cc0e ds $1 + ds $1 wcc10:: ; cc10 @@ -481,6 +516,7 @@ wcc12:: ; cc12 wIsPracticeDuel:: ; cc13 ds $1 + ds $1 wcc15:: ; cc15 @@ -527,10 +563,10 @@ wDamage:: ; ccb9 ; wccbb and wccbc appear to be used for AI scoring wccbb:: ds $1 - + wccbc:: ds $1 - + ds $2 wccbf:: ; ccbf @@ -591,11 +627,14 @@ wccf1:: ; ccf1 wccf2:: ; ccf2 ds $1 +SECTION "WRAM Engine 2", WRAM0 + ; color/pattern of the text box border. Values between 0-7?. Interpreted differently depending on console type ; Note that this doesn't appear to be a selectable option, just changes with the situation. ; For example the value 4 seems to be used a lot during duels. wFrameType:: ; ccf3 ds $1 + ds $10 wcd04:: ; cd04 @@ -624,6 +663,7 @@ wcd0b:: ; cd0b wUppercaseFlag:: ; cd0d ds $1 + ds $1 ; Handles timing of (horizontal or vertical) arrow blinking while waiting for user input. @@ -650,12 +690,16 @@ wCursorTileNumber:: ; cd15 wTileBehindCursor:: ; cd16 ds $1 - ds $81 -wcd98:: ; cd98 +wcd17:: ; cd17 + ds 2 + + ds $7f + +wLeftmostItemCursorX:: ; cd98 ds $1 -wcd99:: ; cd99 +wRefreshMenuCursorSFX:: ; cd99 ds $1 wcd9a:: ; cd9a @@ -781,11 +825,7 @@ wcfb9:: ; cfb9 wcfe3:: ; cfe3 -;---------------------------------------------------------- -;--- Bank 1: $Dxxx ---------------------------------------- -;---------------------------------------------------------- - -SECTION "WRAM1", WRAMX, BANK[1] +SECTION "WRAM1", WRAMX ds $a9 wd0a9:: ; d0a9 @@ -908,10 +948,12 @@ wPCPackSelection:: ; d11d ; 7th bit of each pack corresponds to whether or not it's been read wPCPacks:: ; d11e ds $c + ds $3 wPCLastDirectionPressed:: ; d12d ds $1 + ds $3 wd131:: ; d131 @@ -1169,19 +1211,19 @@ wd633:: ; d633 wd635:: ; d635 ds $34 -wBoosterDataIndex:: ; d669 +wBoosterIndex:: ; d669 ds $1 -wBoosterTempData:: ; d66a +wBoosterTempCard:: ; d66a ds $1 wBoosterSelectedCardType:: ; d66b ds $1 -wBoosterCurrRarity:: ; d66c +wBoosterCurRarity:: ; d66c ds $1 -wBoosterDataAveragedChance:: ; d66d +wBoosterAveragedTypeChances:: ; d66d ds $1 wBoosterDataCommonAmount:: ; d66e @@ -1194,10 +1236,10 @@ wBoosterDataRareAmount:: ; d670 ds $1 wBoosterAmountOfCardTypeTable:: ; d671 - ds $09 + ds NUM_BOOSTER_CARD_TYPES wBoosterTempTypeChanceTable:: ; d67a - ds $09 + ds NUM_BOOSTER_CARD_TYPES wBoosterCurrentCardType:: ; d683 ds $1 @@ -1208,17 +1250,18 @@ wBoosterCurrentCardRarity:: ; d684 wBoosterCurrentCardSet:: ; d685 ds $1 -wBoosterDataCurrSet:: ; d686 +wBoosterDataSet:: ; d686 ds $1 wBoosterDataEnergyFunctionPointer:: ; d687 ds $2 -wBoosterDataTypeChanceData:: ; d689 - ds $9 +wBoosterDataTypeChances:: ; d689 + ds NUM_BOOSTER_CARD_TYPES + ds $6ee -;--- Music ------------------------------------------------ +SECTION "WRAM Music", WRAMX ; bit 7 is set once the song has been started wCurSongID:: ; dd80 @@ -1384,7 +1427,7 @@ wMusicCh3Stack:: ; de13 wMusicCh4Stack:: ; de1f ds $c -;--- SFX -------------------------------------------------- +SECTION "WRAM Sfx", WRAMX wde2b:: ; de2b ds $3 |