| 18 |
|
} |
| 19 |
|
|
| 20 |
|
uint32_t DDrGetCharacterIndexFromName(char* input) { |
| 21 |
– |
Character **characterlist; //pointer to array of Character pointers |
| 22 |
– |
characterlist = ONgGameState + 0x00167500; //Character List |
| 23 |
– |
int* total_characters = ONgGameState + 0x00167700; //Max number of characters |
| 21 |
|
int i; |
| 22 |
< |
for(i = 0; i < *total_characters; i++) { |
| 22 |
> |
Character **characterlist = ONgGameState->PresentCharacterList; //pointer to array of Character pointers |
| 23 |
> |
int total_characters = ONgGameState->PresentCharacterListCount; //Max number of characters |
| 24 |
> |
for(i = 0; i < total_characters; i++) { |
| 25 |
|
if (characterlist[i] != 0) //anti Blam! |
| 26 |
|
if (!strcmp(characterlist[i]->Name, input)) { //checks for the same name |
| 27 |
|
return characterlist[i]->Number; |