home *** CD-ROM | disk | FTP | other *** search
- #include "gpulocal.h"
-
- static int initialized=0;
-
- int GPU_Open(UINT32 *par)
- {
- // Setup GPU
- memset(&gpu,0,sizeof(gpu));
- gpu.info[7] = 2; /* type */
- gpu.disp.w = gpu.screen.w = 256;
- gpu.disp.h = gpu.screen.h = 240;
- CacheInit();
- DrawInit();
-
- // Allocate screen
- vram = win_createbitmap(1024,512,16);
- if (vram == NULL) return FPSE_ERR;
- inTrans = 0;
- toUpdate = 0;
-
- // Reset GPU
- GP1_Write(0);
-
- initialized = 1;
-
- return FPSE_OK;
- }
-
- void GPU_Close(void)
- {
- if (!initialized) return;
- CacheDeinit();
- win_destroy();
- }