From f71b489ad8c194a392ca79b07261816b61cb55e2 Mon Sep 17 00:00:00 2001 From: Logan Date: Mon, 30 May 2016 00:47:55 +1200 Subject: Initial decompilation of FR Red --- engine/menu/bills_pc.asm | 30 ++++++++++++------------ engine/menu/main_menu.asm | 36 ++++++++++++++-------------- engine/menu/naming_screen.asm | 52 +++++++++++++++++++---------------------- engine/menu/players_pc.asm | 14 +++++------ engine/menu/pokedex.asm | 49 +++++++++++++++++++++++--------------- engine/menu/start_sub_menus.asm | 11 +++++---- engine/menu/status_screen.asm | 22 ++++++++++++----- 7 files changed, 116 insertions(+), 98 deletions(-) (limited to 'engine/menu') diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 0be2e6b0..09dc73fe 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -85,12 +85,12 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8) ld [H_AUTOBGTRANSFERENABLED], a ret -SomeonesPCText: db "SOMEONE's PC@" -BillsPCText: db "BILL's PC@" -PlayersPCText: db "'s PC@" -OaksPCText: db "PROF.OAK's PC@" -PKMNLeaguePCText: db $4a, "LEAGUE@" -LogOffPCText: db "LOG OFF@" +SomeonesPCText: db "PC DE ???@" +BillsPCText: db "PC DE LEO@" +PlayersPCText: db "PC DE @" +OaksPCText: db "PC DE CHEN@" +PKMNLeaguePCText: db "LIGUE ", $4a, "@" +LogOffPCText: db "DECONNEXION@" BillsPC_:: ; 0x214c2 ld hl, wd730 @@ -339,15 +339,15 @@ DisplayMonListMenu: ; 216be (8:56be) ret BillsPCMenuText: ; 216e1 (8:56e1) - db "WITHDRAW ", $4a - next "DEPOSIT ", $4a - next "RELEASE ", $4a - next "CHANGE BOX" - next "SEE YA!" + db "RETIRER ", $4a + next "STOCKER ", $4a + next "RELACHER ", $4a + next "CHANGER BOITE" + next "SALUT!" db "@" BoxNoPCText: ; 21713 (8:5713) - db "BOX No.@" + db "BOITE@" KnowsHMMove:: ; 2171b (8:571b) ; returns whether mon with party index [wWhichPokemon] knows an HM move @@ -451,11 +451,11 @@ DisplayDepositWithdrawMenu: ; 2174b (8:574b) call LoadGBPal jr .loop -DepositPCText: db "DEPOSIT@" -WithdrawPCText: db "WITHDRAW@" +DepositPCText: db "STOCKER@" +WithdrawPCText: db "RETIRER@" StatsCancelPCText: db "STATS" - next "CANCEL@" + next "RETOUR@" SwitchOnText: ; 0x217e9 TX_FAR _SwitchOnText diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 75458c5e..bdfec5d7 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -329,16 +329,16 @@ SpecialEnterMap: ; 5d5f (1:5d5f) jp EnterMap ContinueText: ; 5d7e (1:5d7e) - db "CONTINUE", $4e + db "CONTINUER", $4e NewGameText: ; 5d87 (1:5d87) - db "NEW GAME", $4e - db "OPTION@" + db "NOUVEAU JEU", $4e + db "OPTIONS@" CableClubOptionsText: ; 5d97 (1:5d97) - db "TRADE CENTER", $4e - db "COLOSSEUM", $4e - db "CANCEL@" + db "CENTRE TROC", $4e + db "COLISEE", $4e + db "RETOUR@" DisplayContinueGameInfo: ; 5db5 (1:5db5) xor a @@ -421,10 +421,10 @@ PrintPlayTime: ; 5e55 (1:5e55) jp PrintNumber SaveScreenInfoText: ; 5e6a (1:5e6a) - db "PLAYER" - next "BADGES " - next "#DEX " - next "TIME@" + db "JOUEUR" + next "BADGES " + next "#DEX " + next "TEMPS@" DisplayOptionMenu: ; 5e8a (1:5e8a) coord hl, 0, 0 @@ -578,20 +578,20 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate jp .eraseOldMenuCursor -TextSpeedOptionText: ; 5fc0 (1:5fc0) - db "TEXT SPEED" - next " FAST MEDIUM SLOW@" +TextSpeedOptionText: ; 6058 (1:6058) + db "VIT. TEXTE" + next " 3 2 1 @" BattleAnimationOptionText: ; 5fde (1:5fde) - db "BATTLE ANIMATION" - next " ON OFF@" + db "ANIMATION COMBAT" + next " OUI NON@" BattleStyleOptionText: ; 5ffd (1:5ffd) - db "BATTLE STYLE" - next " SHIFT SET@" + db "STYLE COMBAT" + next " CHOIX DEFINI@" OptionMenuCancelText: ; 6018 (1:6018) - db "CANCEL@" + db "RETOUR@" ; sets the options variable according to the current placement of the menu cursors in the options menu SetOptionsFromCursorPositions: ; 601f (1:601f) diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 41f63095..3e0e49c5 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -323,13 +323,16 @@ DisplayNamingScreen: ; 6596 (1:6596) ld [wTopMenuItemX], a jp EraseMenuCursor -LoadEDTile: ; 675b (1:675b) - ld de, ED_Tile - ld hl, vFont + $700 - ld bc, (ED_TileEnd - ED_Tile) / $8 +LoadEDTile: ; 67f6 (1:67f6) + call DisableLCD + ld de, vFont + $700 + ld hl, ED_Tile + ld bc, (ED_TileEnd - ED_Tile) ; to fix the graphical bug on poor emulators - ;lb bc, BANK(ED_Tile), (ED_TileEnd - ED_Tile) / $8 - jp CopyVideoDataDouble + ;lb bc, BANK(ED_Tile), (ED_TileEnd - ED_Tile) + ld a,$01 + call FarCopyDataDouble + jp EnableLCD ED_Tile: ; 6767 (1:6767) INCBIN "gfx/ED_tile.1bpp" @@ -365,13 +368,13 @@ PrintAlphabet: ; 676f (1:676f) ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 -LowerCaseAlphabet: ; 679e (1:679e) - db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥UPPER CASE@" +LowerCaseAlphabet: ; 6841 (1:6841) + db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥MAJUSCULES@" -UpperCaseAlphabet: ; 67d6 (1:67d6) - db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@" +UpperCaseAlphabet: ; 6879 (1:6879) + db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥minuscules@" -PrintNicknameAndUnderscores: ; 680e (1:680e) +PrintNicknameAndUnderscores: ; 68b1 (1:68b1) call CalcStringLength ld a, c ld [wNamingScreenNameLength], a @@ -467,15 +470,15 @@ CalcStringLength: ; 68eb (1:68eb) inc c jr .loop -PrintNamingText: ; 68f8 (1:68f8) +PrintNamingText: ; 699b (1:699b) coord hl, 0, 1 ld a, [wNamingScreenType] ld de, YourTextString and a - jr z, .notNickname + jr z, .placeString ld de, RivalsTextString dec a - jr z, .notNickname + jr z, .placeString ld a, [wcf91] ld [wMonPartySpriteSpecies], a push af @@ -485,28 +488,21 @@ PrintNamingText: ; 68f8 (1:68f8) call GetMonName coord hl, 4, 1 call PlaceString - ld hl, $1 - add hl, bc - ld [hl], $c9 - coord hl, 1, 3 - ld de, NicknameTextString + ld hl, $C3DD + ld de, $69F2 jr .placeString -.notNickname - call PlaceString - ld l, c - ld h, b - ld de, NameTextString + .placeString jp PlaceString YourTextString: ; 693f (1:693f) - db "YOUR @" + db "VOTRE NOM?@" RivalsTextString: ; 6945 (1:6945) - db "RIVAL's @" + db "NOM DU RIVAL?@" NameTextString: ; 694d (1:694d) - db "NAME?@" + db "NOM?@" NicknameTextString: ; 6953 (1:6953) - db "NICKNAME?@" + db "SURNOM?@" diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index 00889e93..a9d61a74 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -1,6 +1,4 @@ PlayerPC: ; 78e6 (1:78e6) - ld hl, wd730 - set 6, [hl] ld a, ITEM_NAME ld [wNameListType], a call SaveScreenTilesToBuffer1 @@ -15,6 +13,8 @@ PlayerPC: ; 78e6 (1:78e6) call PlaySound ld hl, TurnedOnPC2Text call PrintText + ld hl, wd730 + set 6, [hl] PlayerPCMenu: ; 790c (1:790c) ld a, [wParentMenuItem] @@ -240,11 +240,11 @@ PlayerPCToss: ; 7a8f (1:7a8f) call TossItem ; disallows tossing key items jp .loop -PlayersPCMenuEntries: ; 7af5 (1:7af5) - db "WITHDRAW ITEM" - next "DEPOSIT ITEM" - next "TOSS ITEM" - next "LOG OFF@" +PlayersPCMenuEntries: ; 7b5f (1:7b5f) + db "RETIRER OBJET" + next "STOCKER OBJET" + next "JETER OBJET" + next "DECONNEXION@" TurnedOnPC2Text: ; 7b22 (1:7b22) TX_FAR _TurnedOnPC2Text diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 3898ef43..adf0eb62 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -355,19 +355,19 @@ DrawPokedexVerticalLine: ; 4028e (10:428e) ret PokedexSeenText: ; 4029d (10:429d) - db "SEEN@" + db "VUS@" PokedexOwnText: ; 402a2 (10:42a2) - db "OWN@" + db "PRIS@" PokedexContentsText: ; 402a6 (10:42a6) - db "CONTENTS@" + db "SOMMAIRE@" PokedexMenuItemsText: ; 402af (10:42af) - db "DATA" - next "CRY" - next "AREA" - next "QUIT@" + db "INFO" + next "CRI" + next "ZONE" + next "RET@" ; tests if a pokemon's bit is set in the seen or owned pokemon bit fields ; INPUT: @@ -493,23 +493,34 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) jp z,.waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description inc de ; de = address of feet (height) ld a,[de] ; reads feet, but a is overwritten without being used + push af coord hl, 12, 6 lb bc, 1, 2 call PrintNumber ; print feet (height) - ld a,$60 ; feet symbol tile (one tick) - ld [hl],a - inc de - inc de ; de = address of inches (height) - coord hl, 15, 6 - lb bc, LEADING_ZEROES | 1, 2 - call PrintNumber ; print inches (height) - ld a,$61 ; inches symbol tile (two ticks) - ld [hl],a -; now print the weight (note that weight is stored in tenths of pounds internally) + ld hl, $C426 + pop af + cp $a + jr nc, .func_43d7 + ld [hl], $F6 +.func_43d7 + inc hl + ld a, [hli] + ldd [hl], a + ld [hl], $F2 inc de inc de - inc de ; de = address of upper byte of weight + inc de ; de = address of inches (height) push de +; coord hl, 15, 6 +; lb bc, LEADING_ZEROES | 1, 2 +; call PrintNumber ; print inches (height) +; ld a,$61 ; inches symbol tile (two ticks) +; ld [hl],a +; now print the weight (note that weight is stored in tenths of pounds internally) +; inc de +; inc de +; inc de ; de = address of upper byte of weight +; push de ; put weight in big-endian order at hDexWeight ld hl,hDexWeight ld a,[hl] ; save existing value of [hDexWeight] @@ -568,7 +579,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ret HeightWeightText: ; 40448 (10:4448) - db "HT ?",$60,"??",$61,$4E,"WT ???lb@" + db "TAI ???",$60,$4e,"PDS ???",$61,$62,"@" ; XXX does anything point to this? PokeText: ; 4045d (10:445d) diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 34c21da0..12b1441f 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -598,8 +598,9 @@ DrawTrainerInfo: ; 1349a (4:749a) call PlaceString coord hl, 8, 4 ld de,wPlayerMoney - ld c,$e3 + ld c,$c3 call PrintBCDNumber + ld [hl],$f0 coord hl, 9, 6 ld de,wPlayTimeHours ; hours lb bc, LEFT_ALIGN | 1, 3 @@ -614,10 +615,10 @@ TrainerInfo_FarCopyData: ; 1357f (4:757f) ld a,BANK(TrainerInfoTextBoxTileGraphics) jp FarCopyData2 -TrainerInfo_NameMoneyTimeText: ; 13584 (4:7584) - db "NAME/" - next "MONEY/" - next "TIME/@" +TrainerInfo_NameMoneyTimeText: ; 13584 (4:7594) + db "NOM/" + next "ARG./" + next "TEMPS/@" ; $76 is a circle tile TrainerInfo_BadgesText: ; 13597 (4:7597) diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index d07cc026..c529b9e5 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -288,10 +288,10 @@ PrintStat ret StatsText: ; 12b3a (4:6b3a) - db "ATTACK" - next "DEFENSE" - next "SPEED" - next "SPECIAL@" + db "FOR" + next "DEF" + next "VIT" + next "SPE@" StatusScreen2: ; 12b57 (4:6b57) ld a, [hTilesetType] @@ -462,8 +462,8 @@ CalcExpToLevelUp: ; 12c86 (4:6c86) ret StatusScreenExpText: ; 12caf (4:6caf) - db "EXP POINTS" - next "LEVEL UP@" + db "PTS EXP." + next "PROCH.NIV.@" StatusScreen_ClearName: ; 12cc3 (4:6cc3) ld bc, 10 @@ -478,3 +478,13 @@ StatusScreen_PrintPP: ; 12ccb (4:6ccb) dec c jr nz, StatusScreen_PrintPP ret + +func_6cd5: ; 12cd5 (4:6cd5) + ld a, $80 + ld [hli],a + ld a, $8F + ldd [hl], a + add hl, de + dec c + jr nz, func_6cd5 + ret \ No newline at end of file -- cgit v1.2.3 From dfa7040a4b75284069a62590b747101448e7c3be Mon Sep 17 00:00:00 2001 From: Logan Date: Wed, 1 Jun 2016 19:00:41 +1200 Subject: More disasm --- engine/menu/diploma.asm | 13 ++++++------- engine/menu/prize_menu.asm | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'engine/menu') diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm index 630c6c23..e18f7d55 100755 --- a/engine/menu/diploma.asm +++ b/engine/menu/diploma.asm @@ -94,20 +94,19 @@ DiplomaTextPointersAndCoords: ; 56784 (15:6784) dwCoord 9, 16 DiplomaText: - db $70,"Diploma",$70,"@" + db $70,"Diplôme",$70,"@" DiplomaPlayer: - db "Player@" + db "Joueur@" DiplomaEmptyText: db "@" DiplomaCongrats: - db "Congrats! This" - next "diploma certifies" - next "that you have" - next "completed your" - next "#DEX.@" + db "Fabuleux! Ce" + next "diplôme certifie" + next "la perfection de" + next "votre PokéDex@" DiplomaGameFreak: db "GAME FREAK@" diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index 434a1943..3bc64701 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -166,7 +166,7 @@ PrintPrizePrice: ; 5287a (14:687a) ret .CoinText - db "COIN@" + db "JETONS@" .SixSpacesText db " @" -- cgit v1.2.3 From 67c22ca572e7976ccb6b1811602e956dbe0221ff Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 3 Jun 2016 22:40:28 +1200 Subject: More text, filled out charmap.asm --- engine/menu/league_pc.asm | 2 +- engine/menu/vending_machine.asm | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'engine/menu') diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm index 7c31d346..2c88e137 100755 --- a/engine/menu/league_pc.asm +++ b/engine/menu/league_pc.asm @@ -113,7 +113,7 @@ LeaguePCShowMon: ; 76610 (1d:6610) jpba HoFDisplayMonInfo HallOfFameNoText: ; 76670 (1d:6670) - db "HALL OF FAME No @" + db " CELEBRITE No. @" AccessedHoFPCText: ; 76683 (1d:6683) TX_FAR _AccessedHoFPCText diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index 8460889f..9a17705f 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -85,15 +85,16 @@ VendingMachineText1: ; 74f99 (1d:4f99) db "@" DrinkText: ; 74f9e (1d:4f9e) - db "FRESH WATER" - next "SODA POP" - next "LEMONADE" - next "CANCEL@" + db "EAU FRAICHE" + next "SODA COOL" + next "LIMONADE" + next "RETOUR@" DrinkPriceText: ; 74fc3 (1d:4fc3) - db "¥200" - next "¥300" - next "¥350",$4E,"@" + db "200¥" + next "300¥" + next "350¥" + next "@" VendingMachineText4: ; 74fd3 (1d:4fd3) TX_FAR _VendingMachineText4 -- cgit v1.2.3 From 1c637b6aeae0c007647cfe1c3648f82eeda9617e Mon Sep 17 00:00:00 2001 From: Logan Date: Sat, 4 Jun 2016 16:41:50 +1200 Subject: Weeeee --- engine/menu/naming_screen.asm | 14 +++++++------- engine/menu/start_sub_menus.asm | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engine/menu') diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 3e0e49c5..4597b794 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -39,7 +39,7 @@ AskName: ; 64eb (1:64eb) pop hl pop af ld [wUpdateSpritesEnabled], a - ld a, [wcf4b] + ld a, [wcf50] cp $50 ret nz .declinedNickname @@ -63,7 +63,7 @@ DisplayNameRaterScreen: ; 655c (1:655c) call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal - ld a, [wcf4b] + ld a, [wcf50] cp "@" jr z, .playerCancelled ld hl, wPartyMonNicks @@ -109,7 +109,7 @@ DisplayNamingScreen: ; 6596 (1:6596) ld a, 7 ld [wMaxMenuItem], a ld a, $50 - ld [wcf4b], a + ld [wcf50], a xor a ld hl, wNamingScreenSubmitName ld [hli], a @@ -157,7 +157,7 @@ DisplayNamingScreen: ; 6596 (1:6596) .submitNickname pop de - ld hl, wcf4b + ld hl, wcf50 ld bc, NAME_LENGTH call CopyData call GBPalWhiteOutWithDelay3 @@ -382,7 +382,7 @@ PrintNicknameAndUnderscores: ; 68b1 (1:68b1) lb bc, 1, 10 call ClearScreenArea coord hl, 10, 2 - ld de, wcf4b + ld de, wcf50 call PlaceString coord hl, 10, 3 ld a, [wNamingScreenType] @@ -458,9 +458,9 @@ Handakutens: ; 68d6 (1:68d6) db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db $ff -; calculates the length of the string at wcf4b and stores it in c +; calculates the length of the string at wcf50 and stores it in c CalcStringLength: ; 68eb (1:68eb) - ld hl, wcf4b + ld hl, wcf50 ld c, $0 .loop ld a, [hl] diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 12b1441f..435d3356 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -367,7 +367,7 @@ StartMenu_Item: ; 13302 (4:7302) ld a,[wcf91] ld [wd11e],a call GetItemName - call CopyStringToCF4B ; copy name to wcf4b + call CopyStringToCF50 ; copy name to wcf50 ld a,[wcf91] cp a,BICYCLE jr nz,.notBicycle2 -- cgit v1.2.3