Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit 3986a13

Browse files
committed
progress
1 parent 6d240d7 commit 3986a13

File tree

10 files changed

+33
-11
lines changed

10 files changed

+33
-11
lines changed

Magma/src/Editor/Editor/AssetManager.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ EditorAssetManager::EditorAssetManager() {
224224
}
225225

226226
EditorAssetManager::~EditorAssetManager() {
227-
s_WatcherIDs.ForEach([](auto& id) { s_FileWatcher->removeWatch(id); });
228-
s_WatcherIDs.Clear();
227+
Clear();
229228
delete s_Listener;
230229
delete s_FileWatcher;
231230
}
@@ -357,6 +356,15 @@ std::string EditorAssetManager::GetPath(UUID id) const {
357356
return m_Paths.at(id);
358357
}
359358

359+
void EditorAssetManager::Clear() {
360+
AssetManager::Clear();
361+
m_Path = "";
362+
m_Paths.clear();
363+
364+
s_WatcherIDs.ForEach([](auto& id) { s_FileWatcher->removeWatch(id); });
365+
s_WatcherIDs.Clear();
366+
}
367+
360368
void EditorAssetManager::Load(const std::string& path) {
361369
auto rootPath = fs::path(path) / "Asset";
362370
m_Path = (rootPath / ".magma.assetpk").string();

Magma/src/Editor/Editor/AssetManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class EditorAssetManager : public AssetManager {
2626

2727
const auto& GetRegistry() const { return m_AssetRegistry; }
2828

29+
void Clear() override;
2930
void Load(const std::string& path);
3031
void Save();
3132
void RuntimeSave(const std::string& exportPath);

Magma/src/Editor/Editor/Editor.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ void Editor::Open() {
6060
ScriptEngine::Init();
6161

6262
Lava::ScriptGlue::RegisterInterface();
63+
m_App = CreateRef<Lava::App>();
6364

6465
Application::PushDir();
6566
m_WelcomeImage.Content =
@@ -69,7 +70,6 @@ void Editor::Open() {
6970

7071
void Editor::Close() {
7172
CloseProject();
72-
7373
m_App.reset();
7474

7575
ScriptEngine::Shutdown();
@@ -78,8 +78,6 @@ void Editor::Close() {
7878
}
7979

8080
void Editor::Load(const CommandLineArgs& args) {
81-
m_App = CreateRef<Lava::App>();
82-
8381
if(args["--project"]) {
8482
NewProject(args["--project"]);
8583

Magma/src/Editor/Editor/EditorApp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ EditorApp::EditorApp(const CommandLineArgs& args)
9191
io.FontDefault =
9292
io.Fonts->AddFontFromFileTTF(
9393
"Magma/assets/fonts/JetBrainsMono-Regular.ttf", fontSize);
94+
io.IniFilename = nullptr;
9495

9596
Application::PopDir();
9697

Magma/src/Magma/Core/AssetManager.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,19 @@ class AssetManager : public VolcaniCore::Derivable<AssetManager> {
140140
return { };
141141
}
142142

143-
void Clear() {
143+
virtual void Clear() {
144144
m_AssetRegistry.clear();
145145
m_References.clear();
146+
m_NamedAssets.clear();
146147

147148
m_MeshAssets.clear();
148149
m_TextureAssets.clear();
149150
m_CubemapAssets.clear();
150151
m_ShaderAssets.clear();
152+
// m_FontAssets.clear();
151153
m_AudioAssets.clear();
152154
m_ScriptAssets.clear();
155+
m_MaterialAssets.clear();
153156
}
154157

155158
protected:

TestProj/Editor/layout.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66412,6 +66412,18 @@ Column 0 Sort=0v
6641266412
RefScale=15
6641366413
Column 0 Sort=0v
6641466414

66415+
[Table][0xAAC6A9CA,4]
66416+
RefScale=15
66417+
Column 0 Sort=0v
66418+
66419+
[Table][0x02360320,4]
66420+
RefScale=15
66421+
Column 0 Sort=0v
66422+
66423+
[Table][0xE56A46E4,4]
66424+
RefScale=15
66425+
Column 0 Sort=0v
66426+
6641566427
[Docking][Data]
6641666428
DockSpace ID=0xF15DEC6E Window=0x41896AB8 Pos=0,67 Size=1600,833 Split=X Selected=0xBDDC88E0
6641766429
DockNode ID=0x00000001 Parent=0xF15DEC6E SizeRef=354,832 Split=Y Selected=0x2E9237F7

VolcaniCore/.builddeps/glfw.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ project "glfw"
2727
}
2828

2929
defines {
30-
"GLFW_USE_HYBRID_HPG"
30+
"_GLFW_USE_HYBRID_HPG"
3131
}
3232

3333
filter "system:windows"

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Home
33
layout: home
44
nav_order: 1
5-
description: "Just the Docs is a responsive Jekyll theme with built-in search that is easily customizable and hosted on GitHub Pages."
5+
description: "The VolcanicEngine Documentation"
66
permalink: /
77
---
88

imgui.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[Window][DockSpaceWindow]
2-
Pos=0,0
32
Size=1600,877
43
Collapsed=0
54

@@ -66413,7 +66412,7 @@ RefScale=15
6641366412
Column 0 Sort=0v
6641466413

6641566414
[Docking][Data]
66416-
DockSpace ID=0xF15DEC6E Window=0x41896AB8 Pos=0,44 Size=1600,856 Split=X Selected=0xBDDC88E0
66415+
DockSpace ID=0xF15DEC6E Pos=0,44 Size=1600,856 Split=X Selected=0xBDDC88E0
6641766416
DockNode ID=0x00000001 Parent=0xF15DEC6E SizeRef=354,832 Split=Y Selected=0x2E9237F7
6641866417
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=218,525 Selected=0x2E9237F7
6641966418
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=218,486 Selected=0xF4B38336

scripts/Unix/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
cd build/gmake2/
4-
make -f Makefile
4+
mingw32-make.exe -f Makefile

0 commit comments

Comments
 (0)