#include #include "Daodan_Character.h" #include "Oni_Character.h" #include "BFW_Utility.h" #include "Oni.h" int DDr_TeamToTeamID(const char* team_string) //Already something like this in the engine, but I'm reimplementing it... { if (!strcmp(team_string, "Konoko")) return team_konoko; else if (!strcmp(team_string, "TCTF")) return team_tctf; else if (!strcmp(team_string, "Syndicate")) return team_syndicate; else if (!strcmp(team_string, "Neutral")) return team_neutral; else if (!strcmp(team_string, "SecurityGuard")) return team_securityguard; else if (!strcmp(team_string, "RougeKonoko")) return team_rougekonoko; else if (!strcmp(team_string, "Switzerland")) return team_switzerland; else if (!strcmp(team_string, "SyndicateAccessory")) return team_syndicateaccessory; return team_neutral; //if you enter a bad teamname, return Neutral..... } uint32_t DDrGetCharacterIndexFromName(char* input) { Character **characterlist; //pointer to array of Character pointers characterlist = ONgGameState + 0x00167500; //Character List int* total_characters = ONgGameState + 0x00167700; //Max number of characters int i; for(i = 0; i < *total_characters; i++) { if (characterlist[i] != 0) //anti Blam! if (!strcmp(characterlist[i]->Name, input)) { //checks for the same name return characterlist[i]->Number; } } return -1; //not found :( } /* OniRectangle TestRect; void CHARTest() { CharacterObject* TestCHAR = malloc(sizeof(CharacterObject)); memset(TestCHAR, 0, sizeof(CharacterObject)); int type = 0x43484152; TestCHAR->Header.Type = type; memcpy(TestCHAR->OSD.Name, "Gumby", 6); memcpy(TestCHAR->OSD.Class, "striker_easy_1", 15); memcpy(TestCHAR->OSD.ScriptSpawn, "dmsg", 20); //TestCHAR->OSD.Options = chr_unkillable; TestCHAR->OSD.TeamID = team_syndicate; //int* ptr = 0x005ECE70; TestRect.Top = 10; TestRect.Left = 10; TestRect.Right = 100; TestRect.Bottom = 100; char str[5] = "hi"; str[2] = '\0'; AUrMessageBox(0, "%8x", &TestRect); int16_t a = TSrContext_DrawText(TestContext, str, 0xFF, &TestRect, &TestRect); //ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL); return; } */