ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Character.c
(Generate patch)

Comparing Daodan/src/Daodan_Character.c (file contents):
Revision 432 by gumby, Thu Jul 16 08:49:08 2009 UTC vs.
Revision 433 by gumby, Thu Jul 16 08:49:30 2009 UTC

# Line 17 | Line 17 | int DDr_TeamToTeamID(const char* team_st
17  
18   void CHARTest()
19   {
20 <        CharacterObject TestCHAR;
21 <        memset(&TestCHAR, 0, sizeof(CharacterObject));
20 >        CharacterObject* TestCHAR = malloc(sizeof(CharacterObject));
21 >        memset(TestCHAR, 0, sizeof(CharacterObject));
22          
23 <        memcpy(TestCHAR.Header.Type, "CHAR", 4);
24 <        memcpy(TestCHAR.OSD.Name, "Gumby", 6);
25 <        memcpy(TestCHAR.OSD.Class, "muro_generic", 13);
26 <        TestCHAR.OSD.TeamID = team_syndicate;
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 <        //ONrGameState_NewCharacter(&TestCHAR, NULL);
29 >
30 >        ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL);
31   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)