Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
40 changes: 24 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,27 @@ name: 🛠️ CI
on: [pull_request]

jobs:
clang-format:
uses: ./.github/workflows/clang-format.yml
secrets: inherit
clang-tidy:
uses: ./.github/workflows/clang-tidy.yml
secrets: inherit
windows:
uses: ./.github/workflows/windows.yml
secrets: inherit
linux:
uses: ./.github/workflows/linux.yml
secrets: inherit
mac-armv8:
uses: ./.github/workflows/mac.yml
secrets: inherit

clang-format:
uses: engine3d-dev/ci/.github/workflows/clang-format.yml@main
secrets: inherit

windows:
uses: engine3d-dev/ci/.github/workflows/windows.yml@main
with:
package_name: "TheAtlasEngine"
version: "0.5"
secrets: inherit

linux:
uses: engine3d-dev/ci/.github/workflows/linux.yml@main
with:
package_name: "TheAtlasEngine"
version: "0.5"
secrets: inherit

mac:
uses: engine3d-dev/ci/.github/workflows/mac.yml@main
with:
package_name: "TheAtlasEngine"
version: "0.5"
secrets: inherit
49 changes: 0 additions & 49 deletions .github/workflows/linux.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/mac.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/windows.yml

This file was deleted.

2 changes: 1 addition & 1 deletion atlas/core/scene/components.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export namespace atlas {
};

struct environment {
std::string filepath="";
std::string filepath = "";
};

struct material_metadata {
Expand Down
1 change: 0 additions & 1 deletion atlas/core/scene/scene.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ export namespace atlas {
*/
[[nodiscard]] uint64_t unique_id() const { return m_scene_uuid; }


void set_environment_map(const std::string& p_filepath) {
environment environment_mapping = {
.filepath = p_filepath,
Expand Down
7 changes: 4 additions & 3 deletions atlas/core/scene/uuid.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ module;

export module atlas.core.scene.uuid;


export namespace atlas {

class uuid {
public:
uuid() {
std::random_device rd;
std::mt19937_64 engine(rd());
std::uniform_int_distribution<uint64_t> distribution(std::numeric_limits<uint64_t>::min(), std::numeric_limits<uint64_t>::max());
std::uniform_int_distribution<uint64_t> distribution(
std::numeric_limits<uint64_t>::min(),
std::numeric_limits<uint64_t>::max());

m_uuid_value = distribution(engine);
}
Expand All @@ -22,6 +23,6 @@ export namespace atlas {
operator uint64_t() const { return m_uuid_value; }

private:
uint64_t m_uuid_value=0;
uint64_t m_uuid_value = 0;
};
};
20 changes: 10 additions & 10 deletions atlas/core/scene/world.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ export namespace atlas {
* with it
*/
world(const std::string& p_name, level_streamer& p_level_streamer)
: m_name(p_name), m_level_streamer(&p_level_streamer) {}
: m_name(p_name)
, m_level_streamer(&p_level_streamer) {}

virtual ~world() = default;

//! @return the name of world
[[nodiscard]] std::string name() const { return m_name; }

/**
* @brief Retrieves the currently active scene
*/
ref<scene> current() {
return m_current;
}
* @brief Retrieves the currently active scene
*/
ref<scene> current() { return m_current; }

/**
* @brief sets the default scene to an implementation-specific scene
*/
* @brief sets the default scene to an implementation-specific scene
*/
template<typename UScene>
void default_custom_scene(const std::string& p_name, event::bus& p_bus) {
void default_custom_scene(const std::string& p_name,
event::bus& p_bus) {
m_level_streamer->default_scene<UScene>(p_name, p_bus);
}

Expand All @@ -67,6 +67,6 @@ export namespace atlas {
private:
ref<scene> m_current;
std::string m_name = "Undefined Tag";
level_streamer* m_level_streamer=nullptr;
level_streamer* m_level_streamer = nullptr;
};
};
7 changes: 4 additions & 3 deletions atlas/core/serialize/serializer.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,12 @@ namespace atlas {
}

console_log_info("Before loading environment mappings!");
std::string environment_map_data="";
if(data["Environment"]) {
std::string environment_map_data = "";
if (data["Environment"]) {
environment_map_data = data["Environment"].as<std::string>();

console_log_info("Environment Map Loaded Path (from yaml): {}", environment_map_data);
console_log_info("Environment Map Loaded Path (from yaml): {}",
environment_map_data);
}

p_registry.set<environment>({ .filepath = environment_map_data });
Expand Down
17 changes: 11 additions & 6 deletions atlas/core/utilities/poll_state.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ module;
export module atlas.core.utilities.poll_state;

export namespace atlas {
inline std::unordered_map<void*, std::vector<std::function<void(float)>>> s_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>> s_defer_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>> s_ui_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>> s_physica_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>> s_start{};
inline std::unordered_map<void*, std::vector<std::function<void(float)>>>
s_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>>
s_defer_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>>
s_ui_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>>
s_physica_update{};
inline std::unordered_map<void*, std::vector<std::function<void()>>>
s_start{};

void poll_update(void* p_address,
const std::function<void(float)>& p_callback) {
Expand Down Expand Up @@ -81,7 +86,7 @@ export namespace atlas {
// on_update(p_delta_time);
// }

for(auto& on_update : s_update[p_scene]) {
for (auto& on_update : s_update[p_scene]) {
on_update(p_delta_time);
}
}
Expand Down
12 changes: 7 additions & 5 deletions atlas/drivers/vulkan/render_system.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ export namespace atlas::vulkan {
// m_skybox = environment_map(m_device, faces,
// m_physical.memory_properties(), m_final_renderpass); std::string

const environment* environment_data = m_current_scene->get<environment>();
m_skybox = environment_map(m_device,
std::filesystem::path(environment_data->filepath),
m_physical.memory_properties(),
m_final_renderpass);
const environment* environment_data =
m_current_scene->get<environment>();
m_skybox =
environment_map(m_device,
std::filesystem::path(environment_data->filepath),
m_physical.memory_properties(),
m_final_renderpass);

flecs::query<> caching =
m_current_scene->query_builder<mesh_source>().build();
Expand Down
3 changes: 2 additions & 1 deletion editor/level_scene.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ public:

flecs::world registry = *this;

// TODO: Should consider having this be a custom UI property to the editor.
// TODO: Should consider having this be a custom UI property to the
// editor.
auto viking_room = entity("Viking Room");
atlas::mesh_source* src = viking_room.get_mut<atlas::mesh_source>();
src->flip = true;
Expand Down
Loading