XenevaOS
Loading...
Searching...
No Matches
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
35typedef struct
36{
37 // settings for this cheat
38
39 char sequence[MAX_CHEAT_LEN];
42
43 // state used during the game
44
45 size_t chars_read;
47 char parameter_buf[MAX_CHEAT_PARAMS];
49
50int
52( cheatseq_t* cht,
53 char key );
54
55
56void
58( cheatseq_t* cht,
59 char* buffer );
60
61
62#endif
int cht_CheckCheat(cheatseq_t *cht, char key)
Definition m_cheat.c:36
#define MAX_CHEAT_PARAMS
Definition m_cheat.h:33
void cht_GetParam(cheatseq_t *cht, char *buffer)
Definition m_cheat.c:83
#define MAX_CHEAT_LEN
Definition m_cheat.h:32
Definition m_cheat.h:36
int param_chars_read
Definition m_cheat.h:46
int parameter_chars
Definition m_cheat.h:41
size_t chars_read
Definition m_cheat.h:45
size_t sequence_len
Definition m_cheat.h:40