Browse Source

feat: add horse_swordsman_style.{h,cpp} for carthage, kingdom, roman nations

Adam Djellouli 1 month ago
parent
commit
5f3b22d0b5

+ 17 - 0
render/entity/nations/carthage/horse_swordsman_style.cpp

@@ -0,0 +1,17 @@
+#include "horse_swordsman_style.h"
+#include <unordered_map>
+
+static std::unordered_map<std::string, HorseSwordsmanStyleConfig> styles;
+
+void register_carthage_horse_swordsman_style() {
+    // Example: register a default style
+    HorseSwordsmanStyleConfig default_style;
+    default_style.cloth_color = QVector3D(0.8F, 0.7F, 0.6F);
+    default_style.leather_color = QVector3D(0.5F, 0.3F, 0.2F);
+    default_style.metal_color = QVector3D(0.7F, 0.7F, 0.8F);
+    default_style.shader_id = "horse_swordsman_carthage";
+    default_style.show_helmet = true;
+    default_style.show_armor = true;
+    default_style.has_cavalry_shield = true;
+    styles["default"] = default_style;
+}

+ 22 - 0
render/entity/nations/carthage/horse_swordsman_style.h

@@ -0,0 +1,22 @@
+#pragma once
+
+#include <QVector3D>
+#include <optional>
+#include <string>
+
+struct HorseSwordsmanStyleConfig {
+    std::optional<QVector3D> cloth_color;
+    std::optional<QVector3D> leather_color;
+    std::optional<QVector3D> leather_dark_color;
+    std::optional<QVector3D> metal_color;
+    std::optional<QVector3D> wood_color;
+    std::optional<QVector3D> cape_color;
+    std::string shader_id;
+    bool show_helmet = true;
+    bool show_armor = true;
+    bool show_shoulder_decor = false;
+    bool show_cape = false;
+    bool has_cavalry_shield = false;
+};
+
+void register_carthage_horse_swordsman_style();

+ 16 - 0
render/entity/nations/kingdom/horse_swordsman_style.cpp

@@ -0,0 +1,16 @@
+#include "horse_swordsman_style.h"
+#include <unordered_map>
+
+static std::unordered_map<std::string, HorseSwordsmanStyleConfig> styles;
+
+void register_kingdom_horse_swordsman_style() {
+    HorseSwordsmanStyleConfig default_style;
+    default_style.cloth_color = QVector3D(0.7F, 0.7F, 0.9F);
+    default_style.leather_color = QVector3D(0.4F, 0.3F, 0.2F);
+    default_style.metal_color = QVector3D(0.8F, 0.8F, 0.7F);
+    default_style.shader_id = "horse_swordsman_kingdom";
+    default_style.show_helmet = true;
+    default_style.show_armor = true;
+    default_style.has_cavalry_shield = true;
+    styles["default"] = default_style;
+}

+ 22 - 0
render/entity/nations/kingdom/horse_swordsman_style.h

@@ -0,0 +1,22 @@
+#pragma once
+
+#include <QVector3D>
+#include <optional>
+#include <string>
+
+struct HorseSwordsmanStyleConfig {
+    std::optional<QVector3D> cloth_color;
+    std::optional<QVector3D> leather_color;
+    std::optional<QVector3D> leather_dark_color;
+    std::optional<QVector3D> metal_color;
+    std::optional<QVector3D> wood_color;
+    std::optional<QVector3D> cape_color;
+    std::string shader_id;
+    bool show_helmet = true;
+    bool show_armor = true;
+    bool show_shoulder_decor = false;
+    bool show_cape = false;
+    bool has_cavalry_shield = false;
+};
+
+void register_kingdom_horse_swordsman_style();

+ 16 - 0
render/entity/nations/roman/horse_swordsman_style.cpp

@@ -0,0 +1,16 @@
+#include "horse_swordsman_style.h"
+#include <unordered_map>
+
+static std::unordered_map<std::string, HorseSwordsmanStyleConfig> styles;
+
+void register_roman_horse_swordsman_style() {
+    HorseSwordsmanStyleConfig default_style;
+    default_style.cloth_color = QVector3D(0.6F, 0.6F, 0.7F);
+    default_style.leather_color = QVector3D(0.3F, 0.2F, 0.2F);
+    default_style.metal_color = QVector3D(0.9F, 0.8F, 0.7F);
+    default_style.shader_id = "horse_swordsman_roman";
+    default_style.show_helmet = true;
+    default_style.show_armor = true;
+    default_style.has_cavalry_shield = true;
+    styles["default"] = default_style;
+}

+ 22 - 0
render/entity/nations/roman/horse_swordsman_style.h

@@ -0,0 +1,22 @@
+#pragma once
+
+#include <QVector3D>
+#include <optional>
+#include <string>
+
+struct HorseSwordsmanStyleConfig {
+    std::optional<QVector3D> cloth_color;
+    std::optional<QVector3D> leather_color;
+    std::optional<QVector3D> leather_dark_color;
+    std::optional<QVector3D> metal_color;
+    std::optional<QVector3D> wood_color;
+    std::optional<QVector3D> cape_color;
+    std::string shader_id;
+    bool show_helmet = true;
+    bool show_armor = true;
+    bool show_shoulder_decor = false;
+    bool show_cape = false;
+    bool has_cavalry_shield = false;
+};
+
+void register_roman_horse_swordsman_style();