Changeset 433


Ignore:
Timestamp:
Jul 16, 2009, 10:49:30 AM (12 years ago)
Author:
gumby
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan_Character.c

    r432 r433  
    1818void CHARTest()
    1919{
    20         CharacterObject TestCHAR;
    21         memset(&TestCHAR, 0, sizeof(CharacterObject));
     20        CharacterObject* TestCHAR = malloc(sizeof(CharacterObject));
     21        memset(TestCHAR, 0, sizeof(CharacterObject));
    2222       
    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;
    2728       
    28         //ONrGameState_NewCharacter(&TestCHAR, NULL);
     29
     30        ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL);
    2931}
Note: See TracChangeset for help on using the changeset viewer.