@@ -1038,7 +1038,7 @@ idCommonLocal::InitTool
10381038void idCommonLocal::InitTool ( const toolFlag_t tool, const idDict *dict ) {
10391039#ifndef IMGUI_DISABLE
10401040 if ( tool & EDITOR_SOUND ) {
1041- // SoundEditorInit( dict );
1041+ ImGuiTools:: SoundEditorInit ( dict );
10421042 } else if ( tool & EDITOR_LIGHT ) {
10431043 ImGuiTools::LightEditorInit ( dict );
10441044 } else if ( tool & EDITOR_PARTICLE ) {
@@ -1053,18 +1053,6 @@ void idCommonLocal::InitTool( const toolFlag_t tool, const idDict *dict ) {
10531053 ImGuiTools::DeclBrowserInit ( dict );
10541054 }
10551055#endif
1056-
1057- #ifdef ID_ALLOW_TOOLS
1058- if ( tool & EDITOR_SOUND ) {
1059- SoundEditorInit ( dict );
1060- } else if ( tool & EDITOR_LIGHT ) {
1061- LightEditorInit ( dict );
1062- } else if ( tool & EDITOR_PARTICLE ) {
1063- ParticleEditorInit ( dict );
1064- } else if ( tool & EDITOR_AF ) {
1065- AFEditorInit ( dict );
1066- }
1067- #endif
10681056}
10691057
10701058/*
@@ -1298,11 +1286,8 @@ static void Com_EditLights_f( const idCmdArgs &args ) {
12981286#ifndef IMGUI_DISABLE
12991287 D3::ImGuiHooks::ShowInfoOverlay ( " Shoot a light to open it in the Light Editor" );
13001288 cvarSystem->SetCVarInteger ( " g_editEntityMode" , 1 );
1301- #elif defined(ID_ALLOW_TOOLS)
1302- LightEditorInit ( NULL );
1303- cvarSystem->SetCVarInteger ( " g_editEntityMode" , 1 );
13041289#else
1305- common->Warning ( " Editors not available because dhewm3 was built without ImGui or MFC Tools" );
1290+ common->Warning ( " Editors not available because the engine was built without ImGui Tools" );
13061291#endif
13071292}
13081293
@@ -1315,10 +1300,8 @@ Com_EditPDAs_f
13151300static void Com_EditPDAs_f( const idCmdArgs &args ) {
13161301#ifndef IMGUI_DISABLE
13171302 ImGuiTools::PDAEditorInit( NULL );
1318- #elif defined(ID_ALLOW_TOOLS)
1319- PDAEditorInit( NULL );
13201303#else
1321- common->Warning( "Editors not available because dhewm3 was built without ImGui or MFC Tools" );
1304+ common->Warning( "Editors not available because the engine was built without ImGui Tools" );
13221305#endif
13231306}
13241307*/
@@ -1329,13 +1312,11 @@ Com_EditAFs_f
13291312==================
13301313*/
13311314static void Com_EditAFs_f ( const idCmdArgs &args ) {
1332- // TODO: cvarSystem->SetCVarInteger( "g_editEntityMode", 3 ); ?
13331315#ifndef IMGUI_DISABLE
13341316 ImGuiTools::AfEditorInit ();
1335- #elif defined(ID_ALLOW_TOOLS)
1336- AFEditorInit ( NULL );
1317+ cvarSystem->SetCVarInteger ( " g_editEntityMode" , 3 );
13371318#else
1338- common->Warning ( " Editors not available because dhewm3 was built without ImGui or MFC Tools" );
1319+ common->Warning ( " Editors not available because the engine was built without ImGui Tools" );
13391320#endif
13401321}
13411322
@@ -1347,10 +1328,8 @@ Com_EditParticles_f
13471328static void Com_EditParticles_f (const idCmdArgs& args) {
13481329#ifndef IMGUI_DISABLE
13491330 ImGuiTools::ParticleEditorInit ( NULL );
1350- #elif defined(ID_ALLOW_TOOLS)
1351- ParticleEditorInit (NULL );
13521331#else
1353- common->Warning ( " Editors not available because dhewm3 was built without ImGui or MFC Tools" );
1332+ common->Warning ( " Editors not available because the engine was built without ImGui Tools" );
13541333#endif
13551334}
13561335
@@ -1362,10 +1341,8 @@ Com_EditDecls_f
13621341static void Com_EditDecls_f ( const idCmdArgs &args ) {
13631342#ifndef IMGUI_DISABLE
13641343 ImGuiTools::DeclBrowserInit ( NULL );
1365- #elif defined(ID_ALLOW_TOOLS)
1366- DeclBrowserInit ( NULL );
13671344#else
1368- common->Warning (" Editors not available because dhewm3 was built without ImGui or MFC Tools" );
1345+ common->Warning (" Editors not available because the engine was built without ImGui Tools" );
13691346#endif
13701347}
13711348
@@ -1377,10 +1354,8 @@ Com_EditScripts_f
13771354static void Com_EditScripts_f ( const idCmdArgs &args ) {
13781355#ifndef IMGUI_DISABLE
13791356 ImGuiTools::ScriptEditorInit ( NULL );
1380- #elif defined(ID_ALLOW_TOOLS)
1381- ScriptEditorInit ( NULL );
13821357#else
1383- common->Warning (" Editors not available because dhewm3 was built without ImGui or MFC Tools" );
1358+ common->Warning (" Editors not available because the engine was built without ImGui Tools" );
13841359#endif
13851360}
13861361
@@ -1401,20 +1376,20 @@ static void Com_MaterialEditor_f( const idCmdArgs &args ) {
14011376#endif
14021377}
14031378
1404-
1405- #ifdef ID_ALLOW_TOOLS
14061379/*
14071380==================
14081381Com_EditSounds_f
14091382==================
14101383*/
14111384static void Com_EditSounds_f ( const idCmdArgs &args ) {
1412- SoundEditorInit ( NULL );
1385+ #ifndef IMGUI_DISABLE
1386+ ImGuiTools::SoundEditorInit ( NULL );
14131387 cvarSystem->SetCVarInteger ( " g_editEntityMode" , 2 );
1388+ #else
1389+ common->Warning ( " Editors not available because the engine was built without ImGui Tools" );
1390+ #endif
14141391}
14151392
1416- #endif // ID_ALLOW_TOOLS
1417-
14181393/*
14191394==================
14201395Com_Error_f
@@ -2452,20 +2427,22 @@ void idCommonLocal::InitCommands( void ) {
24522427 cmdSystem->AddCommand ( " MatbuildDir" , MatBuildDir_f, CMD_FL_TOOL, " builds interaction materials for a given directory." , idCmdSystem::ArgCompletion_MapName );
24532428#endif
24542429
2430+ #ifdef ID_ALLOW_TOOLS
24552431 // editors
24562432 cmdSystem->AddCommand ( " editLights" , Com_EditLights_f, CMD_FL_TOOL, " launches the in-game Light Editor" );
2433+ cmdSystem->AddCommand ( " editSounds" , Com_EditSounds_f, CMD_FL_TOOL, " launches the in-game Sound Editor" );
24572434 // cmdSystem->AddCommand( "editPDAs", Com_EditPDAs_f, CMD_FL_TOOL, "launches the in-game PDA Editor" );
24582435 cmdSystem->AddCommand ( " editAFs" , Com_EditAFs_f, CMD_FL_TOOL, " launches the in-game Articulated Figure Editor" );
24592436 cmdSystem->AddCommand ( " editDecls" , Com_EditDecls_f, CMD_FL_TOOL, " launches the in-game Declaration Editor" );
24602437 cmdSystem->AddCommand ( " editParticles" , Com_EditParticles_f, CMD_FL_TOOL, " launches the in-game Particle Editor" );
24612438 cmdSystem->AddCommand ( " editScripts" , Com_EditScripts_f, CMD_FL_TOOL, " launches the in-game Script Editor" );
24622439 // BSM Nerve: Add support for the material editor
24632440 cmdSystem->AddCommand ( " materialEditor" , Com_MaterialEditor_f, CMD_FL_TOOL, " launches the Material Editor" );
2464- #ifdef ID_ALLOW_TOOLS
2441+ #ifdef _WIN32
24652442 cmdSystem->AddCommand ( " editor" , Com_Editor_f, CMD_FL_TOOL, " launches the level editor Radiant" );
2466- cmdSystem->AddCommand ( " editSounds" , Com_EditSounds_f, CMD_FL_TOOL, " launches the in-game Sound Editor" );
24672443 cmdSystem->AddCommand ( " editGUIs" , Com_EditGUIs_f, CMD_FL_TOOL, " launches the GUI Editor" );
24682444 cmdSystem->AddCommand ( " debugger" , Com_ScriptDebugger_f, CMD_FL_TOOL, " launches the Script Debugger" );
2445+ #endif
24692446#endif
24702447
24712448 cmdSystem->AddCommand ( " printMemInfo" , PrintMemInfo_f, CMD_FL_SYSTEM, " prints memory debugging data" );
0 commit comments