1 |
#include <stdlib.h> |
2 |
#include "Oni_Character.h" |
3 |
|
4 |
int DDr_TeamToTeamID(const char* team_string) { //Already something like this in the engine, but I'm reimplementing it... |
5 |
if (!strcmp(team_string, "Konoko")) return 0; |
6 |
if (!strcmp(team_string, "TCTF")) return 1; |
7 |
if (!strcmp(team_string, "Syndicate")) return 2; |
8 |
if (!strcmp(team_string, "Neutral")) return 3; |
9 |
if (!strcmp(team_string, "SecurityGuard")) return 4; |
10 |
if (!strcmp(team_string, "RougeKonoko")) return 5; |
11 |
if (!strcmp(team_string, "Switzerland")) return 6; |
12 |
if (!strcmp(team_string, "SyndicateAccessory")) return 7; |
13 |
return 3; //if you enter a bad teamname, return Neutral..... |
14 |
} |
15 |
|
16 |
int CHARTest() { |
17 |
CharacterObject TestCHAR; |
18 |
memset(&TestCHAR, 0, sizeof(CharacterObject)); |
19 |
TestCHAR.Header.Type = "CHAR"; |
20 |
TestCHAR.OSD.Name = "Gumby"; |
21 |
TestCHAR.OSD.Class = "muro_generic"; |
22 |
TestCHAR.OSD.TeamID = DDr_TeamToTeamID("Syndicate"); |
23 |
ONrGameState_NewCharacter(&TestCHAR, 0); |
24 |
return 0; |
25 |
} |