ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_BSL.c
(Generate patch)

Comparing Daodan/src/Daodan_BSL.c (file contents):
Revision 473 by gumby, Mon Oct 26 07:58:02 2009 UTC vs.
Revision 474 by rossy, Fri Oct 30 08:52:50 2009 UTC

# Line 16 | Line 16
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;
# Line 43 | Line 43 | uint16_t ONICALL bsl_mul(sl_callinfo* ca
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;
# Line 70 | Line 70 | uint16_t ONICALL bsl_div(sl_callinfo* ca
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;
# Line 93 | Line 93 | uint16_t ONICALL bsl_int32rand(sl_callin
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;
# Line 105 | Line 105 | uint16_t ONICALL bsl_getkills(sl_callinf
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;
# Line 117 | Line 117 | uint16_t ONICALL bsl_getdamage(sl_callin
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;
# Line 129 | Line 129 | uint16_t ONICALL bsl_returnoffset(sl_cal
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;
# Line 190 | Line 190 | uint16_t ONICALL bsl_powerup(sl_callinfo
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;
# Line 210 | Line 210 | uint16_t ONICALL bsl_health(sl_callinfo*
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;
# Line 231 | Line 231 | uint16_t ONICALL bsl_regen(sl_callinfo*
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;
# Line 252 | Line 252 | uint16_t ONICALL bsl_maxhealth(sl_callin
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          
# Line 271 | Line 271 | uint16_t ONICALL bsl_getattacker(sl_call
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;
# Line 294 | Line 294 | uint16_t ONICALL bsl_chrname(sl_callinfo
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;
# Line 302 | Line 302 | uint16_t ONICALL bsl_count(sl_callinfo*
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;
# Line 329 | Line 329 | uint16_t ONICALL bsl_dprintcolored(sl_ca
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)));
# Line 393 | Line 393 | KeyBit Actions2[9] = {
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;
# Line 424 | Line 424 | uint16_t ONICALL bsl_holdkey(sl_callinfo
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;
# Line 505 | Line 505 | uint16_t ONICALL bsl_waitforkey(sl_calli
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;
# Line 521 | Line 521 | uint16_t ONICALL bsl_sprintf(sl_callinfo
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          {
# Line 576 | Line 576 | uint16_t ONICALL bsl_sprintf(sl_callinfo
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)