source: Daodan/src/Daodan_Character.c@ 433

Last change on this file since 433 was 433, checked in by gumby, 15 years ago
File size: 1.3 KB
Line 
1#include <stdlib.h>
2#include "Daodan_Character.h"
3#include "Oni_Character.h"
4
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.....
16}
17
18void CHARTest()
19{
20 CharacterObject* TestCHAR = malloc(sizeof(CharacterObject));
21 memset(TestCHAR, 0, sizeof(CharacterObject));
22
23 int type = 0x43484152;
24 TestCHAR->Header.Type = type;
25 memcpy(TestCHAR->OSD.Name, "Gumby", 6);
26 memcpy(TestCHAR->OSD.Class, "muro_generic", 13);
27 TestCHAR->OSD.TeamID = team_syndicate;
28
29
30 ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL);
31}
Note: See TracBrowser for help on using the repository browser.