Example #1
0
    //描画
    public int drawImage(ImageData1 img, float x, float y)
    {
        //  x += swing_x;
        //  y += swing_y;

        int w, h;

        DX.GetGraphSize(img.call(), out w, out h);

        int flag = 0;

        //範囲内
        int rang = 60;

        //	int flag=0;
        if (x + w / 2 >= 0 - rang && x - w / 2 <= 0 + world_w + rang)
        {
            if (y + h / 2 >= 0 - rang && y - h / 2 <= 0 + world_h + rang)
            {
                flag = 1;
            }
        }


        if (flag == 1)
        {
            //return DX.DrawGraph((int)x-w/2,(int)y-h/2,img,1);
            return(this.drawImage(img, (int)x, (int)y, 1, 0));
        }
        else
        {
            return(-1);
        }
    }
Example #2
0
    public void drawrectImage(ImageData1 img, float x, float y, float x2, float y2, int w2, int h2)
    {
        x += swing_x;
        y += swing_y;

        int w, h;

        DX.GetGraphSize(img.call(), out w, out h);
        int flag = 0;

        //範囲内
        int rang = 1280;

        //	int flag=0;
        if (x + w / 2 >= 0 - rang && x - w / 2 <= 0 + world_w + rang)
        {
            if (y + h / 2 >= 0 - rang && y - h / 2 <= 0 + world_h + rang)
            {
                flag = 1;
            }
        }

        int n = 0;

        if (flag == 1)
        {
            n = DX.DrawRectGraph((int)x, (int)y, (int)x2, (int)y2, w2, h2, img.call(), 1, turnflag);
        }
        //    return n;
    }
Example #3
0
    public void character_draw(float dx, float dy, int type1, int free1, int large_type)
    {
        ImageData1 im1   = s1.image_save_character.loadcheck1(type1);
        int        slot1 = s1.data_magagement.character_draw_point.load_slot(type1);

        float large_meg = 1.00f;

        int w2 = im1.call_w();
        int h2 = im1.call_h();

        //    int dx2 = (int)dx;
        //    int dy2 = (int)dy;

        int dx2 = (int)dx + (int)(s1.data_magagement.character_draw_point.character_draw_point_child[slot1].x_move);
        int dy2 = (int)dy + (int)(s1.data_magagement.character_draw_point.character_draw_point_child[slot1].y_move);

        //   int shadow_y_move = (int)(s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].shadow_y_move);
        //   float shadow_large1 = s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].shadow_large;

        //キャラ描画
        {
            //    g1.setClear(127);
            g1.drawImage(im1, (int)dx2, (int)dy2, large_meg, 0);
            //    g1.setClearre();
        }
    }
Example #4
0
    public ImageSaveEnemy(Summary1 s1)
    {
        set1(s1);

        for (int t = 0; t < ENEMY_IMG_MAX; t++)
        {
            img1[t] = new ImageData1();
        }
    }
Example #5
0
    public ImageSaveEquipment(Summary1 s1)
    {
        set1(s1);

        for (int t = 0; t < IMG_MAX; t++)
        {
            img1[t] = new ImageData1();
        }
    }
Example #6
0
    public ImageSaveCharacterWindow(Summary1 s1)
    {
        set1(s1);

        for (int t = 0; t < img_max(); t++)
        {
            img1[t] = new ImageData1();
        }
    }
Example #7
0
    public ImageData1 make_draw_screen_img_re()
    {
        DX.SetDrawScreen(DX.DX_SCREEN_BACK);

        ImageData1 id1 = new ImageData1();

        id1.adress_set(screen_img1);

        return(id1);
    }
Example #8
0
    //作った画像は消しておく
    public void make_draw_img_del()
    {
        if (handlememo != -1)
        {
            ImageData1 img1 = new ImageData1();
            img1.adress_set(handlememo);

            delete_graph(img1);
        }
    }
Example #9
0
    public ImageSaveDungeonBg(Summary1 s1)
    {
        set1(s1);

        for (int t = 0; t < IMG_MAX; t++)
        {
            img2[t]      = new ImageData1();
            loadmemo2[t] = new int[1];
        }
    }
Example #10
0
    //そのイメージが存在するかどうか (1,存在 0,無し)
    public int image_check(ImageData1 img)
    {
        int check_flag = 1;

        if (img.call() == -1)
        {
            check_flag = 0;
        }

        return(check_flag);
    }
Example #11
0
    public ImageData1 split_image(ImageData1 img, int x, int y, int w, int h)
    {
        int nt1 = 0;

        ImageData1 imgdata1 = new ImageData1();

        nt1 = DX.DerivationGraph(x, y, w, h, img.call());

        imgdata1.adress_set(nt1);

        return(imgdata1);
    }
        public ImageData1 ConvertFromImageToImageData(Image image)
        {
            ImageData1 imageD = new ImageData1
            {
                AuctionId   = image.AuctionId,
                UserId      = image.UserId,
                Description = image.Description,
                FileName    = image.FileName,
                FileStream  = image.FileStream
            };

            return(imageD);
        }
Example #13
0
    //画像の読み込み
    public ImageData1 load_image(String name)
    {
        ImageData1 imgdata1 = new ImageData1();

        int nt = DX.LoadGraph(name);

        imgdata1.adress_set(nt);

        if (first_img_num == -1)
        {
            first_img_num = nt;
        }

        return(imgdata1);
    }
Example #14
0
    public int call_h()
    {
        //横幅が不明の時は生成
        if (h1 == 0)
        {
            int        type101 = type1;
            int        slot1   = s1.data_magagement.enemy_draw_point.load_slot(type101);
            ImageData1 im1     = s1.battle_run.battle_enemy_group.image_save_enemy.loadcheck1(type101);

            h1 = im1.call_h();
            h1 = (int)(1.0f * h1 * s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].enemy_large);
        }

        return(h1);
    }
Example #15
0
    public int drawImage(ImageData1 img, float x, float y, float large, float angle)
    {
        x += swing_x;
        y += swing_y;

        //	if (explode_f==true){x+=explode_x;y+=explode_y;}
        int w, h;

        DX.GetGraphSize(img.call(), out w, out h);

        int flag = 0;

        //範囲内
        int rang = 60;

        //	int flag=0;
        if (x + w / 2 >= 0 - rang && x - w / 2 <= 0 + world_w + rang)
        {
            if (y + h / 2 >= 0 - rang && y - h / 2 <= 0 + world_h + rang)
            {
                flag = 1;
            }
        }

        if (flag == 1)
        {
            if (large <= 0.99f || large >= 1.01f)
            {
                Anti_aliasing();
            }

            float PI  = 3.141592f;
            int   ntt = 0;

            ntt = DX.DrawRotaGraph((int)x, (int)y, large, -angle / 360 * PI * 2, img.call(), 1, turnflag);

            if (large <= 0.99f || large >= 1.01f)
            {
                Anti_aliasing_re();
            }

            return(ntt);
        }
        else
        {
            return(-1);
        }
    }
Example #16
0
    //そのキャラクターの横の長さを要求
    public int call_enemy_size_w(int type1)
    {
        int nt = 0;

        nt = 200;

        ImageData1 id1 = s1.battle_run.battle_enemy_group.image_save_enemy.loadcheck1(type1);

        int w2 = id1.call_w();

        nt = w2;

        //    nt = s.dm.call_chara_position(race1, 2);

        return(nt);
    }
Example #17
0
    //画像削除
    public int delete_graph(ImageData1 img)
    {
        int img2 = img.call();

        if (img2 != -1)
        {
            int nt1 = DX.DeleteGraph(img2);
            img.adress_delete1();

            return(nt1);
        }
        else
        {
            return(-1);
        }
    }
Example #18
0
    public int drawImage2(ImageData1 img, float x, float y)
    {
        x += swing_x;
        y += swing_y;

        //	if (explode_f==true){a+=explode_x;b+=explode_y;}
        int w, h;

        DX.GetGraphSize(img.call(), out w, out h);
        int flag = 0;

        //範囲内
        int rang = 10;//81;

        //	int flag=0;
        if (x + w >= 0 - rang && x <= 0 + world_w + rang)
        {
            if (y + h >= 0 - rang && y <= 0 + world_h + rang)
            {
                flag = 1;
            }
        }

        /*
         * int rang = 120;//81;
         * //	int flag=0;
         * if (x + w / 2 >= 0 - rang && x - w / 2 <= 0 + world_w + rang)
         * {
         *  if (y + h / 2 >= 0 - rang && y - h / 2 <= 0 + world_h + rang)
         *  {
         *      flag = 1;
         *  }
         * }
         */

        //	int w,h;
        //	GetGraphSize(mx ,&w ,&h);

        int n = 0;

        if (flag == 1)
        {
            n = DX.DrawGraph((int)x, (int)y, img.call(), 1);
        }
        return(n);
    }
Example #19
0
    public void init1()
    {
        for (int t = 0; t < TYPE; t++)
        {
            loadmemo[t] = new int[NUMBER_1];
        }

        for (int t = 0; t < TYPE; t++)
        {
            for (int t2 = 0; t2 < NUMBER_1; t2++)
            {
                loadmemo[t][t2] = 0;
            }
        }


        //多重配列宣言
        {
            for (int t = 0; t < TYPE; t++)
            {
                img[t] = new ImageData1[NUMBER_1][];
            }

            for (int t = 0; t < TYPE; t++)
            {
                for (int t1 = 0; t1 < NUMBER_1; t1++)
                {
                    img[t][t1] = new ImageData1[NUMBER_2];
                }
            }

            for (int t = 0; t < TYPE; t++)
            {
                for (int t1 = 0; t1 < NUMBER_1; t1++)
                {
                    for (int t2 = 0; t2 < NUMBER_2; t2++)
                    {
                        {
                            img[t][t1][t2] = new ImageData1();
                        }
                    }
                }
            }
        }
    }//init1
Example #20
0
    //画像読み込み2 分割されてない画像は、分割して読み込んだほうがDXライブラリでは速い…らしい
    //が、テストでは全く違いが感じられない
    //中身は、画像の読み込みと全く同じ
    public ImageData1 load_image2(String name)
    {
        int img1 = DX.LoadGraph(name);
        int w, h;

        DX.GetGraphSize(img1, out w, out h);

        int img2 = DX.DerivationGraph(0, 0, w, h, img1);

        ImageData1 imgdata1 = new ImageData1();
        ImageData1 imgdata2 = new ImageData1();

        imgdata1.adress_set(img1);
        imgdata2.adress_set(img2);

        delete_graph(imgdata1);

        return(imgdata2);
    }
Example #21
0
    /*
     * //メモリ開放
     * public void release()
     * {
     *  for (int t3 = 0; t3 < NUMBER_2; t3++)
     *  {
     *      if (img[t3] != -1)
     *      {
     *          g.delete_graph(img[t3]);
     *      }
     *
     *      img[t3] = -1;
     *  }
     * }
     */



    void split_load(string name, int type, int number, int type3, int x_num, int y_num)//, int sload)
    {
        if (m1.strlength(name) >= 1)
        {
            if (x_num <= 1 && y_num <= 1 || type3 >= 1)
            {
                {
                    img[type][number][type3] = g1.load_image(name);
                }
            }

            else if ((x_num >= 2 || y_num >= 2) && type3 == 0)
            {
                ImageData1 image = new ImageData1();
                image = g.load_image(name);

                if (x_num * y_num <= NUMBER_2)
                {// || send2==1){
                    for (int t3 = 1; t3 <= y_num; t3++)
                    {
                        for (int t2 = 1; t2 <= x_num; t2++)
                        {
                            int size_x, size_y;
                            //	DX.GetGraphSize(image,&size_x,&size_y);
                            DX.GetGraphSize(image.call(), out size_x, out size_y);

                            int xn = x_num;
                            int yn = y_num;

                            {
                                img[type][number][(t2 - 1) + (t3 - 1) * (xn)] = g.split_image(image, (t2 - 1) * size_x / xn, (t3 - 1) * size_y / yn, size_x / xn, size_y / yn);
                            }
                        }
                    }
                }

                g1.delete_graph(image);
            }
        }
    }
Example #22
0
    public int drawImage2(ImageData1 img, float x, float y, float large)
    {
        x += swing_x;
        y += swing_y;

        //	if (explode_f==true){a+=explode_x;b+=explode_y;}
        int w, h;

        DX.GetGraphSize(img.call(), out w, out h);
        //    int flag = 1;

        Anti_aliasing();

        //	int w,h;
        //	GetGraphSize(mx ,&w ,&h);

        float PI  = 3.141592f;
        int   nt1 = DX.DrawRotaGraph((int)(large * w / 2 + x), (int)(large * h / 2 + y), large, -0 / 360 * PI * 2, img.call(), 1, turnflag);

        Anti_aliasing_re();

        return(nt1);
    }
Example #23
0
        public override Room ReadRoom(long offset)
        {
            var size   = _reader.ReadUInt16();
            var tmp    = _reader.ReadBytes(2);
            var header = ReadRMHD();

            var room = new Room {
                Header = header, Size = size
            };

            // 6
            var img = new ImageData1();

            room.Image = img;
            img.Colors = _reader.ReadBytes(4);
            var charmapOffset  = _reader.ReadUInt16();
            var picMapOffset   = _reader.ReadUInt16();
            var colorMapOffset = _reader.ReadUInt16();
            var maskMapOffset  = _reader.ReadUInt16();
            var maskOffset     = _reader.ReadUInt16();

            // 20
            var numObjects = _reader.ReadByte();
            // 21
            var boxesOffset = _reader.ReadByte();
            // 22
            var numSounds = _reader.ReadByte();
            // 23
            var numScripts = _reader.ReadByte();
            // 24
            var exitScriptOffset = _reader.ReadUInt16();
            // 26
            var entryScriptOffset = _reader.ReadUInt16();
            var exitScriptLength  = entryScriptOffset - entryScriptOffset;
            var entryScriptLength = size - entryScriptOffset;
            // 28
            var objImgOffsets    = _reader.ReadUInt16s(numObjects);
            var objScriptOffsets = _reader.ReadUInt16s(numObjects);
            // load sounds
            var soundIds = _reader.ReadBytes(numSounds);
            // load scripts
            var scriptIds = _reader.ReadBytes(numScripts);

            var width  = header.Width / 8;
            var height = header.Height / 8;

            DecodeV1Gfx(offset + charmapOffset, img.CharMap, 2048);
            DecodeV1Gfx(offset + picMapOffset, img.PicMap, width * height);
            DecodeV1Gfx(offset + colorMapOffset, img.ColorMap, width * height);
            DecodeV1Gfx(offset + maskMapOffset, img.MaskMap, width * height);

            // Read the mask data. The 16bit length value seems to always be 8 too big.
            // See bug #1837375 for details on this.
            _reader.BaseStream.Seek(offset + maskOffset, SeekOrigin.Begin);
            DecodeV1Gfx(offset + maskOffset + 2, img.MaskChar, _reader.ReadUInt16() - 8);

            // read exit script
            if (exitScriptOffset > 0)
            {
                room.ExitScript.Data = ReadBytes(offset + exitScriptOffset, exitScriptLength);
            }
            else
            {
                room.ExitScript.Data = new byte[0];
            }

            // read entry script
            if (entryScriptOffset > 0)
            {
                room.EntryScript.Data = ReadBytes(offset + entryScriptOffset, entryScriptLength);
            }
            else
            {
                room.EntryScript.Data = new byte[0];
            }

            // read boxes
            ReadBoxes(offset + boxesOffset, room);

            // read objects
            if (numObjects > 0)
            {
                var firstOffset = objScriptOffsets.Min();
                for (var i = 0; i < numObjects; i++)
                {
                    var objOffset = objScriptOffsets[i];
                    var obj       = ReadObject(offset + objOffset);
                    room.Objects.Add(obj);
                }

                for (var i = 0; i < numObjects - 1; i++)
                {
                    var objImgOffset = objImgOffsets[i];
                    if (firstOffset != objImgOffset)
                    {
                        img = new ImageData1();
                        var obj = room.Objects[i];
                        DecodeV1Gfx(offset + objImgOffset, img.ObjectMap, (obj.Width / 8) * (obj.Height / 8) * 3);
                        obj.Images.Add(img);
                    }
                }
            }

            return(room);
        }
Example #24
0
    public void draw1()
    {
        //背景の描画
        {
            int px1 = 0;
            int py1 = 0;         //s1.base_run.base_call_y(2);
            int pw1 = 960 - 240; //s1.display_w_call();
            int ph1 = 540;       //s1.base_run.base_middle_h_call();

            //   if (s.base_run.base_type == s.base_run.DUNGEON_CLEAR)
            //   {
            //       py1 = 360 - ph1 / 2 + 44;
            //   }


            int py2 = py1 + ph1 / 2;


            int pic_num = 8;


            //now_img_multi_flag

            for (int t1 = 0; t1 <= 1; t1++)
            {
                int num1 = now_img_slot;
                if (t1 == 1)
                {
                    num1 = before_img_slot;
                }

                int multi_flag = now_img_multi_flag;
                if (t1 == 1)
                {
                    multi_flag = before_img_multi_flag;
                }

                int num3 = 255;

                if (t1 == 1)
                {
                    num3 = (int)(1.0f * 255 * clear_wait / clear_wait_max);
                    num3 = m1.iover(num3, 0, 255);

                    g1.setClear2(num3);
                }

                if (num1 >= 0 && num3 >= 1)
                {
                    if (multi_flag == 0)
                    {
                        g1.drawImage(ic1.loadcheck(pic_num, num1, 0), px1 + pw1 / 2, py2);
                    }
                    else
                    {
                        ImageData1 id1 = ic1.loadcheck(pic_num, num1, 0);

                        int pw2 = id1.call_w();
                        int ph2 = id1.call_h();

                        int num_x1 = pw1 / pw2;
                        int num_y1 = ph1 / ph2;

                        for (int t3 = 0; t3 < num_x1 + 1; t3++)
                        {
                            for (int t4 = 0; t4 < num_y1 + 1; t4++)
                            {
                                int x5 = px1 + pw1 / 2 + t3 * pw2 - num_x1 * pw2 / 2;
                                int y5 = py1 + ph1 / 2 + t4 * ph2 - num_y1 * ph2 / 2;

                                g1.drawImage(id1, x5, y5);
                            }
                        }
                    }
                }

                if (t1 == 1)
                {
                    g1.setClear2_re();
                }
            }
        }
    }//draw()
Example #25
0
    public void battle_enemy_draw(float dx, float dy, int type1, int free1, int shadow_flag, int shadow_yp, int lock_flag, float large_meg)
    {
        ImageData1 im1 = s1.battle_run.battle_enemy_group.image_save_enemy.loadcheck1(type1);

        int slot1 = s1.data_magagement.enemy_draw_point.load_slot(type1);

        if (large_meg <= 0.1f)
        {
            large_meg = 1.00f;
        }

        //ここで先に、敵キャラの表示の最終倍率を出しておく
        large_meg = large_meg * s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].enemy_large;



        int w2 = im1.call_w();
        int h2 = im1.call_h();

        //    int dx2 = (int)dx;
        //    int dy2 = (int)dy;

        int dx2 = (int)dx + (int)(s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].x_move);
        int dy2 = (int)dy + (int)(s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].y_move);

        int   shadow_y_move = (int)(s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].shadow_y_move);
        float shadow_large1 = s1.data_magagement.enemy_draw_point.enemy_draw_point_child[slot1].shadow_large;

        //影の描画
        if (shadow_flag == 1)
        {
            float large = shadow_large1 * w2 / 440 * 0.8f * large_meg;

            g1.drawImage(ic1.loadcheck(5, 0, 0), (int)dx, (int)dy + h2 / 2 + (shadow_y_move - 15) * 3 / 2, large * 0.9f, 0);

            //    g1.drawImage(ic1.loadcheck(5, 0, 0), (int)dx2, (int)dy + h2 / 2, large, 0);
        }

        //キャラ描画
        {
            //    g1.setClear(127);
            g1.drawImage(im1, (int)dx2, (int)dy2, large_meg, 0);
            //    g1.setClearre();
        }

        //ロックオン
        if (lock_flag != 0)
        {
            //    if (num1 == s1.battle_run.battle_enemy_group.target_lock_num)
            {
                int x4 = (int)dx;
                int y4 = (int)dy;

                float la3 = 1.0f;//0.80f;
                float th3 = -(int)(0.5f * s1.tm1);

                g1.setClear2(168);

                g1.drawImage(ic1.loadcheck(5, 4, 0), x4, y4, la3, th3);

                //    g1.str2("" + g1.clear_count ,x4, y4);

                g1.setClear2_re();

                //    g1.str2("" + g1.clear_count, x4, y4);
                //    g1.str2("" + g1.clear_memo, x4, y4+20);
            }
        }
    }
Example #26
0
    public void draw1()
    {
        if (on != 0)
        {
            clear_change.clear_call();

            g1.setfont(g1.FONT_1_SMALL_STR);


            int type1 = s1.character_group.character1[character_link].call_type1();

            int nn1 = 19;

            //背景
            {
                for (int t1 = 0; t1 < 2; t1++)
                {
                    for (int t2 = 0; t2 < 2; t2++)
                    {
                        g1.drawrectImage(ic1.loadcheck(0, 2, 0), 0 + t1 * 480, 0 + t2 * 480, 480, 480);
                    }
                }
            }

            {
                int rect_draw_flag = 0;
                if (rect_draw_flag == 1)
                {
                    for (int t1 = 0; t1 < MENU_AREA1_MAX; t1++)
                    {
                        int x3 = area1_x[t1];
                        int y3 = area1_y[t1];
                        int w3 = area1_w[t1];
                        int h3 = area1_h[t1];

                        g1.sc(255);
                        g1.drawRect(x3, y3, w3, h3, 0, 0);
                    }
                }


                int w1 = 135 * 3;


                //    g1.sc(255);
                //   g1.drawRect(0, 0, w1, 540, 0, 0);
            }

            //キャラ描画
            {
                ImageData1 id1 = s1.image_save_character.loadcheck1(type1); //ic1.loadcheck(0, 0, 0);

                float la3 = 1.0f;                                           //0.50f;//0.55f;//

                int w1 = (int)(la3 * id1.call_w());
                int h1 = (int)(la3 * id1.call_h());

                int x4 = 0 + w1 / 2 + 40; //-32;
                int y4 = 0 + h1 / 2 + 72; //60;

                s1.dm1.character_draw(x4, y4, type1, 0, 0);

                /*
                 * ImageData1 id1 = s1.image_save_character.loadcheck1(type1);//ic1.loadcheck(0, 0, 0);
                 *
                 * float la3 = 1.0f;//0.50f;//0.55f;//
                 *
                 * int w1 = (int)(la3 * id1.call_w());
                 * int h1 = (int)(la3 * id1.call_h());
                 *
                 * int x4 = 0 + w1 / 2 - 32;//- 70;//- 95;//- 65;//100;
                 * int y4 = 0 + h1 / 2 + 60; //+ 60;//+ 60;//70;
                 *
                 * float th3 = 0;
                 *
                 * g1.drawImage(id1, x4, y4, la3, th3);
                 */
            }

            {
                int x31 = area1_x[1];
                int y31 = area1_y[1];//area1_y[2] + 0

                int w31 = area1_w[1];
                int h31 = area1_h[1];


                String name1 = s1.data_magagement.character_data.character_name(type1);

                g1.sc(255);
                g1.str2(name1, x31 + 16 + 64, y31 + 6);

                int att1 = s1.character_group.character1[character_link].call_attribute_1();
                int att2 = s1.character_group.character1[character_link].call_attribute_2();

                float large1 = 0.70f;
                int   ny1    = y31 + 16 - 1;
                s1.dm1.attribute_draw(x31 + 16 + 4, ny1, att1, large1, 0, 0);
                s1.dm1.attribute_draw(x31 + 16 + 4 + 30, ny1, att2, large1, 0, 0);
            }

            {
                int nnp1   = 4;
                int move_y = 10;


                //    s1.dm1.boxdraw3(x41 + nnp1, y41 + nnp1, w41, h41, 0, 1);

                int x51 = area1_x[2];
                int y51 = area1_y[2] + 0 + move_y;//204 + 16;

                int w51 = area1_w[2] - nnp1 * 2;
                int h51 = area1_h[2] - nnp1 * 2;

                s1.dm1.boxdraw3(x51 + nnp1, y51 + nnp1, w51, 80, 0, 1);

                {
                    int nnp2 = 16;

                    int x52 = x51 + nnp1 + nnp2;
                    int y52 = y51 + nnp1 + nnp2;

                    //    g1.str2("Lv :100 HP :1000 MP : 100", x52, y52 + line_h() * 0);
                    //    g1.str2("TEC:100 ATK: 100 INT: 100", x52, y52 + line_h() * 1);

                    int[]    numbox1 = { 0, 0, 0, 0, 0, 0 };
                    String[] strbox1 = { "", "", "", "", "", "" };

                    {
                        numbox1[0] = s1.character_group.character1[character_link].call_level();
                        numbox1[1] = s1.character_group.character1[character_link].call_mhp();
                        numbox1[2] = s1.character_group.character1[character_link].call_mmp();
                        numbox1[3] = s1.character_group.character1[character_link].call_tec();
                        numbox1[4] = s1.character_group.character1[character_link].call_atk();
                        numbox1[5] = s1.character_group.character1[character_link].call_int();
                    }

                    for (int t1 = 0; t1 < 6; t1++)
                    {
                        strbox1[t1] = m1.num_half_full_change(numbox1[t1]);

                        if (t1 % 3 == 0)
                        {
                            strbox1[t1] = m1.add_space_str1(strbox1[t1], 3, 0, " ");
                        }
                        else
                        {
                            strbox1[t1] = m1.add_space_str1(strbox1[t1], 4, 0, " ");
                        }
                    }

                    g1.str2("Lv :" + strbox1[0], x52, y52 + line_h() * 0);
                    g1.str2("HP :" + strbox1[1], x52 + 8 * nn1, y52 + line_h() * 0);
                    g1.str2("MP :" + strbox1[2], x52 + 17 * nn1, y52 + line_h() * 0);

                    //    g1.str2("TEC:" + strbox1[3], x52, y52 + line_h() * 1);
                    g1.str2("ATK:" + strbox1[4], x52 + 8 * nn1, y52 + line_h() * 1);
                    g1.str2("INT:" + strbox1[5], x52 + 17 * nn1, y52 + line_h() * 1);
                }



                int x41 = area1_x[2];
                int y41 = area1_y[2] + 80 + 16 + move_y;

                int w41 = area1_w[2] - nnp1 * 2;
                int h41 = area1_h[2] - nnp1 * 2;


                s1.dm1.boxdraw3(x41 + nnp1, y41 + nnp1, w41, 204, 0, 1);

                {
                    g1.sc(255);

                    //  g1.str2("てすとです", x41 + nnp1 * 2, y41 + nnp1 * 2);

                    {
                        int nnp2 = 16;

                        int x42 = x41 + nnp1 + nnp2;
                        int y42 = y41 + nnp1 + nnp2;


                        g1.str2("装備:", x42, y42);

                        //     g1.str2("適正ランク:A", x42 + area1_w[2] / 2, y42);

                        /*
                         * for (int t2 = 0; t2 < 2; t2++)
                         * {
                         *  for (int t1 = 0; t1 < 2; t1++)
                         *  {
                         *      g1.str2("○12345678901", x42 + t1 * (area1_w[2] - 16) / 2, y42 + line_h() * (t2 + 1));
                         *  }
                         * }
                         */

                        for (int t2 = 0; t2 < 4; t2++)
                        {
                            String name1   = "";
                            int    eq_link = s1.character_group.character1[character_link].call_equipment_link(t2);

                            if (eq_link != s1.am1.equipment_null_num())
                            {
                                if (s1.equipment_group.equipment_null_check(eq_link) == 0)
                                {
                                    name1 = s1.equipment_group.equipment1[eq_link].call_name();
                                }
                            }
                            else
                            {
                                name1 = "---------";
                            }

                            g1.str2("" + name1, x42, y42 + line_h() * (t2 + 1));
                        }

                        int    tec1     = s1.character_group.character1[character_link].call_tec();
                        String tec_str1 = m1.num_half_full_change(tec1);
                        tec_str1 = m1.add_space_str1(tec_str1, 3, 0, " ");

                        g1.str2("TEC:" + tec_str1, x42 + 17 * nn1, y42 + line_h() * (4 + 1));
                    }


                    /*
                     * {
                     *  int nnp2 = 16;
                     *
                     *  int x43 = x41 + nnp1 + nnp2;
                     *  int y43 = y41 + nnp1 + nnp2 + line_h() * 3 + 10;
                     *
                     *  g1.str2("アビリティ:", x43, y43);
                     *
                     *  for (int t1 = 0; t1 < 10; t1++)
                     *  {
                     *      int nnp3 = 48;
                     *      int nnp4 = 40;
                     *      int x44 = x43 + t1 * nnp3;
                     *      int y44 = y43 + line_h();
                     *
                     *      g1.sc(255);
                     *      g1.drawRect(x44, y44, nnp4, nnp4, 0, 0);
                     *  }
                     * }
                     */
                }


                int x61 = area1_x[2];
                int y61 = area1_y[2] + 284 + 16 + 16 * 1 + move_y;

                int w61 = area1_w[2] - nnp1 * 2;
                int h61 = area1_h[2] - nnp1 * 2;

                s1.dm1.boxdraw3(x61 + nnp1, y61 + nnp1, w61, 180, 0, 1);

                {
                    int nnp2 = 16;

                    int x62 = x61 + nnp1 + nnp2;
                    int y62 = y61 + nnp1 + nnp2;

                    int pp1 = 10;

                    //     g1.str2("スキル1:1234567890  MP:1000", x62, y62 + line_h() * 0 + pp1 * 0);
                    //     g1.str2("スキル2:1234567890  MP:1000", x62, y62 + line_h() * 1 + pp1 * 0);

                    {
                        String skill_1_name = "";
                        int    skill_num1   = s1.character_group.character1[character_link].call_skill_1();
                        skill_1_name = s1.data_magagement.skill_data.skill_name(skill_num1);

                        g1.str2("スキル:" + skill_1_name, x62, y62 + line_h() * 0 + pp1 * 0);


                        int    mp1    = s1.character_group.character1[character_link].call_skill_1_need_point();
                        String mp_str = m1.num_half_full_change(mp1);
                        mp_str = m1.add_space_str1(mp_str, 4, 0, " ");

                        g1.str2("MP :" + mp_str, x62 + nn1 * 16, y62 + line_h() * 0 + pp1 * 0);

                        String skill_explanation1 = "";//"1234567890123456789012345";

                        skill_explanation1 = s1.data_magagement.skill_data.skill_explanation1(skill_num1) + "";
                        if (m1.strbyte(s1.data_magagement.skill_data.skill_explanation2(skill_num1)) >= 1)
                        {
                            skill_explanation1 += "。" + s1.data_magagement.skill_data.skill_explanation2(skill_num1);
                        }

                        if (m1.strbyte(skill_explanation1) >= 50)
                        {
                            skill_explanation1 = m1.substring(skill_explanation1, 0, 23) + "…";
                        }

                        g1.str2(skill_explanation1, x62, y62 + line_h() * 1);
                    }

                    {
                        String enchantment_1_name = "";
                        String enchantment_1_exp1 = "";
                        String enchantment_1_exp2 = "";
                        int    enchantment_1_num  = s1.character_group.character1[character_link].call_enchantment();

                        enchantment_1_name = s1.data_magagement.enchantment_data.enchantment_name(enchantment_1_num);
                        enchantment_1_exp1 = s1.data_magagement.enchantment_data.enchantment_explanation1(enchantment_1_num);
                        enchantment_1_exp2 = s1.data_magagement.enchantment_data.enchantment_explanation2(enchantment_1_num);

                        g1.str2("エンチャント:" + enchantment_1_name, x62, y62 + line_h() * 2 + pp1 * 1);
                        g1.str2(enchantment_1_exp1, x62, y62 + line_h() * 3 + pp1 * 1);
                        g1.str2(enchantment_1_exp2, x62, y62 + line_h() * 4 + pp1 * 1);

                        //    g1.str2("エンチャント:1234567890", x62, y62 + line_h() * 2 + pp1 * 1);
                        //    g1.str2("123456789012345678901234", x62, y62 + line_h() * 3 + pp1 * 1);
                        //    g1.str2("123456789012345678901234", x62, y62 + line_h() * 4 + pp1 * 1);
                    }

                    /*
                     * for (int t1 = 0; t1 < 7; t1++)
                     * {
                     *  g1.str2("123", x52, y52 + line_h() * t1);
                     * }*/
                }
            }

            {
                int x91 = area1_x[3] + 16;
                int y91 = area1_y[3];

                int w91 = area1_w[3];
                int h91 = area1_h[3];

                /*
                 * g1.setClear2(160);
                 * g1.sc(32);
                 * g1.drawRect(x91, y91, w91, h91, 0, 1);
                 * g1.setClear2_re();
                 */

                for (int t2 = 0; t2 < 2; t2++)
                {
                    g1.drawrectImage(ic1.loadcheck(0, 1, 0), x91, y91 + t2 * 480, 40 + 6, 0, 240, 480);
                }

                //   for (int t2 = 0; t2 < 8; t2++)

                /*
                 * for (int t2 = 0; t2 < 5; t2++)
                 * {
                 *  int np5 = 48;
                 *  int x92 = x91;
                 *  int y92 = y91;
                 *  int w92 = np5;
                 *  int h92 = np5;
                 *  int h93 = 66;
                 *
                 *  g1.sc(255);
                 *  g1.drawRect(x92 + 14, 16 + h93 * t2, w92, h92, 0, 0);
                 *
                 *  if (t2 == 0)
                 *  {
                 *      g1.str2("戻る", x92 + 14, 16 + h93 * t2);
                 *  }
                 *
                 *  if (t2 == 7)
                 *  {
                 *      g1.str2("☆", x92 + 14, 16 + h93 * t2);
                 *  }
                 * }
                 */

                for (int t2 = 0; t2 < 5; t2++)
                {
                    int x92       = area3_x[t2];
                    int y92       = area3_y[t2];
                    int w92       = area3_w[t2];
                    int h92       = area3_h[t2];
                    int draw_flag = 0;

                    if (t2 >= 1 && t2 <= 6 && no_setting_flag != 0)
                    {
                        g1.setClear2(128);
                    }


                    if (t2 == 0)
                    {
                        g1.sc(255);
                        g1.str2("←戻る", x92 - 4, y92 + 12);
                    }

                    if (t2 >= 1 && t2 <= 4)
                    {
                        int slot1    = t2 - 1;
                        int eq_link1 = s1.character_group.character1[character_link].call_equipment_link(slot1);

                        if (eq_link1 == s1.am1.equipment_null_num())
                        {
                        }
                        else
                        {
                            int etype1 = s1.equipment_group.equipment1[eq_link1].call_type1();
                            int att1   = s1.equipment_group.equipment1[eq_link1].call_attribute_1();
                            int att2   = s1.equipment_group.equipment1[eq_link1].call_attribute_2();

                            draw_flag = 1;
                            s1.dm1.equipment_draw(x92, y92, etype1, 0, 0, att1, att2, 0);


                            //    g1.sc(255);
                            //    g1.str2(""+type1,x92, y92);
                        }
                    }



                    if (draw_flag == 0)
                    {
                        if (t2 >= 1)
                        {
                            g1.sc(255);
                            g1.drawRect(x92, y92, w92, h92, 0, 0);
                        }
                    }

                    if (t2 >= 1 && t2 <= 6 && no_setting_flag != 0)
                    {
                        g1.setClear2_re();
                    }
                }

                g1.drawImage2(ic1.loadcheck(1, 21, 0), x91 - 8, 0);
            }

            g1.setfont_re();

            clear_change.clear_call_re();
        } //on
    }     //draw1()
Example #27
0
 public void drawImage2(ImageData1 mx, float x1, float y1, float w1, float h1)
 {
     drawImage(mx, x1, y1, x1 + w1, y1, x1 + w1, y1 + h1, x1, y1 + h1);
 }
Example #28
0
 public void drawImage(ImageData1 mx, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
 {
     DX.DrawModiGraph((int)x1, (int)y1, (int)x2, (int)y2, (int)x3, (int)y3, (int)x4, (int)y4, mx.call(), DX.TRUE);
 }