1
0

dd.h 815 B

12345678910111213141516171819202122232425262728
  1. #ifndef _DD_H_
  2. #define _DD_H_
  3. class C_DD
  4. {
  5. public:
  6. C_DD();
  7. char *open(int w, int h, HWND hwnd); // returns error string on error, or NULL on success
  8. void close(void);
  9. int lock(unsigned char **input, unsigned char **output);
  10. void unlock(void);
  11. void setpalette(unsigned char palette[768], unsigned int time_ms);
  12. int palette_fadeleft(void); // returns how long til palette fade will be done
  13. private:
  14. LPDIRECTDRAWPALETTE g_ddp;
  15. LPDIRECTDRAW g_lpDD;
  16. LPDIRECTDRAWSURFACE g_lpDDSPrim,g_lpPrimSurfBack;
  17. LPDIRECTDRAWSURFACE g_RenderSurface[2];
  18. void *g_RenderSurfaceLocked[2];
  19. unsigned char g_palette_seek[768];
  20. unsigned char g_palette_orig[768];
  21. unsigned char g_palette_last[768];
  22. int g_pal_lastv;
  23. int cursurface;
  24. unsigned int g_palette_starttime, g_palette_endtime;
  25. };
  26. #endif // _DD_H_