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 428 by rossy, Thu Jul 16 06:37:58 2009 UTC vs.
Revision 431 by rossy, Thu Jul 16 07:14:01 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", 5);
24 <        memcpy(TestCHAR.OSD.Name, "Gumby", 6);
25 <        memcpy(TestCHAR.OSD.Class, "muro_generic", 13);
26 <        TestCHAR.OSD.TeamID = team_syndicate;
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;
27          
28 <        ONrGameState_NewCharacter(&TestCHAR, NULL);
28 >        ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL);
29   }

Diff Legend

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