Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Libcod CoD2 1.0

  1. #11
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Hey, the "base" is working (e.g. accessing MySQL-functions through stack functions), but many version-dependent functions are not implemented (e.g. functions to query +moveright etc.).
    Hey again, kung foo man, is it possible to port the rest of the functions from 1.2 libcod to 1.0 libcod? Because I don' quite get what do you mean by "version-dependent" functions, are they dependent on cod version?, if no would it be possible to see those functions ported to 1.0 soon?

  2. #12
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    E.g. take a look at the function gsc_player_button_right() in gsc_player.cpp:

    https://github.com/kungfooman/libcod...gsc_player.cpp
    PHP Code:
            #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
                    
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26FD);
            
    #elif COD_VERSION == COD4_1_7
                    
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FA7);
            
    #else
                    #warning unsigned char *aim_address = (unsigned char *)(NULL);
                    
    unsigned char *aim_address = (unsigned char *)(NULL);
            
    #endif 
    This will support CoD2 1.2, 1.3 and CoD4 1.7

    Since 1.2 and 1.3 got the same address, it might be also the same for 1.0, but I don't do much with 1.0 to check that.

    The code is dependent on the CoD version, because every binary is always recompiled, thus changing the hardcoded addresses.

    Since the code is open source: you are young and intelligent, add those addresses and make libcod more portable. You only need IDA Pro 5.5 with Decompiler (F5), and the memory viewer http://dbg.killtube.org/libcod/memoryshell.zip
    timescale 0.01

  3. The Following User Says Thank You to kung foo man For This Useful Post:

    YuriJurek (16th November 2013)

  4. #13
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by kung foo man View Post
    E.g. take a look at the function gsc_player_button_right() in gsc_player.cpp:

    https://github.com/kungfooman/libcod...gsc_player.cpp
    PHP Code:
            #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
                    
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26FD);
            
    #elif COD_VERSION == COD4_1_7
                    
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FA7);
            
    #else
                    #warning unsigned char *aim_address = (unsigned char *)(NULL);
                    
    unsigned char *aim_address = (unsigned char *)(NULL);
            
    #endif 
    This will support CoD2 1.2, 1.3 and CoD4 1.7

    Since 1.2 and 1.3 got the same address, it might be also the same for 1.0, but I don't do much with 1.0 to check that.

    The code is dependent on the CoD version, because every binary is always recompiled, thus changing the hardcoded addresses.

    Since the code is open source: you are young and intelligent, add those addresses and make libcod more portable. You only need IDA Pro 5.5 with Decompiler (F5), and the memory viewer http://dbg.killtube.org/libcod/memoryshell.zip
    PHP Code:
    int __cdecl sub_8106C06(int a1unsigned int seedint a3int a4)
    {
      
    char v4// ST04_1@10
      
    char v5// ST04_1@20
      
    char v7// [sp+4h] [bp-834h]@1
      
    char dest// [sp+20h] [bp-818h]@10
      
    char s// [sp+420h] [bp-418h]@18
      
    int i// [sp+828h] [bp-10h]@12
      
    int j// [sp+82Ch] [bp-Ch]@18

      
    sub_8060B2C("------- Game Initialization -------\n"v7);
      
    sub_8060B2C("gamename: %s\n", (unsigned int)"Call of Duty 2");
      
    sub_8060B2C("gamedate: %s\n", (unsigned int)"Oct 24 2005");
      
    sub_80B537E();
      
    memset(&dword_859B40000x3624u);
      
    dword_859B41C 1;
      
    dword_859B5EC a1;
      *(
    _DWORD *)dword_859B5F8 a1;
      
    dword_859EA04 = -1;
      
    srand(seed);
      
    sub_80A8712(seed);
      
    sub_811E8E4();
      if ( !
    a3 || !a4 )
        
    sub_8106014();
      
    sub_81196D0();
      
    dword_865262C = (int)sub_8090534;
      
    dword_8652630 = (int)sub_8106A7C;
      
    dword_8652634 = (int)sub_8062B4C;
      
    dword_8652638 = (int)sub_8106BF2;
      
    dword_8652628 1;
      if ( **(
    _BYTE **)(dword_8793DEC 8) )
      {
        if ( *(
    _BYTE *)(dword_8793DF0 8) )
          
    sub_80A1200(*(_DWORD *)(dword_8793DEC 8), (int)&dword_859B4183);
        else
          
    sub_80A1200(*(_DWORD *)(dword_8793DEC 8), (int)&dword_859B4182);
        if ( 
    dword_859B418 )
        {
          
    sub_80903BC(&dest1024);
          
    sub_8107502("------------------------------------------------------------\n"v4);
          
    sub_8107502("InitGame: %s\n", (unsigned int)&dest);
        }
        else
        {
          
    sub_8060B2C("WARNING: Couldn't open logfile: %s\n", *(_DWORD *)(dword_8793DEC 8));
        }
      }
      else
      {
        
    sub_8060B2C("Not logging to disk.\n"v7);
      }
      for ( 
    0<= 0; ++)
      {
        
    dword_859EA08[i] = -1;
        *(&
    dword_859EA0C i) = 0;
        
    memset(&dword_859EA10[i], 00x14u);
      }
      
    sub_80DB380(sub_8106BF2);
      
    dword_855A4E0 = &unk_859EA40;
      if ( !
    a3 )
      {
        
    memset(dword_855A4E000xB3BC8u);
        *((
    _DWORD *)dword_855A4E0 184048) = sub_80AA8AA;
        *((
    _DWORD *)dword_855A4E0 184049) = sub_811CEFE;
        
    sub_810DF86();
        
    sub_80D9B7E();
        
    sub_8106AAC();
      }
      
    sub_8120068();
      
    sub_809107E(22, &s1024);
      
    sub_80B5FF6(&s, (unsigned int)"winner", (int)"0");
      
    sub_8090E6C(22, &s);
      
    memset(&unk_866548000x8C000u);
      
    dword_859B404 = (int)&unk_8665480;
      
    dword_859B5E4 = *(_DWORD *)(dword_8793D88 8);
      
    memset(&unk_86F148000xA2900u);
      
    dword_859B400 = (int)&unk_86F1480;
      for ( 
    0dword_859B5E4; ++)
        
    dword_86655D8[140 j] = dword_859B400 10404 j;
      *(
    _DWORD *)dword_859B40C 72;
      
    dword_859B410 0;
      
    dword_859B414 0;
      
    sub_8090498(dword_859B404, *(_DWORD *)dword_859B40C560dword_859B40010404);
      
    sub_80FEEDA();
      
    sub_81083B2();
      
    sub_81192E0();
      
    sub_80FBD50("0");
      
    sub_811030E();
      
    sub_807E04A();
      
    sub_8060B2C("-----------------------------------\n"v5);
      
    sub_8083E96(1);
      
    sub_807F9F2(1);
      
    sub_807F64C();
      
    sub_811932A();
      
    sub_8115E66();
      
    sub_810DD38();
      
    sub_8115E94();
      for ( 
    0<= 7; ++)
        
    dword_879D83C[306 j] = -1;
      
    dword_855A4E0 0;
      
    dword_859B41C 0;
      
    sub_8104A30();
      return 
    sub_8104AEC();

    I think playerStates for 1.0 is 0x086F1480. (memset(&unk_86F1480, 0, 0xA2900u))
    Last edited by Mitch; 16th November 2013 at 15:18.

  5. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    BlancO (16th November 2013),YuriJurek (16th November 2013)

  6. #14
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    I got now this:
    PHP Code:
    int __cdecl sub_810DDEE()
    {
      
    int result// eax@1
      
    char s// [sp+10h] [bp-48h]@1

      
    sub_80B5932(&s0x40u"maps/mp/gametypes/%s", *(_DWORD *)(dword_8793D80 8));
      
    dword_879C788 sub_810DD70((unsigned int)&s, (unsigned int)"main"1);
      
    dword_879C78C sub_810DD70(
                        (
    unsigned int)"maps/mp/gametypes/_callbacksetup",
                        (
    unsigned int)"CodeCallback_StartGameType",
                        
    1);
      
    dword_879C790 sub_810DD70(
                        (
    unsigned int)"maps/mp/gametypes/_callbacksetup",
                        (
    unsigned int)"CodeCallback_PlayerConnect",
                        
    1);
      
    dword_879C794 sub_810DD70(
                        (
    unsigned int)"maps/mp/gametypes/_callbacksetup",
                        (
    unsigned int)"CodeCallback_PlayerDisconnect",
                        
    1);
      
    dword_879C798 sub_810DD70(
                        (
    unsigned int)"maps/mp/gametypes/_callbacksetup",
                        (
    unsigned int)"CodeCallback_PlayerDamage",
                        
    1);
      
    result sub_810DD70((unsigned int)"maps/mp/gametypes/_callbacksetup", (unsigned int)"CodeCallback_PlayerKilled"1);
      
    dword_879C79C result;
      return 
    result;

    gametype_scripts should be 0x0810DDEE and codscript_load_function should be 0x0810DD70.
    https://github.com/kungfooman/libcod...ter/libcod.cpp (line 554 - 572)

    https://github.com/kungfooman/libcod.../functions.hpp
    PHP Code:
    static int trap_Argc()
    return *(
    int *)0x0819BE80;

    static 
    trap_Argv_t trap_Argv = (trap_Argv_t)0x08060074;

    static 
    ClientCommand_t ClientCommand = (ClientCommand_t)0x080FE998// search 'say_team' and see code xref function
    static int hook_ClientCommand_call 0x0808F281;

    static 
    codscript_call_callback_entity_t codscript_call_callback_entity = (codscript_call_callback_entity_t)0x08118DF4// search 'badMOD'

    static codscript_callback_finish_t codscript_callback_finish = (codscript_callback_finish_t)0x08083B8E
    PHP Code:
    int __cdecl sub_8115F2A(int a1int a2int a3int a4int a5unsigned int a6int a7int a8int a9int a10int a11)
    {
      
    unsigned __int16 v11// ax@1
      
    char **v12// eax@1
      
    unsigned __int16 v14// ST16_2@5

      
    sub_8084B1C(a11);
      
    v11 sub_81003E6(a10);
      
    sub_8084C8E(v11);
      
    sub_8115AA2(a9);
      
    sub_8115AA2(a8);
      
    v12 = (char **)sub_80E9270(a7);
      
    sub_8084C1A(*v12);
      if ( (
    signed int)a6 || a6 0xE )
        
    sub_8084C1A("badMOD");
      else
        
    sub_8084C1A((&off_81677C0)[a6]);
      
    sub_8084B1C(a5);
      
    sub_8084B1C(a4);
      
    sub_8115AC2(a3);
      
    sub_8115AC2(a2);
      
    v14 sub_8118DF4(a1dword_879C79810);
      return 
    sub_8083B8E(v14);

    My svn diff patches: patches.zip
    Last edited by Mitch; 17th November 2013 at 10:14.

  7. #15
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    My latest version (includes above all my updates)
    PHP Code:
    Indexdoit.sh
    ===================================================================
    --- 
    doit.sh    (revision 7)
    +++ 
    doit.sh    (working copy)
    @@ -
    49,+49,@@
         echo 
    "##### COMPILE GSC_ASTAR.CPP #####"
         
    $cc $options -c gsc_astar.cpp -o objects_normal/gsc_astar.opp
         
    echo "##### COMPILE GSC_MYSQL.CPP #####"
    -    $cc $options -c gsc_mysql.cpp -o objects_normal/gsc_mysql.opp -lmysqlclient -L/usr/lib/mysql
    +    $cc $options -c gsc_mysql.cpp -o objects_normal/gsc_mysql.opp -lmysqlclient -L./vendors/lib
         
    echo "##### COMPILE SERVER.CPP #####"
         
    $cc $options -c server.-o objects_normal/server.opp -D SERVER_PORT=8000
         
    echo "##### COMPILE GSC_MEMORY.CPP #####"
    @@ -122,13 +122,13 @@
     
         
    mkdir -p objects_$1
         
    echo "##### COMPILE $1 LIBCOD.CPP #####"
    -    #$cc $options $constants -o objects_$1/libcod.opp -c libcod.cpp
    +    $cc $options $constants -o objects_$1/libcod.opp -c libcod.cpp
         
    echo "##### COMPILE $1 GSC.CPP #####"
         
    $cc $options $constants -o objects_$1/gsc.opp -c gsc.cpp
         
    echo "##### COMPILE $1 GSC_PLAYER.CPP #####"
    -    #$cc $options $constants -o objects_$1/gsc_player.opp -c gsc_player.cpp
    +    $cc $options $constants -o objects_$1/gsc_player.opp -c gsc_player.cpp
         
    echo "##### COMPILE $1 GSC_UTILS.CPP #####"
    -    #$cc $options $constants -o objects_$1/gsc_utils.opp -c gsc_utils.cpp
    +    $cc $options $constants -o objects_$1/gsc_utils.opp -c gsc_utils.cpp
     
         
    echo "##### LINK lib$1.so #####"
         
    objects="$(ls objects_normal/*.opp) $(ls objects_$1/*.opp)"
    Indexfunctions.hpp
    ===================================================================
    --- 
    functions.hpp    (revision 7)
    +++ 
    functions.hpp    (working copy)
    @@ -
    6,+6,@@
     
    // CoD2 1.2 = 80601F2
     
    static int trap_Argc()
     {
    -    
    #if COD2_VERSION == COD2_VERSION_1_2
    +    #if COD2_VERSION == COD2_VERSION_1_0
    +        return *(int *)0x0819BE80;
    +    
    #elif COD2_VERSION == COD2_VERSION_1_2
             
    return *(int *)0x0819E080;
         
    #elif COD2_VERSION == COD2_VERSION_1_3
             
    return *(int *)0x0819F100;
    @@ -
    17,+19,@@
     }
     
     
    typedef int (*trap_Argv_t)(unsigned int paramchar *bufint bufLen);
    -
    #if COD2_VERSION == COD2_VERSION_1_2
    +#if COD2_VERSION == COD2_VERSION_1_0
    +    static trap_Argv_t trap_Argv = (trap_Argv_t)0x08060074;
    +
    #elif COD2_VERSION == COD2_VERSION_1_2
         
    static trap_Argv_t trap_Argv = (trap_Argv_t)0x08060280;
     
    #elif COD2_VERSION == COD2_VERSION_1_3
         
    static trap_Argv_t trap_Argv = (trap_Argv_t)0x08060278;
    @@ -
    28,+32,10 @@
     
     
     
    typedef int (*ClientCommand_t)(int clientNum);
    -
    #if COD2_VERSION == COD2_VERSION_1_2
    +#if COD2_VERSION == COD2_VERSION_1_0
    +    static ClientCommand_t ClientCommand = (ClientCommand_t)0x080FE998// search 'say_team' and see code xref function
    +    static int hook_ClientCommand_call 0x0808F281;
    +
    #elif COD2_VERSION == COD2_VERSION_1_2
         
    static ClientCommand_t ClientCommand = (ClientCommand_t)0x08100D1E;
         static 
    int hook_ClientCommand_call 0x08090B0C;
     
    #elif COD2_VERSION == COD2_VERSION_1_3
    @@ -42,+49,10 @@
     
    #endif
     
     
    typedef short (*codscript_call_callback_entity_t)(int selfint callbackint params);
    -
    #if COD2_VERSION == COD2_VERSION_1_2
    +#if COD2_VERSION == COD2_VERSION_1_0
    +    static codscript_call_callback_entity_t codscript_call_callback_entity = (codscript_call_callback_entity_t)0x08118DF4// search 'badMOD'
    +
    +
    #elif COD2_VERSION == COD2_VERSION_1_2
         
    static codscript_call_callback_entity_t codscript_call_callback_entity = (codscript_call_callback_entity_t)0x0811B128;
     
    #elif COD2_VERSION == COD2_VERSION_1_3
         
    static codscript_call_callback_entity_t codscript_call_callback_entity = (codscript_call_callback_entity_t)0x0811B284;
    @@ -
    52,+62,@@
     
    #endif
     
     
    typedef int (*codscript_callback_finish_t)(short callback_handle);
    -
    #if COD2_VERSION == COD2_VERSION_1_2
    +#if COD2_VERSION == COD2_VERSION_1_0
    +    static codscript_callback_finish_t codscript_callback_finish = (codscript_callback_finish_t)0x08083B8E;
    +
    #elif COD2_VERSION == COD2_VERSION_1_2
         
    static codscript_callback_finish_t codscript_callback_finish = (codscript_callback_finish_t)0x0808410A;
     
    #elif COD2_VERSION == COD2_VERSION_1_3
         
    static codscript_callback_finish_t codscript_callback_finish = (codscript_callback_finish_t)0x080841D6;
    @@ -
    61,+73,@@
         static 
    codscript_callback_finish_t codscript_callback_finish = (codscript_callback_finish_t)NULL;
     
    #endif
     
    -#endif
    No newline at end of file
    +#endif
    Indexgsc_player.cpp
    ===================================================================
    --- 
    gsc_player.cpp    (revision 7)
    +++ 
    gsc_player.cpp    (working copy)
    @@ -
    2,+2,10 @@
     
     
    #if COMPILE_PLAYER == 1
     
    -#if COD2_VERSION == COD2_VERSION_1_2
    +#if COD2_VERSION == COD2_VERSION_1_0
    +    int playerStates 0x086F1480// search 'winner'
    +    int sizeOfPlayer 0x28A4;
    +
    #elif COD2_VERSION == COD2_VERSION_1_2
         
    int playerStates 0x08705480// as in game initialisation "------- Game Initializati"
         
    int sizeOfPlayer 0x28A4;
         
    // memset(&playerStates_8705480, 0, 0xA2900u);  
    @@ -202,+205,@@
             return 
    stackReturnInt(0);
         }
     
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26FD);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FA7);
    @@ -
    227,+230,@@
             return 
    stackReturnInt(0);
         }
     
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26FD);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FA7);
    @@ -
    253,+256,@@
             return 
    stackReturnInt(0);
         }
         
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26FC);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FA6);
    @@ -
    279,+282,@@
             return 
    stackReturnInt(0);
         }
         
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26FC);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FA6);
    @@ -
    305,+308,@@
             return 
    stackReturnInt(0);
         }
     
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26E8);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FB4);
    @@ -
    332,+335,@@
             return 
    stackReturnInt(0);
         }
         
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26E8);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FB4);
    @@ -
    358,+361,@@
             return 
    stackReturnInt(0);
         }
         
    -    
    #if COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
    +    #if COD2_VERSION == COD2_VERSION_1_0 || COD2_VERSION == COD2_VERSION_1_2 || COD2_VERSION == COD2_VERSION_1_3
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x26E9);
         
    #elif COD_VERSION == COD4_1_7
             
    unsigned char *aim_address = (unsigned char *)(PLAYERSTATE(playerid) + 0x2FB5);
    @@ -
    546,+549,@@
         
    int ping = *(unsigned int *)(info_player info_port_offset);
         return 
    stackPushInt(ping);
     }
    -
    #endif
    No newline at end of file
    +#endif
    Indexlibcod.cpp
    ===================================================================
    --- 
    libcod.cpp    (revision 7)
    +++ 
    libcod.cpp    (working copy)
    @@ -
    552,+552,@@
     
     
     
    typedef void (*gametype_scripts_t)();
    -
    #if COD_VERSION == COD2_1_2
    +#if COD_VERSION == COD2_1_0
    +    gametype_scripts_t gametype_scripts = (gametype_scripts_t)0x0810DDEE
    +
    #elif COD_VERSION == COD2_1_2
         
    gametype_scripts_t gametype_scripts = (gametype_scripts_t)0x0811012A;
     
    #elif COD_VERSION == COD2_1_3
         
    gametype_scripts_t gametype_scripts = (gametype_scripts_t)0x08110286;
    @@ -
    562,+564,@@
     
    #endif
     
     
    typedef int (*codscript_load_function_t)(char *filechar *function, int isNeeded);
    -
    #if COD_VERSION == COD2_1_2
    +#if COD_VERSION == COD2_1_0
    +    codscript_load_function_t codscript_load_function = (codscript_load_function_t)0x0810DD70;
    +
    #elif COD_VERSION == COD2_1_2
         
    codscript_load_function_t codscript_load_function = (codscript_load_function_t)0x081100AC;
     
    #elif COD_VERSION == COD2_1_3
         
    codscript_load_function_t codscript_load_function = (codscript_load_function_t)0x08110208;
    @@ -
    1447,+1451,@@
         
             
    setbuf(stdoutNULL); // otherwise the printf()'s are printed at crash/end
     
    -        #if COD_VERSION == COD2_1_2
    +        #if COD_VERSION == COD2_1_0
    +            printf("> [INFO] Compiled for: CoD2 1.0\n");
    +        
    #elif COD_VERSION == COD2_1_2
                 
    printf("> [INFO] Compiled for: CoD2 1.2\n");
             
    #elif COD_VERSION == COD2_1_3
                 
    printf("> [INFO] Compiled for: CoD2 1.3\n");
    @@ -
    2008,+2014,@@
         return 
    rf;
     }
     
    -
    -
     
    #pragma GCC visibility pop
     
    -#endif
    No newline at end of file
    +#endif 
    io println, AWSD (left, forward, back, right), lean left/right, mysql and space works.

    (Currently available via https://github.com/M-itch/libcod)
    Last edited by Mitch; 17th November 2013 at 20:52.

  8. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (17th November 2013),YuriJurek (26th November 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •