MCPcopy Create free account
hub / github.com/adventuregamestudio/ags / debug_script_print_impl

Function debug_script_print_impl

Engine/debug/debug.cpp:376–386  ·  view source on GitHub ↗

Prepends message text with current room number and running script info, then logs result

Source from the content-addressed store, hash-verified

374
375// Prepends message text with current room number and running script info, then logs result
376static void debug_script_print_impl(const String &msg, MessageType mt)
377{
378 String script_ref;
379 if (scriptExecutor && scriptExecutor->GetRunningScript())
380 {
381 String scriptname = scriptExecutor->GetRunningScript()->GetSectionName(scriptExecutor->GetPC());
382 script_ref.Format("[%s:%d] ", scriptname.GetCStr(), currentline);
383 }
384
385 Debug::Printf(kDbgGroup_Game, mt, "(room:%d) %s%s", displayed_room, script_ref.GetCStr(), msg.GetCStr());
386}
387
388void debug_script_print(MessageType mt, const char *msg, ...)
389{

Callers 3

debug_script_printFunction · 0.85
debug_script_warnFunction · 0.85
debug_script_logFunction · 0.85

Calls 5

PrintfFunction · 0.85
GetRunningScriptMethod · 0.80
GetPCMethod · 0.80
FormatMethod · 0.80
GetCStrMethod · 0.80

Tested by

no test coverage detected