Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Data/Locales/Places/Names/HAinu/en-US.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/HAinu/ja-JP.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/HAinu/ko-KR.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/HAinu/zh-TW.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/NRCT/en-US.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/NRCT/hiragana.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/NRCT/ja-JP.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/Roma/en-US.bin
Binary file not shown.
43,697 changes: 43,461 additions & 236 deletions Data/Locales/Places/Names/Roma/en-US.tsv

Large diffs are not rendered by default.

Binary file added Data/Locales/Places/Names/SAinu/en-US.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/SAinu/ja-JP.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/SAinu/ko-KR.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/SamgukSagi/en-US.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/SamgukSagi/ja-JP.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/SamgukSagi/zh-TW.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/Wamyo/en-US.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/Wamyo/ja-JP.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/Wamyo/zh-TW.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/WamyoKori/en-US.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/WamyoKori/hiragana.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/WamyoKori/ja-JP.bin
Binary file not shown.
Binary file added Data/Locales/Places/Names/WamyoKori/zh-TW.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Data/PlaceNames/EastAsia/Yaponesia/TohokuAinu.bin
Binary file not shown.
Binary file not shown.
395 changes: 395 additions & 0 deletions Data/PlaceNames/Europe/LICENSE.txt

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Data/PlaceNames/Europe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License

[Itiner-e: the digital atlas of ancient roads](https://itiner-e.org/) © 2024 by Brughmans, Pažout, de Soto and Bjerregaard Vahlstrup is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Brughmans, T., de Soto, P., Pažout, A. and Bjerregaard Vahlstrup, P. (2024) Itiner-e: the digital atlas of ancient roads. https://itiner-e.org
Binary file added Data/PlaceNames/Europe/Roma.bin
Binary file not shown.
43,699 changes: 43,462 additions & 237 deletions Data/PlaceNames/Europe/Roma.tsv

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Data/Settings/FlowCurves.tsv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key file_path type description min_size max_size first_year last_year color line_width
Test1 Data/FlowCurves/Kuroshio.tsv view_flow_curve 黒潮 0 200 -2500 1500 black 55.5
Test2 Data/FlowCurves/Tsushima.tsv view_flow_curve 対馬海流 0 200 -2500 1500 black 55.5
Test3 Data/FlowCurves/EastKorea.tsv view_flow_curve 東朝鮮暖流 0 200 -2500 1500 black 55.5
Test4 Data/FlowCurves/GulfStream.tsv view_flow_curve メキシコ湾流 0 200 -2500 1500 black 55.5
Test1 Data/FlowCurves/Kuroshio.tsv view_flow_curve 黒潮 0 200 -2500 1500 #3C6491 6
Test2 Data/FlowCurves/Tsushima.tsv view_flow_curve 対馬海流 0 200 -2500 1500 #5B88BC 4
Test3 Data/FlowCurves/EastKorea.tsv view_flow_curve 東朝鮮暖流 0 200 -2500 1500 #5B88BC 2
Test4 Data/FlowCurves/GulfStream.tsv view_flow_curve メキシコ湾流 0 200 -2500 1500 #5B88BC 6
8 changes: 4 additions & 4 deletions Data/Settings/PlaceNames.tsv
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
key file_path type description min_size max_size first_julian_day last_julian_day texture zoom
Kojiki Data/PlaceNames/EastAsia/Yaponesia/KojikiPlaceName.tsv ancient_text 古事記の地名 0 2 1721424 1940208 1
SamgukSagi Data/PlaceNames/EastAsia/Korea/SamgukSagi.tsv ancient_text 三国史記 0.1 100 1
Wamyo Data/PlaceNames/EastAsia/Yaponesia/WamyoRuijushoPlaceName.tsv ancient_text 倭名類聚抄の地名 0 0.4 1721424 9999999 1
Wamyo Data/PlaceNames/EastAsia/Yaponesia/WamyoRuijushoPlaceName.bin ancient_text 倭名類聚抄の地名 0 0.4 1721424 9999999 1
Omoro Data/PlaceNames/EastAsia/Yaponesia/OmoroSoshiPlaceName.tsv ancient_text おもろさうしの地名 0 1 1721424 9999999 1
Ryoseikoku Data/PlaceNames/EastAsia/Yaponesia/Ryoseikoku.tsv administrative 令制国名 1 100 1
WamyoKori Data/PlaceNames/EastAsia/Yaponesia/WamyoRuijushoKori.tsv administrative 倭名類聚抄の郡 0.4 20 1721424 1
WamyoKori Data/PlaceNames/EastAsia/Yaponesia/WamyoRuijushoKori.bin administrative 倭名類聚抄の郡 0.4 20 1721424 1
TAinu Data/PlaceNames/EastAsia/Yaponesia/TohokuAinu.tsv indigenous 東北アイヌ 1 4 1721424 9999999 1
HAinu Data/PlaceNames/EastAsia/Yaponesia/HokkaidoAinu.tsv indigenous 北海道アイヌ 1 4 1721424 9999999 1
SAinu Data/PlaceNames/EastAsia/Yaponesia/SakhalinAinu.tsv indigenous サハリンアイヌ 1 4 1721424 9999999 1
KAinu Data/PlaceNames/EastAsia/Siberia/KamchatkaAinu.tsv indigenous カムサスカアイヌ 1 64 1721424 9999999 1
Balhae Data/PlaceNames/EastAsia/Manchuria/Balhae.tsv historical_state 渤海国 1 100 1976003 2059279 1
Roma Data/PlaceNames/Europe/Roma.tsv historical_state ローマ帝国 1 200 9999999 1
Roma Data/PlaceNames/Europe/Roma.bin historical_state ローマ帝国 1 4 9999999 1
PlaceNames Data/PlaceNames/PlaceNames.tsv general 汎用的な地名 200 1
China Data/PlaceNames/EastAsia/China/China.tsv general 中国大陸の地名 0.1 24 0 9999999 1
NRCT Data/PlaceNames/EastAsia/Yaponesia/Geoshape/NRCT.tsv general 『日本歴史地名大系』地名項目データセット 0 0.1 1721424 9999999 1
NRCT Data/PlaceNames/EastAsia/Yaponesia/Geoshape/NRCT.bin general 『日本歴史地名大系』地名項目データセット 0 0.1 1721424 9999999 1
10 changes: 5 additions & 5 deletions Data/Settings/Territories.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
key file_path type description min_size max_size first_year last_year color line_width
Territories1 Data/Territories/Sakishima/Shimotabaru.tsv view_territory 下田原文化 0 100 -2500 -1500 black 55.5
Territories2 Data/Territories/Sakishima/Mudoki.tsv view_territory 先島無土器文化 0 100 -200 1200 black 55.5
Territories3 Data/Territories/Ryukyu/Kaizuka.tsv view_territory 沖縄貝塚文化 0 100 -4400 1200 black 55.5
Territories4 Data/Territories/Lapita.tsv view_territory ラピタ文化 0 100 -1600 -500 black 55.5
Territories4 Data/Territories/Afanasievo.tsv view_territory ??? 0 200 -3300 -2500 black 55.5
Territories1 Data/Territories/Sakishima/Shimotabaru.tsv view_territory 下田原文化 0 100 -2500 -1500 #888888 55.5
Territories2 Data/Territories/Sakishima/Mudoki.tsv view_territory 先島無土器文化 0 100 -200 1200 #888888 55.5
Territories3 Data/Territories/Ryukyu/Kaizuka.tsv view_territory 沖縄貝塚文化 0 100 -4400 1200 #888888 55.5
Territories4 Data/Territories/Lapita.tsv view_territory ラピタ文化 0 100 -1600 -500 #888888 55.5
Territories4 Data/Territories/Afanasievo.tsv view_territory ??? 0 200 -3300 -2500 #888888 55.5
2 changes: 1 addition & 1 deletion Data/Simulations/EpiJomon/Settings.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ land_cost 2.5 傾斜度0度の陸上の通行コスト
move_redo 10 移動再試行回数
move_method astar 移動の手法(astar/random)
move_astar_loop 8 A*を行うルート数
move_astar_distance 128 A*を行うルート間隔
move_astar_distance 32 A*を行うルート間隔
#File -------------------- #ファイル --------------------------------------------------
marriage_file Marriage.tsv 年別婚姻率
childbearing_file Childbearing.tsv 年別出産率
Expand Down
122 changes: 122 additions & 0 deletions Library/PAX_GRAPHICA/ColorUtility.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/*##########################################################################################

PAX SAPIENTICA Library 💀🌿🌏

[Planning] 2023-2024 As Project
[Production] 2023-2024 As Project
[Contact Us] wanotaitei@gmail.com https://github.com/AsPJT/PAX_SAPIENTICA
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/

##########################################################################################*/

#ifndef PAX_GRAPHICA_COLOR_UTILITY_HPP
#define PAX_GRAPHICA_COLOR_UTILITY_HPP

#include <cstdint>
#include <string>
#include <optional>

#include <PAX_GRAPHICA/Color.hpp>

namespace paxg {

/// @brief カラー変換ユーティリティクラス
/// @brief Color conversion utility class
struct ColorUtility {
/// @brief 16進数カラー文字列をRGB値に変換
/// @brief Convert hexadecimal color string to RGB values
/// @param hex_string 16進数カラー文字列(例: "#fe78ba" または "fe78ba")/ Hex color string (e.g., "#fe78ba" or "fe78ba")
/// @return RGB値を持つColorオブジェクト。変換失敗時は std::nullopt / Color object with RGB values, or std::nullopt on failure
static std::optional<paxg::Color> parseHexColor(const std::string& hex_string) {
if (hex_string.empty()) {
return std::nullopt;
}

std::string hex = hex_string;

// '#'を除去 / Remove '#' if present
if (hex[0] == '#') {
hex = hex.substr(1);
}

// 16進数文字列の長さチェック(RGB: 6文字、RGBA: 8文字)
// Check hex string length (RGB: 6 chars, RGBA: 8 chars)
if (hex.length() != 6 && hex.length() != 8) {
return std::nullopt;
}

// 16進数文字列を整数に変換
// Convert hex string to integer
std::uint32_t hex_value = 0;
try {
hex_value = static_cast<std::uint32_t>(std::stoul(hex, nullptr, 16));
}
catch (...) {
return std::nullopt;
}

// RGBまたはRGBA値を抽出
// Extract RGB or RGBA values
std::uint8_t r, g, b, a = 255;

if (hex.length() == 6) {
// RGB形式 / RGB format
r = static_cast<std::uint8_t>((hex_value >> 16) & 0xFF);
g = static_cast<std::uint8_t>((hex_value >> 8) & 0xFF);
b = static_cast<std::uint8_t>(hex_value & 0xFF);
}
else {
// RGBA形式 / RGBA format
r = static_cast<std::uint8_t>((hex_value >> 24) & 0xFF);
g = static_cast<std::uint8_t>((hex_value >> 16) & 0xFF);
b = static_cast<std::uint8_t>((hex_value >> 8) & 0xFF);
a = static_cast<std::uint8_t>(hex_value & 0xFF);
}

return paxg::Color(r, g, b, a);
}

/// @brief ハッシュ値を16進数文字列に変換(仮の実装)
/// @brief Convert hash value to hex string (placeholder implementation)
/// @param hash_value ハッシュ値 / Hash value
/// @return 16進数カラー文字列 / Hex color string
/// @note 実際の実装では、ハッシュ値と色文字列のマッピングテーブルが必要
/// @note In actual implementation, a mapping table between hash values and color strings is needed
static std::string hashToHexString(std::uint_least32_t hash_value) {
// 仮実装: ハッシュ値の下位24ビットを色として使用
// Placeholder: Use lower 24 bits of hash as color
const std::uint32_t rgb = hash_value & 0xFFFFFF;

char hex_buffer[8];
std::snprintf(hex_buffer, sizeof(hex_buffer), "#%06x", rgb);

return std::string(hex_buffer);
}

/// @brief ハッシュ値からColorオブジェクトを取得
/// @brief Get Color object from hash value
/// @param hash_value ハッシュ値 / Hash value
/// @return Colorオブジェクト / Color object
static paxg::Color getColorFromHash(std::uint_least32_t hash_value) {
if (hash_value == 0) {
// デフォルト色(黒) / Default color (black)
return paxg::Color(0, 0, 0, 255);
}

// ハッシュ値を16進数文字列に変換してパース
// Convert hash to hex string and parse
const std::string hex_string = hashToHexString(hash_value);
auto color_opt = parseHexColor(hex_string);

if (color_opt.has_value()) {
return *color_opt;
}

// 変換失敗時はデフォルト色 / Return default color on failure
return paxg::Color(0, 0, 0, 255);
}
};

} // namespace paxg

#endif // !PAX_GRAPHICA_COLOR_UTILITY_HPP
12 changes: 8 additions & 4 deletions Library/PAX_GRAPHICA/Components/GenericSpline2DImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ namespace paxg {
// Auto-detect closed loop and remove duplicate last point
if (!is_closed) {
is_closed_ = detectAndFixClosedLoop(points_);
} else {
}
else {
is_closed_ = true;
// 明示的に閉じたループが指定された場合も重複チェック
// Also check for duplicates when explicitly specified as closed
Expand Down Expand Up @@ -123,7 +124,8 @@ namespace paxg {
// Auto-detect closed loop and remove duplicate last point
if (!is_closed) {
is_closed_ = detectAndFixClosedLoop(points_);
} else {
}
else {
is_closed_ = true;
// 明示的に閉じたループが指定された場合も重複チェック
// Also check for duplicates when explicitly specified as closed
Expand Down Expand Up @@ -154,7 +156,8 @@ namespace paxg {
// Auto-detect closed loop and remove duplicate last point
if (!is_closed) {
is_closed_ = detectAndFixClosedLoop(points_);
} else {
}
else {
is_closed_ = true;
// 明示的に閉じたループが指定された場合も重複チェック
// Also check for duplicates when explicitly specified as closed
Expand Down Expand Up @@ -198,7 +201,8 @@ namespace paxg {
p1 = points_[i];
p2 = points_[(i + 1) % point_count];
p3 = points_[(i + 2) % point_count];
} else {
}
else {
// 開いた曲線:既存のロジック
// Open curve: existing logic
p0 = (i == 0) ? points_[0] : points_[i - 1];
Expand Down
1 change: 1 addition & 0 deletions Library/PAX_GRAPHICA/Siv3D/Triangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <Siv3D.hpp>

#include <PAX_GRAPHICA/Interface/Triangle.hpp>
#include <PAX_SAPIENTICA/Core/Type/Vector2.hpp>

namespace paxg {

Expand Down
Loading
Loading