- Timestamp:
- Jul 18, 2009, 8:20:32 AM (15 years ago)
- Location:
- Daodan/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan_BSL.c
r441 r442 20 20 { 21 21 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; 44 27 ret->type = sl_int32; 45 28 return 0; 29 46 30 } 47 31 32 uint16_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 } 48 44 49 45 uint16_t ONICALL bsl_mul(void* dontuse0, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) … … 106 102 return 1; 107 103 108 109 <<<<<<< .mine110 104 char output[255]; 111 105 char temp[255]; … … 166 160 SLrScript_Command_Register_ReturnType("sprintf", "sprintf", "str1:format str2:value [str3:...]", sl_str32, bsl_sprintf); 167 161 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); 170 164 171 165 dsfmt_gv_init_gen_rand((uint32_t)time(NULL)); 172 166 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 174 168 } -
Daodan/src/Oni_Symbols.S
r439 r442 52 52 symbol ( @ONrGameState_NewCharacter@16 , 0x000dac50 ) 53 53 symbol ( @ONrGameState_GetPlayerCharacter@0 , 0x000b63a7 ) 54 symbol ( @ONrGetActiveCharacter@4 , 0x000f1180 ) 55 // Console 54 56 55 // Console 57 symbol ( @TSrContext_DrawText@20 , 0x0002DF00 ) 58 symbol ( @TSrContext_New@24 , 0x0002EA30 ) 59 symbol ( @TMrInstance_GetDataPtr@12 , 0x000232E0 ) 60 56 61 symbol ( @COrTextArea_Print@28 , 0x00031340 ) 57 62 symbol ( _COgConsoleLines , 0x001cb468 ) … … 62 67 // ScriptingLanguage 63 68 symbol ( @SLrScript_Command_Register_ReturnType@20 , 0x00077b20 ) 69
Note:
See TracChangeset
for help on using the changeset viewer.