source: Daodan/src/Daodan_Character.c@ 429

Last change on this file since 429 was 428, checked in by rossy, 15 years ago

getting closer...

File size: 1.2 KB
RevLine 
[427]1#include <stdlib.h>
[428]2#include "Daodan_Character.h"
[427]3#include "Oni_Character.h"
4
[428]5int DDr_TeamToTeamID(const char* team_string) //Already something like this in the engine, but I'm reimplementing it...
6{
7 if (!strcmp(team_string, "Konoko")) return team_konoko;
8 else if (!strcmp(team_string, "TCTF")) return team_tctf;
9 else if (!strcmp(team_string, "Syndicate")) return team_syndicate;
10 else if (!strcmp(team_string, "Neutral")) return team_neutral;
11 else if (!strcmp(team_string, "SecurityGuard")) return team_securityguard;
12 else if (!strcmp(team_string, "RougeKonoko")) return team_rougekonoko;
13 else if (!strcmp(team_string, "Switzerland")) return team_switzerland;
14 else if (!strcmp(team_string, "SyndicateAccessory")) return team_syndicateaccessory;
15 return team_neutral; //if you enter a bad teamname, return Neutral.....
[427]16}
17
[428]18void CHARTest()
19{
[427]20 CharacterObject TestCHAR;
21 memset(&TestCHAR, 0, sizeof(CharacterObject));
[428]22
23 memcpy(TestCHAR.Header.Type, "CHAR", 5);
24 memcpy(TestCHAR.OSD.Name, "Gumby", 6);
25 memcpy(TestCHAR.OSD.Class, "muro_generic", 13);
26 TestCHAR.OSD.TeamID = team_syndicate;
27
28 ONrGameState_NewCharacter(&TestCHAR, NULL);
29}
Note: See TracBrowser for help on using the repository browser.