ScummVM API documentation
stdinc.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef BAGEL_BOFLIB_STDINC_H
24 #define BAGEL_BOFLIB_STDINC_H
25 
26 #include "common/scummsys.h"
27 #include "common/rect.h"
28 #include "bagel/afxwin.h"
29 
30 namespace Bagel {
31 
32 /*
33  * Normal types
34  */
35 typedef void *(*BofCallback)(int, void *);
36 
37 typedef long Fixed;
38 
39 /*
40  * Extended types
41  */
42 struct StSize {
43  int cx;
44  int cy;
45 };
46 
47 struct StPoint {
48  int x;
49  int y;
50 };
51 
52 struct Vector {
53  double x;
54  double y;
55  double z;
56 };
57 
58 struct WindowPos {
59  void *hwnd = nullptr;
60  void *hwndinsertAfter = nullptr;
61  int x = 0;
62  int y = 0;
63  int cx = 0;
64  int cy = 0;
65  uint32 flags = 0;
66 };
67 
68 #define MAKE_WORD(a, b) ((uint16)(((byte)(a)) | ((uint16)((byte)(b))) << 8))
69 #define MAKE_LONG(low, high) ((int32)(((uint16)(low)) | (((uint32)((uint16)(high))) << 16)))
70 
71 /* For big-endian platforms (i.e. MAC) */
72 #define SWAPWORD(x) MAKE_WORD(HIBYTE(x), LOBYTE(x))
73 #define SWAPLONG(x) MAKE_LONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x)))
74 
75 #ifndef MAX_FNAME
76  #define MAX_FNAME 256
77 #endif
78 
79 #define MAX_DIRPATH 256
80 
81 #ifndef PDFT
82  #define PDFT(VALUE) = VALUE
83 #endif
84 
85 /*
86 * normal types
87 */
88 #define VIRTUAL virtual
89 #define STATIC static
90 #define CDECL
91 #define INLINE inline
92 
93 } // namespace Bagel
94 
95 #endif
Definition: stdinc.h:52
Definition: stdinc.h:42
Definition: stdinc.h:58
Definition: afxwin.h:27
Definition: stdinc.h:47