aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/various.h
blob: 1f9aa7dc78c3a84e2b44a409dfdce86779eacc7c (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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/* ScummVM - Graphic Adventure Engine
 *
 * ScummVM is the legal property of its developers, whose names
 * are too numerous to list here. Please refer to the COPYRIGHT
 * file distributed with this source distribution.
 *
 * 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 CINE_VARIOUS_H
#define CINE_VARIOUS_H


#include "common/file.h"

#include "cine/cine.h"

namespace Cine {

// Maximum size of the command buffer including the trailing zero
#define kMaxCommandBufferSize 80

void initLanguage(Common::Language lang);

int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue = false);
void makeCommandLine(void);
void makeActionMenu(void);
void drawString(const char *string, byte param);
void waitPlayerInput(void);
void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4);

extern bool disableSystemMenu;
extern bool inMenu;

extern CommandeType currentSaveName[10];

struct SeqListElement {
	int16 var4;
	uint16 objIdx; ///< Is this really unsigned?
	int16 var8;
	int16 frame;
	int16 varC;
	int16 varE;
	int16 var10;
	int16 var12;
	int16 var14;
	int16 var16;
	int16 var18;
	int16 var1A;
	int16 var1C;
	int16 var1E;
};

extern Common::List<SeqListElement> seqList;

extern uint16 var2;
extern uint16 var3;
extern uint16 var4;
extern uint16 var5;
extern int16 commandVar1;
extern int16 commandVar2;
extern int16 commandVar3[4];

extern char currentDatName[30];
extern uint16 musicIsPlaying;

extern uint16 errorVar;
extern byte menuVar;

extern uint16 allowPlayerInput;

extern uint16 checkForPendingDataLoadSwitch;

extern bool fadeRequired;
extern uint16 isDrawCommandEnabled;
extern uint16 waitForPlayerClick;
extern uint16 menuCommandLen;
extern bool _paletteNeedUpdate;
extern uint16 _messageLen;
extern byte _danKeysPressed;

extern int16 playerCommand;

extern Common::String commandBuffer;

extern char currentPrcName[20];
extern char currentRelName[20];
extern char currentObjectName[20];
extern char currentMsgName[20];
extern char newPrcName[20];
extern char newRelName[20];
extern char newObjectName[20];
extern char newMsgName[20];

extern char currentCtName[15];
extern char currentPartName[15];

void stopSample(void);
void stopMusicAfterFadeOut(void);
uint16 executePlayerInput(void);

void drawOverlays(void);

extern uint16 mouseUpdateStatus;
extern uint16 dummyU16;

void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY);
int getKeyData(void);

uint16 processKeyboard(uint16 param);

void mainLoopSub6(void);

void checkForPendingDataLoad(void);

void hideMouse(void);

void removeExtention(char *dest, const char *source);

struct SelectedObjStruct {
	int16 idx;
	int16 param;
};

#define NUM_MAX_ZONE 16
extern Common::Array<uint16> zoneData;
extern Common::Array<uint16> zoneQuery;

void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5);

void removeMessages();

void removeSeq(uint16 param1, uint16 param2, uint16 param3);
bool isSeqRunning(uint16 param1, uint16 param2, uint16 param3);
void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8);
void modifySeqListElement(uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4);
void processSeqList(void);

void resetGfxEntityEntry(uint16 objIdx);

bool makeTextEntryMenu(const char *caption, char *string, int strLen, int y);
void moveUsingKeyboard(int x, int y);

} // End of namespace Cine

#endif