Changeset 474 for Daodan


Ignore:
Timestamp:
Oct 30, 2009, 9:52:50 AM (15 years ago)
Author:
rossy
Message:

some things

Location:
Daodan
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/BFW_ScriptLang.h

    r445 r474  
    3333} sl_callinfo;
    3434
    35 typedef uint16_t (ONICALL *sl_func)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret);
     35typedef uint16_t (ONICALL *sl_func)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret);
    3636
    3737uint16_t ONICALL SLrScript_Command_Register_ReturnType(char* name, char* desc, char* argfmt, sl_type type, sl_func callback);
  • Daodan/src/Daodan.c

    r473 r474  
    5353bool patch_cheater = true;
    5454
    55 bool patch_newweapon = true;
     55// bool patch_newweapon = true;
    5656
    5757bool opt_usedaodanbsl = true;
    5858bool opt_border = true;
    59 bool opt_shadow = true;
     59bool opt_shadow = false;
    6060bool opt_topmost = false;
    6161
  • Daodan/src/Daodan_BSL.c

    r470 r474  
    1717#include "Daodan_Character.h"
    1818
    19 uint16_t ONICALL bsl_int32mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     19uint16_t ONICALL bsl_int32mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    2020{
    2121        ret->value_int32 = args[0].value_int32 * args[1].value_int32;
     
    2424}
    2525
    26 uint16_t ONICALL bsl_mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     26uint16_t ONICALL bsl_mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    2727{
    2828        double val1;
     
    4444}
    4545
    46 uint16_t ONICALL bsl_int32div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     46uint16_t ONICALL bsl_int32div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    4747{
    4848        ret->value_int32 = args[0].value_int32 / args[1].value_int32;
     
    5151}
    5252
    53 uint16_t ONICALL bsl_div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     53uint16_t ONICALL bsl_div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    5454{
    5555        double val1;
     
    7171}
    7272
    73 uint16_t ONICALL bsl_int32rand(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     73uint16_t ONICALL bsl_int32rand(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    7474{
    7575        int32_t start = 0;
     
    9494}
    9595
    96 uint16_t ONICALL bsl_getkills(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     96uint16_t ONICALL bsl_getkills(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    9797{
    9898        int index;
     
    106106}
    107107
    108 uint16_t ONICALL bsl_getdamage(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     108uint16_t ONICALL bsl_getdamage(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    109109{
    110110        int index;
     
    118118}
    119119
    120 uint16_t ONICALL bsl_returnoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     120uint16_t ONICALL bsl_returnoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    121121{
    122122        //int offset = 140;
     
    130130
    131131
    132 uint16_t ONICALL bsl_powerup(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     132uint16_t ONICALL bsl_powerup(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    133133{
    134134        int index;
     
    191191}
    192192
    193 uint16_t ONICALL bsl_health(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     193uint16_t ONICALL bsl_health(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    194194{
    195195        int index;
     
    211211}
    212212
    213 uint16_t ONICALL bsl_regen(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     213uint16_t ONICALL bsl_regen(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    214214{
    215215        int index;
     
    232232
    233233
    234 uint16_t ONICALL bsl_maxhealth(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     234uint16_t ONICALL bsl_maxhealth(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    235235{
    236236        int index;
     
    253253}
    254254
    255 uint16_t ONICALL bsl_getattacker(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     255uint16_t ONICALL bsl_getattacker(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    256256{
    257257        //broken
     
    272272
    273273
    274 uint16_t ONICALL bsl_chrname(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     274uint16_t ONICALL bsl_chrname(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    275275{
    276276        int index;
     
    295295
    296296
    297 uint16_t ONICALL bsl_count(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     297uint16_t ONICALL bsl_count(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    298298{
    299299        //testing numargs...
     
    303303}
    304304
    305 uint16_t ONICALL bsl_dprintcolored(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     305uint16_t ONICALL bsl_dprintcolored(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    306306{
    307307        //TODO: figure out why our implementation of dprint shows after dev mode is turned off
     
    330330
    331331
    332 uint16_t ONICALL bsl_nametoindex(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     332uint16_t ONICALL bsl_nametoindex(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    333333{
    334334        ret->type = sl_int32;
     
    337337}
    338338
    339 uint16_t ONICALL bsl_getactiveoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     339uint16_t ONICALL bsl_getactiveoffset(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    340340{
    341341        DDrConsole_PrintF("Character: 0x%x",(int)ONgGameState + 0x1260);
     
    394394        {"Fire3", Action2_Fire3                       }
    395395};
    396 uint16_t ONICALL bsl_holdkey(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     396uint16_t ONICALL bsl_holdkey(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    397397        {
    398398                int index;
     
    425425}
    426426       
    427 uint16_t ONICALL bsl_isheld(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     427uint16_t ONICALL bsl_isheld(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    428428        {
    429429//              int index;
     
    506506
    507507/*
    508 uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     508uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    509509{
    510510        if (numargs < 2)
     
    522522}
    523523*/
    524 uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], void* dontuse1, void* dontuse2, sl_arg* ret)
     524uint16_t ONICALL bsl_sprintf(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    525525{
    526526        if (numargs < 1 || args[0].type != sl_str32)
     
    577577
    578578// 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)
     579uint16_t ONICALL cinematic_start_patch(sl_callinfo* callinfo, unsigned int numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret)
    580580{
    581581        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  
    99
    1010oniCheatCode 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 },
    4343        {0}
    4444};
     
    240240                }
    241241                case cheat_tellmetheversion:
    242                 {
    243242                        return 1;
    244                 }
    245243                case cheat_x:
    246244                        return ONrCheater(cheat_thedayismine);
     
    255253}
    256254
     255// Biggest hack in the entire thing ^_^
    257256__stdcall void FallingFrames(void* Ebp)
    258257{
  • Daodan/src/daodan_gl.c

    r473 r474  
    242242                Rect.right = Rect.left + gl->DisplayMode.Width;
    243243                Rect.bottom = Rect.top + gl->DisplayMode.Height;
    244                 //http://msdn.microsoft.com/en-us/library/ms632665(VS.85).aspx
    245                 //dwStyle
    246                 //[in] Specifies the window style of the window whose required size is to be calculated. Note that you cannot specify the WS_OVERLAPPED style.
    247244                AdjustWindowRect(&Rect, WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_CAPTION, TRUE);
    248245               
     
    270267       
    271268        if (gl_gamma_ramp_valid)
    272                 //Its working now
    273269                daodan_set_gamma(ONrPersist_GetGamma()); 
    274270        else
Note: See TracChangeset for help on using the changeset viewer.