Implenented POBOYS cheat as equivalent to D2's DELSHIFTB

This commit is contained in:
zicodxx 2010-07-17 12:08:45 +00:00
parent 4fdbda1689
commit 23660d8040
3 changed files with 16 additions and 2 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
main/gamesave.c, main/render.c: Removed OGL hack to fix overlapping room in D1 lvl19 and rather move vertex a little. Still a hack but now without messing Depth test
main/gameseg.c, main/render.c: Instead of screwing by possibly using negative array indicies in find_seg_side() return -1. In ordering segments make this result in unimportant order; Taking in some Asserts which were disabled years ago by me. Let's fix this for real when we get to it
main/game.c, main/gamecntl.c: Implenented POBOYS cheat as equivalent to D2's DELSHIFTB
20100716
--------

View file

@ -927,6 +927,7 @@ extern int cheat_cloak_index;
extern int cheat_shield_index;
extern int cheat_warp_index;
extern int cheat_astral_index;
extern int cheat_poboys_index;
extern int cheat_turbomode_index;
extern int cheat_wowie2_index;
extern int cheat_newlife_index;
@ -962,8 +963,7 @@ window *game_setup(void)
Endlevel_sequence = 0;
cheat_enable_index = 0;
cheat_wowie_index = cheat_allkeys_index = cheat_invuln_index = cheat_cloak_index = cheat_shield_index = cheat_warp_index = cheat_astral_index = 0;
cheat_turbomode_index = cheat_wowie2_index = 0;
cheat_wowie_index = cheat_allkeys_index = cheat_invuln_index = cheat_cloak_index = cheat_shield_index = cheat_warp_index = cheat_astral_index = cheat_poboys_index = cheat_turbomode_index = cheat_wowie2_index = 0;
set_screen_mode(SCREEN_GAME);
game_wind = window_create(&grd_curscreen->sc_canvas, 0, 0, SWIDTH, SHEIGHT, game_handler, NULL);

View file

@ -938,6 +938,7 @@ ubyte cheat_cloak[] = {KEY_G,KEY_U,KEY_I,KEY_L,KEY_E};
ubyte cheat_shield[] = {KEY_T,KEY_W,KEY_I,KEY_L,KEY_I,KEY_G,KEY_H,KEY_T};
ubyte cheat_warp[] = {KEY_F,KEY_A,KEY_R,KEY_M,KEY_E,KEY_R,KEY_J,KEY_O,KEY_E};
ubyte cheat_astral[] = {KEY_A,KEY_S,KEY_T,KEY_R,KEY_A,KEY_L};
ubyte cheat_poboys[] = {KEY_P,KEY_O,KEY_B,KEY_O,KEY_Y,KEY_S};
#define NUM_NEW_CHEATS 5
ubyte new_cheats[]= { KEY_B^0xaa, KEY_B^0xaa, KEY_B^0xaa, KEY_F^0xaa, KEY_A^0xaa,
@ -954,6 +955,7 @@ KEY_N^0xaa, KEY_D^0xaa, KEY_X^0xaa, KEY_X^0xaa, KEY_A^0xaa };
#define CHEAT_SHIELD_LENGTH (sizeof(cheat_shield) / sizeof(*cheat_shield))
#define CHEAT_WARP_LENGTH (sizeof(cheat_warp) / sizeof(*cheat_warp))
#define CHEAT_ASTRAL_LENGTH (sizeof(cheat_astral) / sizeof(*cheat_astral))
#define CHEAT_POBOYS_LENGTH (sizeof(cheat_poboys) / sizeof(*cheat_poboys))
#define CHEAT_TURBOMODE_OFS 0
#define CHEAT_WOWIE2_OFS 1
@ -973,6 +975,7 @@ int cheat_cloak_index;
int cheat_shield_index;
int cheat_warp_index;
int cheat_astral_index;
int cheat_poboys_index;
int cheat_turbomode_index;
int cheat_wowie2_index;
int cheat_newlife_index;
@ -1176,6 +1179,16 @@ void FinalCheats(int key)
else
cheat_astral_index = 0;
if (!(Game_mode&GM_MULTI) && key == cheat_poboys[cheat_poboys_index]) {
if (++cheat_poboys_index == CHEAT_POBOYS_LENGTH) {
digi_play_sample( SOUND_CHEATER, F1_0);
kill_and_so_forth();
cheat_poboys_index = 0;
}
}
else
cheat_poboys_index = 0;
if (!(Game_mode&GM_MULTI) && key == (0xaa^new_cheats[cheat_turbomode_index*NUM_NEW_CHEATS+CHEAT_TURBOMODE_OFS])) {
if (++cheat_turbomode_index == CHEAT_TURBOMODE_LENGTH) {
Game_turbo_mode ^= 1;