Mercurial > mm7
diff GUIFont.cpp @ 1205:8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 00:30:48 +0200 |
parents | 8b3e7d5ba069 |
children | 5450af4f57ef |
line wrap: on
line diff
--- a/GUIFont.cpp Sat Jun 08 21:47:29 2013 +0200 +++ b/GUIFont.cpp Sun Jun 09 00:30:48 2013 +0200 @@ -29,7 +29,7 @@ char temp_string[2048]; -char pTmpBuf3[10000]; +std::array<char, 10000> pTmpBuf3; void DrawCharToBuff(unsigned short* uXpos,unsigned char* pCharPixels, int uCharWidth, int uCharHeight, unsigned __int16* pFontPalette, __int16 draw_color, int line_width); @@ -50,8 +50,8 @@ pallete_index =pIcons_LOD->LoadTexture(pFontPalette, TEXTURE_16BIT_PALETTE); if (pallete_index == -1) { - wsprintfA(pTmpBuf, "Unable to open %s", pFontPalette); - Abortf(pTmpBuf); + wsprintfA(pTmpBuf.data(), "Unable to open %s", pFontPalette); + Abortf(pTmpBuf.data()); } pFont->pFontPalettes[palletes_count] = pIcons_LOD->pTextures[pallete_index].pPalette16; ++palletes_count; @@ -286,9 +286,9 @@ currentFont=pFontMain; // esi@3 uInStrLen = strlen(pString); assert(uInStrLen < sizeof(pTmpBuf3)); - strcpy(pTmpBuf3, pString); + strcpy(pTmpBuf3.data(), pString); if (uInStrLen==0) - return pTmpBuf3; + return pTmpBuf3.data(); start_pixel_offset=string_pixel_Width=startPixlOff; possible_transition_point=0; @@ -379,7 +379,7 @@ } } } - return pTmpBuf3; + return pTmpBuf3.data(); }