ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Character.c
Revision: 427
Committed: Thu Jul 16 06:10:18 2009 UTC (16 years, 2 months ago) by gumby
Content type: text/x-csrc
File size: 966 byte(s)
Log Message:
CHAR test

File Contents

# Content
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 }