void Awake() { LevelIndex = Application.loadedLevel; instance = this; if (controlsManager == null) { GameObject newCM = new GameObject("Control_Manager"); controlsManager = newCM.AddComponent<ControlsManager>(); newCM.transform.SetParent(this.transform); } // GET THE SCORE MANAGER // if (scoreManager == null) { GameObject newScM = new GameObject("Score_Manager"); scoreManager = newScM.AddComponent<ScoreManager>(); newScM.transform.SetParent(this.transform); } // LETS SETUP A SCENE // if (sceneManager == null) { GameObject newSM = new GameObject("Scene_Manager"); sceneManager = newSM.AddComponent<SceneManager>(); newSM.transform.SetParent(this.transform); } // link the debugger // GameObject dbg = GameObject.Find ("Debugger"); debugger = dbg.GetComponent<Debugger> (); }
protected void LogError(object message, Debugger.LogTypes logType = Debugger.LogTypes.Default, bool save = true) { if (log) { Debugger.LogError(message, gameObject, logType, save); } }
public override Program Load(Address addrLoad) { // First load the file as a PE Executable. This gives us a (writeable) image and // the packed entry point. var pe = CreatePeImageLoader(); var program = pe.Load(pe.PreferredBaseAddress); var rr = pe.Relocate(pe.PreferredBaseAddress); this.Image = program.Image; this.ImageMap = program.ImageMap; this.Architecture = (IntelArchitecture)program.Architecture; var win32 = new Win32Emulator(program.Image, program.Platform, program.ImportReferences); var state = (X86State)program.Architecture.CreateProcessorState(); var emu = new X86Emulator((IntelArchitecture) program.Architecture, program.Image, win32); this.debugger = new Debugger(emu); this.scriptInterpreter = new OllyLang(); this.scriptInterpreter.Host = new Host(this); this.scriptInterpreter.Debugger = this.debugger; emu.InstructionPointer = rr.EntryPoints[0].Address; emu.WriteRegister(Registers.esp, (uint)Image.BaseAddress.ToLinear() + 0x1000 - 4u); emu.BeforeStart += emu_BeforeStart; emu.ExceptionRaised += emu_ExceptionRaised; // Load the script. LoadScript(Argument, scriptInterpreter.script); emu.Start(); foreach (var ic in win32.InterceptedCalls) { program.InterceptedCalls.Add(Address.Ptr32(ic.Key), ic.Value); } return program; }
public DebugInspector( Debugger debugger ) { Debug.Assert( debugger != null ); if( debugger == null ) throw new ArgumentNullException( "debugger" ); _debugger = debugger; }
public Debugger(ProcessStartInfo info, bool breakInMain) { Contract.Requires(info != null, "info is null"); ActiveObjects.Add(this); m_thread = new DebuggerThread(this, breakInMain); Boss boss = ObjectModel.Create("Application"); m_transcript = boss.Get<ITranscript>(); StepBy = StepSize.Line; var options = new LaunchOptions(); // options.AgentArgs = "loglevel=1,logfile='/Users/jessejones/Source/Continuum/sdb.log'"; // We do this lame assignment to a static so that OnLaunched can be made a static // method. Mono 2.6.7 doesn't GC asynchronously invoked delegates in a timely fashion // (tho it does appear to collect them if more than ten stack up). ms_debugger = this; Unused.Value = VirtualMachineManager.BeginLaunch(info, Debugger.OnLaunched, options); Broadcaster.Register("added breakpoint", this); Broadcaster.Register("removing breakpoint", this); Broadcaster.Register("toggled exceptions", this); ms_running = true; }
public RegistersPanel(Debugger debugger, RegisterClass registerClass) { InitializeComponent(); this.debugger = debugger; this.registerClass = registerClass; switch (registerClass) { case RegisterClass.GuestGeneralPurpose: this.Text = "GPR"; break; case RegisterClass.GuestFloatingPoint: this.Text = "FPR"; break; case RegisterClass.GuestVector: this.Text = "VR"; break; case RegisterClass.HostGeneralPurpose: this.Text = "x64"; break; case RegisterClass.HostAvx: this.Text = "AVX"; break; default: System.Diagnostics.Debug.Fail("Unhandled case: " + registerClass); break; } }
internal ThreadManager(Debugger debugger) { this.debugger = debugger; thread_hash = Hashtable.Synchronized (new Hashtable ()); engine_hash = Hashtable.Synchronized (new Hashtable ()); processes = ArrayList.Synchronized (new ArrayList ()); pending_events = Hashtable.Synchronized (new Hashtable ()); last_pending_sigstop = DateTime.Now; pending_sigstops = new Dictionary<int,DateTime> (); address_domain = AddressDomain.Global; wait_event = new ST.AutoResetEvent (false); engine_event = new ST.ManualResetEvent (true); ready_event = new ST.ManualResetEvent (false); event_queue = new DebuggerEventQueue ("event_queue"); event_queue.DebugFlags = DebugFlags.Wait; mono_debugger_server_global_init (); wait_thread = new ST.Thread (new ST.ThreadStart (start_wait_thread)); wait_thread.IsBackground = true; wait_thread.Start (); inferior_thread = new ST.Thread (new ST.ThreadStart (start_inferior)); inferior_thread.IsBackground = true; inferior_thread.Start (); ready_event.WaitOne (); }
public Eval(Debugger debugger, IAppDomain appDomain, DBG.DnEval eval) { if (appDomain == null) throw new InvalidOperationException("The thread has no owner AppDomain and can't be used to evaluate funcs"); this.debugger = debugger; this.appDomain = appDomain; this.eval = eval; this.eval.SetNoTotalTimeout(); }
public ILBreakpoint(Debugger debugger, ModuleId module, uint token, uint offset, Func<IILBreakpoint, bool> cond) { this.debugger = debugger; Module = module; Token = token; Offset = offset; this.cond = cond ?? condAlwaysTrue; isEnabled = true; }
public ThreadsPanel(Debugger debugger) { InitializeComponent(); this.debugger = debugger; debugger.ThreadList.Changed += UpdateThreadList; UpdateThreadList(debugger.ThreadList); }
public ModulesPanel(Debugger debugger) { InitializeComponent(); this.debugger = debugger; debugger.ModuleList.Changed += UpdateModulesList; UpdateModulesList(debugger.ModuleList); }
public BreakpointsPanel(Debugger debugger) { InitializeComponent(); this.debugger = debugger; debugger.BreakpointList.Changed += UpdateBreakpointsList; UpdateBreakpointsList(debugger.BreakpointList); }
/// <summary> /// Constructor /// </summary> public MainWindow() { List<SolidColorBrush> colorsList = ((Array)FindResource("Colors")).Cast<SolidColorBrush>().ToList(); List<BitmapImage> iconList = ((Array)FindResource("Icons")).Cast<BitmapImage>().ToList(); InitializeComponent(); confi = new Configuration(iconList,colorsList); Debugger d = new Debugger(Debugger.ENVIORMENT.DEVELOPMENT); //Debugger d = new Debugger(Debugger.ENVIORMENT.PRODUCTION); }
/// <summary> /// Initializes a new instance of the <see cref="GraphicalWatchControl"/> class. /// </summary> public GraphicalWatchControl() { this.InitializeComponent(); m_dte = (DTE2)ServiceProvider.GlobalProvider.GetService(typeof(DTE)); m_debugger = m_dte.Debugger; m_debuggerEvents = m_dte.Events.DebuggerEvents; m_debuggerEvents.OnEnterBreakMode += DebuggerEvents_OnEnterBreakMode; }
public static ICorPublishProcess Wrap(Debugger.Interop.CorPub.ICorPublishProcess objectToWrap) { if ((objectToWrap != null)) { return new ICorPublishProcess(objectToWrap); } else { return null; } }
public FunctionsPanel(Debugger debugger) { InitializeComponent(); this.debugger = debugger; RefreshFunctionList(); debugger.ModuleList.Changed += UpdateModulesList; UpdateModulesList(debugger.ModuleList); }
/// <summary> /// Creates a Command line interface for the specified debugger. /// </summary> /// <param name="debugger"></param> public Cli(Debugger debugger) { if (debugger == null) throw new ArgumentNullException("debugger"); Debugger = debugger; Debugger.ExecutionInterrupt += new ExecutionInterruptHandler(ExecutionInterrupted); Done = new AutoResetEvent(false); SourceFatcher = new SourceFatcher(); }
public static ObjectValue Create(Debugger.Value value, int index, Dictionary<string, MemberInfo> memberFromName) { ObjectValue result = new ObjectValue(index, memberFromName); // remember PermanentReference for expanding IEnumerable Value permanentReference = value.GetPermanentReference(); result.PermanentReference = permanentReference; return result; }
public DebuggerType(Debugger debugger, CorType type, uint token = 0) { debugger.Dispatcher.VerifyAccess(); this.debugger = debugger; this.type = type; this.hashCode = type.GetHashCode(); this.elementType = (CorElementType)type.ElementType; this.attributes = type.GetTypeAttributes(); this.token = token; this.tokenInitd = token != 0; }
public DebuggerModule(Debugger debugger, DnModule mod) { debugger.Dispatcher.VerifyAccess(); this.debugger = debugger; this.mod = mod; hashCode = mod.GetHashCode(); uniqueId = mod.UniqueId; name = mod.Name; address = mod.Address; size = mod.Size; var moduleId = mod.DnModuleId; this.moduleId = new ModuleId(moduleId.AssemblyFullName, moduleId.ModuleName, moduleId.IsDynamic, moduleId.IsInMemory, moduleId.ModuleNameOnly); }
// public delegate void AddTagInformation(string tagname); // public void AddTagInfo(string tagname) // { // dataGridView1.Rows.Add(); // dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0].Value = tagname; // dataGridView1.Rows[dataGridView1.RowCount - 1].DefaultCellStyle.BackColor = Color.Green; // Sectors.Clear(); // } private void loadToolStripMenuItem_Click(object sender, EventArgs e) { toolStripComboBox1.Items.Clear(); dataGridView1.Rows.Clear(); Debugger deb = new Debugger(); Blocks.ReloadBlocks(); string dir = @"E:\Users\root\Documents\Sunfish 2011\Projects\headlong2\bin"; string[] paths = Directory.GetFiles(dir, "*.map"); List<Header> Headers = new List<Header>(); Debug debug = new Debug(DoShit); foreach (string path in paths) { FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.ReadWrite, 512, FileOptions.SequentialScan); map = new Map(file); if (map.Header.Type == Sunfish.Header.MapType.Multiplayer) { for (tagIndex = 0; tagIndex < map.Index.TagInfoCount; tagIndex++) { deb.DebugTag(tagIndex, map); } } List<string> shit = new List<string>(); List<Sunfish.ValueTypes.StringId> nigg = new List<Sunfish.ValueTypes.StringId>(); List<int> f**k = new List<int>(); foreach (string s in map.StringIdNames) { if (!deb.Strings.Contains(s)) { shit.Add(s); Sunfish.ValueTypes.StringId sf = new Sunfish.ValueTypes.StringId() { Index = (short)map.StringIdNames.IndexOf(s), Length = (sbyte)Encoding.UTF8.GetByteCount(s) }; nigg.Add(sf); f**k.Add((int)sf); } } int findAddress = 29814640; for (tagIndex = 0; tagIndex < map.Index.TagInfoCount; tagIndex++) { int offset, length; if (map.Index.TagEntries[tagIndex].Type == "sbsp" || map.Index.TagEntries[tagIndex].Type == "ltmp") { offset = map.Index.TagEntries[tagIndex].VirtualAddress - map.PrimaryMagic; length = map.Index.TagEntries[tagIndex].Length; } else { offset = map.Index.TagEntries[tagIndex].VirtualAddress - map.SecondaryMagic; length = map.Index.TagEntries[tagIndex].Length; } if (findAddress >= offset && findAddress < offset + length) { } } } }
public DebugControl( Debugger debugger ) { Debug.Assert( debugger != null ); if( debugger == null ) throw new ArgumentNullException( "debugger" ); _debugger = debugger; _breakpoints = new List<Breakpoint>(); _breakpointLookup = new Dictionary<int, Breakpoint>(); _cpu = _debugger.Host.CurrentInstance.Cpu; Debug.Assert( _cpu != null ); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); logTxt = GameObject.Find ("logTxt").GetComponent<Text>(); logBox = GameObject.Find ("logBox"); logBox.SetActive (false); }
public MainWindow() { InitializeComponent(); BasePanel.MainWindow = this; BaseDocument.MainWindow = this; dockPanel = new DockPanel(); dockPanel.Dock = System.Windows.Forms.DockStyle.Fill; dockPanel.DockBackColor = System.Drawing.SystemColors.AppWorkspace; dockPanel.DockBottomPortion = 200D; dockPanel.DockLeftPortion = 350D; dockPanel.Name = "dockPanel"; Controls.Add(dockPanel); Controls.SetChildIndex(dockPanel, 0); Debugger = new Debugger((AsyncTask task) => { BeginInvoke(task); }); breakpointsPanel = new BreakpointsPanel(Debugger); callstackPanel = new CallstackPanel(Debugger); codeDocuments.Add(new CodeDocument(Debugger)); filesystemPanel = new FilesystemPanel(Debugger); functionsPanel = new FunctionsPanel(Debugger); heapDocument = new HeapDocument(Debugger); memoryDocuments.Add(new MemoryDocument(Debugger)); modulesPanel = new ModulesPanel(Debugger); profilePanel = new ProfilePanel(Debugger); registersPanels.Add(new RegistersPanel(Debugger, RegisterClass.GuestGeneralPurpose)); registersPanels.Add(new RegistersPanel(Debugger, RegisterClass.GuestFloatingPoint)); registersPanels.Add(new RegistersPanel(Debugger, RegisterClass.GuestVector)); statisticsDocument = new StatisticsDocument(Debugger); threadsPanel = new ThreadsPanel(Debugger); tracePanel = new TracePanel(Debugger); // deserializeDockContent = // new DeserializeDockContent(GetContentFromPersistString); SetupDefaultLayout(); // For hotkeys. KeyPreview = true; Debugger.StateChanged += Debugger_StateChanged; Debugger_StateChanged(this, Debugger.CurrentState); Debugger.CurrentContext.Changed += CurrentContext_Changed; CurrentContext_Changed(Debugger.CurrentContext); Debugger.Attach(); }
/// <summary> /// Default ctor /// </summary> public DalvikProcess(Debugger debugger, MapFile mapFile, string apkPath) { ApkPath = apkPath; this.debugger = debugger; debugger.Process = this; this.mapFile = new MapFileLookup(mapFile); debugger.ConnectedChanged += OnDebuggerConnectionChanged; breakpointManager = new Lazy<DalvikBreakpointManager>(CreateBreakpointManager); exceptionManager = new Lazy<DalvikExceptionManager>(CreateExceptionManager); referenceTypeManager = new Lazy<DalvikReferenceTypeManager>(CreateReferenceTypeManager); threadManager = new Lazy<DalvikThreadManager>(CreateThreadManager); disassemblyProvider = new Lazy<DalvikDisassemblyProvider>(() => new DalvikDisassemblyProvider(this, ApkPath, this.mapFile)); }
protected void Log(Debugger.Level level, string format, params object[] args) { string time = System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss"); format = string.Format ("[{0}] [{1}] {2}", time, name, format); if (level == Debugger.Level.Trace) { Debugger.LogTraceFormat (format, args); } else if (level == Debugger.Level.Info) { Debugger.LogFormat (format, args); } else if (level == Debugger.Level.Warn) { Debugger.LogWarningFormat (format, args); } else if (level == Debugger.Level.Error) { Debugger.LogErrorFormat (format, args); } }
public Studio( Debugger debugger ) : this() { Debug.Assert( debugger != null ); if( debugger == null ) throw new ArgumentNullException( "debugger" ); _debugger = debugger; // Uses the nasty VB stuff DockPanel2005.VS2005Style.Extender.SetSchema( dockPanel, DockPanel2005.VS2005Style.Extender.Schema.FromBase ); _debugger.StateChanged += new EventHandler( DebuggerStateChanged ); _useHex = true; }
/// <summary> /// Initializes a new instance of the <see cref="GraphicalWatchControl"/> class. /// </summary> public GraphicalWatchControl() { m_dte = (DTE2)ServiceProvider.GlobalProvider.GetService(typeof(DTE)); m_debugger = m_dte.Debugger; m_debuggerEvents = m_dte.Events.DebuggerEvents; m_debuggerEvents.OnEnterBreakMode += DebuggerEvents_OnEnterBreakMode; VSColorTheme.ThemeChanged += VSColorTheme_ThemeChanged; m_colors = new Colors(this); Variables = new ObservableCollection<VariableItem>(); this.InitializeComponent(); dataGrid.ItemsSource = Variables; ResetAt(new VariableItem(), Variables.Count); }
public Motherboard(VirtualMachine virtualMachine, TextDisplay textDisplay) { display = textDisplay; debugger = new Debugger(virtualMachine); random = new Random(); timers = new Timer[4]; for (var i = 0; i < timers.Length; i++) { timers[i] = new Timer(); } originalPalette = new Color[256]; for (var i = 0; i < originalPalette.Length; i++) { originalPalette[i] = display.PaletteGet((byte)i); } }
public void Should_record_select_operator() { var list = new List<DebugNotification>(); var debugger = new Debugger(_scheduler, list.Add); var timer = Observable.Interval(TimeSpan.FromSeconds(1), _scheduler) .Take(5) .EnableDebugging("timer", debugger) .Select(i => i.ToString()); using (timer.Subscribe()) { _scheduler.AdvanceBy(TimeSpan.FromSeconds(5).Ticks); Assert.Equal(12, list.Count); Assert.Equal(6, list.Where(n => n.SourceName.EndsWith("timer")).Count()); Assert.Equal(1, list.Where(n => n.SourceName.EndsWith("timer") && n.Notification.Kind == NotificationKind.OnCompleted).Count()); Assert.Equal(6, list.Where(n => n.SourceName.EndsWith("timer.Select")).Count()); Assert.Equal(1, list.Where(n => n.SourceName.EndsWith("timer.Select") && n.Notification.Kind == NotificationKind.OnCompleted).Count()); } }
private void ShellWinProc(Message msg) { if (msg.Msg == WM_SHELLHOOKMESSAGE) { try { var win = new ApplicationWindow(msg.LParam, this); lock (this._windowsLock) { switch (msg.WParam.ToInt32()) { case HSHELL_WINDOWCREATED: Trace.WriteLine("Created: " + msg.LParam.ToString()); addWindow(win); break; case HSHELL_WINDOWDESTROYED: Trace.WriteLine("Destroyed: " + msg.LParam.ToString()); removeWindow(win); break; case HSHELL_WINDOWREPLACING: Trace.WriteLine("Replacing: " + msg.LParam.ToString()); if (this.Windows.Contains(win)) { win = this.Windows.First(wnd => wnd.Handle == msg.LParam); win.State = ApplicationWindow.WindowState.Inactive; win.OnPropertyChanged("ShowInTaskbar"); } else { win.State = ApplicationWindow.WindowState.Inactive; addWindow(win); } break; case HSHELL_WINDOWREPLACED: Trace.WriteLine("Replaced: " + msg.LParam.ToString()); removeWindow(win); break; case HSHELL_WINDOWACTIVATED: Trace.WriteLine("Activated: " + msg.LParam.ToString()); foreach (var aWin in this.Windows.Where(w => w.State == ApplicationWindow.WindowState.Active)) { aWin.State = ApplicationWindow.WindowState.Inactive; } if (msg.LParam != IntPtr.Zero) { if (this.Windows.Contains(win)) { win = this.Windows.First(wnd => wnd.Handle == msg.LParam); win.State = ApplicationWindow.WindowState.Active; win.OnPropertyChanged("ShowInTaskbar"); } else { win.State = ApplicationWindow.WindowState.Active; addWindow(win); } foreach (ApplicationWindow wind in this.Windows) { if (wind.WinFileName == win.WinFileName) { wind.OnPropertyChanged("ShowInTaskbar"); } } } break; case HSHELL_RUDEAPPACTIVATED: Trace.WriteLine("Activated: " + msg.LParam.ToString()); foreach (var aWin in this.Windows.Where(w => w.State == ApplicationWindow.WindowState.Active)) { aWin.State = ApplicationWindow.WindowState.Inactive; } if (msg.LParam != IntPtr.Zero) { if (this.Windows.Contains(win)) { win = this.Windows.First(wnd => wnd.Handle == msg.LParam); win.State = ApplicationWindow.WindowState.Active; win.OnPropertyChanged("ShowInTaskbar"); } else { win.State = ApplicationWindow.WindowState.Active; addWindow(win); } foreach (ApplicationWindow wind in this.Windows) { if (wind.WinFileName == win.WinFileName) { wind.OnPropertyChanged("ShowInTaskbar"); } } } break; case HSHELL_FLASH: Trace.WriteLine("Flashing window: " + msg.LParam.ToString()); if (this.Windows.Contains(win)) { win = this.Windows.First(wnd => wnd.Handle == msg.LParam); win.State = ApplicationWindow.WindowState.Flashing; } else { win.State = ApplicationWindow.WindowState.Flashing; addWindow(win); } break; case HSHELL_ACTIVATESHELLWINDOW: Trace.WriteLine("Activate shell window called."); break; case HSHELL_ENDTASK: Trace.WriteLine("EndTask called: " + msg.LParam.ToString()); removeWindow(win); break; case HSHELL_GETMINRECT: Trace.WriteLine("GetMinRect called: " + msg.LParam.ToString()); NativeMethods.SHELLHOOKINFO winHandle = (NativeMethods.SHELLHOOKINFO)Marshal.PtrToStructure(msg.LParam, typeof(NativeMethods.SHELLHOOKINFO)); winHandle.rc = new NativeMethods.RECT { bottom = 100, left = 0, right = 100, top = 0 }; Marshal.StructureToPtr(winHandle, msg.LParam, true); msg.Result = winHandle.hwnd; break; case HSHELL_REDRAW: Trace.WriteLine("Redraw called: " + msg.LParam.ToString()); if (this.Windows.Contains(win)) { win = this.Windows.First(wnd => wnd.Handle == msg.LParam); win.OnPropertyChanged("ShowInTaskbar"); win.OnPropertyChanged("Title"); win.OnPropertyChanged("Icon"); foreach (ApplicationWindow wind in this.Windows) { if (wind.WinFileName == win.WinFileName) { wind.OnPropertyChanged("ShowInTaskbar"); win.OnPropertyChanged("Title"); win.OnPropertyChanged("Icon"); } } } break; // TaskMan needs to return true if we provide our own task manager to prevent explorers. // case HSHELL_TASKMAN: // Trace.WriteLine("TaskMan Message received."); // break; default: Trace.WriteLine("Unknown called: " + msg.LParam.ToString() + " Message " + msg.Msg.ToString()); if (this.Windows.Contains(win)) { win = this.Windows.First(wnd => wnd.Handle == msg.LParam); win.OnPropertyChanged("ShowInTaskbar"); win.OnPropertyChanged("Title"); win.OnPropertyChanged("Icon"); } break; } } } catch (Exception ex) { Trace.WriteLine("Exception: " + ex.ToString()); Debugger.Break(); } } }
public void ExtractHeroConvos(ICLIFlags toolFlags) { string basePath; if (toolFlags is ExtractFlags flags) { basePath = flags.OutputPath; } else { throw new Exception("no output path"); } if (flags.Positionals.Length < 4) { QueryHelp(QueryTypes); return; } string path = Path.Combine(basePath, Container); Dictionary <string, Dictionary <string, ParsedArg> > parsedTypes = ParseQuery(flags, QueryTypes, QueryNameOverrides); if (parsedTypes == null) { return; } Dictionary <ulong, VoiceSet> allVoiceSets = new Dictionary <ulong, VoiceSet>(); foreach (var voiceSetGUID in Program.TrackedFiles[0x5F]) { STUVoiceSet set = GetInstance <STUVoiceSet>(voiceSetGUID); if (set?.m_voiceLineInstances == null) { continue; } allVoiceSets[voiceSetGUID] = new VoiceSet(set); } // Dictionary<uint, string> mapNames = new Dictionary<uint, string>(); // foreach (ulong mapGuid in Program.TrackedFiles[0x9F]) { // STUMapHeader mapHeader = GetInstance<STUMapHeader>(mapGuid); // if (mapHeader == null) continue; // // mapNames[teResourceGUID.Index(mapGuid)] = GetValidFilename(GetString(mapHeader.m_1C706502) ?? GetString(mapHeader.m_displayName)); // } Combo.ComboInfo comboInfo = new Combo.ComboInfo(); var comboSaveContext = new SaveLogic.Combo.SaveContext(comboInfo); foreach (ulong heroGuid in Program.TrackedFiles[0x75]) { STUHero hero = GetInstance <STUHero>(heroGuid); if (hero == null) { continue; } STUVoiceSetComponent voiceSetComponent = GetInstance <STUVoiceSetComponent>(hero.m_gameplayEntity); if (voiceSetComponent?.m_voiceDefinition == null || !allVoiceSets.TryGetValue(voiceSetComponent.m_voiceDefinition, out var set)) { Debugger.Log(0, "DataTool.SaveLogic.Unlock.VoiceLine", "[DataTool.SaveLogic.Unlock.VoiceLine]: VoiceSet not found\r\n"); continue; } string heroNameActual = (GetString(hero.m_0EDCE350) ?? $"Unknown{teResourceGUID.Index(heroGuid)}").TrimEnd(' '); Dictionary <string, ParsedArg> config = GetQuery(parsedTypes, heroNameActual.ToLowerInvariant(), "*", teResourceGUID.Index(heroGuid).ToString("X")); if (config.Count == 0) { continue; } Log($"Processing data for {heroNameActual}"); heroNameActual = GetValidFilename(heroNameActual); foreach (VoiceLineInstance lineInstance in set.VoiceLines.Values) { // if (lineInstance.STU.m_voiceLineRuntime.m_4FF98D41 != null) { // var cond = lineInstance.STU.m_voiceLineRuntime.m_4FF98D41; // // HandleCondition(flags, comboInfo, lineInstance, path, heroNameActual, cond, mapNames); // } if (lineInstance.VoiceConversation == 0) { continue; } STUVoiceConversation conversation = GetInstance <STUVoiceConversation>(lineInstance.VoiceConversation); if (conversation == null) { continue; // wtf, blizz pls } string convoDir = Path.Combine(path, heroNameActual, GetFileName(lineInstance.VoiceConversation)); foreach (STUVoiceConversationLine line in conversation.m_90D76F17) { string linePath = Path.Combine(convoDir, line.m_B4D405A1.ToString()); foreach (VoiceSet voiceSet in allVoiceSets.Values) { if (voiceSet.VoiceLines.ContainsKey(line.m_E295B99C)) { VoiceLine.SaveVoiceLine(flags, voiceSet.VoiceLines[line.m_E295B99C], linePath, comboSaveContext); } } } } } comboSaveContext.Wait(); }
public static void ConnectServer(this TCPClient tcpClient, string ip, int port) { Debugger.Log("Connect to server " + ip + ":" + port, true); ((PBChannel)tcpClient.Channel).Rc4Key = key; tcpClient.Connect(ip, port); }
public static void Bind(LuaState L) { float t = Time.realtimeSinceStartup; L.BeginModule(null); LuaInterface_DebuggerWrap.Register(L); LuaProfilerWrap.Register(L); LerpControlledBobWrap.Register(L); CurveControlledBobWrap.Register(L); MouseLookWrap.Register(L); FOVKickWrap.Register(L); ViewWrap.Register(L); BaseWrap.Register(L); ManagerWrap.Register(L); L.BeginModule("UnityEngine"); UnityEngine_Collision2DWrap.Register(L); UnityEngine_CollisionFlagsWrap.Register(L); UnityEngine_AnimationCurveWrap.Register(L); UnityEngine_QueryTriggerInteractionWrap.Register(L); UnityEngine_TerrainColliderWrap.Register(L); UnityEngine_RenderModeWrap.Register(L); UnityEngine_ComponentWrap.Register(L); UnityEngine_TransformWrap.Register(L); UnityEngine_MaterialWrap.Register(L); UnityEngine_LightWrap.Register(L); UnityEngine_CameraWrap.Register(L); UnityEngine_AudioSourceWrap.Register(L); UnityEngine_BehaviourWrap.Register(L); UnityEngine_MonoBehaviourWrap.Register(L); UnityEngine_GameObjectWrap.Register(L); UnityEngine_TrackedReferenceWrap.Register(L); UnityEngine_ApplicationWrap.Register(L); UnityEngine_PhysicsWrap.Register(L); UnityEngine_ColliderWrap.Register(L); UnityEngine_TimeWrap.Register(L); UnityEngine_TextureWrap.Register(L); UnityEngine_Texture2DWrap.Register(L); UnityEngine_ShaderWrap.Register(L); UnityEngine_RendererWrap.Register(L); UnityEngine_WWWWrap.Register(L); UnityEngine_ScreenWrap.Register(L); UnityEngine_CameraClearFlagsWrap.Register(L); UnityEngine_AudioClipWrap.Register(L); UnityEngine_AssetBundleWrap.Register(L); UnityEngine_ParticleSystemWrap.Register(L); UnityEngine_AsyncOperationWrap.Register(L); UnityEngine_LightTypeWrap.Register(L); UnityEngine_SleepTimeoutWrap.Register(L); UnityEngine_AnimatorWrap.Register(L); UnityEngine_InputWrap.Register(L); UnityEngine_KeyCodeWrap.Register(L); UnityEngine_SkinnedMeshRendererWrap.Register(L); UnityEngine_SpaceWrap.Register(L); UnityEngine_AnimationBlendModeWrap.Register(L); UnityEngine_QueueModeWrap.Register(L); UnityEngine_PlayModeWrap.Register(L); UnityEngine_WrapModeWrap.Register(L); UnityEngine_QualitySettingsWrap.Register(L); UnityEngine_RenderSettingsWrap.Register(L); UnityEngine_ResourcesWrap.Register(L); UnityEngine_RectTransformWrap.Register(L); UnityEngine_ThreadPriorityWrap.Register(L); L.BeginModule("SceneManagement"); UnityEngine_SceneManagement_SceneManagerWrap.Register(L); L.EndModule(); L.BeginModule("Playables"); UnityEngine_Playables_PlayableWrap.Register(L); L.EndModule(); L.BeginModule("UI"); UnityEngine_UI_TextWrap.Register(L); UnityEngine_UI_MaskableGraphicWrap.Register(L); UnityEngine_UI_GraphicWrap.Register(L); L.EndModule(); L.BeginModule("EventSystems"); UnityEngine_EventSystems_UIBehaviourWrap.Register(L); L.EndModule(); L.BeginModule("Events"); L.RegFunction("UnityAction", UnityEngine_Events_UnityAction); L.RegFunction("UnityAction_UnityEngine_SceneManagement_Scene_UnityEngine_SceneManagement_LoadSceneMode", UnityEngine_Events_UnityAction_UnityEngine_SceneManagement_Scene_UnityEngine_SceneManagement_LoadSceneMode); L.RegFunction("UnityAction_UnityEngine_SceneManagement_Scene", UnityEngine_Events_UnityAction_UnityEngine_SceneManagement_Scene); L.RegFunction("UnityAction_UnityEngine_SceneManagement_Scene_UnityEngine_SceneManagement_Scene", UnityEngine_Events_UnityAction_UnityEngine_SceneManagement_Scene_UnityEngine_SceneManagement_Scene); L.EndModule(); L.BeginModule("Camera"); L.RegFunction("CameraCallback", UnityEngine_Camera_CameraCallback); L.EndModule(); L.BeginModule("Application"); L.RegFunction("LowMemoryCallback", UnityEngine_Application_LowMemoryCallback); L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback); L.RegFunction("LogCallback", UnityEngine_Application_LogCallback); L.EndModule(); L.BeginModule("AudioClip"); L.RegFunction("PCMReaderCallback", UnityEngine_AudioClip_PCMReaderCallback); L.RegFunction("PCMSetPositionCallback", UnityEngine_AudioClip_PCMSetPositionCallback); L.EndModule(); L.BeginModule("RectTransform"); L.RegFunction("ReapplyDrivenProperties", UnityEngine_RectTransform_ReapplyDrivenProperties); L.EndModule(); L.EndModule(); L.BeginModule("LuaInterface"); LuaInterface_LuaInjectionStationWrap.Register(L); LuaInterface_InjectTypeWrap.Register(L); L.EndModule(); L.BeginModule("FairyGUI"); FairyGUI_UIPanelWrap.Register(L); FairyGUI_HitTestModeWrap.Register(L); FairyGUI_EventContextWrap.Register(L); FairyGUI_EventDispatcherWrap.Register(L); FairyGUI_EventListenerWrap.Register(L); FairyGUI_InputEventWrap.Register(L); FairyGUI_DisplayObjectWrap.Register(L); FairyGUI_ContainerWrap.Register(L); FairyGUI_StageWrap.Register(L); FairyGUI_ControllerWrap.Register(L); FairyGUI_GObjectWrap.Register(L); FairyGUI_GGraphWrap.Register(L); FairyGUI_GGroupWrap.Register(L); FairyGUI_GImageWrap.Register(L); FairyGUI_GLoaderWrap.Register(L); FairyGUI_GMovieClipWrap.Register(L); FairyGUI_TextFormatWrap.Register(L); FairyGUI_GTextFieldWrap.Register(L); FairyGUI_GRichTextFieldWrap.Register(L); FairyGUI_GTextInputWrap.Register(L); FairyGUI_GComponentWrap.Register(L); FairyGUI_GListWrap.Register(L); FairyGUI_GRootWrap.Register(L); FairyGUI_GLabelWrap.Register(L); FairyGUI_GButtonWrap.Register(L); FairyGUI_GComboBoxWrap.Register(L); FairyGUI_GProgressBarWrap.Register(L); FairyGUI_GSliderWrap.Register(L); FairyGUI_PopupMenuWrap.Register(L); FairyGUI_ScrollPaneWrap.Register(L); FairyGUI_TransitionWrap.Register(L); FairyGUI_UIPackageWrap.Register(L); FairyGUI_WindowWrap.Register(L); FairyGUI_GObjectPoolWrap.Register(L); FairyGUI_RelationsWrap.Register(L); FairyGUI_RelationTypeWrap.Register(L); FairyGUI_TimersWrap.Register(L); FairyGUI_LuaUIHelperWrap.Register(L); FairyGUI_GLuaComponentWrap.Register(L); FairyGUI_GLuaLabelWrap.Register(L); FairyGUI_GLuaButtonWrap.Register(L); FairyGUI_GLuaProgressBarWrap.Register(L); FairyGUI_GLuaSliderWrap.Register(L); FairyGUI_GLuaComboBoxWrap.Register(L); FairyGUI_LuaWindowWrap.Register(L); L.RegFunction("EventCallback1", FairyGUI_EventCallback1); L.RegFunction("EventCallback0", FairyGUI_EventCallback0); L.RegFunction("ListItemRenderer", FairyGUI_ListItemRenderer); L.RegFunction("ListItemProvider", FairyGUI_ListItemProvider); L.RegFunction("PlayCompleteCallback", FairyGUI_PlayCompleteCallback); L.RegFunction("TransitionHook", FairyGUI_TransitionHook); L.RegFunction("TimerCallback", FairyGUI_TimerCallback); L.BeginModule("UIPackage"); L.RegFunction("LoadResource", FairyGUI_UIPackage_LoadResource); L.RegFunction("CreateObjectCallback", FairyGUI_UIPackage_CreateObjectCallback); L.EndModule(); L.BeginModule("GObjectPool"); L.RegFunction("InitCallbackDelegate", FairyGUI_GObjectPool_InitCallbackDelegate); L.EndModule(); L.EndModule(); L.BeginModule("LuaFramework"); LuaFramework_UtilWrap.Register(L); LuaFramework_AppConstWrap.Register(L); LuaFramework_LuaHelperWrap.Register(L); LuaFramework_ByteBufferWrap.Register(L); LuaFramework_LuaBehaviourWrap.Register(L); LuaFramework_GameManagerWrap.Register(L); LuaFramework_LuaManagerWrap.Register(L); LuaFramework_PanelManagerWrap.Register(L); LuaFramework_SoundManagerWrap.Register(L); LuaFramework_TimerManagerWrap.Register(L); LuaFramework_ThreadManagerWrap.Register(L); LuaFramework_NetworkManagerWrap.Register(L); LuaFramework_ResourceManagerWrap.Register(L); L.EndModule(); L.BeginModule("System"); L.RegFunction("Action", System_Action); L.RegFunction("Predicate_int", System_Predicate_int); L.RegFunction("Action_int", System_Action_int); L.RegFunction("Comparison_int", System_Comparison_int); L.RegFunction("Func_int_int", System_Func_int_int); L.RegFunction("Action_UnityEngine_AsyncOperation", System_Action_UnityEngine_AsyncOperation); L.RegFunction("Action_NotiData", System_Action_NotiData); L.RegFunction("Action_UnityEngine_Objects", System_Action_UnityEngine_Objects); L.EndModule(); L.EndModule(); L.BeginPreLoad(); L.AddPreLoad("UnityEngine.MeshRenderer", LuaOpen_UnityEngine_MeshRenderer, typeof(UnityEngine.MeshRenderer)); L.AddPreLoad("UnityEngine.BoxCollider", LuaOpen_UnityEngine_BoxCollider, typeof(UnityEngine.BoxCollider)); L.AddPreLoad("UnityEngine.MeshCollider", LuaOpen_UnityEngine_MeshCollider, typeof(UnityEngine.MeshCollider)); L.AddPreLoad("UnityEngine.SphereCollider", LuaOpen_UnityEngine_SphereCollider, typeof(UnityEngine.SphereCollider)); L.AddPreLoad("UnityEngine.CharacterController", LuaOpen_UnityEngine_CharacterController, typeof(UnityEngine.CharacterController)); L.AddPreLoad("UnityEngine.CapsuleCollider", LuaOpen_UnityEngine_CapsuleCollider, typeof(UnityEngine.CapsuleCollider)); L.AddPreLoad("UnityEngine.Animation", LuaOpen_UnityEngine_Animation, typeof(UnityEngine.Animation)); L.AddPreLoad("UnityEngine.AnimationClip", LuaOpen_UnityEngine_AnimationClip, typeof(UnityEngine.AnimationClip)); L.AddPreLoad("UnityEngine.AnimationState", LuaOpen_UnityEngine_AnimationState, typeof(UnityEngine.AnimationState)); L.AddPreLoad("UnityEngine.BlendWeights", LuaOpen_UnityEngine_BlendWeights, typeof(UnityEngine.BlendWeights)); L.AddPreLoad("UnityEngine.RenderTexture", LuaOpen_UnityEngine_RenderTexture, typeof(UnityEngine.RenderTexture)); L.AddPreLoad("UnityEngine.Rigidbody", LuaOpen_UnityEngine_Rigidbody, typeof(UnityEngine.Rigidbody)); L.EndPreLoad(); Debugger.Log("Register lua type cost time: {0}", Time.realtimeSinceStartup - t); }