00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <Windows.h>
00023 #include <stdio.h>
00024
00025
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 }