Mercurial > mm7
comparison 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 |
comparison
equal
deleted
inserted
replaced
1204:832f09144726 | 1205:8c02e6f74b29 |
---|---|
27 struct GUIFont *pFontComic; | 27 struct GUIFont *pFontComic; |
28 struct GUIFont *pFontSmallnum; | 28 struct GUIFont *pFontSmallnum; |
29 | 29 |
30 char temp_string[2048]; | 30 char temp_string[2048]; |
31 | 31 |
32 char pTmpBuf3[10000]; | 32 std::array<char, 10000> pTmpBuf3; |
33 | 33 |
34 void DrawCharToBuff(unsigned short* uXpos,unsigned char* pCharPixels, int uCharWidth, int uCharHeight, unsigned __int16* pFontPalette, __int16 draw_color, int line_width); | 34 void DrawCharToBuff(unsigned short* uXpos,unsigned char* pCharPixels, int uCharWidth, int uCharHeight, unsigned __int16* pFontPalette, __int16 draw_color, int line_width); |
35 | 35 |
36 | 36 |
37 //----- (0044C448) -------------------------------------------------------- | 37 //----- (0044C448) -------------------------------------------------------- |
48 while (NULL!=(pFontPalette=va_arg(palettes_ptr, const char *))) | 48 while (NULL!=(pFontPalette=va_arg(palettes_ptr, const char *))) |
49 { | 49 { |
50 pallete_index =pIcons_LOD->LoadTexture(pFontPalette, TEXTURE_16BIT_PALETTE); | 50 pallete_index =pIcons_LOD->LoadTexture(pFontPalette, TEXTURE_16BIT_PALETTE); |
51 if (pallete_index == -1) | 51 if (pallete_index == -1) |
52 { | 52 { |
53 wsprintfA(pTmpBuf, "Unable to open %s", pFontPalette); | 53 wsprintfA(pTmpBuf.data(), "Unable to open %s", pFontPalette); |
54 Abortf(pTmpBuf); | 54 Abortf(pTmpBuf.data()); |
55 } | 55 } |
56 pFont->pFontPalettes[palletes_count] = pIcons_LOD->pTextures[pallete_index].pPalette16; | 56 pFont->pFontPalettes[palletes_count] = pIcons_LOD->pTextures[pallete_index].pPalette16; |
57 ++palletes_count; | 57 ++palletes_count; |
58 } | 58 } |
59 va_end(palettes_ptr); | 59 va_end(palettes_ptr); |
284 return 0; | 284 return 0; |
285 } | 285 } |
286 currentFont=pFontMain; // esi@3 | 286 currentFont=pFontMain; // esi@3 |
287 uInStrLen = strlen(pString); | 287 uInStrLen = strlen(pString); |
288 assert(uInStrLen < sizeof(pTmpBuf3)); | 288 assert(uInStrLen < sizeof(pTmpBuf3)); |
289 strcpy(pTmpBuf3, pString); | 289 strcpy(pTmpBuf3.data(), pString); |
290 if (uInStrLen==0) | 290 if (uInStrLen==0) |
291 return pTmpBuf3; | 291 return pTmpBuf3.data(); |
292 | 292 |
293 start_pixel_offset=string_pixel_Width=startPixlOff; | 293 start_pixel_offset=string_pixel_Width=startPixlOff; |
294 possible_transition_point=0; | 294 possible_transition_point=0; |
295 for(int i=0; i<uInStrLen; ++i) | 295 for(int i=0; i<uInStrLen; ++i) |
296 { | 296 { |
377 } | 377 } |
378 } | 378 } |
379 } | 379 } |
380 } | 380 } |
381 } | 381 } |
382 return pTmpBuf3; | 382 return pTmpBuf3.data(); |
383 | 383 |
384 } | 384 } |
385 | 385 |
386 | 386 |
387 //----- (0044C6C2) -------------------------------------------------------- | 387 //----- (0044C6C2) -------------------------------------------------------- |