void Start() { cam = Camera.mainCamera; guin = cam.GetComponent<GUINavigation>(); mapg = cam.GetComponent<MapGui>(); zoomedIn = true; mdown = false; onguidown = false; mdowncool = 0; }
public MapManager(ProcessStream stream, MapAssociations mapAssoc, ObjectAssociations objAssoc, MapGui mapGui) { _stream = stream; MapAssoc = mapAssoc; _mapGui = mapGui; _marioMapObj = new MapObject(objAssoc.MarioMapImage, 1); _marioMapObj.UsesRotation = true; _holpMapObj = new MapObject(objAssoc.HolpImage, 2); _cameraMapObj = new MapObject(objAssoc.CameraMapImage, 1); _cameraMapObj.UsesRotation = true; _floorTriangleMapObj = new TriangleMapObject(Color.FromArgb(200, Color.Yellow), 3); }
public MapManager(MapAssociations mapAssoc, MapGui mapGui) { MapAssoc = mapAssoc; _mapGui = mapGui; _marioMapObj = new MapObject(Config.ObjectAssociations.MarioMapImage, 1); _marioMapObj.UsesRotation = true; _holpMapObj = new MapObject(Config.ObjectAssociations.HolpImage, 2); _intendedNextPositionMapObj = new MapObject(Config.ObjectAssociations.IntendedNextPositionImage, 2); _intendedNextPositionMapObj.UsesRotation = true; _cameraMapObj = new MapObject(Config.ObjectAssociations.CameraMapImage, 1); _cameraMapObj.UsesRotation = true; _floorTriangleMapObj = new TriangleMapObject(Color.FromArgb(200, Color.Cyan), 3); _ceilingTriangleMapObj = new TriangleMapObject(Color.FromArgb(200, Color.Red), 2); }
private void StroopMainForm_Load(object sender, EventArgs e) { // Temp: Remove "Other" tab #if RELEASE tabControlMain.TabPages.Remove(tabPageExpressions); #endif // Create new manager context var currentContext = new ManagerContext(); ManagerContext.Current = currentContext; Config.Stream = new ProcessStream(); Config.Stream.OnUpdate += OnUpdate; Config.Stream.FpsUpdated += _sm64Stream_FpsUpdated; Config.Stream.OnDisconnect += _sm64Stream_OnDisconnect; Config.Stream.WarnReadonlyOff += _sm64Stream_WarnReadonlyOff; Config.Stream.OnClose += _sm64Stream_OnClose; currentContext.DisassemblyManager = _disManager = new DisassemblyManager(tabPageDisassembly); currentContext.ScriptManager = _scriptManager = new ScriptManager(_scriptParser, checkBoxUseRomHack); currentContext.HackManager = _hackManager = new HackManager(_romHacks, Config.ObjectAssociations.SpawnHacks, tabPageHacks); // Create map manager MapGui mapGui = new MapGui(); mapGui.GLControl = glControlMap; mapGui.MapIdLabel = labelMapId; mapGui.MapNameLabel = labelMapName; mapGui.MapSubNameLabel = labelMapSubName; mapGui.PuValueLabel = labelMapPuValue; mapGui.QpuValueLabel = labelMapQpuValue; mapGui.MapIconSizeTrackbar = trackBarMapIconSize; mapGui.MapZoomTrackbar = trackBarMapZoom; mapGui.MapShowInactiveObjects = checkBoxMapShowInactive; mapGui.MapShowMario = checkBoxMapShowMario; mapGui.MapShowHolp = checkBoxMapShowHolp; mapGui.MapShowIntendedNextPosition = checkBoxMapShowIntendedNextPosition; mapGui.MapShowCamera = checkBoxMapShowCamera; mapGui.MapShowFloorTriangle = checkBoxMapShowFloor; mapGui.MapShowCeilingTriangle = checkBoxMapShowCeiling; currentContext.MapManager = _mapManager = new MapManager(_mapAssoc, mapGui); currentContext.ModelManager = _modelManager = new ModelManager(tabPageModel); currentContext.ActionsManager = _actionsManager = new ActionsManager(_actionsData, noTearFlowLayoutPanelActions, tabPageActions); currentContext.WaterManager = _waterManager = new WaterManager(_waterData, noTearFlowLayoutPanelWater); currentContext.InputManager = _inputManager = new InputManager(_inputData, tabPageInput, NoTearFlowLayoutPanelInput, _inputImageGui); currentContext.MarioManager = _marioManager = new MarioManager(_marioData, tabPageMario, NoTearFlowLayoutPanelMario, _mapManager); currentContext.HudManager = _hudManager = new HudManager(_hudData, tabPageHud, NoTearFlowLayoutPanelHud); currentContext.MiscManager = _miscManager = new MiscManager(_miscData, NoTearFlowLayoutPanelMisc, tabPageMisc); currentContext.CameraManager = _cameraManager = new CameraManager(_cameraData, tabPageCamera, NoTearFlowLayoutPanelCamera); currentContext.TriangleManager = _triangleManager = new TriangleManager(tabPageTriangles, _triangleData, NoTearFlowLayoutPanelTriangles); currentContext.DebugManager = _debugManager = new DebugManager(_debugData, tabPageDebug, noTearFlowLayoutPanelDebug); currentContext.PuManager = _puManager = new PuManager(groupBoxPuController); currentContext.FileManager = _fileManager = new FileManager(_fileData, tabPageFile, noTearFlowLayoutPanelFile, _fileImageGui); currentContext.QuarterFrameManager = _quarterFrameManager = new DataManager(_quarterFrameData, noTearFlowLayoutPanelQuarterFrame); currentContext.CameraHackManager = _cameraHackManager = new CamHackManager(_camHackData, tabPageCamHack, noTearFlowLayoutPanelCamHack); currentContext.ObjectManager = _objectManager = new ObjectManager(_objectData, tabPageObjects, NoTearFlowLayoutPanelObject); currentContext.OptionsManager = _optionsManager = new OptionsManager(tabPageOptions); currentContext.TestingManager = _testingManager = new TestingManager(tabPageTesting); // Create Object Slots _slotManagerGui.TabControl = tabControlMain; _slotManagerGui.LockLabelsCheckbox = checkBoxObjLockLabels; _slotManagerGui.FlowLayoutContainer = NoTearFlowLayoutPanelObjects; _slotManagerGui.SortMethodComboBox = comboBoxSortMethod; _slotManagerGui.LabelMethodComboBox = comboBoxLabelMethod; currentContext.ObjectSlotManager = _objectSlotManager = new ObjectSlotsManager(_objectManager, _slotManagerGui, _mapManager, _miscManager, _modelManager, tabControlMain); SetupViews(); _resizing = false; labelVersionNumber.Text = _version; // Collect garbage, we are fully loaded now! GC.Collect(); GC.WaitForPendingFinalizers(); // Load process buttonRefresh_Click(this, new EventArgs()); panelConnect.Location = new Point(); panelConnect.Size = this.Size; }
void Start() { mapg = Camera.mainCamera.GetComponent<MapGui>(); countdown = 0; }
private void StroopMainForm_Load(object sender, EventArgs e) { // Temp: Remove "Other" tab #if RELEASE tabControlMain.TabPages.Remove(tabPageExpressions); #endif _sm64Stream = new ProcessStream(); _sm64Stream.OnUpdate += OnUpdate; _disManager = new DisassemblyManager(this, richTextBoxDissasembly, maskedTextBoxDisStart, _sm64Stream, buttonDisGo); _scriptManager = new ScriptManager(_sm64Stream, _scriptParser, checkBoxUseRomHack); _hackManager = new HackManager(_sm64Stream, _romHacks, checkedListBoxHacks); // Create map manager MapGui mapGui = new MapGui(); mapGui.GLControl = glControlMap; mapGui.MapIdLabel = labelMapId; mapGui.MapNameLabel = labelMapName; mapGui.MapSubNameLabel = labelMapSubName; mapGui.PuValueLabel = labelMapPuValue; mapGui.QpuValueLabel = labelMapQpuValue; mapGui.MapIconSizeTrackbar = trackBarMapIconSize; mapGui.MapZoomTrackbar = trackBarMapZoom; mapGui.MapShowInactiveObjects = checkBoxMapShowInactive; mapGui.MapShowMario = checkBoxMapShowMario; mapGui.MapShowObjects = checkBoxMapShowObj; mapGui.MapShowHolp = checkBoxMapShowHolp; mapGui.MapShowCamera = checkBoxMapShowCamera; mapGui.MapShowFloorTriangle = checkBoxMapShowFloor; _mapManager = new MapManager(_sm64Stream, _mapAssoc, _objectAssoc, mapGui); _marioManager = new MarioManager(_sm64Stream, _marioData, panelMarioBorder, flowLayoutPanelMario, _mapManager); _hudManager = new HudManager(_sm64Stream, _hudData, tabPageHud); _miscManager = new MiscManager(_sm64Stream, _miscData, flowLayoutPanelMisc, groupBoxPuController); _cameraManager = new CameraManager(_sm64Stream, _cameraData, panelCameraBorder, flowLayoutPanelCamera); _triangleManager = new TriangleManager(_sm64Stream, tabPageTriangles, _triangleData); _debugManager = new DebugManager(); // Create object manager var objectGui = new ObjectDataGui() { ObjectBorderPanel = panelObjectBorder, ObjectFlowLayout = flowLayoutPanelObject, ObjectImagePictureBox = pictureBoxObject, ObjAddressLabelValue = labelObjAddValue, ObjAddressLabel = labelObjAdd, ObjBehaviorLabel = labelObjBhvValue, ObjectNameTextBox = textBoxObjName, ObjSlotIndexLabel = labelObjSlotIndValue, ObjSlotPositionLabel = labelObjSlotPosValue, CloneButton = buttonObjClone, MoveMarioToButton = buttonObjGoTo, MoveToMarioButton = buttonObjRetrieve, UnloadButton = buttonObjUnload }; _objectManager = new ObjectManager(_sm64Stream, _objectAssoc, _objectData, objectGui); // Create options manager var optionGui = new OptionsGui(); optionGui.CheckBoxStartFromOne = checkBoxStartSlotIndexOne; _optionsManager = new OptionsManager(optionGui); // Create Object Slots _slotManagerGui.TabControl = tabControlMain; _slotManagerGui.LockLabelsCheckbox = checkBoxObjLockLabels; _slotManagerGui.MapObjectToggleModeComboBox = comboBoxMapToggleMode; _slotManagerGui.FlowLayoutContainer = flowLayoutPanelObjects; _slotManagerGui.SortMethodComboBox = comboBoxSortMethod; _slotManagerGui.LabelMethodComboBox = comboBoxLabelMethod; _objectSlotManager = new ObjectSlotsManager(_sm64Stream, _objectAssoc, _objectManager, _slotManagerGui, _mapManager, _miscManager); SetupViews(); _resizing = false; _defaultSplitValue = splitContainerMain.SplitterDistance; labelVersionNumber.Text = _version; // Load process var processes = GetAvailableProcesses(); if (processes.Count == 1) { if (MessageBox.Show(String.Format("Found process \"{0}\". Connect?", processes[0].ProcessName), "Process Found", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { var processSelect = new ProcessSelection(processes[0]); comboBoxProcessSelection.Items.Add(processSelect); comboBoxProcessSelection.SelectedIndex = 0; } } }
private void StroopMainForm_Load(object sender, EventArgs e) { Config.Stream = new ProcessStream(); Config.Stream.OnUpdate += OnUpdate; Config.Stream.FpsUpdated += _sm64Stream_FpsUpdated; Config.Stream.OnDisconnect += _sm64Stream_OnDisconnect; Config.Stream.WarnReadonlyOff += _sm64Stream_WarnReadonlyOff; Config.Stream.OnClose += _sm64Stream_OnClose; Config.StroopMainForm = this; Config.DisassemblyManager = new DisassemblyManager(tabPageDisassembly); Config.DecompilerManager = new DecompilerManager(tabPageDecompiler); Config.InjectionManager = new InjectionManager(_scriptParser, checkBoxUseRomHack); Config.HackManager = new HackManager(_romHacks, Config.ObjectAssociations.SpawnHacks, tabPageHacks); // Create map manager MapGui mapGui = new MapGui(); mapGui.GLControl = glControlMap; mapGui.MapIdLabel = labelMapId; mapGui.MapNameLabel = labelMapName; mapGui.MapSubNameLabel = labelMapSubName; mapGui.PuValueLabel = labelMapPuValue; mapGui.QpuValueLabel = labelMapQpuValue; mapGui.MapIconSizeTrackbar = trackBarMapIconSize; mapGui.MapZoomTrackbar = trackBarMapZoom; mapGui.MapShowInactiveObjects = checkBoxMapShowInactive; mapGui.MapShowMario = checkBoxMapShowMario; mapGui.MapShowHolp = checkBoxMapShowHolp; mapGui.MapShowIntendedNextPosition = checkBoxMapShowIntendedNextPosition; mapGui.MapShowCamera = checkBoxMapShowCamera; mapGui.MapShowFloorTriangle = checkBoxMapShowFloor; mapGui.MapShowCeilingTriangle = checkBoxMapShowCeiling; mapGui.MapBoundsUpButton = buttonMapBoundsUp; mapGui.MapBoundsDownButton = buttonMapBoundsDown; mapGui.MapBoundsLeftButton = buttonMapBoundsLeft; mapGui.MapBoundsRightButton = buttonMapBoundsRight; mapGui.MapBoundsUpLeftButton = buttonMapBoundsUpLeft; mapGui.MapBoundsUpRightButton = buttonMapBoundsUpRight; mapGui.MapBoundsDownLeftButton = buttonMapBoundsDownLeft; mapGui.MapBoundsDownRightButton = buttonMapBoundsDownRight; mapGui.MapBoundsPositionTextBox = textBoxMapBoundsPosition; mapGui.MapBoundsZoomInButton = buttonMapBoundsZoomIn; mapGui.MapBoundsZoomOutButton = buttonMapBoundsZoomOut; mapGui.MapBoundsZoomTextBox = textBoxMapBoundsZoom; mapGui.MapArtificialMarioYLabelTextBox = textBoxMapArtificialMarioYLabel; Config.MapManager = new MapManager(_mapAssoc, mapGui); Config.ModelManager = new ModelManager(tabPageModel); Config.ActionsManager = new ActionsManager(_actionsData, watchVariablePanelActions, tabPageActions); Config.WaterManager = new WaterManager(_waterData, watchVariablePanelWater); Config.InputManager = new InputManager(_inputData, tabPageInput, watchVariablePanelInput, _inputImageGui); Config.MarioManager = new MarioManager(_marioData, tabPageMario, WatchVariablePanelMario); Config.HudManager = new HudManager(_hudData, tabPageHud, watchVariablePanelHud); Config.MiscManager = new MiscManager(_miscData, watchVariablePanelMisc, tabPageMisc); Config.CameraManager = new CameraManager(_cameraData, tabPageCamera, watchVariablePanelCamera); Config.TriangleManager = new TriangleManager(tabPageTriangles, _triangleData, watchVariablePanelTriangles); Config.DebugManager = new DebugManager(_debugData, tabPageDebug, watchVariablePanelDebug); Config.PuManager = new PuManager(groupBoxPuController); Config.FileManager = new FileManager(_fileData, tabPageFile, watchVariablePanelFile, _fileImageGui); Config.AreaManager = new AreaManager(tabPageArea, _areaData, watchVariablePanelArea); Config.QuarterFrameManager = new DataManager(_quarterFrameData, watchVariablePanelQuarterFrame); Config.CustomManager = new CustomManager(_watchVarControlList, tabPageCustom, watchVariablePanelCustom); Config.VarHackManager = new VarHackManager(tabPageVarHack, varHackPanel); Config.CameraHackManager = new CamHackManager(_camHackData, tabPageCamHack, watchVariablePanelCamHack); Config.ObjectManager = new ObjectManager(_objectData, tabPageObjects, WatchVariablePanelObject); Config.OptionsManager = new OptionsManager(tabPageOptions); Config.TestingManager = new TestingManager(tabPageTesting); Config.ScriptManager = new ScriptManager(tabPageScripts); // Create Object Slots _slotManagerGui.TabControl = tabControlMain; _slotManagerGui.LockLabelsCheckbox = checkBoxObjLockLabels; _slotManagerGui.FlowLayoutContainer = WatchVariablePanelObjects; _slotManagerGui.SortMethodComboBox = comboBoxSortMethod; _slotManagerGui.LabelMethodComboBox = comboBoxLabelMethod; Config.ObjectSlotsManager = new ObjectSlotsManager(_slotManagerGui, tabControlMain); SetupViews(); _resizing = false; labelVersionNumber.Text = _version; // Collect garbage, we are fully loaded now! GC.Collect(); GC.WaitForPendingFinalizers(); // Load process buttonRefresh_Click(this, new EventArgs()); panelConnect.Location = new Point(); panelConnect.Size = this.Size; }