Example #1
0
 public gCInfoCommandAddInfoSystemEndScript_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandAddInfoSystemEndScript(), "gCInfoCommandAddInfoSystemEndScript");
     Native.Properties.addProperty("Script", "eCScriptProxyScript", new eCScriptProxyScript());
     Native.Properties.addProperty("Self", "bCString", new bCString());
     Native.Properties.addProperty("Other", "bCString", new bCString());
     Native.Properties.addProperty("Param", "int", new Int32());
 }
Example #2
0
 public ximg(ShaderResourceTexture T)
 {
     Prop = new bCAccessorPropertyObject(new eCImageResource2());
     header = new ximgHeader();
     Prop.Properties.addProperty("Width", "int", T.Width);
     Prop.Properties.addProperty("Height", "int", T.Height);
     Prop.Properties.addProperty("SkipMips", "long", 0);
     Prop.Properties.addProperty("PixelFormat", "bTPropertyContainer<enum eCGfxShared::eEColorFormat>", eCImageResource2_eCGfxShared_eEColorFormat.eEColorFormat_DXT1);
     System.IO.MemoryStream M = new System.IO.MemoryStream(T.Width * T.Height);
     M.Position = 0;
     SlimDX.Result r = SlimDX.Direct3D11.Texture2D.ToStream(T.Device.Context, T.Texture, SlimDX.Direct3D11.ImageFileFormat.Dds, M);
     long l = M.Position;
     M.Position = 0;
     tgaData = M.ReadBytes((int)l);
     M.Dispose();
 }
Example #3
0
 public gCInfoConditionTeachEnabled_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #4
0
 public void InsertCommand(bCAccessorPropertyObject A, int i)
 {
     if (m_pCommands == null)
         m_pCommands = new List<bCAccessorPropertyObject>();
     m_pCommands.Insert(i, A);
 }
Example #5
0
 public void AddCommand(bCAccessorPropertyObject A)
 {
     if (m_pCommands == null)
         m_pCommands = new List<bCAccessorPropertyObject>();
     m_pCommands.Add(A);
 }
Example #6
0
 public gCInfoCommandRemoveNPC_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandRemoveNPC(), "gCInfoCommandRemoveNPC");
     Native.Properties.addProperty("NPC", "bCString", new bCString());
 }
Example #7
0
 public gCInfoCommandRemoveNPCInfo_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandRemoveNPCInfo(), "gCInfoCommandRemoveNPCInfo");
     Native.Properties.addProperty("NPC", "bCString", new bCString());
     Native.Properties.addProperty("Location", "bTPropertyContainer<enum gEInfoLocation>", new gEInfoLocation());
     Native.Properties.addProperty("Type", "bTPropertyContainer<enum gEInfoNPCType>", new gEInfoNPCType());
 }
Example #8
0
 public gCInfoCommandPickPocket_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #9
0
 public gCInfoCommandGive_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandGive(), "gCInfoCommandGive");
     Native.Properties.addProperty("Entity1", "bCString", new bCString());
     Native.Properties.addProperty("Entity2", "bCString", new bCString());
     Native.Properties.addProperty("Item", "eCTemplateEntityProxy", new eCTemplateEntityProxy());
     Native.Properties.addProperty("Amount", "long", new Int32());
 }
Example #10
0
 public gCInfoCommandClearGameEvent_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #11
0
 public InfoWrapper(string a_Name, string a_Owner, gEInfoType a_Type, gEInfoCondType a_CndType)
 {
     bCAccessorPropertyObject Native = new bCAccessorPropertyObject(new gCInfo());
     nat = Native.Class as gCInfo;
     nat.Container.Properties.addProperty("Name", "bCString", new bCString(a_Name));
     nat.Container.Properties.addProperty("MainSortID", "long", 0);
     nat.Container.Properties.addProperty("SortID", "long", 0);
     nat.Container.Properties.addProperty("Owner", "bCString", new bCString(a_Owner));
     nat.Container.Properties.addProperty("InfoGiven", "bool", false);
     nat.Container.Properties.addProperty("Parent", "bCString", new bCString());
     nat.Container.Properties.addProperty("Quest", "bCString", new bCString());
     nat.Container.Properties.addProperty("ConditionType", "bTPropertyContainer<enum gEInfoCondType>", a_CndType);
     nat.Container.Properties.addProperty("Type", "bTPropertyContainer<enum gEInfoType>", a_Type);
     nat.Container.Properties.addProperty("GoldCost", "long", 0);
     nat.Container.Properties.addProperty("LearnPointCost", "long", 0);
     nat.Container.Properties.addProperty("ClearChildren", "bool", false);
     nat.Container.Properties.addProperty("Permanent", "bool", false);
     nat.Container.Properties.addProperty("Folder", "bCString", new bCString());
     nat.Container.Properties.addProperty("CurrentInfoCommandIndex", "int", -1);
     nat.Container.Properties.addProperty("InfoIsRunnig", "bool", false);
     nat.Container.Properties.addProperty("StartChapter", "long", -1);
     nat.Container.Properties.addProperty("EndChapter", "long", -1);
     m_pCommands = new List<InfoCommandWrapper>();
     m_pConditions = new List<InfoCommandWrapper>();
 }
Example #12
0
        public static InfoCommandWrapper getWrapper(bCAccessorPropertyObject a, InfoWrapper P)
        {
            string NAME = a.ClassName;
            Type T = Assembly.GetCallingAssembly().GetType(typeof(PropertySetWrapper).Namespace + "." + NAME + "_Wrapper");
            if (T == null)
            {
                if (!done.Contains(NAME))
                {
                    done.Add(NAME);
                    const string n = "gInfoWrapper.cs";
                    string b = BuildClassFromAccessor(a.ClassName, "InfoCommandWrapper", a);
                    string c = File.Exists(n) ? File.ReadAllText(n) : "";
                    File.WriteAllText(n, c + b);

                    string n2 = "gInfo.cs", nl = Environment.NewLine;
                    string b2 = "public class " + NAME + " : classData" + nl + "{" + nl + "short Version;" + nl + nl + "public override void deSerialize(IFile a_File)" + nl +
                        "{" + nl + "Version = a_File.Read<short>();" + nl + "}" + nl + nl + "public override void Serialize(IFile a_File)" + nl + "{" + nl + "a_File.Write<short>(Version);"
                        + nl + "}" + nl + nl + "public override int Size" + nl + "{" + nl + "get" + nl + "{" + nl + "return 2;" + nl + "}" + nl + "}" + nl + "}";
                    string c2 = File.Exists(n2) ? File.ReadAllText(n2) : "";
                    File.WriteAllText(n2, c2 + b2);
                }
                return null;
            }
            else
            {
                object o2 = Activator.CreateInstance(T, a, P);
                return o2 as InfoCommandWrapper;
            }
        }
Example #13
0
 public static string BuildClassFromAccessor(string NAME, string BaseClass, bCAccessorPropertyObject a)
 {
     StringBuilder SB = new StringBuilder();
     SB.Append("public class " + NAME + "_Wrapper : " + BaseClass + Environment.NewLine + "{" + Environment.NewLine);
     SB.Append("public " + NAME + "_Wrapper(bCAccessorPropertyObject O, InfoWrapper P) : base(O, P) { }");
     SB.Append(Environment.NewLine + "public " + NAME + "_Wrapper(InfoWrapper P) : base(P)" + Environment.NewLine + "{" + Environment.NewLine);
     SB.AppendLine("Native = new bCAccessorPropertyObject(new " + NAME + "(), " + (char)34 + NAME + (char)34 + ");");
     foreach (bCProperty p in a.Properties)
     {
         string X = (char)34 + p.PropertyName + (char)34;
         Type T0 = p.Object.GetType();
         string Y = T0.Name;
         if (T0.IsGenericType)
             Y = TypeCache.GetFriendlyTypeName(T0);
         SB.AppendLine("Native.Properties.addProperty(" + (char)34 + p.PropertyName + (char)34 + ", " + (char)34 + p.PropertyType + (char)34 + ", new " + Y + "());");
     }
     SB.Append("}");
     foreach (bCProperty p in a.Properties)
     {
         string X = (char)34 + p.PropertyName + (char)34;
         Type T0 = p.Object.GetType();
         string Y = T0.Name;
         if (T0.IsGenericType)
             Y = TypeCache.GetFriendlyTypeName(T0);
         SB.Append(Environment.NewLine + Environment.NewLine);
         SB.Append("public " + Y + " " + p.PropertyName + Environment.NewLine + "{" + Environment.NewLine + "get" + Environment.NewLine + "{");
         SB.Append("return (" + Y + ")Native.Properties[" + X + "].Object;");
         SB.Append(Environment.NewLine + "}" + Environment.NewLine + "set" + Environment.NewLine + "{");
         SB.Append("Native.Properties[" + X + "].Object = value;");
         SB.Append(Environment.NewLine + "OnChange(" + (char)34 + p.PropertyName + (char)34 + ");");
         SB.Append(Environment.NewLine + "}" + Environment.NewLine + "}");
     }
     SB.Append(Environment.NewLine + "}");
     return SB.ToString();
 }
Example #14
0
 public InfoCommandWrapper(bCAccessorPropertyObject A, InfoWrapper a_Parent)
 {
     Parent = a_Parent;
     Native = A;
 }
Example #15
0
 public gCInfoConditionTeachEnabled_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoConditionTeachEnabled(), "gCInfoConditionTeachEnabled");
     Native.Properties.addProperty("TeachEnabled", "bool", new Boolean());
 }
Example #16
0
 public gCInfoCommandGiveXP_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandGiveXP(), "gCInfoCommandGiveXP");
     Native.Properties.addProperty("Amount", "long", new Int32());
 }
Example #17
0
 public gCInfoCommandGive_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #18
0
 public gCInfoCommandClearGameEvent_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandClearGameEvent(), "gCInfoCommandClearGameEvent");
     Native.Properties.addProperty("GameEvent", "bCString", new bCString());
 }
Example #19
0
 public gCInfoCommandInfoWait_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandInfoWait(), "gCInfoCommandInfoWait");
     Native.Properties.addProperty("Time", "long", new Int32());
 }
Example #20
0
 public gCInfoCommandCloseQuest_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #21
0
 public gCInfoCommandPickPocket_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandPickPocket(), "gCInfoCommandPickPocket");
     Native.Properties.addProperty("Difficulty", "long", new Int32());
     Native.Properties.addProperty("Speaker", "bCString", new bCString());
     Native.Properties.addProperty("Listener", "bCString", new bCString());
     Native.Properties.addProperty("Text", "gCInfoLocString", new gCInfoLocString());
     Native.Properties.addProperty("SVMID", "bCString", new bCString());
     Native.Properties.addProperty("SVMText", "gCInfoLocString", new gCInfoLocString());
     Native.Properties.addProperty("Gesture", "bTPropertyContainer<enum gEInfoGesture>", new gEInfoGesture());
 }
Example #22
0
 public gCInfoCommandCloseQuest_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandCloseQuest(), "gCInfoCommandCloseQuest");
     Native.Properties.addProperty("QuestName", "bCString", new bCString());
 }
Example #23
0
 public gCInfoCommandRemoveNPC_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #24
0
 public gCInfoCommandDescription_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #25
0
 public void InsertCondition(bCAccessorPropertyObject A, int i)
 {
     if (m_pConditions == null)
         m_pConditions = new List<bCAccessorPropertyObject>();
     m_pConditions.Insert(i, A);
 }
Example #26
0
 public gCInfoCommandDescription_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandDescription(), "gCInfoCommandDescription");
     Native.Properties.addProperty("Text", "gCInfoLocString", new gCInfoLocString());
 }
Example #27
0
 public void AddCondition(bCAccessorPropertyObject A)
 {
     if (m_pConditions == null)
         m_pConditions = new List<bCAccessorPropertyObject>();
     m_pConditions.Add(A);
 }
Example #28
0
 public gCInfoCommandDestroyItem_Wrapper(bCAccessorPropertyObject O, InfoWrapper P)
     : base(O, P)
 {
 }
Example #29
0
 public override void deSerialize(IFile a_File)
 {
     a_File.Position += 8;
     int poff = a_File.Read<int>();
     int plen = a_File.Read<int>();
     int doff = a_File.Read<int>();
     int dlen = a_File.Read<int>();
     Time = DateTime.FromFileTime(a_File.Read<long>());
     char[] A = a_File.Read<char>(8);
     propObj = new bCAccessorPropertyObject(a_File);
     dataObj = new bCAccessorPropertyObject(a_File);
 }
Example #30
0
 public gCInfoCommandEnd_Wrapper(InfoWrapper P)
     : base(P)
 {
     Native = new bCAccessorPropertyObject(new gCInfoCommandEnd(), "gCInfoCommandEnd");
 }