diff --git a/Toshi/Include/TKernel/TCString.h b/Toshi/Include/TKernel/TCString.h index d20cedb..31e03a1 100644 --- a/Toshi/Include/TKernel/TCString.h +++ b/Toshi/Include/TKernel/TCString.h @@ -1,5 +1,7 @@ #include "Defines.h" #include +#include +#include TOSHI_NAMESPACE_BEGIN @@ -41,6 +43,7 @@ class TOSHI_EXPORT TCString void Copy(const TCString& a_rOther, TINT a_iLength = -1); void Copy(TPCCHAR a_pcString, TINT a_iLength = -1); + TCString& __cdecl Format(TPCCHAR a_pcFormat, ...); TBOOL IsIndexValid(TINT a_iIndex = 0) const { diff --git a/Toshi/Source/TKernel/TCString.cpp b/Toshi/Source/TKernel/TCString.cpp index 27b2ca2..3e2bee8 100644 --- a/Toshi/Source/TKernel/TCString.cpp +++ b/Toshi/Source/TKernel/TCString.cpp @@ -73,3 +73,14 @@ void TCString::Copy(TPCCHAR a_pcString, TINT a_iLength) m_pBuffer[a_iLength] = '\0'; } } + +TCString& __cdecl TCString::Format(TPCCHAR a_pcFormat, ...) +{ + char buffer[0x400]; + va_list vargs; + va_start(vargs, a_pcFormat); + _vsnprintf(buffer, sizeof(buffer), a_pcFormat, vargs); + va_end(vargs); + TCString res = buffer; + return res; +} diff --git a/Toshi/Source/TKernel/TObject.cpp b/Toshi/Source/TKernel/TObject.cpp index a99d121..c8919ce 100644 --- a/Toshi/Source/TKernel/TObject.cpp +++ b/Toshi/Source/TKernel/TObject.cpp @@ -1,5 +1,6 @@ #include "TObject.h" #include "TSystem.h" +#include TOSHI_NAMESPACE_USING @@ -37,6 +38,7 @@ void TClass::DeinitialiseStatic() } static TINT s_iCounter; +static TCHAR s_FourSpaces[4] = { ' ', ' ', ' ', ' ' }; TBOOL DumpObjectClassTree_BaseBegin(TClass*, TPCVOID) { @@ -53,6 +55,10 @@ TBOOL DumpObjectClassTree_BaseEnd(TClass*, TPCVOID) TBOOL DumpObjectClassTree_Check(TClass*, TPCVOID) { TDPRINTF("DumpObjectClassTree_Check() Not Implemented\n"); + for (TINT i = 0; i < s_iCounter; i++) + { + TCString idk; + } return TTRUE; }