XenevaOS
Loading...
Searching...
No Matches
XenevaOS
Process
Doomgeneric
m_cheat.h
Go to the documentation of this file.
1
//
2
// Copyright(C) 1993-1996 Id Software, Inc.
3
// Copyright(C) 2005-2014 Simon Howard
4
//
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License
7
// as published by the Free Software Foundation; either version 2
8
// of the License, or (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// DESCRIPTION:
16
// Cheat code checking.
17
//
18
19
20
#ifndef __M_CHEAT__
21
#define __M_CHEAT__
22
23
//
24
// CHEAT SEQUENCE PACKAGE
25
//
26
27
// declaring a cheat
28
29
#define CHEAT(value, parameters) \
30
{ value, sizeof(value) - 1, parameters, 0, 0, "" }
31
32
#define MAX_CHEAT_LEN 25
33
#define MAX_CHEAT_PARAMS 5
34
35
typedef
struct
36
{
37
// settings for this cheat
38
39
char
sequence[
MAX_CHEAT_LEN
];
40
size_t
sequence_len
;
41
int
parameter_chars
;
42
43
// state used during the game
44
45
size_t
chars_read
;
46
int
param_chars_read
;
47
char
parameter_buf[
MAX_CHEAT_PARAMS
];
48
}
cheatseq_t
;
49
50
int
51
cht_CheckCheat
52
(
cheatseq_t
* cht,
53
char
key );
54
55
56
void
57
cht_GetParam
58
(
cheatseq_t
* cht,
59
char
* buffer );
60
61
62
#endif
cht_CheckCheat
int cht_CheckCheat(cheatseq_t *cht, char key)
Definition
m_cheat.c:36
MAX_CHEAT_PARAMS
#define MAX_CHEAT_PARAMS
Definition
m_cheat.h:33
cht_GetParam
void cht_GetParam(cheatseq_t *cht, char *buffer)
Definition
m_cheat.c:83
MAX_CHEAT_LEN
#define MAX_CHEAT_LEN
Definition
m_cheat.h:32
cheatseq_t
Definition
m_cheat.h:36
cheatseq_t::param_chars_read
int param_chars_read
Definition
m_cheat.h:46
cheatseq_t::parameter_chars
int parameter_chars
Definition
m_cheat.h:41
cheatseq_t::chars_read
size_t chars_read
Definition
m_cheat.h:45
cheatseq_t::sequence_len
size_t sequence_len
Definition
m_cheat.h:40
Generated by
1.9.8