Changeset 442


Ignore:
Timestamp:
Jul 18, 2009, 8:20:32 AM (12 years ago)
Author:
gumby
Message:
 
Location:
Daodan/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan_BSL.c

    r441 r442  
    2020{
    2121
    22         //void* GS = (short int**)(ONgGameState);
    23 
    24         //if (numargs < 2)
    25         //      return 1;
    26        
    27         //fix the AC struct :(
    28         //ret->value_int32 = ((ActiveCharacter *)(ONgGameState+0xB6268))->NumberOfKills;
    29         //short int index =;
    30         //char temp_bitset[2];
    31         int index2;
    32         if (numargs == 0) index2 = 0;
    33         else index2 = args[0].value_int32;
    34         char* active_index = ONgGameState + index2 * 0x16A0 +  0x1260 + 2;
    35         //index = *(*()+ 0x1260 +2);
    36         //ret->value_int32 = *((signed int*)(ONgGameState)) +0xB6268+(*(((signed int*)(ONgGameState)) + 0xAC)+2)*0x2838+0x1670;
    37         //ret->value_int32 = *(int*)(ONgGameState +0xB6268 + index2 * 0x2838 + 0x1670);
    38        
    39         //TODO: Clean up this mess...
    40 //      ret->value_int32 = *active_index;
    41        
    42         ret->value_int32 = ((uint32_t*)(ONgGameState +0xB6268+(int)(*active_index)*0x2838+0x1670));
    43 
     22        int index;
     23        if (numargs == 0) index = 0;
     24        else index = args[0].value_int32;
     25        int* killcount = ONgGameState + index * 0x16A0 +  0x1260 + 0x1670;
     26        ret->value_int32 = *killcount;
    4427        ret->type = sl_int32;
    4528        return 0;
     29
    4630}
    4731
     32uint16_t ONICALL bsl_getdamage(void* dontuse0, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     33{
     34
     35        int index;
     36        if (numargs == 0) index = 0;
     37        else index = args[0].value_int32;
     38        int* killcount = ONgGameState + index * 0x16A0 +  0x1260 + 0x1674;
     39        ret->value_int32 = *killcount;
     40        ret->type = sl_int32;
     41        return 0;
     42
     43}
    4844
    4945uint16_t ONICALL bsl_mul(void* dontuse0, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     
    106102                return 1;
    107103       
    108 
    109 <<<<<<< .mine
    110104        char output[255];
    111105        char temp[255];
     
    166160        SLrScript_Command_Register_ReturnType("sprintf", "sprintf", "str1:format str2:value [str3:...]", sl_str32, bsl_sprintf);
    167161
    168         SLrScript_Command_Register_ReturnType("getkills","Gets the number of kills", "[n1:int]", sl_int32, bsl_getkills);
    169 
     162        SLrScript_Command_Register_ReturnType("chr_getkills","Gets the number of kills a character has", "[chrindex:int]", sl_int32, bsl_getkills);
     163        SLrScript_Command_Register_ReturnType("chr_getdamage","Gets the amount of damage a character has caused", "[chrindex:int]", sl_int32, bsl_getdamage);
    170164       
    171165        dsfmt_gv_init_gen_rand((uint32_t)time(NULL));
    172166        SLrScript_Command_Register_ReturnType("int32rand", "Returns a pseudo-random number between two numbers (inclusive).", "start:int end:int", sl_int32, bsl_int32rand);
    173 >>>>>>> .r440
     167
    174168}
  • Daodan/src/Oni_Symbols.S

    r439 r442  
    5252symbol ( @ONrGameState_NewCharacter@16             , 0x000dac50 )
    5353symbol ( @ONrGameState_GetPlayerCharacter@0        , 0x000b63a7 )
     54symbol ( @ONrGetActiveCharacter@4                                  , 0x000f1180 )
     55// Console
    5456
    55 // Console
     57symbol ( @TSrContext_DrawText@20                         , 0x0002DF00 )
     58symbol ( @TSrContext_New@24                                      , 0x0002EA30 )
     59symbol ( @TMrInstance_GetDataPtr@12                      , 0x000232E0 )
     60
    5661symbol ( @COrTextArea_Print@28                     , 0x00031340 )
    5762symbol ( _COgConsoleLines                          , 0x001cb468 )
     
    6267// ScriptingLanguage
    6368symbol ( @SLrScript_Command_Register_ReturnType@20 , 0x00077b20 )
     69
Note: See TracChangeset for help on using the changeset viewer.