2013-07-30 14:29:15 +03: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 11:35:27 +02:00
|
|
|
class PictureObject;
|
2014-01-15 11:17:40 +02:00
|
|
|
|
2013-09-18 19:26:02 +04:00
|
|
|
class BaseModalObject {
|
2013-07-31 20:06:13 +03:00
|
|
|
public:
|
|
|
|
|
2013-09-18 19:26:02 +04:00
|
|
|
BaseModalObject *_parentObj;
|
2013-07-30 14:29:15 +03:00
|
|
|
|
|
|
|
public:
|
2013-09-18 19:26:02 +04:00
|
|
|
BaseModalObject() : _parentObj(0) {}
|
|
|
|
virtual ~BaseModalObject() {}
|
2013-07-30 14:29:15 +03:00
|
|
|
|
2013-10-28 23:03:43 +02:00
|
|
|
|
|
|
|
virtual bool pollEvent() = 0;
|
2013-10-28 00:57:07 +02:00
|
|
|
virtual bool handleMessage(ExCommand *message) = 0;
|
|
|
|
virtual bool init(int counterdiff) = 0;
|
2013-10-28 23:18:33 +02:00
|
|
|
virtual void update() = 0;
|
2013-10-28 23:03:43 +02:00
|
|
|
|
2013-10-28 00:57:07 +02:00
|
|
|
virtual void saveload() = 0;
|
2013-07-31 20:06:13 +03:00
|
|
|
};
|
2013-07-30 14:29:15 +03:00
|
|
|
|
2013-09-18 19:26:02 +04:00
|
|
|
class ModalIntro : public BaseModalObject {
|
2013-08-07 00:43:08 +03:00
|
|
|
int _field_8;
|
|
|
|
int _introFlags;
|
|
|
|
int _countDown;
|
2013-10-28 23:37:27 +02:00
|
|
|
int _stillRunning;
|
2013-08-07 00:43:08 +03:00
|
|
|
int _sfxVolume;
|
|
|
|
|
|
|
|
public:
|
2013-09-18 19:26:02 +04:00
|
|
|
ModalIntro();
|
2013-11-06 23:52:01 +02:00
|
|
|
virtual ~ModalIntro();
|
2013-08-07 00:43:08 +03:00
|
|
|
|
2013-10-28 23:03:43 +02:00
|
|
|
virtual bool pollEvent() { return true; }
|
2013-08-07 00:43:08 +03:00
|
|
|
virtual bool handleMessage(ExCommand *message);
|
2013-10-28 00:57:07 +02:00
|
|
|
virtual bool init(int counterdiff);
|
2013-10-28 23:18:33 +02:00
|
|
|
virtual void update();
|
2013-10-28 23:03:43 +02:00
|
|
|
virtual void saveload() {}
|
|
|
|
|
2013-10-28 23:37:27 +02:00
|
|
|
void finish();
|
2013-10-28 23:03:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class ModalVideoPlayer : public BaseModalObject {
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual bool pollEvent() { return true; }
|
|
|
|
virtual bool handleMessage(ExCommand *message) { return true; }
|
2013-10-28 23:37:27 +02:00
|
|
|
virtual bool init(int counterdiff) { return false; }
|
2013-10-28 23:18:33 +02:00
|
|
|
virtual void update() {}
|
2013-10-28 23:03:43 +02:00
|
|
|
virtual void saveload() {}
|
|
|
|
|
|
|
|
void play(const char *fname);
|
2013-08-07 00:43:08 +03:00
|
|
|
};
|
|
|
|
|
2014-01-15 11:17:40 +02:00
|
|
|
class ModalMap : public BaseModalObject {
|
|
|
|
Scene *_mapScene;
|
2014-01-15 11:35:27 +02:00
|
|
|
PictureObject *_pic;
|
2014-01-15 11:17:40 +02: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 11:55:01 -08:00
|
|
|
class ModalFinal : public BaseModalObject {
|
2014-01-24 07:21:50 -08: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-23 11:55:01 -08:00
|
|
|
public:
|
2014-01-24 07:21:50 -08:00
|
|
|
ModalCredits() {}
|
|
|
|
virtual ~ModalCredits() {}
|
2014-01-23 11:55:01 -08:00
|
|
|
|
|
|
|
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 07:21:50 -08:00
|
|
|
class ModalMainMenu : public BaseModalObject {
|
|
|
|
public:
|
|
|
|
ModalMainMenu() {}
|
|
|
|
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() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-07-30 14:29:15 +03:00
|
|
|
} // End of namespace Fullpipe
|
|
|
|
|
|
|
|
#endif /* FULLPIPE_MODAL_H */
|