Changeset 474
- Timestamp:
- Oct 30, 2009, 9:52:50 AM (15 years ago)
- Location:
- Daodan
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/BFW_ScriptLang.h
r445 r474 33 33 } sl_callinfo; 34 34 35 typedef uint16_t (ONICALL *sl_func)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret);35 typedef uint16_t (ONICALL *sl_func)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret); 36 36 37 37 uint16_t ONICALL SLrScript_Command_Register_ReturnType(char* name, char* desc, char* argfmt, sl_type type, sl_func callback); -
Daodan/src/Daodan.c
r473 r474 53 53 bool patch_cheater = true; 54 54 55 bool patch_newweapon = true;55 // bool patch_newweapon = true; 56 56 57 57 bool opt_usedaodanbsl = true; 58 58 bool opt_border = true; 59 bool opt_shadow = true;59 bool opt_shadow = false; 60 60 bool opt_topmost = false; 61 61 -
Daodan/src/Daodan_BSL.c
r470 r474 17 17 #include "Daodan_Character.h" 18 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 20 { 21 21 ret->value_int32 = args[0].value_int32 * args[1].value_int32; … … 24 24 } 25 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 27 { 28 28 double val1; … … 44 44 } 45 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 47 { 48 48 ret->value_int32 = args[0].value_int32 / args[1].value_int32; … … 51 51 } 52 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 54 { 55 55 double val1; … … 71 71 } 72 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 74 { 75 75 int32_t start = 0; … … 94 94 } 95 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 97 { 98 98 int index; … … 106 106 } 107 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 109 { 110 110 int index; … … 118 118 } 119 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 121 { 122 122 //int offset = 140; … … 130 130 131 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 133 { 134 134 int index; … … 191 191 } 192 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 194 { 195 195 int index; … … 211 211 } 212 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 214 { 215 215 int index; … … 232 232 233 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 235 { 236 236 int index; … … 253 253 } 254 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 256 { 257 257 //broken … … 272 272 273 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 275 { 276 276 int index; … … 295 295 296 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 298 { 299 299 //testing numargs... … … 303 303 } 304 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 306 { 307 307 //TODO: figure out why our implementation of dprint shows after dev mode is turned off … … 330 330 331 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 333 { 334 334 ret->type = sl_int32; … … 337 337 } 338 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 340 { 341 341 DDrConsole_PrintF("Character: 0x%x",(int)ONgGameState + 0x1260); … … 394 394 {"Fire3", Action2_Fire3 } 395 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 397 { 398 398 int index; … … 425 425 } 426 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 428 { 429 429 // int index; … … 506 506 507 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 509 { 510 510 if (numargs < 2) … … 522 522 } 523 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 525 { 526 526 if (numargs < 1 || args[0].type != sl_str32) … … 577 577 578 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 580 { 581 581 args[1].value_int32 = (double)args[1].value_int32 / (double)(gl->DisplayMode.Width) * (4.0 / 3.0 * (double)(gl->DisplayMode.Height)); -
Daodan/src/Daodan_Cheater.c
r473 r474 9 9 10 10 oniCheatCode DDr_CheatTable[] = { 11 { "shapeshifter", "Change Characters Enabled", "Change Characters Disabled", cheat_shapeshifter},12 { "liveforever", "Invincibility Enabled", "Invincibility Disabled", cheat_liveforever},13 { "touchofdeath", "Omnipotence Enabled", "Omnipotence Disabled", cheat_touchofdeath},14 { "canttouchthis", "Unstoppable Enabled", "Unstoppable Disabled", cheat_canttouchthis},15 { "fatloot", "Fat Loot Received", NULL, cheat_fatloot},16 { "glassworld", "Glass Furniture Enabled", "Glass Furniture Disabled", cheat_glassworld},17 { "winlevel", "Instantly Win Level", NULL, cheat_winlevel},18 { "loselevel", "Instantly Lose Level", NULL, cheat_loselevel},19 { "bighead", "Big Head Enabled", "Big Head Disabled", cheat_bighead},20 { "minime", "Mini Mode Enabled", "Mini Mode Disabled", cheat_minime},21 { "superammo", "Super Ammo Mode Enabled", "Super Ammo Mode Disabled", cheat_superammo},22 { "thedayismine", "Developer Access Enabled", "Developer Access Disabled", cheat_thedayismine},23 { "reservoirdogs", "Last Man Standing Enabled", "Last Man Standing Disabled", cheat_reservoirdogs},24 { "roughjustice", "Gatling Guns Enabled", "Gatling Guns Disabled", cheat_roughjustice},25 { "chenille", "Daodan Power Enabled", "Daodan Power Disabled", cheat_chenille},26 { "behemoth", "Godzilla Mode Enabled", "Godzilla Mode Disabled", cheat_behemoth},27 { "elderrune", "Regeneration Enabled", "Regeneration Disabled", cheat_elderrune},28 { "moonshadow", "Phase Cloak Enabled", "Phase Cloak Disabled", cheat_moonshadow},29 { "munitionfrenzy", "Weapons Locker Created", NULL, cheat_munitionfrenzy},30 { "fistsoflegend", "Fists Of Legend Enabled", "Fists Of Legend Disabled", cheat_fistsoflegend},31 { "killmequick", "Ultra Mode Enabled", "Ultra Mode Disabled", cheat_killmequick},32 { "carousel", "Slow Motion Enabled", "Slow Motion Disabled", cheat_carousel},33 { "bigbadboss", "Boss Shield Enabled", "Boss Shield Disabled", cheat_bigbadboss},34 { "bulletproof", "Force Field Enabled", "Force Field Disabled", cheat_bulletproof},35 { "kangaroo", "Alex Okita Mode Enabled", "Alex Okita Mode Disabled", cheat_kangaroo},36 { "himynameisalex", "Kangaroo Jump Enabled", "Kangaroo Jump Disabled", cheat_kangaroo},37 { "marypoppins", "Jet Pack Mode Enabled", "Jet Pack Mode Disabled", cheat_marypoppins},38 { "buddha", "Unkillable Enabled", "Unkillable Disabled", cheat_buddha},39 { "shinobi", "Ninja Mode Enabled (good luck!)", "Ninja Mode Disabled", cheat_shinobi},40 { "x", "Developer Access Enabled", "Developer Access Disabled", cheat_x},41 { "testcheat", "Testing...", "", cheat_testcheat},42 { "tellmetheversion", "Daodan v.3.0", "", cheat_tellmetheversion},11 { "shapeshifter", "Change Characters Enabled", "Change Characters Disabled", cheat_shapeshifter }, 12 { "liveforever", "Invincibility Enabled", "Invincibility Disabled", cheat_liveforever }, 13 { "touchofdeath", "Omnipotence Enabled", "Omnipotence Disabled", cheat_touchofdeath }, 14 { "canttouchthis", "Unstoppable Enabled", "Unstoppable Disabled", cheat_canttouchthis }, 15 { "fatloot", "Fat Loot Received", NULL, cheat_fatloot }, 16 { "glassworld", "Glass Furniture Enabled", "Glass Furniture Disabled", cheat_glassworld }, 17 { "winlevel", "Instantly Win Level", NULL, cheat_winlevel }, 18 { "loselevel", "Instantly Lose Level", NULL, cheat_loselevel }, 19 { "bighead", "Big Head Enabled", "Big Head Disabled", cheat_bighead }, 20 { "minime", "Mini Mode Enabled", "Mini Mode Disabled", cheat_minime }, 21 { "superammo", "Super Ammo Mode Enabled", "Super Ammo Mode Disabled", cheat_superammo }, 22 { "thedayismine", "Developer Access Enabled", "Developer Access Disabled", cheat_thedayismine }, 23 { "reservoirdogs", "Last Man Standing Enabled", "Last Man Standing Disabled", cheat_reservoirdogs }, 24 { "roughjustice", "Gatling Guns Enabled", "Gatling Guns Disabled", cheat_roughjustice }, 25 { "chenille", "Daodan Power Enabled", "Daodan Power Disabled", cheat_chenille }, 26 { "behemoth", "Godzilla Mode Enabled", "Godzilla Mode Disabled", cheat_behemoth }, 27 { "elderrune", "Regeneration Enabled", "Regeneration Disabled", cheat_elderrune }, 28 { "moonshadow", "Phase Cloak Enabled", "Phase Cloak Disabled", cheat_moonshadow }, 29 { "munitionfrenzy", "Weapons Locker Created", NULL, cheat_munitionfrenzy }, 30 { "fistsoflegend", "Fists Of Legend Enabled", "Fists Of Legend Disabled", cheat_fistsoflegend }, 31 { "killmequick", "Ultra Mode Enabled", "Ultra Mode Disabled", cheat_killmequick }, 32 { "carousel", "Slow Motion Enabled", "Slow Motion Disabled", cheat_carousel }, 33 { "bigbadboss", "Boss Shield Enabled", "Boss Shield Disabled", cheat_bigbadboss }, 34 { "bulletproof", "Force Field Enabled", "Force Field Disabled", cheat_bulletproof }, 35 { "kangaroo", "Alex Okita Mode Enabled", "Alex Okita Mode Disabled", cheat_kangaroo }, 36 { "himynameisalex", "Kangaroo Jump Enabled", "Kangaroo Jump Disabled", cheat_kangaroo }, 37 { "marypoppins", "Jet Pack Mode Enabled", "Jet Pack Mode Disabled", cheat_marypoppins }, 38 { "buddha", "Unkillable Enabled", "Unkillable Disabled", cheat_buddha }, 39 { "shinobi", "Ninja Mode Enabled (good luck!)", "Ninja Mode Disabled", cheat_shinobi }, 40 { "x", "Developer Access Enabled", "Developer Access Disabled", cheat_x }, 41 { "testcheat", "Testing...", "", cheat_testcheat }, 42 { "tellmetheversion", "Daodan v.3.0", "", cheat_tellmetheversion }, 43 43 {0} 44 44 }; … … 240 240 } 241 241 case cheat_tellmetheversion: 242 {243 242 return 1; 244 }245 243 case cheat_x: 246 244 return ONrCheater(cheat_thedayismine); … … 255 253 } 256 254 255 // Biggest hack in the entire thing ^_^ 257 256 __stdcall void FallingFrames(void* Ebp) 258 257 { -
Daodan/src/daodan_gl.c
r473 r474 242 242 Rect.right = Rect.left + gl->DisplayMode.Width; 243 243 Rect.bottom = Rect.top + gl->DisplayMode.Height; 244 //http://msdn.microsoft.com/en-us/library/ms632665(VS.85).aspx245 //dwStyle246 //[in] Specifies the window style of the window whose required size is to be calculated. Note that you cannot specify the WS_OVERLAPPED style.247 244 AdjustWindowRect(&Rect, WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_CAPTION, TRUE); 248 245 … … 270 267 271 268 if (gl_gamma_ramp_valid) 272 //Its working now273 269 daodan_set_gamma(ONrPersist_GetGamma()); 274 270 else
Note:
See TracChangeset
for help on using the changeset viewer.