Mercurial > mm7
comparison mm7_2.cpp @ 751:6005142abce0
monster init refactored
author | Gloval |
---|---|
date | Sat, 23 Mar 2013 00:20:16 +0400 |
parents | 9cc972ebd3cf |
children | e13ce1b0930d |
comparison
equal
deleted
inserted
replaced
746:852ec78d9548 | 751:6005142abce0 |
---|---|
5051 v44 = "%s C"; | 5051 v44 = "%s C"; |
5052 } | 5052 } |
5053 } | 5053 } |
5054 sprintf(Str2, v44, pTexture); | 5054 sprintf(Str2, v44, pTexture); |
5055 } | 5055 } |
5056 v26 = pMonsterList->GetMonsterByName(Str2); | 5056 v50 = pMonsterList->GetMonsterIDByName(Str2); |
5057 v50 = (signed __int16)v26; | |
5058 pTexture = Str2; | 5057 pTexture = Str2; |
5059 if ( (signed __int16)v26 == -1 ) | 5058 if ( (signed __int16)v50 == -1 ) |
5060 { | 5059 { |
5061 sprintf(Str, "Can't create random monster: '%s'! See MapStats.txt and Monsters.txt!", pTexture); | 5060 sprintf(Str, "Can't create random monster: '%s'! See MapStats.txt and Monsters.txt!", pTexture); |
5062 MessageBoxA(nullptr, Str, nullptr, 0); | 5061 MessageBoxA(nullptr, Str, nullptr, 0); |
5063 ExitProcess(0); | 5062 ExitProcess(0); |
5064 } | 5063 } |
5065 v27 = &pMonsterList->pMonsters[(signed __int16)v26]; | 5064 v27 = &pMonsterList->pMonsters[(signed __int16)v50]; |
5066 v28 = pMonsterStats->FindMonsterByName(pTexture); | 5065 v28 = pMonsterStats->FindMonsterByTextureName(pTexture); |
5067 if ( !v28 ) | 5066 if ( !v28 ) |
5068 v28 = 1; | 5067 v28 = 1; |
5069 Src = &pMonsterStats->pInfos[v28]; | 5068 Src = &pMonsterStats->pInfos[v28]; |
5070 strcpy(pMonster->pActorName, Src->pName); | 5069 strcpy(pMonster->pActorName, Src->pName); |
5071 pMonster->sCurrentHP = Src->uHP; | 5070 pMonster->sCurrentHP = Src->uHP; |
5166 if ( a2 == 3 ) | 5165 if ( a2 == 3 ) |
5167 v15 = "Elemental Light B"; | 5166 v15 = "Elemental Light B"; |
5168 else | 5167 else |
5169 v15 = "Elemental Light A"; | 5168 v15 = "Elemental Light A"; |
5170 } | 5169 } |
5171 v23 = (signed __int16)pMonsterList->GetMonsterByName(v15); | 5170 v23 = pMonsterList->GetMonsterIDByName(v15); |
5172 v3 = 0; | 5171 v3 = 0; |
5173 v20 = uNumActors; | 5172 v20 = uNumActors; |
5174 if ( (signed int)uNumActors > 0 ) | 5173 if ( (signed int)uNumActors > 0 ) |
5175 { | 5174 { |
5176 v4 = pActors;//[0].uAIState; | 5175 v4 = pActors;//[0].uAIState; |