Mercurial > mm7
diff Monsters.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 | 29a8defbad9e |
children | b237a61e61d3 |
line wrap: on
line diff
--- a/Monsters.cpp Sat Jun 08 21:47:29 2013 +0200 +++ b/Monsters.cpp Sun Jun 09 00:30:48 2013 +0200 @@ -168,8 +168,8 @@ return 73; else { - sprintf(pTmpBuf, "Unknown monster spell %s", tbl->pProperties[0]); - MessageBoxA(nullptr, pTmpBuf, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:1562", 0); + sprintf(pTmpBuf.data(), "Unknown monster spell %s", tbl->pProperties[0]); + MessageBoxA(nullptr, pTmpBuf.data(), "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:1562", 0); ++*next_token; return 0; } @@ -1087,7 +1087,7 @@ if ( parsed_field.uPropCount > 1 ) { pTmpBuf[0] = 0; - strcpy(pTmpBuf, parsed_field.pProperties[2]); + strcpy(pTmpBuf.data(), parsed_field.pProperties[2]); if ( parsed_field.uPropCount > 2 ) { int prop_cnt = 3; @@ -1095,9 +1095,9 @@ { do { - strcat(pTmpBuf, " "); + strcat(pTmpBuf.data(), " "); char test_char = parsed_field.pProperties[prop_cnt][0]; - strcat(pTmpBuf, parsed_field.pProperties[prop_cnt]); + strcat(pTmpBuf.data(), parsed_field.pProperties[prop_cnt]); if ( prop_cnt == (parsed_field.uPropCount - 1) ) { switch (tolower(test_char)) @@ -1121,7 +1121,7 @@ } if ( pMonsterList->uNumMonsters ) { - pInfos[curr_rec_num].field_3C_some_special_attack = pMonsterList->GetMonsterIDByName(pTmpBuf) + 1; + pInfos[curr_rec_num].field_3C_some_special_attack = pMonsterList->GetMonsterIDByName(pTmpBuf.data()) + 1; if ( pInfos[curr_rec_num].field_3C_some_special_attack == -1 ) { sprintf(Src, "Can't create random monster: '%s' See MapStats!", pTmpBuf);