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
28
namespace
Bagel
{
29
30
/*
31
* Normal types
32
*/
33
typedef
void
*(*BofCallback)(int,
void
*);
34
35
typedef
long
Fixed;
36
37
/*
38
* Extended types
39
*/
40
struct
StSize
{
41
int
cx;
42
int
cy;
43
};
44
45
struct
StPoint
{
46
int
x;
47
int
y;
48
};
49
50
struct
Vector
{
51
double
x;
52
double
y;
53
double
z;
54
};
55
56
struct
WindowPos
{
57
void
*hwnd =
nullptr
;
58
void
*hwndinsertAfter =
nullptr
;
59
int
x = 0;
60
int
y = 0;
61
int
cx = 0;
62
int
cy = 0;
63
uint32 flags = 0;
64
};
65
66
67
#ifndef LOBYTE
68
#define LOBYTE(w) ((byte)(w))
69
#endif
70
#ifndef HIBYTE
71
#define HIBYTE(w) ((byte)(((uint32)(w) >> 8) & 0xFF))
72
#endif
73
#ifndef LOWORD
74
#define LOWORD(l) ((uint16)(uint32)(l))
75
#endif
76
#ifndef HIWORD
77
#define HIWORD(l) ((uint16)((((uint32)(l)) >> 16) & 0xFFFF))
78
#endif
79
80
#define MAKE_WORD(a, b) ((uint16)(((byte)(a)) | ((uint16)((byte)(b))) << 8))
81
#define MAKE_LONG(low, high) ((int32)(((uint16)(low)) | (((uint32)((uint16)(high))) << 16)))
82
83
/* For big-endian platforms (i.e. MAC) */
84
#define SWAPWORD(x) MAKE_WORD(HIBYTE(x), LOBYTE(x))
85
#define SWAPLONG(x) MAKE_LONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x)))
86
87
#ifndef MAX_FNAME
88
#define MAX_FNAME 256
89
#endif
90
91
#define MAX_DIRPATH 256
92
93
}
// namespace Bagel
94
95
#endif
Bagel::Vector
Definition:
stdinc.h:50
Bagel::StSize
Definition:
stdinc.h:40
Bagel::WindowPos
Definition:
stdinc.h:56
Bagel
Definition:
bagel.h:31
Bagel::StPoint
Definition:
stdinc.h:45
engines
bagel
boflib
stdinc.h
Generated on Sun Dec 22 2024 09:09:42 for ScummVM API documentation by
1.8.13