MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / adprintf

Function adprintf

engine/source/platformAndroid/T2DActivity.cpp:2582–2624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2580}
2581
2582void adprintf(const char* fmt,...) {
2583
2584 va_list argptr;
2585 int cnt;
2586 char s[4096];
2587 time_t now;
2588
2589 va_start(argptr,fmt);
2590 cnt = vsprintf(s,fmt,argptr);
2591 va_end(argptr);
2592
2593 time(&now);
2594 tm* t = localtime(&now);
2595
2596 std::stringstream ss;
2597 ss.clear();
2598 ss << "[";
2599 ss << (t->tm_year + 1900);
2600 ss << "/";
2601 if (t->tm_mon < 9)
2602 ss << "0";
2603 ss << (t->tm_mon+1);
2604 ss << "/";
2605 if (t->tm_mday < 10)
2606 ss << "0";
2607 ss << t->tm_mday;
2608 ss << " ";
2609 if (t->tm_hour < 10)
2610 ss << "0";
2611 ss << t->tm_hour;
2612 ss << ":";
2613 if (t->tm_min < 10)
2614 ss << "0";
2615 ss << t->tm_min;
2616 ss << ":";
2617 if (t->tm_sec < 10)
2618 ss << "0";
2619 ss << t->tm_sec;
2620 ss << "] ";
2621 ss << s;
2622
2623 __android_log_print(ANDROID_LOG_INFO, "Torque2D", "%s", ss.str().c_str());
2624}
2625
2626void T2DActivity::loadInternalDir(){
2627

Callers 3

processConsoleLineMethod · 0.85
AndroidWindow.cppFile · 0.85
engine_init_displayFunction · 0.85

Calls 2

c_strMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected