sysutil.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifdef PRECOMPILEDHEADERS
  2. #include "TileEngine All.h"
  3. #else
  4. #include <stdio.h>
  5. #include <stdarg.h>
  6. #include <time.h>
  7. #include "sgp.h"
  8. #include "himage.h"
  9. #include "vsurface.h"
  10. #include "vsurface_private.h"
  11. #include "wcheck.h"
  12. #include "sysutil.h"
  13. #include "renderworld.h"
  14. #endif
  15. UINT32 guiBOTTOMPANEL = 0;
  16. UINT32 guiRIGHTPANEL = 0;
  17. UINT32 guiRENDERBUFFER = 0;
  18. UINT32 guiSAVEBUFFER = 0;
  19. UINT32 guiEXTRABUFFER = 0;
  20. BOOLEAN gfExtraBuffer = FALSE;
  21. BOOLEAN InitializeSystemVideoObjects( )
  22. {
  23. return( TRUE );
  24. }
  25. BOOLEAN InitializeGameVideoObjects( )
  26. {
  27. VSURFACE_DESC vs_desc;
  28. UINT16 usWidth;
  29. UINT16 usHeight;
  30. UINT8 ubBitDepth;
  31. // Create render buffer
  32. GetCurrentVideoSettings( &usWidth, &usHeight, &ubBitDepth );
  33. vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
  34. vs_desc.usWidth = usWidth;
  35. vs_desc.usHeight = usHeight;
  36. vs_desc.ubBitDepth = ubBitDepth;
  37. CHECKF( AddVideoSurface( &vs_desc, &guiSAVEBUFFER ) );
  38. CHECKF( AddVideoSurface( &vs_desc, &guiEXTRABUFFER ) );
  39. gfExtraBuffer = TRUE;
  40. guiRENDERBUFFER=FRAME_BUFFER;
  41. return( TRUE );
  42. }