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 CRUISE_GFXMODULE_H 24 #define CRUISE_GFXMODULE_H 25 26 namespace Cruise { 27 28 struct gfxModuleDataStruct { 29 int useTandy; 30 int useEGA; 31 int useVGA; 32 33 uint8 *pPage00; 34 uint8 *pPage10; 35 }; 36 37 struct palEntry { 38 uint8 R; 39 uint8 G; 40 uint8 B; 41 uint8 A; 42 }; 43 44 extern gfxModuleDataStruct gfxModuleData; 45 46 void gfxModuleData_gfxClearFrameBuffer(uint8 *ptr); 47 void gfxModuleData_setDirtyColors(int min, int max); 48 void gfxModuleData_setPalColor(int idx, int r, int g, int b); 49 void gfxModuleData_field_90(); 50 void gfxModuleData_gfxWaitVSync(); 51 void gfxModuleData_flip(); 52 void gfxModuleData_updatePalette(); 53 void gfxModuleData_updateScreen(); 54 55 void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int color); 56 void gfxModuleData_gfxCopyScreen(const uint8 *sourcePtr, uint8 *destPtr); 57 void convertGfxFromMode4(const uint8 *sourcePtr, int width, int height, uint8 *destPtr); 58 void convertGfxFromMode5(const uint8 *sourcePtr, int width, int height, uint8 *destPtr); 59 void gfxModuleData_Init(); 60 void gfxModuleData_flipScreen(); 61 //void gfxModuleData_setPal(uint8 * ptr); 62 void gfxModuleData_convertOldPalColor(uint16 oldColor, uint8 *pOutput); 63 void gfxModuleData_setPalEntries(const byte *ptr, int start, int num); 64 void gfxModuleData_setPal256(const byte *ptr); 65 void gfxModuleData_addDirtyRect(const Common::Rect &r); 66 void flip(); 67 void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 color); 68 void resetBitmap(uint8 *dataPtr, int32 dataSize); 69 70 void switchBackground(const byte *newBg); 71 72 } // End of namespace Cruise 73 74 #endif 75