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

system.c

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  system.c                                                                            */
00003 /*                                                                                      */
00004 /*  Author:       John Pollard, Ken Baird                                               */
00005 /*  Description:  misc init stuff                                                       */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*Genesis3D Version 1.1 released November 15, 1999                            */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 #include <Windows.h>
00023 #include <stdio.h>
00024 
00025 //#define USE_CACHE
00026 
00027 #include "System.h"
00028 #include "SoftDrv.h"
00029 #include "DCommon.h"
00030 #include "Render.h"
00031 #include "Sal.h"
00032 #include "dmodes.h"
00033 
00034 
00035 BOOL SysInit(void)
00036 {
00037         if(bWindowed)
00038         {
00039                 SAL_get_pixel_format(&ClientWindow.PixelPitch,
00040                                                         &ClientWindow.BytesPerPixel,
00041                                                         &ClientWindow.R_shift,
00042                                                         &ClientWindow.R_mask,
00043                                                         &ClientWindow.R_width,
00044                                                         &ClientWindow.G_shift,
00045                                                         &ClientWindow.G_mask,
00046                                                         &ClientWindow.G_width,
00047                                                         &ClientWindow.B_shift,
00048                                                         &ClientWindow.B_mask,
00049                                                         &ClientWindow.B_width);
00050         }
00051         else
00052         {
00053                 GetDDrawPixelFormat(&ClientWindow);
00054         }
00055 
00056         if (!RenderInit(&ClientWindow))
00057                 return FALSE;
00058         
00059         return TRUE;
00060 }
00061 
00062 BOOL SysShutdown(void)
00063 {
00064         RenderShutdown();
00065 
00066         return TRUE;
00067 }

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