INT GAME_INIT (Void * Parms = NULL, INT NUM_PARMS = 0) {// Create IDirectDRAW interface IF (Failed (DirectDrawCreateex (NULL, (Void **) & LPDD, IID_IDIRECTDRAW7, NULL)) RETURN (0);
/ / Set full screen mode IF (failed (LPDD-> SetCoopeRarative (MAIN_WINDOW_HANDLE, DDSCL_ALLSCREEN | DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT)) Return (0);
/ / Set the resolution and color bits IF (Failed (LPDD-> setDisplayMode (640, 480, 32, 0))) RETURN (0);
// Request the main display surface Memset (& DDSD, 0, SIZEOF (DDSD); DDSD.DWFLAGS = DDSD_CAPS; DDSD.DDSCAPS.DWCAPS = DDSCAPS_PRIMARFACE;
// Create a main display surface if (failed (LPDD-> CreateSurface (& DDSD, & LPDDSPRIMARY, NULL)) RETURN (0);
Return (1);
}