17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 05:20:52 +01:00

pch migration to modules [wip]

This commit is contained in:
maj00r
2026-09-09 20:35:26 +02:00
parent c3007e3237
commit 3f7960aad5
350 changed files with 5958 additions and 3059 deletions

View File

@@ -1,3 +1,12 @@
module;
#include "utilities/utilities_macros.h"
#include <cstdlib>
#include <filesystem>
#include <fstream>
module eu07.editor.editorsettings;
import eu07.utilities.logs;
import eu07.utilities.utilities;
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
@@ -7,14 +16,7 @@ obtain one at
http://mozilla.org/MPL/2.0/.
*/
#include "stdafx.h"
#include "editor/editorSettings.hpp"
#include "utilities/Logs.h"
#include "utilities/utilities.h"
#include <cstdlib>
#include <filesystem>
#include <fstream>
editorSettings EditorSettings;

View File

@@ -1,4 +1,8 @@
#pragma once
module;
export module eu07.editor.editorsettings;
export {
class editorSettings
{
@@ -24,3 +28,5 @@ private:
// global editor settings instance
extern editorSettings EditorSettings;
} // export

View File

@@ -1,3 +1,16 @@
module;
#include <string>
#include <vector>
#include "global_include/interfaces/ITexture_macros.h"
#include <glad/glad.h>
#include <algorithm>
#include <cmath>
module eu07.editor.editorterrain;
import eu07.simcore;
import eu07.simulation.simulation;
import eu07.rendering.renderer;
import eu07.model.vertex;
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
@@ -7,18 +20,8 @@ obtain one at
http://mozilla.org/MPL/2.0/.
*/
#include "stdafx.h"
#include "editor/editorTerrain.hpp"
#include "scene/scene.h"
#include "scene/scenenode.h"
#include "simulation/simulation.h"
#include "rendering/renderer.h"
#include "model/vertex.h"
#include <glad/glad.h>
#include <algorithm>
#include <cmath>
namespace
{

View File

@@ -6,19 +6,25 @@ distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
#pragma once
module;
#include <vector>
#include <string>
#include <functional>
#include <glm/glm.hpp>
#include "global_include/interfaces/ITexture_macros.h"
export module eu07.editor.editorterrain;
import eu07.simcore;
import eu07.model.vertex;
import eu07.glm;
import eu07.utilities.classes;
import eu07.global_include.interfaces.itexture;
import eu07.rendering.geometrybank;
export {
#include "utilities/Classes.h" // material_handle
#include "interfaces/ITexture.h" // null_handle
#include "rendering/geometrybank.h" // gfx::geometry_handle / geometrybank_handle
namespace scene { class basic_section; }
// Editor-owned, editable terrain patch.
//
@@ -111,3 +117,5 @@ class editor_terrain
bool m_dirty{false}; // edited since the last optimize (full-res, awaiting simplification)
bool m_modified{false}; // edited since load/save (for streaming persistence)
};
} // export

View File

@@ -1,3 +1,13 @@
module;
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <string>
module eu07.editor.editorterrainstreamer;
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
@@ -7,15 +17,7 @@ obtain one at
http://mozilla.org/MPL/2.0/.
*/
#include "stdafx.h"
#include "editor/editorTerrainStreamer.hpp"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <string>
// simulation-level streamer instance (see header)
terrain_streamer EditorTerrain;

View File

@@ -7,15 +7,8 @@ obtain one at
http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <map>
#include <memory>
#include <vector>
#include <string>
#include <glm/glm.hpp>
#include "editor/editorTerrain.hpp"
// Streams editable terrain chunks around the camera for an effectively unbounded world.
//
@@ -23,6 +16,17 @@ http://mozilla.org/MPL/2.0/.
// camera; chunks entering the radius are built, chunks leaving it are destroyed (the renderer's
// geometry GC reclaims their GPU memory). Heights are flat + a gentle procedural roll so streaming
// is observable. Phase 2 will add 16-bit on-disk chunk paging, per-chunk flag bits and persistence.
module;
#include <cstdint>
#include <map>
#include <memory>
#include <vector>
#include <string>
export module eu07.editor.editorterrainstreamer;
import eu07.editor.editorterrain;
import eu07.glm;
export {
class terrain_streamer
{
public:
@@ -114,3 +118,5 @@ class terrain_streamer
// loader (so streamed terrain renders in every mode, including the driver). loaded from the
// `editorterrain` scenery directive and updated each frame with the active camera.
extern terrain_streamer EditorTerrain;
} // export