Пример #1
0
        /*-------------------------------------------------------------------------
         *
         * ---------------------------------------------------------------------------*/
        public void Dispose()
        {
            if (m_loop_x_image != null)
            {
                m_loop_x_image.Dispose();
            }
            if (m_icons != null)
            {
                m_icons.Dispose();
            }
            if (m_infonameimage != null)
            {
                m_infonameimage.Dispose();
            }
            if (m_seainfonameimage != null)
            {
                m_seainfonameimage.Dispose();
            }

            // 最後にD3Ddeviceを破棄する
            if (m_d3d_device != null)
            {
                m_d3d_device.Dispose();
            }

            m_loop_x_image     = null;
            m_icons            = null;
            m_infonameimage    = null;
            m_seainfonameimage = null;

            m_d3d_device = null;
        }
Пример #2
0
        /*-------------------------------------------------------------------------
         * 海域名描画
         * ---------------------------------------------------------------------------*/
        private void draw_seaname_proc(Vector2 offset, LoopXImage image)
        {
            d3d_sprite_rects.rect _rect = m_lib.seainfonameimage.GetWindArrowIcon();
            int color1 = (m_world.Season.now_season == gvo_season.season.summer)? -1: (96 << (8 * 3)) | 0x00ffffff;
            int color2 = (m_world.Season.now_season == gvo_season.season.winter)? -1: (96 << (8 * 3)) | 0x00ffffff;

            int index = 0;

            foreach (GvoWorldInfo.Info i in m_world.Seas)
            {
                Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);
                // 海域名
                m_lib.device.sprites.AddDrawSprites(new Vector3(p.X - 6, p.Y, 0.3f), m_lib.seainfonameimage.GetRect(index));
                index++;

                // 風向き描画
                if (i.SeaInfo == null)
                {
                    continue;
                }
                p.X += i.SeaInfo.WindPos.X - i.position.X;
                p.Y += i.SeaInfo.WindPos.Y - i.position.Y;
                m_lib.device.sprites.AddDrawSpritesNC(new Vector3(p.X - 6, p.Y, 0.3f), _rect, i.SeaInfo.SummerAngle, color1);
                m_lib.device.sprites.AddDrawSpritesNC(new Vector3(p.X + 6, p.Y, 0.3f), _rect, i.SeaInfo.WinterAngle, color2);
            }
        }
Пример #3
0
        /*-------------------------------------------------------------------------
         * 線描画
         * 1000刻みでの線となる
         * ---------------------------------------------------------------------------*/
        static public void DrawLines(gvt_lib lib)
        {
            lib.loop_image.EnumDrawCallBack(new LoopXImage.DrawHandler(draw_lines_proc), 0);

            // 縦方向は1回の描画でよい
            LoopXImage image  = lib.loop_image;
            Vector2    size   = image.Device.client_size;
            Vector2    offset = image.GetDrawOffset();

            int index = 0;

            for (float y = 0; y < def.GAME_HEIGHT; y += 1000, index++)
            {
                // 地図座標に変換
                Vector2 pos0 = transform.game_pos2_map_pos(new Vector2(0, y), image);
                Vector2 pos  = image.GlobalPos2LocalPos(pos0, offset);

                if (pos.Y < 0)
                {
                    continue;
                }
                if (pos.Y >= size.Y)
                {
                    continue;
                }

                image.Device.DrawLine(new Vector3(0, pos.Y, 0.79f), new Vector2(size.X, pos.Y), Color.FromArgb(128, 0, 0, 0).ToArgb());
            }
        }
Пример #4
0
        /*-------------------------------------------------------------------------
         *
         * ---------------------------------------------------------------------------*/
        public gvt_lib(System.Windows.Forms.Form form, string ini_file_name)
        {
            // 設定項目の読み書き管理
            m_ini_manager = new IniProfileSetting(ini_file_name);

            // 設定項目
            m_setting = new GlobalSettings();
            // キー割り当て管理
            m_key_assign_manager = new KeyAssignManager();

            // 登録
            m_ini_manager.AddIniSaveLoad(m_setting);
            m_ini_manager.AddIniSaveLoad(m_key_assign_manager, "key_assign");

            // メインウインドウ描画用
            m_d3d_device          = new d3d_device(form);
            m_d3d_device.skip_max = def.SKIP_DRAW_FRAME_MAX;                                    // 描画スキップ数

            // 地図管理
            m_loop_x_image = new LoopXImage(m_d3d_device);

            // アイコン管理
            m_icons = new icons(m_d3d_device, def.ICONSIMAGE_FULLNAME);
            // 街等の文字の絵管理
            m_infonameimage = new infonameimage(m_d3d_device, def.INFONAMEIMAGE_FULLNAME);
            // 海域の文字の絵管理
            m_seainfonameimage = new seainfonameimage(m_d3d_device, def.SEAINFONAMEIMAGE_FULLNAME);

            // キー割り当て初期化
            init_key_assign();
        }
Пример #5
0
        private void draw_namerects(Vector2 offset, LoopXImage image, hittest_list list)
        {
            foreach (GvoWorldInfo.Info i in list)
            {
                if (i.NameRect == null)
                {
                    continue;
                }

                Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);

                if (m_lib.setting.map_icon == MapIcon.Big)
                {
                    // 대 아이콘
                    p.X += i.StringOffset1.X;
                    p.Y += i.StringOffset1.Y;
                }
                else
                {
                    // 소 아이콘
                    p.X += i.StringOffset2.X;
                    p.Y += i.StringOffset2.Y;
                }

                m_lib.device.sprites.AddDrawSpritesNC(new Vector3(p.X, p.Y, 0.3f), i.NameRect, i.angle, -1);
            }
        }
Пример #6
0
        private void draw_seaicon_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_draw_names == MapDrawNames.Hide)
            {
                return;
            }

            d3d_sprite_rects.rect _rect = m_lib.icons.GetIcon(icons.icon_index.wind_arrow);

            int index = 0;

            foreach (GvoWorldInfo.Info i in m_world.Seas)
            {
                // 풍향그리기
                if (i.SeaInfo == null)
                {
                    continue;
                }

                Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);

                if (m_world.Season.now_season == gvo_season.season.summer)
                {
                    m_lib.device.sprites.AddDrawSpritesNC(new Vector3(p.X - 3 - 1, p.Y + 3 + 1, 0.3f), _rect, i.SeaInfo.SummerAngle, -1);
                }
                else
                {
                    m_lib.device.sprites.AddDrawSpritesNC(new Vector3(p.X - 3 - 1, p.Y + 3 + 1, 0.3f), _rect, i.SeaInfo.WinterAngle, -1);
                }

                index++;
            }
        }
Пример #7
0
        /*-------------------------------------------------------------------------
         * 海域名描画
         * シェーダ使用
         * ---------------------------------------------------------------------------*/
        private void draw_seaname_shader_proc(Vector2 offset, LoopXImage image)
        {
            set_shader_params(m_lib.seainfonameimage.texture, offset, image.ImageScale);

            Effect effect = m_lib.device.sprites.effect;

            if (effect == null)
            {
                return;
            }

            effect.Begin(0);
            effect.BeginPass(0);

            m_lib.device.device.VertexDeclaration = m_decl;                             // 頂点の詳細
            if (m_world.Season.now_season == gvo_season.season.summer)
            {
                // 夏
                draw_buffer(m_sea_names1_vb, m_world.Seas.Count * 3);
            }
            else
            {
                // 冬
                draw_buffer(m_sea_names2_vb, m_world.Seas.Count * 3);
            }

            effect.EndPass();
            effect.End();
        }
Пример #8
0
        /*-------------------------------------------------------------------------
         *
         * ---------------------------------------------------------------------------*/
        public gvt_lib(System.Windows.Forms.Form form, string ini_file_name)
        {
            // 설정항목の읽기관리
            m_ini_manager = new IniProfileSetting(ini_file_name);

            // 설정항목
            m_setting = new GlobalSettings();
            // 키할당관리
            m_key_assign_manager = new KeyAssignManager();

            // 등록
            m_ini_manager.AddIniSaveLoad(m_setting);
            m_ini_manager.AddIniSaveLoad(m_key_assign_manager, "key_assign");

            // メイン윈도우그리기용
            m_d3d_device          = new d3d_device(form);
            m_d3d_device.skip_max = def.SKIP_DRAW_FRAME_MAX;                            // 그리기스킵수

            // 지도관리
            m_loop_x_image = new LoopXImage(m_d3d_device);

            // 아이콘관리
            m_icons = new icons(m_d3d_device, def.ICONSIMAGE_FULLNAME);

            // 도시등の문자の絵관리
            m_nameTexture = new nameTexture(m_d3d_device);

            // 키할당初期化
            init_key_assign();
        }
Пример #9
0
        /*-------------------------------------------------------------------------
         * 進行方向の描画
         * ---------------------------------------------------------------------------*/
        private void draw_angle_line(Vector2 pos, LoopXImage image, float angle, Color color)
        {
            if (angle < 0)
            {
                return;
            }

            m_lib.device.device.RenderState.ZBufferEnable = false;

            m_lib.device.line.Width        = 1;
            m_lib.device.line.Antialias    = m_lib.setting.enable_line_antialias;
            m_lib.device.line.Pattern      = -1;
            m_lib.device.line.PatternScale = 1.0f;
            m_lib.device.line.Begin();

            Vector2 vec = transform.ToVector2(gvo_capture.AngleToVector(angle));

            Vector2[] points = new Vector2[2];
            points[0] = pos;
            points[1] = pos + (vec * (ANGLE_LINE_LENGTH * image.ImageScale));
            m_lib.device.line.Draw(points, color);

            m_lib.device.line.End();
            m_lib.device.device.RenderState.ZBufferEnable = true;
        }
Пример #10
0
        /*-------------------------------------------------------------------------
         * 해역명그리기
         * 쉐이더사용
         * ---------------------------------------------------------------------------*/
        private void draw_seaname_shader_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_draw_names == MapDrawNames.Hide)
            {
                return;
            }

            if (m_lib.loop_image.ImageScale <= 0.8f || m_lib.setting.map_draw_names == MapDrawNames.OnlyBigCity)
            {
                return;
            }

            set_shader_params(m_lib.nameTexture.elseTexture, offset, image.ImageScale);

            Effect effect = m_lib.device.sprites.effect;

            if (effect == null)
            {
                return;
            }

            effect.Begin(0);
            effect.BeginPass(0);

            draw_buffer(m_sea_names_vb, m_world.Seas.Count * 3);

            effect.EndPass();
            effect.End();
        }
Пример #11
0
        /*-------------------------------------------------------------------------
         * 선그리기
         * 100단위の선となる
         * ---------------------------------------------------------------------------*/
        static public void DrawLines100(gvt_lib lib)
        {
            lib.loop_image.EnumDrawCallBack(new LoopXImage.DrawHandler(draw_lines100_proc), 0);

            // 세로방향は1회の그리기でよい
            LoopXImage image  = lib.loop_image;
            Vector2    size   = image.Device.client_size;
            Vector2    offset = image.GetDrawOffset();

            int index = 0;

            for (float y = 0; y < def.GAME_HEIGHT; y += 100, index++)
            {
                // 지도좌표に변환
                Vector2 pos0 = transform.game_pos2_map_pos(new Vector2(0, y), image);
                Vector2 pos  = image.GlobalPos2LocalPos(pos0, offset);

                if (index >= 10)
                {
                    index = 0;
                }

                if (pos.Y < 0)
                {
                    continue;
                }
                if (pos.Y >= size.Y)
                {
                    continue;
                }

                int color = (index == 0)? Color.FromArgb(128, 0, 0, 0).ToArgb(): Color.FromArgb(128, 128, 128, 128).ToArgb();
                image.Device.DrawLine(new Vector3(0, pos.Y, 0.79f), new Vector2(size.X, pos.Y), color);
            }
        }
Пример #12
0
        /*-------------------------------------------------------------------------
         * 위도, 경도그리기
         * ---------------------------------------------------------------------------*/
        static private void draw_points_proc(Vector2 offset, LoopXImage image)
        {
            d3d_systemfont font = image.Device.systemfont;
            Vector2        size = image.Device.client_size;

            for (float x = 0; x < def.GAME_WIDTH; x += 1000)
            {
                Vector2 pos0 = transform.game_pos2_map_pos(new Vector2(x, 0), image);
                Vector2 pos  = image.GlobalPos2LocalPos(pos0, offset);

                Rectangle rect = font.MeasureText(x.ToString());

                if (pos.X + (rect.Width + 4) < 0)
                {
                    continue;
                }
                if (pos.X >= size.X)
                {
                    continue;
                }

                image.Device.DrawFillRect(new Vector3(pos.X - (rect.Width / 2) - 3, 0, 0.1f), new Vector2(rect.Width + 2 * 2, rect.Height), Color.FromArgb(220, 100, 100, 100).ToArgb());
                font.DrawTextC(x.ToString(), (int)pos.X, 0, Color.White);
            }
        }
Пример #13
0
        /*-------------------------------------------------------------------------
         * 선그리기
         * ---------------------------------------------------------------------------*/
        static private void draw_lines100_proc(Vector2 offset, LoopXImage image)
        {
            Vector2 size = image.Device.client_size;

            int index = 0;

            for (float x = 0; x < def.GAME_WIDTH; x += 100, index++)
            {
                // 지도좌표に변환
                Vector2 pos0 = transform.game_pos2_map_pos(new Vector2(x, 0), image);
                Vector2 pos  = image.GlobalPos2LocalPos(pos0, offset);

                if (index >= 10)
                {
                    index = 0;
                }

                if (pos.X < 0)
                {
                    continue;
                }
                if (pos.X >= size.X)
                {
                    continue;
                }

                int color = (index == 0)? Color.FromArgb(128, 0, 0, 0).ToArgb(): Color.FromArgb(128, 128, 128, 128).ToArgb();
                image.Device.DrawLine(new Vector3(pos.X, 0, 0.79f), new Vector2(pos.X, size.Y), color);
            }
        }
Пример #14
0
        private void draw_cityicon2_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_icon == MapIcon.Hide)
            {
                return;
            }

            foreach (GvoWorldInfo.Info i in m_world.Cities)
            {
                Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);

                // 조합(2)이나 주점아가씨(1)가 존재하지 않을 경우 스킵
                if ((i.Sakaba & 2) != 2 && (i.Sakaba & 1) != 1)
                {
                    continue;
                }

                // 카리브 영지인 경우 스킵
                if (i.AllianceType == GvoWorldInfo.AllianceType.Territory &&
                    (i.CulturalSphere == GvoWorldInfo.CulturalSphere.Caribbean || i.CulturalSphere == GvoWorldInfo.CulturalSphere.EastLatinAmerica))
                {
                    continue;
                }

                m_lib.device.sprites.AddDrawSprites(new Vector3(p.X, p.Y, 0.3f), i.SmallIconRect);
            }
        }
Пример #15
0
        /*-------------------------------------------------------------------------
         * 角度線を描画する
         * ---------------------------------------------------------------------------*/
        private void draw_angle_line_all(Vector2 pos, LoopXImage image)
        {
            //
            if (!m_lib.setting.draw_myship_angle)
            {
                return;
            }

            DrawSettingMyShipAngle flag = m_lib.setting.draw_setting_myship_angle;

            if ((flag & DrawSettingMyShipAngle.draw_1) != 0)
            {
                // 測量から
                // 精度が高いほど不透明で描画される
                // 精度が低いときはほとんど見えない
                int alpha = (int)((255f * (m_db.SpeedCalculator.angle_precision * m_db.SpeedCalculator.angle_precision)));
                draw_angle_line(pos, image, m_db.SpeedCalculator.angle, Color.FromArgb(alpha, 0, 0, 255));
            }
            if ((is_in_the_sea) &&
                ((flag & DrawSettingMyShipAngle.draw_0) != 0))
            {
                // コンパスから
                Color color = (is_draw_expect_pos)? Color.Tomato: Color.Black;
                draw_angle_line(pos, image, m_angle, color);

                // 速度から求めた到達予想位置
                if (m_lib.setting.draw_setting_myship_angle_with_speed_pos)
                {
                    draw_step_position2(pos,
                                        image,
                                        m_angle,
                                        m_db.SpeedCalculator.speed_map);
                }
            }
        }
Пример #16
0
 /*-------------------------------------------------------------------------
  * 그리기
  * ---------------------------------------------------------------------------*/
 private void draw_proc(Vector2 offset, LoopXImage image)
 {
     foreach (sea_area_once d in m_groups)
     {
         // debug
         //				d.Type	= sea_area_once.sea_type.lawless;
         d.Draw(offset, image, m_alpha, m_alpha2, m_color_type);
     }
 }
Пример #17
0
        /*-------------------------------------------------------------------------
         * 그리기
         * ---------------------------------------------------------------------------*/
        private void draw_proc(Vector2 offset, LoopXImage image)
        {
            Vector3 pos = new Vector3(offset.X, offset.Y, 0.9f);

            foreach (TextureUnit tex in m_textures)
            {
                tex.Draw(pos, ImageScale);
            }
        }
Пример #18
0
        /*-------------------------------------------------------------------------
         * 도시명그리기
         * 상륙지점も含む
         * ---------------------------------------------------------------------------*/
        private void draw_cityname_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_draw_names == MapDrawNames.Hide)
            {
                return;
            }

            draw_namerects(offset, image, m_world.Cities);
        }
Пример #19
0
        /*-------------------------------------------------------------------------
         * 速度を1日に進んだ距離に変換する
         * 地図の拡縮が考慮される
         * ---------------------------------------------------------------------------*/
        private float transform_speed(float speed, LoopXImage image)
        {
            speed = update_step_position_speed(speed);
            // マップ座標系に変換
            // 測量座標の縦横比と地図座標の縦横比が異なる場合おかしくなるので注意
            speed *= transform.get_rate_to_map_x(image);
            // 表示スケールを考慮
            speed *= image.ImageScale;

            return(speed);
        }
Пример #20
0
        /*-------------------------------------------------------------------------
         *
         * ---------------------------------------------------------------------------*/
        public spot(gvt_lib lib, GvoWorldInfo world)
        {
            m_device     = lib.device;
            m_loop_image = lib.loop_image;
            m_icons      = lib.icons;
            m_world      = world;

            m_spots     = new List <GvoWorldInfo.Info>();
            m_spot_list = new List <spot_once>();
            m_spot_type = type.none;
        }
Пример #21
0
        /*-------------------------------------------------------------------------
         * 描画 角度
         * ---------------------------------------------------------------------------*/
        private void draw_angle_proc(Vector2 offset, LoopXImage image)
        {
            List <ShareShip> list = ShareList;

            m_lib.device.line.Width        = 1;
            m_lib.device.line.Antialias    = m_lib.setting.enable_line_antialias;
            m_lib.device.line.Pattern      = -1;
            m_lib.device.line.PatternScale = 1.0f;
            m_lib.device.line.Begin();

            foreach (ShareRoutes.ShareShip s in list)
            {
                if (s.Position.X < 0)
                {
                    continue;
                }
                if (s.Position.Y < 0)
                {
                    continue;
                }
                if (s.AngleVector.LengthSq() < 0.5f)
                {
                    continue;
                }

                // 地図座標に変換
                Vector2 pos0 = transform.game_pos2_map_pos(new Vector2(s.Position.X, s.Position.Y), image);
                Vector2 pos  = image.GlobalPos2LocalPos(pos0, offset);

                // クランプ
                if (pos.X + ANGLE_LINE_LENGTH < 0)
                {
                    continue;
                }
                if (pos.X - ANGLE_LINE_LENGTH >= image.Device.client_size.X)
                {
                    continue;
                }
                if (pos.Y + ANGLE_LINE_LENGTH < 0)
                {
                    continue;
                }
                if (pos.Y - ANGLE_LINE_LENGTH >= image.Device.client_size.Y)
                {
                    continue;
                }

                Vector2[] points = new Vector2[2];
                points[0] = pos;
                points[1] = pos + (s.AngleVector * ANGLE_LINE_LENGTH);
                m_lib.device.line.Draw(points, Color.FromArgb(200, 64, 64, 64));
            }
            m_lib.device.line.End();
        }
Пример #22
0
        /*-------------------------------------------------------------------------
         * 속도を1일に進んだ距離に변환する
         * 지도の拡縮が考慮される
         * ---------------------------------------------------------------------------*/
        private float transform_speed(float speed, LoopXImage image)
        {
            speed = update_step_position_speed(speed);
            // 맵좌표계に변환
            // 측량좌표の세로가로比と지도좌표の세로가로比が異なる場合おかしくなるので注意
            speed *= transform.get_rate_to_map_x(image);
            // 표시스케일を考慮
            speed *= image.ImageScale;

            return(speed);
        }
Пример #23
0
        /*-------------------------------------------------------------------------
         * スポット表示
         * ---------------------------------------------------------------------------*/
        private void draw_proc(Vector2 offset, LoopXImage image)
        {
            switch (m_spot_type)
            {
            case type.country_flags:                            // 国旗
                draw_spot_mycountry(offset);
                spot_flags(offset);
                break;

            case type.icons_0:                                          // 看板娘
            case type.icons_1:                                          // 書庫
            case type.icons_2:                                          // 翻訳家
            case type.icons_3:                                          // 豪商
                draw_spot(offset);
                spot_cities(offset);
                spot_icons(offset);
                break;

            case type.has_item:                                         // 指定したアイテムがある
                draw_spot(offset);
                spot_cities(offset);
                break;

            case type.language:                                         // 言語
                draw_spot_for_lang(offset);
                spot_cities(offset);
                spot_learn_lang(offset);
                break;

            case type.tab_0:                            // 交易
            case type.tab_1:                            // 道具
            case type.tab_2:                            // 工房
            case type.tab_3:                            // 人物
            case type.tab_4:                            // 造船所親方
            case type.tab_4_1:                          // 船大工
            case type.tab_5:                            // 武器職人
            case type.tab_6:                            // 製材職人
            case type.tab_7:                            // 製帆職人
            case type.tab_8:                            // 彫刻家
            case type.tab_9:                            // 行商人
            case type.tab_10:                           // メモ
                draw_spot(offset);
//				spot_cities(OffsetPosition);
                spot_tab(offset);
                break;

            case type.city_name:                                // 街名
            case type.cultural_sphere:                          // 文化圏
                draw_spot(offset);
                spot_cities(offset);
                break;
            }
        }
Пример #24
0
        /*-------------------------------------------------------------------------
         * 장소표시
         * ---------------------------------------------------------------------------*/
        private void draw_proc(Vector2 offset, LoopXImage image)
        {
            switch (m_spot_type)
            {
            case type.country_flags:                            // 국기
                draw_spot_mycountry(offset);
                spot_flags(offset);
                break;

            case type.icons_0:                                          // 看판娘
            case type.icons_1:                                          // 서고
            case type.icons_2:                                          // 번역가
            case type.icons_3:                                          // 무역상인
                draw_spot(offset);
                spot_cities(offset);
                spot_icons(offset);
                break;

            case type.has_item:                                         // 지정した아이템がある
                draw_spot(offset);
                spot_cities(offset);
                break;

            case type.language:                                         // 언어
                draw_spot_for_lang(offset);
                spot_cities(offset);
                spot_learn_lang(offset);
                break;

            case type.tab_0:                                            // 교역
            case type.tab_1:                                            // 도구
            case type.tab_2:                                            // 공방
            case type.tab_3:                                            // 인물
            case type.tab_4:                                            // 조선소주인
            case type.tab_4_1:                                          // 조선공
            case type.tab_5:                                            // 무기장인
            case type.tab_6:                                            // 제재소장인
            case type.tab_7:                                            // 돛제작자
            case type.tab_8:                                            // 조각가
            case type.tab_9:                                            // 행상인
            case type.tab_10:                                           // 메모
                draw_spot(offset);
//				spot_cities(OffsetPosition);
                spot_tab(offset);
                break;

            case type.city_name:                                // 도시명
            case type.cultural_sphere:                          // 문화권
                draw_spot(offset);
                spot_cities(offset);
                break;
            }
        }
Пример #25
0
        /*-------------------------------------------------------------------------
         * 地図と街名等の合成用
         * 街名を合成しない場合は海域変動システムのみ合成する
         * ---------------------------------------------------------------------------*/
        public void DrawForMargeInfoNames(Vector2 draw_offset, LoopXImage image)
        {
            // 海域変動システム
            m_sea_area.Draw();

            if (m_lib.setting.is_mixed_info_names)
            {
                // 海域名と風向き描画
                m_world_info.DrawSeaName();
                // 街名と上陸地点名描画
                m_world_info.DrawCityName();
            }
        }
Пример #26
0
        /*-------------------------------------------------------------------------
         * 지도と도시명の合成용
         * 도시명合成しない場合は해역변동시스템のみ合成する
         * ---------------------------------------------------------------------------*/
        public void DrawForMargeInfoNames(Vector2 draw_offset, LoopXImage image)
        {
            // 해역변동시스템
            m_sea_area.Draw();

            if (m_lib.setting.is_mixed_info_names)
            {
                // 해역명と풍향그리기
                m_world_info.DrawSeaName();
                // 도시명と상륙지점명그리기
                m_world_info.DrawCityName();
            }
        }
Пример #27
0
        /*-------------------------------------------------------------------------
         * 街名描画
         * 上陸地点も含む
         * ---------------------------------------------------------------------------*/
        private void draw_cityname_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_icon == MapIcon.Big)
            {
                // 大きいアイコン
                foreach (GvoWorldInfo.Info i in m_world.NoSeas)
                {
                    Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);
                    if (i.IconRect != null)
                    {
                        m_lib.device.sprites.AddDrawSprites(new Vector3(p.X, p.Y, 0.3f), i.IconRect);
                    }

                    if (m_lib.setting.map_draw_names == MapDrawNames.Hide)
                    {
                        continue;
                    }
                    if (i.NameRect == null)
                    {
                        continue;
                    }
                    p.X += i.StringOffset1.X;
                    p.Y += i.StringOffset1.Y;
                    m_lib.device.sprites.AddDrawSprites(new Vector3(p.X, p.Y, 0.3f), i.NameRect);
                }
            }
            else
            {
                // 小さいアイコン
                foreach (GvoWorldInfo.Info i in m_world.NoSeas)
                {
                    Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);
                    if (i.SmallIconRect != null)
                    {
                        m_lib.device.sprites.AddDrawSprites(new Vector3(p.X, p.Y, 0.3f), i.SmallIconRect);
                    }

                    if (m_lib.setting.map_draw_names == MapDrawNames.Hide)
                    {
                        continue;
                    }
                    if (i.NameRect == null)
                    {
                        continue;
                    }
                    p.X += i.StringOffset2.X;
                    p.Y += i.StringOffset2.Y;
                    m_lib.device.sprites.AddDrawSprites(new Vector3(p.X, p.Y, 0.3f), i.NameRect);
                }
            }
        }
Пример #28
0
        /*-------------------------------------------------------------------------
         * 해역명그리기
         * ---------------------------------------------------------------------------*/
        private void draw_seaname_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_draw_names == MapDrawNames.Hide)
            {
                return;
            }

            int index = 0;

            foreach (GvoWorldInfo.Info i in m_world.Seas)
            {
                Vector2 p = image.GlobalPos2LocalPos(transform.ToVector2(i.position), offset);
                // 해역명
                m_lib.device.sprites.AddDrawSpritesNC(new Vector3(p.X + 3, p.Y, 0.3f), m_lib.nameTexture.getRect(i.Name), i.angle, -1);
                index++;
            }
        }
Пример #29
0
        /*-------------------------------------------------------------------------
         * 아이콘그리기
         * 상륙지점も含む
         * ---------------------------------------------------------------------------*/
        private void draw_cityicon_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_icon == MapIcon.Hide)
            {
                return;
            }

            draw_iconrects(offset, image, m_world.Cities);

            draw_iconrects(offset, image, m_world.Shores);

            if (m_lib.setting.map_icon == MapIcon.CityAndShore)
            {
                return;
            }

            draw_iconrects(offset, image, m_world.NoSeas);
        }
Пример #30
0
        /*-------------------------------------------------------------------------
         * 상륙지그리기
         * ---------------------------------------------------------------------------*/
        private void draw_landname_proc(Vector2 offset, LoopXImage image)
        {
            if (m_lib.setting.map_draw_names == MapDrawNames.Hide || m_lib.setting.map_draw_names == MapDrawNames.OnlyCity)
            {
                return;
            }

            // 1차 상륙지
            draw_namerects(offset, image, m_world.Shores);

            if (m_lib.setting.map_draw_names == MapDrawNames.CityAndShore)
            {
                return;
            }

            // 2차 상륙지
            draw_namerects(offset, image, m_world.NoSeas);
        }