MCPcopy Create free account
hub / github.com/bwapi/bwapi / vPrintf

Method vPrintf

bwapi/BWAPI/Source/BWAPI/GameImpl.cpp:419–435  ·  view source on GitHub ↗

------------------------------------------------- PRINTF -------------------------------------------------

Source from the content-addressed store, hash-verified

417 }
418 //------------------------------------------------- PRINTF -------------------------------------------------
419 void GameImpl::vPrintf(const char *format, va_list arg)
420 {
421 // nogui & safety
422 if ( !data->hasGUI ) return;
423 if ( !format ) return;
424
425 // Expand format into buffer
426 char buffer[512];
427 VSNPrintf(buffer, format, arg);
428
429 if ( !this->tournamentCheck(Tournament::Printf, buffer) )
430 return;
431
432 // Dispatch message using existing Storm library function (lobby+game)
433 S_EVT evt = { 4, -1, buffer, strlen(buffer) + 1 };
434 SEvtDispatch('SNET', 1, 4, &evt);
435 }
436 //--------------------------------------------- SEND TEXT --------------------------------------------------
437 void GameImpl::vSendTextEx(bool toAllies, const char *format, va_list arg)
438 {

Callers 1

printfMethod · 0.45

Calls 2

tournamentCheckMethod · 0.95
VSNPrintfFunction · 0.50

Tested by

no test coverage detected