Changeset 428 for Daodan/src
- Timestamp:
- Jul 16, 2009, 8:37:58 AM (15 years ago)
- Location:
- Daodan/src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan_Character.c
r427 r428 1 1 #include <stdlib.h> 2 #include "Daodan_Character.h" 2 3 #include "Oni_Character.h" 3 4 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..... 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..... 14 16 } 15 17 16 int CHARTest() { 18 void CHARTest() 19 { 17 20 CharacterObject TestCHAR; 18 21 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; 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); 25 29 } -
Daodan/src/Daodan_WindowHack.c
r427 r428 2 2 #include "Daodan_WindowHack.h" 3 3 #include "Daodan_Patch.h" 4 #include "Daodan_Character.h" 4 5 5 6 #include "Oni.h" 6 7 #include "BFW_Motoko_Draw.h" 7 8 #include "oni_gl.h" 8 9 #include "Oni_Character.h"10 9 11 10 volatile HWND onihwnd, boxhwnd = NULL; -
Daodan/src/Oni_Character.h
r427 r428 1 1 #pragma once 2 #ifndef ONI_CHARS_H 3 #define ONI_CHARS_H 4 #endif 2 #ifndef ONI_CHARACTER_H 3 #define ONI_CHARACTER_H 5 4 6 5 #include "Daodan.h" 7 6 #include <stdint.h> 8 9 int DDr_TeamToTeamID(const char*);10 ONICALL ONrGameState_NewCharacter(int, int);11 int CHARTest();12 7 13 8 typedef struct { … … 16 11 float Z; 17 12 } Vector3; //probably move to utilities... 18 19 20 13 21 14 typedef struct { … … 27 20 int EditorCallbacks; //Lets try not to mess with it for now. :P 28 21 int field_28; //unknown 29 30 22 } OSD_Header; 31 23 32 33 24 typedef struct { 34 int32_t Options; //A bitset. Someone had better define these25 uint32_t Options; //A bitset. Someone had better define these 35 26 char Class[64]; //Name of the ONCC we use. ONCCName in idb 36 27 char Name[32]; //Name of the character. ie: ai2_spawn Muro … … 87 78 CharacterOSD OSD; 88 79 } CharacterObject; 80 81 enum { 82 team_konoko, 83 team_tctf, 84 team_syndicate, 85 team_neutral, 86 team_securityguard, 87 team_rougekonoko, 88 team_switzerland, 89 team_syndicateaccessory, 90 }; 91 92 int ONICALL ONrGameState_NewCharacter(CharacterObject* character, void* something); 93 94 #endif
Note:
See TracChangeset
for help on using the changeset viewer.