From 2c65d4743dabbbbcb491ef5eeb002a80e5c99a20 Mon Sep 17 00:00:00 2001 From: Benjamin Popp Date: Mon, 13 Jul 2020 08:01:14 -0500 Subject: [PATCH] rename movenames -> data.moves.names --- .../Models/Code/tableReference.txt | 18 +++++++++--------- .../Models/HardcodeTablesModel.cs | 2 +- .../QuickEditItems/MakeTmsExpandable.cs | 4 ++-- .../Before_Baseclass/ArrayRunTests.cs | 4 ++-- .../Before_Baseclass/EggMoveTests.cs | 2 +- .../Before_Baseclass/NestedTablesTests.cs | 4 ++-- src/HexManiac.WPF/Controls/StartScreen.xaml | 14 -------------- 7 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/HexManiac.Core/Models/Code/tableReference.txt b/src/HexManiac.Core/Models/Code/tableReference.txt index f895177a..51fb9482 100644 --- a/src/HexManiac.Core/Models/Code/tableReference.txt +++ b/src/HexManiac.Core/Models/Code/tableReference.txt @@ -1,12 +1,12 @@ //games, AXVE0, AXPE0, AXVE1, AXPE1, BPRE0, BPGE0, BPRE1, BPGE1, BPEE0, // Ruby Sapp Ruby11 Sapp11 FRed LGrn FRed11 LGrn11 Emrald data.pokemon.names, 00FA58, 00FA58, 00FA58, 00FA58, 000144, 000144, 000144, 000144, 000144, [name""11] -movenames, 02E18C, 02E18C, 02E18C, 02E18C, 000148, 000148, 000148, 000148, 000148, [name""13] +data.moves.names, 02E18C, 02E18C, 02E18C, 02E18C, 000148, 000148, 000148, 000148, 000148, [name""13] abilitynames, 09FE64, 09FE64, 09FE84, 09FE84, 0001C0, 0001C0, 0001C0, 0001C0, 0001C0, [name""13] trainerclassnames, 1217BC, 1217BC, 0F70A8, 0F70A8, 0D80A0, 0D8074, 0D80B4, 0D8088, 0183B4, [name""13] types, 02E3A8, 02E3A8, 02E3A8, 02E3A8, 0309C8, 0309C8, 0309DC, 0309DC, 0166F4, ^[name""7] abilitydescriptions, 09FE68, 09FE68, 09FE88, 09FE88, 0001C4, 0001C4, 0001C4, 0001C4, 0001C4, [description<"">]abilitynames -movedescriptions, 0A0494, 0A0494, 0A04B4, 0A04B4, 0E5440, 0E5418, 0E5454, 0E542C, 1C3EFC, [description<"">]movenames-1 +movedescriptions, 0A0494, 0A0494, 0A04B4, 0A04B4, 0E5440, 0E5418, 0E5454, 0E542C, 1C3EFC, [description<"">]data.moves.names-1 multichoice, 0B50A0, 0B50A0, 0B50C0, 0B50C0, 09CB58, 09CB2C, 09CB6C, 09CB40, 0E1FB8, [options<[text<""> unused::]/count> count::] natures, 0443D8, 0443D8, 0443F8, 0443F8, 0488B8, 0488B8, 0488CC, 0488CC, 073188, [name<"">]25 // mapnames, , , , , 0C0C94, 0C0C68, 0C0CA8, 0C0C7C, , [name<"">] @@ -42,16 +42,16 @@ pokemon.animations.frames , ,,,, ,,,, 05E7BC, [data<[frames<[frame: time: pokestats, 010B64, 010B64, 010B64, 010B64, 0001BC, 0001BC, 0001BC, 0001BC, 0001BC, [hp. attack. def. speed. spatk. spdef. type1.types type2.types catchRate. baseExp. evs|b[]evbits item1:items item2:items genderratio. steps2hatch. basehappiness. growthrate. egg1. egg2. ability1.abilitynames ability2.abilitynames runrate. unknown. padding:]data.pokemon.names evolutions, 03F534, 03F534, 03F534, 03F534, 042F6C, 042F6C, 042F80, 042F80, 06D140, [[method:evolutionmethods arg: species:data.pokemon.names unused:]5]data.pokemon.names items, 0A98F0, 0A98F0, 0A9910, 0A9910, 0001C8, 0001C8, 0001C8, 0001C8, 0001C8, [name""14 index: price: holdeffect. param. description<""> keyitemvalue. bagkeyitem. pocket. type. fieldeffect<> battleusage:: battleeffect<> battleextra::] -movedata, 00CA54, 00CA54, 00CA54, 00CA54, 0001CC, 0001CC, 0001CC, 0001CC, 0001CC, [effect.moveeffects power. type.types accuracy. pp. effectAccuracy. target|b[]movetarget priority. info|b[]moveinfo unused. unused:]movenames -moveanimations, 075734, 075738, 075754, 075758, 0725D0, 0725D0, 0725E4, 0725E4, 0A3A44, [animation<>]movenames +movedata, 00CA54, 00CA54, 00CA54, 00CA54, 0001CC, 0001CC, 0001CC, 0001CC, 0001CC, [effect.moveeffects power. type.types accuracy. pp. effectAccuracy. target|b[]movetarget priority. info|b[]moveinfo unused. unused:]data.moves.names +moveanimations, 075734, 075738, 075754, 075758, 0725D0, 0725D0, 0725E4, 0725E4, 0A3A44, [animation<>]data.moves.names moveeffects, 0146E4, 0146E4, 0146E4, 0146E4, 016364, 016364, 016378, 016378, 03E854, [effect<`bse`>]213 lvlmoves, 03B7BC, 03B7BC, 03B7BC, 03B7BC, 03EA7C, 03EA7C, 03EA90, 03EA90, 06930C, [movesFromLevel<`plm`>]data.pokemon.names -tutormoves, , , , , 120BE4, 120BBC, 120C5C, 120C34, , [move:movenames]15 -tutormoves, , , , , , , , , 1B236C, [move:movenames]30 +tutormoves, , , , , 120BE4, 120BBC, 120C5C, 120C34, , [move:data.moves.names]15 +tutormoves, , , , , , , , , 1B236C, [move:data.moves.names]30 tutorcompatibility, , , , , 120C30, 120C08, 120CA8, 120C80, 1B2390, [moves|b[]tutormoves]data.pokemon.names -tmmoves, 06F038, 06F03C, 06F058, 06F05C, 125A8C, 125A64, 125B04, 125ADC, 1B6D10, [move:movenames]58 +tmmoves, 06F038, 06F03C, 06F058, 06F05C, 125A8C, 125A64, 125B04, 125ADC, 1B6D10, [move:data.moves.names]58 tmcompatibility, 0403B0, 0403B0, 0403D0, 0403D0, 043C68, 043C68, 043C7C, 043C7C, 06E048, [moves|b[]tmmoves]data.pokemon.names -hmmoves, 040A24, 040A24, 040A44, 040A44, 0441DC, 0441DC, 0441F0, 0441F0, 06E828, [move:movenames]8 +hmmoves, 040A24, 040A24, 040A44, 040A44, 0441DC, 0441DC, 0441F0, 0441F0, 06E828, [move:data.moves.names]8 itemimages, , , , , 09899C, 098970, 0989B0, 098984, 1B0034, [image<`lzs4x3x3`> palette<`lzp4`>]items+1 trainerdata, 00D890, 00D890, 00D890, 00D890, 00FC00, 00FC00, 00FC14, 00FC14, 03587C, [structType.trainerStructType class.trainerclassnames introMusic. sprite.trainersprites name""12 item1:items item2:items item3:items item4:items doubleBattle:: ai|b[]traineraibits pokemonCount:: pokemon<`tpt`>] trainermoney, 024120, 024120, 024120, 024120, 0259CC, 0259CC, 0259E0, 0259E0, 04E6A8, [class.trainerclassnames moneyrate. unused:]!FF050000 @@ -66,7 +66,7 @@ pickupitems, 02AFB8, 02AFB8, 02AFB8, 02AFB8, , , , pickupitems, , , , , 02CEE4, 02CEE4, 02CEF8, 02CEF8, , [item:items chance:]16 pickupitems, , , , , , , , , 055DF4, [item:items]18 pickupitemsrare, , , , , , , , , 055D2C, [item:items]11 -data.abilities.soundproof.moves, 018ABC, 018ABC, 018ABC, 018ABC, 01A67C, 01A67C, 01A690, 01A690, 042F70, [move:movenames]!FFFF +data.abilities.soundproof.moves, 018ABC, 018ABC, 018ABC, 018ABC, 01A67C, 01A67C, 01A690, 01A690, 042F70, [move:data.moves.names]!FFFF battlescriptsource, 012F34, 012F34, 012F34, 012F34, 014C1C, 014C1C, 014C30, 014C30, , [code<>]248 battlescriptsource, , , , , , , , , 03CD94, [code<>]249 diff --git a/src/HexManiac.Core/Models/HardcodeTablesModel.cs b/src/HexManiac.Core/Models/HardcodeTablesModel.cs index cc6eb5d7..6469c0fb 100644 --- a/src/HexManiac.Core/Models/HardcodeTablesModel.cs +++ b/src/HexManiac.Core/Models/HardcodeTablesModel.cs @@ -20,7 +20,7 @@ namespace HavenSoft.HexManiac.Core.Models { SpecialsTable = "specials", ItemsTableName = "items", TypesTableName = "types", - MoveNamesTable = "movenames", + MoveNamesTable = "data.moves.names", DexInfoTableName = "dexinfo", PokemonNameTable = "data.pokemon.names", TrainerTableName = "trainerdata", diff --git a/src/HexManiac.Core/ViewModels/QuickEditItems/MakeTmsExpandable.cs b/src/HexManiac.Core/ViewModels/QuickEditItems/MakeTmsExpandable.cs index 1f4349a9..aae2390b 100644 --- a/src/HexManiac.Core/ViewModels/QuickEditItems/MakeTmsExpandable.cs +++ b/src/HexManiac.Core/ViewModels/QuickEditItems/MakeTmsExpandable.cs @@ -355,7 +355,7 @@ Fail: End: pop pc, {{}} movenamesTable: - .word + .word <{MoveNamesTable}> itemIDLocation: .word 020370C0 bufferLocation: @@ -527,7 +527,7 @@ MagicString3: MagicString4: .word <{MagicBufferStrings[game][4]:X6}> MovesTable: - .word + .word <{MoveNamesTable}> ".Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); var bytes = viewPort.Tools.CodeTool.Parser.Compile(viewPort.Model, start, code); for (int i = 0; i < bytes.Count; i++) viewPort.CurrentChange.ChangeData(model, start + i, bytes[i]); diff --git a/src/HexManiac.Tests/Before_Baseclass/ArrayRunTests.cs b/src/HexManiac.Tests/Before_Baseclass/ArrayRunTests.cs index e21b2548..f62e8777 100644 --- a/src/HexManiac.Tests/Before_Baseclass/ArrayRunTests.cs +++ b/src/HexManiac.Tests/Before_Baseclass/ArrayRunTests.cs @@ -1145,8 +1145,8 @@ namespace HavenSoft.HexManiac.Tests { [Fact] public void AutocompletePicksExpectedElementAndMovesToNextElement() { var test = new BaseViewModelTestClass(); - test.CreateTextTable("movenames", 0x100, "Tackle", "Fire Punch", "Earthquake", "Psycho Boost"); - test.CreateEnumTable("pokemoves", 0x00, "movenames", 0, 1, 2, 3); + test.CreateTextTable(HardcodeTablesModel.MoveNamesTable, 0x100, "Tackle", "Fire Punch", "Earthquake", "Psycho Boost"); + test.CreateEnumTable("pokemoves", 0x00, HardcodeTablesModel.MoveNamesTable, 0, 1, 2, 3); test.ViewPort.Edit("@04 firepunch "); Assert.Equal(1, test.Model.ReadMultiByteValue(0x04, 2)); diff --git a/src/HexManiac.Tests/Before_Baseclass/EggMoveTests.cs b/src/HexManiac.Tests/Before_Baseclass/EggMoveTests.cs index 6372d402..a2d11d65 100644 --- a/src/HexManiac.Tests/Before_Baseclass/EggMoveTests.cs +++ b/src/HexManiac.Tests/Before_Baseclass/EggMoveTests.cs @@ -26,7 +26,7 @@ namespace HavenSoft.HexManiac.Tests { viewPort.Edit($"^{HardcodeTablesModel.PokemonNameTable}[name\"\"8]8 \"Bob\" \"Steve\" \"Carl\" \"Sam\" \"Bryan\" \"Ryan\" \"Ian\" \"Matt\""); viewPort.Goto.Execute("000100"); - viewPort.Edit("^movenames[name\"\"8]8 \"Fire\" \"Water\" \"Earth\" \"Wind\" \"Light\" \"Dark\" \"Normal\" \"Magic\""); + viewPort.Edit($"^{HardcodeTablesModel.MoveNamesTable}[name\"\"8]8 \"Fire\" \"Water\" \"Earth\" \"Wind\" \"Light\" \"Dark\" \"Normal\" \"Magic\""); viewPort.Goto.Execute("000180"); viewPort.Edit("<000000> Dead Beef 01 00 00 00 <000000>"); // limiter is at 188 for an eggrun at 000 diff --git a/src/HexManiac.Tests/Before_Baseclass/NestedTablesTests.cs b/src/HexManiac.Tests/Before_Baseclass/NestedTablesTests.cs index baefa770..0088f70e 100644 --- a/src/HexManiac.Tests/Before_Baseclass/NestedTablesTests.cs +++ b/src/HexManiac.Tests/Before_Baseclass/NestedTablesTests.cs @@ -348,7 +348,7 @@ namespace HavenSoft.HexManiac.Tests { // setup a table for 5 tutor moves viewPort.Goto.Execute("000080"); - viewPort.Edit("^tutormoves[move:movenames]5 One Two Four Five Seven "); + viewPort.Edit($"^tutormoves[move:{HardcodeTablesModel.MoveNamesTable}]5 One Two Four Five Seven "); // create a table that uses tutormoves as a bit array. Note 5 moves should take up 1 byte, so the overall table should by 8 bytes long (because there are 8 pokemon) viewPort.Goto.Execute("0000090"); @@ -374,7 +374,7 @@ namespace HavenSoft.HexManiac.Tests { // setup a table for 5 tutor moves viewPort.Goto.Execute("000080"); - viewPort.Edit("^tutormoves[move:movenames]10 One One Two Two Four Four Five Five Seven Seven "); // note that 10 bits takes 2 bytes + viewPort.Edit($"^tutormoves[move:{HardcodeTablesModel.MoveNamesTable}]10 One One Two Two Four Four Five Five Seven Seven "); // note that 10 bits takes 2 bytes viewPort.Goto.Execute("0000100"); viewPort.Edit($"^table[moves|b[]tutormoves]{HardcodeTablesModel.PokemonNameTable} "); diff --git a/src/HexManiac.WPF/Controls/StartScreen.xaml b/src/HexManiac.WPF/Controls/StartScreen.xaml index dd827a8c..5cd32499 100644 --- a/src/HexManiac.WPF/Controls/StartScreen.xaml +++ b/src/HexManiac.WPF/Controls/StartScreen.xaml @@ -17,20 +17,6 @@ Drag-n-Drop to open a file. - - Tip: Try typing these words into Goto (Ctrl+G). - You can jump to tables inside the ROM. - - pokestats - movenames - abilitynames - trainerdata - items - tmcompatibility - dexinfo - wild - - See resources/tableReference.txt for the full list.