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 * Based on the original sources 23 * Faery Tale II -- The Halls of the Dead 24 * (c) 1993-1996 The Wyrmkeep Entertainment Co. 25 */ 26 27 #ifndef SAGA2_VDRAW_H 28 #define SAGA2_VDRAW_H 29 30 #include "saga2/gdraw.h" 31 #include "saga2/vpage.h" 32 33 namespace Saga2 { 34 class gDisplayPort : public gPort { 35 public: ~gDisplayPort()36 virtual ~gDisplayPort() {} 37 38 vDisplayPage protoPage; 39 40 // Lowest-level drawing functions, (virtually) retargeted to 41 // call SVGA drawing routines 42 43 void fillRect(const Rect16 r); 44 clear(void)45 void clear(void) { 46 protoPage.fillRect(clip, fgPen); 47 } 48 49 // Blitting functions 50 // NOTE: svga port cannot be used a source!!! 51 void bltPixels(const gPixelMap &src, 52 int src_x, int src_y, 53 int dst_x, int dst_y, 54 int width, int height); 55 56 // Bresenham line-drawing functions 57 void line(int16 x1, int16 y1, int16 x2, int16 y2); 58 59 void scrollPixels(const Rect16 r, int dx, int dy); 60 }; 61 62 extern vDisplayPage *drawPage; 63 64 } // end of namespace Saga2 65 66 #endif 67