Skip to content

Commit

Permalink
Fix Debug and Mixed compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Dec 24, 2017
1 parent 0dc29f0 commit adfa5b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xrGame/debug_text_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,24 @@ void log_text_tree(text_tree& tree);

} // namespace debug

IC xr_string __cdecl make_xrstr(LPCSTR format, ...)
IC xr_string __cdecl make_xrstr(pcstr format, ...)
{
va_list args;
va_start(args, format);

char temp[4096];
vsprintf(temp, format, args);

va_end(args);
return xr_string(temp);
}

IC xr_string __cdecl make_xrstr(bool b) { return b ? "+" : "-"; }
IC xr_string __cdecl make_xrstr(float f) { return make_xrstr("%f", f); }
IC xr_string __cdecl make_xrstr(s32 d) { return make_xrstr("%i", d); }
IC xr_string __cdecl make_xrstr(u32 d) { return make_xrstr("%u", d); }
IC xr_string __cdecl make_xrstr(s64 d) { return make_xrstr("%i", d); }
IC xr_string __cdecl make_xrstr(u64 d) { return make_xrstr("%u", d); }
IC xr_string __cdecl make_xrstr(Fvector3 v) { return make_xrstr("[%f][%f][%f]", v.x, v.y, v.z); }
IC xr_string __cdecl make_xrstr(const xr_string& s) { return s; }
#endif // defined(AI_DEBUG_TEXT_TREE_H_INCLUDED)

0 comments on commit adfa5b3

Please sign in to comment.