예제 #1
0
        public SledLuaVarGlobalType GetScmpBlobAsLuaGlobalVar()
        {
            var var  = m_debugService.GetScmpBlob <Scmp.LuaVarGlobal>();
            var node = new DomNode(SledLuaSchema.SledLuaVarGlobalType.Type);

            var global = node.As <SledLuaVarGlobalType>();

            global.DisplayName = var.Name;
            global.Name        = SledLuaVarBaseType.CreateFlattenedHierarchyName(var.Name, var.Hierarchy, HierarchySeparatorString);
            global.What        = SledLuaUtil.LuaTypeIntToString(var.What);
            global.Value       = var.Value;
            global.KeyType     = var.KeyType;
            SledLuaVarBaseType.SetupTargetHierarchyFromRuntimeData(global, var.Hierarchy);
            global.GenerateUniqueName();

            return(global);
        }
예제 #2
0
        public SledLuaVarEnvType GetScmpBlobAsLuaEnvironmentVar()
        {
            var var  = m_debugService.GetScmpBlob <Scmp.LuaVarEnvVar>();
            var node = new DomNode(SledLuaSchema.SledLuaVarEnvType.Type);

            // Uses similar formatting as Globals
            var envVar = node.As <SledLuaVarEnvType>();

            envVar.DisplayName = var.Name;
            envVar.Name        = SledLuaVarBaseType.CreateFlattenedHierarchyName(var.Name, var.Hierarchy, HierarchySeparatorString);
            envVar.What        = SledLuaUtil.LuaTypeIntToString(var.What);
            envVar.Value       = var.Value;
            envVar.Level       = var.StackLevel; // Extra non-global param
            envVar.KeyType     = var.KeyType;
            SledLuaVarBaseType.SetupTargetHierarchyFromRuntimeData(envVar, var.Hierarchy);
            envVar.GenerateUniqueName();

            return(envVar);
        }
예제 #3
0
        public SledLuaVarUpvalueType GetScmpBlobAsLuaUpvalueVar()
        {
            var var  = m_debugService.GetScmpBlob <Scmp.LuaVarUpvalue>();
            var node = new DomNode(SledLuaSchema.SledLuaVarUpvalueType.Type);

            var upvalue = node.As <SledLuaVarUpvalueType>();

            upvalue.DisplayName = var.Name;
            upvalue.Name        = SledLuaVarBaseType.CreateFlattenedHierarchyName(var.Name, var.Hierarchy, HierarchySeparatorString);
            upvalue.What        = SledLuaUtil.LuaTypeIntToString(var.What);
            upvalue.Value       = var.Value;
            upvalue.Level       = var.StackLevel;
            upvalue.Index       = var.Index;
            upvalue.KeyType     = var.KeyType;

            upvalue.FunctionName        = m_luaCallStackService.Get[upvalue.Level].Function;
            upvalue.FunctionLineDefined = m_luaCallStackService.Get[upvalue.Level].LineDefined;

            SledLuaVarBaseType.SetupTargetHierarchyFromRuntimeData(upvalue, var.Hierarchy);
            upvalue.GenerateUniqueName();

            return(upvalue);
        }