Removed useless code from PokeDatabase

This commit is contained in:
AdAstra-LD
2021-01-24 00:13:19 +01:00
parent 3617ab98f3
commit c4df670c9d
4 changed files with 98 additions and 374 deletions

View File

@@ -5310,11 +5310,10 @@ namespace DSPRE {
}
}
private void messageButton_Click(object sender, EventArgs e) {
using (InsertValueDialog f = new InsertValueDialog("Insert message number:", "dec")) {
using (InsertValueDialog f = new InsertValueDialog("Insert message number (decimal):", "dec")) {
f.ShowDialog();
if (f.okSelected) {
String msg = "\nSetVariableHero 0x0" +
"\nPlayFanfare 0x5DC" + "\nLockAll" + "\nFacePlayer" +
String msg = "\nPlayFanfare 0x5DC" + "\nLockAll" + "\nFacePlayer" +
"\nMessage 0x" + ((int)f.numericUpDown1.Value).ToString("X") +
"\nWaitButton" + "\nCloseMessage" + "\nReleaseAll";
scriptTextBox.Text = scriptTextBox.Text.Insert(scriptTextBox.SelectionStart, msg);

View File

@@ -550,374 +550,99 @@ namespace DSPRE {
};
}
public static class System {
public static class Scripts {
/*
public static Dictionary<string, ushort> commandsDictDPPt = new Dictionary<string, ushort>() {
["Nop"] = 0x0000,
["Dummy"] = 0x0001,
["End"] = 0x0002,
["TimeWait"] = 0x0003,
["CompareVarValue"] = 0x0011,
["CompareVars"] = 0x0012,
["CommonScript"] = 0x0014,
["Jump"] = 0x0016,
["Call"] = 0x001A,
["Return"] = 0x001B,
["Jump-If"] = 0x001C,
["Call-If"] = 0x001D,
["SetFlag"] = 0x001E,
["ClearFlag"] = 0x001F,
["CheckFlag"] = 0x0020,
["SetValue"] = 0x0023,
["CompareVarsToByte"] = 0x0026,
["SetVar"] = 0x0028,
["CopyVar"] = 0x0029,
["Message"] = 0x002C,
["Message2"] = 0x002D,
["Message3"] = 0x002F,
["WaitButton"] = 0x0031,
["CloseMessage"] = 0x0034,
["FreezeMessageBox"] = 0x0035,
["CallMessageBox"] = 0x0036,
["ColorMessageBox"] = 0x0037,
["TypeMessageBox"] = 0x0038,
["NoMapMessageBox"] = 0x0039,
["CallMessageBoxText"] = 0x003A,
["Menu"] = 0x003C,
["YesNoBox"] = 0x003E,
["WaitFor"] = 0x003F,
["Multi"] = 0x0040,
["Multi2"] = 0x0041,
["TextScriptMulti"] = 0x0042,
["CloseMulti"] = 0x0043,
["Multi3"] = 0x0044,
["TextMessageScript"] = 0x0046,
["MultiRow"] = 0x0048,
["PlayFanfare"] = 0x0049,
["PlayFanfare2"] = 0x004A,
["WaitFanfare"] = 0x004B,
["PlayCry"] = 0x004C,
["WaitCry"] = 0x004D,
["PlaySound"] = 0x004E,
["FadeDefaultMusic"] = 0x004F,
["PlayMusic"] = 0x0050,
["StopMusic"] = 0x0051,
["RestartMusic"] = 0x0052,
["SwitchMusic"] = 0x0054,
["SwitchMusic2"] = 0x005A,
["ApplyMovement"] = 0x005E,
["WaitMovement"] = 0x005F,
["LockAll"] = 0x0060,
["ReleaseAll"] = 0x0061,
["Lock"] = 0x0062,
["Release"] = 0x0063,
["AddOW"] = 0x0064,
["RemoveOW"] = 0x0065,
["LockCam"] = 0x0066,
["FacePlayer"] = 0x0068,
["CheckSpritePosition"] = 0x0069,
["CheckPersonPosition"] = 0x006B,
["ContinueFollow"] = 0x006C,
["FollowHero"] = 0x006D,
["StopFollowHero"] = 0x006E,
["GiveMoney"] = 0x006F,
["TakeMoney"] = 0x0070,
["CheckMoney"] = 0x0071,
["ShowMoney"] = 0x0072,
["HideMoney"] = 0x0073,
["UpdateMoney"] = 0x0074,
["ShowCoins"] = 0x0075,
["HideCoins"] = 0x0076,
["UpdateCoins"] = 0x0077,
["CheckCoins"] = 0x0078,
["GiveCoins"] = 0x0079,
["TakeCoins"] = 0x007A,
["TakeItem"] = 0x007B,
["CheckStoreItem"] = 0x007C,
["CheckItem"] = 0x007D,
["CheckUndergroundPCStatus"] = 0x0085,
["CheckPokémonParty"] = 0x0093,
["StorePokémonParty"] = 0x0094,
["SetPokémonPartyStored"] = 0x0095,
["GivePokémon"] = 0x0096,
["GiveEgg"] = 0x0097,
["CheckMove"] = 0x0099,
["CheckPlaceStored"] = 0x009A,
["CallEnd"] = 0x00A1,
["WFC"] = 0x00A3,
["Interview"] = 0x00A5,
["DressPokémon"] = 0x00A6,
["DisplayDressedPokémon"] = 0x00A7,
["DisplayContestPokémon"] = 0x00A8,
["CapsuleEditor"] = 0x00A9,
["SinnohMaps"] = 0x00AA,
["BoxPokémon"] = 0x00AB,
["DrawUnion"] = 0x00AC,
["TrainerCaseUnion"] = 0x00AD,
["TradeUnion"] = 0x00AE,
["RecordMixingUnion"] = 0x00AF,
["EndGame"] = 0x00B0,
["HallOfFameData"] = 0x00B1,
["WFC1"] = 0x00B3,
["ChooseStarter"] = 0x00B4,
["ChoosePlayerName"] = 0x00BA,
["ChoosePokémonName"] = 0x00BB,
["FadeScreen"] = 0x00BC,
["ResetScreen"] = 0x00BD,
["Warp"] = 0x00BE,
["RockClimbAnimation"] = 0x00BF,
["SurfAnimation"] = 0x00C0,
["WaterfallAnimation"] = 0x00C1,
["FlyAnimation"] = 0x00C2,
["Tuxedo"] = 0x00C6,
["CheckBike"] = 0x00C7,
["RideBike"] = 0x00C8,
["BerryHeroAnimation"] = 0x00CB,
["StopBerryHeroAnimation"] = 0x00CC,
["SetVariableHero"] = 0x00CD,
["SetVariableRival"] = 0x00CE,
["SetVariableAlter"] = 0x00CF,
["SetVariablePokémon"] = 0x00D0,
["SetVariableItem"] = 0x00D1,
["SetVariableAttackItem"] = 0x00D3,
["SetVariableAttack"] = 0x00D4,
["SetVariableNumber"] = 0x00D5,
["SetVariableNickname"] = 0x00D6,
["SetVariableObject"] = 0x00D7,
["SetVariableTrainer"] = 0x00D8,
["SetVarPokémonStored"] = 0x00DA,
["SetVarHeroStored"] = 0x00DB,
["SetVarRivalStored"] = 0x00DC,
["SetVarAlterStored"] = 0x00DD,
["StoreStarter"] = 0x00DE,
["TrainerBattle"] = 0x00E5,
["EndTrainerBattle"] = 0x00E6,
["ActLeagueBattlers"] = 0x00EA,
["LostGoToPokémonCenter"] = 0x00EB,
["CheckLost"] = 0x00EC,
["ChooseFriend"] = 0x00F2,
["WirelessBattleWait"] = 0x00F3,
["PokémonContest"] = 0x00F7,
["FlashContest"] = 0x0111,
["EndFlash"] = 0x0112,
["ShowLinkCountRecord"] = 0x0116,
["WarpMapElevator"] = 0x011B,
["CheckFloor"] = 0x011C,
["SetPositionAfterShip"] = 0x0120,
["WildBattle"] = 0x0124,
["StarterBattle"] = 0x0125,
["ExplanationBattle"] = 0x0126,
["HoneyTreeBattle"] = 0x0127,
["RandomBattle"] = 0x0129,
["WriteAutograph"] = 0x012B,
["CheckDress"] = 0x012E,
["GivePokétch"] = 0x0131,
["ActivatePokétchApp"] = 0x0133,
["StorePokétchApp"] = 0x0134,
["ExpectDecisionOther"] = 0x0143,
["PokéMart"] = 0x0147,
["PokéMart1"] = 0x0148,
["PokéMart2"] = 0x0149,
["PokéMart3"] = 0x014A,
["DefeatGoToPokéCenter"] = 0x014B,
["CheckGender"] = 0x014D,
["HealPokémon"] = 0x014E,
["UnionRoom"] = 0x0153,
["ActivatePokédex"] = 0x0158,
["GiveRunningShoes"] = 0x015A,
["CheckBadge"] = 0x015B,
["EnableBadge"] = 0x015C,
["DisableBadge"] = 0x015D,
["PrepareDoorAnimation"] = 0x0168,
["WaitAction"] = 0x0169,
["WaitClose"] = 0x016A,
["OpenDoor"] = 0x016B,
["CloseDoor"] = 0x016C,
["CheckPartyNumber"] = 0x0177,
["OpenBerryPouch"] = 0x0178,
["SetOverworldPosition"] = 0x0186,
["SetOverworldMovement"] = 0x0188,
["ReleaseOverworld"] = 0x0189,
["SetDoorPassable"] = 0x018A,
["SetDoorLocked"] = 0x018B,
["ShowSavingClock"] = 0x018D,
["HideSavingClock"] = 0x018E,
["ChoosePokémonMenu"] = 0x0191,
["ChoosePokémonMenu2"] = 0x0192,
["StorePokémonMenu2"] = 0x0193,
["PokémonInfo"] = 0x0195,
["StorePokémonNumber"] = 0x0198,
["CheckPartyNumber2"] = 0x019A,
["EggAnimation"] = 0x01AC,
["MailBox"] = 0x01B3,
["RecordList"] = 0x01B5,
["CheckHappiness"] = 0x01B9,
["CheckPosition"] = 0x01BD,
["CheckPokémonParty2"] = 0x01C0,
["CopyPokémonHeight"] = 0x01C1,
["SetVariablePokémonHeight"] = 0x01C2,
["ComparePokémonHeight"] = 0x01C3,
["CheckPokémonHeight"] = 0x01C4,
["MoveInfo"] = 0x01C6,
["StoreMove"] = 0x01C7,
["DeleteMove"] = 0x01C9,
["BerryPoffin"] = 0x01D7,
["BattleRoomResult"] = 0x01D9,
["CheckSinnohPokédex"] = 0x01E8,
["CheckNationalPokédex"] = 0x01E9,
["ShowSinnohCertificate"] = 0x01EA,
["ShowNationalCertificate"] = 0x01EB,
["CheckFossil"] = 0x01F1,
["CheckPokémonLevel"] = 0x01F6,
["WarpLastElevator"] = 0x0204,
["GeoNet"] = 0x0205,
["GreatMarshBinoculars"] = 0x0206,
["PokémonPicture"] = 0x0208,
["HidePicture"] = 0x0209,
["RememberMove"] = 0x0221,
["TeachMove"] = 0x0224,
["CheckTeachMove"] = 0x0225,
["CheckPokémonTrade"] = 0x0228,
["TradeChosenPokémon"] = 0x0229,
["StopTrade"] = 0x022A,
["DecideRules"] = 0x0239,
["HealPokémonAnimation"] = 0x023B,
["ShipAnimation"] = 0x023D,
["PhraseBox1W"] = 0x0243,
["PhraseBox2W"] = 0x0244,
["CheckPhraseBoxInput"] = 0x0249,
["PreparePcAnimation"] = 0x024B,
["OpenPcAnimation"] = 0x024C,
["ClosePcAnimation"] = 0x024D,
["CheckLotteryNumber"] = 0x024E,
["CompareLotteryNumber"] = 0x024F,
["CheckBoxesNumber"] = 0x0252,
["SprtSave"] = 0x0257,
["RetSprtSave"] = 0x0258,
["ElevLgAnimation"] = 0x0259,
["CheckAccessories"] = 0x0261,
["PokéCasino"] = 0x0267,
["UnownMessageBox"] = 0x026D,
["ThankNameInsert"] = 0x0271,
["LeagueCastleView"] = 0x027A,
["PokémonPartyPicture"] = 0x028C,
["CheckFirstTimeChampion"] = 0x028F,
["ShowBattlePointsBox"] = 0x0294,
["HideBattlePointsBox"] = 0x0295,
["ChoiceMulti"] = 0x029D,
["HiddenMachineEffect"] = 0x029E,
["CameraBumpEffect"] = 0x029F,
["DoubleBattle"] = 0x02A0,
["ApplyMovement2"] = 0x02A1,
["ChooseTradePokémon"] = 0x02A5,
["ComparePhraseBoxInput"] = 0x02AA,
["ActivateMysteryGift"] = 0x02AC,
["CheckWildBattle2"] = 0x02BC,
["WildBattle2"] = 0x02BD,
["BikeRide"] = 0x02BF,
["ShowSaveBox"] = 0x02C1,
["HideSaveBox"] = 0x02C2,
["SpinTradeUnion"] = 0x02C6,
["CheckGameVersion"] = 0x02C7,
["FloralClockAnimation"] = 0x02CA,
["PortalEffect"] = 0x0328,
["DisplayFloor"] = 0x0347
};
*/
public static Dictionary<string, ushort> movementsDictDPPtHGSS = new Dictionary<string, ushort>() {
["LookUp"] = 0x0000,
["LookDown"] = 0x0001,
["LookLeft"] = 0x0002,
["LookRight"] = 0x0003,
["WalkUpSlow"] = 0x0004,
["WalkDownSlow"] = 0x0005,
["WalkLeftSlow"] = 0x0006,
["WalkRightSlow"] = 0x0007,
["WalkUp"] = 0x0008,
["WalkDown"] = 0x0009,
["WalkLeft"] = 0x000A,
["WalkRight"] = 0x000B,
["WalkUpFast"] = 0x000C,
["WalkDownFast"] = 0x000D,
["WalkLeftFast"] = 0x000E,
["WalkRightFast"] = 0x000F,
["WalkUpVeryFast"] = 0x0010,
["WalkDownVeryFast"] = 0x0011,
["WalkLeftVeryFast"] = 0x0012,
["WalkRightVeryFast"] = 0x0013,
["RunUp"] = 0x0014,
["RunDown"] = 0x0015,
["RunLeft"] = 0x0016,
["RunRight"] = 0x0017,
["WalkUpSlowSite"] = 0x0018,
["WalkDownSlowSite"] = 0x0019,
["WalkLeftSlowSite"] = 0x001A,
["WalkRightSlowSite"] = 0x001B,
["WalkUpSite"] = 0x001C,
["WalkDownSite"] = 0x001D,
["WalkLeftSite"] = 0x001E,
["WalkRightSite"] = 0x001F,
["WalkUpFastSite"] = 0x0020,
["WalkDownFastSite"] = 0x0021,
["WalkLeftFastSite"] = 0x0022,
["WalkRightFastSite"] = 0x0023,
["WalkUpVeryFastSite"] = 0x0024,
["WalkDownVeryFastSite"] = 0x0025,
["WalkLeftVeryFastSite"] = 0x0026,
["WalkRightVeryFastSite"] = 0x0027,
["RunUpSite"] = 0x0028,
["RunDownSite"] = 0x0029,
["RunLeftSite"] = 0x002A,
["RunRightSite"] = 0x002B,
["JumpUpSlow"] = 0x002C,
["JumpDownSlow"] = 0x002D,
["JumpLeftSlow"] = 0x002E,
["JumpRightSlow"] = 0x002F,
["JumpUpSite"] = 0x0030,
["JumpDownSite"] = 0x0031,
["JumpLeftSite"] = 0x0032,
["JumpRightSite"] = 0x0033,
["JumpUp"] = 0x0034,
["JumpDown"] = 0x0035,
["JumpLeft"] = 0x0036,
["JumpRight"] = 0x0037,
["JumpUp2"] = 0x0038,
["JumpDown2"] = 0x0039,
["JumpLeft2"] = 0x003A,
["JumpRight2"] = 0x003B,
["DelayShort"] = 0x003F,
["Delay"] = 0x0042,
["WaitDisappear"] = 0x0045,
["LockDirection"] = 0x0047,
["ReleaseDirection"] = 0x0048,
["Exclamation"] = 0x004B,
["WaitWalkUpSlow"] = 0x004C,
["WaitWalkDownSlow"] = 0x004D,
["WaitWalkLeftSlow"] = 0x004E,
["WaitWalkRightSlow"] = 0x004F,
["WaitWalkUp"] = 0x0050,
["WaitWalkDown"] = 0x0051,
["WaitWalkLeft"] = 0x0052,
["WaitWalkRight"] = 0x0053,
["WaitMoveUp"] = 0x0054,
["WaitMoveDown"] = 0x0055,
["WaitMoveLeft"] = 0x0056,
["WaitMoveRight"] = 0x0057,
["WaitWalkBackUp"] = 0x0058,
["WaitWalkBackDown"] = 0x0059,
["WaitWalkBackLeft"] = 0x005A,
["WaitWalkBackRight"] = 0x005B,
["WaitJumpLeft1"] = 0x005C,
["WaitJumpRight1"] = 0x005D,
["WaitJumpLeft2"] = 0x005E,
["WaitJumpRight2"] = 0x005F,
["WaitMoveSite"] = 0x0064,
["WaitJumpSite"] = 0x0065,
["WaitDoubleExclamation"] = 0x0067,
["WaitMoveForever"] = 0x0068,
["End"] = 0x00FE
};
}
public static Dictionary<string, ushort> movementsDictDPPtHGSS = new Dictionary<string, ushort>() {
["LookUp"] = 0x0000,
["LookDown"] = 0x0001,
["LookLeft"] = 0x0002,
["LookRight"] = 0x0003,
["WalkUpSlow"] = 0x0004,
["WalkDownSlow"] = 0x0005,
["WalkLeftSlow"] = 0x0006,
["WalkRightSlow"] = 0x0007,
["WalkUp"] = 0x0008,
["WalkDown"] = 0x0009,
["WalkLeft"] = 0x000A,
["WalkRight"] = 0x000B,
["WalkUpFast"] = 0x000C,
["WalkDownFast"] = 0x000D,
["WalkLeftFast"] = 0x000E,
["WalkRightFast"] = 0x000F,
["WalkUpVeryFast"] = 0x0010,
["WalkDownVeryFast"] = 0x0011,
["WalkLeftVeryFast"] = 0x0012,
["WalkRightVeryFast"] = 0x0013,
["RunUp"] = 0x0014,
["RunDown"] = 0x0015,
["RunLeft"] = 0x0016,
["RunRight"] = 0x0017,
["WalkUpSlowSite"] = 0x0018,
["WalkDownSlowSite"] = 0x0019,
["WalkLeftSlowSite"] = 0x001A,
["WalkRightSlowSite"] = 0x001B,
["WalkUpSite"] = 0x001C,
["WalkDownSite"] = 0x001D,
["WalkLeftSite"] = 0x001E,
["WalkRightSite"] = 0x001F,
["WalkUpFastSite"] = 0x0020,
["WalkDownFastSite"] = 0x0021,
["WalkLeftFastSite"] = 0x0022,
["WalkRightFastSite"] = 0x0023,
["WalkUpVeryFastSite"] = 0x0024,
["WalkDownVeryFastSite"] = 0x0025,
["WalkLeftVeryFastSite"] = 0x0026,
["WalkRightVeryFastSite"] = 0x0027,
["RunUpSite"] = 0x0028,
["RunDownSite"] = 0x0029,
["RunLeftSite"] = 0x002A,
["RunRightSite"] = 0x002B,
["JumpUpSlow"] = 0x002C,
["JumpDownSlow"] = 0x002D,
["JumpLeftSlow"] = 0x002E,
["JumpRightSlow"] = 0x002F,
["JumpUpSite"] = 0x0030,
["JumpDownSite"] = 0x0031,
["JumpLeftSite"] = 0x0032,
["JumpRightSite"] = 0x0033,
["JumpUp"] = 0x0034,
["JumpDown"] = 0x0035,
["JumpLeft"] = 0x0036,
["JumpRight"] = 0x0037,
["JumpUp2"] = 0x0038,
["JumpDown2"] = 0x0039,
["JumpLeft2"] = 0x003A,
["JumpRight2"] = 0x003B,
["DelayShort"] = 0x003F,
["Delay"] = 0x0042,
["WaitDisappear"] = 0x0045,
["LockDirection"] = 0x0047,
["ReleaseDirection"] = 0x0048,
["Exclamation"] = 0x004B,
["WaitWalkUpSlow"] = 0x004C,
["WaitWalkDownSlow"] = 0x004D,
["WaitWalkLeftSlow"] = 0x004E,
["WaitWalkRightSlow"] = 0x004F,
["WaitWalkUp"] = 0x0050,
["WaitWalkDown"] = 0x0051,
["WaitWalkLeft"] = 0x0052,
["WaitWalkRight"] = 0x0053,
["WaitMoveUp"] = 0x0054,
["WaitMoveDown"] = 0x0055,
["WaitMoveLeft"] = 0x0056,
["WaitMoveRight"] = 0x0057,
["WaitWalkBackUp"] = 0x0058,
["WaitWalkBackDown"] = 0x0059,
["WaitWalkBackLeft"] = 0x005A,
["WaitWalkBackRight"] = 0x005B,
["WaitJumpLeft1"] = 0x005C,
["WaitJumpRight1"] = 0x005D,
["WaitJumpLeft2"] = 0x005E,
["WaitJumpRight2"] = 0x005F,
["WaitMoveSite"] = 0x0064,
["WaitJumpSite"] = 0x0065,
["WaitDoubleExclamation"] = 0x0067,
["WaitMoveForever"] = 0x0068,
["End"] = 0x00FE
};
public static Dictionary<string, int> headerOffsetsDict = new Dictionary<string, int>() {
["ADAE"] = 0xEEDBC,
["APAE"] = 0xEEDBC,

View File

@@ -193,7 +193,7 @@
<value>WaitButton</value>
</data>
<data name="0034" xml:space="preserve">
<value>CloseMessageOnKeyPress</value>
<value>CloseMessage</value>
</data>
<data name="0035" xml:space="preserve">
<value>FreezeMessageBox</value>

View File

@@ -545,8 +545,8 @@ namespace DSPRE {
/* Get command id, which is always first in the description */
if (isMovement) {
if (PokeDatabase.System.Scripts.movementsDictDPPtHGSS.ContainsKey(words[0]))
this.id = PokeDatabase.System.Scripts.movementsDictDPPtHGSS[words[0]];
if (PokeDatabase.System.movementsDictDPPtHGSS.ContainsKey(words[0]))
this.id = PokeDatabase.System.movementsDictDPPtHGSS[words[0]];
else
UInt16.TryParse(words[0], NumberStyles.HexNumber, CultureInfo.InvariantCulture, out this.id);
} else {