ScummVM API documentation
m4_types.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 M4_M4_TYPES_H
23 #define M4_M4_TYPES_H
24 
25 #include "common/scummsys.h"
26 
27 namespace M4 {
28 
29 #define MAX_STRING_SIZE 144
30 #define MAX_STRING_LEN 144
31 #define MAX_FILENAME_SIZE 144
32 #define MIN_VIDEO_X 0
33 #define MIN_VIDEO_Y 0
34 #define MAX_VIDEO_X 639
35 #define MAX_VIDEO_Y 479
36 #define VIDEO_W 640
37 #define VIDEO_H 480
38 
39 typedef void *Ptr;
40 typedef void *Handle;
41 
46 typedef intptr frac16;
47 
48 typedef uint32 ulong;
49 typedef uint32 quadchar;
50 typedef uint32 trigraph;
51 
52 typedef byte Bit;
53 typedef byte Bool;
54 typedef byte boolean;
55 typedef byte Boolean;
56 typedef byte byte;
57 typedef byte Byte;
58 typedef uint16 word;
59 typedef uint16 Word;
60 typedef uint32 DWord;
61 
62 enum {
63  TRIG_INV_CLICK = 32000,
64  TRIG_RESTORE_GAME
65 };
66 
67 struct Buffer {
68  int32 w;
69  int32 h;
70  uint8 *data;
71  uint8 encoding;
72  int32 stride;
73 
74  uint8 *getBasePtr(int x, int y) {
75  return data + y * w + x;
76  }
77  const uint8 *getBasePtr(int x, int y) const {
78  return data + y * w + x;
79  }
80 };
81 
82 struct token {
83  char *sym_name;
84  int32 tag;
85 };
86 
87 #include "common/pack-start.h" // START STRUCT PACKING
88 struct RGB8 {
89  byte r, g, b;
90 } PACKED_STRUCT;
91 #include "common/pack-end.h" // END STRUCT PACKING
92 
93 typedef void (*FuncPtr)();
94 typedef bool (*FuncPtr_b_l)(int32);
95 typedef void (*FuncPtr_v_vv)(void *, void *);
96 
97 typedef FuncPtr_b_l ExceptionPtr;
98 
99 typedef FuncPtr_v_vv M4CALLBACK;
100 
101 } // namespace M4
102 
103 #endif
intptr frac16
Definition: m4_types.h:46
Definition: m4_types.h:88
Definition: m4_types.h:67
Definition: database.h:28
Definition: m4_types.h:82