Ejemplo n.º 1
0
        void LoadBattleScreen()
        {
            uint tsapos = Program.ROM.p32(this.TSAPointer);

            if (this.IsLZ77TSA)
            {
                byte[] tsadata = LZ77.decompress(Program.ROM.Data, tsapos);
                if (tsadata.Length <= 0)
                {//解凍できない
                    this.Map = new ushort[] {};
                    return;
                }
                if (this.IsHeaderTSA)
                {
                    this.Map = ImageUtil.ByteToHeaderTSA(tsadata, 0, (int)this.Width8 * 8, (int)this.Height8 * 8);
                }
                else
                {
                    this.Map = ImageUtil.ByteToTSA(tsadata, 0, (int)this.Width8 * 8, (int)this.Height8 * 8);
                }
            }
            else
            {
                if (this.IsHeaderTSA)
                {
                    this.Map = ImageUtil.ByteToHeaderTSA(Program.ROM.Data, (int)tsapos, (int)this.Width8 * 8, (int)this.Height8 * 8);
                }
                else
                {
                    this.Map = ImageUtil.ByteToTSA(Program.ROM.Data, (int)tsapos, (int)this.Width8 * 8, (int)this.Height8 * 8);
                }
            }
        }