2013-07-30 11:29:15 +00:00
|
|
|
/* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FULLPIPE_MODAL_H
|
|
|
|
#define FULLPIPE_MODAL_H
|
|
|
|
|
|
|
|
namespace Fullpipe {
|
|
|
|
|
2014-01-15 09:35:27 +00:00
|
|
|
class PictureObject;
|
2014-01-15 09:17:40 +00:00
|
|
|
|
2013-09-18 15:26:02 +00:00
|
|
|
class BaseModalObject {
|
2013-07-31 17:06:13 +00:00
|
|
|
public:
|
|
|
|
|
2013-09-18 15:26:02 +00:00
|
|
|
BaseModalObject *_parentObj;
|
2013-07-30 11:29:15 +00:00
|
|
|
|
|
|
|
public:
|
2013-09-18 15:26:02 +00:00
|
|
|
BaseModalObject() : _parentObj(0) {}
|
|
|
|
virtual ~BaseModalObject() {}
|
2013-07-30 11:29:15 +00:00
|
|
|
|
2013-10-28 21:03:43 +00:00
|
|
|
|
|
|
|
virtual bool pollEvent() = 0;
|
2013-10-27 22:57:07 +00:00
|
|
|
virtual bool handleMessage(ExCommand *message) = 0;
|
|
|
|
virtual bool init(int counterdiff) = 0;
|
2013-10-28 21:18:33 +00:00
|
|
|
virtual void update() = 0;
|
2013-10-28 21:03:43 +00:00
|
|
|
|
2013-10-27 22:57:07 +00:00
|
|
|
virtual void saveload() = 0;
|
2013-07-31 17:06:13 +00:00
|
|
|
};
|
2013-07-30 11:29:15 +00:00
|
|
|
|
2013-09-18 15:26:02 +00:00
|
|
|
class ModalIntro : public BaseModalObject {
|
2013-08-06 21:43:08 +00:00
|
|
|
int _field_8;
|
|
|
|
int _introFlags;
|
|
|
|
int _countDown;
|
2013-10-28 21:37:27 +00:00
|
|
|
int _stillRunning;
|
2013-08-06 21:43:08 +00:00
|
|
|
int _sfxVolume;
|
|
|
|
|
|
|
|
public:
|
2013-09-18 15:26:02 +00:00
|
|
|
ModalIntro();
|
2013-11-06 21:52:01 +00:00
|
|
|
virtual ~ModalIntro();
|
2013-08-06 21:43:08 +00:00
|
|
|
|
2013-10-28 21:03:43 +00:00
|
|
|
virtual bool pollEvent() { return true; }
|
2013-08-06 21:43:08 +00:00
|
|
|
virtual bool handleMessage(ExCommand *message);
|
2013-10-27 22:57:07 +00:00
|
|
|
virtual bool init(int counterdiff);
|
2013-10-28 21:18:33 +00:00
|
|
|
virtual void update();
|
2013-10-28 21:03:43 +00:00
|
|
|
virtual void saveload() {}
|
|
|
|
|
2013-10-28 21:37:27 +00:00
|
|
|
void finish();
|
2013-10-28 21:03:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class ModalVideoPlayer : public BaseModalObject {
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message) { return true; }
|
2013-10-28 21:37:27 +00:00
|
|
|
virtual bool init(int counterdiff) { return false; }
|
2013-10-28 21:18:33 +00:00
|
|
|
virtual void update() {}
|
2013-10-28 21:03:43 +00:00
|
|
|
virtual void saveload() {}
|
|
|
|
|
|
|
|
void play(const char *fname);
|
2013-08-06 21:43:08 +00:00
|
|
|
};
|
|
|
|
|
2014-01-15 09:17:40 +00:00
|
|
|
class ModalMap : public BaseModalObject {
|
|
|
|
Scene *_mapScene;
|
2014-01-15 09:35:27 +00:00
|
|
|
PictureObject *_pic;
|
2014-01-15 09:17:40 +00:00
|
|
|
bool _isRunning;
|
|
|
|
Common::Rect _rect1;
|
|
|
|
int _x;
|
|
|
|
int _y;
|
|
|
|
int _flag;
|
|
|
|
int _mouseX;
|
|
|
|
int _mouseY;
|
|
|
|
int _field_38;
|
|
|
|
int _field_3C;
|
|
|
|
int _field_40;
|
|
|
|
Common::Rect _rect2;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ModalMap();
|
|
|
|
virtual ~ModalMap();
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message);
|
|
|
|
virtual bool init(int counterdiff);
|
|
|
|
virtual void update();
|
|
|
|
virtual void saveload() {}
|
|
|
|
|
|
|
|
void initMap();
|
|
|
|
PictureObject *getScenePicture();
|
|
|
|
};
|
|
|
|
|
2014-01-23 19:55:01 +00:00
|
|
|
class ModalFinal : public BaseModalObject {
|
2014-01-24 15:21:50 +00:00
|
|
|
int _flags;
|
|
|
|
int _counter;
|
|
|
|
int _sfxVolume;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ModalFinal();
|
|
|
|
virtual ~ModalFinal();
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message);
|
|
|
|
virtual bool init(int counterdiff);
|
|
|
|
virtual void update();
|
|
|
|
virtual void saveload() {}
|
|
|
|
|
|
|
|
void unloadScenes();
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModalCredits : public BaseModalObject {
|
2014-01-24 19:09:19 +00:00
|
|
|
Scene *_sceneTitles;
|
|
|
|
PictureObject *_creditsPic;
|
|
|
|
bool _fadeIn;
|
|
|
|
bool _fadeOut;
|
|
|
|
int _countdown;
|
|
|
|
int _sfxVolume;
|
|
|
|
int _currX;
|
|
|
|
int _currY;
|
|
|
|
int _maxY;
|
|
|
|
|
2014-01-23 19:55:01 +00:00
|
|
|
public:
|
2014-01-24 19:09:19 +00:00
|
|
|
ModalCredits();
|
|
|
|
virtual ~ModalCredits();
|
2014-01-23 19:55:01 +00:00
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
2014-01-24 19:25:28 +00:00
|
|
|
virtual bool handleMessage(ExCommand *message);
|
|
|
|
virtual bool init(int counterdiff);
|
|
|
|
virtual void update();
|
2014-01-23 19:55:01 +00:00
|
|
|
virtual void saveload() {}
|
|
|
|
};
|
|
|
|
|
2014-01-24 15:21:50 +00:00
|
|
|
class ModalMainMenu : public BaseModalObject {
|
2014-01-24 19:25:28 +00:00
|
|
|
public:
|
|
|
|
int _field_34;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ModalMainMenu();
|
2014-01-24 15:21:50 +00:00
|
|
|
virtual ~ModalMainMenu() {}
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message) { return false; }
|
|
|
|
virtual bool init(int counterdiff) { return true; }
|
|
|
|
virtual void update() {}
|
|
|
|
virtual void saveload() {}
|
|
|
|
};
|
|
|
|
|
2014-02-01 14:52:20 +00:00
|
|
|
class ModalHelp : public BaseModalObject {
|
|
|
|
public:
|
|
|
|
ModalHelp();
|
|
|
|
virtual ~ModalHelp() {}
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message) { return false; }
|
|
|
|
virtual bool init(int counterdiff) { return true; }
|
|
|
|
virtual void update() {}
|
|
|
|
virtual void saveload() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModalQuery : public BaseModalObject {
|
|
|
|
public:
|
|
|
|
ModalQuery();
|
|
|
|
virtual ~ModalQuery() {}
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message) { return false; }
|
|
|
|
virtual bool init(int counterdiff) { return true; }
|
|
|
|
virtual void update() {}
|
|
|
|
virtual void saveload() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModalSaveGame : public BaseModalObject {
|
|
|
|
public:
|
|
|
|
ModalSaveGame();
|
|
|
|
virtual ~ModalSaveGame() {}
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message) { return false; }
|
|
|
|
virtual bool init(int counterdiff) { return true; }
|
|
|
|
virtual void update() {}
|
|
|
|
virtual void saveload() {}
|
|
|
|
};
|
|
|
|
|
2014-01-24 15:21:50 +00:00
|
|
|
|
2013-07-30 11:29:15 +00:00
|
|
|
} // End of namespace Fullpipe
|
|
|
|
|
|
|
|
#endif /* FULLPIPE_MODAL_H */
|