diff --git a/Data/MiniIcon/HotategaiGataKofun.png b/Data/MiniIcon/HotategaiGataKofun.png new file mode 100644 index 000000000..0cdcdabe6 Binary files /dev/null and b/Data/MiniIcon/HotategaiGataKofun.png differ diff --git a/Data/MiniIcon/ZempoKoenFun.png b/Data/MiniIcon/ZempoKoenFun.png new file mode 100644 index 000000000..3481dee07 Binary files /dev/null and b/Data/MiniIcon/ZempoKoenFun.png differ diff --git a/Data/MiniIcon/ZempoKohoFun.png b/Data/MiniIcon/ZempoKohoFun.png new file mode 100644 index 000000000..f7b399696 Binary files /dev/null and b/Data/MiniIcon/ZempoKohoFun.png differ diff --git a/Data/PlaceName/Ryoseikoku.tsv b/Data/PlaceName/Ryoseikoku.tsv index 0e4cef972..21c59a20e 100644 --- a/Data/PlaceName/Ryoseikoku.tsv +++ b/Data/PlaceName/Ryoseikoku.tsv @@ -104,4 +104,6 @@ 陸奧國 Mutsu 140.892883 38.222328 1 24 1968011 9999999 None 出羽 Dewa 139.908697 38.963655 1 16 1721424 1979972 None 出羽郡 Dewa 139.908697 38.963655 1 16 1979973 1981415 None -出羽國 Dewa 139.908697 38.963655 1 16 1981416 9999999 None \ No newline at end of file +出羽國 Dewa 139.908697 38.963655 1 16 1981416 9999999 None +三内 Sannai 140.703621 40.817090 1 24 1721424 9999999 None +ポロノッ Poro-not 145.5825 43.3352778 1 24 1721424 9999999 None \ No newline at end of file diff --git a/Library/PAX_GRAPHICA/Rect.hpp b/Library/PAX_GRAPHICA/Rect.hpp index 26faeb071..ab57d5f86 100644 --- a/Library/PAX_GRAPHICA/Rect.hpp +++ b/Library/PAX_GRAPHICA/Rect.hpp @@ -162,6 +162,28 @@ namespace paxg { DxLib::GetColor(c_.r, c_.g, c_.b), TRUE); #endif } + void drawAt() const { +#if defined(PAXS_USING_SIV3D) + // rect.draw(); +#elif defined(PAXS_USING_SFML) + Window::window.draw(rect); +#elif defined(PAXS_USING_DXLIB) + DxLib::DrawBox( + static_cast(x0 - w0 / 2), static_cast(y0 - h0 / 2), static_cast(x0 + w0 / 2), static_cast(y0 + h0 / 2), + DxLib::GetColor(255, 255, 255), TRUE); +#endif + } + void drawAt(const paxg::Color& c_) const { +#if defined(PAXS_USING_SIV3D) + // rect.draw(c_.color); +#elif defined(PAXS_USING_SFML) + Window::window.draw(c_); +#elif defined(PAXS_USING_DXLIB) + DxLib::DrawBox( + static_cast(x0 - w0 / 2), static_cast(y0 - h0 / 2), static_cast(x0 + w0 / 2), static_cast(y0 + h0 / 2), + DxLib::GetColor(c_.r, c_.g, c_.b), TRUE); +#endif + } void drawFrame(const double inner_thickness, const double outer_thickness, const paxg::Color& color_) const { #if defined(PAXS_USING_SIV3D) diff --git a/Library/PAX_GRAPHICA/String.hpp b/Library/PAX_GRAPHICA/String.hpp index da6a8c18f..c0a0c06c5 100644 --- a/Library/PAX_GRAPHICA/String.hpp +++ b/Library/PAX_GRAPHICA/String.hpp @@ -163,7 +163,7 @@ namespace paxg { } void drawBottomLeft(const std::string& str, const paxg::Vec2i& pos, const paxg::Color& color) const { - DxLib::DrawFormatString(pos.x(), pos.y(), DxLib::GetColor(color.r, color.g, color.b), str.c_str()); + DxLib::DrawFormatString(pos.x(), pos.y() - 10, DxLib::GetColor(color.r, color.g, color.b), str.c_str()); // DxLib::DrawStringToHandle(pos.x(), pos.y(), str.c_str(), DxLib::GetColor(color.r, color.g, color.b), font); } void drawTopRight(const std::string& str, const paxg::Vec2i& pos, const paxg::Color& color) const { @@ -171,7 +171,8 @@ namespace paxg { int dswth = DxLib::GetDrawStringWidthToHandle(str.c_str(), int(str.size()), font); int dsw = DxLib::GetDrawStringWidth(str.c_str(), int(str.size())); // printfDx("dswth:%d, dsw:%d\n", dswth, dsw); - DxLib::DrawFormatString(pos.x() - 300, pos.y(), DxLib::GetColor(color.r, color.g, color.b), str.c_str()); + DxLib::DrawFormatString(pos.x(), pos.y() + 10, DxLib::GetColor(color.r, color.g, color.b), str.c_str()); + // DxLib::DrawFormatString(pos.x() - 300, pos.y(), DxLib::GetColor(color.r, color.g, color.b), str.c_str()); } void draw(const std::string& str, const paxg::Vec2i& pos, const paxg::Color& color) const { @@ -179,7 +180,7 @@ namespace paxg { // DxLib::DrawStringToHandle(pos.x(), pos.y(), str.c_str(), DxLib::GetColor(color.r, color.g, color.b), font); } void drawBottomCenter(const std::string& str, const paxg::Vec2i& pos, const paxg::Color& color) const { - DxLib::DrawFormatString(pos.x(), pos.y(), DxLib::GetColor(color.r, color.g, color.b), str.c_str()); + DxLib::DrawFormatString(pos.x(), pos.y() - 10, DxLib::GetColor(color.r, color.g, color.b), str.c_str()); // DxLib::DrawStringToHandle(pos.x(), pos.y(), str.c_str(), DxLib::GetColor(color.r, color.g, color.b), font); } void drawTopCenter(const std::string& str, const paxg::Vec2i& pos, const paxg::Color& color) const { @@ -187,7 +188,8 @@ namespace paxg { int dswth = DxLib::GetDrawStringWidthToHandle(str.c_str(), int(str.size()), font); int dsw = DxLib::GetDrawStringWidth(str.c_str(), int(str.size())); // printfDx("dswth:%d, dsw:%d\n", dswth, dsw); - DxLib::DrawFormatString(pos.x() - 300, pos.y(), DxLib::GetColor(color.r, color.g, color.b), str.c_str()); + DxLib::DrawFormatString(pos.x(), pos.y() + 10, DxLib::GetColor(color.r, color.g, color.b), str.c_str()); + // DxLib::DrawFormatString(pos.x() - 300, pos.y(), DxLib::GetColor(color.r, color.g, color.b), str.c_str()); } void drawAt(const std::string& str, const paxg::Vec2i& pos, const paxg::Color& color) const { diff --git a/Library/PAX_SAPIENTICA/Siv3D/Calendar.hpp b/Library/PAX_SAPIENTICA/Siv3D/Calendar.hpp index a4ef73a89..667e4ae66 100644 --- a/Library/PAX_SAPIENTICA/Siv3D/Calendar.hpp +++ b/Library/PAX_SAPIENTICA/Siv3D/Calendar.hpp @@ -85,7 +85,7 @@ namespace paxs { "Jul.","Aug.","Sep.","Oct.","Nov.","Dec." }; - bool move_forward_in_time = false; // 時間を進めるか + bool move_forward_in_time = true; // デバッグ false; // 時間を進めるか bool go_back_in_time = false; // 時間を戻すか bool is_agent_update = true; // エージェントの更新をするか @@ -178,7 +178,7 @@ namespace paxs { static int calendar_update_counter = 0; // 暦を繰り上げるタイミングを決めるためのカウンタ ++calendar_update_counter; - //if(move_forward_in_time) jdn += 1000; + if (move_forward_in_time) jdn.getDay() += 1.0; // デバッグ //else if(go_back_in_time) jdn -= 1000; //if (count >= 0) { if (calendar_update_counter >= 30) { // カウンタが指定した値を超えたら日付を変える処理を実行 diff --git a/Library/PAX_SAPIENTICA/Siv3D/InitLogo.hpp b/Library/PAX_SAPIENTICA/Siv3D/InitLogo.hpp index e37ed466a..048728872 100644 --- a/Library/PAX_SAPIENTICA/Siv3D/InitLogo.hpp +++ b/Library/PAX_SAPIENTICA/Siv3D/InitLogo.hpp @@ -31,7 +31,13 @@ namespace paxs { // ソフトウェアを実行した最初のフレームの一番最初に実行 static void firstInit(const std::string& path8) { // ロゴ画像の読み込み - const paxg::Texture texture_tl{ path8 + "Image/Logo/TitleBanner2.png" }; + const paxg::Texture texture_tl{ +#ifdef __ANDROID__ + "Logo.png" +#else + path8 + "Image/Logo/TitleBanner2.png" +#endif + }; // 画面サイズを変更 paxg::Window::setSize( (!texture_tl) ? 700 : texture_tl.width(), (!texture_tl) ? 180 : texture_tl.height()); diff --git a/Library/PAX_SAPIENTICA/Siv3D/LocationPoint.hpp b/Library/PAX_SAPIENTICA/Siv3D/LocationPoint.hpp index 770f2ac4f..51cb38b66 100644 --- a/Library/PAX_SAPIENTICA/Siv3D/LocationPoint.hpp +++ b/Library/PAX_SAPIENTICA/Siv3D/LocationPoint.hpp @@ -12,6 +12,10 @@ #ifndef PAX_SAPIENTICA_SIV3D_LOCATION_POINT_HPP #define PAX_SAPIENTICA_SIV3D_LOCATION_POINT_HPP +#ifndef PAXS_PATH +#define PAXS_PATH "" +#endif + #include #include @@ -21,6 +25,7 @@ #include #include +#include #include /*########################################################################################## @@ -91,30 +96,43 @@ namespace paxs { // 古墳を追加(実験用) void addKofun() { for (int i = 0; i < 10; ++i) - inputPlace("./../../../../../Data/PlaceName/TestMap/Kofun.tsv", LocationPointEnum::location_point_agent); + inputPlace(std::string("Data/PlaceName/TestMap/Kofun.tsv"), LocationPointEnum::location_point_agent); } void add() { // 古墳 - inputPlace("./../../../../../Data/PlaceName/TestMap/Hokkaido.tsv", LocationPointEnum::location_point_zempo_koen_fun); + inputPlace(std::string("Data/PlaceName/TestMap/Hokkaido.tsv"), LocationPointEnum::location_point_zempo_koen_fun); // 古墳 - inputPlace("./../../../../../Data/PlaceName/TestMap/Kofun.tsv", LocationPointEnum::location_point_zempo_koen_fun); + inputPlace(std::string("Data/PlaceName/TestMap/Kofun.tsv"), LocationPointEnum::location_point_zempo_koen_fun); // 古事記の地名 - inputPlace("./../../../../../Data/PlaceName/KojikiPlaceName.tsv"); + inputPlace(std::string("Data/PlaceName/KojikiPlaceName.tsv")); // 汎用的な地名 - inputPlace("./../../../../../Data/PlaceName/PlaceName.tsv"); + inputPlace(std::string("Data/PlaceName/PlaceName.tsv")); // 令制国名 - inputPlace("./../../../../../Data/PlaceName/Ryoseikoku.tsv"); + inputPlace(std::string("Data/PlaceName/Ryoseikoku.tsv")); // 倭名類聚抄の地名 - inputPlace("./../../../../../Data/PlaceName/WamyoRuijushoPlaceName.tsv"); + inputPlace(std::string("Data/PlaceName/WamyoRuijushoPlaceName.tsv")); // 倭名類聚抄の地名 - inputPlace("./../../../../../Data/PlaceName/WamyoRuijushoKori.tsv"); + inputPlace(std::string("Data/PlaceName/WamyoRuijushoKori.tsv")); // おもろさうしの地名 - inputPlace("./../../../../../Data/PlaceName/OmoroSoshiPlaceName.tsv"); + inputPlace(std::string("Data/PlaceName/OmoroSoshiPlaceName.tsv")); } PlaceNameLocation() { - } + + // アイコンのテクスチャ + texture_ko = paxg::Texture{ PAXS_PATH + std::string("Data/OldDocumentIcon/JP-Kojiki.svg") }; + texture_wam = paxg::Texture{ PAXS_PATH + std::string("Data/OldDocumentIcon/JP-WamyoRuijusho.svg") }; + texture_pin1 = paxg::Texture{ PAXS_PATH + std::string("Data/Pin/PitDwelling.svg") }; + texture_blue_circle = paxg::Texture{ PAXS_PATH + std::string("Data/MiniIcon/BlueCircle.svg") }; + texture_red_circle = paxg::Texture{ PAXS_PATH + std::string("Data/MiniIcon/RedCircle.svg") }; + texture_kofun1 = paxg::Texture{ PAXS_PATH + std::string("Data/MiniIcon/ZempoKoenFun.png") }; + texture_kofun2 = paxg::Texture{PAXS_PATH + std::string("Data/MiniIcon/ZempoKohoFun.png") + }; + texture_kofun3 = paxg::Texture{ PAXS_PATH + std::string("Data/MiniIcon/HotategaiGataKofun.png") }; + texture_pn = paxg::Texture{ PAXS_PATH + std::string("Data/MiniIcon/PlaceName.svg") }; + + } // 描画 void draw(const double jdn, const double map_view_width, const double map_view_height, const double map_view_center_x, const double map_view_center_y, @@ -165,6 +183,16 @@ namespace paxs { } // 前方後円墳を描画 if (lli.source == "ZempoKoenFun") { +#ifdef PAXS_USING_DXLIB + paxg::Rect(paxg::Vec2i{ + static_cast((lli.coordinate.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(paxg::Window::width())), + static_cast(double(paxg::Window::height()) - ((lli.coordinate.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(paxg::Window::height()))) + }, paxg::Vec2i{14, 14}).drawAt(paxg::Color{255, 255, 255}); + paxg::Rect(paxg::Vec2i{ + static_cast((lli.coordinate.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(paxg::Window::width())), + static_cast(double(paxg::Window::height()) - ((lli.coordinate.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(paxg::Window::height()))) + }, paxg::Vec2i{10, 10}).drawAt(paxg::Color{37, 158, 78}); +#endif texture_kofun1.resizedDrawAt(14, paxg::Vec2i{ static_cast((lli.coordinate.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(paxg::Window::width())), @@ -246,8 +274,8 @@ namespace paxs { // 倭名類聚抄のアイコンを描画 else if (lli.source == "JP-WamyoRuijusho") { //texture_wam.resizedDrawAt(20, - // paxg::Vec2i{ (lli.coordinate.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(paxg::Window::width()), - // double(paxg::Window::height()) - ((lli.coordinate.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(paxg::Window::height())) + // paxg::Vec2i{ static_cast((lli.coordinate.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(paxg::Window::width())), + // static_cast(double(paxg::Window::height()) - ((lli.coordinate.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(paxg::Window::height()))) // }); } // 前方後円墳のアイコンを描画 @@ -302,25 +330,63 @@ namespace paxs { private: std::vector location_point_list{}; // 地物の一覧 // アイコンのテクスチャ - const paxg::Texture texture_ko{ "./../../../../../Data/OldDocumentIcon/JP-Kojiki.svg" }; - const paxg::Texture texture_wam{ "./../../../../../Data/OldDocumentIcon/JP-WamyoRuijusho.svg" }; - const paxg::Texture texture_pin1{ "./../../../../../Data/Pin/PitDwelling.svg" }; - const paxg::Texture texture_blue_circle{ "./../../../../../Data/MiniIcon/BlueCircle.svg" }; - const paxg::Texture texture_red_circle{ "./../../../../../Data/MiniIcon/RedCircle.svg" }; - const paxg::Texture texture_kofun1{ "./../../../../../Data/MiniIcon/ZempoKoenFun.svg" }; - const paxg::Texture texture_kofun2{ "./../../../../../Data/MiniIcon/ZempoKohoFun.svg" }; - const paxg::Texture texture_kofun3{ "./../../../../../Data/MiniIcon/HotategaiGataKofun.svg" }; - const paxg::Texture texture_pn{ "./../../../../../Data/MiniIcon/PlaceName.svg" }; + paxg::Texture texture_ko{}; + paxg::Texture texture_wam{}; + paxg::Texture texture_pin1{}; + paxg::Texture texture_blue_circle{}; + paxg::Texture texture_red_circle{}; + paxg::Texture texture_kofun1{}; + paxg::Texture texture_kofun2{}; + paxg::Texture texture_kofun3{}; + paxg::Texture texture_pn{}; // 地名を読み込み void inputPlace(const std::string& str_, const LocationPointEnum lpe_ = LocationPointEnum::location_point_place_name) { - std::ifstream pifs(str_); // 地名を読み込む +#ifdef PAXS_USING_DXLIB // PAXS_USING_DXLIB +#ifdef __ANDROID__ + const int file_handle = DxLib::FileRead_open(str_.c_str()); +#else + const int file_handle = DxLib::FileRead_open(std::string(PAXS_PATH + str_).c_str()); +#endif // __ANDROID__ + DxLib::FileRead_set_format(file_handle, DX_CHARCODEFORMAT_UTF8); + if (file_handle == 0) return; + std::string pline{}; + pline.resize(4096); + std::string pline_tmp{}; + pline_tmp.resize(4096); +#else + std::ifstream pifs(PAXS_PATH + str_); // 地名を読み込む if (pifs.fail()) return; std::string pline; +#endif +#ifdef PAXS_USING_DXLIB // PAXS_USING_DXLIB + while (true) { + const int dline = DxLib::FileRead_gets(&(pline[0]), 4096, file_handle); + + if (dline == -1) break; + if (dline == 0) break; + + // const std::string pline = std::string(pline0.c_str()); + std::vector strvec{}; + + std::string str_p{}; + for (int i = 0, pi = 0; i <= dline; ++i) { + if (pline[i] == '\0') continue; + if (pline[i] == '\t' || i == dline) { + strvec.emplace_back(str_p); + str_p.clear(); + } + else { + str_p.push_back(pline[i]); + } + } + strvec.emplace_back(str_p); +#else // 1 行ずつ読み込み(区切りはタブ) while (std::getline(pifs, pline)) { std::vector strvec = paxs::StringExtensions::split(pline, '\t'); +#endif // 格納 location_point_list.emplace_back( strvec[0], // 漢字 @@ -344,8 +410,8 @@ namespace paxs { class AgentLocation { public: // アイコンのテクスチャ - const paxg::Texture texture_blue_circle{ "./../../../../../Data/MiniIcon/BlueCircle.svg" }; - const paxg::Texture texture_red_circle{ "./../../../../../Data/MiniIcon/RedCircle.svg" }; + const paxg::Texture texture_blue_circle{ PAXS_PATH + std::string("Data/MiniIcon/BlueCircle.svg") }; + const paxg::Texture texture_red_circle{ PAXS_PATH + std::string("Data/MiniIcon/RedCircle.svg") }; void draw(const double jdn, const std::vector>& agents, const paxs::Vector2& start_position, diff --git a/Library/PAX_SAPIENTICA/Siv3D/MapViewer.hpp b/Library/PAX_SAPIENTICA/Siv3D/MapViewer.hpp index 57b4591df..9489c443d 100644 --- a/Library/PAX_SAPIENTICA/Siv3D/MapViewer.hpp +++ b/Library/PAX_SAPIENTICA/Siv3D/MapViewer.hpp @@ -33,7 +33,7 @@ namespace paxs { #ifdef PAXS_USING_SIV3D s3d::Array route1, route2; // 線の情報を格納 #endif - std::unique_ptr place_name_location{}; // 地名 + PlaceNameLocation place_name_location{}; // 地名 //#ifdef PAXS_USING_SIMULATOR std::unique_ptr agent_location; // エージェント @@ -86,11 +86,9 @@ namespace paxs { ##########################################################################################*/ mapMapInit(xyz_tile_list, path8, map_view.get()); - //// 地名 - //place_name_location = std::unique_ptr(new(std::nothrow) PlaceNameLocation); - //if (place_name_location != nullptr) { - // place_name_location->add(); - //} + // 地名 + place_name_location.add(); + //#ifdef PAXS_USING_SIMULATOR // agent_location = std::unique_ptr(new(std::nothrow) AgentLocation); // エージェント // agent_location->addKofun(); @@ -129,29 +127,27 @@ namespace paxs { s3d::Spline2D{ route2 }.draw(2, s3d::Color{ 85, 145, 245 }); #endif // 地名を描画 - if (place_name_location != nullptr) { - if (select_language.cget() + 1 >= string_siv.font.size()) { - place_name_location->draw( - koyomi_siv.jdn.cgetDay(), - map_view->getWidth(), - map_view->getHeight(), - map_view->getCenterX(), - map_view->getCenterY(), - string_siv.pin_font, - string_siv.pin_font, - string_siv.pin_font); - } - else { - place_name_location->draw( - koyomi_siv.jdn.cgetDay(), - map_view->getWidth(), - map_view->getHeight(), - map_view->getCenterX(), - map_view->getCenterY(), - string_siv.font[select_language.cget()], - string_siv.font[select_language.cget()]/*en_font*/, - string_siv.pin_font); - } + if (select_language.cget() + 1 >= string_siv.font.size()) { + place_name_location.draw( + koyomi_siv.jdn.cgetDay(), + map_view->getWidth(), + map_view->getHeight(), + map_view->getCenterX(), + map_view->getCenterY(), + string_siv.pin_font, + string_siv.pin_font, + string_siv.pin_font); + } + else { + place_name_location.draw( + koyomi_siv.jdn.cgetDay(), + map_view->getWidth(), + map_view->getHeight(), + map_view->getCenterX(), + map_view->getCenterY(), + string_siv.font[select_language.cget()], + string_siv.font[select_language.cget()]/*en_font*/, + string_siv.pin_font); } //#ifdef PAXS_USING_SIMULATOR // // エージェント機能テスト diff --git a/Library/PAX_SAPIENTICA/Siv3D/XYZTiles.hpp b/Library/PAX_SAPIENTICA/Siv3D/XYZTiles.hpp index e78f618e3..271a08c3d 100644 --- a/Library/PAX_SAPIENTICA/Siv3D/XYZTiles.hpp +++ b/Library/PAX_SAPIENTICA/Siv3D/XYZTiles.hpp @@ -54,7 +54,7 @@ namespace paxs { }; std::vector pos_list1{}; - std::vector pos_list2{}; + std::vector pos_list2{}; // XYZ タイルの画像の情報を保持 // std::vector texture_list{}; std::unordered_map texture{}; @@ -122,11 +122,12 @@ namespace paxs { MapVec2D{ j * 360.0 / z_num - 180.0, (360.0 - i * 360.0 / z_num) - 180.0 }; - pos_list2[k] = { + // 画像を格納する index を生成 + pos_list2[k] = textureIndex(MapVec4D{ static_cast(z), static_cast((j + z_num) % z_num), static_cast((i + z_num) % z_num) - }; + }); } } @@ -135,6 +136,12 @@ namespace paxs { // ファイルを保存 for (std::size_t i = start_cell.y, k = 0; i <= end_cell.y; ++i) { for (std::size_t j = start_cell.x; j <= end_cell.x; ++j, ++k) { + + // 画像が既にある場合は終了 + if (texture.find(pos_list2[k]) != texture.end()) { + continue; + } + std::string new_saveFilePath = ""; switch (file_name_enum) { case XYZTileFileName::Original: @@ -165,7 +172,6 @@ namespace paxs { // ファイルを同期ダウンロード // ステータスコードが 200 (OK) なら - const std::uint_least64_t index = textureIndex(pos_list2[k]); // texture_list[k] = paxg::Texture{ new_saveFilePath }; @@ -195,7 +201,7 @@ namespace paxs { } else { // URL から取得した新しい地図へ更新 - texture.insert({ index, std::move(new_url_tex) }); + texture.insert({ pos_list2[k], std::move(new_url_tex) }); } } } @@ -203,7 +209,7 @@ namespace paxs { } // テクスチャが読み込めた場合 else { - texture.insert({ index, std::move(new_tex) }); + texture.insert({ pos_list2[k], std::move(new_tex) }); } } } @@ -262,13 +268,11 @@ namespace paxs { // 場所の該当なし if (k >= pos_list2.size()) continue; - const std::uint_least64_t index = textureIndex(pos_list2[k]); - //if (texture_list[k]) { - if(texture.find(index) != texture.end()) { + if(texture.find(pos_list2[k]) != texture.end()) { // if (texture.contains(index)) { // C++20 //texture_list[k].resizedDraw( - texture.at(index).resizedDraw( + texture.at(pos_list2[k]).resizedDraw( paxg::Vec2f( static_cast((360.0 / z_num) / map_view_width * double(paxg::Window::width())) , static_cast((360.0 / z_num) / map_view_height * double(paxg::Window::height())) diff --git a/Library/PAX_SAPIENTICA/Siv3D/XYZTilesList.hpp b/Library/PAX_SAPIENTICA/Siv3D/XYZTilesList.hpp index 1fc1f325c..2989200c8 100644 --- a/Library/PAX_SAPIENTICA/Siv3D/XYZTilesList.hpp +++ b/Library/PAX_SAPIENTICA/Siv3D/XYZTilesList.hpp @@ -315,16 +315,16 @@ namespace paxs { if (menu_bar.cgetPulldown(MenuBarType::view).getIsItems(1)) { // XYZ タイルの地図の描画 // xyz_tile1"].draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y); - if (menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::base)) { + if (!menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::base)) { if (xyz_tile_list.find("map_base") != xyz_tile_list.end()) xyz_tile_list.at("map_base").draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y); } - if (menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::soil)) { + if (!menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::soil)) { if (xyz_tile_list.find("map_soil") != xyz_tile_list.end()) xyz_tile_list.at("map_soil").draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y); } - if (menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::land_and_water)) { + if (!menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::land_and_water)) { if (xyz_tile_list.find("map_land_and_water") != xyz_tile_list.end()) xyz_tile_list.at("map_land_and_water").draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y); } - if (menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::soil_temperature)) { + if (!menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::soil_temperature)) { if (xyz_tile_list.find("map_soil_temperature") != xyz_tile_list.end()) xyz_tile_list.at("map_soil_temperature").draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y); } // xyz_tile2"].draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y); @@ -355,7 +355,7 @@ namespace paxs { // if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) { if (xyz_tile_list.find("map_line2") != xyz_tile_list.end()) xyz_tile_list.at("map_line2").drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.4, paxg::Color{ 95, 99, 104 }); // } - if (menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::line2)) { + if (!menu_bar.cgetPulldown(MenuBarType::map).getIsItems(MapType::line2)) { if (xyz_tile_list.find("map_line3") != xyz_tile_list.end()) xyz_tile_list.at("map_line3").drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.8, paxg::Color{ 95, 99, 104 }); if (xyz_tile_list.find("map_line3") != xyz_tile_list.end()) xyz_tile_list.at("map_line3").drawXYZ(map_view_width, map_view_height, map_view_center_x, map_view_center_y); } diff --git a/Library/PAX_SAPIENTICA/Version.hpp b/Library/PAX_SAPIENTICA/Version.hpp index 60a5d29dc..1c2459af1 100644 --- a/Library/PAX_SAPIENTICA/Version.hpp +++ b/Library/PAX_SAPIENTICA/Version.hpp @@ -19,7 +19,7 @@ // 正式バージョン数値 #ifndef PAX_SAPIENTICA_LIBRARY_VERSION -#define PAX_SAPIENTICA_LIBRARY_VERSION (20230505L) +#define PAX_SAPIENTICA_LIBRARY_VERSION (20230924L) #endif // PAX_SAPIENTICA 主要バージョン ( 0 がテスト版 , 1 から正式リリース版の予定 ) [v6.0.X.a.a] @@ -29,17 +29,17 @@ // PAX_SAPIENTICA 補助バージョン [v6.0.a.X.a] #ifndef PAX_SAPIENTICA_LIBRARY_MINOR -#define PAX_SAPIENTICA_LIBRARY_MINOR (2) +#define PAX_SAPIENTICA_LIBRARY_MINOR (3) #endif // PAX_SAPIENTICA 微修正バージョン [v6.0.a.a.X] #ifndef PAX_SAPIENTICA_LIBRARY_PATCHLEVEL -#define PAX_SAPIENTICA_LIBRARY_PATCHLEVEL (0) +#define PAX_SAPIENTICA_LIBRARY_PATCHLEVEL (4) #endif // 正式バージョン名 ( https://github.com/AsPJT/PAX_SAPIENTICA ) #ifndef PAX_SAPIENTICA_LIBRARY_VERSION_NAME -#define PAX_SAPIENTICA_LIBRARY_VERSION_NAME "6.0.0.2.0" +#define PAX_SAPIENTICA_LIBRARY_VERSION_NAME "6.0.0.3.4" #endif //char name[ @@ -50,7 +50,31 @@ /*########################################################################################## 更新履歴 バージョン | 更新日 | 概要 - 6.0.0.0.X | 2023/0X/XX | コピペ用 + 6.0.0.3.X | 2023/0X/XX | コピペ用 + 6.0.0.3.4 | 2023/09/23 | Android Studioによるアプリ開発機能をサポート + 6.0.0.3.3 | 2023/09/22 | PAXS_GRAPHICA のマルチプラットフォーム対応 + 6.0.0.3.2 | 2023/09/20 | 日本の令制国を大幅に追加 + 6.0.0.3.1 | 2023/09/18 | 日本の令制国の国境線を追加 + 6.0.0.3.0 | 2023/09/18 | 集落エージェントを追加 + 6.0.0.2.18 | 2023/08/19 | Doxygen のドキュメントを生成する workflow を追加 + 6.0.0.2.17 | 2023/08/13 | シミュレーションの機能を更新 + 6.0.0.2.16 | 2023/07/22 | CMake や Test の更新 + 6.0.0.2.15 | 2023/07/17 | PAXS_GRAPHICA の基本機能を追加 + 6.0.0.2.14 | 2023/07/14 | シミュレーションのデータ構造の見直し + 6.0.0.2.13 | 2023/07/10 | 暦クラスの分割 + 6.0.0.2.12 | 2023/07/09 | GUI 関連のファイルを細分化 + 6.0.0.2.11 | 2023/07/08 | ヒジュラ暦を追加 + 6.0.0.2.10 | 2023/07/01 | ライブラリのコードを整理 + 6.0.0.2.9 | 2023/06/27 | 進行状態を記録する出力バーを追加 + 6.0.0.2.8 | 2023/06/24 | 地図投影法クラスを追加 + 6.0.0.2.7 | 2023/06/22 | 人間エージェントクラスを追加 + 6.0.0.2.6 | 2023/06/10 | シミュレーション用の地図のデータ構造を変更 + 6.0.0.2.5 | 2023/05/29 | 360 度写真を表示する機能を追加 + 6.0.0.2.4 | 2023/05/15 | 傾斜と緯度ごとのセルの大きさのデータを追加 + 6.0.0.2.3 | 2023/05/13 | 仮の時間管理アイコンを追加 + 6.0.0.2.2 | 2023/05/09 | XYZ タイル管理クラスを追加 + 6.0.0.2.1 | 2023/05/08 | エージェントの描画を追加 + 6.0.0.2.0 | 2023/05/05 | ImageResize の追加 6.0.0.2.0 | 2023/05/05 | シミュレータの機能が追加 6.0.0.1.14 | 2023/05/04 | Environment を追加 6.0.0.1.13 | 2023/05/02 | AgentSimulator を追加 @@ -139,4 +163,4 @@ namespace PAX_SAPIENTICA { #define PAXSAPIENTICA #endif -#endif // !PAX_SAPIENTICA_CONSTANT_VERSION_HPP \ No newline at end of file +#endif // !PAX_SAPIENTICA_CONSTANT_VERSION_HPP diff --git a/Project/Android/app/build.gradle.kts b/Project/Android/app/build.gradle.kts index 2517c8579..1b0c5368c 100644 --- a/Project/Android/app/build.gradle.kts +++ b/Project/Android/app/build.gradle.kts @@ -25,6 +25,7 @@ android { release { isMinifyEnabled = false proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + signingConfig = signingConfigs.getByName("debug") } } compileOptions { diff --git a/Project/Android/app/src/main/assets/Logo.png b/Project/Android/app/src/main/assets/Logo.png new file mode 100644 index 000000000..b8bf7d0e2 Binary files /dev/null and b/Project/Android/app/src/main/assets/Logo.png differ diff --git a/Project/Android/app/src/main/cpp/native-lib.cpp b/Project/Android/app/src/main/cpp/native-lib.cpp index 7e37cd192..26b1e7d1b 100644 --- a/Project/Android/app/src/main/cpp/native-lib.cpp +++ b/Project/Android/app/src/main/cpp/native-lib.cpp @@ -9,6 +9,7 @@ ##########################################################################################*/ +#define PAXS_PATH "./" #define PAXS_USING_DXLIB #include @@ -17,6 +18,7 @@ #include int android_main() { + DxLib::SetUseCharCodeFormat(DX_CHARCODEFORMAT_UTF8); if (DxLib::DxLib_Init() == -1) return -1; int w{640},h{360}; @@ -34,7 +36,7 @@ int android_main() { DrawBox(0, 0, 300, 100, GetColor(230, 230, 240), TRUE); // 四角形を描画する DrawGraph(0,0,m,TRUE); // } - paxs::startMain("./"); + paxs::startMain(PAXS_PATH); return DxLib_End(); } diff --git a/Project/Android/app/src/main/res/drawable/ic_launcher_background.xml b/Project/Android/app/src/main/res/drawable/ic_launcher_background.xml index 6b0b93c43..f394d11c5 100644 --- a/Project/Android/app/src/main/res/drawable/ic_launcher_background.xml +++ b/Project/Android/app/src/main/res/drawable/ic_launcher_background.xml @@ -5,166 +5,6 @@ android:viewportWidth="108" android:viewportHeight="108"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Project/Android/app/src/main/res/drawable/ic_launcher_foreground.xml b/Project/Android/app/src/main/res/drawable/ic_launcher_foreground.xml index 1b2d1ea79..20885e5e2 100644 --- a/Project/Android/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/Project/Android/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -4,27 +4,76 @@ android:height="108dp" android:viewportWidth="108" android:viewportHeight="108"> - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Project/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/Project/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp index 62b611da0..e69de29bb 100644 Binary files a/Project/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/Project/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/Project/Android/app/src/main/res/values/strings.xml b/Project/Android/app/src/main/res/values/strings.xml index 1122ecd3e..c2bf3db69 100644 --- a/Project/Android/app/src/main/res/values/strings.xml +++ b/Project/Android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - paxsapientica - \ No newline at end of file + SAPIENTICA + diff --git a/Project/MapViewer/Windows/Console/Main.cpp b/Project/MapViewer/Windows/Console/Main.cpp index 4ded17933..cb02543a6 100644 --- a/Project/MapViewer/Windows/Console/Main.cpp +++ b/Project/MapViewer/Windows/Console/Main.cpp @@ -10,9 +10,10 @@ ##########################################################################################*/ #define _CRT_SECURE_NO_WARNINGS +#define PAXS_PATH "./../../../../" #include int main() { - paxs::startMain("./../../../../"); + paxs::startMain(PAXS_PATH); return 0; } diff --git a/Project/MapViewer/Windows/DxLib/Main.cpp b/Project/MapViewer/Windows/DxLib/Main.cpp index bcd83fb41..c4238b603 100644 --- a/Project/MapViewer/Windows/DxLib/Main.cpp +++ b/Project/MapViewer/Windows/DxLib/Main.cpp @@ -10,6 +10,7 @@ ##########################################################################################*/ #define _CRT_SECURE_NO_WARNINGS +#define PAXS_PATH "./../../../../" #define PAXS_USING_DXLIB #include // DxLib #include @@ -29,10 +30,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine #endif DxLib::SetOutApplicationLogValidFlag(FALSE); DxLib::ChangeWindowMode(TRUE); + DxLib::SetUseCharCodeFormat(DX_CHARCODEFORMAT_UTF8); if (DxLib::DxLib_Init() == -1) return -1; DxLib::SetDrawScreen(DX_SCREEN_BACK); DxLib::SetWaitVSyncFlag(TRUE); - DxLib::SetUseASyncLoadFlag(TRUE); - paxs::startMain("./../../../../"); + // DxLib::SetUseASyncLoadFlag(TRUE); + paxs::startMain(PAXS_PATH); return DxLib::DxLib_End(); } diff --git a/Project/MapViewer/Windows/GraphicalUserInterface/Main.cpp b/Project/MapViewer/Windows/GraphicalUserInterface/Main.cpp index 94927d5c1..445055a84 100644 --- a/Project/MapViewer/Windows/GraphicalUserInterface/Main.cpp +++ b/Project/MapViewer/Windows/GraphicalUserInterface/Main.cpp @@ -10,9 +10,10 @@ ##########################################################################################*/ #define PAXS_USING_SIV3D +#define PAXS_PATH "./../../../../../" #include // OpenSiv3D #include void Main() { - paxs::startMain("./../../../../../"); + paxs::startMain(PAXS_PATH); }