void xmlGenericErrorFuncWrite (void *ctx, const char *msg, ...) { // Get the error string string str; NLMISC_CONVERT_VARGS (str, msg, NLMISC::MaxCStringSize); ((COXml*)ctx)->_ErrorString += str; }
// ------------------------------------------------------------------------------------------------ uint32 CTextContext::textPush (const char *format, ...) { nlassert(_FontGen); // convert the string. char *str; NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); if (_CacheNbFreePlaces == 0) { CComputedString csTmp; _CacheStrings.push_back (csTmp); if (_CacheFreePlaces.size() == 0) _CacheFreePlaces.resize (1); _CacheFreePlaces[0] = (uint32)_CacheStrings.size()-1; _CacheNbFreePlaces = 1; } // compute the string. uint32 index = _CacheFreePlaces[_CacheNbFreePlaces-1]; CComputedString &strToFill = _CacheStrings[index]; _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio); _CacheNbFreePlaces--; return index; }
// *************************************************************************** uint32 CTextContextUser::textPush(const char *format, ...) { H_AUTO2; char *str; NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); return _TextContext.textPush(ucstring(str)) ; }
void CTextContextUser::printfAt(float x, float y, const char * format, ...) { H_AUTO2; char *str; NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); _TextContext.printAt(x, y, ucstring(str)) ; _DriverUser->restoreMatrixContext(); }
void CTextContextUser::render3D(const CMatrix &mat, const char *format, ...) { NL3D_HAUTO_RENDER_3D_TEXTCONTEXT; char *str; NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); render3D(mat, ucstring(str)); _DriverUser->restoreMatrixContext(); }