1 // Emacs style mode select -*- C++ -*- 2 //----------------------------------------------------------------------------- 3 // 4 // $Id: m_cheat.h 1112 2014-06-03 21:54:41Z smite-meister $ 5 // 6 // Copyright (C) 1993-1996 by id Software, Inc. 7 // Portions Copyright (C) 1998-2000 by DooM Legacy Team. 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // 20 // $Log: m_cheat.h,v $ 21 // Revision 1.3 2001/02/10 12:27:14 bpereira 22 // Revision 1.2 2000/02/27 00:42:10 hurdler 23 // Revision 1.1.1.1 2000/02/22 20:32:32 hurdler 24 // Initial import into CVS (v1.29 pr3) 25 // 26 // 27 // DESCRIPTION: 28 // Cheat code checking. 29 // 30 //----------------------------------------------------------------------------- 31 32 #ifndef M_CHEAT_M 33 #define M_CHEAT_M 34 35 #include "d_event.h" 36 // event_t 37 38 // 39 // CHEAT SEQUENCE PACKAGE 40 // 41 42 #define SCRAMBLE(a) \ 43 ((((a)&1)<<7) + (((a)&2)<<5) + ((a)&4) + (((a)&8)<<1) \ 44 + (((a)&16)>>1) + ((a)&32) + (((a)&64)>>5) + (((a)&128)>>7)) 45 46 typedef struct 47 { 48 byte* sequence; 49 byte* p; 50 51 } cheatseq_t; 52 53 int cht_CheckCheat ( cheatseq_t* cht, 54 char key ); 55 56 57 void cht_GetParam ( cheatseq_t* cht, 58 char* buffer ); 59 60 boolean cht_Responder (event_t* ev); 61 void cht_Init(); 62 63 void Command_CheatNoClip_f (void); 64 void Command_CheatGod_f (void); 65 void Command_CheatGimme_f (void); 66 67 #endif 68