ScummVM API documentation
bgen.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef HODJNPODJ_MANKALA_BGEN_H
23
#define HODJNPODJ_MANKALA_BGEN_H
24
25
#include "bagel/afxwin.h"
26
//include "bdbg.h"
27
28
namespace
Bagel {
29
namespace
HodjNPodj {
30
namespace
Mankala {
31
32
//define JX_DEBUG
33
#define JXENTER(NAME)
34
#define JXELEAVE(NAME)
35
#define RETURN return
36
37
// the following are machine-independent definitions of the
38
// largest positive signed and and unsigned integers and longs
39
#define MAXPOSINT ((int)(((unsigned int)-1) >> 1))
40
#define MAXPOSLONG ((long)(((unsigned long)-1L) >> 1))
41
#define MAXUINT ((unsigned int)-1)
42
#define MAXULONG ((unsigned long)-1L)
43
#define MINNEGINT (-MAXPOSINT-1)
44
#define MINNEGLONG (-MAXPOSLONG-1)
45
46
#define DIMENSION(a) (ARRAYSIZE(a))
47
#define UPPERBOUND(a) (DIMENSION(a) - 1)
48
49
typedef
char
*XPSTR;
50
51
// RGB colors
52
#define RGBCOLOR_RED RGB(255, 0, 0)
53
#define RGBCOLOR_GREEN RGB( 0, 255, 0)
54
#define RGBCOLOR_BLUE RGB( 0, 0, 255)
55
#define RGBCOLOR_YELLOW RGB(255, 255, 0)
56
#define RGBCOLOR_MAGENTA RGB(255, 0, 255)
57
#define RGBCOLOR_CYAN RGB( 0, 255, 255)
58
#define RGBCOLOR_BLACK RGB( 0, 0, 0)
59
#define RGBCOLOR_GREY RGB(128, 128, 128)
60
#define RGBCOLOR_BROWN RGB(128, 128, 0)
61
#define RGBCOLOR_PURPLE RGB(128, 0, 128)
62
#define RGBCOLOR_AQUA RGB( 0, 128, 128)
63
#define RGBCOLOR_WHITE RGB(255, 255, 255)
64
65
// mouse button click types
66
#define CLICK_UMOVE 1
67
#define CLICK_LDOWN 2
68
#define CLICK_LMOVE 3
69
#define CLICK_LUP 4
70
#define CLICK_LDOUBLE 5
71
#define CLICK_RDOWN 6
72
#define CLICK_RMOVE 7
73
#define CLICK_RUP 8
74
#define CLICK_RDOUBLE 9
75
76
// ASCII characters
77
#define CCHBOF 1
/* beginning of file char (control A) */
78
#define CCHBKS 8
/* backspace */
79
#define CCHTAB 9
/* tab */
80
#define CCHLF 10
/* line feed - '\n' - newline */
81
#define CCHFF 12
/* form feed */
82
#define CCHCR 13
/* carriage return */
83
#define CCHLF 10
/* line feed */
84
#define CCHEOF 26
/* end of file char (control Z) */
85
#define CCHESC 27
/* escape */
86
#define CCHBL 32
/* blank */
87
#define CCHDIG(n) 48+n
/* 48-57 */
/* digits 0-9 */
88
#define CCHTXL 32
/* first text character */
89
#define CCHTXH 127
/* last text character */
90
91
#define CCHUND 95
/* underline */
92
#define CCHLPR '('
/* left paren */
93
#define CCHRPR ')'
/* right paren */
94
#define CCHQUO '"' /* quote */
95
#define CCHAPO '\'' /* apostrophe (single quote) */
96
#define CCHLCB '{' /* left curly bracket */
97
#define CCHRCB '}' /* right curly bracket */
98
#define CCHCOL ':'
99
#define CCHDOT '.'
100
101
#define CCHCTL(let) (let-'A'+1) /* control chars: A-Z */
102
103
/* old scan codes -- add 1000 to scan code from IBM PC keyboard */
104
#define SCANMIN 1000 /* minimum scan code */
105
106
#define SCANF(dig) (1058+dig) /* function keys: 1059-1068 */
107
#define SCANSF(dig) (1083+dig) /* shift function keys: 1084-1093 */
108
#define SCANCF(dig) (1093+dig) /* control function keys: 1094-1103 */
109
#define SCANAF(dig) (1103+dig) /* alt function keys: 1104-1113 */
110
111
// code to be used with Windows virtual key codes
112
#define CCH_ALTKEY 0x100
113
#define CCH_CTRLKEY 0x200
114
#define CCH_SHFTKEY 0x400
115
#define ALTKEY(ch) ((ch)+CCH_ALTKEY)
116
#define CTRLKEY(ch) ((ch)+CCH_CTRLKEY)
117
#define SHFTKEY(ch) ((ch)+CCH_SHFTKEY)
118
119
inline bool EQV(bool b1, bool b2) {
120
return (b1 != 0) == (b2 != 0);
121
}
122
123
} // namespace Mankala
124
} // namespace HodjNPodj
125
} // namespace Bagel
126
127
#endif
engines
bagel
hodjnpodj
mankala
bgen.h
Generated on Sun Nov 22 2026 09:21:29 for ScummVM API documentation by
1.9.4