#include #include "Character.h" #include "../Oni/Oni.h" int DDr_TeamToTeamID(const char* team_string) //Already something like this in the engine, but I'm reimplementing it... { if (!strcmp(team_string, "Konoko")) return team_konoko; else if (!strcmp(team_string, "TCTF")) return team_tctf; else if (!strcmp(team_string, "Syndicate")) return team_syndicate; else if (!strcmp(team_string, "Neutral")) return team_neutral; else if (!strcmp(team_string, "SecurityGuard")) return team_securityguard; else if (!strcmp(team_string, "RogueKonoko")) return team_roguekonoko; else if (!strcmp(team_string, "Switzerland")) return team_switzerland; else if (!strcmp(team_string, "SyndicateAccessory")) return team_syndicateaccessory; return team_neutral; //if you enter a bad teamname, return Neutral..... } uint32_t DDrGetCharacterIndexFromName(char* input) { int i; Character **characterlist = ONgGameState->PresentCharacterList; //pointer to array of Character pointers int total_characters = ONgGameState->PresentCharacterListCount; //Max number of characters for(i = 0; i < total_characters; i++) { if (characterlist[i] != 0) //anti Blam! if (!strcmp(characterlist[i]->Name, input)) { //checks for the same name return characterlist[i]->Number; } } return -1; //not found :( }