| 1 | #include <stdlib.h>
|
|---|
| 2 | #include "Daodan_Character.h"
|
|---|
| 3 | #include "Oni_Character.h"
|
|---|
| 4 |
|
|---|
| 5 | int 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 |
|
|---|
| 18 | void 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, "striker_easy_1", 15);
|
|---|
| 27 | memcpy(TestCHAR->OSD.ScriptSpawn, "dmsg", 20);
|
|---|
| 28 | TestCHAR->OSD.Options = chr_unkillable;
|
|---|
| 29 | TestCHAR->OSD.TeamID = team_syndicate;
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL);
|
|---|
| 33 | }
|
|---|