| 16 |
|
#include "dSFMT\dSFMT.h" |
| 17 |
|
#include "Daodan_Character.h" |
| 18 |
|
|
| 19 |
< |
uint16_t ONICALL bsl_int32mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 19 |
> |
uint16_t ONICALL bsl_int32mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 20 |
|
{ |
| 21 |
|
ret->value_int32 = args[0].value_int32 * args[1].value_int32; |
| 22 |
|
ret->type = sl_int32; |
| 23 |
|
return 0; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
< |
uint16_t ONICALL bsl_mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 26 |
> |
uint16_t ONICALL bsl_mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 27 |
|
{ |
| 28 |
|
double val1; |
| 29 |
|
double val2; |
| 43 |
|
return 0; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
< |
uint16_t ONICALL bsl_int32div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 46 |
> |
uint16_t ONICALL bsl_int32div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 47 |
|
{ |
| 48 |
|
ret->value_int32 = args[0].value_int32 / args[1].value_int32; |
| 49 |
|
ret->type = sl_int32; |
| 50 |
|
return 0; |
| 51 |
|
} |
| 52 |
|
|
| 53 |
< |
uint16_t ONICALL bsl_div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 53 |
> |
uint16_t ONICALL bsl_div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 54 |
|
{ |
| 55 |
|
double val1; |
| 56 |
|
double val2; |
| 70 |
|
return 0; |
| 71 |
|
} |
| 72 |
|
|
| 73 |
< |
uint16_t ONICALL bsl_int32rand(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 73 |
> |
uint16_t ONICALL bsl_int32rand(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 74 |
|
{ |
| 75 |
|
int32_t start = 0; |
| 76 |
|
int32_t end = 0; |
| 93 |
|
return 0; |
| 94 |
|
} |
| 95 |
|
|
| 96 |
< |
uint16_t ONICALL bsl_getkills(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 96 |
> |
uint16_t ONICALL bsl_getkills(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 97 |
|
{ |
| 98 |
|
int index; |
| 99 |
|
if (numargs == 0) index = 0; |
| 105 |
|
return 0; |
| 106 |
|
} |
| 107 |
|
|
| 108 |
< |
uint16_t ONICALL bsl_getdamage(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 108 |
> |
uint16_t ONICALL bsl_getdamage(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 109 |
|
{ |
| 110 |
|
int index; |
| 111 |
|
if (numargs == 0) index = 0; |
| 117 |
|
return 0; |
| 118 |
|
} |
| 119 |
|
|
| 120 |
< |
uint16_t ONICALL bsl_returnoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 120 |
> |
uint16_t ONICALL bsl_returnoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 121 |
|
{ |
| 122 |
|
//int offset = 140; |
| 123 |
|
//if (== 1) offset = 148; |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
|
| 132 |
< |
uint16_t ONICALL bsl_powerup(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 132 |
> |
uint16_t ONICALL bsl_powerup(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 133 |
|
{ |
| 134 |
|
int index; |
| 135 |
|
if (numargs < 2 || args[1].type != sl_str32) return 1; |
| 190 |
|
return 0; |
| 191 |
|
} |
| 192 |
|
|
| 193 |
< |
uint16_t ONICALL bsl_health(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 193 |
> |
uint16_t ONICALL bsl_health(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 194 |
|
{ |
| 195 |
|
int index; |
| 196 |
|
if (numargs == 0) index = 0; |
| 210 |
|
return 0; |
| 211 |
|
} |
| 212 |
|
|
| 213 |
< |
uint16_t ONICALL bsl_regen(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 213 |
> |
uint16_t ONICALL bsl_regen(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 214 |
|
{ |
| 215 |
|
int index; |
| 216 |
|
if (numargs == 0) index = 0; |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
|
| 234 |
< |
uint16_t ONICALL bsl_maxhealth(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 234 |
> |
uint16_t ONICALL bsl_maxhealth(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 235 |
|
{ |
| 236 |
|
int index; |
| 237 |
|
if (numargs == 0) index = 0; |
| 252 |
|
return 0; |
| 253 |
|
} |
| 254 |
|
|
| 255 |
< |
uint16_t ONICALL bsl_getattacker(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 255 |
> |
uint16_t ONICALL bsl_getattacker(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 256 |
|
{ |
| 257 |
|
//broken |
| 258 |
|
|
| 271 |
|
|
| 272 |
|
|
| 273 |
|
|
| 274 |
< |
uint16_t ONICALL bsl_chrname(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 274 |
> |
uint16_t ONICALL bsl_chrname(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 275 |
|
{ |
| 276 |
|
int index; |
| 277 |
|
if (numargs == 0) index = 0; |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
|
| 297 |
< |
uint16_t ONICALL bsl_count(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 297 |
> |
uint16_t ONICALL bsl_count(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 298 |
|
{ |
| 299 |
|
//testing numargs... |
| 300 |
|
ret->type = sl_int32; |
| 302 |
|
return 0; |
| 303 |
|
} |
| 304 |
|
|
| 305 |
< |
uint16_t ONICALL bsl_dprintcolored(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 305 |
> |
uint16_t ONICALL bsl_dprintcolored(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 306 |
|
{ |
| 307 |
|
//TODO: figure out why our implementation of dprint shows after dev mode is turned off |
| 308 |
|
RGBA color; |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
|
| 332 |
< |
uint16_t ONICALL bsl_nametoindex(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 332 |
> |
uint16_t ONICALL bsl_nametoindex(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 333 |
|
{ |
| 334 |
|
ret->type = sl_int32; |
| 335 |
|
ret->value_int32 = DDrGetCharacterIndexFromName(args[0].value_str32); |
| 336 |
|
return 0; |
| 337 |
|
} |
| 338 |
|
|
| 339 |
< |
uint16_t ONICALL bsl_getactiveoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 339 |
> |
uint16_t ONICALL bsl_getactiveoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 340 |
|
{ |
| 341 |
|
DDrConsole_PrintF("Character: 0x%x",(int)ONgGameState + 0x1260); |
| 342 |
|
DDrConsole_PrintF("ActiveChar: 0x%x",(int)ONrGetActiveCharacter((void*)((int)ONgGameState + 0x1260))); |
| 393 |
|
{"Fire2", Action2_Fire2 }, |
| 394 |
|
{"Fire3", Action2_Fire3 } |
| 395 |
|
}; |
| 396 |
< |
uint16_t ONICALL bsl_holdkey(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 396 |
> |
uint16_t ONICALL bsl_holdkey(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 397 |
|
{ |
| 398 |
|
int index; |
| 399 |
|
if (numargs < 4) index = 0; |
| 424 |
|
return 0; |
| 425 |
|
} |
| 426 |
|
|
| 427 |
< |
uint16_t ONICALL bsl_isheld(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 427 |
> |
uint16_t ONICALL bsl_isheld(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 428 |
|
{ |
| 429 |
|
// int index; |
| 430 |
|
// if (numargs < 4) index = 0; |
| 505 |
|
} |
| 506 |
|
|
| 507 |
|
/* |
| 508 |
< |
uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 508 |
> |
uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 509 |
|
{ |
| 510 |
|
if (numargs < 2) |
| 511 |
|
return 1; |
| 521 |
|
return 0; |
| 522 |
|
} |
| 523 |
|
*/ |
| 524 |
< |
uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 524 |
> |
uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 525 |
|
{ |
| 526 |
|
if (numargs < 1 || args[0].type != sl_str32) |
| 527 |
|
{ |
| 576 |
|
} |
| 577 |
|
|
| 578 |
|
// Widescreen patch for talking heads. |
| 579 |
< |
uint16_t ONICALL cinematic_start_patch(sl_callinfo* callinfo, unsigned int numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret) |
| 579 |
> |
uint16_t ONICALL cinematic_start_patch(sl_callinfo* callinfo, unsigned int numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 580 |
|
{ |
| 581 |
|
args[1].value_int32 = (double)args[1].value_int32 / (double)(gl->DisplayMode.Width) * (4.0 / 3.0 * (double)(gl->DisplayMode.Height)); |
| 582 |
|
return ((sl_func)(OniExe + 0x000f3830))(callinfo, numargs, args, dontuse1, dontuse2, ret); |