mirror of https://github.com/AxioDL/metaforce.git
Changes to support hecl-gui
This commit is contained in:
parent
74f2d0c10e
commit
a1c5677413
|
@ -130,6 +130,8 @@ if(USE_LD_GOLD AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(HECL_DLPACKAGE ${URDE_DLPACKAGE})
|
||||||
|
|
||||||
set(BOO_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hecl/extern/boo/include)
|
set(BOO_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hecl/extern/boo/include)
|
||||||
set(HECL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hecl/include
|
set(HECL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hecl/include
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hecl/blender)
|
${CMAKE_CURRENT_SOURCE_DIR}/hecl/blender)
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
using YAMLNode = athena::io::YAMLNode;
|
using YAMLNode = athena::io::YAMLNode;
|
||||||
|
|
||||||
|
extern hecl::SystemString ExeDir;
|
||||||
|
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -227,6 +229,19 @@ void ViewManager::init(boo::IApplication* app)
|
||||||
else if (arg == _S("--no-sound"))
|
else if (arg == _S("--no-sound"))
|
||||||
m_voiceEngine->setVolume(0.f);
|
m_voiceEngine->setVolume(0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_deferedProject.empty())
|
||||||
|
{
|
||||||
|
/* Default behavior - search upwards for packaged project containing the program */
|
||||||
|
if (hecl::ProjectRootPath root = hecl::SearchForProject(ExeDir))
|
||||||
|
{
|
||||||
|
hecl::SystemString rootPath(root.getAbsolutePath());
|
||||||
|
hecl::Sstat theStat;
|
||||||
|
if (!hecl::Stat((rootPath + _S("/out/MP1/!original_ids.upak")).c_str(), &theStat) &&
|
||||||
|
S_ISREG(theStat.st_mode))
|
||||||
|
m_deferedProject = rootPath + _S("/out");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewManager::proc()
|
bool ViewManager::proc()
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 3005d50ead7e443eb82297aad49aeb1b47ea0c47
|
Subproject commit 1063d4e05482333fe80356b9ca4b8ebe71f3a71f
|
2
hecl-gui
2
hecl-gui
|
@ -1 +1 @@
|
||||||
Subproject commit dd0ce35633bd96ae4b4c9910b93185f6a841b310
|
Subproject commit 7935d308301d95baa36ae65c3bf876d46809cecc
|
|
@ -24,5 +24,9 @@ endif()
|
||||||
add_executable(visigen ${PLAT_SRCS}
|
add_executable(visigen ${PLAT_SRCS}
|
||||||
VISIRenderer.cpp VISIRenderer.hpp
|
VISIRenderer.cpp VISIRenderer.hpp
|
||||||
VISIBuilder.cpp VISIBuilder.hpp)
|
VISIBuilder.cpp VISIBuilder.hpp)
|
||||||
target_link_libraries(visigen logvisor athena-core athena-libyaml zeus glew xxhash ${ZLIB_LIBRARIES} ${LZO_LIB} ${BOO_SYS_LIBS})
|
|
||||||
|
set_target_properties(visigen PROPERTIES COMPILE_DEFINITIONS URDE_DLPACKAGE="${URDE_DLPACKAGE}")
|
||||||
|
|
||||||
|
target_link_libraries(visigen logvisor athena-core athena-libyaml zeus glew
|
||||||
|
xxhash ${ZLIB_LIBRARIES} ${LZO_LIB} ${BOO_SYS_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -114,6 +114,12 @@ static void AthenaExc(athena::error::Level level, const char* file,
|
||||||
|
|
||||||
int main(int argc, const char** argv)
|
int main(int argc, const char** argv)
|
||||||
{
|
{
|
||||||
|
if (argc > 1 && !strcmp(argv[1], "--dlpackage"))
|
||||||
|
{
|
||||||
|
printf("%s\n", URDE_DLPACKAGE);
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
logvisor::RegisterStandardExceptions();
|
logvisor::RegisterStandardExceptions();
|
||||||
logvisor::RegisterConsoleLogger();
|
logvisor::RegisterConsoleLogger();
|
||||||
atSetExceptionHandler(AthenaExc);
|
atSetExceptionHandler(AthenaExc);
|
||||||
|
|
|
@ -50,6 +50,12 @@ static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
|
|
||||||
int wmain(int argc, const hecl::SystemChar** argv)
|
int wmain(int argc, const hecl::SystemChar** argv)
|
||||||
{
|
{
|
||||||
|
if (argc > 1 && !_wcscmp(argv[1], L"--dlpackage"))
|
||||||
|
{
|
||||||
|
printf("%s\n", URDE_DLPACKAGE);
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
logvisor::RegisterStandardExceptions();
|
logvisor::RegisterStandardExceptions();
|
||||||
logvisor::RegisterConsoleLogger();
|
logvisor::RegisterConsoleLogger();
|
||||||
atSetExceptionHandler(AthenaExc);
|
atSetExceptionHandler(AthenaExc);
|
||||||
|
|
|
@ -104,6 +104,12 @@ static void _sigint(int) {}
|
||||||
|
|
||||||
int main(int argc, const char** argv)
|
int main(int argc, const char** argv)
|
||||||
{
|
{
|
||||||
|
if (argc > 1 && !strcmp(argv[1], "--dlpackage"))
|
||||||
|
{
|
||||||
|
printf("%s\n", URDE_DLPACKAGE);
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
/* Program is portable to all locales */
|
/* Program is portable to all locales */
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue