| 9 |
|
#include "../Daodan.h" |
| 10 |
|
#include "../Daodan_Config.h" |
| 11 |
|
#include "Cheater.h" |
| 12 |
+ |
#include "Input.h" |
| 13 |
+ |
#include "Utility.h" |
| 14 |
|
|
| 15 |
|
union MSVC_EVIL_FLOAT_HACK |
| 16 |
|
{ |
| 294 |
|
if (inc_fallingframes) |
| 295 |
|
++*((unsigned int*)((char*)Ebp + 0xf6)); |
| 296 |
|
} |
| 297 |
< |
|
| 297 |
> |
|
| 298 |
> |
|
| 299 |
> |
static void BindableCheatCallback (CustomActionCallbackArgument cheatnum) { |
| 300 |
> |
uint8_t res = DDrCheater (cheatnum); |
| 301 |
> |
if (res) |
| 302 |
> |
COrMessage_Print(DDr_CheatTable[cheatnum].message_on, 0, 240); |
| 303 |
> |
else |
| 304 |
> |
COrMessage_Print(DDr_CheatTable[cheatnum].message_off, 0, 240); |
| 305 |
> |
} |
| 306 |
> |
|
| 307 |
> |
void InitBindableCheats() { |
| 308 |
> |
oniCheatCode* cur; |
| 309 |
> |
for (cur = DDr_CheatTable; cur->name != 0; cur++) { |
| 310 |
> |
// char* val = malloc(20); |
| 311 |
> |
// sprintf(val, "cheat_%s", cur->name); |
| 312 |
> |
Input_RegisterCustomAction (cur->name, EVENT_KEYPRESS, 0, BindableCheatCallback, cur->func); |
| 313 |
> |
} |
| 314 |
> |
} |
| 315 |
> |
|