Changeset 428


Ignore:
Timestamp:
Jul 16, 2009, 8:37:58 AM (12 years ago)
Author:
rossy
Message:

getting closer...

Location:
Daodan
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • Daodan/build.bat

    r349 r428  
    1 gcc -O3 -s -Wall -shared -fomit-frame-pointer -o build\binkw32.dll src\Oni_Symbols.S src\Daodan.c src\Daodan_DLLStubs.c src\Daodan_Patch.c src\Daodan_Utility.c src\Daodan_Win32.c src\Daodan_Cheater.c src\Daodan_Persistence.c src\Daodan_WindowHack.c src\daodan_gl.c src\inifile_reader.c -lgdi32
     1gcc -O3 -s -Wall -shared -fomit-frame-pointer -o build\binkw32.dll src\Oni_Symbols.S src\Daodan.c src\Daodan_DLLStubs.c src\Daodan_Patch.c src\Daodan_Utility.c src\Daodan_Win32.c src\Daodan_Cheater.c src\Daodan_Persistence.c src\Daodan_WindowHack.c src\daodan_gl.c src\Daodan_Character.c src\inifile_reader.c -lgdi32
  • Daodan/src/Daodan_Character.c

    r427 r428  
    11#include <stdlib.h>
     2#include "Daodan_Character.h"
    23#include "Oni_Character.h"
    34
    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.....
     5int 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.....
    1416}
    1517
    16 int CHARTest() {
     18void CHARTest()
     19{
    1720        CharacterObject TestCHAR;
    1821        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);
    2529}
  • Daodan/src/Daodan_WindowHack.c

    r427 r428  
    22#include "Daodan_WindowHack.h"
    33#include "Daodan_Patch.h"
     4#include "Daodan_Character.h"
    45
    56#include "Oni.h"
    67#include "BFW_Motoko_Draw.h"
    78#include "oni_gl.h"
    8 
    9 #include "Oni_Character.h"
    109
    1110volatile HWND onihwnd, boxhwnd = NULL;
  • Daodan/src/Oni_Character.h

    r427 r428  
    11#pragma once
    2 #ifndef ONI_CHARS_H
    3 #define ONI_CHARS_H
    4 #endif
     2#ifndef ONI_CHARACTER_H
     3#define ONI_CHARACTER_H
    54
    65#include "Daodan.h"
    76#include <stdint.h>
    8 
    9 int DDr_TeamToTeamID(const char*);
    10 ONICALL ONrGameState_NewCharacter(int, int);
    11 int CHARTest();
    127
    138typedef struct {
     
    1611        float Z;       
    1712} Vector3; //probably move to utilities...
    18 
    19 
    2013
    2114typedef struct {
     
    2720        int EditorCallbacks;    //Lets try not to mess with it for now. :P
    2821        int field_28;                   //unknown
    29        
    3022} OSD_Header;
    3123
    32 
    3324typedef struct {
    34         int32_t Options;                                //A bitset. Someone had better define these
     25        uint32_t Options;                               //A bitset. Someone had better define these
    3526        char Class[64];                                 //Name of the ONCC we use. ONCCName in idb
    3627        char Name[32];                                  //Name of the character. ie: ai2_spawn Muro
     
    8778        CharacterOSD OSD;
    8879} CharacterObject;
     80
     81enum {
     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
     92int ONICALL ONrGameState_NewCharacter(CharacterObject* character, void* something);
     93
     94#endif
Note: See TracChangeset for help on using the changeset viewer.