1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef QUEEN_CREDITS_H 24 #define QUEEN_CREDITS_H 25 26 #include "common/str-array.h" 27 #include "queen/defs.h" 28 29 namespace Queen { 30 31 class QueenEngine; 32 class LineReader; 33 34 class Credits { 35 public: 36 37 Credits(QueenEngine *vm, const char* filename); 38 39 //! update/display credits for current room 40 void update(); 41 42 //! handles room switching 43 void nextRoom(); 44 45 //! returns true if the credits are running running()46 bool running() const { return _running; } 47 48 private: 49 50 struct Line { 51 short x, y, color, fontSize; 52 const char *text; 53 }; 54 55 //! contains the formatted lines of texts to display 56 Line _list[19]; 57 58 //! true if end of credits description hasn't been reached 59 bool _running; 60 61 //! number of elements in _list array 62 int _count; 63 64 //! pause counts for next room 65 int _pause; 66 67 //! current text justification mode 68 int _justify; 69 70 //! current font size (unused ?) 71 int _fontSize; 72 73 //! current text color 74 int _color; 75 76 //! current text position 77 int _zone; 78 79 uint _lineNum; 80 81 //! contains the credits description 82 Common::StringArray _credits; 83 84 QueenEngine *_vm; 85 }; 86 87 } // End of namespace Queen 88 89 #endif 90