fork(1) download
  1. #include <ddraw.h>
  2. #include "Singleton.h"
  3. #ifndef _DIRECTDRAW_H_
  4. #define _DIRECTDRAW_H_
  5.  
  6. class DirectDraw : public Singleton<DirectDraw>
  7. {
  8. public:
  9. DirectDraw(void);
  10. ~DirectDraw(void);
  11. int CreateDevice(HWND hWindow,int ScreenWidth, int ScreenHeight,bool FullScreen);
  12. void RestoreSurfaces();
  13. void ClearSurface(HWND hWindow);
  14. void PresentBackBuffer(HWND hWindow);
  15.  
  16. LPDIRECTDRAWSURFACE7& GetBackBuffer();
  17. LPDIRECTDRAW7 GetDirectDrawObject();
  18.  
  19. int GetScreenWidth();
  20. int GetScreenHeight();
  21. bool GetFullScreen();
  22.  
  23.  
  24. private:
  25.  
  26. bool m_fullScreen;
  27. int m_bitDepth;
  28. int m_screenWidth;
  29. int m_screenHeight;
  30.  
  31. LPDIRECTDRAW7 m_DD; // The DirectDraw object
  32. LPDIRECTDRAWCLIPPER m_clipper; // Clipper for primary surface
  33. LPDIRECTDRAWSURFACE7 m_DDS; // Primary surface
  34. LPDIRECTDRAWSURFACE7 m_DDSBack; // Back surface
  35.  
  36. };
  37.  
  38. #endif // _DIRECTDRAW_H_
  39.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:19: error: ddraw.h: No such file or directory
prog.cpp:2:23: error: Singleton.h: No such file or directory
prog.cpp:6: error: expected template-name before ‘<’ token
prog.cpp:6: error: expected `{' before ‘<’ token
prog.cpp:6: error: expected unqualified-id before ‘<’ token
stdout
Standard output is empty