From 585949c42819925f68efce3c07236a46b139baf3 Mon Sep 17 00:00:00 2001 From: Egor Orachyov Date: Fri, 17 May 2024 16:36:46 +0300 Subject: [PATCH] gh-74: support compression in archives --- .github/workflows/clang-format.yml | 4 +- .vscode/launch.json | 4 +- engine/CMakeLists.txt | 2 +- engine/code/io/archive_file.cpp | 133 ----------- engine/config/engine.cfg | 6 +- engine/config/game.cfg | 4 +- engine/{code => runtime}/CMakeLists.txt | 0 engine/{code => runtime}/asset/_rtti.cpp | 0 engine/{code => runtime}/asset/_rtti.hpp | 0 engine/{code => runtime}/asset/asset.cpp | 0 engine/{code => runtime}/asset/asset.hpp | 0 .../asset/asset_import_data.hpp | 0 .../{code => runtime}/asset/asset_loader.hpp | 0 .../{code => runtime}/asset/asset_manager.cpp | 0 .../{code => runtime}/asset/asset_manager.hpp | 0 engine/{code => runtime}/asset/asset_meta.hpp | 0 engine/{code => runtime}/asset/asset_pak.hpp | 0 .../{code => runtime}/asset/asset_pak_fs.cpp | 0 .../{code => runtime}/asset/asset_pak_fs.hpp | 0 engine/{code => runtime}/asset/asset_ref.hpp | 0 engine/{code => runtime}/audio/_rtti.cpp | 0 engine/{code => runtime}/audio/_rtti.hpp | 0 engine/{code => runtime}/audio/audio_bus.hpp | 0 engine/{code => runtime}/audio/audio_defs.hpp | 0 .../{code => runtime}/audio/audio_engine.hpp | 0 .../audio/audio_playback.hpp | 0 .../{code => runtime}/audio/audio_stream.cpp | 0 .../{code => runtime}/audio/audio_stream.hpp | 0 .../audio/audio_stream_wav.cpp | 0 .../audio/audio_stream_wav.hpp | 0 .../{code => runtime}/audio/openal/al_bus.cpp | 0 .../{code => runtime}/audio/openal/al_bus.hpp | 0 .../audio/openal/al_defs.cpp | 0 .../audio/openal/al_defs.hpp | 0 .../audio/openal/al_engine.cpp | 0 .../audio/openal/al_engine.hpp | 0 .../audio/openal/al_playback.cpp | 0 .../audio/openal/al_playback.hpp | 0 engine/{code => runtime}/core/array_view.hpp | 0 engine/{code => runtime}/core/async.cpp | 0 engine/{code => runtime}/core/async.hpp | 0 .../core/buffered_vector.hpp | 0 .../{code => runtime}/core/callback_queue.cpp | 0 .../{code => runtime}/core/callback_queue.hpp | 0 .../core/callback_stream.cpp | 0 .../core/callback_stream.hpp | 0 engine/{code => runtime}/core/class.cpp | 0 engine/{code => runtime}/core/class.hpp | 0 engine/{code => runtime}/core/cmd_line.cpp | 0 engine/{code => runtime}/core/cmd_line.hpp | 0 engine/{code => runtime}/core/crc32.cpp | 0 engine/{code => runtime}/core/crc32.hpp | 0 engine/{code => runtime}/core/data.cpp | 0 engine/{code => runtime}/core/data.hpp | 0 engine/{code => runtime}/core/date_time.cpp | 0 engine/{code => runtime}/core/date_time.hpp | 0 engine/{code => runtime}/core/flat_map.hpp | 0 engine/{code => runtime}/core/flat_set.hpp | 0 engine/{code => runtime}/core/log.cpp | 0 engine/{code => runtime}/core/log.hpp | 0 engine/{code => runtime}/core/mask.hpp | 0 engine/{code => runtime}/core/object.cpp | 0 engine/{code => runtime}/core/object.hpp | 0 engine/{code => runtime}/core/pool_vector.hpp | 0 engine/{code => runtime}/core/random.cpp | 0 engine/{code => runtime}/core/random.hpp | 0 engine/{code => runtime}/core/ref.cpp | 0 engine/{code => runtime}/core/ref.hpp | 0 engine/{code => runtime}/core/sha256.cpp | 0 engine/{code => runtime}/core/sha256.hpp | 0 engine/{code => runtime}/core/signal.hpp | 0 engine/{code => runtime}/core/simple_id.hpp | 0 engine/{code => runtime}/core/status.hpp | 0 engine/{code => runtime}/core/string_id.cpp | 0 engine/{code => runtime}/core/string_id.hpp | 0 engine/{code => runtime}/core/string_utf.cpp | 0 engine/{code => runtime}/core/string_utf.hpp | 0 .../{code => runtime}/core/string_utils.cpp | 0 .../{code => runtime}/core/string_utils.hpp | 0 .../core/synchronization.hpp | 0 engine/{code => runtime}/core/task.cpp | 0 engine/{code => runtime}/core/task.hpp | 0 engine/{code => runtime}/core/task_hnd.hpp | 0 .../{code => runtime}/core/task_manager.cpp | 0 .../{code => runtime}/core/task_manager.hpp | 0 .../core/task_parallel_for.cpp | 0 .../core/task_parallel_for.hpp | 0 .../{code => runtime}/core/task_runtime.cpp | 0 .../{code => runtime}/core/task_runtime.hpp | 0 engine/{code => runtime}/core/timer.cpp | 0 engine/{code => runtime}/core/timer.hpp | 0 engine/{code => runtime}/core/typed_array.hpp | 0 engine/{code => runtime}/core/typed_map.hpp | 0 engine/{code => runtime}/core/uuid.cpp | 0 engine/{code => runtime}/core/uuid.hpp | 0 engine/{code => runtime}/core/var.cpp | 0 engine/{code => runtime}/core/var.hpp | 0 engine/{code => runtime}/core/weak_ref.cpp | 0 engine/{code => runtime}/core/weak_ref.hpp | 0 engine/{code => runtime}/debug/console.cpp | 0 engine/{code => runtime}/debug/console.hpp | 0 .../{code => runtime}/debug/debug_layer.cpp | 0 .../{code => runtime}/debug/debug_layer.hpp | 0 .../{code => runtime}/ecs/ecs_component.hpp | 0 engine/{code => runtime}/ecs/ecs_core.cpp | 0 engine/{code => runtime}/ecs/ecs_core.hpp | 0 engine/{code => runtime}/ecs/ecs_entity.hpp | 0 engine/{code => runtime}/ecs/ecs_memory.cpp | 0 engine/{code => runtime}/ecs/ecs_memory.hpp | 0 engine/{code => runtime}/ecs/ecs_registry.cpp | 0 engine/{code => runtime}/ecs/ecs_registry.hpp | 0 engine/{code => runtime}/ecs/ecs_system.hpp | 0 engine/{code => runtime}/ecs/ecs_world.cpp | 0 engine/{code => runtime}/ecs/ecs_world.hpp | 0 engine/{code => runtime}/engine.hpp | 2 +- engine/{code => runtime}/event/_rtti.hpp | 0 engine/{code => runtime}/event/event.cpp | 0 engine/{code => runtime}/event/event.hpp | 0 .../{code => runtime}/event/event_action.cpp | 0 .../{code => runtime}/event/event_action.hpp | 0 .../{code => runtime}/event/event_asset.cpp | 0 .../{code => runtime}/event/event_asset.hpp | 0 .../event/event_filesystem.cpp | 0 .../event/event_filesystem.hpp | 0 .../{code => runtime}/event/event_input.cpp | 0 .../{code => runtime}/event/event_input.hpp | 0 .../event/event_listener.hpp | 0 .../{code => runtime}/event/event_manager.cpp | 0 .../{code => runtime}/event/event_manager.hpp | 0 .../{code => runtime}/event/event_scene.cpp | 0 .../{code => runtime}/event/event_scene.hpp | 0 .../{code => runtime}/event/event_script.cpp | 0 .../{code => runtime}/event/event_script.hpp | 0 .../{code => runtime}/event/event_token.cpp | 0 .../{code => runtime}/event/event_token.hpp | 0 .../{code => runtime}/event/event_window.cpp | 0 .../{code => runtime}/event/event_window.hpp | 0 .../event/register_classes_event.cpp | 0 .../event/register_classes_event.hpp | 0 .../gameplay/action_manager.cpp | 0 .../gameplay/action_manager.hpp | 0 .../{code => runtime}/gameplay/action_map.cpp | 0 .../{code => runtime}/gameplay/action_map.hpp | 0 .../gameplay/game_token_manager.cpp | 0 .../gameplay/game_token_manager.hpp | 0 engine/{code => runtime}/gfx/gfx_buffers.cpp | 0 engine/{code => runtime}/gfx/gfx_buffers.hpp | 0 engine/{code => runtime}/gfx/gfx_ctx.cpp | 0 engine/{code => runtime}/gfx/gfx_ctx.hpp | 0 engine/{code => runtime}/gfx/gfx_defs.hpp | 0 engine/{code => runtime}/gfx/gfx_desc_set.cpp | 0 engine/{code => runtime}/gfx/gfx_desc_set.hpp | 0 engine/{code => runtime}/gfx/gfx_driver.hpp | 0 .../gfx/gfx_dynamic_buffers.cpp | 0 .../gfx/gfx_dynamic_buffers.hpp | 0 engine/{code => runtime}/gfx/gfx_pipeline.cpp | 0 engine/{code => runtime}/gfx/gfx_pipeline.hpp | 0 .../{code => runtime}/gfx/gfx_render_pass.cpp | 0 .../{code => runtime}/gfx/gfx_render_pass.hpp | 0 engine/{code => runtime}/gfx/gfx_resource.hpp | 0 engine/{code => runtime}/gfx/gfx_sampler.cpp | 0 engine/{code => runtime}/gfx/gfx_sampler.hpp | 0 engine/{code => runtime}/gfx/gfx_shader.hpp | 0 engine/{code => runtime}/gfx/gfx_texture.hpp | 0 engine/{code => runtime}/gfx/gfx_vector.hpp | 0 .../{code => runtime}/gfx/gfx_vert_format.cpp | 0 .../{code => runtime}/gfx/gfx_vert_format.hpp | 0 .../{code => runtime}/gfx/opengl/readme.txt | 0 .../gfx/threaded/gfx_ctx_threaded.hpp | 0 .../gfx/threaded/gfx_ctx_wrapper.cpp | 0 .../gfx/threaded/gfx_ctx_wrapper.hpp | 0 .../gfx/threaded/gfx_driver_threaded.hpp | 0 .../gfx/threaded/gfx_driver_wrapper.cpp | 0 .../gfx/threaded/gfx_driver_wrapper.hpp | 0 .../gfx/threaded/gfx_worker.cpp | 0 .../gfx/threaded/gfx_worker.hpp | 0 .../gfx/vulkan/vk_buffers.cpp | 0 .../gfx/vulkan/vk_buffers.hpp | 0 .../gfx/vulkan/vk_cmd_manager.cpp | 0 .../gfx/vulkan/vk_cmd_manager.hpp | 0 .../{code => runtime}/gfx/vulkan/vk_ctx.cpp | 0 .../{code => runtime}/gfx/vulkan/vk_ctx.hpp | 0 .../{code => runtime}/gfx/vulkan/vk_defs.cpp | 0 .../{code => runtime}/gfx/vulkan/vk_defs.hpp | 0 .../gfx/vulkan/vk_desc_manager.cpp | 0 .../gfx/vulkan/vk_desc_manager.hpp | 0 .../gfx/vulkan/vk_desc_set.cpp | 0 .../gfx/vulkan/vk_desc_set.hpp | 0 .../gfx/vulkan/vk_driver.cpp | 0 .../gfx/vulkan/vk_driver.hpp | 0 .../gfx/vulkan/vk_mem_manager.cpp | 0 .../gfx/vulkan/vk_mem_manager.hpp | 0 .../gfx/vulkan/vk_pipeline.cpp | 0 .../gfx/vulkan/vk_pipeline.hpp | 0 .../gfx/vulkan/vk_queues.cpp | 0 .../gfx/vulkan/vk_queues.hpp | 0 .../gfx/vulkan/vk_render_pass.cpp | 0 .../gfx/vulkan/vk_render_pass.hpp | 0 .../gfx/vulkan/vk_resource.hpp | 0 .../gfx/vulkan/vk_sampler.cpp | 0 .../gfx/vulkan/vk_sampler.hpp | 0 .../gfx/vulkan/vk_shader.cpp | 0 .../gfx/vulkan/vk_shader.hpp | 0 .../gfx/vulkan/vk_texture.cpp | 0 .../gfx/vulkan/vk_texture.hpp | 0 .../gfx/vulkan/vk_vert_format.cpp | 0 .../gfx/vulkan/vk_vert_format.hpp | 0 .../gfx/vulkan/vk_window.cpp | 0 .../gfx/vulkan/vk_window.hpp | 0 engine/{code => runtime}/glsl/_rtti.cpp | 0 engine/{code => runtime}/glsl/_rtti.hpp | 0 .../{code => runtime}/glsl/glsl_builder.cpp | 0 .../{code => runtime}/glsl/glsl_builder.hpp | 0 .../glsl/glsl_include_processor.cpp | 0 .../glsl/glsl_include_processor.hpp | 0 .../glsl/glsl_shader_compiler.cpp | 1 - .../glsl/glsl_shader_compiler.hpp | 0 engine/{code => runtime}/grc/_rtti.cpp | 0 engine/{code => runtime}/grc/_rtti.hpp | 0 engine/{code => runtime}/grc/font.cpp | 0 engine/{code => runtime}/grc/font.hpp | 0 engine/{code => runtime}/grc/image.cpp | 0 engine/{code => runtime}/grc/image.hpp | 0 engine/{code => runtime}/grc/pso_cache.cpp | 0 engine/{code => runtime}/grc/pso_cache.hpp | 0 engine/{code => runtime}/grc/pso_file.cpp | 8 +- engine/{code => runtime}/grc/pso_file.hpp | 0 engine/{code => runtime}/grc/shader.cpp | 0 engine/{code => runtime}/grc/shader.hpp | 0 .../{code => runtime}/grc/shader_builder.cpp | 0 .../{code => runtime}/grc/shader_builder.hpp | 0 engine/{code => runtime}/grc/shader_cache.cpp | 14 +- engine/{code => runtime}/grc/shader_cache.hpp | 0 .../{code => runtime}/grc/shader_compiler.hpp | 0 .../grc/shader_compiler_task_manager.hpp | 0 engine/{code => runtime}/grc/shader_file.hpp | 0 .../{code => runtime}/grc/shader_instance.cpp | 0 .../{code => runtime}/grc/shader_instance.hpp | 0 .../{code => runtime}/grc/shader_library.cpp | 12 +- .../{code => runtime}/grc/shader_library.hpp | 0 .../{code => runtime}/grc/shader_manager.cpp | 0 .../{code => runtime}/grc/shader_manager.hpp | 0 engine/{code => runtime}/grc/shader_param.cpp | 0 engine/{code => runtime}/grc/shader_param.hpp | 0 .../grc/shader_param_block.cpp | 0 .../grc/shader_param_block.hpp | 0 .../grc/shader_reflection.cpp | 0 .../grc/shader_reflection.hpp | 0 engine/{code => runtime}/grc/texture.cpp | 0 engine/{code => runtime}/grc/texture.hpp | 0 .../grc/texture_compression.cpp | 0 .../grc/texture_compression.hpp | 0 .../{code => runtime}/grc/texture_manager.cpp | 0 .../{code => runtime}/grc/texture_manager.hpp | 0 .../{code => runtime}/grc/texture_resize.cpp | 0 .../{code => runtime}/grc/texture_resize.hpp | 0 .../{code => runtime}/hooks/hook_config.hpp | 18 -- .../{code => runtime}/hooks/hook_engine.hpp | 38 +++- engine/{code => runtime}/hooks/hook_logs.hpp | 0 .../{code => runtime}/hooks/hook_profiler.hpp | 0 .../hooks/hook_root_remap.hpp | 0 .../{code => runtime}/hooks/hook_uuid_gen.hpp | 0 engine/{code => runtime}/io/archive.cpp | 0 engine/{code => runtime}/io/archive.hpp | 10 +- engine/runtime/io/archive_file.cpp | 215 ++++++++++++++++++ .../io/archive_file.hpp} | 66 +++--- engine/{code => runtime}/io/base64.cpp | 0 engine/{code => runtime}/io/base64.hpp | 0 engine/{code => runtime}/io/compression.cpp | 23 +- engine/{code => runtime}/io/compression.hpp | 14 +- engine/{code => runtime}/io/context.cpp | 0 engine/{code => runtime}/io/context.hpp | 0 engine/{code => runtime}/io/enum.hpp | 0 engine/runtime/io/ini.cpp | 81 +++++++ .../archive_memory.cpp => runtime/io/ini.hpp} | 73 +++--- engine/{code => runtime}/io/serialization.hpp | 0 engine/{code => runtime}/io/yaml.cpp | 0 engine/{code => runtime}/io/yaml.hpp | 0 engine/{code => runtime}/material/_rtti.cpp | 0 engine/{code => runtime}/material/_rtti.hpp | 0 .../{code => runtime}/material/material.cpp | 0 .../{code => runtime}/material/material.hpp | 0 engine/{code => runtime}/math/aabb.hpp | 0 engine/{code => runtime}/math/color.cpp | 0 engine/{code => runtime}/math/color.hpp | 0 engine/{code => runtime}/math/frustum.hpp | 0 engine/{code => runtime}/math/mat.hpp | 0 engine/{code => runtime}/math/math_utils.cpp | 0 engine/{code => runtime}/math/math_utils.hpp | 0 .../{code => runtime}/math/math_utils2d.hpp | 0 .../{code => runtime}/math/math_utils3d.hpp | 0 engine/{code => runtime}/math/plane.hpp | 0 engine/{code => runtime}/math/quat.hpp | 0 engine/{code => runtime}/math/range.hpp | 0 engine/{code => runtime}/math/transform.hpp | 0 engine/{code => runtime}/math/vec.hpp | 0 .../{code => runtime}/memory/mem_linear.cpp | 0 .../{code => runtime}/memory/mem_linear.hpp | 0 engine/{code => runtime}/memory/mem_pool.cpp | 0 engine/{code => runtime}/memory/mem_pool.hpp | 0 engine/{code => runtime}/mesh/_rtti.cpp | 0 engine/{code => runtime}/mesh/_rtti.hpp | 0 engine/{code => runtime}/mesh/array_mesh.cpp | 0 engine/{code => runtime}/mesh/array_mesh.hpp | 0 engine/{code => runtime}/mesh/mesh.cpp | 0 engine/{code => runtime}/mesh/mesh.hpp | 0 engine/{code => runtime}/mesh/mesh_batch.cpp | 0 engine/{code => runtime}/mesh/mesh_batch.hpp | 0 engine/{code => runtime}/mesh/mesh_bucket.cpp | 0 engine/{code => runtime}/mesh/mesh_bucket.hpp | 0 .../{code => runtime}/mesh/mesh_builder.cpp | 0 .../{code => runtime}/mesh/mesh_builder.hpp | 0 engine/{code => runtime}/mesh/mesh_pass.cpp | 0 engine/{code => runtime}/mesh/mesh_pass.hpp | 0 .../mesh/mesh_processors.cpp | 0 .../mesh/mesh_processors.hpp | 0 engine/{code => runtime}/pfx/_rtti.cpp | 0 engine/{code => runtime}/pfx/_rtti.hpp | 0 .../{code => runtime}/pfx/pfx_component.cpp | 0 .../{code => runtime}/pfx/pfx_component.hpp | 0 .../pfx/pfx_component_runtime.cpp | 0 .../pfx/pfx_component_runtime.hpp | 0 engine/{code => runtime}/pfx/pfx_effect.cpp | 0 engine/{code => runtime}/pfx/pfx_effect.hpp | 0 engine/{code => runtime}/pfx/pfx_emitter.cpp | 0 engine/{code => runtime}/pfx/pfx_emitter.hpp | 0 engine/{code => runtime}/pfx/pfx_feature.cpp | 0 engine/{code => runtime}/pfx/pfx_feature.hpp | 0 engine/{code => runtime}/pfx/pfx_scene.cpp | 0 engine/{code => runtime}/pfx/pfx_scene.hpp | 0 engine/{code => runtime}/pfx/pfx_storage.cpp | 0 engine/{code => runtime}/pfx/pfx_storage.hpp | 0 .../pfx/register_classes_pfx.cpp | 0 .../pfx/register_classes_pfx.hpp | 0 .../platform/application.cpp | 1 - .../platform/application.hpp | 0 engine/runtime/platform/common/file_mem.cpp | 86 +++++++ .../platform/common/file_mem.hpp} | 94 +++----- .../platform/common/file_physical.cpp | 0 .../platform/common/file_physical.hpp | 0 .../platform/common/mount_volume_physical.cpp | 0 .../platform/common/mount_volume_physical.hpp | 0 .../platform/dll_manager.cpp | 0 .../platform/dll_manager.hpp | 0 engine/{code => runtime}/platform/file.hpp | 0 .../platform/file_system.cpp | 27 +-- .../platform/file_system.hpp | 4 +- .../platform/glfw/glfw_input.cpp | 0 .../platform/glfw/glfw_input.hpp | 0 .../platform/glfw/glfw_input_defs.hpp | 0 .../platform/glfw/glfw_input_devices.cpp | 0 .../platform/glfw/glfw_input_devices.hpp | 0 .../platform/glfw/glfw_window.cpp | 0 .../platform/glfw/glfw_window.hpp | 0 .../platform/glfw/glfw_window_manager.cpp | 0 .../platform/glfw/glfw_window_manager.hpp | 0 engine/{code => runtime}/platform/input.hpp | 0 .../{code => runtime}/platform/input_defs.hpp | 0 .../platform/input_devices.hpp | 0 .../platform/mount_volume.hpp | 0 engine/{code => runtime}/platform/time.cpp | 0 engine/{code => runtime}/platform/time.hpp | 0 engine/{code => runtime}/platform/window.hpp | 0 .../platform/window_manager.hpp | 0 .../{code => runtime}/profiler/profiler.cpp | 0 .../{code => runtime}/profiler/profiler.hpp | 0 engine/{code => runtime}/render/_rtti.cpp | 0 engine/{code => runtime}/render/_rtti.hpp | 0 .../render/aux_draw_manager.cpp | 0 .../render/aux_draw_manager.hpp | 0 engine/{code => runtime}/render/camera.cpp | 0 engine/{code => runtime}/render/camera.hpp | 0 engine/{code => runtime}/render/canvas.cpp | 0 engine/{code => runtime}/render/canvas.hpp | 0 engine/{code => runtime}/render/common.hpp | 0 engine/{code => runtime}/render/culling.cpp | 0 engine/{code => runtime}/render/culling.hpp | 0 .../render/deferred_pipeline.cpp | 0 .../render/deferred_pipeline.hpp | 0 .../render/graphics_pipeline.cpp | 0 .../render/graphics_pipeline.hpp | 0 engine/{code => runtime}/render/light.cpp | 0 engine/{code => runtime}/render/light.hpp | 0 engine/{code => runtime}/render/model.cpp | 0 engine/{code => runtime}/render/model.hpp | 0 .../render/model_instance.cpp | 0 .../render/model_instance.hpp | 0 .../{code => runtime}/render/render_defs.hpp | 0 .../render/render_engine.cpp | 0 .../render/render_engine.hpp | 0 .../{code => runtime}/render/render_queue.cpp | 0 .../{code => runtime}/render/render_queue.hpp | 0 .../{code => runtime}/render/render_scene.cpp | 0 .../{code => runtime}/render/render_scene.hpp | 0 engine/{code => runtime}/render/view.cpp | 0 engine/{code => runtime}/render/view.hpp | 0 .../{code => runtime}/render/view_manager.cpp | 0 .../{code => runtime}/render/view_manager.hpp | 0 engine/{code => runtime}/rtti/_rtti.cpp | 0 engine/{code => runtime}/rtti/_rtti.hpp | 0 engine/{code => runtime}/rtti/builtin.hpp | 0 engine/{code => runtime}/rtti/class.cpp | 0 engine/{code => runtime}/rtti/class.hpp | 0 engine/{code => runtime}/rtti/enum.hpp | 0 engine/{code => runtime}/rtti/function.hpp | 0 engine/{code => runtime}/rtti/meta_data.cpp | 0 engine/{code => runtime}/rtti/meta_data.hpp | 0 engine/{code => runtime}/rtti/object.cpp | 0 engine/{code => runtime}/rtti/object.hpp | 0 engine/{code => runtime}/rtti/struct.cpp | 0 engine/{code => runtime}/rtti/struct.hpp | 0 engine/{code => runtime}/rtti/traits.hpp | 0 engine/{code => runtime}/rtti/type.hpp | 0 .../{code => runtime}/rtti/type_storage.cpp | 0 .../{code => runtime}/rtti/type_storage.hpp | 0 engine/{code => runtime}/scene/_rtti.cpp | 0 engine/{code => runtime}/scene/_rtti.hpp | 0 .../scene/register_classes_scene.cpp | 0 .../scene/register_classes_scene.hpp | 0 engine/{code => runtime}/scene/scene.cpp | 0 engine/{code => runtime}/scene/scene.hpp | 0 .../scene/scene_components.cpp | 0 .../scene/scene_components.hpp | 0 engine/{code => runtime}/scene/scene_data.cpp | 0 engine/{code => runtime}/scene/scene_data.hpp | 0 .../{code => runtime}/scene/scene_entity.cpp | 0 .../{code => runtime}/scene/scene_entity.hpp | 0 .../{code => runtime}/scene/scene_manager.cpp | 0 .../{code => runtime}/scene/scene_manager.hpp | 0 engine/{code => runtime}/scene/scene_node.cpp | 0 engine/{code => runtime}/scene/scene_node.hpp | 0 .../scene/scene_node_props.cpp | 0 .../scene/scene_node_props.hpp | 0 .../{code => runtime}/scene/scene_packed.cpp | 0 .../{code => runtime}/scene/scene_packed.hpp | 0 .../{code => runtime}/scene/scene_prefab.cpp | 0 .../{code => runtime}/scene/scene_prefab.hpp | 0 .../{code => runtime}/scene/scene_systems.cpp | 0 .../{code => runtime}/scene/scene_systems.hpp | 0 engine/{code => runtime}/scene/scene_tree.cpp | 0 engine/{code => runtime}/scene/scene_tree.hpp | 0 .../scene/scene_tree_packed.cpp | 0 .../scene/scene_tree_packed.hpp | 0 engine/{code => runtime}/scripting/_rtti.cpp | 0 engine/{code => runtime}/scripting/_rtti.hpp | 0 .../scripting/lua/lua_defs.cpp | 0 .../scripting/lua/lua_defs.hpp | 0 .../scripting/lua/lua_event_script.cpp | 0 .../scripting/lua/lua_event_script.hpp | 0 .../scripting/lua/lua_script.cpp | 0 .../scripting/lua/lua_script.hpp | 0 .../scripting/lua/lua_script_instance.cpp | 0 .../scripting/lua/lua_script_instance.hpp | 0 .../scripting/lua/lua_script_system.cpp | 0 .../scripting/lua/lua_script_system.hpp | 0 .../scripting/lua/lua_type_traits.cpp | 0 .../scripting/lua/lua_type_traits.hpp | 0 .../scripting/lua_bindings/lua_bindings.hpp | 0 .../lua_bindings/lua_bindings_asset.cpp | 0 .../lua_bindings/lua_bindings_asset.hpp | 0 .../lua_bindings/lua_bindings_core.cpp | 0 .../lua_bindings/lua_bindings_core.hpp | 0 .../lua_bindings/lua_bindings_event.cpp | 0 .../lua_bindings/lua_bindings_event.hpp | 0 .../lua_bindings/lua_bindings_gameplay.cpp | 0 .../lua_bindings/lua_bindings_gameplay.hpp | 0 .../lua_bindings/lua_bindings_math.cpp | 0 .../lua_bindings/lua_bindings_math.hpp | 0 .../lua_bindings/lua_bindings_platform.cpp | 0 .../lua_bindings/lua_bindings_platform.hpp | 0 .../lua_bindings/lua_bindings_scene.cpp | 0 .../lua_bindings/lua_bindings_scene.hpp | 0 engine/{code => runtime}/scripting/script.cpp | 0 engine/{code => runtime}/scripting/script.hpp | 0 .../scripting/script_instance.hpp | 0 .../scripting/script_native.cpp | 0 .../scripting/script_native.hpp | 0 .../scripting/script_system.hpp | 0 engine/{code => runtime}/system/_rtti.cpp | 0 engine/{code => runtime}/system/_rtti.hpp | 0 engine/{code => runtime}/system/config.cpp | 0 engine/{code => runtime}/system/config.hpp | 0 .../{code => runtime}/system/config_file.cpp | 47 +--- .../{code => runtime}/system/config_file.hpp | 0 engine/{code => runtime}/system/engine.cpp | 0 engine/{code => runtime}/system/engine.hpp | 0 engine/{code => runtime}/system/hook.cpp | 0 engine/{code => runtime}/system/hook.hpp | 0 .../system/ioc_container.cpp | 0 .../system/ioc_container.hpp | 0 engine/{code => runtime}/system/layer.cpp | 0 engine/{code => runtime}/system/layer.hpp | 0 engine/{code => runtime}/system/plugin.hpp | 0 .../system/plugin_manager.cpp | 0 .../system/plugin_manager.hpp | 0 games/flappyowl/config/engine.cfg | 4 +- games/flappyowl/resources/scripts/owl.lua | 4 +- template/config/game.cfg | 4 +- template/main.cpp | 4 +- 499 files changed, 590 insertions(+), 413 deletions(-) delete mode 100644 engine/code/io/archive_file.cpp rename engine/{code => runtime}/CMakeLists.txt (100%) rename engine/{code => runtime}/asset/_rtti.cpp (100%) rename engine/{code => runtime}/asset/_rtti.hpp (100%) rename engine/{code => runtime}/asset/asset.cpp (100%) rename engine/{code => runtime}/asset/asset.hpp (100%) rename engine/{code => runtime}/asset/asset_import_data.hpp (100%) rename engine/{code => runtime}/asset/asset_loader.hpp (100%) rename engine/{code => runtime}/asset/asset_manager.cpp (100%) rename engine/{code => runtime}/asset/asset_manager.hpp (100%) rename engine/{code => runtime}/asset/asset_meta.hpp (100%) rename engine/{code => runtime}/asset/asset_pak.hpp (100%) rename engine/{code => runtime}/asset/asset_pak_fs.cpp (100%) rename engine/{code => runtime}/asset/asset_pak_fs.hpp (100%) rename engine/{code => runtime}/asset/asset_ref.hpp (100%) rename engine/{code => runtime}/audio/_rtti.cpp (100%) rename engine/{code => runtime}/audio/_rtti.hpp (100%) rename engine/{code => runtime}/audio/audio_bus.hpp (100%) rename engine/{code => runtime}/audio/audio_defs.hpp (100%) rename engine/{code => runtime}/audio/audio_engine.hpp (100%) rename engine/{code => runtime}/audio/audio_playback.hpp (100%) rename engine/{code => runtime}/audio/audio_stream.cpp (100%) rename engine/{code => runtime}/audio/audio_stream.hpp (100%) rename engine/{code => runtime}/audio/audio_stream_wav.cpp (100%) rename engine/{code => runtime}/audio/audio_stream_wav.hpp (100%) rename engine/{code => runtime}/audio/openal/al_bus.cpp (100%) rename engine/{code => runtime}/audio/openal/al_bus.hpp (100%) rename engine/{code => runtime}/audio/openal/al_defs.cpp (100%) rename engine/{code => runtime}/audio/openal/al_defs.hpp (100%) rename engine/{code => runtime}/audio/openal/al_engine.cpp (100%) rename engine/{code => runtime}/audio/openal/al_engine.hpp (100%) rename engine/{code => runtime}/audio/openal/al_playback.cpp (100%) rename engine/{code => runtime}/audio/openal/al_playback.hpp (100%) rename engine/{code => runtime}/core/array_view.hpp (100%) rename engine/{code => runtime}/core/async.cpp (100%) rename engine/{code => runtime}/core/async.hpp (100%) rename engine/{code => runtime}/core/buffered_vector.hpp (100%) rename engine/{code => runtime}/core/callback_queue.cpp (100%) rename engine/{code => runtime}/core/callback_queue.hpp (100%) rename engine/{code => runtime}/core/callback_stream.cpp (100%) rename engine/{code => runtime}/core/callback_stream.hpp (100%) rename engine/{code => runtime}/core/class.cpp (100%) rename engine/{code => runtime}/core/class.hpp (100%) rename engine/{code => runtime}/core/cmd_line.cpp (100%) rename engine/{code => runtime}/core/cmd_line.hpp (100%) rename engine/{code => runtime}/core/crc32.cpp (100%) rename engine/{code => runtime}/core/crc32.hpp (100%) rename engine/{code => runtime}/core/data.cpp (100%) rename engine/{code => runtime}/core/data.hpp (100%) rename engine/{code => runtime}/core/date_time.cpp (100%) rename engine/{code => runtime}/core/date_time.hpp (100%) rename engine/{code => runtime}/core/flat_map.hpp (100%) rename engine/{code => runtime}/core/flat_set.hpp (100%) rename engine/{code => runtime}/core/log.cpp (100%) rename engine/{code => runtime}/core/log.hpp (100%) rename engine/{code => runtime}/core/mask.hpp (100%) rename engine/{code => runtime}/core/object.cpp (100%) rename engine/{code => runtime}/core/object.hpp (100%) rename engine/{code => runtime}/core/pool_vector.hpp (100%) rename engine/{code => runtime}/core/random.cpp (100%) rename engine/{code => runtime}/core/random.hpp (100%) rename engine/{code => runtime}/core/ref.cpp (100%) rename engine/{code => runtime}/core/ref.hpp (100%) rename engine/{code => runtime}/core/sha256.cpp (100%) rename engine/{code => runtime}/core/sha256.hpp (100%) rename engine/{code => runtime}/core/signal.hpp (100%) rename engine/{code => runtime}/core/simple_id.hpp (100%) rename engine/{code => runtime}/core/status.hpp (100%) rename engine/{code => runtime}/core/string_id.cpp (100%) rename engine/{code => runtime}/core/string_id.hpp (100%) rename engine/{code => runtime}/core/string_utf.cpp (100%) rename engine/{code => runtime}/core/string_utf.hpp (100%) rename engine/{code => runtime}/core/string_utils.cpp (100%) rename engine/{code => runtime}/core/string_utils.hpp (100%) rename engine/{code => runtime}/core/synchronization.hpp (100%) rename engine/{code => runtime}/core/task.cpp (100%) rename engine/{code => runtime}/core/task.hpp (100%) rename engine/{code => runtime}/core/task_hnd.hpp (100%) rename engine/{code => runtime}/core/task_manager.cpp (100%) rename engine/{code => runtime}/core/task_manager.hpp (100%) rename engine/{code => runtime}/core/task_parallel_for.cpp (100%) rename engine/{code => runtime}/core/task_parallel_for.hpp (100%) rename engine/{code => runtime}/core/task_runtime.cpp (100%) rename engine/{code => runtime}/core/task_runtime.hpp (100%) rename engine/{code => runtime}/core/timer.cpp (100%) rename engine/{code => runtime}/core/timer.hpp (100%) rename engine/{code => runtime}/core/typed_array.hpp (100%) rename engine/{code => runtime}/core/typed_map.hpp (100%) rename engine/{code => runtime}/core/uuid.cpp (100%) rename engine/{code => runtime}/core/uuid.hpp (100%) rename engine/{code => runtime}/core/var.cpp (100%) rename engine/{code => runtime}/core/var.hpp (100%) rename engine/{code => runtime}/core/weak_ref.cpp (100%) rename engine/{code => runtime}/core/weak_ref.hpp (100%) rename engine/{code => runtime}/debug/console.cpp (100%) rename engine/{code => runtime}/debug/console.hpp (100%) rename engine/{code => runtime}/debug/debug_layer.cpp (100%) rename engine/{code => runtime}/debug/debug_layer.hpp (100%) rename engine/{code => runtime}/ecs/ecs_component.hpp (100%) rename engine/{code => runtime}/ecs/ecs_core.cpp (100%) rename engine/{code => runtime}/ecs/ecs_core.hpp (100%) rename engine/{code => runtime}/ecs/ecs_entity.hpp (100%) rename engine/{code => runtime}/ecs/ecs_memory.cpp (100%) rename engine/{code => runtime}/ecs/ecs_memory.hpp (100%) rename engine/{code => runtime}/ecs/ecs_registry.cpp (100%) rename engine/{code => runtime}/ecs/ecs_registry.hpp (100%) rename engine/{code => runtime}/ecs/ecs_system.hpp (100%) rename engine/{code => runtime}/ecs/ecs_world.cpp (100%) rename engine/{code => runtime}/ecs/ecs_world.hpp (100%) rename engine/{code => runtime}/engine.hpp (99%) rename engine/{code => runtime}/event/_rtti.hpp (100%) rename engine/{code => runtime}/event/event.cpp (100%) rename engine/{code => runtime}/event/event.hpp (100%) rename engine/{code => runtime}/event/event_action.cpp (100%) rename engine/{code => runtime}/event/event_action.hpp (100%) rename engine/{code => runtime}/event/event_asset.cpp (100%) rename engine/{code => runtime}/event/event_asset.hpp (100%) rename engine/{code => runtime}/event/event_filesystem.cpp (100%) rename engine/{code => runtime}/event/event_filesystem.hpp (100%) rename engine/{code => runtime}/event/event_input.cpp (100%) rename engine/{code => runtime}/event/event_input.hpp (100%) rename engine/{code => runtime}/event/event_listener.hpp (100%) rename engine/{code => runtime}/event/event_manager.cpp (100%) rename engine/{code => runtime}/event/event_manager.hpp (100%) rename engine/{code => runtime}/event/event_scene.cpp (100%) rename engine/{code => runtime}/event/event_scene.hpp (100%) rename engine/{code => runtime}/event/event_script.cpp (100%) rename engine/{code => runtime}/event/event_script.hpp (100%) rename engine/{code => runtime}/event/event_token.cpp (100%) rename engine/{code => runtime}/event/event_token.hpp (100%) rename engine/{code => runtime}/event/event_window.cpp (100%) rename engine/{code => runtime}/event/event_window.hpp (100%) rename engine/{code => runtime}/event/register_classes_event.cpp (100%) rename engine/{code => runtime}/event/register_classes_event.hpp (100%) rename engine/{code => runtime}/gameplay/action_manager.cpp (100%) rename engine/{code => runtime}/gameplay/action_manager.hpp (100%) rename engine/{code => runtime}/gameplay/action_map.cpp (100%) rename engine/{code => runtime}/gameplay/action_map.hpp (100%) rename engine/{code => runtime}/gameplay/game_token_manager.cpp (100%) rename engine/{code => runtime}/gameplay/game_token_manager.hpp (100%) rename engine/{code => runtime}/gfx/gfx_buffers.cpp (100%) rename engine/{code => runtime}/gfx/gfx_buffers.hpp (100%) rename engine/{code => runtime}/gfx/gfx_ctx.cpp (100%) rename engine/{code => runtime}/gfx/gfx_ctx.hpp (100%) rename engine/{code => runtime}/gfx/gfx_defs.hpp (100%) rename engine/{code => runtime}/gfx/gfx_desc_set.cpp (100%) rename engine/{code => runtime}/gfx/gfx_desc_set.hpp (100%) rename engine/{code => runtime}/gfx/gfx_driver.hpp (100%) rename engine/{code => runtime}/gfx/gfx_dynamic_buffers.cpp (100%) rename engine/{code => runtime}/gfx/gfx_dynamic_buffers.hpp (100%) rename engine/{code => runtime}/gfx/gfx_pipeline.cpp (100%) rename engine/{code => runtime}/gfx/gfx_pipeline.hpp (100%) rename engine/{code => runtime}/gfx/gfx_render_pass.cpp (100%) rename engine/{code => runtime}/gfx/gfx_render_pass.hpp (100%) rename engine/{code => runtime}/gfx/gfx_resource.hpp (100%) rename engine/{code => runtime}/gfx/gfx_sampler.cpp (100%) rename engine/{code => runtime}/gfx/gfx_sampler.hpp (100%) rename engine/{code => runtime}/gfx/gfx_shader.hpp (100%) rename engine/{code => runtime}/gfx/gfx_texture.hpp (100%) rename engine/{code => runtime}/gfx/gfx_vector.hpp (100%) rename engine/{code => runtime}/gfx/gfx_vert_format.cpp (100%) rename engine/{code => runtime}/gfx/gfx_vert_format.hpp (100%) rename engine/{code => runtime}/gfx/opengl/readme.txt (100%) rename engine/{code => runtime}/gfx/threaded/gfx_ctx_threaded.hpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_ctx_wrapper.cpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_ctx_wrapper.hpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_driver_threaded.hpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_driver_wrapper.cpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_driver_wrapper.hpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_worker.cpp (100%) rename engine/{code => runtime}/gfx/threaded/gfx_worker.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_buffers.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_buffers.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_cmd_manager.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_cmd_manager.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_ctx.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_ctx.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_defs.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_defs.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_desc_manager.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_desc_manager.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_desc_set.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_desc_set.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_driver.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_driver.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_mem_manager.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_mem_manager.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_pipeline.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_pipeline.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_queues.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_queues.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_render_pass.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_render_pass.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_resource.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_sampler.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_sampler.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_shader.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_shader.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_texture.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_texture.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_vert_format.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_vert_format.hpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_window.cpp (100%) rename engine/{code => runtime}/gfx/vulkan/vk_window.hpp (100%) rename engine/{code => runtime}/glsl/_rtti.cpp (100%) rename engine/{code => runtime}/glsl/_rtti.hpp (100%) rename engine/{code => runtime}/glsl/glsl_builder.cpp (100%) rename engine/{code => runtime}/glsl/glsl_builder.hpp (100%) rename engine/{code => runtime}/glsl/glsl_include_processor.cpp (100%) rename engine/{code => runtime}/glsl/glsl_include_processor.hpp (100%) rename engine/{code => runtime}/glsl/glsl_shader_compiler.cpp (99%) rename engine/{code => runtime}/glsl/glsl_shader_compiler.hpp (100%) rename engine/{code => runtime}/grc/_rtti.cpp (100%) rename engine/{code => runtime}/grc/_rtti.hpp (100%) rename engine/{code => runtime}/grc/font.cpp (100%) rename engine/{code => runtime}/grc/font.hpp (100%) rename engine/{code => runtime}/grc/image.cpp (100%) rename engine/{code => runtime}/grc/image.hpp (100%) rename engine/{code => runtime}/grc/pso_cache.cpp (100%) rename engine/{code => runtime}/grc/pso_cache.hpp (100%) rename engine/{code => runtime}/grc/pso_file.cpp (92%) rename engine/{code => runtime}/grc/pso_file.hpp (100%) rename engine/{code => runtime}/grc/shader.cpp (100%) rename engine/{code => runtime}/grc/shader.hpp (100%) rename engine/{code => runtime}/grc/shader_builder.cpp (100%) rename engine/{code => runtime}/grc/shader_builder.hpp (100%) rename engine/{code => runtime}/grc/shader_cache.cpp (95%) rename engine/{code => runtime}/grc/shader_cache.hpp (100%) rename engine/{code => runtime}/grc/shader_compiler.hpp (100%) rename engine/{code => runtime}/grc/shader_compiler_task_manager.hpp (100%) rename engine/{code => runtime}/grc/shader_file.hpp (100%) rename engine/{code => runtime}/grc/shader_instance.cpp (100%) rename engine/{code => runtime}/grc/shader_instance.hpp (100%) rename engine/{code => runtime}/grc/shader_library.cpp (96%) rename engine/{code => runtime}/grc/shader_library.hpp (100%) rename engine/{code => runtime}/grc/shader_manager.cpp (100%) rename engine/{code => runtime}/grc/shader_manager.hpp (100%) rename engine/{code => runtime}/grc/shader_param.cpp (100%) rename engine/{code => runtime}/grc/shader_param.hpp (100%) rename engine/{code => runtime}/grc/shader_param_block.cpp (100%) rename engine/{code => runtime}/grc/shader_param_block.hpp (100%) rename engine/{code => runtime}/grc/shader_reflection.cpp (100%) rename engine/{code => runtime}/grc/shader_reflection.hpp (100%) rename engine/{code => runtime}/grc/texture.cpp (100%) rename engine/{code => runtime}/grc/texture.hpp (100%) rename engine/{code => runtime}/grc/texture_compression.cpp (100%) rename engine/{code => runtime}/grc/texture_compression.hpp (100%) rename engine/{code => runtime}/grc/texture_manager.cpp (100%) rename engine/{code => runtime}/grc/texture_manager.hpp (100%) rename engine/{code => runtime}/grc/texture_resize.cpp (100%) rename engine/{code => runtime}/grc/texture_resize.hpp (100%) rename engine/{code => runtime}/hooks/hook_config.hpp (76%) rename engine/{code => runtime}/hooks/hook_engine.hpp (66%) rename engine/{code => runtime}/hooks/hook_logs.hpp (100%) rename engine/{code => runtime}/hooks/hook_profiler.hpp (100%) rename engine/{code => runtime}/hooks/hook_root_remap.hpp (100%) rename engine/{code => runtime}/hooks/hook_uuid_gen.hpp (100%) rename engine/{code => runtime}/io/archive.cpp (100%) rename engine/{code => runtime}/io/archive.hpp (96%) create mode 100644 engine/runtime/io/archive_file.cpp rename engine/{code/io/archive_memory.hpp => runtime/io/archive_file.hpp} (62%) rename engine/{code => runtime}/io/base64.cpp (100%) rename engine/{code => runtime}/io/base64.hpp (100%) rename engine/{code => runtime}/io/compression.cpp (76%) rename engine/{code => runtime}/io/compression.hpp (85%) rename engine/{code => runtime}/io/context.cpp (100%) rename engine/{code => runtime}/io/context.hpp (100%) rename engine/{code => runtime}/io/enum.hpp (100%) create mode 100644 engine/runtime/io/ini.cpp rename engine/{code/io/archive_memory.cpp => runtime/io/ini.hpp} (63%) rename engine/{code => runtime}/io/serialization.hpp (100%) rename engine/{code => runtime}/io/yaml.cpp (100%) rename engine/{code => runtime}/io/yaml.hpp (100%) rename engine/{code => runtime}/material/_rtti.cpp (100%) rename engine/{code => runtime}/material/_rtti.hpp (100%) rename engine/{code => runtime}/material/material.cpp (100%) rename engine/{code => runtime}/material/material.hpp (100%) rename engine/{code => runtime}/math/aabb.hpp (100%) rename engine/{code => runtime}/math/color.cpp (100%) rename engine/{code => runtime}/math/color.hpp (100%) rename engine/{code => runtime}/math/frustum.hpp (100%) rename engine/{code => runtime}/math/mat.hpp (100%) rename engine/{code => runtime}/math/math_utils.cpp (100%) rename engine/{code => runtime}/math/math_utils.hpp (100%) rename engine/{code => runtime}/math/math_utils2d.hpp (100%) rename engine/{code => runtime}/math/math_utils3d.hpp (100%) rename engine/{code => runtime}/math/plane.hpp (100%) rename engine/{code => runtime}/math/quat.hpp (100%) rename engine/{code => runtime}/math/range.hpp (100%) rename engine/{code => runtime}/math/transform.hpp (100%) rename engine/{code => runtime}/math/vec.hpp (100%) rename engine/{code => runtime}/memory/mem_linear.cpp (100%) rename engine/{code => runtime}/memory/mem_linear.hpp (100%) rename engine/{code => runtime}/memory/mem_pool.cpp (100%) rename engine/{code => runtime}/memory/mem_pool.hpp (100%) rename engine/{code => runtime}/mesh/_rtti.cpp (100%) rename engine/{code => runtime}/mesh/_rtti.hpp (100%) rename engine/{code => runtime}/mesh/array_mesh.cpp (100%) rename engine/{code => runtime}/mesh/array_mesh.hpp (100%) rename engine/{code => runtime}/mesh/mesh.cpp (100%) rename engine/{code => runtime}/mesh/mesh.hpp (100%) rename engine/{code => runtime}/mesh/mesh_batch.cpp (100%) rename engine/{code => runtime}/mesh/mesh_batch.hpp (100%) rename engine/{code => runtime}/mesh/mesh_bucket.cpp (100%) rename engine/{code => runtime}/mesh/mesh_bucket.hpp (100%) rename engine/{code => runtime}/mesh/mesh_builder.cpp (100%) rename engine/{code => runtime}/mesh/mesh_builder.hpp (100%) rename engine/{code => runtime}/mesh/mesh_pass.cpp (100%) rename engine/{code => runtime}/mesh/mesh_pass.hpp (100%) rename engine/{code => runtime}/mesh/mesh_processors.cpp (100%) rename engine/{code => runtime}/mesh/mesh_processors.hpp (100%) rename engine/{code => runtime}/pfx/_rtti.cpp (100%) rename engine/{code => runtime}/pfx/_rtti.hpp (100%) rename engine/{code => runtime}/pfx/pfx_component.cpp (100%) rename engine/{code => runtime}/pfx/pfx_component.hpp (100%) rename engine/{code => runtime}/pfx/pfx_component_runtime.cpp (100%) rename engine/{code => runtime}/pfx/pfx_component_runtime.hpp (100%) rename engine/{code => runtime}/pfx/pfx_effect.cpp (100%) rename engine/{code => runtime}/pfx/pfx_effect.hpp (100%) rename engine/{code => runtime}/pfx/pfx_emitter.cpp (100%) rename engine/{code => runtime}/pfx/pfx_emitter.hpp (100%) rename engine/{code => runtime}/pfx/pfx_feature.cpp (100%) rename engine/{code => runtime}/pfx/pfx_feature.hpp (100%) rename engine/{code => runtime}/pfx/pfx_scene.cpp (100%) rename engine/{code => runtime}/pfx/pfx_scene.hpp (100%) rename engine/{code => runtime}/pfx/pfx_storage.cpp (100%) rename engine/{code => runtime}/pfx/pfx_storage.hpp (100%) rename engine/{code => runtime}/pfx/register_classes_pfx.cpp (100%) rename engine/{code => runtime}/pfx/register_classes_pfx.hpp (100%) rename engine/{code => runtime}/platform/application.cpp (99%) rename engine/{code => runtime}/platform/application.hpp (100%) create mode 100644 engine/runtime/platform/common/file_mem.cpp rename engine/{code/io/archive_file.hpp => runtime/platform/common/file_mem.hpp} (51%) rename engine/{code => runtime}/platform/common/file_physical.cpp (100%) rename engine/{code => runtime}/platform/common/file_physical.hpp (100%) rename engine/{code => runtime}/platform/common/mount_volume_physical.cpp (100%) rename engine/{code => runtime}/platform/common/mount_volume_physical.hpp (100%) rename engine/{code => runtime}/platform/dll_manager.cpp (100%) rename engine/{code => runtime}/platform/dll_manager.hpp (100%) rename engine/{code => runtime}/platform/file.hpp (100%) rename engine/{code => runtime}/platform/file_system.cpp (94%) rename engine/{code => runtime}/platform/file_system.hpp (96%) rename engine/{code => runtime}/platform/glfw/glfw_input.cpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_input.hpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_input_defs.hpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_input_devices.cpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_input_devices.hpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_window.cpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_window.hpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_window_manager.cpp (100%) rename engine/{code => runtime}/platform/glfw/glfw_window_manager.hpp (100%) rename engine/{code => runtime}/platform/input.hpp (100%) rename engine/{code => runtime}/platform/input_defs.hpp (100%) rename engine/{code => runtime}/platform/input_devices.hpp (100%) rename engine/{code => runtime}/platform/mount_volume.hpp (100%) rename engine/{code => runtime}/platform/time.cpp (100%) rename engine/{code => runtime}/platform/time.hpp (100%) rename engine/{code => runtime}/platform/window.hpp (100%) rename engine/{code => runtime}/platform/window_manager.hpp (100%) rename engine/{code => runtime}/profiler/profiler.cpp (100%) rename engine/{code => runtime}/profiler/profiler.hpp (100%) rename engine/{code => runtime}/render/_rtti.cpp (100%) rename engine/{code => runtime}/render/_rtti.hpp (100%) rename engine/{code => runtime}/render/aux_draw_manager.cpp (100%) rename engine/{code => runtime}/render/aux_draw_manager.hpp (100%) rename engine/{code => runtime}/render/camera.cpp (100%) rename engine/{code => runtime}/render/camera.hpp (100%) rename engine/{code => runtime}/render/canvas.cpp (100%) rename engine/{code => runtime}/render/canvas.hpp (100%) rename engine/{code => runtime}/render/common.hpp (100%) rename engine/{code => runtime}/render/culling.cpp (100%) rename engine/{code => runtime}/render/culling.hpp (100%) rename engine/{code => runtime}/render/deferred_pipeline.cpp (100%) rename engine/{code => runtime}/render/deferred_pipeline.hpp (100%) rename engine/{code => runtime}/render/graphics_pipeline.cpp (100%) rename engine/{code => runtime}/render/graphics_pipeline.hpp (100%) rename engine/{code => runtime}/render/light.cpp (100%) rename engine/{code => runtime}/render/light.hpp (100%) rename engine/{code => runtime}/render/model.cpp (100%) rename engine/{code => runtime}/render/model.hpp (100%) rename engine/{code => runtime}/render/model_instance.cpp (100%) rename engine/{code => runtime}/render/model_instance.hpp (100%) rename engine/{code => runtime}/render/render_defs.hpp (100%) rename engine/{code => runtime}/render/render_engine.cpp (100%) rename engine/{code => runtime}/render/render_engine.hpp (100%) rename engine/{code => runtime}/render/render_queue.cpp (100%) rename engine/{code => runtime}/render/render_queue.hpp (100%) rename engine/{code => runtime}/render/render_scene.cpp (100%) rename engine/{code => runtime}/render/render_scene.hpp (100%) rename engine/{code => runtime}/render/view.cpp (100%) rename engine/{code => runtime}/render/view.hpp (100%) rename engine/{code => runtime}/render/view_manager.cpp (100%) rename engine/{code => runtime}/render/view_manager.hpp (100%) rename engine/{code => runtime}/rtti/_rtti.cpp (100%) rename engine/{code => runtime}/rtti/_rtti.hpp (100%) rename engine/{code => runtime}/rtti/builtin.hpp (100%) rename engine/{code => runtime}/rtti/class.cpp (100%) rename engine/{code => runtime}/rtti/class.hpp (100%) rename engine/{code => runtime}/rtti/enum.hpp (100%) rename engine/{code => runtime}/rtti/function.hpp (100%) rename engine/{code => runtime}/rtti/meta_data.cpp (100%) rename engine/{code => runtime}/rtti/meta_data.hpp (100%) rename engine/{code => runtime}/rtti/object.cpp (100%) rename engine/{code => runtime}/rtti/object.hpp (100%) rename engine/{code => runtime}/rtti/struct.cpp (100%) rename engine/{code => runtime}/rtti/struct.hpp (100%) rename engine/{code => runtime}/rtti/traits.hpp (100%) rename engine/{code => runtime}/rtti/type.hpp (100%) rename engine/{code => runtime}/rtti/type_storage.cpp (100%) rename engine/{code => runtime}/rtti/type_storage.hpp (100%) rename engine/{code => runtime}/scene/_rtti.cpp (100%) rename engine/{code => runtime}/scene/_rtti.hpp (100%) rename engine/{code => runtime}/scene/register_classes_scene.cpp (100%) rename engine/{code => runtime}/scene/register_classes_scene.hpp (100%) rename engine/{code => runtime}/scene/scene.cpp (100%) rename engine/{code => runtime}/scene/scene.hpp (100%) rename engine/{code => runtime}/scene/scene_components.cpp (100%) rename engine/{code => runtime}/scene/scene_components.hpp (100%) rename engine/{code => runtime}/scene/scene_data.cpp (100%) rename engine/{code => runtime}/scene/scene_data.hpp (100%) rename engine/{code => runtime}/scene/scene_entity.cpp (100%) rename engine/{code => runtime}/scene/scene_entity.hpp (100%) rename engine/{code => runtime}/scene/scene_manager.cpp (100%) rename engine/{code => runtime}/scene/scene_manager.hpp (100%) rename engine/{code => runtime}/scene/scene_node.cpp (100%) rename engine/{code => runtime}/scene/scene_node.hpp (100%) rename engine/{code => runtime}/scene/scene_node_props.cpp (100%) rename engine/{code => runtime}/scene/scene_node_props.hpp (100%) rename engine/{code => runtime}/scene/scene_packed.cpp (100%) rename engine/{code => runtime}/scene/scene_packed.hpp (100%) rename engine/{code => runtime}/scene/scene_prefab.cpp (100%) rename engine/{code => runtime}/scene/scene_prefab.hpp (100%) rename engine/{code => runtime}/scene/scene_systems.cpp (100%) rename engine/{code => runtime}/scene/scene_systems.hpp (100%) rename engine/{code => runtime}/scene/scene_tree.cpp (100%) rename engine/{code => runtime}/scene/scene_tree.hpp (100%) rename engine/{code => runtime}/scene/scene_tree_packed.cpp (100%) rename engine/{code => runtime}/scene/scene_tree_packed.hpp (100%) rename engine/{code => runtime}/scripting/_rtti.cpp (100%) rename engine/{code => runtime}/scripting/_rtti.hpp (100%) rename engine/{code => runtime}/scripting/lua/lua_defs.cpp (100%) rename engine/{code => runtime}/scripting/lua/lua_defs.hpp (100%) rename engine/{code => runtime}/scripting/lua/lua_event_script.cpp (100%) rename engine/{code => runtime}/scripting/lua/lua_event_script.hpp (100%) rename engine/{code => runtime}/scripting/lua/lua_script.cpp (100%) rename engine/{code => runtime}/scripting/lua/lua_script.hpp (100%) rename engine/{code => runtime}/scripting/lua/lua_script_instance.cpp (100%) rename engine/{code => runtime}/scripting/lua/lua_script_instance.hpp (100%) rename engine/{code => runtime}/scripting/lua/lua_script_system.cpp (100%) rename engine/{code => runtime}/scripting/lua/lua_script_system.hpp (100%) rename engine/{code => runtime}/scripting/lua/lua_type_traits.cpp (100%) rename engine/{code => runtime}/scripting/lua/lua_type_traits.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_asset.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_asset.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_core.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_core.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_event.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_event.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_gameplay.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_gameplay.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_math.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_math.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_platform.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_platform.hpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_scene.cpp (100%) rename engine/{code => runtime}/scripting/lua_bindings/lua_bindings_scene.hpp (100%) rename engine/{code => runtime}/scripting/script.cpp (100%) rename engine/{code => runtime}/scripting/script.hpp (100%) rename engine/{code => runtime}/scripting/script_instance.hpp (100%) rename engine/{code => runtime}/scripting/script_native.cpp (100%) rename engine/{code => runtime}/scripting/script_native.hpp (100%) rename engine/{code => runtime}/scripting/script_system.hpp (100%) rename engine/{code => runtime}/system/_rtti.cpp (100%) rename engine/{code => runtime}/system/_rtti.hpp (100%) rename engine/{code => runtime}/system/config.cpp (100%) rename engine/{code => runtime}/system/config.hpp (100%) rename engine/{code => runtime}/system/config_file.cpp (83%) rename engine/{code => runtime}/system/config_file.hpp (100%) rename engine/{code => runtime}/system/engine.cpp (100%) rename engine/{code => runtime}/system/engine.hpp (100%) rename engine/{code => runtime}/system/hook.cpp (100%) rename engine/{code => runtime}/system/hook.hpp (100%) rename engine/{code => runtime}/system/ioc_container.cpp (100%) rename engine/{code => runtime}/system/ioc_container.hpp (100%) rename engine/{code => runtime}/system/layer.cpp (100%) rename engine/{code => runtime}/system/layer.hpp (100%) rename engine/{code => runtime}/system/plugin.hpp (100%) rename engine/{code => runtime}/system/plugin_manager.cpp (100%) rename engine/{code => runtime}/system/plugin_manager.hpp (100%) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 1df42e605..c8ec06eac 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -5,7 +5,7 @@ on: branches: [ main ] paths: - '.github/**' - - 'engine/code/**' + - 'engine/runtime/**' - 'engine/plugins/**' - '.clang-format' pull_request: @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: path: - - 'engine/code' + - 'engine/runtime' - 'engine/plugins' steps: - uses: actions/checkout@v2 diff --git a/.vscode/launch.json b/.vscode/launch.json index df19bb06e..eea226eef 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "program": "${workspaceRoot}/build-Debug/template/template.exe", "args": [ "--root_remap=${workspaceRoot}/template", - "--engine_remap=root://../engine/" + "--engine_remap=../engine/" ], "stopAtEntry": false, "cwd": "${workspaceRoot}/build-Debug/template", @@ -25,7 +25,7 @@ "program": "${workspaceRoot}/build-Release/template/template.exe", "args": [ "--root_remap=${workspaceRoot}/template", - "--engine_remap=root://../engine/" + "--engine_remap=../engine/" ], "stopAtEntry": false, "cwd": "${workspaceRoot}/build-Release/template", diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 755b43340..ebd563965 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -1,7 +1,7 @@ ########################################################### # Engine runtime source code -add_subdirectory(code) +add_subdirectory(runtime) ########################################################### # Plugins sources (standard plugins for engine) diff --git a/engine/code/io/archive_file.cpp b/engine/code/io/archive_file.cpp deleted file mode 100644 index 2627baa4b..000000000 --- a/engine/code/io/archive_file.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/**********************************************************************************/ -/* Wmoge game engine */ -/* Available at github https://github.com/EgorOrachyov/wmoge */ -/**********************************************************************************/ -/* MIT License */ -/* */ -/* Copyright (c) 2023 Egor Orachyov */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining a copy */ -/* of this software and associated documentation files (the "Software"), to deal */ -/* in the Software without restriction, including without limitation the rights */ -/* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell */ -/* copies of the Software, and to permit persons to whom the Software is */ -/* furnished to do so, subject to the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be included in all */ -/* copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ -/* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ -/* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ -/* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ -/* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */ -/* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ -/* SOFTWARE. */ -/**********************************************************************************/ - -#include "archive_file.hpp" - -#include "platform/file_system.hpp" -#include "system/ioc_container.hpp" - -namespace wmoge { - - ArchiveWriterFStream::ArchiveWriterFStream(std::fstream& stream) : m_stream(stream) { - m_can_read = false; - m_can_write = true; - } - Status ArchiveWriterFStream::nwrite(int num_bytes, const void* bytes) { - m_stream.write(reinterpret_cast(bytes), num_bytes); - return WG_OK; - } - bool ArchiveWriterFStream::is_memory() { - return false; - } - bool ArchiveWriterFStream::is_physical() { - return true; - } - std::size_t ArchiveWriterFStream::get_size() { - return m_stream.tellp(); - } - - ArchiveReaderFStream::ArchiveReaderFStream(std::fstream& stream) : m_stream(stream) { - m_can_read = true; - m_can_write = false; - } - Status ArchiveReaderFStream::nread(int num_bytes, void* bytes) { - m_stream.read(reinterpret_cast(bytes), num_bytes); - return WG_OK; - } - bool ArchiveReaderFStream::is_memory() { - return false; - } - bool ArchiveReaderFStream::is_physical() { - return true; - } - std::size_t ArchiveReaderFStream::get_size() { - auto pos = m_stream.tellp(); - m_stream.seekp(0, std::ios_base::end); - auto size = m_stream.tellp(); - m_stream.seekp(pos, std::ios_base::beg); - return size; - } - - ArchiveWriterFile::ArchiveWriterFile(Ref file) : m_file(std::move(file)) { - m_can_read = false; - m_can_write = true; - } - Status ArchiveWriterFile::open(const std::string& file_path) { - FileSystem* file_system = IocContainer::iresolve_v(); - WG_CHECKED(file_system->open_file(file_path, m_file, {FileOpenMode::Out, FileOpenMode::Binary})); - - m_can_read = false; - m_can_write = true; - - return WG_OK; - } - Status ArchiveWriterFile::nwrite(int num_bytes, const void* bytes) { - assert(m_file); - return m_file->nwrite(reinterpret_cast(bytes), num_bytes); - } - bool ArchiveWriterFile::is_memory() { - return false; - } - bool ArchiveWriterFile::is_physical() { - return true; - } - std::size_t ArchiveWriterFile::get_size() { - std::size_t s; - m_file->size(s); - return s; - } - - ArchiveReaderFile::ArchiveReaderFile(Ref file) : m_file(std::move(file)) { - m_can_read = true; - m_can_write = false; - } - Status ArchiveReaderFile::open(const std::string& file_path) { - FileSystem* file_system = IocContainer::iresolve_v(); - WG_CHECKED(file_system->open_file(file_path, m_file, {FileOpenMode::In, FileOpenMode::Binary})); - - m_can_read = true; - m_can_write = false; - - return WG_OK; - } - Status ArchiveReaderFile::nread(int num_bytes, void* bytes) { - assert(m_file); - return m_file->nread(reinterpret_cast(bytes), num_bytes); - } - bool ArchiveReaderFile::is_memory() { - return false; - } - bool ArchiveReaderFile::is_physical() { - return true; - } - std::size_t ArchiveReaderFile::get_size() { - std::size_t s; - m_file->size(s); - return s; - } - -}// namespace wmoge \ No newline at end of file diff --git a/engine/config/engine.cfg b/engine/config/engine.cfg index d56fe96b8..7779e4740 100644 --- a/engine/config/engine.cfg +++ b/engine/config/engine.cfg @@ -13,9 +13,9 @@ log_to_console_level = "Info" workers = 4 [file_system] -engine_path = "root://engine/" -asset_path = "root://assets/" -local_path = "root://.wgengine/" +engine_path = "engine/" +asset_path = "assets/" +local_path = ".wgengine/" cache_path = "local://cache/" debug_path = "local://debug/" logs_path = "local://logs/" diff --git a/engine/config/game.cfg b/engine/config/game.cfg index c74fa3865..d566fe1b2 100644 --- a/engine/config/game.cfg +++ b/engine/config/game.cfg @@ -7,5 +7,5 @@ width = 1280 height = 720 vsync = 1 exit = 1 -icon_default = "root://icons/wmoge-128.png" -icon_small = "root://icons/wmoge-64.png" \ No newline at end of file +icon_default = "icons/wmoge-128.png" +icon_small = "icons/wmoge-64.png" \ No newline at end of file diff --git a/engine/code/CMakeLists.txt b/engine/runtime/CMakeLists.txt similarity index 100% rename from engine/code/CMakeLists.txt rename to engine/runtime/CMakeLists.txt diff --git a/engine/code/asset/_rtti.cpp b/engine/runtime/asset/_rtti.cpp similarity index 100% rename from engine/code/asset/_rtti.cpp rename to engine/runtime/asset/_rtti.cpp diff --git a/engine/code/asset/_rtti.hpp b/engine/runtime/asset/_rtti.hpp similarity index 100% rename from engine/code/asset/_rtti.hpp rename to engine/runtime/asset/_rtti.hpp diff --git a/engine/code/asset/asset.cpp b/engine/runtime/asset/asset.cpp similarity index 100% rename from engine/code/asset/asset.cpp rename to engine/runtime/asset/asset.cpp diff --git a/engine/code/asset/asset.hpp b/engine/runtime/asset/asset.hpp similarity index 100% rename from engine/code/asset/asset.hpp rename to engine/runtime/asset/asset.hpp diff --git a/engine/code/asset/asset_import_data.hpp b/engine/runtime/asset/asset_import_data.hpp similarity index 100% rename from engine/code/asset/asset_import_data.hpp rename to engine/runtime/asset/asset_import_data.hpp diff --git a/engine/code/asset/asset_loader.hpp b/engine/runtime/asset/asset_loader.hpp similarity index 100% rename from engine/code/asset/asset_loader.hpp rename to engine/runtime/asset/asset_loader.hpp diff --git a/engine/code/asset/asset_manager.cpp b/engine/runtime/asset/asset_manager.cpp similarity index 100% rename from engine/code/asset/asset_manager.cpp rename to engine/runtime/asset/asset_manager.cpp diff --git a/engine/code/asset/asset_manager.hpp b/engine/runtime/asset/asset_manager.hpp similarity index 100% rename from engine/code/asset/asset_manager.hpp rename to engine/runtime/asset/asset_manager.hpp diff --git a/engine/code/asset/asset_meta.hpp b/engine/runtime/asset/asset_meta.hpp similarity index 100% rename from engine/code/asset/asset_meta.hpp rename to engine/runtime/asset/asset_meta.hpp diff --git a/engine/code/asset/asset_pak.hpp b/engine/runtime/asset/asset_pak.hpp similarity index 100% rename from engine/code/asset/asset_pak.hpp rename to engine/runtime/asset/asset_pak.hpp diff --git a/engine/code/asset/asset_pak_fs.cpp b/engine/runtime/asset/asset_pak_fs.cpp similarity index 100% rename from engine/code/asset/asset_pak_fs.cpp rename to engine/runtime/asset/asset_pak_fs.cpp diff --git a/engine/code/asset/asset_pak_fs.hpp b/engine/runtime/asset/asset_pak_fs.hpp similarity index 100% rename from engine/code/asset/asset_pak_fs.hpp rename to engine/runtime/asset/asset_pak_fs.hpp diff --git a/engine/code/asset/asset_ref.hpp b/engine/runtime/asset/asset_ref.hpp similarity index 100% rename from engine/code/asset/asset_ref.hpp rename to engine/runtime/asset/asset_ref.hpp diff --git a/engine/code/audio/_rtti.cpp b/engine/runtime/audio/_rtti.cpp similarity index 100% rename from engine/code/audio/_rtti.cpp rename to engine/runtime/audio/_rtti.cpp diff --git a/engine/code/audio/_rtti.hpp b/engine/runtime/audio/_rtti.hpp similarity index 100% rename from engine/code/audio/_rtti.hpp rename to engine/runtime/audio/_rtti.hpp diff --git a/engine/code/audio/audio_bus.hpp b/engine/runtime/audio/audio_bus.hpp similarity index 100% rename from engine/code/audio/audio_bus.hpp rename to engine/runtime/audio/audio_bus.hpp diff --git a/engine/code/audio/audio_defs.hpp b/engine/runtime/audio/audio_defs.hpp similarity index 100% rename from engine/code/audio/audio_defs.hpp rename to engine/runtime/audio/audio_defs.hpp diff --git a/engine/code/audio/audio_engine.hpp b/engine/runtime/audio/audio_engine.hpp similarity index 100% rename from engine/code/audio/audio_engine.hpp rename to engine/runtime/audio/audio_engine.hpp diff --git a/engine/code/audio/audio_playback.hpp b/engine/runtime/audio/audio_playback.hpp similarity index 100% rename from engine/code/audio/audio_playback.hpp rename to engine/runtime/audio/audio_playback.hpp diff --git a/engine/code/audio/audio_stream.cpp b/engine/runtime/audio/audio_stream.cpp similarity index 100% rename from engine/code/audio/audio_stream.cpp rename to engine/runtime/audio/audio_stream.cpp diff --git a/engine/code/audio/audio_stream.hpp b/engine/runtime/audio/audio_stream.hpp similarity index 100% rename from engine/code/audio/audio_stream.hpp rename to engine/runtime/audio/audio_stream.hpp diff --git a/engine/code/audio/audio_stream_wav.cpp b/engine/runtime/audio/audio_stream_wav.cpp similarity index 100% rename from engine/code/audio/audio_stream_wav.cpp rename to engine/runtime/audio/audio_stream_wav.cpp diff --git a/engine/code/audio/audio_stream_wav.hpp b/engine/runtime/audio/audio_stream_wav.hpp similarity index 100% rename from engine/code/audio/audio_stream_wav.hpp rename to engine/runtime/audio/audio_stream_wav.hpp diff --git a/engine/code/audio/openal/al_bus.cpp b/engine/runtime/audio/openal/al_bus.cpp similarity index 100% rename from engine/code/audio/openal/al_bus.cpp rename to engine/runtime/audio/openal/al_bus.cpp diff --git a/engine/code/audio/openal/al_bus.hpp b/engine/runtime/audio/openal/al_bus.hpp similarity index 100% rename from engine/code/audio/openal/al_bus.hpp rename to engine/runtime/audio/openal/al_bus.hpp diff --git a/engine/code/audio/openal/al_defs.cpp b/engine/runtime/audio/openal/al_defs.cpp similarity index 100% rename from engine/code/audio/openal/al_defs.cpp rename to engine/runtime/audio/openal/al_defs.cpp diff --git a/engine/code/audio/openal/al_defs.hpp b/engine/runtime/audio/openal/al_defs.hpp similarity index 100% rename from engine/code/audio/openal/al_defs.hpp rename to engine/runtime/audio/openal/al_defs.hpp diff --git a/engine/code/audio/openal/al_engine.cpp b/engine/runtime/audio/openal/al_engine.cpp similarity index 100% rename from engine/code/audio/openal/al_engine.cpp rename to engine/runtime/audio/openal/al_engine.cpp diff --git a/engine/code/audio/openal/al_engine.hpp b/engine/runtime/audio/openal/al_engine.hpp similarity index 100% rename from engine/code/audio/openal/al_engine.hpp rename to engine/runtime/audio/openal/al_engine.hpp diff --git a/engine/code/audio/openal/al_playback.cpp b/engine/runtime/audio/openal/al_playback.cpp similarity index 100% rename from engine/code/audio/openal/al_playback.cpp rename to engine/runtime/audio/openal/al_playback.cpp diff --git a/engine/code/audio/openal/al_playback.hpp b/engine/runtime/audio/openal/al_playback.hpp similarity index 100% rename from engine/code/audio/openal/al_playback.hpp rename to engine/runtime/audio/openal/al_playback.hpp diff --git a/engine/code/core/array_view.hpp b/engine/runtime/core/array_view.hpp similarity index 100% rename from engine/code/core/array_view.hpp rename to engine/runtime/core/array_view.hpp diff --git a/engine/code/core/async.cpp b/engine/runtime/core/async.cpp similarity index 100% rename from engine/code/core/async.cpp rename to engine/runtime/core/async.cpp diff --git a/engine/code/core/async.hpp b/engine/runtime/core/async.hpp similarity index 100% rename from engine/code/core/async.hpp rename to engine/runtime/core/async.hpp diff --git a/engine/code/core/buffered_vector.hpp b/engine/runtime/core/buffered_vector.hpp similarity index 100% rename from engine/code/core/buffered_vector.hpp rename to engine/runtime/core/buffered_vector.hpp diff --git a/engine/code/core/callback_queue.cpp b/engine/runtime/core/callback_queue.cpp similarity index 100% rename from engine/code/core/callback_queue.cpp rename to engine/runtime/core/callback_queue.cpp diff --git a/engine/code/core/callback_queue.hpp b/engine/runtime/core/callback_queue.hpp similarity index 100% rename from engine/code/core/callback_queue.hpp rename to engine/runtime/core/callback_queue.hpp diff --git a/engine/code/core/callback_stream.cpp b/engine/runtime/core/callback_stream.cpp similarity index 100% rename from engine/code/core/callback_stream.cpp rename to engine/runtime/core/callback_stream.cpp diff --git a/engine/code/core/callback_stream.hpp b/engine/runtime/core/callback_stream.hpp similarity index 100% rename from engine/code/core/callback_stream.hpp rename to engine/runtime/core/callback_stream.hpp diff --git a/engine/code/core/class.cpp b/engine/runtime/core/class.cpp similarity index 100% rename from engine/code/core/class.cpp rename to engine/runtime/core/class.cpp diff --git a/engine/code/core/class.hpp b/engine/runtime/core/class.hpp similarity index 100% rename from engine/code/core/class.hpp rename to engine/runtime/core/class.hpp diff --git a/engine/code/core/cmd_line.cpp b/engine/runtime/core/cmd_line.cpp similarity index 100% rename from engine/code/core/cmd_line.cpp rename to engine/runtime/core/cmd_line.cpp diff --git a/engine/code/core/cmd_line.hpp b/engine/runtime/core/cmd_line.hpp similarity index 100% rename from engine/code/core/cmd_line.hpp rename to engine/runtime/core/cmd_line.hpp diff --git a/engine/code/core/crc32.cpp b/engine/runtime/core/crc32.cpp similarity index 100% rename from engine/code/core/crc32.cpp rename to engine/runtime/core/crc32.cpp diff --git a/engine/code/core/crc32.hpp b/engine/runtime/core/crc32.hpp similarity index 100% rename from engine/code/core/crc32.hpp rename to engine/runtime/core/crc32.hpp diff --git a/engine/code/core/data.cpp b/engine/runtime/core/data.cpp similarity index 100% rename from engine/code/core/data.cpp rename to engine/runtime/core/data.cpp diff --git a/engine/code/core/data.hpp b/engine/runtime/core/data.hpp similarity index 100% rename from engine/code/core/data.hpp rename to engine/runtime/core/data.hpp diff --git a/engine/code/core/date_time.cpp b/engine/runtime/core/date_time.cpp similarity index 100% rename from engine/code/core/date_time.cpp rename to engine/runtime/core/date_time.cpp diff --git a/engine/code/core/date_time.hpp b/engine/runtime/core/date_time.hpp similarity index 100% rename from engine/code/core/date_time.hpp rename to engine/runtime/core/date_time.hpp diff --git a/engine/code/core/flat_map.hpp b/engine/runtime/core/flat_map.hpp similarity index 100% rename from engine/code/core/flat_map.hpp rename to engine/runtime/core/flat_map.hpp diff --git a/engine/code/core/flat_set.hpp b/engine/runtime/core/flat_set.hpp similarity index 100% rename from engine/code/core/flat_set.hpp rename to engine/runtime/core/flat_set.hpp diff --git a/engine/code/core/log.cpp b/engine/runtime/core/log.cpp similarity index 100% rename from engine/code/core/log.cpp rename to engine/runtime/core/log.cpp diff --git a/engine/code/core/log.hpp b/engine/runtime/core/log.hpp similarity index 100% rename from engine/code/core/log.hpp rename to engine/runtime/core/log.hpp diff --git a/engine/code/core/mask.hpp b/engine/runtime/core/mask.hpp similarity index 100% rename from engine/code/core/mask.hpp rename to engine/runtime/core/mask.hpp diff --git a/engine/code/core/object.cpp b/engine/runtime/core/object.cpp similarity index 100% rename from engine/code/core/object.cpp rename to engine/runtime/core/object.cpp diff --git a/engine/code/core/object.hpp b/engine/runtime/core/object.hpp similarity index 100% rename from engine/code/core/object.hpp rename to engine/runtime/core/object.hpp diff --git a/engine/code/core/pool_vector.hpp b/engine/runtime/core/pool_vector.hpp similarity index 100% rename from engine/code/core/pool_vector.hpp rename to engine/runtime/core/pool_vector.hpp diff --git a/engine/code/core/random.cpp b/engine/runtime/core/random.cpp similarity index 100% rename from engine/code/core/random.cpp rename to engine/runtime/core/random.cpp diff --git a/engine/code/core/random.hpp b/engine/runtime/core/random.hpp similarity index 100% rename from engine/code/core/random.hpp rename to engine/runtime/core/random.hpp diff --git a/engine/code/core/ref.cpp b/engine/runtime/core/ref.cpp similarity index 100% rename from engine/code/core/ref.cpp rename to engine/runtime/core/ref.cpp diff --git a/engine/code/core/ref.hpp b/engine/runtime/core/ref.hpp similarity index 100% rename from engine/code/core/ref.hpp rename to engine/runtime/core/ref.hpp diff --git a/engine/code/core/sha256.cpp b/engine/runtime/core/sha256.cpp similarity index 100% rename from engine/code/core/sha256.cpp rename to engine/runtime/core/sha256.cpp diff --git a/engine/code/core/sha256.hpp b/engine/runtime/core/sha256.hpp similarity index 100% rename from engine/code/core/sha256.hpp rename to engine/runtime/core/sha256.hpp diff --git a/engine/code/core/signal.hpp b/engine/runtime/core/signal.hpp similarity index 100% rename from engine/code/core/signal.hpp rename to engine/runtime/core/signal.hpp diff --git a/engine/code/core/simple_id.hpp b/engine/runtime/core/simple_id.hpp similarity index 100% rename from engine/code/core/simple_id.hpp rename to engine/runtime/core/simple_id.hpp diff --git a/engine/code/core/status.hpp b/engine/runtime/core/status.hpp similarity index 100% rename from engine/code/core/status.hpp rename to engine/runtime/core/status.hpp diff --git a/engine/code/core/string_id.cpp b/engine/runtime/core/string_id.cpp similarity index 100% rename from engine/code/core/string_id.cpp rename to engine/runtime/core/string_id.cpp diff --git a/engine/code/core/string_id.hpp b/engine/runtime/core/string_id.hpp similarity index 100% rename from engine/code/core/string_id.hpp rename to engine/runtime/core/string_id.hpp diff --git a/engine/code/core/string_utf.cpp b/engine/runtime/core/string_utf.cpp similarity index 100% rename from engine/code/core/string_utf.cpp rename to engine/runtime/core/string_utf.cpp diff --git a/engine/code/core/string_utf.hpp b/engine/runtime/core/string_utf.hpp similarity index 100% rename from engine/code/core/string_utf.hpp rename to engine/runtime/core/string_utf.hpp diff --git a/engine/code/core/string_utils.cpp b/engine/runtime/core/string_utils.cpp similarity index 100% rename from engine/code/core/string_utils.cpp rename to engine/runtime/core/string_utils.cpp diff --git a/engine/code/core/string_utils.hpp b/engine/runtime/core/string_utils.hpp similarity index 100% rename from engine/code/core/string_utils.hpp rename to engine/runtime/core/string_utils.hpp diff --git a/engine/code/core/synchronization.hpp b/engine/runtime/core/synchronization.hpp similarity index 100% rename from engine/code/core/synchronization.hpp rename to engine/runtime/core/synchronization.hpp diff --git a/engine/code/core/task.cpp b/engine/runtime/core/task.cpp similarity index 100% rename from engine/code/core/task.cpp rename to engine/runtime/core/task.cpp diff --git a/engine/code/core/task.hpp b/engine/runtime/core/task.hpp similarity index 100% rename from engine/code/core/task.hpp rename to engine/runtime/core/task.hpp diff --git a/engine/code/core/task_hnd.hpp b/engine/runtime/core/task_hnd.hpp similarity index 100% rename from engine/code/core/task_hnd.hpp rename to engine/runtime/core/task_hnd.hpp diff --git a/engine/code/core/task_manager.cpp b/engine/runtime/core/task_manager.cpp similarity index 100% rename from engine/code/core/task_manager.cpp rename to engine/runtime/core/task_manager.cpp diff --git a/engine/code/core/task_manager.hpp b/engine/runtime/core/task_manager.hpp similarity index 100% rename from engine/code/core/task_manager.hpp rename to engine/runtime/core/task_manager.hpp diff --git a/engine/code/core/task_parallel_for.cpp b/engine/runtime/core/task_parallel_for.cpp similarity index 100% rename from engine/code/core/task_parallel_for.cpp rename to engine/runtime/core/task_parallel_for.cpp diff --git a/engine/code/core/task_parallel_for.hpp b/engine/runtime/core/task_parallel_for.hpp similarity index 100% rename from engine/code/core/task_parallel_for.hpp rename to engine/runtime/core/task_parallel_for.hpp diff --git a/engine/code/core/task_runtime.cpp b/engine/runtime/core/task_runtime.cpp similarity index 100% rename from engine/code/core/task_runtime.cpp rename to engine/runtime/core/task_runtime.cpp diff --git a/engine/code/core/task_runtime.hpp b/engine/runtime/core/task_runtime.hpp similarity index 100% rename from engine/code/core/task_runtime.hpp rename to engine/runtime/core/task_runtime.hpp diff --git a/engine/code/core/timer.cpp b/engine/runtime/core/timer.cpp similarity index 100% rename from engine/code/core/timer.cpp rename to engine/runtime/core/timer.cpp diff --git a/engine/code/core/timer.hpp b/engine/runtime/core/timer.hpp similarity index 100% rename from engine/code/core/timer.hpp rename to engine/runtime/core/timer.hpp diff --git a/engine/code/core/typed_array.hpp b/engine/runtime/core/typed_array.hpp similarity index 100% rename from engine/code/core/typed_array.hpp rename to engine/runtime/core/typed_array.hpp diff --git a/engine/code/core/typed_map.hpp b/engine/runtime/core/typed_map.hpp similarity index 100% rename from engine/code/core/typed_map.hpp rename to engine/runtime/core/typed_map.hpp diff --git a/engine/code/core/uuid.cpp b/engine/runtime/core/uuid.cpp similarity index 100% rename from engine/code/core/uuid.cpp rename to engine/runtime/core/uuid.cpp diff --git a/engine/code/core/uuid.hpp b/engine/runtime/core/uuid.hpp similarity index 100% rename from engine/code/core/uuid.hpp rename to engine/runtime/core/uuid.hpp diff --git a/engine/code/core/var.cpp b/engine/runtime/core/var.cpp similarity index 100% rename from engine/code/core/var.cpp rename to engine/runtime/core/var.cpp diff --git a/engine/code/core/var.hpp b/engine/runtime/core/var.hpp similarity index 100% rename from engine/code/core/var.hpp rename to engine/runtime/core/var.hpp diff --git a/engine/code/core/weak_ref.cpp b/engine/runtime/core/weak_ref.cpp similarity index 100% rename from engine/code/core/weak_ref.cpp rename to engine/runtime/core/weak_ref.cpp diff --git a/engine/code/core/weak_ref.hpp b/engine/runtime/core/weak_ref.hpp similarity index 100% rename from engine/code/core/weak_ref.hpp rename to engine/runtime/core/weak_ref.hpp diff --git a/engine/code/debug/console.cpp b/engine/runtime/debug/console.cpp similarity index 100% rename from engine/code/debug/console.cpp rename to engine/runtime/debug/console.cpp diff --git a/engine/code/debug/console.hpp b/engine/runtime/debug/console.hpp similarity index 100% rename from engine/code/debug/console.hpp rename to engine/runtime/debug/console.hpp diff --git a/engine/code/debug/debug_layer.cpp b/engine/runtime/debug/debug_layer.cpp similarity index 100% rename from engine/code/debug/debug_layer.cpp rename to engine/runtime/debug/debug_layer.cpp diff --git a/engine/code/debug/debug_layer.hpp b/engine/runtime/debug/debug_layer.hpp similarity index 100% rename from engine/code/debug/debug_layer.hpp rename to engine/runtime/debug/debug_layer.hpp diff --git a/engine/code/ecs/ecs_component.hpp b/engine/runtime/ecs/ecs_component.hpp similarity index 100% rename from engine/code/ecs/ecs_component.hpp rename to engine/runtime/ecs/ecs_component.hpp diff --git a/engine/code/ecs/ecs_core.cpp b/engine/runtime/ecs/ecs_core.cpp similarity index 100% rename from engine/code/ecs/ecs_core.cpp rename to engine/runtime/ecs/ecs_core.cpp diff --git a/engine/code/ecs/ecs_core.hpp b/engine/runtime/ecs/ecs_core.hpp similarity index 100% rename from engine/code/ecs/ecs_core.hpp rename to engine/runtime/ecs/ecs_core.hpp diff --git a/engine/code/ecs/ecs_entity.hpp b/engine/runtime/ecs/ecs_entity.hpp similarity index 100% rename from engine/code/ecs/ecs_entity.hpp rename to engine/runtime/ecs/ecs_entity.hpp diff --git a/engine/code/ecs/ecs_memory.cpp b/engine/runtime/ecs/ecs_memory.cpp similarity index 100% rename from engine/code/ecs/ecs_memory.cpp rename to engine/runtime/ecs/ecs_memory.cpp diff --git a/engine/code/ecs/ecs_memory.hpp b/engine/runtime/ecs/ecs_memory.hpp similarity index 100% rename from engine/code/ecs/ecs_memory.hpp rename to engine/runtime/ecs/ecs_memory.hpp diff --git a/engine/code/ecs/ecs_registry.cpp b/engine/runtime/ecs/ecs_registry.cpp similarity index 100% rename from engine/code/ecs/ecs_registry.cpp rename to engine/runtime/ecs/ecs_registry.cpp diff --git a/engine/code/ecs/ecs_registry.hpp b/engine/runtime/ecs/ecs_registry.hpp similarity index 100% rename from engine/code/ecs/ecs_registry.hpp rename to engine/runtime/ecs/ecs_registry.hpp diff --git a/engine/code/ecs/ecs_system.hpp b/engine/runtime/ecs/ecs_system.hpp similarity index 100% rename from engine/code/ecs/ecs_system.hpp rename to engine/runtime/ecs/ecs_system.hpp diff --git a/engine/code/ecs/ecs_world.cpp b/engine/runtime/ecs/ecs_world.cpp similarity index 100% rename from engine/code/ecs/ecs_world.cpp rename to engine/runtime/ecs/ecs_world.cpp diff --git a/engine/code/ecs/ecs_world.hpp b/engine/runtime/ecs/ecs_world.hpp similarity index 100% rename from engine/code/ecs/ecs_world.hpp rename to engine/runtime/ecs/ecs_world.hpp diff --git a/engine/code/engine.hpp b/engine/runtime/engine.hpp similarity index 99% rename from engine/code/engine.hpp rename to engine/runtime/engine.hpp index 88603157f..add4c466c 100644 --- a/engine/code/engine.hpp +++ b/engine/runtime/engine.hpp @@ -143,11 +143,11 @@ #include "io/archive.hpp" #include "io/archive_file.hpp" -#include "io/archive_memory.hpp" #include "io/base64.hpp" #include "io/compression.hpp" #include "io/context.hpp" #include "io/enum.hpp" +#include "io/ini.hpp" #include "io/serialization.hpp" #include "io/yaml.hpp" diff --git a/engine/code/event/_rtti.hpp b/engine/runtime/event/_rtti.hpp similarity index 100% rename from engine/code/event/_rtti.hpp rename to engine/runtime/event/_rtti.hpp diff --git a/engine/code/event/event.cpp b/engine/runtime/event/event.cpp similarity index 100% rename from engine/code/event/event.cpp rename to engine/runtime/event/event.cpp diff --git a/engine/code/event/event.hpp b/engine/runtime/event/event.hpp similarity index 100% rename from engine/code/event/event.hpp rename to engine/runtime/event/event.hpp diff --git a/engine/code/event/event_action.cpp b/engine/runtime/event/event_action.cpp similarity index 100% rename from engine/code/event/event_action.cpp rename to engine/runtime/event/event_action.cpp diff --git a/engine/code/event/event_action.hpp b/engine/runtime/event/event_action.hpp similarity index 100% rename from engine/code/event/event_action.hpp rename to engine/runtime/event/event_action.hpp diff --git a/engine/code/event/event_asset.cpp b/engine/runtime/event/event_asset.cpp similarity index 100% rename from engine/code/event/event_asset.cpp rename to engine/runtime/event/event_asset.cpp diff --git a/engine/code/event/event_asset.hpp b/engine/runtime/event/event_asset.hpp similarity index 100% rename from engine/code/event/event_asset.hpp rename to engine/runtime/event/event_asset.hpp diff --git a/engine/code/event/event_filesystem.cpp b/engine/runtime/event/event_filesystem.cpp similarity index 100% rename from engine/code/event/event_filesystem.cpp rename to engine/runtime/event/event_filesystem.cpp diff --git a/engine/code/event/event_filesystem.hpp b/engine/runtime/event/event_filesystem.hpp similarity index 100% rename from engine/code/event/event_filesystem.hpp rename to engine/runtime/event/event_filesystem.hpp diff --git a/engine/code/event/event_input.cpp b/engine/runtime/event/event_input.cpp similarity index 100% rename from engine/code/event/event_input.cpp rename to engine/runtime/event/event_input.cpp diff --git a/engine/code/event/event_input.hpp b/engine/runtime/event/event_input.hpp similarity index 100% rename from engine/code/event/event_input.hpp rename to engine/runtime/event/event_input.hpp diff --git a/engine/code/event/event_listener.hpp b/engine/runtime/event/event_listener.hpp similarity index 100% rename from engine/code/event/event_listener.hpp rename to engine/runtime/event/event_listener.hpp diff --git a/engine/code/event/event_manager.cpp b/engine/runtime/event/event_manager.cpp similarity index 100% rename from engine/code/event/event_manager.cpp rename to engine/runtime/event/event_manager.cpp diff --git a/engine/code/event/event_manager.hpp b/engine/runtime/event/event_manager.hpp similarity index 100% rename from engine/code/event/event_manager.hpp rename to engine/runtime/event/event_manager.hpp diff --git a/engine/code/event/event_scene.cpp b/engine/runtime/event/event_scene.cpp similarity index 100% rename from engine/code/event/event_scene.cpp rename to engine/runtime/event/event_scene.cpp diff --git a/engine/code/event/event_scene.hpp b/engine/runtime/event/event_scene.hpp similarity index 100% rename from engine/code/event/event_scene.hpp rename to engine/runtime/event/event_scene.hpp diff --git a/engine/code/event/event_script.cpp b/engine/runtime/event/event_script.cpp similarity index 100% rename from engine/code/event/event_script.cpp rename to engine/runtime/event/event_script.cpp diff --git a/engine/code/event/event_script.hpp b/engine/runtime/event/event_script.hpp similarity index 100% rename from engine/code/event/event_script.hpp rename to engine/runtime/event/event_script.hpp diff --git a/engine/code/event/event_token.cpp b/engine/runtime/event/event_token.cpp similarity index 100% rename from engine/code/event/event_token.cpp rename to engine/runtime/event/event_token.cpp diff --git a/engine/code/event/event_token.hpp b/engine/runtime/event/event_token.hpp similarity index 100% rename from engine/code/event/event_token.hpp rename to engine/runtime/event/event_token.hpp diff --git a/engine/code/event/event_window.cpp b/engine/runtime/event/event_window.cpp similarity index 100% rename from engine/code/event/event_window.cpp rename to engine/runtime/event/event_window.cpp diff --git a/engine/code/event/event_window.hpp b/engine/runtime/event/event_window.hpp similarity index 100% rename from engine/code/event/event_window.hpp rename to engine/runtime/event/event_window.hpp diff --git a/engine/code/event/register_classes_event.cpp b/engine/runtime/event/register_classes_event.cpp similarity index 100% rename from engine/code/event/register_classes_event.cpp rename to engine/runtime/event/register_classes_event.cpp diff --git a/engine/code/event/register_classes_event.hpp b/engine/runtime/event/register_classes_event.hpp similarity index 100% rename from engine/code/event/register_classes_event.hpp rename to engine/runtime/event/register_classes_event.hpp diff --git a/engine/code/gameplay/action_manager.cpp b/engine/runtime/gameplay/action_manager.cpp similarity index 100% rename from engine/code/gameplay/action_manager.cpp rename to engine/runtime/gameplay/action_manager.cpp diff --git a/engine/code/gameplay/action_manager.hpp b/engine/runtime/gameplay/action_manager.hpp similarity index 100% rename from engine/code/gameplay/action_manager.hpp rename to engine/runtime/gameplay/action_manager.hpp diff --git a/engine/code/gameplay/action_map.cpp b/engine/runtime/gameplay/action_map.cpp similarity index 100% rename from engine/code/gameplay/action_map.cpp rename to engine/runtime/gameplay/action_map.cpp diff --git a/engine/code/gameplay/action_map.hpp b/engine/runtime/gameplay/action_map.hpp similarity index 100% rename from engine/code/gameplay/action_map.hpp rename to engine/runtime/gameplay/action_map.hpp diff --git a/engine/code/gameplay/game_token_manager.cpp b/engine/runtime/gameplay/game_token_manager.cpp similarity index 100% rename from engine/code/gameplay/game_token_manager.cpp rename to engine/runtime/gameplay/game_token_manager.cpp diff --git a/engine/code/gameplay/game_token_manager.hpp b/engine/runtime/gameplay/game_token_manager.hpp similarity index 100% rename from engine/code/gameplay/game_token_manager.hpp rename to engine/runtime/gameplay/game_token_manager.hpp diff --git a/engine/code/gfx/gfx_buffers.cpp b/engine/runtime/gfx/gfx_buffers.cpp similarity index 100% rename from engine/code/gfx/gfx_buffers.cpp rename to engine/runtime/gfx/gfx_buffers.cpp diff --git a/engine/code/gfx/gfx_buffers.hpp b/engine/runtime/gfx/gfx_buffers.hpp similarity index 100% rename from engine/code/gfx/gfx_buffers.hpp rename to engine/runtime/gfx/gfx_buffers.hpp diff --git a/engine/code/gfx/gfx_ctx.cpp b/engine/runtime/gfx/gfx_ctx.cpp similarity index 100% rename from engine/code/gfx/gfx_ctx.cpp rename to engine/runtime/gfx/gfx_ctx.cpp diff --git a/engine/code/gfx/gfx_ctx.hpp b/engine/runtime/gfx/gfx_ctx.hpp similarity index 100% rename from engine/code/gfx/gfx_ctx.hpp rename to engine/runtime/gfx/gfx_ctx.hpp diff --git a/engine/code/gfx/gfx_defs.hpp b/engine/runtime/gfx/gfx_defs.hpp similarity index 100% rename from engine/code/gfx/gfx_defs.hpp rename to engine/runtime/gfx/gfx_defs.hpp diff --git a/engine/code/gfx/gfx_desc_set.cpp b/engine/runtime/gfx/gfx_desc_set.cpp similarity index 100% rename from engine/code/gfx/gfx_desc_set.cpp rename to engine/runtime/gfx/gfx_desc_set.cpp diff --git a/engine/code/gfx/gfx_desc_set.hpp b/engine/runtime/gfx/gfx_desc_set.hpp similarity index 100% rename from engine/code/gfx/gfx_desc_set.hpp rename to engine/runtime/gfx/gfx_desc_set.hpp diff --git a/engine/code/gfx/gfx_driver.hpp b/engine/runtime/gfx/gfx_driver.hpp similarity index 100% rename from engine/code/gfx/gfx_driver.hpp rename to engine/runtime/gfx/gfx_driver.hpp diff --git a/engine/code/gfx/gfx_dynamic_buffers.cpp b/engine/runtime/gfx/gfx_dynamic_buffers.cpp similarity index 100% rename from engine/code/gfx/gfx_dynamic_buffers.cpp rename to engine/runtime/gfx/gfx_dynamic_buffers.cpp diff --git a/engine/code/gfx/gfx_dynamic_buffers.hpp b/engine/runtime/gfx/gfx_dynamic_buffers.hpp similarity index 100% rename from engine/code/gfx/gfx_dynamic_buffers.hpp rename to engine/runtime/gfx/gfx_dynamic_buffers.hpp diff --git a/engine/code/gfx/gfx_pipeline.cpp b/engine/runtime/gfx/gfx_pipeline.cpp similarity index 100% rename from engine/code/gfx/gfx_pipeline.cpp rename to engine/runtime/gfx/gfx_pipeline.cpp diff --git a/engine/code/gfx/gfx_pipeline.hpp b/engine/runtime/gfx/gfx_pipeline.hpp similarity index 100% rename from engine/code/gfx/gfx_pipeline.hpp rename to engine/runtime/gfx/gfx_pipeline.hpp diff --git a/engine/code/gfx/gfx_render_pass.cpp b/engine/runtime/gfx/gfx_render_pass.cpp similarity index 100% rename from engine/code/gfx/gfx_render_pass.cpp rename to engine/runtime/gfx/gfx_render_pass.cpp diff --git a/engine/code/gfx/gfx_render_pass.hpp b/engine/runtime/gfx/gfx_render_pass.hpp similarity index 100% rename from engine/code/gfx/gfx_render_pass.hpp rename to engine/runtime/gfx/gfx_render_pass.hpp diff --git a/engine/code/gfx/gfx_resource.hpp b/engine/runtime/gfx/gfx_resource.hpp similarity index 100% rename from engine/code/gfx/gfx_resource.hpp rename to engine/runtime/gfx/gfx_resource.hpp diff --git a/engine/code/gfx/gfx_sampler.cpp b/engine/runtime/gfx/gfx_sampler.cpp similarity index 100% rename from engine/code/gfx/gfx_sampler.cpp rename to engine/runtime/gfx/gfx_sampler.cpp diff --git a/engine/code/gfx/gfx_sampler.hpp b/engine/runtime/gfx/gfx_sampler.hpp similarity index 100% rename from engine/code/gfx/gfx_sampler.hpp rename to engine/runtime/gfx/gfx_sampler.hpp diff --git a/engine/code/gfx/gfx_shader.hpp b/engine/runtime/gfx/gfx_shader.hpp similarity index 100% rename from engine/code/gfx/gfx_shader.hpp rename to engine/runtime/gfx/gfx_shader.hpp diff --git a/engine/code/gfx/gfx_texture.hpp b/engine/runtime/gfx/gfx_texture.hpp similarity index 100% rename from engine/code/gfx/gfx_texture.hpp rename to engine/runtime/gfx/gfx_texture.hpp diff --git a/engine/code/gfx/gfx_vector.hpp b/engine/runtime/gfx/gfx_vector.hpp similarity index 100% rename from engine/code/gfx/gfx_vector.hpp rename to engine/runtime/gfx/gfx_vector.hpp diff --git a/engine/code/gfx/gfx_vert_format.cpp b/engine/runtime/gfx/gfx_vert_format.cpp similarity index 100% rename from engine/code/gfx/gfx_vert_format.cpp rename to engine/runtime/gfx/gfx_vert_format.cpp diff --git a/engine/code/gfx/gfx_vert_format.hpp b/engine/runtime/gfx/gfx_vert_format.hpp similarity index 100% rename from engine/code/gfx/gfx_vert_format.hpp rename to engine/runtime/gfx/gfx_vert_format.hpp diff --git a/engine/code/gfx/opengl/readme.txt b/engine/runtime/gfx/opengl/readme.txt similarity index 100% rename from engine/code/gfx/opengl/readme.txt rename to engine/runtime/gfx/opengl/readme.txt diff --git a/engine/code/gfx/threaded/gfx_ctx_threaded.hpp b/engine/runtime/gfx/threaded/gfx_ctx_threaded.hpp similarity index 100% rename from engine/code/gfx/threaded/gfx_ctx_threaded.hpp rename to engine/runtime/gfx/threaded/gfx_ctx_threaded.hpp diff --git a/engine/code/gfx/threaded/gfx_ctx_wrapper.cpp b/engine/runtime/gfx/threaded/gfx_ctx_wrapper.cpp similarity index 100% rename from engine/code/gfx/threaded/gfx_ctx_wrapper.cpp rename to engine/runtime/gfx/threaded/gfx_ctx_wrapper.cpp diff --git a/engine/code/gfx/threaded/gfx_ctx_wrapper.hpp b/engine/runtime/gfx/threaded/gfx_ctx_wrapper.hpp similarity index 100% rename from engine/code/gfx/threaded/gfx_ctx_wrapper.hpp rename to engine/runtime/gfx/threaded/gfx_ctx_wrapper.hpp diff --git a/engine/code/gfx/threaded/gfx_driver_threaded.hpp b/engine/runtime/gfx/threaded/gfx_driver_threaded.hpp similarity index 100% rename from engine/code/gfx/threaded/gfx_driver_threaded.hpp rename to engine/runtime/gfx/threaded/gfx_driver_threaded.hpp diff --git a/engine/code/gfx/threaded/gfx_driver_wrapper.cpp b/engine/runtime/gfx/threaded/gfx_driver_wrapper.cpp similarity index 100% rename from engine/code/gfx/threaded/gfx_driver_wrapper.cpp rename to engine/runtime/gfx/threaded/gfx_driver_wrapper.cpp diff --git a/engine/code/gfx/threaded/gfx_driver_wrapper.hpp b/engine/runtime/gfx/threaded/gfx_driver_wrapper.hpp similarity index 100% rename from engine/code/gfx/threaded/gfx_driver_wrapper.hpp rename to engine/runtime/gfx/threaded/gfx_driver_wrapper.hpp diff --git a/engine/code/gfx/threaded/gfx_worker.cpp b/engine/runtime/gfx/threaded/gfx_worker.cpp similarity index 100% rename from engine/code/gfx/threaded/gfx_worker.cpp rename to engine/runtime/gfx/threaded/gfx_worker.cpp diff --git a/engine/code/gfx/threaded/gfx_worker.hpp b/engine/runtime/gfx/threaded/gfx_worker.hpp similarity index 100% rename from engine/code/gfx/threaded/gfx_worker.hpp rename to engine/runtime/gfx/threaded/gfx_worker.hpp diff --git a/engine/code/gfx/vulkan/vk_buffers.cpp b/engine/runtime/gfx/vulkan/vk_buffers.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_buffers.cpp rename to engine/runtime/gfx/vulkan/vk_buffers.cpp diff --git a/engine/code/gfx/vulkan/vk_buffers.hpp b/engine/runtime/gfx/vulkan/vk_buffers.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_buffers.hpp rename to engine/runtime/gfx/vulkan/vk_buffers.hpp diff --git a/engine/code/gfx/vulkan/vk_cmd_manager.cpp b/engine/runtime/gfx/vulkan/vk_cmd_manager.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_cmd_manager.cpp rename to engine/runtime/gfx/vulkan/vk_cmd_manager.cpp diff --git a/engine/code/gfx/vulkan/vk_cmd_manager.hpp b/engine/runtime/gfx/vulkan/vk_cmd_manager.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_cmd_manager.hpp rename to engine/runtime/gfx/vulkan/vk_cmd_manager.hpp diff --git a/engine/code/gfx/vulkan/vk_ctx.cpp b/engine/runtime/gfx/vulkan/vk_ctx.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_ctx.cpp rename to engine/runtime/gfx/vulkan/vk_ctx.cpp diff --git a/engine/code/gfx/vulkan/vk_ctx.hpp b/engine/runtime/gfx/vulkan/vk_ctx.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_ctx.hpp rename to engine/runtime/gfx/vulkan/vk_ctx.hpp diff --git a/engine/code/gfx/vulkan/vk_defs.cpp b/engine/runtime/gfx/vulkan/vk_defs.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_defs.cpp rename to engine/runtime/gfx/vulkan/vk_defs.cpp diff --git a/engine/code/gfx/vulkan/vk_defs.hpp b/engine/runtime/gfx/vulkan/vk_defs.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_defs.hpp rename to engine/runtime/gfx/vulkan/vk_defs.hpp diff --git a/engine/code/gfx/vulkan/vk_desc_manager.cpp b/engine/runtime/gfx/vulkan/vk_desc_manager.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_desc_manager.cpp rename to engine/runtime/gfx/vulkan/vk_desc_manager.cpp diff --git a/engine/code/gfx/vulkan/vk_desc_manager.hpp b/engine/runtime/gfx/vulkan/vk_desc_manager.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_desc_manager.hpp rename to engine/runtime/gfx/vulkan/vk_desc_manager.hpp diff --git a/engine/code/gfx/vulkan/vk_desc_set.cpp b/engine/runtime/gfx/vulkan/vk_desc_set.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_desc_set.cpp rename to engine/runtime/gfx/vulkan/vk_desc_set.cpp diff --git a/engine/code/gfx/vulkan/vk_desc_set.hpp b/engine/runtime/gfx/vulkan/vk_desc_set.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_desc_set.hpp rename to engine/runtime/gfx/vulkan/vk_desc_set.hpp diff --git a/engine/code/gfx/vulkan/vk_driver.cpp b/engine/runtime/gfx/vulkan/vk_driver.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_driver.cpp rename to engine/runtime/gfx/vulkan/vk_driver.cpp diff --git a/engine/code/gfx/vulkan/vk_driver.hpp b/engine/runtime/gfx/vulkan/vk_driver.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_driver.hpp rename to engine/runtime/gfx/vulkan/vk_driver.hpp diff --git a/engine/code/gfx/vulkan/vk_mem_manager.cpp b/engine/runtime/gfx/vulkan/vk_mem_manager.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_mem_manager.cpp rename to engine/runtime/gfx/vulkan/vk_mem_manager.cpp diff --git a/engine/code/gfx/vulkan/vk_mem_manager.hpp b/engine/runtime/gfx/vulkan/vk_mem_manager.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_mem_manager.hpp rename to engine/runtime/gfx/vulkan/vk_mem_manager.hpp diff --git a/engine/code/gfx/vulkan/vk_pipeline.cpp b/engine/runtime/gfx/vulkan/vk_pipeline.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_pipeline.cpp rename to engine/runtime/gfx/vulkan/vk_pipeline.cpp diff --git a/engine/code/gfx/vulkan/vk_pipeline.hpp b/engine/runtime/gfx/vulkan/vk_pipeline.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_pipeline.hpp rename to engine/runtime/gfx/vulkan/vk_pipeline.hpp diff --git a/engine/code/gfx/vulkan/vk_queues.cpp b/engine/runtime/gfx/vulkan/vk_queues.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_queues.cpp rename to engine/runtime/gfx/vulkan/vk_queues.cpp diff --git a/engine/code/gfx/vulkan/vk_queues.hpp b/engine/runtime/gfx/vulkan/vk_queues.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_queues.hpp rename to engine/runtime/gfx/vulkan/vk_queues.hpp diff --git a/engine/code/gfx/vulkan/vk_render_pass.cpp b/engine/runtime/gfx/vulkan/vk_render_pass.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_render_pass.cpp rename to engine/runtime/gfx/vulkan/vk_render_pass.cpp diff --git a/engine/code/gfx/vulkan/vk_render_pass.hpp b/engine/runtime/gfx/vulkan/vk_render_pass.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_render_pass.hpp rename to engine/runtime/gfx/vulkan/vk_render_pass.hpp diff --git a/engine/code/gfx/vulkan/vk_resource.hpp b/engine/runtime/gfx/vulkan/vk_resource.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_resource.hpp rename to engine/runtime/gfx/vulkan/vk_resource.hpp diff --git a/engine/code/gfx/vulkan/vk_sampler.cpp b/engine/runtime/gfx/vulkan/vk_sampler.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_sampler.cpp rename to engine/runtime/gfx/vulkan/vk_sampler.cpp diff --git a/engine/code/gfx/vulkan/vk_sampler.hpp b/engine/runtime/gfx/vulkan/vk_sampler.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_sampler.hpp rename to engine/runtime/gfx/vulkan/vk_sampler.hpp diff --git a/engine/code/gfx/vulkan/vk_shader.cpp b/engine/runtime/gfx/vulkan/vk_shader.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_shader.cpp rename to engine/runtime/gfx/vulkan/vk_shader.cpp diff --git a/engine/code/gfx/vulkan/vk_shader.hpp b/engine/runtime/gfx/vulkan/vk_shader.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_shader.hpp rename to engine/runtime/gfx/vulkan/vk_shader.hpp diff --git a/engine/code/gfx/vulkan/vk_texture.cpp b/engine/runtime/gfx/vulkan/vk_texture.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_texture.cpp rename to engine/runtime/gfx/vulkan/vk_texture.cpp diff --git a/engine/code/gfx/vulkan/vk_texture.hpp b/engine/runtime/gfx/vulkan/vk_texture.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_texture.hpp rename to engine/runtime/gfx/vulkan/vk_texture.hpp diff --git a/engine/code/gfx/vulkan/vk_vert_format.cpp b/engine/runtime/gfx/vulkan/vk_vert_format.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_vert_format.cpp rename to engine/runtime/gfx/vulkan/vk_vert_format.cpp diff --git a/engine/code/gfx/vulkan/vk_vert_format.hpp b/engine/runtime/gfx/vulkan/vk_vert_format.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_vert_format.hpp rename to engine/runtime/gfx/vulkan/vk_vert_format.hpp diff --git a/engine/code/gfx/vulkan/vk_window.cpp b/engine/runtime/gfx/vulkan/vk_window.cpp similarity index 100% rename from engine/code/gfx/vulkan/vk_window.cpp rename to engine/runtime/gfx/vulkan/vk_window.cpp diff --git a/engine/code/gfx/vulkan/vk_window.hpp b/engine/runtime/gfx/vulkan/vk_window.hpp similarity index 100% rename from engine/code/gfx/vulkan/vk_window.hpp rename to engine/runtime/gfx/vulkan/vk_window.hpp diff --git a/engine/code/glsl/_rtti.cpp b/engine/runtime/glsl/_rtti.cpp similarity index 100% rename from engine/code/glsl/_rtti.cpp rename to engine/runtime/glsl/_rtti.cpp diff --git a/engine/code/glsl/_rtti.hpp b/engine/runtime/glsl/_rtti.hpp similarity index 100% rename from engine/code/glsl/_rtti.hpp rename to engine/runtime/glsl/_rtti.hpp diff --git a/engine/code/glsl/glsl_builder.cpp b/engine/runtime/glsl/glsl_builder.cpp similarity index 100% rename from engine/code/glsl/glsl_builder.cpp rename to engine/runtime/glsl/glsl_builder.cpp diff --git a/engine/code/glsl/glsl_builder.hpp b/engine/runtime/glsl/glsl_builder.hpp similarity index 100% rename from engine/code/glsl/glsl_builder.hpp rename to engine/runtime/glsl/glsl_builder.hpp diff --git a/engine/code/glsl/glsl_include_processor.cpp b/engine/runtime/glsl/glsl_include_processor.cpp similarity index 100% rename from engine/code/glsl/glsl_include_processor.cpp rename to engine/runtime/glsl/glsl_include_processor.cpp diff --git a/engine/code/glsl/glsl_include_processor.hpp b/engine/runtime/glsl/glsl_include_processor.hpp similarity index 100% rename from engine/code/glsl/glsl_include_processor.hpp rename to engine/runtime/glsl/glsl_include_processor.hpp diff --git a/engine/code/glsl/glsl_shader_compiler.cpp b/engine/runtime/glsl/glsl_shader_compiler.cpp similarity index 99% rename from engine/code/glsl/glsl_shader_compiler.cpp rename to engine/runtime/glsl/glsl_shader_compiler.cpp index 4ee3201ec..378b82622 100644 --- a/engine/code/glsl/glsl_shader_compiler.cpp +++ b/engine/runtime/glsl/glsl_shader_compiler.cpp @@ -34,7 +34,6 @@ #include "glsl/glsl_include_processor.hpp" #include "grc/shader_compiler_task_manager.hpp" #include "io/archive.hpp" -#include "io/archive_memory.hpp" #include "io/enum.hpp" #include "profiler/profiler.hpp" #include "system/ioc_container.hpp" diff --git a/engine/code/glsl/glsl_shader_compiler.hpp b/engine/runtime/glsl/glsl_shader_compiler.hpp similarity index 100% rename from engine/code/glsl/glsl_shader_compiler.hpp rename to engine/runtime/glsl/glsl_shader_compiler.hpp diff --git a/engine/code/grc/_rtti.cpp b/engine/runtime/grc/_rtti.cpp similarity index 100% rename from engine/code/grc/_rtti.cpp rename to engine/runtime/grc/_rtti.cpp diff --git a/engine/code/grc/_rtti.hpp b/engine/runtime/grc/_rtti.hpp similarity index 100% rename from engine/code/grc/_rtti.hpp rename to engine/runtime/grc/_rtti.hpp diff --git a/engine/code/grc/font.cpp b/engine/runtime/grc/font.cpp similarity index 100% rename from engine/code/grc/font.cpp rename to engine/runtime/grc/font.cpp diff --git a/engine/code/grc/font.hpp b/engine/runtime/grc/font.hpp similarity index 100% rename from engine/code/grc/font.hpp rename to engine/runtime/grc/font.hpp diff --git a/engine/code/grc/image.cpp b/engine/runtime/grc/image.cpp similarity index 100% rename from engine/code/grc/image.cpp rename to engine/runtime/grc/image.cpp diff --git a/engine/code/grc/image.hpp b/engine/runtime/grc/image.hpp similarity index 100% rename from engine/code/grc/image.hpp rename to engine/runtime/grc/image.hpp diff --git a/engine/code/grc/pso_cache.cpp b/engine/runtime/grc/pso_cache.cpp similarity index 100% rename from engine/code/grc/pso_cache.cpp rename to engine/runtime/grc/pso_cache.cpp diff --git a/engine/code/grc/pso_cache.hpp b/engine/runtime/grc/pso_cache.hpp similarity index 100% rename from engine/code/grc/pso_cache.hpp rename to engine/runtime/grc/pso_cache.hpp diff --git a/engine/code/grc/pso_file.cpp b/engine/runtime/grc/pso_file.cpp similarity index 92% rename from engine/code/grc/pso_file.cpp rename to engine/runtime/grc/pso_file.cpp index af5bf8a32..1389881fc 100644 --- a/engine/code/grc/pso_file.cpp +++ b/engine/runtime/grc/pso_file.cpp @@ -32,8 +32,8 @@ namespace wmoge { Status PsoFile::read(const std::string& path, FilePsoData& pso_data) { - ArchiveReaderFile archive; - WG_CHECKED(archive.open(path)); + ArchiveFile archive; + WG_CHECKED(archive.open(path, {FileOpenMode::In, FileOpenMode::Binary})); IoContext context; WG_ARCHIVE_READ(context, archive, pso_data); @@ -42,8 +42,8 @@ namespace wmoge { } Status PsoFile::write(const std::string& path, const FilePsoData& pso_data) { - ArchiveWriterFile archive; - WG_CHECKED(archive.open(path)); + ArchiveFile archive; + WG_CHECKED(archive.open(path, {FileOpenMode::Out, FileOpenMode::Binary})); IoContext context; WG_ARCHIVE_WRITE(context, archive, pso_data); diff --git a/engine/code/grc/pso_file.hpp b/engine/runtime/grc/pso_file.hpp similarity index 100% rename from engine/code/grc/pso_file.hpp rename to engine/runtime/grc/pso_file.hpp diff --git a/engine/code/grc/shader.cpp b/engine/runtime/grc/shader.cpp similarity index 100% rename from engine/code/grc/shader.cpp rename to engine/runtime/grc/shader.cpp diff --git a/engine/code/grc/shader.hpp b/engine/runtime/grc/shader.hpp similarity index 100% rename from engine/code/grc/shader.hpp rename to engine/runtime/grc/shader.hpp diff --git a/engine/code/grc/shader_builder.cpp b/engine/runtime/grc/shader_builder.cpp similarity index 100% rename from engine/code/grc/shader_builder.cpp rename to engine/runtime/grc/shader_builder.cpp diff --git a/engine/code/grc/shader_builder.hpp b/engine/runtime/grc/shader_builder.hpp similarity index 100% rename from engine/code/grc/shader_builder.hpp rename to engine/runtime/grc/shader_builder.hpp diff --git a/engine/code/grc/shader_cache.cpp b/engine/runtime/grc/shader_cache.cpp similarity index 95% rename from engine/code/grc/shader_cache.cpp rename to engine/runtime/grc/shader_cache.cpp index dbed48161..cdfddb89e 100644 --- a/engine/code/grc/shader_cache.cpp +++ b/engine/runtime/grc/shader_cache.cpp @@ -116,10 +116,10 @@ namespace wmoge { Status ShaderCache::load_cache(const std::string& file_path, GfxShaderPlatform platform, bool allow_missing) { WG_AUTO_PROFILE_GRC("ShaderCache::load_cache"); - ArchiveReaderFile archive; - IoContext context; + ArchiveFile archive; + IoContext context; - if (!archive.open(file_path)) { + if (!archive.open(file_path, {FileOpenMode::In, FileOpenMode::Binary})) { if (allow_missing) { return WG_OK; } @@ -129,6 +129,7 @@ namespace wmoge { } FileShaderProgramCache cache; + WG_ARCHIVE_READ(context, archive, cache); if (cache.platform != platform) { @@ -169,15 +170,16 @@ namespace wmoge { } } - ArchiveWriterFile archive; - IoContext context; + ArchiveFile archive; + IoContext context; - if (!archive.open(file_path)) { + if (!archive.open(file_path, {FileOpenMode::Out, FileOpenMode::Binary})) { WG_LOG_ERROR("failed to open shader cache " << file_path << " for platform " << Enum::to_str(platform)); return StatusCode::FailedOpenFile; } WG_ARCHIVE_WRITE(context, archive, cache); + WG_LOG_INFO("save " << file_path << " at=" << cache.timestamp << " entries=" << cache.programs.size()); return WG_OK; diff --git a/engine/code/grc/shader_cache.hpp b/engine/runtime/grc/shader_cache.hpp similarity index 100% rename from engine/code/grc/shader_cache.hpp rename to engine/runtime/grc/shader_cache.hpp diff --git a/engine/code/grc/shader_compiler.hpp b/engine/runtime/grc/shader_compiler.hpp similarity index 100% rename from engine/code/grc/shader_compiler.hpp rename to engine/runtime/grc/shader_compiler.hpp diff --git a/engine/code/grc/shader_compiler_task_manager.hpp b/engine/runtime/grc/shader_compiler_task_manager.hpp similarity index 100% rename from engine/code/grc/shader_compiler_task_manager.hpp rename to engine/runtime/grc/shader_compiler_task_manager.hpp diff --git a/engine/code/grc/shader_file.hpp b/engine/runtime/grc/shader_file.hpp similarity index 100% rename from engine/code/grc/shader_file.hpp rename to engine/runtime/grc/shader_file.hpp diff --git a/engine/code/grc/shader_instance.cpp b/engine/runtime/grc/shader_instance.cpp similarity index 100% rename from engine/code/grc/shader_instance.cpp rename to engine/runtime/grc/shader_instance.cpp diff --git a/engine/code/grc/shader_instance.hpp b/engine/runtime/grc/shader_instance.hpp similarity index 100% rename from engine/code/grc/shader_instance.hpp rename to engine/runtime/grc/shader_instance.hpp diff --git a/engine/code/grc/shader_library.cpp b/engine/runtime/grc/shader_library.cpp similarity index 96% rename from engine/code/grc/shader_library.cpp rename to engine/runtime/grc/shader_library.cpp index ca34e87c6..5f946d738 100644 --- a/engine/code/grc/shader_library.cpp +++ b/engine/runtime/grc/shader_library.cpp @@ -229,16 +229,18 @@ namespace wmoge { WG_AUTO_PROFILE_GRC("ShaderLibrary::load_cache"); const std::string file_path = make_cache_file_name(folder, platform); - ArchiveReaderFile archive; + ArchiveFile archive; IoContext context; - if (!archive.open(file_path)) { + if (!archive.open(file_path, {FileOpenMode::In, FileOpenMode::Binary})) { WG_LOG_ERROR("failed to open shader library " << file_path << " for platform " << Enum::to_str(platform)); return StatusCode::FailedOpenFile; } FileShaderLibrary library; + WG_CHECKED(archive.begin_compressed()); WG_ARCHIVE_READ(context, archive, library); + WG_CHECKED(archive.end_compressed()); std::unique_lock lock(m_mutex); @@ -288,15 +290,17 @@ namespace wmoge { } const std::string file_path = make_cache_file_name(folder, platform); - ArchiveWriterFile archive; + ArchiveFile archive; IoContext context; - if (!archive.open(file_path)) { + if (!archive.open(file_path, {FileOpenMode::Out, FileOpenMode::Binary})) { WG_LOG_ERROR("failed to open shader library " << file_path << " for platform " << Enum::to_str(platform)); return StatusCode::FailedOpenFile; } + WG_CHECKED(archive.begin_compressed()); WG_ARCHIVE_WRITE(context, archive, library); + WG_CHECKED(archive.end_compressed()); WG_LOG_INFO("save " << file_path << " at=" << library.timestamp diff --git a/engine/code/grc/shader_library.hpp b/engine/runtime/grc/shader_library.hpp similarity index 100% rename from engine/code/grc/shader_library.hpp rename to engine/runtime/grc/shader_library.hpp diff --git a/engine/code/grc/shader_manager.cpp b/engine/runtime/grc/shader_manager.cpp similarity index 100% rename from engine/code/grc/shader_manager.cpp rename to engine/runtime/grc/shader_manager.cpp diff --git a/engine/code/grc/shader_manager.hpp b/engine/runtime/grc/shader_manager.hpp similarity index 100% rename from engine/code/grc/shader_manager.hpp rename to engine/runtime/grc/shader_manager.hpp diff --git a/engine/code/grc/shader_param.cpp b/engine/runtime/grc/shader_param.cpp similarity index 100% rename from engine/code/grc/shader_param.cpp rename to engine/runtime/grc/shader_param.cpp diff --git a/engine/code/grc/shader_param.hpp b/engine/runtime/grc/shader_param.hpp similarity index 100% rename from engine/code/grc/shader_param.hpp rename to engine/runtime/grc/shader_param.hpp diff --git a/engine/code/grc/shader_param_block.cpp b/engine/runtime/grc/shader_param_block.cpp similarity index 100% rename from engine/code/grc/shader_param_block.cpp rename to engine/runtime/grc/shader_param_block.cpp diff --git a/engine/code/grc/shader_param_block.hpp b/engine/runtime/grc/shader_param_block.hpp similarity index 100% rename from engine/code/grc/shader_param_block.hpp rename to engine/runtime/grc/shader_param_block.hpp diff --git a/engine/code/grc/shader_reflection.cpp b/engine/runtime/grc/shader_reflection.cpp similarity index 100% rename from engine/code/grc/shader_reflection.cpp rename to engine/runtime/grc/shader_reflection.cpp diff --git a/engine/code/grc/shader_reflection.hpp b/engine/runtime/grc/shader_reflection.hpp similarity index 100% rename from engine/code/grc/shader_reflection.hpp rename to engine/runtime/grc/shader_reflection.hpp diff --git a/engine/code/grc/texture.cpp b/engine/runtime/grc/texture.cpp similarity index 100% rename from engine/code/grc/texture.cpp rename to engine/runtime/grc/texture.cpp diff --git a/engine/code/grc/texture.hpp b/engine/runtime/grc/texture.hpp similarity index 100% rename from engine/code/grc/texture.hpp rename to engine/runtime/grc/texture.hpp diff --git a/engine/code/grc/texture_compression.cpp b/engine/runtime/grc/texture_compression.cpp similarity index 100% rename from engine/code/grc/texture_compression.cpp rename to engine/runtime/grc/texture_compression.cpp diff --git a/engine/code/grc/texture_compression.hpp b/engine/runtime/grc/texture_compression.hpp similarity index 100% rename from engine/code/grc/texture_compression.hpp rename to engine/runtime/grc/texture_compression.hpp diff --git a/engine/code/grc/texture_manager.cpp b/engine/runtime/grc/texture_manager.cpp similarity index 100% rename from engine/code/grc/texture_manager.cpp rename to engine/runtime/grc/texture_manager.cpp diff --git a/engine/code/grc/texture_manager.hpp b/engine/runtime/grc/texture_manager.hpp similarity index 100% rename from engine/code/grc/texture_manager.hpp rename to engine/runtime/grc/texture_manager.hpp diff --git a/engine/code/grc/texture_resize.cpp b/engine/runtime/grc/texture_resize.cpp similarity index 100% rename from engine/code/grc/texture_resize.cpp rename to engine/runtime/grc/texture_resize.cpp diff --git a/engine/code/grc/texture_resize.hpp b/engine/runtime/grc/texture_resize.hpp similarity index 100% rename from engine/code/grc/texture_resize.hpp rename to engine/runtime/grc/texture_resize.hpp diff --git a/engine/code/hooks/hook_config.hpp b/engine/runtime/hooks/hook_config.hpp similarity index 76% rename from engine/code/hooks/hook_config.hpp rename to engine/runtime/hooks/hook_config.hpp index d59144672..2b26e4b22 100644 --- a/engine/code/hooks/hook_config.hpp +++ b/engine/runtime/hooks/hook_config.hpp @@ -47,27 +47,9 @@ namespace wmoge { } void on_add_cmd_line_options(CmdLine& cmd_line) override { - cmd_line.add_string("root_config", "path to exe config", "root://config/"); } Status on_process(CmdLine& cmd_line) override { - Config* config = IocContainer::iresolve_v(); - FileSystem* fs = IocContainer::iresolve_v(); - - const std::string path = cmd_line.get_string("root_config"); - - if (!config->load(path + "/engine.cfg")) { - std::cerr << "failed to load exe engine.cfg file, check your configuration file or path"; - } - if (!config->load(path + "/game.cfg")) { - std::cerr << "failed to load exe game.cfg file, check your configure file of path"; - } - if (!config->load(path + "/cvars.cfg")) { - std::cerr << "failed to load exe cvars.cfg file, check your configure file of path"; - } - - fs->setup_mappings(); - return WG_OK; } }; diff --git a/engine/code/hooks/hook_engine.hpp b/engine/runtime/hooks/hook_engine.hpp similarity index 66% rename from engine/code/hooks/hook_engine.hpp rename to engine/runtime/hooks/hook_engine.hpp index be79828cb..9f9b83785 100644 --- a/engine/code/hooks/hook_engine.hpp +++ b/engine/runtime/hooks/hook_engine.hpp @@ -28,6 +28,7 @@ #pragma once #include "core/cmd_line.hpp" +#include "platform/common/mount_volume_physical.hpp" #include "platform/file_system.hpp" #include "system/config.hpp" #include "system/hook.hpp" @@ -48,8 +49,9 @@ namespace wmoge { } void on_add_cmd_line_options(CmdLine& cmd_line) override { - cmd_line.add_string("engine_remap", "remap for engine directory", ""); - cmd_line.add_string("engine_config", "path to engine config", "engine://config/"); + cmd_line.add_string("game_config", "path to game config folder", "config/"); + cmd_line.add_string("engine_config", "path to engine config folder", "engine/config/"); + cmd_line.add_string("engine_remap", "remap for engine directory (for debug mostly)", ""); } Status on_process(CmdLine& cmd_line) override { @@ -58,23 +60,37 @@ namespace wmoge { const std::string engine_remap = cmd_line.get_string("engine_remap"); if (!engine_remap.empty()) { - config->set_string(SID("file_system.engine_path"), engine_remap, true); + const std::filesystem::path engine_path = fs->root_path() / engine_remap; + const bool front = true; + Ref volume = make_ref(std::move(engine_path), "engine/"); + fs->add_mounting({"engine/", std::move(volume)}, front); } - fs->setup_mappings(); + const std::string game_config = cmd_line.get_string("game_config"); + const std::string engine_config = cmd_line.get_string("engine_config"); - const std::string config_path = cmd_line.get_string("engine_config"); + if (!config->load(engine_config + "/engine.cfg", ConfigStackMode::Overwrite)) { + std::cerr << "failed to load engine engine.cfg file, check your configuration file or path" << std::endl; + } + if (!config->load(engine_config + "/game.cfg", ConfigStackMode::Overwrite)) { + std::cerr << "failed to load engine game.cfg file, check your configure file of path" << std::endl; + } + if (!config->load(engine_config + "/cvars.cfg", ConfigStackMode::Overwrite)) { + std::cerr << "failed to load engine cvars.cfg file, check your configure file of path" << std::endl; + } - if (!config->load(config_path + "/engine.cfg", ConfigStackMode::Keep)) { - std::cerr << "failed to load engine engine.cfg file, check your configuration file or path"; + if (!config->load(game_config + "/engine.cfg", ConfigStackMode::Overwrite)) { + std::cerr << "failed to load game engine.cfg file, check your configuration file or path" << std::endl; } - if (!config->load(config_path + "/game.cfg", ConfigStackMode::Keep)) { - std::cerr << "failed to load engine game.cfg file, check your configure file of path"; + if (!config->load(game_config + "/game.cfg", ConfigStackMode::Overwrite)) { + std::cerr << "failed to load game game.cfg file, check your configure file of path" << std::endl; } - if (!config->load(config_path + "/cvars.cfg", ConfigStackMode::Keep)) { - std::cerr << "failed to load engine cvars.cfg file, check your configure file of path"; + if (!config->load(game_config + "/cvars.cfg", ConfigStackMode::Overwrite)) { + std::cerr << "failed to load game cvars.cfg file, check your configure file of path" << std::endl; } + fs->setup_mappings(); + return WG_OK; } }; diff --git a/engine/code/hooks/hook_logs.hpp b/engine/runtime/hooks/hook_logs.hpp similarity index 100% rename from engine/code/hooks/hook_logs.hpp rename to engine/runtime/hooks/hook_logs.hpp diff --git a/engine/code/hooks/hook_profiler.hpp b/engine/runtime/hooks/hook_profiler.hpp similarity index 100% rename from engine/code/hooks/hook_profiler.hpp rename to engine/runtime/hooks/hook_profiler.hpp diff --git a/engine/code/hooks/hook_root_remap.hpp b/engine/runtime/hooks/hook_root_remap.hpp similarity index 100% rename from engine/code/hooks/hook_root_remap.hpp rename to engine/runtime/hooks/hook_root_remap.hpp diff --git a/engine/code/hooks/hook_uuid_gen.hpp b/engine/runtime/hooks/hook_uuid_gen.hpp similarity index 100% rename from engine/code/hooks/hook_uuid_gen.hpp rename to engine/runtime/hooks/hook_uuid_gen.hpp diff --git a/engine/code/io/archive.cpp b/engine/runtime/io/archive.cpp similarity index 100% rename from engine/code/io/archive.cpp rename to engine/runtime/io/archive.cpp diff --git a/engine/code/io/archive.hpp b/engine/runtime/io/archive.hpp similarity index 96% rename from engine/code/io/archive.hpp rename to engine/runtime/io/archive.hpp index 08cfde781..19067eef1 100644 --- a/engine/code/io/archive.hpp +++ b/engine/runtime/io/archive.hpp @@ -55,12 +55,10 @@ namespace wmoge { public: ~Archive() override = default; - virtual Status nwrite(int num_bytes, const void* bytes) { return StatusCode::NotImplemented; }; - virtual Status nread(int num_bytes, void* bytes) { return StatusCode::NotImplemented; }; - - [[nodiscard]] virtual bool is_memory() = 0; - [[nodiscard]] virtual bool is_physical() = 0; - [[nodiscard]] virtual std::size_t get_size() = 0; + virtual Status nwrite(std::size_t num_bytes, const void* bytes) { return StatusCode::NotImplemented; }; + virtual Status nread(std::size_t num_bytes, void* bytes) { return StatusCode::NotImplemented; }; + virtual Status begin_compressed() { return StatusCode::NotImplemented; }; + virtual Status end_compressed() { return StatusCode::NotImplemented; }; [[nodiscard]] bool can_read() const { return m_can_read; } [[nodiscard]] bool can_write() const { return m_can_write; } diff --git a/engine/runtime/io/archive_file.cpp b/engine/runtime/io/archive_file.cpp new file mode 100644 index 000000000..8d79d33a4 --- /dev/null +++ b/engine/runtime/io/archive_file.cpp @@ -0,0 +1,215 @@ +/**********************************************************************************/ +/* Wmoge game engine */ +/* Available at github https://github.com/EgorOrachyov/wmoge */ +/**********************************************************************************/ +/* MIT License */ +/* */ +/* Copyright (c) 2023 Egor Orachyov */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining a copy */ +/* of this software and associated documentation files (the "Software"), to deal */ +/* in the Software without restriction, including without limitation the rights */ +/* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell */ +/* copies of the Software, and to permit persons to whom the Software is */ +/* furnished to do so, subject to the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be included in all */ +/* copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ +/* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ +/* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ +/* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ +/* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */ +/* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ +/* SOFTWARE. */ +/**********************************************************************************/ + +#include "archive_file.hpp" + +#include "io/compression.hpp" +#include "platform/file_system.hpp" +#include "profiler/profiler.hpp" +#include "system/ioc_container.hpp" + +#include +#include + +namespace wmoge { + + ArchiveFile::ArchiveFile() { + m_can_read = false; + m_can_write = false; + } + + ArchiveFile::~ArchiveFile() { + assert(m_compression_region == 0); + } + + Status ArchiveFile::set(Ref file, FileOpenModeFlags flags) { + assert(file); + + m_file = std::move(file); + + m_can_read = flags.get(FileOpenMode::In); + m_can_write = flags.get(FileOpenMode::Out); + + assert(m_can_read && !m_can_write || m_can_write && !m_can_read); + + return WG_OK; + } + + Status ArchiveFile::open(const std::string& file_path, FileOpenModeFlags flags) { + Ref file; + FileSystem* file_system = IocContainer::iresolve_v(); + + WG_CHECKED(file_system->open_file(file_path, file, flags)); + + return set(std::move(file), flags); + } + + Status ArchiveFile::nwrite(std::size_t num_bytes, const void* bytes) { + assert(m_file); + assert(m_can_write); + + if (is_compressed()) { + return append_raw(num_bytes, bytes); + } else { + return append_file(num_bytes, bytes); + } + + return WG_OK; + } + + Status ArchiveFile::nread(std::size_t num_bytes, void* bytes) { + assert(m_file); + assert(m_can_read); + + if (is_compressed()) { + return fetch_raw(num_bytes, bytes); + } else { + return fecth_file(num_bytes, bytes); + } + + return WG_OK; + } + + Status ArchiveFile::begin_compressed() { + assert(m_compression_region >= 0); + + if (m_compression_region == 0) { + if (m_can_read) { + WG_CHECKED(fetch_decompressed()); + } + } + + m_compression_region += 1; + return WG_OK; + } + + Status ArchiveFile::end_compressed() { + assert(m_compression_region > 0); + + m_compression_region -= 1; + + if (m_compression_region == 0) { + if (m_can_write) { + WG_CHECKED(flush_compressed()); + } + } + + return WG_OK; + } + + Status ArchiveFile::append_raw(std::size_t num_bytes, const void* bytes) { + if (m_buffer_raw.size() < m_offset + num_bytes) { + m_buffer_raw.resize(m_offset + num_bytes); + } + + std::memcpy(m_buffer_raw.data() + m_offset, bytes, num_bytes); + m_offset += num_bytes; + + return WG_OK; + } + + Status ArchiveFile::append_file(std::size_t num_bytes, const void* bytes) { + return m_file->nwrite(bytes, num_bytes); + } + + Status ArchiveFile::fetch_raw(std::size_t num_bytes, void* bytes) { + assert(m_buffer_size >= m_offset + num_bytes); + + std::memcpy(bytes, m_buffer_raw.data() + m_offset, num_bytes); + m_offset += num_bytes; + + return WG_OK; + } + + Status ArchiveFile::fecth_file(std::size_t num_bytes, void* bytes) { + return m_file->nread(bytes, num_bytes); + } + + Status ArchiveFile::flush_compressed() { + WG_AUTO_PROFILE_IO("ArchiveFile::flush_compressed"); + + IoContext dummy; + + int source_size = int(m_offset); + WG_ARCHIVE_WRITE(dummy, *this, source_size); + + if (source_size > 0) { + int requirement = 0; + WG_CHECKED(Compression::estimate_lz4(m_buffer_raw.data(), source_size, requirement)); + + if (m_buffer_compressed.size() < requirement) { + m_buffer_compressed.resize(requirement); + } + + int compressed_size = 0; + WG_CHECKED(Compression::compress_lz4(m_buffer_raw.data(), source_size, requirement, compressed_size, m_buffer_compressed.data())); + + WG_ARCHIVE_WRITE(dummy, *this, compressed_size); + WG_CHECKED(append_file(compressed_size, m_buffer_compressed.data())); + } + + m_offset = 0; + + return WG_OK; + } + + Status ArchiveFile::fetch_decompressed() { + WG_AUTO_PROFILE_IO("ArchiveFile::fetch_decompressed"); + + IoContext dummy; + + int source_size = 0; + WG_ARCHIVE_READ(dummy, *this, source_size); + + if (source_size > 0) { + int compressed_size; + WG_ARCHIVE_READ(dummy, *this, compressed_size); + + if (m_buffer_compressed.size() < compressed_size) { + m_buffer_compressed.resize(compressed_size); + } + + WG_CHECKED(fecth_file(compressed_size, m_buffer_compressed.data())); + + if (m_buffer_raw.size() < source_size) { + m_buffer_raw.resize(source_size); + } + + WG_CHECKED(Compression::decompress_lz4(m_buffer_compressed.data(), compressed_size, source_size, m_buffer_raw.data())); + } + + m_offset = 0; + m_buffer_size = source_size; + + return WG_OK; + } + + bool ArchiveFile::is_compressed() { + return m_compression_region > 0; + } + +}// namespace wmoge \ No newline at end of file diff --git a/engine/code/io/archive_memory.hpp b/engine/runtime/io/archive_file.hpp similarity index 62% rename from engine/code/io/archive_memory.hpp rename to engine/runtime/io/archive_file.hpp index 747c10eee..481159d35 100644 --- a/engine/code/io/archive_memory.hpp +++ b/engine/runtime/io/archive_file.hpp @@ -27,56 +27,46 @@ #pragma once -#include - -#include "core/data.hpp" #include "io/archive.hpp" +#include "platform/file.hpp" + +#include +#include namespace wmoge { /** - * @class ArchiveWriterMemory - * @brief An archive for binary serialization into a memory buffer + * @class ArchiveFile + * @brief An archive to read/write data to a file with compression */ - class ArchiveWriterMemory final : public Archive { + class ArchiveFile final : public Archive { public: - ArchiveWriterMemory(); - ~ArchiveWriterMemory() override = default; + ArchiveFile(); + ~ArchiveFile() override; - Status nwrite(int num_bytes, const void* bytes) override; - - bool is_memory() override; - bool is_physical() override; - std::size_t get_size() override; - - [[nodiscard]] std::vector& get_data() { return m_data; } - [[nodiscard]] std::size_t get_pos() { return m_pos; } + Status set(Ref file, FileOpenModeFlags flags); + Status open(const std::string& file_path, FileOpenModeFlags flags); + Status nwrite(std::size_t num_bytes, const void* bytes) override; + Status nread(std::size_t num_bytes, void* bytes) override; + Status begin_compressed() override; + Status end_compressed() override; private: - std::vector m_data; - std::size_t m_pos = 0; - }; - - /** - * @class ArchiveReaderMemory - * @brief An archive for binary deserialization from a memory buffer - */ - class ArchiveReaderMemory final : public Archive { - public: - ArchiveReaderMemory(const std::uint8_t* data, std::size_t size); - ~ArchiveReaderMemory() override = default; - - Status nread(int num_bytes, void* bytes) override; - - [[nodiscard]] bool is_memory() override; - [[nodiscard]] bool is_physical() override; - [[nodiscard]] std::size_t get_size() override; - [[nodiscard]] std::size_t get_pos() { return m_pos; } + Status append_raw(std::size_t num_bytes, const void* bytes); + Status append_file(std::size_t num_bytes, const void* bytes); + Status fetch_raw(std::size_t num_bytes, void* bytes); + Status fecth_file(std::size_t num_bytes, void* bytes); + Status flush_compressed(); + Status fetch_decompressed(); + [[nodiscard]] bool is_compressed(); private: - const std::uint8_t* m_data; - std::size_t m_size = 0; - std::size_t m_pos = 0; + std::vector m_buffer_raw; + std::vector m_buffer_compressed; + std::size_t m_offset = 0; + std::size_t m_buffer_size = 0; + std::int32_t m_compression_region = 0; + Ref m_file; }; }// namespace wmoge \ No newline at end of file diff --git a/engine/code/io/base64.cpp b/engine/runtime/io/base64.cpp similarity index 100% rename from engine/code/io/base64.cpp rename to engine/runtime/io/base64.cpp diff --git a/engine/code/io/base64.hpp b/engine/runtime/io/base64.hpp similarity index 100% rename from engine/code/io/base64.hpp rename to engine/runtime/io/base64.hpp diff --git a/engine/code/io/compression.cpp b/engine/runtime/io/compression.cpp similarity index 76% rename from engine/code/io/compression.cpp rename to engine/runtime/io/compression.cpp index deabee43a..97868c65c 100644 --- a/engine/code/io/compression.cpp +++ b/engine/runtime/io/compression.cpp @@ -33,15 +33,19 @@ namespace wmoge { - Status Compression::compress_lz4(const void* in, int size, std::vector& out) { - WG_AUTO_PROFILE_IO("Compression::compress_lz4"); + Status Compression::estimate_lz4(const void* in, int size, int& max_compressed_size) { + WG_AUTO_PROFILE_IO("Compression::estimate_lz4"); + + max_compressed_size = LZ4_compressBound(size); - const int max_compressed_size = LZ4_compressBound(size); - out.resize(max_compressed_size); + return WG_OK; + } - const int compressed_size = LZ4_compress_default(reinterpret_cast(in), reinterpret_cast(out.data()), size, max_compressed_size); + Status Compression::compress_lz4(const void* in, int size, int max_compressed_size, int& compressed_size, std::uint8_t* out) { + WG_AUTO_PROFILE_IO("Compression::compress_lz4"); + + compressed_size = LZ4_compress_default(reinterpret_cast(in), reinterpret_cast(out), size, max_compressed_size); if (compressed_size > 0) { - out.resize(compressed_size); return WG_OK; } @@ -51,7 +55,12 @@ namespace wmoge { Status Compression::decompress_lz4(const void* in, int compressed_size, int decompressed_size, std::uint8_t* out) { WG_AUTO_PROFILE_IO("Compression::decompress_lz4"); - return LZ4_decompress_safe(reinterpret_cast(in), reinterpret_cast(out), compressed_size, decompressed_size) > 0 ? StatusCode::Ok : StatusCode::FailedDecompress; + const int decompressed_bytes = LZ4_decompress_safe(reinterpret_cast(in), reinterpret_cast(out), compressed_size, decompressed_size); + if (decompressed_bytes == decompressed_size) { + return StatusCode::Ok; + } + + return StatusCode::FailedDecompress; } }// namespace wmoge \ No newline at end of file diff --git a/engine/code/io/compression.hpp b/engine/runtime/io/compression.hpp similarity index 85% rename from engine/code/io/compression.hpp rename to engine/runtime/io/compression.hpp index af1ce9581..9ec01054a 100644 --- a/engine/code/io/compression.hpp +++ b/engine/runtime/io/compression.hpp @@ -41,16 +41,28 @@ namespace wmoge { */ class Compression { public: + /** + * @brief Estimates upper boundary for compressed buffer size + * + * @param in buffer to compress + * @param size buffer size + * @param max_compressed_size estimate + * + * @return Ok on success + */ + static Status estimate_lz4(const void* in, int size, int& max_compressed_size); + /** * @brief Compress provided buffer * * @param in buffer to compress * @param size buffer size + * @param max_compressed_size max output buffer size * @param out output buffer * * @return Ok on success */ - static Status compress_lz4(const void* in, int size, std::vector& out); + static Status compress_lz4(const void* in, int size, int max_compressed_size, int& compressed_size, std::uint8_t* out); /** * @brief Decompress provided buffer diff --git a/engine/code/io/context.cpp b/engine/runtime/io/context.cpp similarity index 100% rename from engine/code/io/context.cpp rename to engine/runtime/io/context.cpp diff --git a/engine/code/io/context.hpp b/engine/runtime/io/context.hpp similarity index 100% rename from engine/code/io/context.hpp rename to engine/runtime/io/context.hpp diff --git a/engine/code/io/enum.hpp b/engine/runtime/io/enum.hpp similarity index 100% rename from engine/code/io/enum.hpp rename to engine/runtime/io/enum.hpp diff --git a/engine/runtime/io/ini.cpp b/engine/runtime/io/ini.cpp new file mode 100644 index 000000000..6487cd87f --- /dev/null +++ b/engine/runtime/io/ini.cpp @@ -0,0 +1,81 @@ +/**********************************************************************************/ +/* Wmoge game engine */ +/* Available at github https://github.com/EgorOrachyov/wmoge */ +/**********************************************************************************/ +/* MIT License */ +/* */ +/* Copyright (c) 2023 Egor Orachyov */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining a copy */ +/* of this software and associated documentation files (the "Software"), to deal */ +/* in the Software without restriction, including without limitation the rights */ +/* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell */ +/* copies of the Software, and to permit persons to whom the Software is */ +/* furnished to do so, subject to the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be included in all */ +/* copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ +/* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ +/* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ +/* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ +/* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */ +/* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ +/* SOFTWARE. */ +/**********************************************************************************/ + +#include "ini.hpp" + +#include + +namespace wmoge { + + Status IniFile::parse(const std::string& content) { + std::string section_name; + std::string line; + + std::stringstream file(content); + while (!file.eof()) { + std::getline(file, line); + + if (!line.empty() && line[line.length() - 1] == '\r') { + line = line.substr(0, line.length() - 1); + } + if (line[0] == '[') { + section_name = line.substr(1, line.find_last_of(']') - 1); + continue; + } + if (line[0] == ';') { + continue; + } + + auto pos = line.find(" = "); + if (pos != std::string::npos) { + std::string key = line.substr(0, pos); + std::string value = line.substr(pos + 3); + Var var; + + if (value == "true") { + var = Var(1); + } else if (value == "false") { + var = Var(0); + } else if (value[0] == '\"') { + var = Var(value.substr(1, value.find_last_of('\"') - 1)); + } else { + var = Var(value); + } + + IniSection& section = m_sections[section_name]; + if (section.name.empty()) { + section.name = section_name; + } + + section.values.emplace(key, var); + } + } + + return WG_OK; + } + +}// namespace wmoge \ No newline at end of file diff --git a/engine/code/io/archive_memory.cpp b/engine/runtime/io/ini.hpp similarity index 63% rename from engine/code/io/archive_memory.cpp rename to engine/runtime/io/ini.hpp index b09763a93..399c7c502 100644 --- a/engine/code/io/archive_memory.cpp +++ b/engine/runtime/io/ini.hpp @@ -25,50 +25,39 @@ /* SOFTWARE. */ /**********************************************************************************/ -#include +#pragma once -#include "archive_memory.hpp" +#include "core/flat_map.hpp" +#include "core/status.hpp" +#include "core/string_id.hpp" +#include "core/var.hpp" namespace wmoge { - ArchiveWriterMemory::ArchiveWriterMemory() { - m_can_write = true; - } - Status ArchiveWriterMemory::nwrite(int num_bytes, const void* bytes) { - auto pos = m_data.size(); - m_data.resize(pos + num_bytes); - m_pos += num_bytes; - std::memcpy(m_data.data() + pos, bytes, num_bytes); - return WG_OK; - } - bool ArchiveWriterMemory::is_memory() { - return true; - } - bool ArchiveWriterMemory::is_physical() { - return false; - } - std::size_t ArchiveWriterMemory::get_size() { - return m_data.size(); - } + /** + * @class IniSection + * @brief Ini file section with values + */ + struct IniSection { + std::string name; + flat_map values; + }; - ArchiveReaderMemory::ArchiveReaderMemory(const std::uint8_t* data, std::size_t size) { - m_data = data; - m_size = size; - m_can_read = true; - } - Status ArchiveReaderMemory::nread(int num_bytes, void* bytes) { - assert(m_pos + num_bytes <= get_size()); - std::memcpy(bytes, m_data + m_pos, num_bytes); - m_pos += num_bytes; - return WG_OK; - } - bool ArchiveReaderMemory::is_memory() { - return true; - } - bool ArchiveReaderMemory::is_physical() { - return false; - } - std::size_t ArchiveReaderMemory::get_size() { - return m_size; - } -}// namespace wmoge \ No newline at end of file + /** + * @class IniFile + * @brief Ini style file + */ + class IniFile { + public: + IniFile() = default; + + Status parse(const std::string& content); + + [[nodiscard]] flat_map& get_sections() { return m_sections; } + [[nodiscard]] const flat_map& get_sections() const { return m_sections; } + + private: + flat_map m_sections; + }; + +}// namespace wmoge diff --git a/engine/code/io/serialization.hpp b/engine/runtime/io/serialization.hpp similarity index 100% rename from engine/code/io/serialization.hpp rename to engine/runtime/io/serialization.hpp diff --git a/engine/code/io/yaml.cpp b/engine/runtime/io/yaml.cpp similarity index 100% rename from engine/code/io/yaml.cpp rename to engine/runtime/io/yaml.cpp diff --git a/engine/code/io/yaml.hpp b/engine/runtime/io/yaml.hpp similarity index 100% rename from engine/code/io/yaml.hpp rename to engine/runtime/io/yaml.hpp diff --git a/engine/code/material/_rtti.cpp b/engine/runtime/material/_rtti.cpp similarity index 100% rename from engine/code/material/_rtti.cpp rename to engine/runtime/material/_rtti.cpp diff --git a/engine/code/material/_rtti.hpp b/engine/runtime/material/_rtti.hpp similarity index 100% rename from engine/code/material/_rtti.hpp rename to engine/runtime/material/_rtti.hpp diff --git a/engine/code/material/material.cpp b/engine/runtime/material/material.cpp similarity index 100% rename from engine/code/material/material.cpp rename to engine/runtime/material/material.cpp diff --git a/engine/code/material/material.hpp b/engine/runtime/material/material.hpp similarity index 100% rename from engine/code/material/material.hpp rename to engine/runtime/material/material.hpp diff --git a/engine/code/math/aabb.hpp b/engine/runtime/math/aabb.hpp similarity index 100% rename from engine/code/math/aabb.hpp rename to engine/runtime/math/aabb.hpp diff --git a/engine/code/math/color.cpp b/engine/runtime/math/color.cpp similarity index 100% rename from engine/code/math/color.cpp rename to engine/runtime/math/color.cpp diff --git a/engine/code/math/color.hpp b/engine/runtime/math/color.hpp similarity index 100% rename from engine/code/math/color.hpp rename to engine/runtime/math/color.hpp diff --git a/engine/code/math/frustum.hpp b/engine/runtime/math/frustum.hpp similarity index 100% rename from engine/code/math/frustum.hpp rename to engine/runtime/math/frustum.hpp diff --git a/engine/code/math/mat.hpp b/engine/runtime/math/mat.hpp similarity index 100% rename from engine/code/math/mat.hpp rename to engine/runtime/math/mat.hpp diff --git a/engine/code/math/math_utils.cpp b/engine/runtime/math/math_utils.cpp similarity index 100% rename from engine/code/math/math_utils.cpp rename to engine/runtime/math/math_utils.cpp diff --git a/engine/code/math/math_utils.hpp b/engine/runtime/math/math_utils.hpp similarity index 100% rename from engine/code/math/math_utils.hpp rename to engine/runtime/math/math_utils.hpp diff --git a/engine/code/math/math_utils2d.hpp b/engine/runtime/math/math_utils2d.hpp similarity index 100% rename from engine/code/math/math_utils2d.hpp rename to engine/runtime/math/math_utils2d.hpp diff --git a/engine/code/math/math_utils3d.hpp b/engine/runtime/math/math_utils3d.hpp similarity index 100% rename from engine/code/math/math_utils3d.hpp rename to engine/runtime/math/math_utils3d.hpp diff --git a/engine/code/math/plane.hpp b/engine/runtime/math/plane.hpp similarity index 100% rename from engine/code/math/plane.hpp rename to engine/runtime/math/plane.hpp diff --git a/engine/code/math/quat.hpp b/engine/runtime/math/quat.hpp similarity index 100% rename from engine/code/math/quat.hpp rename to engine/runtime/math/quat.hpp diff --git a/engine/code/math/range.hpp b/engine/runtime/math/range.hpp similarity index 100% rename from engine/code/math/range.hpp rename to engine/runtime/math/range.hpp diff --git a/engine/code/math/transform.hpp b/engine/runtime/math/transform.hpp similarity index 100% rename from engine/code/math/transform.hpp rename to engine/runtime/math/transform.hpp diff --git a/engine/code/math/vec.hpp b/engine/runtime/math/vec.hpp similarity index 100% rename from engine/code/math/vec.hpp rename to engine/runtime/math/vec.hpp diff --git a/engine/code/memory/mem_linear.cpp b/engine/runtime/memory/mem_linear.cpp similarity index 100% rename from engine/code/memory/mem_linear.cpp rename to engine/runtime/memory/mem_linear.cpp diff --git a/engine/code/memory/mem_linear.hpp b/engine/runtime/memory/mem_linear.hpp similarity index 100% rename from engine/code/memory/mem_linear.hpp rename to engine/runtime/memory/mem_linear.hpp diff --git a/engine/code/memory/mem_pool.cpp b/engine/runtime/memory/mem_pool.cpp similarity index 100% rename from engine/code/memory/mem_pool.cpp rename to engine/runtime/memory/mem_pool.cpp diff --git a/engine/code/memory/mem_pool.hpp b/engine/runtime/memory/mem_pool.hpp similarity index 100% rename from engine/code/memory/mem_pool.hpp rename to engine/runtime/memory/mem_pool.hpp diff --git a/engine/code/mesh/_rtti.cpp b/engine/runtime/mesh/_rtti.cpp similarity index 100% rename from engine/code/mesh/_rtti.cpp rename to engine/runtime/mesh/_rtti.cpp diff --git a/engine/code/mesh/_rtti.hpp b/engine/runtime/mesh/_rtti.hpp similarity index 100% rename from engine/code/mesh/_rtti.hpp rename to engine/runtime/mesh/_rtti.hpp diff --git a/engine/code/mesh/array_mesh.cpp b/engine/runtime/mesh/array_mesh.cpp similarity index 100% rename from engine/code/mesh/array_mesh.cpp rename to engine/runtime/mesh/array_mesh.cpp diff --git a/engine/code/mesh/array_mesh.hpp b/engine/runtime/mesh/array_mesh.hpp similarity index 100% rename from engine/code/mesh/array_mesh.hpp rename to engine/runtime/mesh/array_mesh.hpp diff --git a/engine/code/mesh/mesh.cpp b/engine/runtime/mesh/mesh.cpp similarity index 100% rename from engine/code/mesh/mesh.cpp rename to engine/runtime/mesh/mesh.cpp diff --git a/engine/code/mesh/mesh.hpp b/engine/runtime/mesh/mesh.hpp similarity index 100% rename from engine/code/mesh/mesh.hpp rename to engine/runtime/mesh/mesh.hpp diff --git a/engine/code/mesh/mesh_batch.cpp b/engine/runtime/mesh/mesh_batch.cpp similarity index 100% rename from engine/code/mesh/mesh_batch.cpp rename to engine/runtime/mesh/mesh_batch.cpp diff --git a/engine/code/mesh/mesh_batch.hpp b/engine/runtime/mesh/mesh_batch.hpp similarity index 100% rename from engine/code/mesh/mesh_batch.hpp rename to engine/runtime/mesh/mesh_batch.hpp diff --git a/engine/code/mesh/mesh_bucket.cpp b/engine/runtime/mesh/mesh_bucket.cpp similarity index 100% rename from engine/code/mesh/mesh_bucket.cpp rename to engine/runtime/mesh/mesh_bucket.cpp diff --git a/engine/code/mesh/mesh_bucket.hpp b/engine/runtime/mesh/mesh_bucket.hpp similarity index 100% rename from engine/code/mesh/mesh_bucket.hpp rename to engine/runtime/mesh/mesh_bucket.hpp diff --git a/engine/code/mesh/mesh_builder.cpp b/engine/runtime/mesh/mesh_builder.cpp similarity index 100% rename from engine/code/mesh/mesh_builder.cpp rename to engine/runtime/mesh/mesh_builder.cpp diff --git a/engine/code/mesh/mesh_builder.hpp b/engine/runtime/mesh/mesh_builder.hpp similarity index 100% rename from engine/code/mesh/mesh_builder.hpp rename to engine/runtime/mesh/mesh_builder.hpp diff --git a/engine/code/mesh/mesh_pass.cpp b/engine/runtime/mesh/mesh_pass.cpp similarity index 100% rename from engine/code/mesh/mesh_pass.cpp rename to engine/runtime/mesh/mesh_pass.cpp diff --git a/engine/code/mesh/mesh_pass.hpp b/engine/runtime/mesh/mesh_pass.hpp similarity index 100% rename from engine/code/mesh/mesh_pass.hpp rename to engine/runtime/mesh/mesh_pass.hpp diff --git a/engine/code/mesh/mesh_processors.cpp b/engine/runtime/mesh/mesh_processors.cpp similarity index 100% rename from engine/code/mesh/mesh_processors.cpp rename to engine/runtime/mesh/mesh_processors.cpp diff --git a/engine/code/mesh/mesh_processors.hpp b/engine/runtime/mesh/mesh_processors.hpp similarity index 100% rename from engine/code/mesh/mesh_processors.hpp rename to engine/runtime/mesh/mesh_processors.hpp diff --git a/engine/code/pfx/_rtti.cpp b/engine/runtime/pfx/_rtti.cpp similarity index 100% rename from engine/code/pfx/_rtti.cpp rename to engine/runtime/pfx/_rtti.cpp diff --git a/engine/code/pfx/_rtti.hpp b/engine/runtime/pfx/_rtti.hpp similarity index 100% rename from engine/code/pfx/_rtti.hpp rename to engine/runtime/pfx/_rtti.hpp diff --git a/engine/code/pfx/pfx_component.cpp b/engine/runtime/pfx/pfx_component.cpp similarity index 100% rename from engine/code/pfx/pfx_component.cpp rename to engine/runtime/pfx/pfx_component.cpp diff --git a/engine/code/pfx/pfx_component.hpp b/engine/runtime/pfx/pfx_component.hpp similarity index 100% rename from engine/code/pfx/pfx_component.hpp rename to engine/runtime/pfx/pfx_component.hpp diff --git a/engine/code/pfx/pfx_component_runtime.cpp b/engine/runtime/pfx/pfx_component_runtime.cpp similarity index 100% rename from engine/code/pfx/pfx_component_runtime.cpp rename to engine/runtime/pfx/pfx_component_runtime.cpp diff --git a/engine/code/pfx/pfx_component_runtime.hpp b/engine/runtime/pfx/pfx_component_runtime.hpp similarity index 100% rename from engine/code/pfx/pfx_component_runtime.hpp rename to engine/runtime/pfx/pfx_component_runtime.hpp diff --git a/engine/code/pfx/pfx_effect.cpp b/engine/runtime/pfx/pfx_effect.cpp similarity index 100% rename from engine/code/pfx/pfx_effect.cpp rename to engine/runtime/pfx/pfx_effect.cpp diff --git a/engine/code/pfx/pfx_effect.hpp b/engine/runtime/pfx/pfx_effect.hpp similarity index 100% rename from engine/code/pfx/pfx_effect.hpp rename to engine/runtime/pfx/pfx_effect.hpp diff --git a/engine/code/pfx/pfx_emitter.cpp b/engine/runtime/pfx/pfx_emitter.cpp similarity index 100% rename from engine/code/pfx/pfx_emitter.cpp rename to engine/runtime/pfx/pfx_emitter.cpp diff --git a/engine/code/pfx/pfx_emitter.hpp b/engine/runtime/pfx/pfx_emitter.hpp similarity index 100% rename from engine/code/pfx/pfx_emitter.hpp rename to engine/runtime/pfx/pfx_emitter.hpp diff --git a/engine/code/pfx/pfx_feature.cpp b/engine/runtime/pfx/pfx_feature.cpp similarity index 100% rename from engine/code/pfx/pfx_feature.cpp rename to engine/runtime/pfx/pfx_feature.cpp diff --git a/engine/code/pfx/pfx_feature.hpp b/engine/runtime/pfx/pfx_feature.hpp similarity index 100% rename from engine/code/pfx/pfx_feature.hpp rename to engine/runtime/pfx/pfx_feature.hpp diff --git a/engine/code/pfx/pfx_scene.cpp b/engine/runtime/pfx/pfx_scene.cpp similarity index 100% rename from engine/code/pfx/pfx_scene.cpp rename to engine/runtime/pfx/pfx_scene.cpp diff --git a/engine/code/pfx/pfx_scene.hpp b/engine/runtime/pfx/pfx_scene.hpp similarity index 100% rename from engine/code/pfx/pfx_scene.hpp rename to engine/runtime/pfx/pfx_scene.hpp diff --git a/engine/code/pfx/pfx_storage.cpp b/engine/runtime/pfx/pfx_storage.cpp similarity index 100% rename from engine/code/pfx/pfx_storage.cpp rename to engine/runtime/pfx/pfx_storage.cpp diff --git a/engine/code/pfx/pfx_storage.hpp b/engine/runtime/pfx/pfx_storage.hpp similarity index 100% rename from engine/code/pfx/pfx_storage.hpp rename to engine/runtime/pfx/pfx_storage.hpp diff --git a/engine/code/pfx/register_classes_pfx.cpp b/engine/runtime/pfx/register_classes_pfx.cpp similarity index 100% rename from engine/code/pfx/register_classes_pfx.cpp rename to engine/runtime/pfx/register_classes_pfx.cpp diff --git a/engine/code/pfx/register_classes_pfx.hpp b/engine/runtime/pfx/register_classes_pfx.hpp similarity index 100% rename from engine/code/pfx/register_classes_pfx.hpp rename to engine/runtime/pfx/register_classes_pfx.hpp diff --git a/engine/code/platform/application.cpp b/engine/runtime/platform/application.cpp similarity index 99% rename from engine/code/platform/application.cpp rename to engine/runtime/platform/application.cpp index ed08c3c5a..565f0aaac 100644 --- a/engine/code/platform/application.cpp +++ b/engine/runtime/platform/application.cpp @@ -346,7 +346,6 @@ namespace wmoge { hook_list->attach(std::make_shared()); hook_list->attach(std::make_shared()); - hook_list->attach(std::make_shared()); hook_list->attach(std::make_shared()); hook_list->attach(std::make_shared()); hook_list->attach(std::make_shared()); diff --git a/engine/code/platform/application.hpp b/engine/runtime/platform/application.hpp similarity index 100% rename from engine/code/platform/application.hpp rename to engine/runtime/platform/application.hpp diff --git a/engine/runtime/platform/common/file_mem.cpp b/engine/runtime/platform/common/file_mem.cpp new file mode 100644 index 000000000..69c1abc60 --- /dev/null +++ b/engine/runtime/platform/common/file_mem.cpp @@ -0,0 +1,86 @@ +/**********************************************************************************/ +/* Wmoge game engine */ +/* Available at github https://github.com/EgorOrachyov/wmoge */ +/**********************************************************************************/ +/* MIT License */ +/* */ +/* Copyright (c) 2023 Egor Orachyov */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining a copy */ +/* of this software and associated documentation files (the "Software"), to deal */ +/* in the Software without restriction, including without limitation the rights */ +/* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell */ +/* copies of the Software, and to permit persons to whom the Software is */ +/* furnished to do so, subject to the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be included in all */ +/* copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ +/* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ +/* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ +/* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ +/* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */ +/* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ +/* SOFTWARE. */ +/**********************************************************************************/ + +#include "file_mem.hpp" + +#include +#include +#include + +namespace wmoge { + + Status FileMemReader::init(const array_view& buffer) { + m_buffer = buffer; + m_position = 0; + return WG_OK; + } + + Status FileMemReader::nread(void* buffer, std::size_t bytes) { + assert(buffer); + assert(bytes + m_position <= m_buffer.size()); + std::memcpy(buffer, m_buffer.data() + m_position, bytes); + m_position += bytes; + return WG_OK; + } + + Status FileMemReader::nwrite(const void* buffer, std::size_t bytes) { + return StatusCode::InvalidState; + } + + Status FileMemReader::eof(bool& is_eof) { + is_eof = m_position == m_buffer.size(); + return WG_OK; + } + + Status FileMemReader::size(std::size_t& out_size) { + out_size = m_buffer.size(); + return WG_OK; + } + + Status FileMemWriter::nread(void* buffer, std::size_t bytes) { + return StatusCode::InvalidState; + } + + Status FileMemWriter::nwrite(const void* buffer, std::size_t bytes) { + assert(buffer); + std::size_t offset = m_buffer.size(); + m_buffer.resize(m_buffer.size() + bytes); + std::memcpy(m_buffer.data() + offset, buffer, bytes); + return WG_OK; + } + + Status FileMemWriter::eof(bool& is_eof) { + is_eof = true; + return WG_OK; + } + + Status FileMemWriter::size(std::size_t& out_size) { + out_size = m_buffer.size(); + return WG_OK; + } + +}// namespace wmoge \ No newline at end of file diff --git a/engine/code/io/archive_file.hpp b/engine/runtime/platform/common/file_mem.hpp similarity index 51% rename from engine/code/io/archive_file.hpp rename to engine/runtime/platform/common/file_mem.hpp index 895ab11d7..79d084106 100644 --- a/engine/code/io/archive_file.hpp +++ b/engine/runtime/platform/common/file_mem.hpp @@ -27,89 +27,57 @@ #pragma once -#include "io/archive.hpp" +#include "core/array_view.hpp" #include "platform/file.hpp" -#include +#include namespace wmoge { /** - * @class ArchiveWriterFStream - * @brief An archive to write data to a fstream file - */ - class ArchiveWriterFStream final : public Archive { + * @class FileMemReader + * @brief File interface implementation for reading from memory buffer + */ + class FileMemReader : public File { public: - ArchiveWriterFStream(std::fstream& stream); + FileMemReader() = default; + ~FileMemReader() override = default; - Status nwrite(int num_bytes, const void* bytes) override; + Status init(const array_view& buffer); - [[nodiscard]] bool is_memory() override; - [[nodiscard]] bool is_physical() override; - [[nodiscard]] size_t get_size() override; + Status nread(void* buffer, std::size_t bytes) override; + Status nwrite(const void* buffer, std::size_t bytes) override; + Status eof(bool& is_eof) override; + Status size(std::size_t& out_size) override; - private: - std::fstream& m_stream; - }; - - /** - * @class ArchiveReaderFStream - * @brief An archive to read data from a fstream file - */ - class ArchiveReaderFStream final : public Archive { - public: - ArchiveReaderFStream(std::fstream& stream); - ~ArchiveReaderFStream() override = default; - - Status nread(int num_bytes, void* bytes) override; - - [[nodiscard]] bool is_memory() override; - [[nodiscard]] bool is_physical() override; - [[nodiscard]] std::size_t get_size() override; - - private: - std::fstream& m_stream; - }; - - /** - * @class ArchiveWriterFile - * @brief An archive to write data to a file - */ - class ArchiveWriterFile final : public Archive { - public: - ArchiveWriterFile() = default; - ArchiveWriterFile(Ref file); - - Status open(const std::string& file_path); - Status nwrite(int num_bytes, const void* bytes) override; - - [[nodiscard]] bool is_memory() override; - [[nodiscard]] bool is_physical() override; - [[nodiscard]] size_t get_size() override; + [[nodiscard]] array_view& get_buffer() { return m_buffer; } + [[nodiscard]] const array_view& get_buffer() const { return m_buffer; } + [[nodiscard]] std::size_t get_position() const { return m_position; } private: - Ref m_file; + array_view m_buffer; + std::size_t m_position = 0; }; /** - * @class ArchiveReaderFile - * @brief An archive to read data from a file - */ - class ArchiveReaderFile final : public Archive { + * @class FileMemWriter + * @brief File interface implementation for writing into dynamic memory buffer + */ + class FileMemWriter : public File { public: - ArchiveReaderFile() = default; - ArchiveReaderFile(Ref file); - ~ArchiveReaderFile() override = default; + FileMemWriter() = default; + ~FileMemWriter() override = default; - Status open(const std::string& file_path); - Status nread(int num_bytes, void* bytes) override; + Status nread(void* buffer, std::size_t bytes) override; + Status nwrite(const void* buffer, std::size_t bytes) override; + Status eof(bool& is_eof) override; + Status size(std::size_t& out_size) override; - [[nodiscard]] bool is_memory() override; - [[nodiscard]] bool is_physical() override; - [[nodiscard]] std::size_t get_size() override; + [[nodiscard]] std::vector& get_buffer() { return m_buffer; } + [[nodiscard]] const std::vector& get_buffer() const { return m_buffer; } private: - Ref m_file; + std::vector m_buffer; }; }// namespace wmoge \ No newline at end of file diff --git a/engine/code/platform/common/file_physical.cpp b/engine/runtime/platform/common/file_physical.cpp similarity index 100% rename from engine/code/platform/common/file_physical.cpp rename to engine/runtime/platform/common/file_physical.cpp diff --git a/engine/code/platform/common/file_physical.hpp b/engine/runtime/platform/common/file_physical.hpp similarity index 100% rename from engine/code/platform/common/file_physical.hpp rename to engine/runtime/platform/common/file_physical.hpp diff --git a/engine/code/platform/common/mount_volume_physical.cpp b/engine/runtime/platform/common/mount_volume_physical.cpp similarity index 100% rename from engine/code/platform/common/mount_volume_physical.cpp rename to engine/runtime/platform/common/mount_volume_physical.cpp diff --git a/engine/code/platform/common/mount_volume_physical.hpp b/engine/runtime/platform/common/mount_volume_physical.hpp similarity index 100% rename from engine/code/platform/common/mount_volume_physical.hpp rename to engine/runtime/platform/common/mount_volume_physical.hpp diff --git a/engine/code/platform/dll_manager.cpp b/engine/runtime/platform/dll_manager.cpp similarity index 100% rename from engine/code/platform/dll_manager.cpp rename to engine/runtime/platform/dll_manager.cpp diff --git a/engine/code/platform/dll_manager.hpp b/engine/runtime/platform/dll_manager.hpp similarity index 100% rename from engine/code/platform/dll_manager.hpp rename to engine/runtime/platform/dll_manager.hpp diff --git a/engine/code/platform/file.hpp b/engine/runtime/platform/file.hpp similarity index 100% rename from engine/code/platform/file.hpp rename to engine/runtime/platform/file.hpp diff --git a/engine/code/platform/file_system.cpp b/engine/runtime/platform/file_system.cpp similarity index 94% rename from engine/code/platform/file_system.cpp rename to engine/runtime/platform/file_system.cpp index 5af3825a7..ff0628cba 100644 --- a/engine/code/platform/file_system.cpp +++ b/engine/runtime/platform/file_system.cpp @@ -45,7 +45,6 @@ namespace wmoge { - const std::string FileSystem::PREFIX_ROOT = "root://"; const std::string FileSystem::PREFIX_ENGINE = "engine://"; const std::string FileSystem::PREFIX_ASSET = "asset://"; const std::string FileSystem::PREFIX_LOCAL = "local://"; @@ -54,9 +53,9 @@ namespace wmoge { const std::string FileSystem::PREFIX_LOG = "logs://"; static const std::string REMAP_ROOT = "../"; - static const std::string REMAP_ENGINE = "root://engine/"; - static const std::string REMAP_ASSET = "root://assets/"; - static const std::string REMAP_LOCAL = "root://.wgengine/"; + static const std::string REMAP_ENGINE = "engine/"; + static const std::string REMAP_ASSET = "assets/"; + static const std::string REMAP_LOCAL = ".wgengine/"; static const std::string REMAP_DEBUG = "local://debug/"; static const std::string REMAP_CACHE = "local://cache/"; static const std::string REMAP_LOG = "local://logs/"; @@ -78,11 +77,11 @@ namespace wmoge { wai_getExecutablePath(path_exe.data(), path_length, nullptr); m_executable_path = path_exe; - m_root_volume = make_ref(std::filesystem::path(), PREFIX_ROOT).as(); + m_root_volume = make_ref(std::filesystem::path(), "").as(); root(m_executable_path.parent_path()); - add_mounting({PREFIX_ROOT, m_root_volume}); + add_mounting({"", m_root_volume}); } FileSystem::~FileSystem() = default; @@ -102,28 +101,16 @@ namespace wmoge { } } - if (!applied_rule) { - if (current_resolve.find(PREFIX_ROOT) == 0) { - break; - } - } - resolved = !applied_rule; } - if (current_resolve.find(PREFIX_ROOT) == 0) { - return current_resolve; - } - - return {}; + return current_resolve; } std::filesystem::path FileSystem::resolve_physical(const std::string& path) { const std::string resolved_path = resolve(path); if (!resolved_path.empty()) { - if (resolved_path.find(PREFIX_ROOT) == 0) { - return m_root_path / resolved_path.substr(PREFIX_ROOT.length()); - } + return m_root_path / resolved_path; } return {}; diff --git a/engine/code/platform/file_system.hpp b/engine/runtime/platform/file_system.hpp similarity index 96% rename from engine/code/platform/file_system.hpp rename to engine/runtime/platform/file_system.hpp index b6697b369..92d0b29b2 100644 --- a/engine/code/platform/file_system.hpp +++ b/engine/runtime/platform/file_system.hpp @@ -52,11 +52,10 @@ namespace wmoge { * File system abstracts the way how engine files are stored on a target machine. * It uses '/' as a universal delimiter and directory separator. * It provides a domain prefix in a form of `://` to specify paths. - * Standards prefixes are `root://`, `engine://`, `asset://` and `cache://`. + * Standards prefixes are `engine://`, `asset://` and `cache://`. * This prefixes must be used for all paths to access engine files. * * Prefixes description: - * - `root://` prefix to a file relative to the running project main directory * - `engine://` prefix to a file relative to the engine files directory * - `local://` prefix to a file relative to the local (project) files directory * - `asset://` prefix relative to project assets directory @@ -65,7 +64,6 @@ namespace wmoge { */ class FileSystem { public: - static const std::string PREFIX_ROOT; static const std::string PREFIX_ENGINE; static const std::string PREFIX_ASSET; static const std::string PREFIX_LOCAL; diff --git a/engine/code/platform/glfw/glfw_input.cpp b/engine/runtime/platform/glfw/glfw_input.cpp similarity index 100% rename from engine/code/platform/glfw/glfw_input.cpp rename to engine/runtime/platform/glfw/glfw_input.cpp diff --git a/engine/code/platform/glfw/glfw_input.hpp b/engine/runtime/platform/glfw/glfw_input.hpp similarity index 100% rename from engine/code/platform/glfw/glfw_input.hpp rename to engine/runtime/platform/glfw/glfw_input.hpp diff --git a/engine/code/platform/glfw/glfw_input_defs.hpp b/engine/runtime/platform/glfw/glfw_input_defs.hpp similarity index 100% rename from engine/code/platform/glfw/glfw_input_defs.hpp rename to engine/runtime/platform/glfw/glfw_input_defs.hpp diff --git a/engine/code/platform/glfw/glfw_input_devices.cpp b/engine/runtime/platform/glfw/glfw_input_devices.cpp similarity index 100% rename from engine/code/platform/glfw/glfw_input_devices.cpp rename to engine/runtime/platform/glfw/glfw_input_devices.cpp diff --git a/engine/code/platform/glfw/glfw_input_devices.hpp b/engine/runtime/platform/glfw/glfw_input_devices.hpp similarity index 100% rename from engine/code/platform/glfw/glfw_input_devices.hpp rename to engine/runtime/platform/glfw/glfw_input_devices.hpp diff --git a/engine/code/platform/glfw/glfw_window.cpp b/engine/runtime/platform/glfw/glfw_window.cpp similarity index 100% rename from engine/code/platform/glfw/glfw_window.cpp rename to engine/runtime/platform/glfw/glfw_window.cpp diff --git a/engine/code/platform/glfw/glfw_window.hpp b/engine/runtime/platform/glfw/glfw_window.hpp similarity index 100% rename from engine/code/platform/glfw/glfw_window.hpp rename to engine/runtime/platform/glfw/glfw_window.hpp diff --git a/engine/code/platform/glfw/glfw_window_manager.cpp b/engine/runtime/platform/glfw/glfw_window_manager.cpp similarity index 100% rename from engine/code/platform/glfw/glfw_window_manager.cpp rename to engine/runtime/platform/glfw/glfw_window_manager.cpp diff --git a/engine/code/platform/glfw/glfw_window_manager.hpp b/engine/runtime/platform/glfw/glfw_window_manager.hpp similarity index 100% rename from engine/code/platform/glfw/glfw_window_manager.hpp rename to engine/runtime/platform/glfw/glfw_window_manager.hpp diff --git a/engine/code/platform/input.hpp b/engine/runtime/platform/input.hpp similarity index 100% rename from engine/code/platform/input.hpp rename to engine/runtime/platform/input.hpp diff --git a/engine/code/platform/input_defs.hpp b/engine/runtime/platform/input_defs.hpp similarity index 100% rename from engine/code/platform/input_defs.hpp rename to engine/runtime/platform/input_defs.hpp diff --git a/engine/code/platform/input_devices.hpp b/engine/runtime/platform/input_devices.hpp similarity index 100% rename from engine/code/platform/input_devices.hpp rename to engine/runtime/platform/input_devices.hpp diff --git a/engine/code/platform/mount_volume.hpp b/engine/runtime/platform/mount_volume.hpp similarity index 100% rename from engine/code/platform/mount_volume.hpp rename to engine/runtime/platform/mount_volume.hpp diff --git a/engine/code/platform/time.cpp b/engine/runtime/platform/time.cpp similarity index 100% rename from engine/code/platform/time.cpp rename to engine/runtime/platform/time.cpp diff --git a/engine/code/platform/time.hpp b/engine/runtime/platform/time.hpp similarity index 100% rename from engine/code/platform/time.hpp rename to engine/runtime/platform/time.hpp diff --git a/engine/code/platform/window.hpp b/engine/runtime/platform/window.hpp similarity index 100% rename from engine/code/platform/window.hpp rename to engine/runtime/platform/window.hpp diff --git a/engine/code/platform/window_manager.hpp b/engine/runtime/platform/window_manager.hpp similarity index 100% rename from engine/code/platform/window_manager.hpp rename to engine/runtime/platform/window_manager.hpp diff --git a/engine/code/profiler/profiler.cpp b/engine/runtime/profiler/profiler.cpp similarity index 100% rename from engine/code/profiler/profiler.cpp rename to engine/runtime/profiler/profiler.cpp diff --git a/engine/code/profiler/profiler.hpp b/engine/runtime/profiler/profiler.hpp similarity index 100% rename from engine/code/profiler/profiler.hpp rename to engine/runtime/profiler/profiler.hpp diff --git a/engine/code/render/_rtti.cpp b/engine/runtime/render/_rtti.cpp similarity index 100% rename from engine/code/render/_rtti.cpp rename to engine/runtime/render/_rtti.cpp diff --git a/engine/code/render/_rtti.hpp b/engine/runtime/render/_rtti.hpp similarity index 100% rename from engine/code/render/_rtti.hpp rename to engine/runtime/render/_rtti.hpp diff --git a/engine/code/render/aux_draw_manager.cpp b/engine/runtime/render/aux_draw_manager.cpp similarity index 100% rename from engine/code/render/aux_draw_manager.cpp rename to engine/runtime/render/aux_draw_manager.cpp diff --git a/engine/code/render/aux_draw_manager.hpp b/engine/runtime/render/aux_draw_manager.hpp similarity index 100% rename from engine/code/render/aux_draw_manager.hpp rename to engine/runtime/render/aux_draw_manager.hpp diff --git a/engine/code/render/camera.cpp b/engine/runtime/render/camera.cpp similarity index 100% rename from engine/code/render/camera.cpp rename to engine/runtime/render/camera.cpp diff --git a/engine/code/render/camera.hpp b/engine/runtime/render/camera.hpp similarity index 100% rename from engine/code/render/camera.hpp rename to engine/runtime/render/camera.hpp diff --git a/engine/code/render/canvas.cpp b/engine/runtime/render/canvas.cpp similarity index 100% rename from engine/code/render/canvas.cpp rename to engine/runtime/render/canvas.cpp diff --git a/engine/code/render/canvas.hpp b/engine/runtime/render/canvas.hpp similarity index 100% rename from engine/code/render/canvas.hpp rename to engine/runtime/render/canvas.hpp diff --git a/engine/code/render/common.hpp b/engine/runtime/render/common.hpp similarity index 100% rename from engine/code/render/common.hpp rename to engine/runtime/render/common.hpp diff --git a/engine/code/render/culling.cpp b/engine/runtime/render/culling.cpp similarity index 100% rename from engine/code/render/culling.cpp rename to engine/runtime/render/culling.cpp diff --git a/engine/code/render/culling.hpp b/engine/runtime/render/culling.hpp similarity index 100% rename from engine/code/render/culling.hpp rename to engine/runtime/render/culling.hpp diff --git a/engine/code/render/deferred_pipeline.cpp b/engine/runtime/render/deferred_pipeline.cpp similarity index 100% rename from engine/code/render/deferred_pipeline.cpp rename to engine/runtime/render/deferred_pipeline.cpp diff --git a/engine/code/render/deferred_pipeline.hpp b/engine/runtime/render/deferred_pipeline.hpp similarity index 100% rename from engine/code/render/deferred_pipeline.hpp rename to engine/runtime/render/deferred_pipeline.hpp diff --git a/engine/code/render/graphics_pipeline.cpp b/engine/runtime/render/graphics_pipeline.cpp similarity index 100% rename from engine/code/render/graphics_pipeline.cpp rename to engine/runtime/render/graphics_pipeline.cpp diff --git a/engine/code/render/graphics_pipeline.hpp b/engine/runtime/render/graphics_pipeline.hpp similarity index 100% rename from engine/code/render/graphics_pipeline.hpp rename to engine/runtime/render/graphics_pipeline.hpp diff --git a/engine/code/render/light.cpp b/engine/runtime/render/light.cpp similarity index 100% rename from engine/code/render/light.cpp rename to engine/runtime/render/light.cpp diff --git a/engine/code/render/light.hpp b/engine/runtime/render/light.hpp similarity index 100% rename from engine/code/render/light.hpp rename to engine/runtime/render/light.hpp diff --git a/engine/code/render/model.cpp b/engine/runtime/render/model.cpp similarity index 100% rename from engine/code/render/model.cpp rename to engine/runtime/render/model.cpp diff --git a/engine/code/render/model.hpp b/engine/runtime/render/model.hpp similarity index 100% rename from engine/code/render/model.hpp rename to engine/runtime/render/model.hpp diff --git a/engine/code/render/model_instance.cpp b/engine/runtime/render/model_instance.cpp similarity index 100% rename from engine/code/render/model_instance.cpp rename to engine/runtime/render/model_instance.cpp diff --git a/engine/code/render/model_instance.hpp b/engine/runtime/render/model_instance.hpp similarity index 100% rename from engine/code/render/model_instance.hpp rename to engine/runtime/render/model_instance.hpp diff --git a/engine/code/render/render_defs.hpp b/engine/runtime/render/render_defs.hpp similarity index 100% rename from engine/code/render/render_defs.hpp rename to engine/runtime/render/render_defs.hpp diff --git a/engine/code/render/render_engine.cpp b/engine/runtime/render/render_engine.cpp similarity index 100% rename from engine/code/render/render_engine.cpp rename to engine/runtime/render/render_engine.cpp diff --git a/engine/code/render/render_engine.hpp b/engine/runtime/render/render_engine.hpp similarity index 100% rename from engine/code/render/render_engine.hpp rename to engine/runtime/render/render_engine.hpp diff --git a/engine/code/render/render_queue.cpp b/engine/runtime/render/render_queue.cpp similarity index 100% rename from engine/code/render/render_queue.cpp rename to engine/runtime/render/render_queue.cpp diff --git a/engine/code/render/render_queue.hpp b/engine/runtime/render/render_queue.hpp similarity index 100% rename from engine/code/render/render_queue.hpp rename to engine/runtime/render/render_queue.hpp diff --git a/engine/code/render/render_scene.cpp b/engine/runtime/render/render_scene.cpp similarity index 100% rename from engine/code/render/render_scene.cpp rename to engine/runtime/render/render_scene.cpp diff --git a/engine/code/render/render_scene.hpp b/engine/runtime/render/render_scene.hpp similarity index 100% rename from engine/code/render/render_scene.hpp rename to engine/runtime/render/render_scene.hpp diff --git a/engine/code/render/view.cpp b/engine/runtime/render/view.cpp similarity index 100% rename from engine/code/render/view.cpp rename to engine/runtime/render/view.cpp diff --git a/engine/code/render/view.hpp b/engine/runtime/render/view.hpp similarity index 100% rename from engine/code/render/view.hpp rename to engine/runtime/render/view.hpp diff --git a/engine/code/render/view_manager.cpp b/engine/runtime/render/view_manager.cpp similarity index 100% rename from engine/code/render/view_manager.cpp rename to engine/runtime/render/view_manager.cpp diff --git a/engine/code/render/view_manager.hpp b/engine/runtime/render/view_manager.hpp similarity index 100% rename from engine/code/render/view_manager.hpp rename to engine/runtime/render/view_manager.hpp diff --git a/engine/code/rtti/_rtti.cpp b/engine/runtime/rtti/_rtti.cpp similarity index 100% rename from engine/code/rtti/_rtti.cpp rename to engine/runtime/rtti/_rtti.cpp diff --git a/engine/code/rtti/_rtti.hpp b/engine/runtime/rtti/_rtti.hpp similarity index 100% rename from engine/code/rtti/_rtti.hpp rename to engine/runtime/rtti/_rtti.hpp diff --git a/engine/code/rtti/builtin.hpp b/engine/runtime/rtti/builtin.hpp similarity index 100% rename from engine/code/rtti/builtin.hpp rename to engine/runtime/rtti/builtin.hpp diff --git a/engine/code/rtti/class.cpp b/engine/runtime/rtti/class.cpp similarity index 100% rename from engine/code/rtti/class.cpp rename to engine/runtime/rtti/class.cpp diff --git a/engine/code/rtti/class.hpp b/engine/runtime/rtti/class.hpp similarity index 100% rename from engine/code/rtti/class.hpp rename to engine/runtime/rtti/class.hpp diff --git a/engine/code/rtti/enum.hpp b/engine/runtime/rtti/enum.hpp similarity index 100% rename from engine/code/rtti/enum.hpp rename to engine/runtime/rtti/enum.hpp diff --git a/engine/code/rtti/function.hpp b/engine/runtime/rtti/function.hpp similarity index 100% rename from engine/code/rtti/function.hpp rename to engine/runtime/rtti/function.hpp diff --git a/engine/code/rtti/meta_data.cpp b/engine/runtime/rtti/meta_data.cpp similarity index 100% rename from engine/code/rtti/meta_data.cpp rename to engine/runtime/rtti/meta_data.cpp diff --git a/engine/code/rtti/meta_data.hpp b/engine/runtime/rtti/meta_data.hpp similarity index 100% rename from engine/code/rtti/meta_data.hpp rename to engine/runtime/rtti/meta_data.hpp diff --git a/engine/code/rtti/object.cpp b/engine/runtime/rtti/object.cpp similarity index 100% rename from engine/code/rtti/object.cpp rename to engine/runtime/rtti/object.cpp diff --git a/engine/code/rtti/object.hpp b/engine/runtime/rtti/object.hpp similarity index 100% rename from engine/code/rtti/object.hpp rename to engine/runtime/rtti/object.hpp diff --git a/engine/code/rtti/struct.cpp b/engine/runtime/rtti/struct.cpp similarity index 100% rename from engine/code/rtti/struct.cpp rename to engine/runtime/rtti/struct.cpp diff --git a/engine/code/rtti/struct.hpp b/engine/runtime/rtti/struct.hpp similarity index 100% rename from engine/code/rtti/struct.hpp rename to engine/runtime/rtti/struct.hpp diff --git a/engine/code/rtti/traits.hpp b/engine/runtime/rtti/traits.hpp similarity index 100% rename from engine/code/rtti/traits.hpp rename to engine/runtime/rtti/traits.hpp diff --git a/engine/code/rtti/type.hpp b/engine/runtime/rtti/type.hpp similarity index 100% rename from engine/code/rtti/type.hpp rename to engine/runtime/rtti/type.hpp diff --git a/engine/code/rtti/type_storage.cpp b/engine/runtime/rtti/type_storage.cpp similarity index 100% rename from engine/code/rtti/type_storage.cpp rename to engine/runtime/rtti/type_storage.cpp diff --git a/engine/code/rtti/type_storage.hpp b/engine/runtime/rtti/type_storage.hpp similarity index 100% rename from engine/code/rtti/type_storage.hpp rename to engine/runtime/rtti/type_storage.hpp diff --git a/engine/code/scene/_rtti.cpp b/engine/runtime/scene/_rtti.cpp similarity index 100% rename from engine/code/scene/_rtti.cpp rename to engine/runtime/scene/_rtti.cpp diff --git a/engine/code/scene/_rtti.hpp b/engine/runtime/scene/_rtti.hpp similarity index 100% rename from engine/code/scene/_rtti.hpp rename to engine/runtime/scene/_rtti.hpp diff --git a/engine/code/scene/register_classes_scene.cpp b/engine/runtime/scene/register_classes_scene.cpp similarity index 100% rename from engine/code/scene/register_classes_scene.cpp rename to engine/runtime/scene/register_classes_scene.cpp diff --git a/engine/code/scene/register_classes_scene.hpp b/engine/runtime/scene/register_classes_scene.hpp similarity index 100% rename from engine/code/scene/register_classes_scene.hpp rename to engine/runtime/scene/register_classes_scene.hpp diff --git a/engine/code/scene/scene.cpp b/engine/runtime/scene/scene.cpp similarity index 100% rename from engine/code/scene/scene.cpp rename to engine/runtime/scene/scene.cpp diff --git a/engine/code/scene/scene.hpp b/engine/runtime/scene/scene.hpp similarity index 100% rename from engine/code/scene/scene.hpp rename to engine/runtime/scene/scene.hpp diff --git a/engine/code/scene/scene_components.cpp b/engine/runtime/scene/scene_components.cpp similarity index 100% rename from engine/code/scene/scene_components.cpp rename to engine/runtime/scene/scene_components.cpp diff --git a/engine/code/scene/scene_components.hpp b/engine/runtime/scene/scene_components.hpp similarity index 100% rename from engine/code/scene/scene_components.hpp rename to engine/runtime/scene/scene_components.hpp diff --git a/engine/code/scene/scene_data.cpp b/engine/runtime/scene/scene_data.cpp similarity index 100% rename from engine/code/scene/scene_data.cpp rename to engine/runtime/scene/scene_data.cpp diff --git a/engine/code/scene/scene_data.hpp b/engine/runtime/scene/scene_data.hpp similarity index 100% rename from engine/code/scene/scene_data.hpp rename to engine/runtime/scene/scene_data.hpp diff --git a/engine/code/scene/scene_entity.cpp b/engine/runtime/scene/scene_entity.cpp similarity index 100% rename from engine/code/scene/scene_entity.cpp rename to engine/runtime/scene/scene_entity.cpp diff --git a/engine/code/scene/scene_entity.hpp b/engine/runtime/scene/scene_entity.hpp similarity index 100% rename from engine/code/scene/scene_entity.hpp rename to engine/runtime/scene/scene_entity.hpp diff --git a/engine/code/scene/scene_manager.cpp b/engine/runtime/scene/scene_manager.cpp similarity index 100% rename from engine/code/scene/scene_manager.cpp rename to engine/runtime/scene/scene_manager.cpp diff --git a/engine/code/scene/scene_manager.hpp b/engine/runtime/scene/scene_manager.hpp similarity index 100% rename from engine/code/scene/scene_manager.hpp rename to engine/runtime/scene/scene_manager.hpp diff --git a/engine/code/scene/scene_node.cpp b/engine/runtime/scene/scene_node.cpp similarity index 100% rename from engine/code/scene/scene_node.cpp rename to engine/runtime/scene/scene_node.cpp diff --git a/engine/code/scene/scene_node.hpp b/engine/runtime/scene/scene_node.hpp similarity index 100% rename from engine/code/scene/scene_node.hpp rename to engine/runtime/scene/scene_node.hpp diff --git a/engine/code/scene/scene_node_props.cpp b/engine/runtime/scene/scene_node_props.cpp similarity index 100% rename from engine/code/scene/scene_node_props.cpp rename to engine/runtime/scene/scene_node_props.cpp diff --git a/engine/code/scene/scene_node_props.hpp b/engine/runtime/scene/scene_node_props.hpp similarity index 100% rename from engine/code/scene/scene_node_props.hpp rename to engine/runtime/scene/scene_node_props.hpp diff --git a/engine/code/scene/scene_packed.cpp b/engine/runtime/scene/scene_packed.cpp similarity index 100% rename from engine/code/scene/scene_packed.cpp rename to engine/runtime/scene/scene_packed.cpp diff --git a/engine/code/scene/scene_packed.hpp b/engine/runtime/scene/scene_packed.hpp similarity index 100% rename from engine/code/scene/scene_packed.hpp rename to engine/runtime/scene/scene_packed.hpp diff --git a/engine/code/scene/scene_prefab.cpp b/engine/runtime/scene/scene_prefab.cpp similarity index 100% rename from engine/code/scene/scene_prefab.cpp rename to engine/runtime/scene/scene_prefab.cpp diff --git a/engine/code/scene/scene_prefab.hpp b/engine/runtime/scene/scene_prefab.hpp similarity index 100% rename from engine/code/scene/scene_prefab.hpp rename to engine/runtime/scene/scene_prefab.hpp diff --git a/engine/code/scene/scene_systems.cpp b/engine/runtime/scene/scene_systems.cpp similarity index 100% rename from engine/code/scene/scene_systems.cpp rename to engine/runtime/scene/scene_systems.cpp diff --git a/engine/code/scene/scene_systems.hpp b/engine/runtime/scene/scene_systems.hpp similarity index 100% rename from engine/code/scene/scene_systems.hpp rename to engine/runtime/scene/scene_systems.hpp diff --git a/engine/code/scene/scene_tree.cpp b/engine/runtime/scene/scene_tree.cpp similarity index 100% rename from engine/code/scene/scene_tree.cpp rename to engine/runtime/scene/scene_tree.cpp diff --git a/engine/code/scene/scene_tree.hpp b/engine/runtime/scene/scene_tree.hpp similarity index 100% rename from engine/code/scene/scene_tree.hpp rename to engine/runtime/scene/scene_tree.hpp diff --git a/engine/code/scene/scene_tree_packed.cpp b/engine/runtime/scene/scene_tree_packed.cpp similarity index 100% rename from engine/code/scene/scene_tree_packed.cpp rename to engine/runtime/scene/scene_tree_packed.cpp diff --git a/engine/code/scene/scene_tree_packed.hpp b/engine/runtime/scene/scene_tree_packed.hpp similarity index 100% rename from engine/code/scene/scene_tree_packed.hpp rename to engine/runtime/scene/scene_tree_packed.hpp diff --git a/engine/code/scripting/_rtti.cpp b/engine/runtime/scripting/_rtti.cpp similarity index 100% rename from engine/code/scripting/_rtti.cpp rename to engine/runtime/scripting/_rtti.cpp diff --git a/engine/code/scripting/_rtti.hpp b/engine/runtime/scripting/_rtti.hpp similarity index 100% rename from engine/code/scripting/_rtti.hpp rename to engine/runtime/scripting/_rtti.hpp diff --git a/engine/code/scripting/lua/lua_defs.cpp b/engine/runtime/scripting/lua/lua_defs.cpp similarity index 100% rename from engine/code/scripting/lua/lua_defs.cpp rename to engine/runtime/scripting/lua/lua_defs.cpp diff --git a/engine/code/scripting/lua/lua_defs.hpp b/engine/runtime/scripting/lua/lua_defs.hpp similarity index 100% rename from engine/code/scripting/lua/lua_defs.hpp rename to engine/runtime/scripting/lua/lua_defs.hpp diff --git a/engine/code/scripting/lua/lua_event_script.cpp b/engine/runtime/scripting/lua/lua_event_script.cpp similarity index 100% rename from engine/code/scripting/lua/lua_event_script.cpp rename to engine/runtime/scripting/lua/lua_event_script.cpp diff --git a/engine/code/scripting/lua/lua_event_script.hpp b/engine/runtime/scripting/lua/lua_event_script.hpp similarity index 100% rename from engine/code/scripting/lua/lua_event_script.hpp rename to engine/runtime/scripting/lua/lua_event_script.hpp diff --git a/engine/code/scripting/lua/lua_script.cpp b/engine/runtime/scripting/lua/lua_script.cpp similarity index 100% rename from engine/code/scripting/lua/lua_script.cpp rename to engine/runtime/scripting/lua/lua_script.cpp diff --git a/engine/code/scripting/lua/lua_script.hpp b/engine/runtime/scripting/lua/lua_script.hpp similarity index 100% rename from engine/code/scripting/lua/lua_script.hpp rename to engine/runtime/scripting/lua/lua_script.hpp diff --git a/engine/code/scripting/lua/lua_script_instance.cpp b/engine/runtime/scripting/lua/lua_script_instance.cpp similarity index 100% rename from engine/code/scripting/lua/lua_script_instance.cpp rename to engine/runtime/scripting/lua/lua_script_instance.cpp diff --git a/engine/code/scripting/lua/lua_script_instance.hpp b/engine/runtime/scripting/lua/lua_script_instance.hpp similarity index 100% rename from engine/code/scripting/lua/lua_script_instance.hpp rename to engine/runtime/scripting/lua/lua_script_instance.hpp diff --git a/engine/code/scripting/lua/lua_script_system.cpp b/engine/runtime/scripting/lua/lua_script_system.cpp similarity index 100% rename from engine/code/scripting/lua/lua_script_system.cpp rename to engine/runtime/scripting/lua/lua_script_system.cpp diff --git a/engine/code/scripting/lua/lua_script_system.hpp b/engine/runtime/scripting/lua/lua_script_system.hpp similarity index 100% rename from engine/code/scripting/lua/lua_script_system.hpp rename to engine/runtime/scripting/lua/lua_script_system.hpp diff --git a/engine/code/scripting/lua/lua_type_traits.cpp b/engine/runtime/scripting/lua/lua_type_traits.cpp similarity index 100% rename from engine/code/scripting/lua/lua_type_traits.cpp rename to engine/runtime/scripting/lua/lua_type_traits.cpp diff --git a/engine/code/scripting/lua/lua_type_traits.hpp b/engine/runtime/scripting/lua/lua_type_traits.hpp similarity index 100% rename from engine/code/scripting/lua/lua_type_traits.hpp rename to engine/runtime/scripting/lua/lua_type_traits.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_asset.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_asset.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_asset.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_asset.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_asset.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_asset.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_asset.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_asset.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_core.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_core.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_core.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_core.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_core.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_core.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_core.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_core.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_event.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_event.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_event.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_event.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_event.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_event.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_event.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_event.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_gameplay.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_gameplay.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_gameplay.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_gameplay.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_gameplay.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_gameplay.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_gameplay.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_gameplay.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_math.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_math.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_math.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_math.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_math.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_math.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_math.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_math.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_platform.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_platform.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_platform.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_platform.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_platform.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_platform.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_platform.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_platform.hpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_scene.cpp b/engine/runtime/scripting/lua_bindings/lua_bindings_scene.cpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_scene.cpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_scene.cpp diff --git a/engine/code/scripting/lua_bindings/lua_bindings_scene.hpp b/engine/runtime/scripting/lua_bindings/lua_bindings_scene.hpp similarity index 100% rename from engine/code/scripting/lua_bindings/lua_bindings_scene.hpp rename to engine/runtime/scripting/lua_bindings/lua_bindings_scene.hpp diff --git a/engine/code/scripting/script.cpp b/engine/runtime/scripting/script.cpp similarity index 100% rename from engine/code/scripting/script.cpp rename to engine/runtime/scripting/script.cpp diff --git a/engine/code/scripting/script.hpp b/engine/runtime/scripting/script.hpp similarity index 100% rename from engine/code/scripting/script.hpp rename to engine/runtime/scripting/script.hpp diff --git a/engine/code/scripting/script_instance.hpp b/engine/runtime/scripting/script_instance.hpp similarity index 100% rename from engine/code/scripting/script_instance.hpp rename to engine/runtime/scripting/script_instance.hpp diff --git a/engine/code/scripting/script_native.cpp b/engine/runtime/scripting/script_native.cpp similarity index 100% rename from engine/code/scripting/script_native.cpp rename to engine/runtime/scripting/script_native.cpp diff --git a/engine/code/scripting/script_native.hpp b/engine/runtime/scripting/script_native.hpp similarity index 100% rename from engine/code/scripting/script_native.hpp rename to engine/runtime/scripting/script_native.hpp diff --git a/engine/code/scripting/script_system.hpp b/engine/runtime/scripting/script_system.hpp similarity index 100% rename from engine/code/scripting/script_system.hpp rename to engine/runtime/scripting/script_system.hpp diff --git a/engine/code/system/_rtti.cpp b/engine/runtime/system/_rtti.cpp similarity index 100% rename from engine/code/system/_rtti.cpp rename to engine/runtime/system/_rtti.cpp diff --git a/engine/code/system/_rtti.hpp b/engine/runtime/system/_rtti.hpp similarity index 100% rename from engine/code/system/_rtti.hpp rename to engine/runtime/system/_rtti.hpp diff --git a/engine/code/system/config.cpp b/engine/runtime/system/config.cpp similarity index 100% rename from engine/code/system/config.cpp rename to engine/runtime/system/config.cpp diff --git a/engine/code/system/config.hpp b/engine/runtime/system/config.hpp similarity index 100% rename from engine/code/system/config.hpp rename to engine/runtime/system/config.hpp diff --git a/engine/code/system/config_file.cpp b/engine/runtime/system/config_file.cpp similarity index 83% rename from engine/code/system/config_file.cpp rename to engine/runtime/system/config_file.cpp index 2e56fe111..b7343b598 100644 --- a/engine/code/system/config_file.cpp +++ b/engine/runtime/system/config_file.cpp @@ -29,6 +29,7 @@ #include "core/data.hpp" #include "core/string_utils.hpp" +#include "io/ini.hpp" #include "platform/file_system.hpp" #include "profiler/profiler.hpp" #include "system/ioc_container.hpp" @@ -40,49 +41,23 @@ namespace wmoge { Status ConfigFile::load(const std::string& path) { WG_AUTO_PROFILE_ASSET("ConfigFile::load"); - std::fstream file; - FileSystem* file_system = IocContainer::iresolve_v(); + std::string content; + FileSystem* file_system = IocContainer::iresolve_v(); - if (!file_system->open_file_physical(path, file, std::ios_base::in | std::ios_base::binary)) { + if (!file_system->read_file(path, content)) { WG_LOG_ERROR("failed to read config file from " << path); return StatusCode::FailedRead; } - Strid section; - std::string line; + IniFile file; + WG_CHECKED(file.parse(content)); - while (!file.eof()) { - std::getline(file, line); + for (auto& entry : file.get_sections()) { + IniSection& section = entry.second; - if (!line.empty() && line[line.length() - 1] == '\r') { - line = line.substr(0, line.length() - 1); - } - - if (line[0] == '[') { - section = SID(line.substr(1, line.find_last_of(']') - 1)); - continue; - } - if (line[0] == ';') { - continue; - } - - auto pos = line.find(" = "); - if (pos != std::string::npos) { - std::string key = line.substr(0, pos); - std::string value = line.substr(pos + 3); - Var var; - - if (value == "true") { - var = Var(1); - } else if (value == "false") { - var = Var(0); - } else if (value[0] == '\"') { - var = Var(value.substr(1, value.find_last_of('\"') - 1)); - } else { - var = Var(value); - } - - m_entries.emplace(SID(section.str() + "." + key), var); + for (auto& value : section.values) { + Strid key(section.name + "." + value.first); + m_entries[key] = std::move(value.second); } } diff --git a/engine/code/system/config_file.hpp b/engine/runtime/system/config_file.hpp similarity index 100% rename from engine/code/system/config_file.hpp rename to engine/runtime/system/config_file.hpp diff --git a/engine/code/system/engine.cpp b/engine/runtime/system/engine.cpp similarity index 100% rename from engine/code/system/engine.cpp rename to engine/runtime/system/engine.cpp diff --git a/engine/code/system/engine.hpp b/engine/runtime/system/engine.hpp similarity index 100% rename from engine/code/system/engine.hpp rename to engine/runtime/system/engine.hpp diff --git a/engine/code/system/hook.cpp b/engine/runtime/system/hook.cpp similarity index 100% rename from engine/code/system/hook.cpp rename to engine/runtime/system/hook.cpp diff --git a/engine/code/system/hook.hpp b/engine/runtime/system/hook.hpp similarity index 100% rename from engine/code/system/hook.hpp rename to engine/runtime/system/hook.hpp diff --git a/engine/code/system/ioc_container.cpp b/engine/runtime/system/ioc_container.cpp similarity index 100% rename from engine/code/system/ioc_container.cpp rename to engine/runtime/system/ioc_container.cpp diff --git a/engine/code/system/ioc_container.hpp b/engine/runtime/system/ioc_container.hpp similarity index 100% rename from engine/code/system/ioc_container.hpp rename to engine/runtime/system/ioc_container.hpp diff --git a/engine/code/system/layer.cpp b/engine/runtime/system/layer.cpp similarity index 100% rename from engine/code/system/layer.cpp rename to engine/runtime/system/layer.cpp diff --git a/engine/code/system/layer.hpp b/engine/runtime/system/layer.hpp similarity index 100% rename from engine/code/system/layer.hpp rename to engine/runtime/system/layer.hpp diff --git a/engine/code/system/plugin.hpp b/engine/runtime/system/plugin.hpp similarity index 100% rename from engine/code/system/plugin.hpp rename to engine/runtime/system/plugin.hpp diff --git a/engine/code/system/plugin_manager.cpp b/engine/runtime/system/plugin_manager.cpp similarity index 100% rename from engine/code/system/plugin_manager.cpp rename to engine/runtime/system/plugin_manager.cpp diff --git a/engine/code/system/plugin_manager.hpp b/engine/runtime/system/plugin_manager.hpp similarity index 100% rename from engine/code/system/plugin_manager.hpp rename to engine/runtime/system/plugin_manager.hpp diff --git a/games/flappyowl/config/engine.cfg b/games/flappyowl/config/engine.cfg index 8eb887836..781bdaca4 100644 --- a/games/flappyowl/config/engine.cfg +++ b/games/flappyowl/config/engine.cfg @@ -17,8 +17,8 @@ width = 1280 height = 720 vsync = 1 exit = 1 -icon_default = "root://owl.png" -icon_small = "root://owl.png" +icon_default = "owl.png" +icon_small = "owl.png" [render] window = "primary" diff --git a/games/flappyowl/resources/scripts/owl.lua b/games/flappyowl/resources/scripts/owl.lua index 628934c5a..0b63d25fb 100644 --- a/games/flappyowl/resources/scripts/owl.lua +++ b/games/flappyowl/resources/scripts/owl.lua @@ -25,8 +25,8 @@ function Owl:on_scene_enter() self.feathers = self.parent:get("Particles2d") -- load and enable game action map for controls - wmoge.ActionManager.load_action_map("root://actions/actionmap_console.yml") - wmoge.ActionManager.load_action_map("root://actions/actionmap_game.yml") + wmoge.ActionManager.load_action_map("actions/actionmap_console.yml") + wmoge.ActionManager.load_action_map("actions/actionmap_game.yml") wmoge.ActionManager.enable_action_map(wmoge.StringId.new("console")) wmoge.ActionManager.enable_action_map(wmoge.StringId.new("game")) end diff --git a/template/config/game.cfg b/template/config/game.cfg index c74fa3865..d566fe1b2 100644 --- a/template/config/game.cfg +++ b/template/config/game.cfg @@ -7,5 +7,5 @@ width = 1280 height = 720 vsync = 1 exit = 1 -icon_default = "root://icons/wmoge-128.png" -icon_small = "root://icons/wmoge-64.png" \ No newline at end of file +icon_default = "icons/wmoge-128.png" +icon_small = "icons/wmoge-64.png" \ No newline at end of file diff --git a/template/main.cpp b/template/main.cpp index 8d0c15907..4b009b0a5 100644 --- a/template/main.cpp +++ b/template/main.cpp @@ -94,8 +94,8 @@ class TemplateApplication : public GameApplication { GameApplication::on_init(); - Engine::instance()->action_manager()->load("root://actions/actionmap_console.yml"); - Engine::instance()->action_manager()->load("root://actions/actionmap_camera_debug.yml"); + Engine::instance()->action_manager()->load("actions/actionmap_console.yml"); + Engine::instance()->action_manager()->load("actions/actionmap_camera_debug.yml"); Engine::instance()->action_manager()->activate(SID("console")); Engine::instance()->action_manager()->activate(SID("camera_debug"));