当前位置: 首页>>代码示例>>C#>>正文


C# Parser.Destroy方法代码示例

本文整理汇总了C#中CSAngband.Parser.Destroy方法的典型用法代码示例。如果您正苦于以下问题:C# Parser.Destroy方法的具体用法?C# Parser.Destroy怎么用?C# Parser.Destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSAngband.Parser的用法示例。


在下文中一共展示了Parser.Destroy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: finish_parse_s

        public static Parser.Error finish_parse_s(Parser p)
        {
            Spell s;
            Object_Kind k;

            Misc.s_info = new Spell[Misc.z_info.s_max];
            for (s = p.priv as Spell; s != null; s = s.next) {
                if (s.sidx >= Misc.z_info.s_max)
                    continue;
                Misc.s_info[s.sidx] = s;
                k = Object_Kind.objkind_get(s.tval, s.sval);
                if (k != null) {
                    Misc.s_info[s.sidx].next = k.spells;
                    k.spells = Misc.s_info[s.sidx];
                }
            }

            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:20,代码来源:Init2.cs

示例2: finish_parse_r

        public static Parser.Error finish_parse_r(Parser p)
        {
            Misc.r_info = new Monster_Race[Misc.z_info.r_max];
            for (Monster_Race r = p.priv as Monster_Race; r != null; r = r.Next) {
                if (r.ridx >= Misc.z_info.r_max)
                    continue;
                Misc.r_info[r.ridx] = r;
            }
            Eval.r_power(Misc.r_info);

            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:13,代码来源:Init2.cs

示例3: finish_parse_rb

 public static Parser.Error finish_parse_rb(Parser p)
 {
     Misc.rb_info = p.priv as Monster_Base;
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:6,代码来源:Init2.cs

示例4: finish_parse_p

 public static Parser.Error finish_parse_p(Parser p)
 {
     Misc.races = p.priv as Player_Race;
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:6,代码来源:Init2.cs

示例5: finish_parse_pit

        public static Parser.Error finish_parse_pit(Parser p)
        {
            Pit_Profile pit;

            Misc.pit_info = new Pit_Profile[Misc.z_info.pit_max];
            for (pit = p.priv as Pit_Profile; pit != null; pit = pit.next) {
                if (pit.pit_idx >= Misc.z_info.pit_max)
                    continue;
                Misc.pit_info[pit.pit_idx] = pit;
            }

            //pit = p.priv;
            //while (pit) {
            //    n = pit.next;
            //    mem_free(pit);
            //    pit = n;
            //}

            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:21,代码来源:Init2.cs

示例6: finish_parse_c

 public static Parser.Error finish_parse_c(Parser p)
 {
     Misc.classes = p.priv as Player_Class;
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:6,代码来源:Init2.cs

示例7: finish_parse_names

 public static Parser.Error finish_parse_names(Parser p)
 {
     int i;
     uint j;
     names_parse n = p.priv as names_parse;
     name nm;
     RandomName.name_sections = new string[(int)RandomName.randname_type.RANDNAME_NUM_TYPES][];
     for (i = 0; i < (int)RandomName.randname_type.RANDNAME_NUM_TYPES; i++) {
         RandomName.name_sections[i] = new string[(n.nnames[i] + 1)];
         for (nm = n.names[i], j = 0; nm != null && j < n.nnames[i]; nm = nm.next, j++) {
             RandomName.name_sections[i][j] = nm.str;
         }
         RandomName.name_sections[i][n.nnames[i]] = null;
         //while(n.names[i]) {
         //    nm = n.names[i].next;
         //    mem_free(n.names[i]);
         //    n.names[i] = nm;
         //}
     }
     //mem_free(n);
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:23,代码来源:Init2.cs

示例8: finish_parse_k

        public static Parser.Error finish_parse_k(Parser p)
        {
            Misc.k_info = new Object_Kind[Misc.z_info.k_max];
            for (Object_Kind k = p.priv as Object_Kind; k != null; k = k.next) {
                if (k.kidx >= Misc.z_info.k_max)
                    continue;
                Misc.k_info[k.kidx] = k;
            }

            Misc.objkinds = p.priv as Object_Kind;
            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:13,代码来源:Init2.cs

示例9: finish_parse_kb

        public static Parser.Error finish_parse_kb(Parser p)
        {
            kb_parsedata d = p.priv as kb_parsedata;

            Misc.assert(d != null);

            Misc.kb_info = new Object.Object_Base[Object.TVal.TV_MAX];

            for (Object.Object_Base kb = d.kb; kb != null; kb = kb.Next) {
                if (kb.tval >= Object.TVal.TV_MAX)
                    continue;
                Misc.kb_info[kb.tval] = kb;
            }

            p.Destroy();
            return Parser.Error.NONE;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:17,代码来源:Init2.cs

示例10: finish_parse_h

        public static Parser.Error finish_parse_h(Parser p)
        {
            History_Chart c;
            History_Entry e, prev, next;
            Misc.histories = p.priv as History_Chart;

            /* Go fix up the entry successor pointers. We can't compute them at
             * load-time since we may not have seen the successor history yet. Also,
             * we need to put the entries in the right order; the parser actually
             * stores them backwards, which is not desirable.
             */
            for (c = Misc.histories; c != null; c = c.next) {
                e = c.entries;
                prev = null;
                while (e != null) {
                    next = e.next;
                    e.next = prev;
                    prev = e;
                    e = next;
                }
                c.entries = prev;
                for (e = c.entries; e != null; e = e.next) {
                    if (e.isucc == 0)
                        continue;
                    e.succ = findchart(Misc.histories, (uint)e.isucc);
                    if (e.succ == null) {
                        return Parser.Error.GENERIC;
                    }
                }
            }

            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:34,代码来源:Init2.cs

示例11: finish_parse_hints

 public static Parser.Error finish_parse_hints(Parser p)
 {
     Misc.hints = p.priv as Hint;
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:6,代码来源:Init2.cs

示例12: finish_parse_flavor

 public static Parser.Error finish_parse_flavor(Parser p)
 {
     Misc.flavors = p.priv as Flavor;
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:6,代码来源:Init2.cs

示例13: finish_parse_f

        public static Parser.Error finish_parse_f(Parser p)
        {
            Feature f, n;

            Misc.f_info = new Feature[Misc.z_info.f_max];
            for (f = (Feature)p.priv; f != null ; f = f.next) {
                if (f.fidx >= Misc.z_info.f_max)
                    continue;
                Misc.f_info[f.fidx] = f;
            }

            //f = (Feature)p.priv;
            //while (f != null) {
            //    n = f.next;
            //    //free(f);
            //    f = n;
            //}

            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:21,代码来源:Init2.cs

示例14: finish_parse_e

        public static Parser.Error finish_parse_e(Parser p)
        {
            Ego_Item e;

            Misc.e_info = new Ego_Item[Misc.z_info.e_max];
            for (e = p.priv as Ego_Item; e != null; e = e.next) {
                if (e.eidx >= Misc.z_info.e_max)
                    continue;
                Misc.e_info[e.eidx] =  e;
            }

            Slay.create_slay_cache(Misc.e_info);

            p.Destroy();
            return 0;
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:16,代码来源:Init2.cs

示例15: finish_parse_v

 public static Parser.Error finish_parse_v(Parser p)
 {
     Misc.vaults = p.priv as Vault;
     p.Destroy();
     return 0;
 }
开发者ID:jobjingjo,项目名称:csangband,代码行数:6,代码来源:Init2.cs


注:本文中的CSAngband.Parser.Destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。