home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / FPSE_src / system / amiga / plugin / gpu / gpuset.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-01  |  569 b   |  34 lines

  1. #include "gpulocal.h"
  2.  
  3. static int initialized=0;
  4.  
  5. int GPU_Open(UINT32 *par)
  6. {
  7. // Setup GPU
  8.     memset(&gpu,0,sizeof(gpu));
  9.     gpu.info[7] = 2; /* type */
  10.     gpu.disp.w = gpu.screen.w = 256;
  11.     gpu.disp.h = gpu.screen.h = 240;
  12.     CacheInit();
  13.     DrawInit();
  14.  
  15. // Allocate screen
  16.     vram = win_createbitmap(1024,512,16);
  17.     if (vram == NULL) return FPSE_ERR;
  18.     inTrans  = 0;
  19.     toUpdate = 0;
  20.  
  21. // Reset GPU
  22.     GP1_Write(0);
  23.  
  24.     initialized = 1;
  25.  
  26.     return FPSE_OK;
  27. }
  28.  
  29. void GPU_Close(void)
  30. {
  31.     if (!initialized) return;
  32.     CacheDeinit();
  33.     win_destroy();
  34. }