Added rbdmap -t or -nogui option because pdcurdes does not work with TB

This commit is contained in:
Robert Beckebans 2024-06-21 20:45:35 +02:00
parent c5e5cfeae7
commit caebeef0ca
4 changed files with 42 additions and 30 deletions

View file

@ -839,8 +839,6 @@ bool idAASBuild::Build( const idStr& fileName, const idAASSettings* settings )
return false;
}
common->DmapPacifierFilename( name, "Compiling AAS files" );
// check if this map has any entities that use this AAS file
if( !CheckForEntities( mapFile, entityClassNames ) )
{
@ -849,6 +847,10 @@ bool idAASBuild::Build( const idStr& fileName, const idAASSettings* settings )
return true;
}
name.SetFileExtension( aasSettings->fileExtension );
common->DmapPacifierFilename( name, "Compiling AAS" );
name.SetFileExtension( "map" );
// load map file brushes
brushList = AddBrushesForMapFile( mapFile, brushList );

View file

@ -159,7 +159,7 @@ bool ProcessModels()
common->DmapPacifierInfo( "Current entity : %s", entity->mapEntity->epairs.GetString( "name" ) );
}
//common->Printf( "############### entity %i ###############\n", dmapGlobals.entityNum );
common->VerbosePrintf( "############### entity %i ###############\n", dmapGlobals.entityNum );
// if we leaked, stop without any more processing
if( !ProcessModel( entity, ( bool )( dmapGlobals.entityNum == 0 ) ) )

View file

@ -351,16 +351,17 @@ static void ParseBrush( const idMapBrush* mapBrush, int primitiveNum )
// RB: we don't need this info if we are actually compiling maps in the original format
// we only load this for the engine in the case we want to convert it to the Valve 220 format
#if !defined( DMAP )
s->texSize = ms->GetTextureSize();
idImage* image = s->material->GetEditorImage();
if( image != NULL )
if( s->texValve220 )
{
s->texSize.x = image->GetUploadWidth();
s->texSize.y = image->GetUploadHeight();
s->texSize = ms->GetTextureSize();
idImage* image = s->material->GetEditorImage();
if( image != NULL )
{
s->texSize.x = image->GetUploadWidth();
s->texSize.y = image->GetUploadHeight();
}
}
#endif
// RB end
// remove any integral shift, which will help with grouping

View file

@ -1085,14 +1085,10 @@ int com_editors = 0;
==============================================================
*/
#if 0
void idCommonLocal::UpdateScreen( bool captureToImage, bool releaseMouse )
int Dmap_NoGui( int argc, char** argv )
{
}
commonLocal.com_refreshOnPrint = false;
int main( int argc, char** argv )
{
idLib::common = common;
idLib::cvarSystem = cvarSystem;
idLib::fileSystem = fileSystem;
@ -1116,6 +1112,9 @@ int main( int argc, char** argv )
i += 2;
}
else if( idStr::Icmp( argv[ i ], "-t" ) == 0 || idStr::Icmp( argv[ i ], "-nogui" ) == 0 )
{
}
else
{
args.AppendArg( argv[i] );
@ -1130,6 +1129,17 @@ int main( int argc, char** argv )
return 0;
}
#if 0
void idCommonLocal::UpdateScreen( bool captureToImage, bool releaseMouse )
{
}
int main( int argc, char** argv )
{
return Dmap_NoGui( argc, argv );
}
#elif 1
@ -1157,22 +1167,14 @@ void idCommonLocal::UpdateScreen( bool captureToImage, bool releaseMouse )
//idStr title = va( "RBDMAP version %s %s", ENGINE_VERSION, BUILD_STRING );
idStr title = va( "RBDMAP version %s %s %s %s", ENGINE_VERSION, BUILD_STRING, __DATE__, __TIME__ );
//std::string title = "RBDMAP " + UI::kContentStr[window.content] + ")##" + std::to_string( windowId );
ImGui::Begin( title.c_str(), nullptr,
ImGuiWindowFlags_NoCollapse |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoScrollbar );
//ImGui::BeginChild( "Current Log:", ImVec2( 0, 0 ), false, ImGuiWindowFlags_NoDecoration );
// Actually call in the regular Log helper (which will Begin() into the same window as we just did)
tuiLog.Draw( "Current Log:", &conOpen );
//ImGui::EndChild();
//ShowExampleAppConsole( &conOpen );
//ImTui::ShowDemoWindow( &demo );
@ -1190,8 +1192,6 @@ void idCommonLocal::UpdateScreen( bool captureToImage, bool releaseMouse )
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove );
//ImGui::Text( " API requests : %d / %d B (next update in %d s)", stateHN.nFetches, ( int ) stateHN.totalBytesDownloaded, stateHN.nextUpdate );
if( stateUI.progress < 1.0f )
{
ImGui::ProgressBar( stateUI.progress, ImVec2( 0.0f, 0.0f ) );
@ -1212,6 +1212,14 @@ void idCommonLocal::UpdateScreen( bool captureToImage, bool releaseMouse )
int main( int argc, char** argv )
{
for( int i = 0; i < argc; i++ )
{
if( idStr::Icmp( argv[ i ], "-t" ) == 0 || idStr::Icmp( argv[ i ], "-nogui" ) == 0 )
{
return Dmap_NoGui( argc, argv );
}
}
IMGUI_CHECKVERSION();
ImGui::CreateContext();
@ -1220,8 +1228,6 @@ int main( int argc, char** argv )
stateUI.ChangeColorScheme( false );
common->Printf( "Test log print\n" );
idLib::common = common;
idLib::cvarSystem = cvarSystem;
idLib::fileSystem = fileSystem;
@ -1245,6 +1251,9 @@ int main( int argc, char** argv )
i += 2;
}
else if( idStr::Icmp( argv[ i ], "-t" ) == 0 || idStr::Icmp( argv[ i ], "-nogui" ) == 0 )
{
}
else
{
args.AppendArg( argv[i] );
@ -1256,7 +1265,7 @@ int main( int argc, char** argv )
Dmap_f( args );
#if 1
#if 0
while( true )
{
bool captureToImage = false;