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 BLADERUNNER_SCREEN_EFFECTS_H 24 #define BLADERUNNER_SCREEN_EFFECTS_H 25 26 #include "bladerunner/color.h" 27 28 #include "common/array.h" 29 30 namespace Common { 31 class ReadStream; 32 } 33 34 namespace BladeRunner { 35 36 class BladeRunnerEngine; 37 38 class ScreenEffects { 39 friend class Debugger; 40 static const int kMaxEffectsInScene = 7; 41 public: 42 struct Entry { 43 Color256 palette[16]; 44 uint16 x; 45 uint16 y; 46 uint16 width; 47 uint16 height; 48 uint16 z; 49 uint8 *data; 50 }; 51 52 BladeRunnerEngine *_vm; 53 54 Common::Array<Entry> _entries; 55 uint8 *_data; 56 int _dataSize; 57 #if BLADERUNNER_ORIGINAL_BUGS 58 #else 59 Common::Array<int> _skipEntries; // added member to allow skipping specified effects 60 #endif // BLADERUNNER_ORIGINAL_BUGS 61 62 public: 63 ScreenEffects(BladeRunnerEngine *vm, int size); 64 ~ScreenEffects(); 65 66 void readVqa(Common::SeekableReadStream *stream); 67 void getColor(Color256 *outColor, uint16 x, uint16 y, uint16 z) const; 68 #if BLADERUNNER_ORIGINAL_BUGS 69 #else 70 void toggleEntry(int effectId, bool skip); // added method to allow skipping specified effects 71 #endif // BLADERUNNER_ORIGINAL_BUGS 72 //TODO 73 //bool isAffectingArea(int x, int y, int width, int height, int unk); 74 }; 75 76 } // End of namespace BladeRunner 77 78 #endif 79