public void LoadConfig(LoadingForm loadingForm) { int statusNum = 0; // Read configuration loadingForm.UpdateStatus("Loading main configuration", statusNum++); XmlConfigParser.OpenConfig(@"Config/Config.xml"); loadingForm.UpdateStatus("Loading Miscellaneous Data", statusNum++); _miscData = XmlConfigParser.OpenWatchVarData(@"Config/MiscData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Object Data", statusNum++); _objectData = XmlConfigParser.OpenWatchVarData(@"Config/ObjectData.xml", "ObjectDataSchema.xsd", "objectOffset"); loadingForm.UpdateStatus("Loading Object Associations", statusNum++); _objectAssoc = XmlConfigParser.OpenObjectAssoc(@"Config/ObjectAssociations.xml", _slotManagerGui); loadingForm.UpdateStatus("Loading Mario Data", statusNum++); _marioData = XmlConfigParser.OpenWatchVarData(@"Config/MarioData.xml", "MarioDataSchema.xsd", "marioOffset"); loadingForm.UpdateStatus("Loading Camera Data", statusNum++); _cameraData = XmlConfigParser.OpenWatchVarData(@"Config/CameraData.xml", "CameraDataSchema.xsd"); loadingForm.UpdateStatus("Loading HUD Data", statusNum++); _triangleData = XmlConfigParser.OpenWatchVarData(@"Config/TrianglesData.xml", "TrianglesDataSchema.xsd", "triangleOffset"); loadingForm.UpdateStatus("Loading Triangles Data", statusNum++); _hudData = XmlConfigParser.OpenWatchVarData(@"Config/HudData.xml", "HudDataSchema.xsd"); loadingForm.UpdateStatus("Loading Map Associations", statusNum++); _mapAssoc = XmlConfigParser.OpenMapAssoc(@"Config/MapAssociations.xml"); loadingForm.UpdateStatus("Loading Scripts", statusNum++); _scriptParser = XmlConfigParser.OpenScripts(@"Config/Scripts.xml"); loadingForm.UpdateStatus("Loading Hacks", statusNum++); _romHacks = XmlConfigParser.OpenHacks(@"Config/Hacks.xml"); loadingForm.UpdateStatus("Finishing", statusNum); }
static void InitializeShit(out StroopMainForm mainForm) { StroopMainForm tmpMainForm = null; LoadingHandler.LoadingForm.RunLoadingTasks( ("Creating Process Stream", () => Config.Stream = new ProcessStream() ), ("Loading Main Configuration", () => { config = XmlConfigParser.OpenConfig(@"Config/Config.xml"); XmlConfigParser.OpenSavedSettings(@"Config/SavedSettings.xml"); } ), ("Loading Object Associations", () => Config.ObjectAssociations = XmlConfigParser.OpenObjectAssoc(@"Config/ObjectAssociations.xml") ), ("Loading File Image Associations", () => XmlConfigParser.OpenFileImageAssoc(@"Config/FileImageAssociations.xml", Config.FileImageGui) ), ("Loading Map Associations", () => Config.MapAssociations = XmlConfigParser.OpenMapAssoc(@"Config/MapAssociations.xml") ), ("Loading Scripts", () => _scriptParser = XmlConfigParser.OpenScripts(@"Config/Scripts.xml") ), ("Opening Tables", () => { TableConfig.MarioActions = XmlConfigParser.OpenActionTable(@"Config/MarioActions.xml"); TableConfig.MarioAnimations = XmlConfigParser.OpenAnimationTable(@"Config/MarioAnimations.xml"); TableConfig.TriangleInfo = XmlConfigParser.OpenTriangleInfoTable(@"Config/TriangleInfo.xml"); TableConfig.PendulumSwings = XmlConfigParser.OpenPendulumSwingTable(@"Config/PendulumSwings.xml"); TableConfig.RacingPenguinWaypoints = XmlConfigParser.OpenWaypointTable(@"Config/RacingPenguinWaypoints.xml"); TableConfig.KoopaTheQuick1Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick1Waypoints.xml"); TableConfig.KoopaTheQuick2Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick2Waypoints.xml"); TableConfig.TtmBowlingBallPoints = XmlConfigParser.OpenPointTable(@"Config/TtmBowlingBallPoints.xml"); TableConfig.Missions = XmlConfigParser.OpenMissionTable(@"Config/Missions.xml"); TableConfig.CourseData = XmlConfigParser.OpenCourseDataTable(@"Config/CourseData.xml"); TableConfig.FlyGuyData = new FlyGuyDataTable(); TableConfig.WdwRotatingPlatformTable = new ObjectAngleTable(1120); TableConfig.ElevatorAxleTable = new ObjectAngleTable(400); } ), ("Initialize Main Form", () => tmpMainForm = new StroopMainForm(true) ) // ("Creating Managers", // () => Config.InjectionManager = new InjectionManager(_scriptParser, optionsTab.checkBoxUseRomHack); //) ); mainForm = tmpMainForm; }
public void LoadConfig(MainLoadingForm loadingForm) { int statusNum = 0; // Read configuration loadingForm.UpdateStatus("Loading main configuration", statusNum++); XmlConfigParser.OpenConfig(@"Config/Config.xml"); XmlConfigParser.OpenSavedSettings(@"Config/SavedSettings.xml"); loadingForm.UpdateStatus("Loading Miscellaneous Data", statusNum++); loadingForm.UpdateStatus("Loading Object Data", statusNum++); loadingForm.UpdateStatus("Loading Object Associations", statusNum++); Config.ObjectAssociations = XmlConfigParser.OpenObjectAssoc(@"Config/ObjectAssociations.xml", _slotManagerGui); loadingForm.UpdateStatus("Loading Mario Data", statusNum++); loadingForm.UpdateStatus("Loading Camera Data", statusNum++); loadingForm.UpdateStatus("Loading Actions Data", statusNum++); loadingForm.UpdateStatus("Loading Water Data", statusNum++); loadingForm.UpdateStatus("Loading Input Data", statusNum++); loadingForm.UpdateStatus("Loading Input Image Associations", statusNum++); _inputImageGuiList = XmlConfigParser.CreateInputImageAssocList(@"Config/InputImageAssociations.xml"); loadingForm.UpdateStatus("Loading File Data", statusNum++); loadingForm.UpdateStatus("Loading File Image Associations", statusNum++); XmlConfigParser.OpenFileImageAssoc(@"Config/FileImageAssociations.xml", _fileImageGui); loadingForm.UpdateStatus("Loading Area Data", statusNum++); loadingForm.UpdateStatus("Loading Quarter Frame Data", statusNum++); loadingForm.UpdateStatus("Loading Camera Hack Data", statusNum++); loadingForm.UpdateStatus("Loading Triangles Data", statusNum++); loadingForm.UpdateStatus("Loading Debug Data", statusNum++); loadingForm.UpdateStatus("Loading HUD Data", statusNum++); loadingForm.UpdateStatus("Loading Map Associations", statusNum++); Config.MapAssociations = XmlConfigParser.OpenMapAssoc(@"Config/MapAssociations.xml"); loadingForm.UpdateStatus("Loading Scripts", statusNum++); _scriptParser = XmlConfigParser.OpenScripts(@"Config/Scripts.xml"); loadingForm.UpdateStatus("Loading Hacks", statusNum++); _romHacks = XmlConfigParser.OpenHacks(@"Config/Hacks.xml"); loadingForm.UpdateStatus("Loading Mario Actions", statusNum++); TableConfig.MarioActions = XmlConfigParser.OpenActionTable(@"Config/MarioActions.xml"); TableConfig.MarioAnimations = XmlConfigParser.OpenAnimationTable(@"Config/MarioAnimations.xml"); TableConfig.TriangleInfo = XmlConfigParser.OpenTriangleInfoTable(@"Config/TriangleInfo.xml"); TableConfig.PendulumSwings = XmlConfigParser.OpenPendulumSwingTable(@"Config/PendulumSwings.xml"); TableConfig.RacingPenguinWaypoints = XmlConfigParser.OpenWaypointTable(@"Config/RacingPenguinWaypoints.xml"); TableConfig.KoopaTheQuick1Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick1Waypoints.xml"); TableConfig.KoopaTheQuick2Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick2Waypoints.xml"); TableConfig.Missions = XmlConfigParser.OpenMissionTable(@"Config/Missions.xml"); TableConfig.CourseData = XmlConfigParser.OpenCourseDataTable(@"Config/CourseData.xml"); TableConfig.FlyGuyData = new FlyGuyDataTable(); loadingForm.UpdateStatus("Creating Managers", statusNum++); CreateManagers(); loadingForm.UpdateStatus("Finishing", statusNum); }
public void LoadConfig(LoadingForm loadingForm) { int statusNum = 0; // Read configuration loadingForm.UpdateStatus("Loading main configuration", statusNum++); XmlConfigParser.OpenConfig(@"Config/Config.xml"); loadingForm.UpdateStatus("Loading Miscellaneous Data", statusNum++); _miscData = XmlConfigParser.OpenWatchVarData(@"Config/MiscData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Object Data", statusNum++); _objectData = XmlConfigParser.OpenWatchVarData(@"Config/ObjectData.xml", "ObjectDataSchema.xsd"); loadingForm.UpdateStatus("Loading Object Associations", statusNum++); Config.ObjectAssociations = XmlConfigParser.OpenObjectAssoc(@"Config/ObjectAssociations.xml", _slotManagerGui); loadingForm.UpdateStatus("Loading Mario Data", statusNum++); _marioData = XmlConfigParser.OpenWatchVarData(@"Config/MarioData.xml", "MarioDataSchema.xsd"); loadingForm.UpdateStatus("Loading Camera Data", statusNum++); _cameraData = XmlConfigParser.OpenWatchVarData(@"Config/CameraData.xml", "CameraDataSchema.xsd"); loadingForm.UpdateStatus("Loading Actions Data", statusNum++); _actionsData = XmlConfigParser.OpenWatchVarData(@"Config/ActionsData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Water Data", statusNum++); _waterData = XmlConfigParser.OpenWatchVarData(@"Config/WaterData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Input Data", statusNum++); _inputData = XmlConfigParser.OpenWatchVarData(@"Config/InputData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Input Image Associations", statusNum++); XmlConfigParser.OpenInputImageAssoc(@"Config/InputImageAssociations.xml", _inputImageGui); loadingForm.UpdateStatus("Loading File Data", statusNum++); _fileData = XmlConfigParser.OpenWatchVarData(@"Config/FileData.xml", "FileDataSchema.xsd"); loadingForm.UpdateStatus("Loading File Image Associations", statusNum++); XmlConfigParser.OpenFileImageAssoc(@"Config/FileImageAssociations.xml", _fileImageGui); loadingForm.UpdateStatus("Loading Quarter Frame Data", statusNum++); _quarterFrameData = XmlConfigParser.OpenWatchVarData(@"Config/QuarterFrameData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Camera Hack Data", statusNum++); _camHackData = XmlConfigParser.OpenWatchVarData(@"Config/CamHackData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading Triangles Data", statusNum++); _triangleData = XmlConfigParser.OpenWatchVarData(@"Config/TrianglesData.xml", "TrianglesDataSchema.xsd"); loadingForm.UpdateStatus("Loading Debug Data", statusNum++); _debugData = XmlConfigParser.OpenWatchVarData(@"Config/DebugData.xml", "MiscDataSchema.xsd"); loadingForm.UpdateStatus("Loading HUD Data", statusNum++); _hudData = XmlConfigParser.OpenWatchVarData(@"Config/HudData.xml", "HudDataSchema.xsd"); loadingForm.UpdateStatus("Loading Map Associations", statusNum++); _mapAssoc = XmlConfigParser.OpenMapAssoc(@"Config/MapAssociations.xml"); loadingForm.UpdateStatus("Loading Scripts", statusNum++); _scriptParser = XmlConfigParser.OpenScripts(@"Config/Scripts.xml"); loadingForm.UpdateStatus("Loading Hacks", statusNum++); var hacksConfig = XmlConfigParser.OpenHacks(@"Config/Hacks.xml"); Config.Hacks = hacksConfig.Item1; _romHacks = hacksConfig.Item2; loadingForm.UpdateStatus("Loading Mario Actions", statusNum++); Config.MarioActions = XmlConfigParser.OpenActionTable(@"Config/MarioActions.xml"); Config.MarioAnimations = XmlConfigParser.OpenAnimationTable(@"Config/MarioAnimations.xml"); Config.PendulumSwings = XmlConfigParser.OpenPendulumSwingTable(@"Config/PendulumSwings.xml"); Config.RacingPenguinWaypoints = XmlConfigParser.OpenWaypointTable(@"Config/RacingPenguinWaypoints.xml"); Config.KoopaTheQuick1Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick1Waypoints.xml"); Config.KoopaTheQuick2Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick2Waypoints.xml"); Config.Missions = XmlConfigParser.OpenMissionTable(@"Config/Missions.xml"); Config.CourseData = XmlConfigParser.OpenCourseDataTable(@"Config/CourseData.xml"); Config.FlyGuyData = new FlyGuyDataTable(); loadingForm.UpdateStatus("Finishing", statusNum); }
public void LoadConfig(MainLoadingForm loadingForm) { Config.ObjectSlotManagerGui = new ObjectSlotManagerGui() { TabControl = tabControlMain, LockLabelsCheckbox = checkBoxObjLockLabels, FlowLayoutContainer = WatchVariablePanelObjects, SortMethodComboBox = comboBoxSortMethod, LabelMethodComboBox = comboBoxLabelMethod, SelectionMethodComboBox = comboBoxSelectionMethod, }; int statusNum = 0; // Read configuration loadingForm.UpdateStatus("Loading main configuration", statusNum++); XmlConfigParser.OpenConfig(@"Config/Config.xml"); XmlConfigParser.OpenSavedSettings(@"Config/SavedSettings.xml"); loadingForm.UpdateStatus("Loading Miscellaneous Data", statusNum++); loadingForm.UpdateStatus("Loading Object Data", statusNum++); loadingForm.UpdateStatus("Loading Object Associations", statusNum++); Config.ObjectAssociations = XmlConfigParser.OpenObjectAssoc(@"Config/ObjectAssociations.xml", Config.ObjectSlotManagerGui); loadingForm.UpdateStatus("Loading Mario Data", statusNum++); loadingForm.UpdateStatus("Loading Camera Data", statusNum++); loadingForm.UpdateStatus("Loading Actions Data", statusNum++); loadingForm.UpdateStatus("Loading Water Data", statusNum++); loadingForm.UpdateStatus("Loading Input Data", statusNum++); loadingForm.UpdateStatus("Loading Input Image Associations", statusNum++); _inputImageGuiList = XmlConfigParser.CreateInputImageAssocList(@"Config/InputImageAssociations.xml"); loadingForm.UpdateStatus("Loading File Data", statusNum++); loadingForm.UpdateStatus("Loading File Image Associations", statusNum++); XmlConfigParser.OpenFileImageAssoc(@"Config/FileImageAssociations.xml", _fileImageGui); loadingForm.UpdateStatus("Loading Area Data", statusNum++); loadingForm.UpdateStatus("Loading Quarter Frame Data", statusNum++); loadingForm.UpdateStatus("Loading Camera Hack Data", statusNum++); loadingForm.UpdateStatus("Loading Triangles Data", statusNum++); loadingForm.UpdateStatus("Loading Debug Data", statusNum++); loadingForm.UpdateStatus("Loading HUD Data", statusNum++); loadingForm.UpdateStatus("Loading Map Associations", statusNum++); Config.MapAssociations = XmlConfigParser.OpenMapAssoc(@"Config/MapAssociations.xml"); loadingForm.UpdateStatus("Loading Scripts", statusNum++); _scriptParser = XmlConfigParser.OpenScripts(@"Config/Scripts.xml"); loadingForm.UpdateStatus("Loading Hacks", statusNum++); _romHacks = XmlConfigParser.OpenHacks(@"Config/Hacks.xml"); loadingForm.UpdateStatus("Loading Mario Actions", statusNum++); TableConfig.MarioActions = XmlConfigParser.OpenActionTable(@"Config/MarioActions.xml"); TableConfig.MarioAnimations = XmlConfigParser.OpenAnimationTable(@"Config/MarioAnimations.xml"); TableConfig.TriangleInfo = XmlConfigParser.OpenTriangleInfoTable(@"Config/TriangleInfo.xml"); TableConfig.PendulumSwings = XmlConfigParser.OpenPendulumSwingTable(@"Config/PendulumSwings.xml"); TableConfig.RacingPenguinWaypoints = XmlConfigParser.OpenWaypointTable(@"Config/RacingPenguinWaypoints.xml"); TableConfig.KoopaTheQuick1Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick1Waypoints.xml"); TableConfig.KoopaTheQuick2Waypoints = XmlConfigParser.OpenWaypointTable(@"Config/KoopaTheQuick2Waypoints.xml"); TableConfig.TtmBowlingBallPoints = XmlConfigParser.OpenPointTable(@"Config/TtmBowlingBallPoints.xml"); TableConfig.MusicData = XmlConfigParser.OpenMusicTable(@"Config/MusicData.xml"); TableConfig.Missions = XmlConfigParser.OpenMissionTable(@"Config/Missions.xml"); TableConfig.CourseData = XmlConfigParser.OpenCourseDataTable(@"Config/CourseData.xml"); TableConfig.FlyGuyData = new FlyGuyDataTable(); TableConfig.WdwRotatingPlatformTable = new ObjectAngleTable(1120); TableConfig.ElevatorAxleTable = new ObjectAngleTable(400); loadingForm.UpdateStatus("Creating Managers", statusNum++); CreateManagers(); loadingForm.UpdateStatus("Finishing", statusNum); }