示例#1
0
        public TLK_DSA_1(ref CDialoge dialog, ref CBilder bilder)
        {
            this._dialog = dialog;
            this._bilder = bilder;

            InitializeComponent();
        }
        public TLK_DSA2_info(ref CDialoge dialog, ref CBilder bilder)
        {
            InitializeComponent();

            this._dialog = dialog;
            this._bilder = bilder;
        }
        public void addLocation(ref byte[] data, ref CBilder bilder, List<CDSAFileLoader.CFileSet> mapLayout_MADs, List<CDSAFileLoader.CFileSet> mapInfos_INFs)
        {
            foreach (var MAD in mapLayout_MADs)
            {
                CDSALocation location = new CDSALocation(ref bilder, MAD.filename.Substring(0, MAD.filename.LastIndexOf('.')));

                location.addMap(ref data, MAD);

                foreach (var INF in mapInfos_INFs)
                {
                    //String.Compare(,,true) wegen groß und kleinschreibung
                    if (0 == String.Compare(location.Name, INF.filename.Substring(0, INF.filename.LastIndexOf('.')), true))
                    {
                        location.addMapInfo(ref data, INF);
                        break;
                    }
                }

                this.itsLocations.Add(new KeyValuePair<string, CDSALocation>(location.Name, location));
            }
        }
            //TODO:
            //funktion get Map()
            //Karteninfos
            //Karten Indexe (2-Dimensionen)
            public CDSALocation(ref CBilder bilder, string name)
            {
                this._Name = name;

                if ((0 == String.Compare(name, "BLUT1", true)) ||
                    (0 == String.Compare(name, "BLUT2", true)) ||
                    (0 == String.Compare(name, "BLUT3", true)))
                {
                        foreach (var pair in bilder.itsImages)
                        {
                            if (0 == String.Compare(pair.Key, "BLUT.NVF", true))
                            {
                                this._MapImages = pair.Value;
                                this._usedNVF = pair.Key;
                                break;
                            }
                        }
                }
                else if ((0 == String.Compare(name, "BINGE6A", true)) ||
                    (0 == String.Compare(name, "BINGE6B", true)))
                {
                        foreach (var pair in bilder.itsImages)
                        {
                            if (0 == String.Compare(pair.Key, "BINGE6.NVF", true))
                            {
                                this._MapImages = pair.Value;
                                this._usedNVF = pair.Key;
                                break;
                            }
                        }
                }
                else if ((0 == String.Compare(name, "TIEFHUS", true)))
                {
                    foreach (var pair in bilder.itsImages)
                    {
                        if (0 == String.Compare(pair.Key, "LOWANGEN.NVF", true))
                        {
                            this._MapImages = pair.Value;
                            this._usedNVF = pair.Key;
                            break;
                        }
                    }
                }
                else
                {
                    foreach (var pair in bilder.itsImages)
                    {
                        if (0 == String.Compare(name, pair.Key.Substring(0, pair.Key.LastIndexOf('.')), true))
                        {
                            this._MapImages = pair.Value;
                            this._usedNVF = pair.Key;
                            break;
                        }
                    }
                }

                if (this._MapImages.Count == 0)
                {
                    foreach (var pair in bilder.itsImages)
                    {
                        if (0 == String.Compare(pair.Key, "CITYPART.NVF", true))
                        {
                            this._MapImages = pair.Value;
                            this._usedNVF = pair.Key;
                            break;
                        }
                    }
                }
            }