Beispiel #1
0
        public void LoadPlayZone()
        {
            if (Version <= DefinitionSet.Halo2Vista)
            {
                return;
            }

            foreach (IndexItem item in IndexItems)
            {
                if (item.ClassCode == "play")
                {
                    if (item.Offset > Reader.Length)
                    {
                        foreach (IndexItem item2 in IndexItems)
                        {
                            if (item2.ClassCode == "zone")
                            {
                                //fix for H4 prologue, play address is out of
                                //bounds and data is held inside the zone tag
                                //instead so make a fake play tag using zone data
                                item.Offset = item2.Offset + 28;
                                break;
                            }
                        }
                    }

                    play = DefinitionsManager.play(this, item);
                    break;
                }
            }

            foreach (IndexItem item in IndexItems)
            {
                if (item.ClassCode == "zone")
                {
                    zone = DefinitionsManager.zone(this, item);
                    break;
                }
            }

            foreach (IndexItem item in IndexItems)
            {
                if (item.ClassCode == "ugh!")
                {
                    ugh_ = DefinitionsManager.ugh_(this, item);
                    break;
                }
            }
        }
Beispiel #2
0
 public virtual void Close()
 {
     Reader.Close();
     Reader.Dispose();
     LocaleTables.Clear();
     Strings.Clear();
     IndexItems.Clear();
     play        = null;
     zone        = null;
     ugh_        = null;
     buildNode   = null;
     versionNode = null;
     vertexNode  = null;
     Header      = null;
     IndexHeader = null;
 }