aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/defs.h
blob: d1b5730a4018ba422af63729d8f8ffdd0d9dc40f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2006 The ScummVM project
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * $URL$
 * $Id$
 *
 */

#ifndef PARALLACTION_DEFS_H
#define PARALLACTION_DEFS_H

#include "common/stdafx.h"
#include "common/system.h"

namespace Parallaction {

#define PATH_LEN	200




struct Node {
	Node*	_prev;
	Node*	_next;

	Node() {
		_prev = NULL;
		_next = NULL;
	}
};

struct WalkNode : public Node {
	int32	_x;
	int32	_y;

public:
	WalkNode() : _x(0), _y(0) {
	}

	WalkNode(int32 x, int32 y) : _x(x), _y(y) {
	}

	WalkNode(const WalkNode& w) : _x(w._x), _y(w._y) {
	}

	void getPoint(Common::Point &p) const {
		p.x = _x;
		p.y = _y;
	}
};

struct SpeakData;
struct Question;
typedef Question Dialogue;
struct Instruction;
struct LocalVariable;

struct StaticCnv {
	uint16	_width; 	//
	uint16	_height;	//
	byte*	_data0; 	// bitmap
	byte*	_data1; 	// unused

	StaticCnv() {
		_width = _height = 0;
		_data0 = _data1 = NULL;
	}
};


struct Cnv {
	uint16	_width; 	//
	uint16	_height;	//
	byte**	field_8;	// unused
	uint16	_count; 	// # of frames
	byte**	_array; 	// frames data

public:
	Cnv() {
		_width = _height = _count = 0;
		_array = NULL;
	}

	byte* getFramePtr(uint16 index) {
		if (index >= _count)
			error("frame %i does not exist", index);
		return _array[index];
	}
};

struct Animation;
struct Zone;
struct Label;

struct Command;

typedef void (*callable)(void*);

struct Credit {
	const char *_role;
	const char *_name;
};

void errorFileNotFound(const char*);

void beep();

enum {
	kDebugDisk = 1 << 0,
	kDebugWalk = 1 << 1,
	kDebugLocation = 1 << 2,
	kDebugDialogue = 1 << 3,
	kDebugGraphics = 1 << 4,
	kDebugJobs = 1 << 5,
	kDebugInput = 1 << 6
};

} // namespace Parallaction


#endif