コード例 #1
0
    // Token: 0x060008C8 RID: 2248 RVA: 0x0007FA94 File Offset: 0x0007DC94
    public static void loadMapFromResource(int mapID)
    {
        DataInputStream dataInputStream = MyStream.readFile("/mymap/" + TileMap.mapID);

        TileMap.tmw  = (int)((ushort)dataInputStream.read());
        TileMap.tmh  = (int)((ushort)dataInputStream.read());
        TileMap.maps = new int[dataInputStream.available()];
        for (int i = 0; i < TileMap.tmw * TileMap.tmh; i++)
        {
            TileMap.maps[i] = (int)((ushort)dataInputStream.read());
        }
        TileMap.types = new int[TileMap.maps.Length];
    }
コード例 #2
0
    // Token: 0x0600025D RID: 605 RVA: 0x00012A10 File Offset: 0x00010C10
    public void readData2(string patch)
    {
        DataInputStream dataInputStream = null;

        try
        {
            dataInputStream = MyStream.readFile(patch);
        }
        catch (Exception ex)
        {
            return;
        }
        this.readEffect(dataInputStream.r);
    }
コード例 #3
0
 // Token: 0x06000174 RID: 372 RVA: 0x0000D7C8 File Offset: 0x0000B9C8
 public mFont(string strFont, string pathImage, string pathData, int space)
 {
     try
     {
         this.strFont   = strFont;
         this.space     = space;
         this.pathImage = pathImage;
         DataInputStream dataInputStream = null;
         this.reloadImage();
         try
         {
             dataInputStream = MyStream.readFile(pathData);
             this.fImages    = new int[(int)dataInputStream.readShort()][];
             for (int i = 0; i < this.fImages.Length; i++)
             {
                 this.fImages[i]    = new int[4];
                 this.fImages[i][0] = (int)dataInputStream.readShort();
                 this.fImages[i][1] = (int)dataInputStream.readShort();
                 this.fImages[i][2] = (int)dataInputStream.readShort();
                 this.fImages[i][3] = (int)dataInputStream.readShort();
                 this.setHeight(this.fImages[i][3]);
             }
             dataInputStream.close();
         }
         catch (Exception ex)
         {
             try
             {
                 dataInputStream.close();
             }
             catch (Exception ex2)
             {
                 ex2.StackTrace.ToString();
             }
         }
     }
     catch (Exception ex3)
     {
         ex3.StackTrace.ToString();
     }
 }
コード例 #4
0
 // Token: 0x0600073A RID: 1850 RVA: 0x00060B1C File Offset: 0x0005ED1C
 public void getData()
 {
     if (Mob.arrMobTemplate[this.templateId].data == null)
     {
         Mob.arrMobTemplate[this.templateId].data = new EffectData();
         string          text            = "/Mob/" + this.templateId;
         DataInputStream dataInputStream = MyStream.readFile(text);
         if (dataInputStream != null)
         {
             Mob.arrMobTemplate[this.templateId].data.readData(text + "/data");
             Mob.arrMobTemplate[this.templateId].data.img = GameCanvas.loadImage(text + "/img.png");
         }
         else
         {
             Service.gI().requestModTemplate(this.templateId);
         }
         Mob.lastMob.addElement(this.templateId + string.Empty);
     }
     else
     {
         this.w = Mob.arrMobTemplate[this.templateId].data.width;
         this.h = Mob.arrMobTemplate[this.templateId].data.height;
     }
 }
コード例 #5
0
 // Token: 0x06000613 RID: 1555 RVA: 0x0004AFDC File Offset: 0x000491DC
 public static void loadMapFromResource(sbyte[] mapID)
 {
     Res.outz("newwwwwwwwww =============");
     for (int i = 0; i < mapID.Length; i++)
     {
         DataInputStream dataInputStream = MyStream.readFile("/mymap/" + mapID[i]);
         MapTemplate.tmw[i] = (int)((ushort)dataInputStream.read());
         MapTemplate.tmh[i] = (int)((ushort)dataInputStream.read());
         Cout.LogError(string.Concat(new object[]
         {
             "Thong TIn : ",
             MapTemplate.tmw[i],
             "::",
             MapTemplate.tmh[i]
         }));
         MapTemplate.maps[i] = new int[dataInputStream.available()];
         Cout.LogError("lent= " + MapTemplate.maps[i].Length);
         for (int j = 0; j < MapTemplate.tmw[i] * MapTemplate.tmh[i]; j++)
         {
             MapTemplate.maps[i][j] = dataInputStream.read();
         }
         MapTemplate.types[i] = new int[MapTemplate.maps[i].Length];
     }
 }
コード例 #6
0
    // Token: 0x06000614 RID: 1556 RVA: 0x0004B0F0 File Offset: 0x000492F0
    public void loadMapTableFromResource(sbyte[] mapID)
    {
        if (GameCanvas.lowGraphic)
        {
            return;
        }
        DataInputStream dataInputStream = null;

        try
        {
            for (int i = 0; i < mapID.Length; i++)
            {
                dataInputStream = MyStream.readFile("/mymap/mapTable" + mapID[i]);
                Cout.LogError("mapTable : " + mapID[i]);
                short num = dataInputStream.readShort();
                MapTemplate.vCurrItem[i] = new MyVector();
                Res.outz("nItem= " + num);
                for (int j = 0; j < (int)num; j++)
                {
                    short id   = dataInputStream.readShort();
                    short num2 = dataInputStream.readShort();
                    short num3 = dataInputStream.readShort();
                    if (TileMap.getBIById((int)id) != null)
                    {
                        BgItem bibyId = TileMap.getBIById((int)id);
                        BgItem bgItem = new BgItem();
                        bgItem.id      = (int)id;
                        bgItem.idImage = bibyId.idImage;
                        bgItem.dx      = bibyId.dx;
                        bgItem.dy      = bibyId.dy;
                        bgItem.x       = (int)num2 * (int)TileMap.size;
                        bgItem.y       = (int)num3 * (int)TileMap.size;
                        bgItem.layer   = bibyId.layer;
                        MapTemplate.vCurrItem[i].addElement(bgItem);
                        if (!BgItem.imgNew.containsKey(bgItem.idImage + string.Empty))
                        {
                            try
                            {
                                Image image = GameCanvas.loadImage("/mapBackGround/" + bgItem.idImage + ".png");
                                if (image == null)
                                {
                                    BgItem.imgNew.put(bgItem.idImage + string.Empty, Image.createRGBImage(new int[1], 1, 1, true));
                                    Service.gI().getBgTemplate(bgItem.idImage);
                                }
                                else
                                {
                                    BgItem.imgNew.put(bgItem.idImage + string.Empty, image);
                                }
                            }
                            catch (Exception ex)
                            {
                                Image image2 = GameCanvas.loadImage("/mapBackGround/" + bgItem.idImage + ".png");
                                if (image2 == null)
                                {
                                    image2 = Image.createRGBImage(new int[1], 1, 1, true);
                                    Service.gI().getBgTemplate(bgItem.idImage);
                                }
                                BgItem.imgNew.put(bgItem.idImage + string.Empty, image2);
                            }
                            BgItem.vKeysLast.addElement(bgItem.idImage + string.Empty);
                        }
                        if (!BgItem.isExistKeyNews(bgItem.idImage + string.Empty))
                        {
                            BgItem.vKeysNew.addElement(bgItem.idImage + string.Empty);
                        }
                        bgItem.changeColor();
                    }
                    else
                    {
                        Res.outz("item null");
                    }
                }
            }
        }
        catch (Exception ex2)
        {
            Cout.println("LOI TAI loadMapTableFromResource" + ex2.ToString());
        }
    }