Example #1
0
        private void GetCHKAll(BinaryWriter bw)
        {
            LoadString();

            DDDTHG2.Clear();
            MTXM = (ushort[])TILE.Clone();
            //Doodad풀기
            for (int i = 0; i < DD2.Count; i++)
            {
                CDD2 cDD2 = DD2[i];

                DoodadPallet pallete = UseMapEditor.Global.WindowTool.MapViewer.tileSet.DoodadPallets[TILETYPE][cDD2.ID];
                DD2ToMTXM(cDD2);

                CTHG2 cTHG2 = new CTHG2();
                cTHG2.FLAG = pallete.dddFlags;
                cTHG2.X    = cDD2.X;
                cTHG2.Y    = cDD2.Y;
                cTHG2.ID   = pallete.dddOverlayID;

                if (((cTHG2.FLAG & (0b1 << 12)) != 0) | ((cTHG2.FLAG & (0b1 << 13)) != 0))
                {
                    DDDTHG2.Add(cTHG2);
                }
            }



            TriggerSave();



            //에디터로부터 CHK데이터를 가져오는 함수
            for (int i = 0; i < cHKTokens.Count; i++)
            {
                if (cHKTokens[i].tokentype == TOKENTYPE.NULL)
                {
                    GetCHK(bw, cHKTokens[i], TOKENTYPE.NULL);
                }
            }


            foreach (TOKENTYPE cHKTYPE in Enum.GetValues(typeof(TOKENTYPE)))
            {
                if (cHKTYPE != TOKENTYPE.NULL)
                {
                    GetCHK(bw, new CHKToken(), cHKTYPE);
                }
            }
        }
Example #2
0
        public void MapDataReset()
        {
            cHKTokens = new List <CHKToken>();
            for (int i = 0; i < 8; i++)
            {
                CRGB[i] = new Microsoft.Xna.Framework.Color(0, 0, 0);

                CRGBIND[i] = (byte)CRGBINDTYPE.UseCOLRselection;
                COLR[i]    = (byte)i;
            }
            UNIT.Clear();


            FORCE        = new byte[8];
            FORCENAME    = new StringData[4];
            FORCENAME[0] = new StringData(this, "세력 1");
            FORCENAME[1] = new StringData(this, "세력 2");
            FORCENAME[2] = new StringData(this, "세력 3");
            FORCENAME[3] = new StringData(this, "세력 4");


            SIDE      = new byte[12];
            FORCEFLAG = new byte[4];
            WIDTH     = 0;
            HEIGHT    = 0;
            MASK      = null;
            MTXM      = null;
            TILE      = null;

            BYTESTR  = null;
            BYTESTRx = null;
            LOADSTR  = null;
            LOADSTRx = null;
            IOWN     = null;
            OWNR     = null;
            //LocationDatas.Add(new LocationData());


            SCEARIONAME = new StringData(this, "제목 없음");
            SCEARIODES  = new StringData(this, "시나리오 설명이 없습니다.");

            ENCODING = null;// System.Text.Encoding.


            DD2.Clear();
            THG2.Clear();


            DDDTHG2.Clear();
            LocationDatas.Clear();
            LocationDatas.Add(new LocationData(mapEditor));

            UPRP = new CUPRP[64];
            for (int i = 0; i < 64; i++)
            {
                UPRP[i] = new CUPRP();
            }


            UPUS = new byte[64];

            WAV = new StringData[512];
            for (int i = 0; i < 512; i++)
            {
                WAV[i] = new StringData(this);
            }
            SWNM = new StringData[256];
            for (int i = 0; i < 256; i++)
            {
                SWNM[i] = new StringData(this);
            }

            TRIG.Clear();
            MBRF.Clear();

            PUNI = new CPUNI(true);
            PUPx = new CPUPx(true);
            PTEx = new CPTEx(true);
            UNIx = new CUNIx(this, true);
            UPGx = new CUPGx(true);
            TECx = new CTECx(true);

            soundDatas = new List <SoundData>();

            Triggers.Clear();
            Brifings.Clear();
        }