2012-01-06 23:29:45 +01:00
|
|
|
/* ResidualVM - A 3D game interpreter
|
2008-06-13 14:57:47 +00:00
|
|
|
*
|
2012-01-06 23:29:45 +01:00
|
|
|
* ResidualVM is the legal property of its developers, whose names
|
2011-04-16 14:12:44 +02:00
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
2008-06-13 14:57:47 +00:00
|
|
|
* file distributed with this source distribution.
|
2006-04-02 14:20:45 +00:00
|
|
|
*
|
2012-12-19 23:15:43 +01: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.
|
2014-04-05 18:18:42 +02:00
|
|
|
*
|
2012-12-19 23:15:43 +01:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2006-04-02 14:20:45 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2012-12-19 23:15:43 +01:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2014-04-05 18:18:42 +02:00
|
|
|
*
|
2012-12-19 23:15:43 +01:00
|
|
|
* 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.
|
2006-04-02 14:20:45 +00:00
|
|
|
*
|
|
|
|
*/
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2009-05-26 09:39:42 +00:00
|
|
|
#ifndef GRIM_ENGINE_H
|
|
|
|
#define GRIM_ENGINE_H
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2009-05-25 19:21:58 +00:00
|
|
|
#include "engines/engine.h"
|
|
|
|
|
2011-05-13 17:55:14 -07:00
|
|
|
#include "common/str-array.h"
|
|
|
|
#include "common/hashmap.h"
|
2012-03-09 12:09:37 +01:00
|
|
|
#include "common/events.h"
|
2011-05-13 17:55:14 -07:00
|
|
|
|
2011-05-14 12:11:53 +02:00
|
|
|
#include "engines/advancedDetector.h"
|
|
|
|
|
2009-05-24 19:13:58 +00:00
|
|
|
#include "engines/grim/textobject.h"
|
2011-07-17 18:17:07 +02:00
|
|
|
#include "engines/grim/iris.h"
|
2020-10-05 00:31:16 +05:30
|
|
|
#include "engines/grim/detection.h"
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2009-05-25 06:49:57 +00:00
|
|
|
namespace Grim {
|
|
|
|
|
2003-08-15 18:00:22 +00:00
|
|
|
class Actor;
|
2009-05-09 17:44:05 +00:00
|
|
|
class SaveGame;
|
2011-05-13 17:55:14 -07:00
|
|
|
class Bitmap;
|
|
|
|
class Font;
|
|
|
|
class Color;
|
|
|
|
class ObjectState;
|
2011-09-19 16:53:08 +02:00
|
|
|
class Set;
|
2011-05-13 17:55:14 -07:00
|
|
|
class TextObject;
|
|
|
|
class PrimitiveObject;
|
2013-07-07 12:54:01 -07:00
|
|
|
class LuaBase;
|
2015-02-04 15:52:11 +01:00
|
|
|
class Commentary;
|
2015-12-28 16:38:45 +01:00
|
|
|
class GfxBase;
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2008-08-17 12:01:26 +00:00
|
|
|
struct ControlDescriptor {
|
|
|
|
const char *name;
|
|
|
|
int key;
|
|
|
|
};
|
|
|
|
|
2009-05-25 19:21:58 +00:00
|
|
|
class GrimEngine : public Engine {
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Engine APIs
|
2021-11-13 23:20:07 +02:00
|
|
|
Common::Error run() override;
|
2009-05-25 19:21:58 +00:00
|
|
|
|
2003-08-15 18:00:22 +00:00
|
|
|
public:
|
2011-10-04 22:01:24 +02:00
|
|
|
enum EngineMode {
|
|
|
|
PauseMode = 1,
|
|
|
|
NormalMode = 2,
|
|
|
|
SmushMode = 3,
|
2012-02-18 22:20:16 +01:00
|
|
|
DrawMode = 4,
|
|
|
|
OverworldMode = 5
|
2011-10-04 22:01:24 +02:00
|
|
|
};
|
2011-05-23 17:06:16 +02:00
|
|
|
enum SpeechMode {
|
|
|
|
TextOnly = 1,
|
|
|
|
VoiceOnly = 2,
|
|
|
|
TextAndVoice = 3
|
|
|
|
};
|
2004-02-24 21:09:53 +00:00
|
|
|
|
2011-05-14 12:11:53 +02:00
|
|
|
GrimEngine(OSystem *syst, uint32 gameFlags, GrimGameType gameType, Common::Platform platform, Common::Language language);
|
2009-05-25 19:21:58 +00:00
|
|
|
virtual ~GrimEngine();
|
|
|
|
|
2012-01-21 20:18:35 -08:00
|
|
|
void clearPools();
|
|
|
|
|
2009-06-23 07:14:53 +00:00
|
|
|
int getGameFlags() { return _gameFlags; }
|
2011-03-24 22:04:40 +08:00
|
|
|
GrimGameType getGameType() { return _gameType; }
|
2011-05-14 23:15:43 +02:00
|
|
|
Common::Language getGameLanguage() { return _gameLanguage; }
|
2012-01-14 12:52:54 +01:00
|
|
|
Common::Platform getGamePlatform() { return _gamePlatform; }
|
2013-08-29 23:05:49 +02:00
|
|
|
virtual const char *getUpdateFilename();
|
2014-05-29 15:43:27 -07:00
|
|
|
bool canLoadGameStateCurrently() override { return true; }
|
|
|
|
Common::Error loadGameState(int slot) override;
|
2021-11-02 11:06:12 +02:00
|
|
|
bool isRemastered() const { return !!(_gameFlags & ADGF_REMASTERED); }
|
2009-06-23 07:14:53 +00:00
|
|
|
|
2012-12-19 23:24:49 +01:00
|
|
|
void setMode(EngineMode mode);
|
2011-10-04 22:01:24 +02:00
|
|
|
EngineMode getMode() { return _mode; }
|
|
|
|
void setPreviousMode(EngineMode mode) { _previousMode = mode; }
|
|
|
|
EngineMode getPreviousMode() { return _previousMode; }
|
2011-05-23 17:06:16 +02:00
|
|
|
void setSpeechMode(SpeechMode mode) { _speechMode = mode; }
|
|
|
|
SpeechMode getSpeechMode() { return _speechMode; }
|
2005-12-26 02:36:00 +00:00
|
|
|
SaveGame *savedState() { return _savedState; }
|
2004-03-20 05:47:21 +00:00
|
|
|
|
2005-08-13 13:35:43 +00:00
|
|
|
void handleDebugLoadResource();
|
|
|
|
void luaUpdate();
|
|
|
|
void updateDisplayScene();
|
2005-08-28 23:25:14 +00:00
|
|
|
void doFlip();
|
2005-08-13 16:25:51 +00:00
|
|
|
void setFlipEnable(bool state) { _flipEnable = state; }
|
|
|
|
bool getFlipEnable() { return _flipEnable; }
|
2013-11-25 23:54:20 +01:00
|
|
|
virtual void drawTextObjects();
|
2011-07-17 18:17:07 +02:00
|
|
|
void playIrisAnimation(Iris::Direction dir, int x, int y, int time);
|
2005-08-13 11:33:12 +00:00
|
|
|
|
2004-02-24 21:09:53 +00:00
|
|
|
void mainLoop();
|
2011-05-05 11:25:08 +02:00
|
|
|
unsigned getFrameStart() const { return _frameStart; }
|
|
|
|
unsigned getFrameTime() const { return _frameTime; }
|
2004-02-24 21:09:53 +00:00
|
|
|
|
2005-08-01 03:49:02 +00:00
|
|
|
// perSecond should allow rates of zero, some actors will accelerate
|
|
|
|
// up to their normal speed (such as the bone wagon) so handling
|
|
|
|
// a walking rate of zero should happen in the default actor creation
|
2011-05-05 11:25:08 +02:00
|
|
|
float getPerSecond(float rate) const;
|
2004-02-24 21:09:53 +00:00
|
|
|
|
2005-04-08 11:47:47 +00:00
|
|
|
int getTextSpeed() { return _textSpeed; }
|
|
|
|
void setTextSpeed(int speed);
|
2005-04-05 13:50:54 +00:00
|
|
|
|
2004-12-09 23:55:43 +00:00
|
|
|
void enableControl(int num) { _controlsEnabled[num] = true; }
|
|
|
|
void disableControl(int num) { _controlsEnabled[num] = false; }
|
2008-08-17 12:01:26 +00:00
|
|
|
float getControlAxis(int num);
|
|
|
|
bool getControlState(int num);
|
2011-07-24 16:19:17 +02:00
|
|
|
void clearEventQueue();
|
2004-02-24 21:09:53 +00:00
|
|
|
|
2011-09-19 16:53:08 +02:00
|
|
|
Set *findSet(const Common::String &name);
|
|
|
|
void setSetLock(const char *name, bool lockStatus);
|
|
|
|
Set *loadSet(const Common::String &name);
|
|
|
|
void setSet(const char *name);
|
|
|
|
void setSet(Set *scene);
|
|
|
|
Set *getCurrSet() { return _currSet; }
|
2009-06-08 22:25:14 +00:00
|
|
|
void makeCurrentSetup(int num);
|
2004-02-24 21:09:53 +00:00
|
|
|
|
2011-05-05 11:32:11 +02:00
|
|
|
void flagRefreshShadowMask(bool flag) { _refreshShadowMask = flag; }
|
|
|
|
bool getFlagRefreshShadowMask() { return _refreshShadowMask; }
|
|
|
|
|
2004-12-09 23:55:43 +00:00
|
|
|
void setSelectedActor(Actor *a) { _selectedActor = a; }
|
2011-05-05 11:25:08 +02:00
|
|
|
Actor *getSelectedActor() { return _selectedActor; }
|
2011-05-01 18:51:26 +02:00
|
|
|
|
2012-02-24 17:11:55 +01:00
|
|
|
/**
|
|
|
|
* Tell the engine that an actor has been moved into/outside a set,
|
|
|
|
* and so that it should rebuild the list of active ones.
|
|
|
|
*/
|
2013-07-14 10:16:27 -07:00
|
|
|
virtual void invalidateActiveActorsList();
|
2013-11-25 23:54:20 +01:00
|
|
|
virtual void invalidateTextObjectsSortOrder() {};
|
2012-02-24 17:11:55 +01:00
|
|
|
/**
|
|
|
|
* Return a list of the currently active actors, i. e. the actors in the current set.
|
|
|
|
*/
|
|
|
|
const Common::List<Actor *> &getActiveActors() const { return _activeActors; }
|
|
|
|
|
2012-03-04 18:16:37 +01:00
|
|
|
/**
|
|
|
|
* Add an actor to the list of actors that are talking
|
|
|
|
*/
|
|
|
|
void addTalkingActor(Actor *actor);
|
2013-01-15 11:49:53 +01:00
|
|
|
inline const Common::List<Actor *> &getTalkingActors() const { return _talkingActors; }
|
2012-03-04 18:16:37 +01:00
|
|
|
bool areActorsTalking() const;
|
2012-08-07 00:21:27 +02:00
|
|
|
void immediatelyRemoveActor(Actor *actor);
|
2012-03-04 18:16:37 +01:00
|
|
|
|
2020-05-17 13:48:22 +02:00
|
|
|
void drawMovieSubtitle();
|
2012-03-21 18:14:58 +01:00
|
|
|
void setMovieSubtitle(TextObject *to);
|
2013-01-08 00:33:59 +01:00
|
|
|
void setMovieSetup();
|
2012-03-21 18:14:58 +01:00
|
|
|
|
2015-02-02 20:47:40 +01:00
|
|
|
int getLanguage() const { return _language; }
|
|
|
|
void setLanguage(int langId) { _language = langId; }
|
2015-02-03 14:08:03 +01:00
|
|
|
Common::String getLanguagePrefix() const;
|
2021-05-04 11:45:03 +03:00
|
|
|
|
2015-02-03 14:33:32 +01:00
|
|
|
bool isConceptEnabled(uint32 number) const;
|
|
|
|
void enableConcept(uint32 number);
|
2021-05-04 11:45:03 +03:00
|
|
|
|
2015-02-03 14:33:32 +01:00
|
|
|
bool isCutsceneEnabled(uint32 number) const;
|
|
|
|
void enableCutscene(uint32 number);
|
2015-02-04 15:52:11 +01:00
|
|
|
|
|
|
|
Commentary *getCommentary() { return _commentary; }
|
|
|
|
|
2015-02-03 16:59:04 +01:00
|
|
|
// TODO: Refactor.
|
|
|
|
void setSaveMetaData(const char*, int, const char*);
|
2015-02-02 20:47:40 +01:00
|
|
|
|
2011-05-28 11:31:12 +02:00
|
|
|
void saveGame(const Common::String &file);
|
|
|
|
void loadGame(const Common::String &file);
|
|
|
|
|
2012-01-21 20:18:35 -08:00
|
|
|
void changeHardwareState();
|
|
|
|
|
2012-01-31 21:39:34 +01:00
|
|
|
// Engine APIs
|
2014-05-29 15:43:27 -07:00
|
|
|
bool hasFeature(EngineFeature f) const override;
|
2012-01-31 21:39:34 +01:00
|
|
|
|
2020-10-06 21:31:18 +02:00
|
|
|
static Common::Array<Common::Keymap *> initKeymapsGrim(const char *target);
|
|
|
|
static Common::Array<Common::Keymap *> initKeymapsEMI(const char *target);
|
|
|
|
|
2011-05-28 11:31:12 +02:00
|
|
|
Common::StringArray _listFiles;
|
|
|
|
Common::StringArray::const_iterator _listFilesIter;
|
|
|
|
|
|
|
|
TextObjectDefaults _sayLineDefaults, _printLineDefaults, _blastTextDefaults;
|
|
|
|
|
2013-07-10 20:43:55 +02:00
|
|
|
void debugLua(const Common::String &str);
|
2012-04-30 15:14:14 +02:00
|
|
|
|
2013-02-07 17:08:11 +01:00
|
|
|
protected:
|
2021-11-13 23:20:07 +02:00
|
|
|
void pauseEngineIntern(bool pause) override;
|
2013-02-07 17:08:11 +01:00
|
|
|
|
2012-03-09 12:09:37 +01:00
|
|
|
void handleControls(Common::EventType type, const Common::KeyState &key);
|
|
|
|
void handleChars(Common::EventType type, const Common::KeyState &key);
|
2014-12-31 13:01:21 +01:00
|
|
|
void handleJoyAxis(byte axis, int16 position);
|
2015-02-04 20:53:33 -08:00
|
|
|
void handleMouseAxis(byte axis, int16 position);
|
2014-12-31 13:01:21 +01:00
|
|
|
void handleJoyButton(Common::EventType type, byte button);
|
2011-05-28 11:31:12 +02:00
|
|
|
void handleExit();
|
|
|
|
void handlePause();
|
2011-10-13 20:25:50 +02:00
|
|
|
void handleUserPaint();
|
|
|
|
void cameraChangeHandle(int prev, int next);
|
|
|
|
void cameraPostChangeHandle(int num);
|
2012-02-24 17:11:55 +01:00
|
|
|
void buildActiveActorsList();
|
2011-10-13 20:25:50 +02:00
|
|
|
void savegameCallback();
|
2020-10-14 06:49:28 +01:00
|
|
|
GfxBase *createRenderer(int screenW, int screenH);
|
2014-10-01 02:19:06 +02:00
|
|
|
void playAspyrLogo();
|
2013-07-07 12:54:01 -07:00
|
|
|
virtual LuaBase *createLua();
|
2013-12-02 22:26:26 +01:00
|
|
|
virtual void updateNormalMode();
|
|
|
|
virtual void updateDrawMode();
|
2013-07-12 15:43:16 -07:00
|
|
|
virtual void drawNormalMode();
|
2011-05-28 11:31:12 +02:00
|
|
|
|
2004-11-01 16:36:41 +00:00
|
|
|
void savegameSave();
|
2011-05-26 10:24:09 -07:00
|
|
|
void saveGRIM();
|
2011-03-21 05:16:27 +08:00
|
|
|
|
|
|
|
void savegameRestore();
|
2011-05-26 10:24:09 -07:00
|
|
|
void restoreGRIM();
|
2009-06-22 21:20:12 +00:00
|
|
|
|
2015-02-03 16:59:04 +01:00
|
|
|
virtual void storeSaveGameMetadata(SaveGame *state);
|
2014-06-30 22:46:50 +02:00
|
|
|
virtual void storeSaveGameImage(SaveGame *savedState);
|
2006-05-13 15:07:35 +00:00
|
|
|
|
2004-11-01 09:47:19 +00:00
|
|
|
bool _savegameLoadRequest;
|
|
|
|
bool _savegameSaveRequest;
|
2011-05-17 20:48:58 -07:00
|
|
|
Common::String _savegameFileName;
|
2005-12-26 02:36:00 +00:00
|
|
|
SaveGame *_savedState;
|
2004-11-01 09:47:19 +00:00
|
|
|
|
2011-09-19 16:53:08 +02:00
|
|
|
Set *_currSet;
|
2011-10-04 22:01:24 +02:00
|
|
|
EngineMode _mode, _previousMode;
|
2011-05-23 17:06:16 +02:00
|
|
|
SpeechMode _speechMode;
|
2005-04-08 11:47:47 +00:00
|
|
|
int _textSpeed;
|
2005-08-13 16:25:51 +00:00
|
|
|
bool _flipEnable;
|
2005-08-28 23:25:14 +00:00
|
|
|
char _fps[8];
|
|
|
|
bool _doFlip;
|
2008-07-05 08:48:39 +00:00
|
|
|
bool _refreshShadowMask;
|
2011-07-17 21:54:42 +02:00
|
|
|
bool _shortFrame;
|
2012-02-13 18:01:03 +01:00
|
|
|
bool _setupChanged;
|
2013-01-08 00:33:59 +01:00
|
|
|
// This holds the name of the setup in which the movie must be drawed
|
|
|
|
Common::String _movieSetup;
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2004-12-09 23:55:43 +00:00
|
|
|
unsigned _frameStart, _frameTime, _movieTime;
|
2005-08-13 13:35:43 +00:00
|
|
|
int _prevSmushFrame;
|
|
|
|
unsigned int _frameCounter;
|
2011-06-09 18:36:57 -07:00
|
|
|
unsigned int _lastFrameTime;
|
2008-08-16 17:54:14 +00:00
|
|
|
unsigned _speedLimitMs;
|
2009-05-25 19:21:58 +00:00
|
|
|
bool _showFps;
|
|
|
|
bool _softRenderer;
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2006-02-05 20:40:16 +00:00
|
|
|
bool *_controlsEnabled;
|
2008-08-17 12:01:26 +00:00
|
|
|
bool *_controlsState;
|
2014-12-31 13:01:21 +01:00
|
|
|
float *_joyAxisPosition;
|
2003-08-15 18:00:22 +00:00
|
|
|
|
2012-01-21 20:18:35 -08:00
|
|
|
bool _changeHardwareState;
|
|
|
|
|
2011-05-01 18:51:26 +02:00
|
|
|
Actor *_selectedActor;
|
2011-07-17 18:17:07 +02:00
|
|
|
Iris *_iris;
|
2012-03-21 18:14:58 +01:00
|
|
|
TextObject::Ptr _movieSubtitle;
|
2011-05-01 18:51:26 +02:00
|
|
|
|
2012-02-24 17:11:55 +01:00
|
|
|
bool _buildActiveActorsList;
|
|
|
|
Common::List<Actor *> _activeActors;
|
2012-03-04 18:16:37 +01:00
|
|
|
Common::List<Actor *> _talkingActors;
|
2012-02-24 17:11:55 +01:00
|
|
|
|
2011-05-14 12:11:53 +02:00
|
|
|
uint32 _gameFlags;
|
2011-03-24 22:04:40 +08:00
|
|
|
GrimGameType _gameType;
|
2011-05-14 12:11:53 +02:00
|
|
|
Common::Platform _gamePlatform;
|
|
|
|
Common::Language _gameLanguage;
|
2013-12-01 20:32:44 +01:00
|
|
|
uint32 _pauseStartTime;
|
2015-02-02 20:47:40 +01:00
|
|
|
|
|
|
|
// Remastered;
|
|
|
|
uint32 _language;
|
2015-02-03 14:33:32 +01:00
|
|
|
static const uint32 kNumConcepts = 98;
|
|
|
|
static const uint32 kNumCutscenes = 40;
|
|
|
|
bool _cutsceneEnabled[kNumCutscenes]; // TODO, could probably use a different data structure
|
|
|
|
bool _conceptEnabled[kNumConcepts];
|
2021-05-04 11:45:03 +03:00
|
|
|
|
2015-02-03 16:59:04 +01:00
|
|
|
Common::String _saveMeta1;
|
|
|
|
int _saveMeta2;
|
|
|
|
Common::String _saveMeta3;
|
2021-05-04 11:45:03 +03:00
|
|
|
|
2015-02-04 15:52:11 +01:00
|
|
|
Commentary *_commentary;
|
2015-02-04 20:53:33 -08:00
|
|
|
|
|
|
|
public:
|
|
|
|
int _cursorX;
|
|
|
|
int _cursorY;
|
2003-08-15 18:00:22 +00:00
|
|
|
};
|
|
|
|
|
2009-05-17 08:24:17 +00:00
|
|
|
extern GrimEngine *g_grim;
|
2004-12-31 21:35:04 +00:00
|
|
|
|
2005-01-03 16:27:57 +00:00
|
|
|
extern int g_imuseState;
|
|
|
|
|
2008-08-17 12:01:26 +00:00
|
|
|
// Fake KEYCODE_* values for joystick and mouse events
|
|
|
|
|
|
|
|
enum {
|
2019-02-06 12:24:54 +01:00
|
|
|
KEYCODE_JOY1_A = 512,
|
|
|
|
KEYCODE_JOY1_B,
|
|
|
|
KEYCODE_JOY1_X,
|
|
|
|
KEYCODE_JOY1_Y,
|
|
|
|
KEYCODE_JOY1_BACK,
|
|
|
|
KEYCODE_JOY1_GUIDE,
|
|
|
|
KEYCODE_JOY1_START,
|
|
|
|
KEYCODE_JOY1_LEFTSTICK,
|
|
|
|
KEYCODE_JOY1_RIGHTSTICK,
|
|
|
|
KEYCODE_JOY1_L1,
|
|
|
|
KEYCODE_JOY1_R1,
|
|
|
|
KEYCODE_JOY1_HUP,
|
|
|
|
KEYCODE_JOY1_HDOWN,
|
|
|
|
KEYCODE_JOY1_HLEFT,
|
|
|
|
KEYCODE_JOY1_HRIGHT,
|
|
|
|
KEYCODE_JOY1_L2,
|
|
|
|
KEYCODE_JOY1_R2,
|
2011-04-30 21:20:39 +02:00
|
|
|
KEYCODE_JOY1_B14,
|
|
|
|
KEYCODE_JOY1_B15,
|
|
|
|
KEYCODE_JOY1_B16,
|
|
|
|
KEYCODE_JOY1_B17,
|
|
|
|
KEYCODE_JOY1_B18,
|
|
|
|
KEYCODE_JOY1_B19,
|
|
|
|
KEYCODE_JOY1_B20,
|
2019-02-06 12:24:54 +01:00
|
|
|
KEYCODE_JOY2_A,
|
|
|
|
KEYCODE_JOY2_B,
|
|
|
|
KEYCODE_JOY2_X,
|
|
|
|
KEYCODE_JOY2_Y,
|
|
|
|
KEYCODE_JOY2_BACK,
|
|
|
|
KEYCODE_JOY2_GUIDE,
|
|
|
|
KEYCODE_JOY2_START,
|
|
|
|
KEYCODE_JOY2_LEFTSTICK,
|
|
|
|
KEYCODE_JOY2_RIGHTSTICK,
|
|
|
|
KEYCODE_JOY2_L1,
|
|
|
|
KEYCODE_JOY2_R1,
|
2008-08-17 12:01:26 +00:00
|
|
|
KEYCODE_JOY2_HUP,
|
|
|
|
KEYCODE_JOY2_HDOWN,
|
2019-02-06 12:24:54 +01:00
|
|
|
KEYCODE_JOY2_HLEFT,
|
|
|
|
KEYCODE_JOY2_HRIGHT,
|
|
|
|
KEYCODE_JOY2_L2,
|
|
|
|
KEYCODE_JOY2_R2,
|
2008-08-17 12:01:26 +00:00
|
|
|
KEYCODE_MOUSE_B1,
|
|
|
|
KEYCODE_MOUSE_B2,
|
|
|
|
KEYCODE_MOUSE_B3,
|
|
|
|
KEYCODE_MOUSE_B4,
|
|
|
|
KEYCODE_AXIS_JOY1_X,
|
|
|
|
KEYCODE_AXIS_JOY1_Y,
|
|
|
|
KEYCODE_AXIS_JOY1_Z,
|
|
|
|
KEYCODE_AXIS_JOY1_R,
|
|
|
|
KEYCODE_AXIS_JOY1_U,
|
|
|
|
KEYCODE_AXIS_JOY1_V,
|
|
|
|
KEYCODE_AXIS_JOY2_X,
|
|
|
|
KEYCODE_AXIS_JOY2_Y,
|
|
|
|
KEYCODE_AXIS_JOY2_Z,
|
|
|
|
KEYCODE_AXIS_JOY2_R,
|
|
|
|
KEYCODE_AXIS_JOY2_U,
|
|
|
|
KEYCODE_AXIS_JOY2_V,
|
|
|
|
KEYCODE_AXIS_MOUSE_X,
|
|
|
|
KEYCODE_AXIS_MOUSE_Y,
|
|
|
|
KEYCODE_AXIS_MOUSE_Z,
|
|
|
|
KEYCODE_EXTRA_LAST
|
|
|
|
};
|
|
|
|
|
2014-12-31 13:01:21 +01:00
|
|
|
#define NUM_JOY_AXES (KEYCODE_AXIS_JOY1_V - KEYCODE_AXIS_JOY1_X + 1)
|
2019-02-06 12:24:54 +01:00
|
|
|
#define NUM_JOY_BUTTONS (KEYCODE_JOY1_R2 - KEYCODE_JOY1_A + 1)
|
2014-12-31 13:01:21 +01:00
|
|
|
|
2008-08-17 12:01:26 +00:00
|
|
|
extern const ControlDescriptor controls[];
|
|
|
|
|
2009-05-25 06:49:57 +00:00
|
|
|
} // end of namespace Grim
|
|
|
|
|
2003-08-15 18:00:22 +00:00
|
|
|
#endif
|