Update HECL

Rename Editor
This commit is contained in:
Phillip Stephens 2016-01-05 01:53:16 -08:00
parent 1f79f604af
commit f3f4b674a7
16 changed files with 62 additions and 62 deletions

View File

@ -15,10 +15,10 @@ else()
endif() endif()
if(RUDE_BINARY_CONFIGS) if(RUDE_BINARY_CONFIGS)
add_definitions("-DRUDE_BINARY_CONFIGS=1") add_definitions("-DURDE_BINARY_CONFIGS=1")
endif() endif()
add_executable(rude WIN32 add_executable(urde WIN32
main.cpp main.cpp
Space.hpp Space.cpp atdna_Space.cpp Space.hpp Space.cpp atdna_Space.cpp
SplashScreen.hpp SplashScreen.cpp SplashScreen.hpp SplashScreen.cpp
@ -26,8 +26,8 @@ add_executable(rude WIN32
ProjectManager.hpp ProjectManager.cpp ProjectManager.hpp ProjectManager.cpp
ViewManager.hpp ViewManager.cpp) ViewManager.hpp ViewManager.cpp)
target_link_libraries(rude target_link_libraries(urde
RudeLocales UrdeLocales
RuntimeCommonCharacter RuntimeCommonCharacter
RuntimeCommonInput RuntimeCommonInput
RuntimeCommon RuntimeCommon

View File

@ -2,9 +2,9 @@
#include "ViewManager.hpp" #include "ViewManager.hpp"
#include "../DataSpecRegistry.hpp" #include "../DataSpecRegistry.hpp"
namespace RUDE namespace URDE
{ {
static LogVisor::LogModule Log("RUDE::ProjectManager"); static LogVisor::LogModule Log("URDE::ProjectManager");
bool ProjectManager::m_registeredSpecs = false; bool ProjectManager::m_registeredSpecs = false;
ProjectManager::ProjectManager(ViewManager &vm) ProjectManager::ProjectManager(ViewManager &vm)
@ -59,24 +59,24 @@ bool ProjectManager::openProject(const HECL::SystemString& path)
return false; return false;
} }
#ifdef RUDE_BINARY_CONFIGS #ifdef URDE_BINARY_CONFIGS
HECL::ProjectPath rudeSpacesPath(*m_proj, _S(".hecl/rude_spaces.bin")); HECL::ProjectPath urdeSpacesPath(*m_proj, _S(".hecl/urde_spaces.bin"));
Athena::io::FileReader r(rudeSpacesPath.getAbsolutePath(), 32 * 1024, false); Athena::io::FileReader r(urdeSpacesPath.getAbsolutePath(), 32 * 1024, false);
if (r.hasError()) if (r.hasError())
goto makeDefault; goto makeDefault;
m_vm.SetupEditorView(r); m_vm.SetupEditorView(r);
#else #else
HECL::ProjectPath rudeSpacesPath(*m_proj, _S(".hecl/rude_spaces.yaml")); HECL::ProjectPath urdeSpacesPath(*m_proj, _S(".hecl/urde_spaces.yaml"));
FILE* fp = HECL::Fopen(rudeSpacesPath.getAbsolutePath().c_str(), _S("r")); FILE* fp = HECL::Fopen(urdeSpacesPath.getAbsolutePath().c_str(), _S("r"));
Athena::io::YAMLDocReader r; Athena::io::YAMLDocReader r;
if (!fp) if (!fp)
goto makeDefault; goto makeDefault;
yaml_parser_set_input_file(r.getParser(), fp); yaml_parser_set_input_file(r.getParser(), fp);
if (!r.ValidateClassType(r.getParser(), "RudeSpacesState")) if (!r.ValidateClassType(r.getParser(), "UrdeSpacesState"))
{ {
fclose(fp); fclose(fp);
goto makeDefault; goto makeDefault;
@ -121,8 +121,8 @@ bool ProjectManager::saveProject()
if (!m_proj) if (!m_proj)
return false; return false;
#ifdef RUDE_BINARY_CONFIGS #ifdef urde_BINARY_CONFIGS
HECL::ProjectPath oldSpacesPath(*m_proj, _S(".hecl/~rude_spaces.bin")); HECL::ProjectPath oldSpacesPath(*m_proj, _S(".hecl/~urde_spaces.bin"));
Athena::io::FileWriter w(oldSpacesPath.getAbsolutePath(), true, false); Athena::io::FileWriter w(oldSpacesPath.getAbsolutePath(), true, false);
if (w.hasError()) if (w.hasError())
return false; return false;
@ -130,15 +130,15 @@ bool ProjectManager::saveProject()
m_vm.SaveEditorView(w); m_vm.SaveEditorView(w);
w.close(); w.close();
HECL::ProjectPath newSpacesPath(*m_proj, _S(".hecl/rude_spaces.bin")); HECL::ProjectPath newSpacesPath(*m_proj, _S(".hecl/urde_spaces.bin"));
#else #else
HECL::ProjectPath oldSpacesPath(*m_proj, _S(".hecl/~rude_spaces.yaml")); HECL::ProjectPath oldSpacesPath(*m_proj, _S(".hecl/~urde_spaces.yaml"));
FILE* fp = HECL::Fopen(oldSpacesPath.getAbsolutePath().c_str(), _S("w")); FILE* fp = HECL::Fopen(oldSpacesPath.getAbsolutePath().c_str(), _S("w"));
if (!fp) if (!fp)
return false; return false;
Athena::io::YAMLDocWriter w("RudeSpacesState"); Athena::io::YAMLDocWriter w("UrdeSpacesState");
yaml_emitter_set_output_file(w.getEmitter(), fp); yaml_emitter_set_output_file(w.getEmitter(), fp);
if (!w.open()) if (!w.open())
{ {
@ -156,7 +156,7 @@ bool ProjectManager::saveProject()
w.close(); w.close();
fclose(fp); fclose(fp);
HECL::ProjectPath newSpacesPath(*m_proj, _S(".hecl/rude_spaces.yaml")); HECL::ProjectPath newSpacesPath(*m_proj, _S(".hecl/urde_spaces.yaml"));
#endif #endif

View File

@ -1,14 +1,14 @@
#ifndef RUDE_PROJECT_MANAGER_HPP #ifndef URDE_PROJECT_MANAGER_HPP
#define RUDE_PROJECT_MANAGER_HPP #define URDE_PROJECT_MANAGER_HPP
#include <HECL/Database.hpp> #include <HECL/Database.hpp>
#include <Athena/DNAYaml.hpp> #include <Athena/DNAYaml.hpp>
namespace RUDE namespace URDE
{ {
class ViewManager; class ViewManager;
#ifdef RUDE_BINARY_CONFIGS #ifdef URDE_BINARY_CONFIGS
using ConfigReader = Athena::io::IStreamReader; using ConfigReader = Athena::io::IStreamReader;
using ConfigWriter = Athena::io::IStreamWriter; using ConfigWriter = Athena::io::IStreamWriter;
#else #else
@ -35,4 +35,4 @@ public:
} }
#endif // RUDE_PROJECT_MANAGER_HPP #endif // URDE_PROJECT_MANAGER_HPP

View File

@ -1,6 +1,6 @@
#include "ResourceOutliner.hpp" #include "ResourceOutliner.hpp"
namespace RUDE namespace URDE
{ {
} }

View File

@ -1,10 +1,10 @@
#ifndef RUDE_RESOURCE_OUTLINER_HPP #ifndef URDE_RESOURCE_OUTLINER_HPP
#define RUDE_RESOURCE_OUTLINER_HPP #define URDE_RESOURCE_OUTLINER_HPP
#include "Space.hpp" #include "Space.hpp"
#include "ViewManager.hpp" #include "ViewManager.hpp"
namespace RUDE namespace URDE
{ {
class ResourceOutliner : public Space class ResourceOutliner : public Space
@ -44,4 +44,4 @@ public:
} }
#endif // RUDE_RESOURCE_OUTLINER_HPP #endif // URDE_RESOURCE_OUTLINER_HPP

View File

@ -2,9 +2,9 @@
#include "ViewManager.hpp" #include "ViewManager.hpp"
#include "ResourceOutliner.hpp" #include "ResourceOutliner.hpp"
namespace RUDE namespace URDE
{ {
static LogVisor::LogModule Log("RUDE::Space"); static LogVisor::LogModule Log("URDE::Space");
Specter::View* Space::buildSpaceView(Specter::ViewResources& res) Specter::View* Space::buildSpaceView(Specter::ViewResources& res)
{ {
@ -50,7 +50,7 @@ static Space* BuildNewSpace(ViewManager& vm, Space::Class cls, Reader& r)
Space* Space::NewSpaceFromConfigStream(ViewManager& vm, ConfigReader& r) Space* Space::NewSpaceFromConfigStream(ViewManager& vm, ConfigReader& r)
{ {
#ifdef RUDE_BINARY_CONFIGS #ifdef URDE_BINARY_CONFIGS
Class cls = Class(r.readUint32Big()); Class cls = Class(r.readUint32Big());
return BuildNewSpace(vm, cls, r); return BuildNewSpace(vm, cls, r);
#else #else

View File

@ -1,5 +1,5 @@
#ifndef RUDE_SPACE_HPP #ifndef URDE_SPACE_HPP
#define RUDE_SPACE_HPP #define URDE_SPACE_HPP
#include <Athena/DNAYaml.hpp> #include <Athena/DNAYaml.hpp>
#include <Specter/Specter.hpp> #include <Specter/Specter.hpp>
@ -12,7 +12,7 @@ class SplitView;
class ViewResources; class ViewResources;
class Toolbar; class Toolbar;
} }
namespace RUDE namespace URDE
{ {
class ViewManager; class ViewManager;
@ -84,7 +84,7 @@ public:
: SplitSpace(vm) : SplitSpace(vm)
{ {
m_state.read(r); m_state.read(r);
#ifdef RUDE_BINARY_CONFIGS #ifdef URDE_BINARY_CONFIGS
m_slots[0].reset(NewSpaceFromConfigStream(vm, r)); m_slots[0].reset(NewSpaceFromConfigStream(vm, r));
m_slots[1].reset(NewSpaceFromConfigStream(vm, r)); m_slots[1].reset(NewSpaceFromConfigStream(vm, r));
#else #else
@ -180,4 +180,4 @@ public:
} }
#endif // RUDE_SPACE_HPP #endif // URDE_SPACE_HPP

View File

@ -1,7 +1,7 @@
#include "SplashScreen.hpp" #include "SplashScreen.hpp"
#include "version.h" #include "version.h"
namespace RUDE namespace URDE
{ {
#define SPLASH_WIDTH 555 #define SPLASH_WIDTH 555
@ -55,7 +55,7 @@ void SplashScreen::updateContentOpacity(float opacity)
m_title.reset(new Specter::TextView(res, *this, res.m_titleFont)); m_title.reset(new Specter::TextView(res, *this, res.m_titleFont));
Zeus::CColor clearColor = res.themeData().uiText(); Zeus::CColor clearColor = res.themeData().uiText();
clearColor[3] = 0.0; clearColor[3] = 0.0;
m_title->typesetGlyphs("RUDE", clearColor); m_title->typesetGlyphs("URDE", clearColor);
m_buildInfo.reset(new Specter::MultiLineTextView(res, *this, res.m_mainFont, Specter::TextView::Alignment::Right)); m_buildInfo.reset(new Specter::MultiLineTextView(res, *this, res.m_mainFont, Specter::TextView::Alignment::Right));
m_buildInfo->typesetGlyphs(m_buildInfoStr, clearColor); m_buildInfo->typesetGlyphs(m_buildInfoStr, clearColor);

View File

@ -1,5 +1,5 @@
#ifndef RUDE_SPLASH_SCREEN_HPP #ifndef URDE_SPLASH_SCREEN_HPP
#define RUDE_SPLASH_SCREEN_HPP #define URDE_SPLASH_SCREEN_HPP
#include <Specter/View.hpp> #include <Specter/View.hpp>
#include <Specter/ModalWindow.hpp> #include <Specter/ModalWindow.hpp>
@ -7,7 +7,7 @@
#include <Specter/FileBrowser.hpp> #include <Specter/FileBrowser.hpp>
#include "ViewManager.hpp" #include "ViewManager.hpp"
namespace RUDE namespace URDE
{ {
static LogVisor::LogModule Log("Specter::SplashScreen"); static LogVisor::LogModule Log("Specter::SplashScreen");
@ -130,4 +130,4 @@ public:
} }
#endif // RUDE_SPLASH_SCREEN_HPP #endif // URDE_SPLASH_SCREEN_HPP

View File

@ -7,10 +7,10 @@
using YAMLNode = Athena::io::YAMLNode; using YAMLNode = Athena::io::YAMLNode;
namespace RUDE namespace URDE
{ {
Specter::View* ViewManager::BuildSpaceViews(RUDE::Space* space) Specter::View* ViewManager::BuildSpaceViews(URDE::Space* space)
{ {
m_rootSpaceView = space->buildSpaceView(m_viewResources); m_rootSpaceView = space->buildSpaceView(m_viewResources);
return m_rootSpaceView; return m_rootSpaceView;
@ -72,7 +72,7 @@ void ViewManager::DismissSplash()
ViewManager::ViewManager(HECL::Runtime::FileStoreManager& fileMgr, HECL::CVarManager& cvarMgr) ViewManager::ViewManager(HECL::Runtime::FileStoreManager& fileMgr, HECL::CVarManager& cvarMgr)
: m_fileStoreManager(fileMgr), m_cvarManager(cvarMgr), m_projManager(*this), : m_fileStoreManager(fileMgr), m_cvarManager(cvarMgr), m_projManager(*this),
m_fontCache(fileMgr), m_translator(RUDE::SystemLocaleOrEnglish()) m_fontCache(fileMgr), m_translator(URDE::SystemLocaleOrEnglish())
{} {}
ViewManager::~ViewManager() {} ViewManager::~ViewManager() {}
@ -89,7 +89,7 @@ void ViewManager::pushRecentFile(const HECL::SystemString& path)
void ViewManager::init(boo::IApplication* app) void ViewManager::init(boo::IApplication* app)
{ {
m_mainWindow = std::unique_ptr<boo::IWindow>(app->newWindow(_S("RUDE"))); m_mainWindow = std::unique_ptr<boo::IWindow>(app->newWindow(_S("URDE")));
m_mainWindow->showWindow(); m_mainWindow->showWindow();
m_mainWindow->setWaitCursor(true); m_mainWindow->setWaitCursor(true);

View File

@ -1,11 +1,11 @@
#ifndef RUDE_VIEW_MANAGER_HPP #ifndef URDE_VIEW_MANAGER_HPP
#define RUDE_VIEW_MANAGER_HPP #define URDE_VIEW_MANAGER_HPP
#include <HECL/CVarManager.hpp> #include <HECL/CVarManager.hpp>
#include "ProjectManager.hpp" #include "ProjectManager.hpp"
#include "Space.hpp" #include "Space.hpp"
namespace RUDE namespace URDE
{ {
class SplashScreen; class SplashScreen;
@ -32,7 +32,7 @@ class ViewManager : public Specter::IViewManager
bool m_updatePf = false; bool m_updatePf = false;
float m_reqPf; float m_reqPf;
Specter::View* BuildSpaceViews(RUDE::Space* space); Specter::View* BuildSpaceViews(URDE::Space* space);
Specter::RootView* SetupRootView(); Specter::RootView* SetupRootView();
SplashScreen* SetupSplashView(); SplashScreen* SetupSplashView();
void SetupEditorView(); void SetupEditorView();
@ -72,4 +72,4 @@ public:
} }
#endif // RUDE_VIEW_MANAGER_HPP #endif // URDE_VIEW_MANAGER_HPP

View File

@ -1,7 +1,7 @@
bintoc(en_US.c en_US.yaml L_en_US) bintoc(en_US.c en_US.yaml L_en_US)
bintoc(en_GB.c en_GB.yaml L_en_GB) bintoc(en_GB.c en_GB.yaml L_en_GB)
bintoc(ja_JP.c ja_JP.yaml L_ja_JP) bintoc(ja_JP.c ja_JP.yaml L_ja_JP)
add_library(RudeLocales add_library(UrdeLocales
en_US.yaml en_US.c en_US.yaml en_US.c
en_GB.yaml en_GB.c en_GB.yaml en_GB.c
ja_JP.yaml ja_JP.c ja_JP.yaml ja_JP.c

View File

@ -12,7 +12,7 @@ extern "C" size_t L_en_GB_SZ;
extern "C" const uint8_t L_ja_JP[]; extern "C" const uint8_t L_ja_JP[];
extern "C" size_t L_ja_JP_SZ; extern "C" size_t L_ja_JP_SZ;
namespace RUDE namespace URDE
{ {
static const Specter::Locale Locales[] = static const Specter::Locale Locales[] =

View File

@ -1,9 +1,9 @@
#ifndef RUDE_LOCALE_HPP #ifndef URDE_LOCALE_HPP
#define RUDE_LOCALE_HPP #define URDE_LOCALE_HPP
#include <Specter/Translator.hpp> #include <Specter/Translator.hpp>
namespace RUDE namespace URDE
{ {
std::vector<std::pair<const std::string*, const std::string*>> ListLocales(); std::vector<std::pair<const std::string*, const std::string*>> ListLocales();
@ -12,4 +12,4 @@ const Specter::Locale* SystemLocaleOrEnglish();
} }
#endif // RUDE_LOCALE_HPP #endif // URDE_LOCALE_HPP

View File

@ -6,7 +6,7 @@
#include <functional> #include <functional>
#include "ViewManager.hpp" #include "ViewManager.hpp"
namespace RUDE namespace URDE
{ {
struct Application : boo::IApplicationCallback struct Application : boo::IApplicationCallback
{ {
@ -17,7 +17,7 @@ struct Application : boo::IApplicationCallback
bool m_running = true; bool m_running = true;
Application() : Application() :
m_fileMgr(_S("rude")), m_fileMgr(_S("urde")),
m_cvarManager(m_fileMgr), m_cvarManager(m_fileMgr),
m_viewManager(m_fileMgr, m_cvarManager) {} m_viewManager(m_fileMgr, m_cvarManager) {}
@ -52,9 +52,9 @@ int main(int argc, const boo::SystemChar** argv)
#endif #endif
{ {
LogVisor::RegisterConsoleLogger(); LogVisor::RegisterConsoleLogger();
RUDE::Application appCb; URDE::Application appCb;
int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto, int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto,
appCb, _S("rude"), _S("RUDE"), argc, argv, false); appCb, _S("urde"), _S("URDE"), argc, argv, false);
printf("IM DYING!!\n"); printf("IM DYING!!\n");
return ret; return ret;
} }

2
hecl

@ -1 +1 @@
Subproject commit 8c25ff6ab6428cb37977987b3e8f46d120d508c4 Subproject commit 56396769ec2f309e6931a65cd0727eaa1d0f4596