Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

TPage.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  TPage.h                                                                             */
00003 /*                                                                                      */
00004 /*  Author: John Pollard                                                                */
00005 /*  Description: D3D cache manager using pages                                          */
00006 /*                                                                                      */
00007 /*   07/16/2000 Wendell Buckner
00008 /*    Convert to Directx7...    
00009 /*  The contents of this file are subject to the Genesis3D Public License               */
00010 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00011 /*  compliance with the License. You may obtain a copy of the License at                */
00012 /*  http://www.genesis3d.com                                                            */
00013 /*                                                                                      */
00014 /*  Software distributed under the License is distributed on an "AS IS"                 */
00015 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00016 /*  the License for the specific language governing rights and limitations              */
00017 /*  under the License.                                                                  */
00018 /*                                                                                      */
00019 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00020 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00021 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00022 /*                                                                                      */
00023 /****************************************************************************************/
00024 #ifndef TPAGE_H
00025 #define TPAGE_H
00026 
00027 #include <Windows.h>
00028 
00029 #include <DDraw.h>
00030 #include <D3D.H>
00031 
00032 typedef struct TPage_Mgr        TPage_Mgr;
00033 typedef struct TPage            TPage;
00034 typedef struct TPage_Block      TPage_Block;
00035 
00036 //
00037 // TPage_Mgr
00038 //
00039 
00040 /* 07/16/2000 Wendell Buckner
00041     Convert to Directx7...    
00042 TPage_Mgr               *TPage_MgrCreate(LPDIRECTDRAW4 lpDD, const DDSURFACEDESC2 *SurfaceDesc, int32 NumPages); */
00043 TPage_Mgr               *TPage_MgrCreate(LPDIRECTDRAW7 lpDD, const DDSURFACEDESC2 *SurfaceDesc, int32 NumPages);
00044 
00045 void                    TPage_MgrDestroy(TPage_Mgr **TPageMgr);
00046 geBoolean               TPage_MgrHasTPage(TPage_Mgr *Mgr, TPage *Page);
00047 geBoolean               TPage_MgrAttachTPage(TPage_Mgr *Mgr, TPage *TPage);
00048 void                    TPage_MgrDetachTPage(TPage_Mgr *Mgr, TPage *TPage);
00049 TPage_Block             *TPage_MgrFindOptimalBlock(TPage_Mgr *Mgr, uint32 LRU);
00050 
00051 //
00052 // TPage
00053 //
00054 
00055 /* 07/16/2000 Wendell Buckner
00056     Convert to Directx7...    
00057 TPage                   *TPage_Create(LPDIRECTDRAW4 lpDD, const DDSURFACEDESC2 *SurfDesc); */
00058 TPage                   *TPage_Create(LPDIRECTDRAW7 lpDD, const DDSURFACEDESC2 *SurfDesc);
00059 
00060 void                    TPage_CreateRef(TPage *Page);
00061 void                    TPage_Destroy(TPage **Page1);
00062 geBoolean               TPage_HasBlock(TPage *TPage, TPage_Block *Block);
00063 geBoolean               TPage_AttachBlock(TPage *Page, TPage_Block *Block);
00064 void                    TPage_DetachBlock(TPage *TPage, TPage_Block *Block);
00065 
00066 /* 07/16/2000 Wendell Buckner
00067     Convert to Directx7...    
00068 geBoolean               TPage_CreateSurfaces(TPage *Page, LPDIRECTDRAW4 lpDD, const DDSURFACEDESC2 *SurfDesc);*/
00069 geBoolean               TPage_CreateSurfaces(TPage *Page, LPDIRECTDRAW7 lpDD, const DDSURFACEDESC2 *SurfDesc);
00070 
00071 void                    TPage_DestroySurfaces(TPage *Page);
00072 
00073 //
00074 //TPage_Block
00075 //
00076 
00077 /* 07/16/2000 Wendell Buckner
00078     Convert to Directx7...    
00079 TPage_Block             *TPage_BlockCreate(LPDIRECTDRAWSURFACE4 Surface, LPDIRECT3DTEXTURE2   Texture, const RECT *Rect);*/
00080 TPage_Block             *TPage_BlockCreate(LPDIRECTDRAWSURFACE7 Surface, LPDIRECTDRAWSURFACE7 Texture, const RECT *Rect);
00081 
00082 
00083 geBoolean               TPage_BlockCreateRef(TPage_Block *Block);
00084 void                    TPage_BlockDestroy(TPage_Block **Block);
00085 
00086 /* 07/16/2000 Wendell Buckner
00087     Convert to Directx7...    
00088 LPDIRECT3DTEXTURE2              TPage_BlockGetTexture(TPage_Block *Block);
00089 LPDIRECTDRAWSURFACE4    TPage_BlockGetSurface(TPage_Block *Block);*/
00090 LPDIRECTDRAWSURFACE7    TPage_BlockGetTexture(TPage_Block *Block);
00091 LPDIRECTDRAWSURFACE7    TPage_BlockGetSurface(TPage_Block *Block);
00092 
00093 const RECT              *TPage_BlockGetRect(TPage_Block *Block);
00094 void                    TPage_BlockSetLRU(TPage_Block *Block, uint32 LRU);
00095 void                    TPage_BlockSetUserData(TPage_Block *Block, void *UserData);
00096 void                    *TPage_BlockGetUserData(TPage_Block *Block);
00097 
00098 #endif  

Generated on Tue Sep 30 12:36:32 2003 for GTestAndEngine by doxygen 1.3.2