2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2006-02-22 22:40:53 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* 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.
|
2006-02-22 22:40:53 +00:00
|
|
|
*
|
|
|
|
* 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$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-12-03 18:29:58 +00:00
|
|
|
#ifndef CINE_VARIOUS_H
|
|
|
|
#define CINE_VARIOUS_H
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2007-09-19 08:40:12 +00:00
|
|
|
|
2006-02-25 01:01:27 +00:00
|
|
|
#include "common/file.h"
|
|
|
|
|
2006-02-22 22:40:53 +00:00
|
|
|
#include "cine/cine.h"
|
|
|
|
|
2006-02-25 00:26:14 +00:00
|
|
|
namespace Cine {
|
|
|
|
|
2008-08-12 00:13:27 +00:00
|
|
|
// Maximum size of the command buffer including the trailing zero
|
|
|
|
#define kMaxCommandBufferSize 80
|
|
|
|
|
2006-04-08 07:50:47 +00:00
|
|
|
void initLanguage(Common::Language lang);
|
|
|
|
|
2007-12-14 19:21:19 +00:00
|
|
|
int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue = false);
|
2009-11-02 21:54:57 +00:00
|
|
|
void makeCommandLine();
|
|
|
|
void makeActionMenu();
|
2008-11-13 08:59:17 +00:00
|
|
|
void drawString(const char *string, byte param);
|
2009-11-02 21:54:57 +00:00
|
|
|
void waitPlayerInput();
|
2008-11-13 08:59:17 +00:00
|
|
|
void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4);
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-11-24 20:25:55 +00:00
|
|
|
extern bool disableSystemMenu;
|
2007-09-19 08:40:12 +00:00
|
|
|
extern bool inMenu;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2008-11-12 23:21:05 +00:00
|
|
|
extern CommandeType currentSaveName[10];
|
|
|
|
|
2006-02-27 21:25:59 +00:00
|
|
|
struct SeqListElement {
|
2006-02-23 09:12:21 +00:00
|
|
|
int16 var4;
|
2008-07-27 22:50:36 +00:00
|
|
|
uint16 objIdx; ///< Is this really unsigned?
|
2006-02-23 09:12:21 +00:00
|
|
|
int16 var8;
|
2008-05-24 22:11:41 +00:00
|
|
|
int16 frame;
|
2006-02-23 09:12:21 +00:00
|
|
|
int16 varC;
|
|
|
|
int16 varE;
|
|
|
|
int16 var10;
|
|
|
|
int16 var12;
|
|
|
|
int16 var14;
|
|
|
|
int16 var16;
|
|
|
|
int16 var18;
|
|
|
|
int16 var1A;
|
|
|
|
int16 var1C;
|
|
|
|
int16 var1E;
|
2006-02-22 22:40:53 +00:00
|
|
|
};
|
|
|
|
|
2008-05-24 22:11:41 +00:00
|
|
|
extern Common::List<SeqListElement> seqList;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
extern uint16 var2;
|
|
|
|
extern uint16 var3;
|
|
|
|
extern uint16 var4;
|
|
|
|
extern uint16 var5;
|
2008-11-13 08:59:17 +00:00
|
|
|
extern int16 commandVar1;
|
|
|
|
extern int16 commandVar2;
|
|
|
|
extern int16 commandVar3[4];
|
|
|
|
|
|
|
|
extern char currentDatName[30];
|
2009-05-11 19:31:55 +00:00
|
|
|
extern uint16 musicIsPlaying;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
extern uint16 errorVar;
|
2006-03-23 03:45:52 +00:00
|
|
|
extern byte menuVar;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
extern uint16 allowPlayerInput;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
extern uint16 checkForPendingDataLoadSwitch;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2007-12-09 13:41:59 +00:00
|
|
|
extern bool fadeRequired;
|
2006-02-23 09:12:21 +00:00
|
|
|
extern uint16 isDrawCommandEnabled;
|
|
|
|
extern uint16 waitForPlayerClick;
|
2006-03-02 20:08:41 +00:00
|
|
|
extern uint16 menuCommandLen;
|
2007-12-14 19:21:19 +00:00
|
|
|
extern bool _paletteNeedUpdate;
|
|
|
|
extern uint16 _messageLen;
|
|
|
|
extern byte _danKeysPressed;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
extern int16 playerCommand;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2008-08-12 00:13:27 +00:00
|
|
|
extern Common::String commandBuffer;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
|
|
|
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];
|
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
void stopSample();
|
|
|
|
void stopMusicAfterFadeOut();
|
|
|
|
uint16 executePlayerInput();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
void drawOverlays();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
extern uint16 mouseUpdateStatus;
|
|
|
|
extern uint16 dummyU16;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY);
|
2009-11-02 21:54:57 +00:00
|
|
|
int getKeyData();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-02-23 09:12:21 +00:00
|
|
|
uint16 processKeyboard(uint16 param);
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
void mainLoopSub6();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
void checkForPendingDataLoad();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
void hideMouse();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
|
|
|
void removeExtention(char *dest, const char *source);
|
|
|
|
|
2007-12-14 19:21:19 +00:00
|
|
|
struct SelectedObjStruct {
|
2006-02-23 09:12:21 +00:00
|
|
|
int16 idx;
|
|
|
|
int16 param;
|
2006-02-22 22:40:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define NUM_MAX_ZONE 16
|
2008-08-09 22:38:03 +00:00
|
|
|
extern Common::Array<uint16> zoneData;
|
|
|
|
extern Common::Array<uint16> zoneQuery;
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2006-03-23 03:45:52 +00:00
|
|
|
void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5);
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2008-05-24 22:11:41 +00:00
|
|
|
void removeMessages();
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2008-04-21 20:51:17 +00:00
|
|
|
void removeSeq(uint16 param1, uint16 param2, uint16 param3);
|
2008-06-26 17:29:21 +00:00
|
|
|
bool isSeqRunning(uint16 param1, uint16 param2, uint16 param3);
|
2008-05-24 22:11:41 +00:00
|
|
|
void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8);
|
2008-06-25 17:14:44 +00:00
|
|
|
void modifySeqListElement(uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4);
|
2009-11-02 21:54:57 +00:00
|
|
|
void processSeqList();
|
2006-02-23 20:02:46 +00:00
|
|
|
|
2008-06-30 03:33:08 +00:00
|
|
|
void resetGfxEntityEntry(uint16 objIdx);
|
|
|
|
|
2006-11-18 15:16:44 +00:00
|
|
|
bool makeTextEntryMenu(const char *caption, char *string, int strLen, int y);
|
2008-08-08 13:30:01 +00:00
|
|
|
void moveUsingKeyboard(int x, int y);
|
2006-11-18 15:16:44 +00:00
|
|
|
|
2006-02-25 00:26:14 +00:00
|
|
|
} // End of namespace Cine
|
|
|
|
|
2006-02-22 22:40:53 +00:00
|
|
|
#endif
|