![[]](/images/special/trans.gif)
LibN2L-4 Library Code ReferenceClassesCompounds Files Members Method Index Full Reference cSurfaceInterface.hGo to the documentation of this file.00001 /************************************************************************ 00002 Nova-2 Library (libN2L, or simply n2l) Game development C++ Library 00003 Copyright (C) 2003 Aaron Cameron 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 A copy of the GNU Lesser General Public License has been provided with 00020 this library in the file 'COPYING'. 00021 00022 Contact information for the author of this library has been provided 00023 with this library in the file 'AUTHOR'. 00024 ************************************************************************/ 00025 #ifndef _n2l4_cSurfaceInterface_H 00026 #define _n2l4_cSurfaceInterface_H 00027 00028 #include "n2l/n2l.h" 00029 #include "n2l/vfs.h" 00030 #include "n2l/geometry.h" 00031 00032 #include "SDL_video.h" 00033 00034 namespace n2l 00035 { 00036 class cPixelFormat; 00037 class cSurfaceProperties; 00038 class cSurfaceInterface 00039 { 00040 public: 00041 cSurfaceInterface(); 00042 virtual ~cSurfaceInterface(); 00043 00044 // virtual void assign( const cSurfaceInterface & iSurface ) = 0; 00045 00046 00055 virtual void blit( const tVector2s & iDestPos, 00056 const cSurfaceInterface & iSurface, 00057 const tRectangle2u & iSrcRect = 00058 tRectangle2u( tVector2u(0,0), 00059 tVector2u(0,0) ) ) = 0; 00060 00068 virtual const tBool empty() const = 0; 00069 00070 00077 virtual const cPixelFormat & format() const = 0; 00078 00079 00085 virtual const cSurfaceProperties & properties() const = 0; 00086 00087 00089 virtual void load( const cVfsNodeInterface & iFile ) = 0; 00090 00091 00097 virtual void supportedFileFormats( tFileFormatList & oFormatList ) const = 0; 00098 00115 virtual const void * const aquireROBuffer() const = 0; 00116 00122 virtual void releaseROBuffer() const = 0; 00123 00130 virtual const tBool supportsRWBuffer() const = 0; 00131 00143 virtual void * const aquireRWBuffer() = 0; 00144 00147 virtual void releaseRWBuffer() const = 0; 00148 00149 00172 virtual const tBool surfaceIsSupported( 00173 const cPixelFormat & iFormat, 00174 const cSurfaceProperties & iProperties ) const = 0; 00175 00176 00178 virtual void free() = 0; 00179 00180 00182 virtual SDL_Surface * const rawSurface() const = 0; 00183 00184 }; // class 00185 00186 00187 } // namespace n2l 00188 00189 #endif |