ScummVM API documentation
various.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 CINE_VARIOUS_H
23 #define CINE_VARIOUS_H
24 
25 
26 #include "common/file.h"
27 #include "common/keyboard.h"
28 
29 #include "cine/cine.h"
30 
31 namespace Cine {
32 
33 #define kMaxSavegames 100
34 #define kMaxOrigUiSavegames 20 // 20 fit on screen using original save/load interface
35 
36 // Maximum size of the command buffer including the trailing zero
37 #define kMaxCommandBufferSize 80
38 
39 void initLanguage(Common::Language lang);
40 
41 int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, int minY = 0, bool recheckValue = false, bool allowEmpty = false);
42 void makeCommandLine();
43 void makeFWCommandLine();
44 void makeOSCommandLine();
45 void makeActionMenu();
46 void waitPlayerInput();
47 void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4);
48 
49 extern int16 disableSystemMenu;
50 extern bool inMenu;
51 extern bool runOnlyUntilFreePartRangeFirst200;
52 
53 extern CommandeType currentSaveName[kMaxSavegames];
54 
56  int16 var4;
57  uint16 objIdx;
58  int16 var8;
59  int16 frame;
60  int16 varC;
61  int16 varE;
62  int16 var10;
63  int16 var12;
64  int16 var14;
65  int16 var16;
66  int16 var18;
67  int16 var1A;
68  int16 var1C;
69  int16 var1E;
70 };
71 
72 extern uint16 var2;
73 extern uint16 var3;
74 extern uint16 var4;
75 extern uint16 lastType20OverlayBgIdx;
76 extern uint16 reloadBgPalOnNextFlip;
77 extern uint16 forbidBgPalReload;
78 extern uint16 gfxFadeOutCompleted;
79 extern uint16 gfxFadeInRequested;
80 extern uint32 safeControlsLastAccessedMs;
81 extern int16 lastSafeControlObjIdx;
82 extern int16 commandVar1;
83 extern int16 commandVar2;
84 extern int16 commandVar3[4];
85 
86 extern char currentDatName[30];
87 extern uint16 musicIsPlaying;
88 
89 extern uint16 errorVar;
90 extern byte menuVar;
91 
92 extern uint16 allowPlayerInput;
93 
94 extern uint16 checkForPendingDataLoadSwitch;
95 
96 extern uint16 isDrawCommandEnabled;
97 extern uint16 waitForPlayerClick;
98 extern uint16 menuCommandLen;
99 extern bool _paletteNeedUpdate;
100 extern uint16 _messageLen;
101 
102 extern int16 playerCommand;
103 
104 extern char currentPrcName[20];
105 extern char currentRelName[20];
106 extern char currentObjectName[20];
107 extern char currentMsgName[20];
108 extern char newPrcName[20];
109 extern char newRelName[20];
110 extern char newObjectName[20];
111 extern char newMsgName[20];
112 
113 extern char currentCtName[15];
114 extern char currentPartName[15];
115 
116 void stopSample();
117 void stopMusicAfterFadeOut();
118 void playerCommandMouseLeftRightUp(uint16 mouseX, uint16 mouseY);
119 uint16 executePlayerInput();
120 
121 void drawOverlays();
122 
123 extern uint16 mouseUpdateStatus;
124 extern uint16 dummyU16;
125 
126 void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY);
127 
128 uint16 processKeyboard(uint16 param);
129 
130 void mainLoopSub6();
131 
132 void checkForPendingDataLoad();
133 
134 void hideMouse();
135 
136 void removeExtention(char *dest, const char *source, size_t sz);
137 
139  int16 idx;
140  int16 param;
141 };
142 
143 #define NUM_MAX_ZONE 16
144 
145 void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5);
146 
147 void removeMessages();
148 
149 void removeSeq(uint16 param1, uint16 param2, uint16 param3);
150 bool isSeqRunning(uint16 param1, uint16 param2, uint16 param3);
151 void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8);
152 void modifySeqListElement(uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4);
153 void processSeqList();
154 
155 void resetGfxEntityEntry(uint16 objIdx);
156 
157 bool makeTextEntryMenu(const char *caption, char *string, int strLen, int y);
158 void moveUsingKeyboard(int x, int y);
159 int16 getObjectUnderCursor(uint16 x, uint16 y);
160 
161 } // End of namespace Cine
162 
163 #endif
Definition: anim.h:29
uint32 safeControlsLastAccessedMs
Time in milliseconds when safe controls were last accessed.
int16 lastSafeControlObjIdx
Object index of the last safe control accessed.
Definition: various.h:138
Definition: various.h:55
uint16 objIdx
Is this really unsigned?
Definition: various.h:57
Language
Definition: language.h:45