2004-01-05 11:58:20 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2006-01-18 17:39:49 +00:00
|
|
|
* Copyright (C) 2003-2006 The ScummVM project
|
2004-01-05 11:58:20 +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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2004-01-05 11:58:20 +00:00
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CREDITS_H
|
|
|
|
#define CREDITS_H
|
|
|
|
|
|
|
|
#include "common/util.h"
|
|
|
|
#include "queen/defs.h"
|
|
|
|
|
|
|
|
namespace Queen {
|
|
|
|
|
|
|
|
class QueenEngine;
|
|
|
|
class LineReader;
|
|
|
|
|
|
|
|
class Credits {
|
|
|
|
public:
|
|
|
|
|
|
|
|
Credits(QueenEngine *vm, const char* filename);
|
|
|
|
~Credits();
|
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! update/display credits for current room
|
2004-01-05 11:58:20 +00:00
|
|
|
void update();
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! handles room switching
|
2004-01-05 11:58:20 +00:00
|
|
|
void nextRoom();
|
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! returns true if the credits are running
|
2004-01-05 11:58:20 +00:00
|
|
|
bool running() const { return _running; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
struct Line {
|
|
|
|
short x, y, color, fontSize;
|
|
|
|
const char *text;
|
2004-01-05 11:58:20 +00:00
|
|
|
};
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! contains the formatted lines of texts to display
|
2004-01-19 21:46:02 +00:00
|
|
|
Line _list[19];
|
2004-01-05 11:58:20 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! true if end of credits description hasn't been reached
|
2004-01-05 11:58:20 +00:00
|
|
|
bool _running;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! number of elements in _list array
|
2004-01-05 11:58:20 +00:00
|
|
|
int _count;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! pause counts for next room
|
2004-01-05 11:58:20 +00:00
|
|
|
int _pause;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! current text justification mode
|
2004-01-05 11:58:20 +00:00
|
|
|
int _justify;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! current font size (unused ?)
|
2004-01-05 11:58:20 +00:00
|
|
|
int _fontSize;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! current text color
|
2004-01-05 11:58:20 +00:00
|
|
|
int _color;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! current text position
|
2004-01-05 11:58:20 +00:00
|
|
|
int _zone;
|
|
|
|
|
2004-12-31 00:25:18 +00:00
|
|
|
//! contains the credits description
|
|
|
|
LineReader *_credits;
|
|
|
|
|
2005-07-30 21:11:48 +00:00
|
|
|
QueenEngine *_vm;
|
2004-01-05 11:58:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Queen
|
|
|
|
|
|
|
|
#endif
|