Example #1
0
 // Token: 0x060003E1 RID: 993 RVA: 0x0001E328 File Offset: 0x0001C528
 public static void drawSmallImage(mGraphics g, int id, int x, int y, int transform, int anchor)
 {
     if (SmallImage.imgbig == null)
     {
         Small small = SmallImage.imgNew[id];
         if (small == null)
         {
             SmallImage.createImage(id);
         }
         else
         {
             g.drawRegion(small, 0, 0, mGraphics.getImageWidth(small.img), mGraphics.getImageHeight(small.img), transform, x, y, anchor);
         }
         return;
     }
     if (SmallImage.smallImg != null)
     {
         if (id >= SmallImage.smallImg.Length || SmallImage.smallImg[id][1] >= 256 || SmallImage.smallImg[id][3] >= 256 || SmallImage.smallImg[id][2] >= 256 || SmallImage.smallImg[id][4] >= 256)
         {
             Small small2 = SmallImage.imgNew[id];
             if (small2 == null)
             {
                 SmallImage.createImage(id);
             }
             else
             {
                 small2.paint(g, transform, x, y, anchor);
             }
         }
         else if (SmallImage.imgbig[SmallImage.smallImg[id][0]] != null)
         {
             g.drawRegion(SmallImage.imgbig[SmallImage.smallImg[id][0]], SmallImage.smallImg[id][1], SmallImage.smallImg[id][2], SmallImage.smallImg[id][3], SmallImage.smallImg[id][4], transform, x, y, anchor);
         }
     }
     else if (GameCanvas.currentScreen != GameScr.gI())
     {
         Small small3 = SmallImage.imgNew[id];
         if (small3 == null)
         {
             SmallImage.createImage(id);
         }
         else
         {
             small3.paint(g, transform, x, y, anchor);
         }
     }
 }
Example #2
0
 // Token: 0x060003D3 RID: 979 RVA: 0x0001DEFC File Offset: 0x0001C0FC
 public void paint(mGraphics g, int transform, int x, int y, int anchor)
 {
     g.drawRegion(this.img, 0, 0, mGraphics.getImageWidth(this.img), mGraphics.getImageHeight(this.img), transform, x, y, anchor);
     if (GameCanvas.gameTick % 1000 == 0)
     {
         this.timePaint++;
         this.timeUpdate = this.timePaint;
     }
 }
 // Token: 0x06000355 RID: 853 RVA: 0x00019B1C File Offset: 0x00017D1C
 public static void paint(mGraphics g, int x, int y)
 {
     if (!MobCapcha.isAttack)
     {
         if (GameCanvas.gameTick % 3 == 0)
         {
             if (global::Char.myCharz().cdir == 1)
             {
                 MobCapcha.cmtoX = x - 20 - GameScr.cmx;
             }
             if (global::Char.myCharz().cdir == -1)
             {
                 MobCapcha.cmtoX = x + 20 - GameScr.cmx;
             }
         }
         MobCapcha.cmtoY = global::Char.myCharz().cy - 40 - GameScr.cmy;
     }
     else
     {
         MobCapcha.delay++;
         if (MobCapcha.delay == 5)
         {
             MobCapcha.isAttack = false;
             MobCapcha.delay    = 0;
         }
         MobCapcha.cmtoX = x - GameScr.cmx;
         MobCapcha.cmtoY = y - GameScr.cmy;
     }
     if (MobCapcha.cmx > x - GameScr.cmx)
     {
         MobCapcha.dir = -1;
     }
     else
     {
         MobCapcha.dir = 1;
     }
     g.drawImage(GameScr.imgCapcha, MobCapcha.cmx, MobCapcha.cmy - 40, 3);
     PopUp.paintPopUp(g, MobCapcha.cmx - 25, MobCapcha.cmy - 70, 50, 20, 16777215, false);
     mFont.tahoma_7b_dark.drawString(g, GameScr.gI().keyInput, MobCapcha.cmx, MobCapcha.cmy - 65, 2);
     if (MobCapcha.isCreateMob)
     {
         MobCapcha.isCreateMob = false;
         EffecMn.addEff(new Effect(18, MobCapcha.cmx + GameScr.cmx, MobCapcha.cmy + GameScr.cmy, 2, 10, -1));
     }
     if (MobCapcha.explode)
     {
         MobCapcha.explode = false;
         EffecMn.addEff(new Effect(18, MobCapcha.cmx + GameScr.cmx, MobCapcha.cmy + GameScr.cmy, 2, 10, -1));
         GameScr.gI().mobCapcha = null;
         MobCapcha.cmtoX = -GameScr.cmx;
         MobCapcha.cmtoY = -GameScr.cmy;
     }
     g.drawRegion(MobCapcha.imgMob, 0, MobCapcha.f * 40, 40, 40, (MobCapcha.dir != 1) ? 2 : 0, MobCapcha.cmx, MobCapcha.cmy + 3 + ((GameCanvas.gameTick % 10 <= 5) ? 0 : 1), 3);
     MobCapcha.moveCamera();
 }
Example #4
0
 // Token: 0x060002D5 RID: 725 RVA: 0x00016564 File Offset: 0x00014764
 public static void paint(mGraphics g)
 {
     if (ChatPopup.serverChatPopUp != null)
     {
         return;
     }
     if (global::Char.myCharz().isUsePlane || global::Char.myCharz().isTeleport)
     {
         return;
     }
     Hint.paintArrowPointToHint(g);
     if (GameCanvas.menu.tDelay != 0)
     {
         return;
     }
     if (!Hint.isPaint)
     {
         return;
     }
     if (ChatPopup.scr != null)
     {
         return;
     }
     if (global::Char.ischangingMap)
     {
         return;
     }
     if (GameCanvas.currentScreen != GameScr.gI())
     {
         return;
     }
     if (GameCanvas.panel.isShow && GameCanvas.panel.cmx != 0)
     {
         return;
     }
     if (Hint.isCamera)
     {
         g.translate(-GameScr.cmx, -GameScr.cmy);
     }
     if (Hint.trans == 0)
     {
         g.drawImage(Panel.imgBantay, Hint.x - 15, Hint.y, 0);
     }
     if (Hint.trans == 1)
     {
         g.drawRegion(Panel.imgBantay, 0, 0, 14, 16, 2, Hint.x + 15, Hint.y, StaticObj.TOP_RIGHT);
     }
     if (Hint.paintFlare)
     {
         g.drawImage(ItemMap.imageFlare, Hint.x, Hint.y, 3);
     }
 }
Example #5
0
 // Token: 0x060003D5 RID: 981 RVA: 0x0001DF84 File Offset: 0x0001C184
 public void paint(mGraphics g, int transform, int f, int x, int y, int w, int h, int anchor, bool isClip)
 {
     if (mGraphics.getImageWidth(this.img) == 1)
     {
         return;
     }
     g.drawRegion(this.img, 0, f * w, w, h, transform, x, y, anchor, isClip);
     if (GameCanvas.gameTick % 1000 == 0)
     {
         this.timePaint++;
         this.timeUpdate = this.timePaint;
     }
 }
 // Token: 0x060008C3 RID: 2243 RVA: 0x0007F2A8 File Offset: 0x0007D4A8
 public static void paintTile(mGraphics g, int frame, int x, int y, int w, int h)
 {
     if (TileMap.imgTile == null)
     {
         return;
     }
     if (TileMap.imgTile.Length == 1)
     {
         g.drawRegion(TileMap.imgTile[0], 0, frame * w, w, w, 0, x, y, 0);
     }
     else
     {
         g.drawImage(TileMap.imgTile[frame], x, y, 0);
     }
 }
 // Token: 0x060008D9 RID: 2265 RVA: 0x0007FE4C File Offset: 0x0007E04C
 public override void paint(mGraphics g)
 {
     g.setColor(((int)this.type != 0) ? 3056895 : 0);
     g.fillRect(0, 0, GameCanvas.w, GameCanvas.h);
     for (int i = 0; i < this.n; i++)
     {
         g.setColor(((int)this.type != 0) ? 11140863 : 14802654);
         g.fillRect(this.posX[i], this.posY[i], 10, 2);
     }
     if ((int)this.type == 0)
     {
         g.drawRegion(TransportScr.ship, 0, 0, 72, 95, 7, this.cmx + this.currSpeed, GameCanvas.h / 2, 3);
     }
     if ((int)this.type == 1)
     {
         g.drawRegion(TransportScr.taungam, 0, 0, 144, 79, 2, this.cmx + this.currSpeed, GameCanvas.h / 2, 3);
     }
     for (int j = 0; j < this.n; j++)
     {
         g.setColor(((int)this.type != 0) ? 7536127 : 14935011);
         g.fillRect(this.posX2[j], this.posY2[j], 18, 3);
     }
     base.paint(g);
 }
    // Token: 0x060002C0 RID: 704 RVA: 0x00015E2C File Offset: 0x0001402C
    public static void paintOngMau(Image img0, Image img1, Image img2, int x, int y, int size, mGraphics g)
    {
        for (int i = 10; i <= size - 20; i += 10)
        {
            g.drawImage(img1, x + i, y, 0);
        }
        int num = size % 10;

        if (num > 0)
        {
            g.drawRegion(img1, 0, 0, num, 24, 0, x + size - 10 - num, y, 0);
        }
        g.drawImage(img0, x, y, 0);
        g.drawImage(img2, x + size - 10, y, 0);
    }
 // Token: 0x060008C2 RID: 2242 RVA: 0x0007F22C File Offset: 0x0007D42C
 public static void paintTile(mGraphics g, int frame, int indexX, int indexY)
 {
     if (TileMap.imgTile == null)
     {
         return;
     }
     if (TileMap.imgTile.Length == 1)
     {
         g.drawRegion(TileMap.imgTile[0], 0, frame * (int)TileMap.size, (int)TileMap.size, (int)TileMap.size, 0, indexX * (int)TileMap.size, indexY * (int)TileMap.size, 0);
     }
     else
     {
         g.drawImage(TileMap.imgTile[frame], indexX * (int)TileMap.size, indexY * (int)TileMap.size, 0);
     }
 }
Example #10
0
 // Token: 0x0600017E RID: 382 RVA: 0x0000E2CC File Offset: 0x0000C4CC
 public void drawString(mGraphics g, string st, int x, int y, int align)
 {
     if (mGraphics.zoomLevel == 1)
     {
         int length = st.Length;
         int num;
         if (align == 0)
         {
             num = x;
         }
         else if (align == 1)
         {
             num = x - this.getWidth(st);
         }
         else
         {
             num = x - (this.getWidth(st) >> 1);
         }
         for (int i = 0; i < length; i++)
         {
             int num2 = this.strFont.IndexOf(st[i] + string.Empty);
             if (num2 == -1)
             {
                 num2 = 0;
             }
             if (num2 > -1)
             {
                 int x2   = this.fImages[num2][0];
                 int num3 = this.fImages[num2][1];
                 int w    = this.fImages[num2][2];
                 int num4 = this.fImages[num2][3];
                 if (num3 + num4 > this.imgFont.texture.height)
                 {
                     num3 -= this.imgFont.texture.height;
                     x2    = this.imgFont.texture.width / 2;
                 }
                 g.drawRegion(this.imgFont, x2, num3, w, num4, 0, num, y, 20);
             }
             num += this.fImages[num2][2] + this.space;
         }
     }
     else
     {
         this.setTypePaint(g, st, x, y, align, 0);
     }
 }
 // Token: 0x06000321 RID: 801 RVA: 0x00018590 File Offset: 0x00016790
 public void paint(mGraphics g)
 {
     if (this.isAuraItem())
     {
         g.drawImage(TileMap.bong, this.x + 3, this.y, mGraphics.VCENTER | mGraphics.HCENTER);
         if ((int)this.status <= 0)
         {
             if (this.countAura < 10)
             {
                 g.drawImage(ItemMap.imageAuraItem1, this.x, this.y + (int)this.status + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
             }
             else
             {
                 g.drawImage(ItemMap.imageAuraItem2, this.x, this.y + (int)this.status + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
             }
         }
         else if (this.countAura < 10)
         {
             g.drawImage(ItemMap.imageAuraItem1, this.x, this.y + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         else
         {
             g.drawImage(ItemMap.imageAuraItem2, this.x, this.y + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
     }
     else if (!this.isAuraItem())
     {
         if (GameCanvas.gameTick % 4 == 0)
         {
             g.drawImage(ItemMap.imageFlare, this.x, this.y + (int)this.status + 13, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         if ((int)this.status <= 0)
         {
             SmallImage.drawSmallImage(g, (int)this.template.iconID, this.x, this.y + (int)this.status + 3, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         else
         {
             SmallImage.drawSmallImage(g, (int)this.template.iconID, this.x, this.y + 3, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         if (global::Char.myCharz().itemFocus != null && global::Char.myCharz().itemFocus.Equals(this) && (int)this.status != 2)
         {
             g.drawRegion(Mob.imgHP, 0, 24, 9, 6, 0, this.x, this.y - 17, 3);
         }
     }
 }
Example #12
0
 // Token: 0x060000DE RID: 222 RVA: 0x0000AB90 File Offset: 0x00008D90
 public void paintInputTf(mGraphics g, bool iss, int x, int y, int w, int h, int xText, int yText, string text, string info)
 {
     g.setColor(0);
     if (iss)
     {
         g.drawRegion(TField.imgTf, 0, 81, 29, 27, 0, x, y, 0);
         g.drawRegion(TField.imgTf, 0, 135, 29, 27, 0, x + w - 29, y, 0);
         g.drawRegion(TField.imgTf, 0, 108, 29, 27, 0, x + w - 58, y, 0);
         for (int i = 0; i < (w - 58) / 29; i++)
         {
             g.drawRegion(TField.imgTf, 0, 108, 29, 27, 0, x + 29 + i * 29, y, 0);
         }
     }
     else
     {
         g.drawRegion(TField.imgTf, 0, 0, 29, 27, 0, x, y, 0);
         g.drawRegion(TField.imgTf, 0, 54, 29, 27, 0, x + w - 29, y, 0);
         g.drawRegion(TField.imgTf, 0, 27, 29, 27, 0, x + w - 58, y, 0);
         for (int j = 0; j < (w - 58) / 29; j++)
         {
             g.drawRegion(TField.imgTf, 0, 27, 29, 27, 0, x + 29 + j * 29, y, 0);
         }
     }
     g.setClip(x + 3, y + 1, w - 4, h);
     if (text != null && !text.Equals(string.Empty))
     {
         mFont.tahoma_8b.drawString(g, text, xText, yText, 0);
     }
     else if (info != null)
     {
         if (iss)
         {
             mFont.tahoma_7b_focus.drawString(g, info, xText, yText, 0);
         }
         else
         {
             mFont.tahoma_7b_unfocus.drawString(g, info, xText, yText, 0);
         }
     }
 }
 // Token: 0x0600034D RID: 845 RVA: 0x000194C0 File Offset: 0x000176C0
 public override void paint(mGraphics g)
 {
     if (this.id == 0)
     {
         return;
     }
     SmallImage.drawSmallImage(g, this.id, this.cx, this.cy, 0, StaticObj.BOTTOM_HCENTER);
     if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
     {
         g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - SmallImage.smallImg[this.id][4] - 1, mGraphics.BOTTOM | mGraphics.HCENTER);
         if (this.name != null)
         {
             mFont.tahoma_7b_white.drawString(g, this.name, this.cx, this.cy - SmallImage.smallImg[this.id][4] - 20, mFont.CENTER, mFont.tahoma_7_grey);
         }
     }
     else if (this.name != null)
     {
         mFont.tahoma_7b_white.drawString(g, this.name, this.cx, this.cy - SmallImage.smallImg[this.id][4] - 17, mFont.CENTER, mFont.tahoma_7_grey);
     }
     try
     {
         for (int i = 0; i < this.currPeas; i++)
         {
             g.drawImage(MagicTree.pea, this.cx + this.peaPostionX[i] - SmallImage.smallImg[this.id][3] / 2, this.cy + this.peaPostionY[i] - SmallImage.smallImg[this.id][4], 0);
         }
     }
     catch (Exception ex)
     {
     }
     if (this.indexEffTask >= 0 && this.effTask != null && (int)this.cTypePk == 0)
     {
         SmallImage.drawSmallImage(g, this.effTask.arrEfInfo[this.indexEffTask].idImg, this.cx + this.effTask.arrEfInfo[this.indexEffTask].dx + SmallImage.smallImg[this.id][3] / 2 + 5, this.cy - 15 + this.effTask.arrEfInfo[this.indexEffTask].dy, 0, mGraphics.VCENTER | mGraphics.HCENTER);
         if (GameCanvas.gameTick % 2 == 0)
         {
             this.indexEffTask++;
             if (this.indexEffTask >= this.effTask.arrEfInfo.Length)
             {
                 this.indexEffTask = 0;
             }
         }
     }
 }
Example #14
0
 // Token: 0x06000752 RID: 1874 RVA: 0x0006288C File Offset: 0x00060A8C
 public virtual void paint(mGraphics g)
 {
     if (this.isShadown && this.status != 0)
     {
         this.paintShadow(g);
     }
     if (!this.isPaint())
     {
         return;
     }
     if (this.status == 1 && this.p3 > 0 && GameCanvas.gameTick % 3 == 0)
     {
         return;
     }
     g.translate(0, GameCanvas.transY);
     if (!this.changBody)
     {
         Mob.arrMobTemplate[this.templateId].data.paintFrame(g, this.frame, this.x, this.y + this.fy, (this.dir != 1) ? 1 : 0, 2);
     }
     else
     {
         SmallImage.drawSmallImage(g, (int)this.smallBody, this.x, this.y + this.fy - 14, 0, 3);
     }
     g.translate(0, -GameCanvas.transY);
     if (global::Char.myCharz().mobFocus != null && global::Char.myCharz().mobFocus.Equals(this) && this.status != 1)
     {
         int num = (int)((long)this.hp * 100L / (long)this.maxHp) / 10 - 1;
         if (num < 0)
         {
             num = 0;
         }
         if (num > 9)
         {
             num = 9;
         }
         g.drawRegion(Mob.imgHP, 0, 6 * (9 - num), 9, 6, 0, this.x, this.y - this.h - 10, 3);
     }
 }
Example #15
0
 // Token: 0x060003A5 RID: 933 RVA: 0x0001C5FC File Offset: 0x0001A7FC
 public static void paintPopUp(mGraphics g, int x, int y, int w, int h, int color, bool isButton)
 {
     if (!isButton)
     {
         g.setColor(0);
         g.fillRect(x + 6, y, w - 14 + 1, h);
         g.fillRect(x, y + 6, w, h - 12 + 1);
         g.setColor(color);
         g.fillRect(x + 6, y + 1, w - 12, h - 2);
         g.fillRect(x + 1, y + 6, w - 2, h - 12);
         g.drawRegion(PopUp.goc, 0, 0, 7, 6, 0, x, y, 0);
         g.drawRegion(PopUp.goc, 0, 0, 7, 6, 2, x + w - 7, y, 0);
         g.drawRegion(PopUp.goc, 0, 0, 7, 6, 1, x, y + h - 6, 0);
         g.drawRegion(PopUp.goc, 0, 0, 7, 6, 3, x + w - 7, y + h - 6, 0);
     }
     else
     {
         Image arg = (color != 1) ? PopUp.imgPopUp : PopUp.imgPopUp2;
         g.drawRegion(arg, 0, 0, 10, 10, 0, x, y, 0);
         g.drawRegion(arg, 0, 20, 10, 10, 0, x + w - 10, y, 0);
         g.drawRegion(arg, 0, 50, 10, 10, 0, x, y + h - 10, 0);
         g.drawRegion(arg, 0, 70, 10, 10, 0, x + w - 10, y + h - 10, 0);
         int num  = ((w - 20) % 10 != 0) ? ((w - 20) / 10 + 1) : ((w - 20) / 10);
         int num2 = ((h - 20) % 10 != 0) ? ((h - 20) / 10 + 1) : ((h - 20) / 10);
         for (int i = 0; i < num; i++)
         {
             g.drawRegion(arg, 0, 10, 10, 10, 0, x + 10 + i * 10, y, 0);
         }
         for (int j = 0; j < num2; j++)
         {
             g.drawRegion(arg, 0, 30, 10, 10, 0, x, y + 10 + j * 10, 0);
         }
         for (int k = 0; k < num; k++)
         {
             g.drawRegion(arg, 0, 60, 10, 10, 0, x + 10 + k * 10, y + h - 10, 0);
         }
         for (int l = 0; l < num2; l++)
         {
             g.drawRegion(arg, 0, 40, 10, 10, 0, x + w - 10, y + 10 + l * 10, 0);
         }
         g.setColor((color != 1) ? 16770503 : 12052656);
         g.fillRect(x + 10, y + 10, w - 20, h - 20);
     }
 }
Example #16
0
 // Token: 0x06000361 RID: 865 RVA: 0x0001A2A0 File Offset: 0x000184A0
 public override void paint(mGraphics g)
 {
     if (global::Char.isLoadingMap)
     {
         return;
     }
     if (this.isHide)
     {
         return;
     }
     if (!base.isPaint())
     {
         return;
     }
     if (this.statusMe == 15)
     {
         return;
     }
     if ((int)this.cTypePk != 0)
     {
         base.paint(g);
         return;
     }
     if (this.template == null)
     {
         return;
     }
     if (this.template.npcTemplateId != 4 && this.template.npcTemplateId != 51 && this.template.npcTemplateId != 50)
     {
         g.drawImage(TileMap.bong, this.cx, this.cy, 3);
     }
     if (this.template.npcTemplateId == 3)
     {
         SmallImage.drawSmallImage(g, 265, this.cx, this.cy, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
         if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
         {
             if (ChatPopup.currChatPopup == null)
             {
                 g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch + 4, mGraphics.BOTTOM | mGraphics.HCENTER);
             }
         }
         this.dyEff = 60;
     }
     else if (this.template.npcTemplateId != 4)
     {
         if (this.template.npcTemplateId == 50 || this.template.npcTemplateId == 51)
         {
             if (this.duahau != null)
             {
                 if (this.template.npcTemplateId == 50 && Npc.mabuEff)
                 {
                     Npc.tMabuEff++;
                     if (GameCanvas.gameTick % 3 == 0)
                     {
                         Effect me = new Effect(19, this.cx + Res.random(-50, 50), this.cy, 2, 1, -1);
                         EffecMn.addEff(me);
                     }
                     if (GameCanvas.gameTick % 15 == 0)
                     {
                         Effect me2 = new Effect(18, this.cx + Res.random(-5, 5), this.cy + Res.random(-90, 0), 2, 1, -1);
                         EffecMn.addEff(me2);
                     }
                     if (Npc.tMabuEff == 100)
                     {
                         GameScr.gI().activeSuperPower(this.cx, this.cy);
                     }
                     if (Npc.tMabuEff == 110)
                     {
                         Npc.mabuEff = false;
                         this.template.npcTemplateId = 4;
                     }
                 }
                 int num = 0;
                 if (SmallImage.imgNew[this.duahau[this.duaHauIndex]] != null && SmallImage.imgNew[this.duahau[this.duaHauIndex]].img != null)
                 {
                     num = mGraphics.getImageHeight(SmallImage.imgNew[this.duahau[this.duaHauIndex]].img);
                 }
                 SmallImage.drawSmallImage(g, this.duahau[this.duaHauIndex], this.cx + Res.random(-1, 1), this.cy, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
                 if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
                 {
                     if (ChatPopup.currChatPopup == null)
                     {
                         g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch - 9 + 16 - num, mGraphics.BOTTOM | mGraphics.HCENTER);
                     }
                     mFont.tahoma_7b_white.drawString(g, NinjaUtil.getTime(this.seconds), this.cx, this.cy - this.ch - 16 - mFont.tahoma_7.getHeight() - 20 - num + 16, mFont.CENTER, mFont.tahoma_7b_dark);
                 }
                 else
                 {
                     mFont.tahoma_7b_white.drawString(g, NinjaUtil.getTime(this.seconds), this.cx, this.cy - this.ch - 8 - mFont.tahoma_7.getHeight() - 20 - num + 16, mFont.CENTER, mFont.tahoma_7b_dark);
                 }
             }
         }
         else if (this.template.npcTemplateId == 6)
         {
             SmallImage.drawSmallImage(g, 545, this.cx, this.cy + 5, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
             if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
             {
                 if (ChatPopup.currChatPopup == null)
                 {
                     g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch - 9, mGraphics.BOTTOM | mGraphics.HCENTER);
                 }
             }
             mFont.tahoma_7b_white.drawString(g, TileMap.zoneID + string.Empty, this.cx, this.cy - this.ch + 19 - mFont.tahoma_7.getHeight(), mFont.CENTER);
         }
         else
         {
             int  headId = this.template.headId;
             int  legId  = this.template.legId;
             int  bodyId = this.template.bodyId;
             Part part   = GameScr.parts[headId];
             Part part2  = GameScr.parts[legId];
             Part part3  = GameScr.parts[bodyId];
             if (this.cdir == 1)
             {
                 SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, this.cx + global::Char.CharInfo[this.cf][0][1] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dx, this.cy - global::Char.CharInfo[this.cf][0][2] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dy, 0, 0);
                 SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].id, this.cx + global::Char.CharInfo[this.cf][1][1] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dx, this.cy - global::Char.CharInfo[this.cf][1][2] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dy, 0, 0);
                 SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].id, this.cx + global::Char.CharInfo[this.cf][2][1] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dx, this.cy - global::Char.CharInfo[this.cf][2][2] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dy, 0, 0);
             }
             else
             {
                 SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, this.cx - global::Char.CharInfo[this.cf][0][1] - (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dx, this.cy - global::Char.CharInfo[this.cf][0][2] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dy, 2, 24);
                 SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].id, this.cx - global::Char.CharInfo[this.cf][1][1] - (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dx, this.cy - global::Char.CharInfo[this.cf][1][2] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dy, 2, 24);
                 SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].id, this.cx - global::Char.CharInfo[this.cf][2][1] - (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dx, this.cy - global::Char.CharInfo[this.cf][2][2] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dy, 2, 24);
             }
             if (TileMap.mapID != 51)
             {
                 int num2 = 15;
                 if (this.template.npcTemplateId == 47)
                 {
                     num2 = 47;
                 }
                 if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
                 {
                     if (ChatPopup.currChatPopup == null)
                     {
                         g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch - (num2 - 8), mGraphics.BOTTOM | mGraphics.HCENTER);
                     }
                 }
                 else if (this.template.npcTemplateId == 47)
                 {
                 }
             }
             this.dyEff = 65;
         }
     }
     if (this.indexEffTask >= 0 && this.effTask != null && (int)this.cTypePk == 0)
     {
         SmallImage.drawSmallImage(g, this.effTask.arrEfInfo[this.indexEffTask].idImg, this.cx + this.effTask.arrEfInfo[this.indexEffTask].dx, this.cy + this.effTask.arrEfInfo[this.indexEffTask].dy - this.dyEff, 0, mGraphics.VCENTER | mGraphics.HCENTER);
         if (GameCanvas.gameTick % 2 == 0)
         {
             this.indexEffTask++;
             if (this.indexEffTask >= this.effTask.arrEfInfo.Length)
             {
                 this.indexEffTask = 0;
             }
         }
     }
     if (this.chatInfo != null)
     {
         this.chatInfo.paint(g, this.cx, this.cy - this.ch, this.cdir);
     }
 }
Example #17
0
    // Token: 0x0600088A RID: 2186 RVA: 0x0007CAE8 File Offset: 0x0007ACE8
    public override void paint(mGraphics g)
    {
        if (!ServerListScreen.loadScreen)
        {
            g.setColor(0);
            g.fillRect(0, 0, GameCanvas.w, GameCanvas.h);
            if (!ServerListScreen.bigOk)
            {
            }
        }
        else
        {
            GameCanvas.paintBGGameScr(g);
        }
        int num = 2;

        mFont.tahoma_7_white.drawString(g, "v" + GameMidlet.VERSION, GameCanvas.w - 2, num + 15, 1, mFont.tahoma_7_grey);
        if (!ServerListScreen.isGetData || ServerListScreen.loadScreen)
        {
            if (mSystem.clientType == 1 && !GameCanvas.isTouch)
            {
                mFont.tahoma_7_white.drawString(g, ServerListScreen.linkweb, GameCanvas.w - 2, GameCanvas.h - 15, 1, mFont.tahoma_7_grey);
            }
            else
            {
                mFont.tahoma_7_white.drawString(g, ServerListScreen.linkweb, GameCanvas.w - 2, num, 1, mFont.tahoma_7_grey);
            }
        }
        else
        {
            mFont.tahoma_7_white.drawString(g, ServerListScreen.linkweb, GameCanvas.w - 2, num, 1, mFont.tahoma_7_grey);
        }
        int w = GameCanvas.w;

        if (ServerListScreen.cmdDeleteRMS != null)
        {
            mFont.tahoma_7_white.drawString(g, mResources.xoadulieu, GameCanvas.w - 2, GameCanvas.h - 15, 1, mFont.tahoma_7_grey);
        }
        if (GameCanvas.currentDialog == null)
        {
            if (!ServerListScreen.loadScreen)
            {
                if (!ServerListScreen.bigOk)
                {
                    g.drawImage(LoginScr.imgTitle, GameCanvas.hw, GameCanvas.hh - 32, 3);
                    if (!ServerListScreen.isGetData)
                    {
                        mFont.tahoma_7b_white.drawString(g, mResources.taidulieudechoi, GameCanvas.hw, GameCanvas.hh + 24, 2);
                        if (ServerListScreen.cmdDownload != null)
                        {
                            ServerListScreen.cmdDownload.paint(g);
                        }
                    }
                    else
                    {
                        if (ServerListScreen.cmdDownload != null)
                        {
                            ServerListScreen.cmdDownload.paint(g);
                        }
                        mFont.tahoma_7b_white.drawString(g, mResources.downloading_data + ServerListScreen.percent + "%", GameCanvas.w / 2, GameCanvas.hh + 24, 2);
                        GameScr.paintOngMauPercent(GameScr.frBarPow20, GameScr.frBarPow21, GameScr.frBarPow22, (float)(GameCanvas.w / 2 - 50), (float)(GameCanvas.hh + 45), 100, 100f, g);
                        GameScr.paintOngMauPercent(GameScr.frBarPow0, GameScr.frBarPow1, GameScr.frBarPow2, (float)(GameCanvas.w / 2 - 50), (float)(GameCanvas.hh + 45), 100, (float)ServerListScreen.percent, g);
                    }
                }
            }
            else
            {
                int num2 = GameCanvas.hh - 15 * this.cmd.Length - 15;
                if (num2 < 25)
                {
                    num2 = 25;
                }
                if (LoginScr.imgTitle != null)
                {
                    g.drawImage(LoginScr.imgTitle, GameCanvas.hw, num2, 3);
                }
                for (int i = 0; i < this.cmd.Length; i++)
                {
                    this.cmd[i].paint(g);
                }
                g.setClip(0, 0, GameCanvas.w, GameCanvas.h);
                if (ServerListScreen.testConnect == -1)
                {
                    if (GameCanvas.gameTick % 20 > 10)
                    {
                        g.drawRegion(GameScr.imgRoomStat, 0, 14, 7, 7, 0, (GameCanvas.w - mFont.tahoma_7b_dark.getWidth(this.cmd[2 + this.nCmdPlay].caption) >> 1) - 10, this.cmd[2 + this.nCmdPlay].y + 10, 0);
                    }
                }
                else
                {
                    g.drawRegion(GameScr.imgRoomStat, 0, ServerListScreen.testConnect * 7, 7, 7, 0, (GameCanvas.w - mFont.tahoma_7b_dark.getWidth(this.cmd[2 + this.nCmdPlay].caption) >> 1) - 10, this.cmd[2 + this.nCmdPlay].y + 9, 0);
                }
            }
        }
        base.paint(g);
    }
Example #18
0
    // Token: 0x060002AF RID: 687 RVA: 0x00015000 File Offset: 0x00013200
    public void paint(mGraphics g)
    {
        if (global::Char.isLoadingMap)
        {
            return;
        }
        if (this.idImage == 279 && GameScr.gI().tMabuEff >= 110)
        {
            return;
        }
        int   cmx = GameScr.cmx;
        int   cmy = GameScr.cmy;
        Image image;

        if ((int)this.layer == 2 || (int)this.layer == 4)
        {
            image = (Image)BgItem.imgNew.get(this.idImage + string.Empty);
        }
        else if (!this.isNotBlend())
        {
            image = (Image)BgItem.imgNew.get(this.idImage + "blend" + this.layer);
        }
        else
        {
            image = (Image)BgItem.imgNew.get(this.idImage + string.Empty);
        }
        if (image != null)
        {
            if (this.idImage == 96)
            {
                return;
            }
            if ((int)this.layer == 4)
            {
                this.transX = -cmx / 2 + 100;
            }
            if (this.idImage == 28 && (int)this.layer == 3)
            {
                this.transX = -cmx / 3 + 200;
            }
            if ((this.idImage == 67 || this.idImage == 68 || this.idImage == 69 || this.idImage == 70) && (int)this.layer == 3)
            {
                this.transX = -cmx / 3 + 200;
            }
            if (this.isMiniBg() && (int)this.layer < 4)
            {
                this.transX = -(cmx >> 4) + 50;
                this.transY = (cmy >> 5) - 15;
            }
            int num  = this.x + this.dx + this.transX;
            int num2 = this.y + this.dy + this.transY;
            if (this.x + this.dx + image.getWidth() + this.transX >= cmx && this.x + this.dx + this.transX <= cmx + GameCanvas.w && this.y + this.dy + this.transY + image.getHeight() >= cmy && this.y + this.dy + this.transY <= cmy + GameCanvas.h)
            {
                g.drawRegion(image, 0, 0, mGraphics.getImageWidth(image), mGraphics.getImageHeight(image), this.trans, this.x + this.dx + this.transX, this.y + this.dy + this.transY, 0);
                if (this.idImage == 11 && TileMap.mapID != 122)
                {
                    g.setClip(num, num2 + 24, 48, 14);
                    for (int i = 0; i < 2; i++)
                    {
                        g.drawRegion(TileMap.imgWaterflow, 0, (GameCanvas.gameTick % 8 >> 2) * 24, 24, 24, 0, num + i * 24, num2 + 24, 0);
                    }
                    g.setClip(GameScr.cmx, GameScr.cmy, GameScr.gW, GameScr.gH);
                }
            }
            if (TileMap.isDoubleMap() && this.idImage > 137 && this.idImage != 156 && this.idImage != 159 && this.idImage != 157 && this.idImage != 165 && this.idImage != 167 && this.idImage != 168 && this.idImage != 169 && this.idImage != 170 && this.idImage != 238 && TileMap.pxw - (this.x + this.dx + this.transX) >= cmx && TileMap.pxw - (this.x + this.dx + this.transX + image.getWidth()) <= cmx + GameCanvas.w && this.y + this.dy + this.transY + image.getHeight() >= cmy && this.y + this.dy + this.transY <= cmy + GameCanvas.h && (this.idImage < 241 || this.idImage >= 266))
            {
                g.drawRegion(image, 0, 0, mGraphics.getImageWidth(image), mGraphics.getImageHeight(image), 2, TileMap.pxw - (this.x + this.dx + this.transX), this.y + this.dy + this.transY, StaticObj.TOP_RIGHT);
            }
        }
    }
Example #19
0
    // Token: 0x06000300 RID: 768 RVA: 0x00016E58 File Offset: 0x00015058
    public void paint(mGraphics g, int x, int y, int dir)
    {
        if (this.infoWaitToShow.size() != 0)
        {
            g.translate(x, y);
            if (this.says != null && this.says.Length != 0 && this.type != 1)
            {
                if (this.outSide)
                {
                    this.cx -= GameScr.cmx;
                    this.cy -= GameScr.cmy;
                    this.cy += 35;
                }
                int num = (mGraphics.zoomLevel != 1) ? 10 : 0;
                if (this.info.charInfo == null)
                {
                    PopUp.paintPopUp(g, this.X, this.Y, this.W, this.H, 16777215, false);
                }
                else
                {
                    mSystem.paintPopUp2(g, this.X - 23, this.Y - num / 2, this.W + 15, this.H + ((!GameCanvas.isTouch) ? 14 : 0) + num);
                }
                if (this.info.charInfo == null)
                {
                    g.drawRegion(Info.gocnhon, 0, 0, 9, 8, (dir != 1) ? 2 : 0, this.cx - 3 + ((dir != 1) ? 20 : -15), this.cy - this.ch - 20 + this.sayRun + 2, mGraphics.TOP | mGraphics.HCENTER);
                }
                int num2 = -1;
                int i    = 0;
                while (i < this.says.Length)
                {
                    mFont  mFont = mFont.tahoma_7;
                    string text  = this.says[i];
                    int    num4;
                    if (this.says[i].StartsWith("|"))
                    {
                        string[] array = Res.split(this.says[i], "|", 0);
                        if (array.Length == 3)
                        {
                            text = array[2];
                        }
                        if (array.Length == 4)
                        {
                            text = array[3];
                            int num3 = int.Parse(array[2]);
                        }
                        num4 = int.Parse(array[1]);
                        num2 = num4;
                    }
                    else
                    {
                        num4 = num2;
                    }
                    int num5 = num4;
                    switch (num5 + 1)
                    {
                    case 0:
                        mFont = mFont.tahoma_7;
                        break;

                    case 1:
                        mFont = mFont.tahoma_7b_dark;
                        break;

                    case 2:
                        mFont = mFont.tahoma_7b_green;
                        break;

                    case 3:
                        mFont = mFont.tahoma_7b_blue;
                        break;

                    case 4:
                        mFont = mFont.tahoma_7_red;
                        break;

                    case 5:
                        mFont = mFont.tahoma_7_green;
                        break;

                    case 6:
                        mFont = mFont.tahoma_7_blue;
                        break;

                    case 8:
                        mFont = mFont.tahoma_7b_red;
                        break;
                    }
IL_290:
                    if (this.info.charInfo == null)
                    {
                        mFont.drawString(g, text, this.cx, this.cy - this.ch - 15 + this.sayRun + i * 12 - this.says.Length * 12 - 9, 2);
                    }
                    else
                    {
                        int num6 = this.X - 23;
                        int num7 = this.Y - num / 2;
                        int num8 = (mSystem.clientType != 1) ? (this.W + 25) : (this.W + 28);
                        int num9 = this.H + ((!GameCanvas.isTouch) ? 14 : 0) + num;
                        g.setColor(4465169);
                        g.fillRect(num6, num7 + num9, num8, 2);
                        int num10 = this.info.timeCount * num8 / this.info.maxTime;
                        if (num10 < 0)
                        {
                            num10 = 0;
                        }
                        g.setColor(43758);
                        g.fillRect(num6, num7 + num9, num10, 2);
                        if (this.info.timeCount == 0)
                        {
                            return;
                        }
                        this.info.charInfo.paintHead(g, this.X + 10, this.Y + this.H / 2, 0);
                        if (mGraphics.zoomLevel == 1)
                        {
                            ((!this.info.isChatServer) ? mFont.tahoma_7b_greenSmall : mFont.tahoma_7b_yellowSmall2).drawString(g, this.info.charInfo.cName, this.X + 12, this.Y + 3, 0);
                        }
                        else
                        {
                            ((!this.info.isChatServer) ? mFont.tahoma_7b_greenSmall : mFont.tahoma_7b_yellowSmall2).drawString(g, this.info.charInfo.cName, this.X + 12, this.Y - 3, 0);
                        }
                        if (!GameCanvas.isTouch)
                        {
                            if (!TField.isQwerty)
                            {
                                mFont.tahoma_7b_green2Small.drawString(g, "Nhấn # để chat", this.X + this.W / 2 + 10, this.Y + this.H, mFont.CENTER);
                            }
                            else
                            {
                                mFont.tahoma_7b_green2Small.drawString(g, "Nhấn Y để chat", this.X + this.W / 2 + 10, this.Y + this.H, mFont.CENTER);
                            }
                        }
                        if (mGraphics.zoomLevel == 1)
                        {
                            TextInfo.paint(g, text, this.X + 14, this.Y + this.H / 2 + 2, this.W - 16, this.H, mFont.tahoma_7_whiteSmall);
                        }
                        else
                        {
                            string[] array2 = mFont.tahoma_7_whiteSmall.splitFontArray(text, 120);
                            for (int j = 0; j < array2.Length; j++)
                            {
                                mFont.tahoma_7_whiteSmall.drawString(g, array2[j], this.X + 12, this.Y + 12 + j * 12 - 3, 0);
                            }
                            GameCanvas.resetTrans(g);
                        }
                    }
                    i++;
                    continue;
                    goto IL_290;
                }
                if (this.info.charInfo != null)
                {
                }
            }
            g.translate(-x, -y);
        }
    }
    // Token: 0x0600061A RID: 1562 RVA: 0x0004B974 File Offset: 0x00049B74
    public override void paint(mGraphics g)
    {
        if (global::Char.isLoadingMap)
        {
            return;
        }
        GameCanvas.paintBGGameScr(g);
        g.translate(-GameScr.cmx, -GameScr.cmy);
        if (!GameCanvas.lowGraphic)
        {
            for (int i = 0; i < MapTemplate.vCurrItem[CreateCharScr.indexGender].size(); i++)
            {
                BgItem bgItem = (BgItem)MapTemplate.vCurrItem[CreateCharScr.indexGender].elementAt(i);
                if (bgItem.idImage != -1 && (int)bgItem.layer == 1)
                {
                    bgItem.paint(g);
                }
            }
        }
        TileMap.paintTilemap(g);
        int num = 30;

        if (GameCanvas.w == 128)
        {
            num = 20;
        }
        int num2 = CreateCharScr.hairID[CreateCharScr.indexGender][CreateCharScr.indexHair];
        int num3 = CreateCharScr.defaultLeg[CreateCharScr.indexGender];
        int num4 = CreateCharScr.defaultBody[CreateCharScr.indexGender];

        g.drawImage(TileMap.bong, this.cx, this.cy + this.dy, 3);
        Part part  = GameScr.parts[num2];
        Part part2 = GameScr.parts[num3];
        Part part3 = GameScr.parts[num4];

        SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, this.cx + global::Char.CharInfo[this.cf][0][1] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dx, this.cy - global::Char.CharInfo[this.cf][0][2] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dy + this.dy, 0, 0);
        SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].id, this.cx + global::Char.CharInfo[this.cf][1][1] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dx, this.cy - global::Char.CharInfo[this.cf][1][2] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dy + this.dy, 0, 0);
        SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].id, this.cx + global::Char.CharInfo[this.cf][2][1] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dx, this.cy - global::Char.CharInfo[this.cf][2][2] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dy + this.dy, 0, 0);
        if (!GameCanvas.lowGraphic)
        {
            for (int j = 0; j < MapTemplate.vCurrItem[CreateCharScr.indexGender].size(); j++)
            {
                BgItem bgItem2 = (BgItem)MapTemplate.vCurrItem[CreateCharScr.indexGender].elementAt(j);
                if (bgItem2.idImage != -1 && (int)bgItem2.layer == 3)
                {
                    bgItem2.paint(g);
                }
            }
        }
        g.translate(-g.getTranslateX(), -g.getTranslateY());
        if (GameCanvas.w < 200)
        {
            GameCanvas.paintz.paintFrame(GameScr.popupX, GameScr.popupY, GameScr.popupW, GameScr.popupH, g);
            SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[0][0][0]].id, GameCanvas.w / 2 + global::Char.CharInfo[0][0][1] + (int)part.pi[global::Char.CharInfo[0][0][0]].dx, GameScr.popupY + 30 + 3 * num - global::Char.CharInfo[0][0][2] + (int)part.pi[global::Char.CharInfo[0][0][0]].dy + this.dy, 0, 0);
            SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[0][1][0]].id, GameCanvas.w / 2 + global::Char.CharInfo[0][1][1] + (int)part2.pi[global::Char.CharInfo[0][1][0]].dx, GameScr.popupY + 30 + 3 * num - global::Char.CharInfo[0][1][2] + (int)part2.pi[global::Char.CharInfo[0][1][0]].dy + this.dy, 0, 0);
            SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[0][2][0]].id, GameCanvas.w / 2 + global::Char.CharInfo[0][2][1] + (int)part3.pi[global::Char.CharInfo[0][2][0]].dx, GameScr.popupY + 30 + 3 * num - global::Char.CharInfo[0][2][2] + (int)part3.pi[global::Char.CharInfo[0][2][0]].dy + this.dy, 0, 0);
            for (int k = 0; k < mResources.MENUNEWCHAR.Length; k++)
            {
                if (CreateCharScr.selected == k)
                {
                    g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 2, GameScr.popupX + 10 + ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), GameScr.popupY + 35 + k * num, StaticObj.VCENTER_HCENTER);
                    g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 0, GameScr.popupX + GameScr.popupW - 10 - ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), GameScr.popupY + 35 + k * num, StaticObj.VCENTER_HCENTER);
                }
                mFont.tahoma_7b_dark.drawString(g, mResources.MENUNEWCHAR[k], GameScr.popupX + 20, GameScr.popupY + 30 + k * num, 0);
            }
            mFont.tahoma_7b_dark.drawString(g, mResources.MENUGENDER[CreateCharScr.indexGender], GameScr.popupX + 70, GameScr.popupY + 30 + 1 * num, mFont.LEFT);
            mFont.tahoma_7b_dark.drawString(g, mResources.hairStyleName[CreateCharScr.indexGender][CreateCharScr.indexHair], GameScr.popupX + 55, GameScr.popupY + 30 + 2 * num, mFont.LEFT);
            CreateCharScr.tAddName.paint(g);
        }
        else
        {
            if (!Main.isPC)
            {
                if (mGraphics.addYWhenOpenKeyBoard != 0)
                {
                    this.yButton = 110;
                    this.disY    = 60;
                    if (GameCanvas.w > GameCanvas.h)
                    {
                        this.yButton = GameScr.popupY + 30 + 3 * num + (int)part3.pi[global::Char.CharInfo[0][2][0]].dy + this.dy - 15;
                        this.disY    = 35;
                    }
                }
                else
                {
                    this.yButton = 110;
                    this.disY    = 60;
                    if (GameCanvas.w > GameCanvas.h)
                    {
                        this.yButton = 100;
                        this.disY    = 45;
                    }
                }
                CreateCharScr.tAddName.y = this.yButton - CreateCharScr.tAddName.height - this.disY + 5;
            }
            else
            {
                this.yButton = 110;
                this.disY    = 60;
                if (GameCanvas.w > GameCanvas.h)
                {
                    this.yButton = 100;
                    this.disY    = 45;
                }
                CreateCharScr.tAddName.y = this.yBegin;
            }
            for (int l = 0; l < 3; l++)
            {
                int num5 = 78;
                if (l != CreateCharScr.indexGender)
                {
                    g.drawImage(GameScr.imgLbtn, GameCanvas.w / 2 - num5 + l * num5, this.yButton, 3);
                }
                else
                {
                    if (CreateCharScr.selected == 1)
                    {
                        g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 4, GameCanvas.w / 2 - num5 + l * num5, this.yButton - 20 + ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), StaticObj.VCENTER_HCENTER);
                    }
                    g.drawImage(GameScr.imgLbtnFocus, GameCanvas.w / 2 - num5 + l * num5, this.yButton, 3);
                }
                mFont.tahoma_7b_dark.drawString(g, mResources.MENUGENDER[l], GameCanvas.w / 2 - num5 + l * num5, this.yButton - 5, mFont.CENTER);
            }
            for (int m = 0; m < 3; m++)
            {
                int num6 = 78;
                if (m != CreateCharScr.indexHair)
                {
                    g.drawImage(GameScr.imgLbtn, GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY, 3);
                }
                else
                {
                    if (CreateCharScr.selected == 2)
                    {
                        g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 4, GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY - 20 + ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), StaticObj.VCENTER_HCENTER);
                    }
                    g.drawImage(GameScr.imgLbtnFocus, GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY, 3);
                }
                mFont.tahoma_7b_dark.drawString(g, mResources.hairStyleName[CreateCharScr.indexGender][m], GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY - 5, mFont.CENTER);
            }
            CreateCharScr.tAddName.paint(g);
        }
        g.setClip(0, 0, GameCanvas.w, GameCanvas.h);
        mFont.tahoma_7b_white.drawString(g, mResources.server + " " + LoginScr.serverName, 5, 5, 0, mFont.tahoma_7b_dark);
        if (!TouchScreenKeyboard.visible)
        {
            base.paint(g);
        }
    }
 // Token: 0x060008C5 RID: 2245 RVA: 0x0007F510 File Offset: 0x0007D710
 public static void paintTilemap(mGraphics g)
 {
     if (global::Char.isLoadingMap)
     {
         return;
     }
     GameScr.gI().paintBgItem(g, 1);
     for (int i = 0; i < GameScr.vItemMap.size(); i++)
     {
         ((ItemMap)GameScr.vItemMap.elementAt(i)).paintAuraItemEff(g);
     }
     for (int j = GameScr.gssx; j < GameScr.gssxe; j++)
     {
         for (int k = GameScr.gssy; k < GameScr.gssye; k++)
         {
             if (j != 0)
             {
                 if (j != TileMap.tmw - 1)
                 {
                     int num = TileMap.maps[k * TileMap.tmw + j] - 1;
                     if ((TileMap.tileTypeAt(j, k) & 256) != 256)
                     {
                         if ((TileMap.tileTypeAt(j, k) & 32) == 32)
                         {
                             g.drawRegion(TileMap.imgWaterfall, 0, 24 * (GameCanvas.gameTick % 8 >> 1), 24, 24, 0, j * (int)TileMap.size, k * (int)TileMap.size, 0);
                         }
                         else if ((TileMap.tileTypeAt(j, k) & 128) == 128)
                         {
                             g.drawRegion(TileMap.imgTopWaterfall, 0, 24 * (GameCanvas.gameTick % 8 >> 1), 24, 24, 0, j * (int)TileMap.size, k * (int)TileMap.size, 0);
                         }
                         else if (TileMap.tileID == 13)
                         {
                             if (!GameCanvas.lowGraphic)
                             {
                                 return;
                             }
                             if (num != -1)
                             {
                                 TileMap.paintTile(g, 0, j, k);
                             }
                         }
                         else
                         {
                             if (TileMap.tileID == 2 && (TileMap.tileTypeAt(j, k) & 512) == 512 && num != -1)
                             {
                                 TileMap.paintTile(g, num, j * (int)TileMap.size, k * (int)TileMap.size, 24, 1);
                                 TileMap.paintTile(g, num, j * (int)TileMap.size, k * (int)TileMap.size + 1, 24, 24);
                             }
                             if (TileMap.tileID == 3)
                             {
                             }
                             if ((TileMap.tileTypeAt(j, k) & 16) == 16)
                             {
                                 TileMap.bx  = j * (int)TileMap.size - GameScr.cmx;
                                 TileMap.dbx = TileMap.bx - GameScr.gW2;
                                 TileMap.dfx = ((int)TileMap.size - 2) * TileMap.dbx / (int)TileMap.size;
                                 TileMap.fx  = TileMap.dfx + GameScr.gW2;
                                 TileMap.paintTile(g, num, TileMap.fx + GameScr.cmx, k * (int)TileMap.size, 24, 24);
                             }
                             else if ((TileMap.tileTypeAt(j, k) & 512) == 512)
                             {
                                 if (num != -1)
                                 {
                                     TileMap.paintTile(g, num, j * (int)TileMap.size, k * (int)TileMap.size, 24, 1);
                                     TileMap.paintTile(g, num, j * (int)TileMap.size, k * (int)TileMap.size + 1, 24, 24);
                                 }
                             }
                             else if (num != -1)
                             {
                                 TileMap.paintTile(g, num, j, k);
                             }
                         }
                     }
                 }
             }
         }
     }
     if (GameScr.cmx < 24)
     {
         for (int l = GameScr.gssy; l < GameScr.gssye; l++)
         {
             int num2 = TileMap.maps[l * TileMap.tmw + 1] - 1;
             if (num2 != -1)
             {
                 TileMap.paintTile(g, num2, 0, l);
             }
         }
     }
     if (GameScr.cmx > GameScr.cmxLim)
     {
         int num3 = TileMap.tmw - 2;
         for (int m = GameScr.gssy; m < GameScr.gssye; m++)
         {
             int num4 = TileMap.maps[m * TileMap.tmw + num3] - 1;
             if (num4 != -1)
             {
                 TileMap.paintTile(g, num4, num3 + 1, m);
             }
         }
     }
 }
Example #22
0
 // Token: 0x060002D4 RID: 724 RVA: 0x000162B4 File Offset: 0x000144B4
 public static void paintArrowPointToHint(mGraphics g)
 {
     try
     {
         if (Hint.isPaintArrow)
         {
             if (Hint.x <= GameScr.cmx || Hint.x >= GameScr.cmx + GameScr.gW || Hint.y <= GameScr.cmy || Hint.y >= GameScr.cmy + GameScr.gH)
             {
                 if (GameCanvas.gameTick % 10 >= 5)
                 {
                     if (ChatPopup.currChatPopup == null)
                     {
                         if (ChatPopup.serverChatPopUp == null)
                         {
                             if (!GameCanvas.panel.isShow)
                             {
                                 if (Hint.isCamera)
                                 {
                                     int num  = Hint.x - global::Char.myCharz().cx;
                                     int num2 = Hint.y - global::Char.myCharz().cy;
                                     int num3 = 0;
                                     int num4 = 0;
                                     int arg  = 0;
                                     if (num > 0 && num2 >= 0)
                                     {
                                         if (Res.abs(num) >= Res.abs(num2))
                                         {
                                             num3 = GameScr.gW - 10;
                                             num4 = GameScr.gH / 2 + 30;
                                             if (GameCanvas.isTouch)
                                             {
                                                 num4 = GameScr.gH / 2 + 10;
                                             }
                                             arg = 0;
                                         }
                                         else
                                         {
                                             num3 = GameScr.gW / 2;
                                             num4 = GameScr.gH - 10;
                                             arg  = 5;
                                         }
                                     }
                                     else if (num >= 0 && num2 < 0)
                                     {
                                         if (Res.abs(num) >= Res.abs(num2))
                                         {
                                             num3 = GameScr.gW - 10;
                                             num4 = GameScr.gH / 2 + 30;
                                             if (GameCanvas.isTouch)
                                             {
                                                 num4 = GameScr.gH / 2 + 10;
                                             }
                                             arg = 0;
                                         }
                                         else
                                         {
                                             num3 = GameScr.gW / 2;
                                             num4 = 10;
                                             arg  = 6;
                                         }
                                     }
                                     if (num < 0 && num2 >= 0)
                                     {
                                         if (Res.abs(num) >= Res.abs(num2))
                                         {
                                             num3 = 10;
                                             num4 = GameScr.gH / 2 + 30;
                                             if (GameCanvas.isTouch)
                                             {
                                                 num4 = GameScr.gH / 2 + 10;
                                             }
                                             arg = 3;
                                         }
                                         else
                                         {
                                             num3 = GameScr.gW / 2;
                                             num4 = GameScr.gH - 10;
                                             arg  = 5;
                                         }
                                     }
                                     else if (num <= 0 && num2 < 0)
                                     {
                                         if (Res.abs(num) >= Res.abs(num2))
                                         {
                                             num3 = 10;
                                             num4 = GameScr.gH / 2 + 30;
                                             if (GameCanvas.isTouch)
                                             {
                                                 num4 = GameScr.gH / 2 + 10;
                                             }
                                             arg = 3;
                                         }
                                         else
                                         {
                                             num3 = GameScr.gW / 2;
                                             num4 = 10;
                                             arg  = 6;
                                         }
                                     }
                                     GameScr.resetTranslate(g);
                                     g.drawRegion(GameScr.arrow, 0, 0, 13, 16, arg, num3, num4, StaticObj.VCENTER_HCENTER);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
     }
 }