-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added a central message box for the editor.
* Added a central place for error messages. * Added the ability to read back texture data to the CPU. * Added multi-select. * Added the ability to override the palette for an entire selection or or reset to default. * Added the ability to export selected assets. * Stubbed out the editor project system.
- Loading branch information
Showing
13 changed files
with
585 additions
and
14 deletions.
There are no files selected for viewing
343 changes: 332 additions & 11 deletions
343
TheForceEngine/TFE_Editor/AssetBrowser/assetBrowser.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "editorProject.h" | ||
#include <TFE_Editor/editorConfig.h> | ||
#include <TFE_Editor/editor.h> | ||
#include <TFE_RenderBackend/renderBackend.h> | ||
#include <TFE_System/system.h> | ||
#include <TFE_System/parser.h> | ||
#include <TFE_FileSystem/filestream.h> | ||
#include <TFE_FileSystem/fileutil.h> | ||
#include <TFE_FileSystem/paths.h> | ||
#include <TFE_Archive/archive.h> | ||
#include <TFE_Ui/ui.h> | ||
|
||
#include <TFE_Ui/imGUI/imgui.h> | ||
|
||
namespace TFE_Editor | ||
{ | ||
static Project* s_curProject = nullptr; | ||
|
||
Project* getProject() | ||
{ | ||
return s_curProject; | ||
} | ||
|
||
void closeProject() | ||
{ | ||
// TODO: Clear project specific editor data. | ||
s_curProject = nullptr; | ||
} | ||
|
||
void saveProject() | ||
{ | ||
} | ||
|
||
bool ui_loadProject() | ||
{ | ||
return false; | ||
} | ||
|
||
void ui_newProject() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
////////////////////////////////////////////////////////////////////// | ||
// The Force Engine Editor | ||
// A system built to view and edit Dark Forces data files. | ||
// The viewing aspect needs to be put in place at the beginning | ||
// in order to properly test elements in isolation without having | ||
// to "play" the game as intended. | ||
////////////////////////////////////////////////////////////////////// | ||
#include <TFE_System/types.h> | ||
#include <TFE_FileSystem/paths.h> | ||
#include <TFE_Game/igame.h> | ||
#include <string> | ||
|
||
namespace TFE_Editor | ||
{ | ||
enum ProjectType | ||
{ | ||
PROJ_RESOURCE_ONLY = 0, | ||
PROJ_LEVELS, | ||
PROJ_COUNT | ||
}; | ||
|
||
enum FeatureSet | ||
{ | ||
FSET_VANILLA = 0, | ||
FSET_TFE, | ||
FSET_COUNT | ||
}; | ||
|
||
struct Project | ||
{ | ||
std::string name; | ||
std::string path; | ||
std::string desc; | ||
std::string authors; | ||
|
||
ProjectType type; | ||
GameID game; | ||
FeatureSet featureSet; | ||
}; | ||
|
||
Project* getProject(); | ||
|
||
bool ui_loadProject(); | ||
void ui_closeProject(); | ||
void ui_newProject(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "errorMessages.h" | ||
#include <assert.h> | ||
|
||
namespace TFE_Editor | ||
{ | ||
static const char* c_errorMsg[] = | ||
{ | ||
// ERROR_INVALID_EXPORT_PATH | ||
"Export Path '%s' is invalid, cannot export assets!\n" | ||
"Please go to the 'Editor' menu, select 'Editor Config',\n" | ||
"and setup a valid 'Export Path'.", | ||
}; | ||
|
||
const char* getErrorMsg(EditorError err) | ||
{ | ||
assert(err >= 0 && err < ERROR_COUNT); | ||
return c_errorMsg[err]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
////////////////////////////////////////////////////////////////////// | ||
// The Force Engine Editor | ||
// A system built to view and edit Dark Forces data files. | ||
// The viewing aspect needs to be put in place at the beginning | ||
// in order to properly test elements in isolation without having | ||
// to "play" the game as intended. | ||
////////////////////////////////////////////////////////////////////// | ||
#include <TFE_System/types.h> | ||
#include <vector> | ||
|
||
namespace TFE_Editor | ||
{ | ||
enum EditorError | ||
{ | ||
ERROR_INVALID_EXPORT_PATH = 0, | ||
ERROR_COUNT, | ||
}; | ||
|
||
const char* getErrorMsg(EditorError err); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const char c_gitVersion[] = R"( | ||
v1.09.530-11-gd9a077bd | ||
v1.09.530-13-gd029fe2b | ||
)"; |