00001 /* 00002 Copyright (c) 2009, Dan Hagerstrand and contributors 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without 00006 modification, are permitted provided that the following conditions are met: 00007 00008 * Redistributions of source code must retain the above copyright notice, 00009 this list of conditions and the following disclaimer. 00010 00011 * Redistributions in binary form must reproduce the above copyright notice, 00012 this list of conditions and the following disclaimer in the documentation 00013 and/or other materials provided with the distribution. 00014 00015 * Neither the name of Cirrus Creative nor the names of its 00016 contributors may be used to endorse or promote products derived from this 00017 software without specific prior written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00020 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00021 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00022 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00023 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00024 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00025 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00027 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00028 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00029 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 */ 00031 00032 #ifndef BENG_IGFX_H 00033 #define BENG_IGFX_H 00034 00035 #include <allegro.h> 00036 00037 class BengScene; 00038 00039 class BengIGfx { 00040 friend class BengInterface; 00041 00042 private: 00043 00044 int displayW_; 00045 int displayH_; 00046 int displayD_; 00047 int isFullScreen_; 00048 int fullScreenDriver_; 00049 int windowDriver_; 00050 BengInterface *interface_; 00051 00052 char isInit_; 00053 int isNotClipped_; 00054 00055 int isTooSlow_; 00056 00057 BITMAP *drawTarget_; 00058 BITMAP *drawBufferMemory_; 00059 00060 void init_(void); 00061 void deinit_(void); 00062 00063 public: 00064 00065 BengIGfx(BengInterface *interface) 00066 { 00067 this->interface_ = interface; 00068 this->isInit_ = this->isNotClipped_ = 0; 00069 this->isTooSlow_ = -1; 00070 } 00071 ~BengIGfx(void); 00072 00073 void drawLoop(void); 00074 void drawScene(BengScene *scene, int x, int y, int w, int h); 00075 00076 void disableRegionClipping(void); 00077 00078 void updateScreen(void); 00079 00080 00081 }; 00082 00083 typedef BITMAP BengSurface; 00084 00085 #endif
1.5.8