DRAWBUFF.H 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. #ifndef DRAWBUFF_H
  15. #define DRAWBUFF_H
  16. #ifndef WWSTD_H
  17. #include "wwstd.h"
  18. #endif
  19. class GraphicViewPortClass;
  20. class GraphicBufferClass;
  21. /*=========================================================================*/
  22. /* Define functions which have not under-gone name mangling */
  23. /*=========================================================================*/
  24. extern "C" {
  25. /*======================================================================*/
  26. /* Externs for all of the common functions between the video buffer */
  27. /* class and the graphic buffer class. */
  28. /*======================================================================*/
  29. long __cdecl Buffer_Size_Of_Region(void *thisptr, int w, int h);
  30. void __cdecl Buffer_Put_Pixel(void * thisptr, int x, int y, unsigned char color);
  31. int __cdecl Buffer_Get_Pixel(void * thisptr, int x, int y);
  32. void __cdecl Buffer_Clear(void *thisptr, unsigned char color);
  33. long __cdecl Buffer_To_Buffer(void *thisptr, int x, int y, int w, int h, void *buff, long size);
  34. long __cdecl Buffer_To_Page(int x, int y, int w, int h, void *Buffer, void *view);
  35. BOOL __cdecl Linear_Blit_To_Linear( void *thisptr, void * dest, int x_pixel, int y_pixel, int dx_pixel,
  36. int dy_pixel, int pixel_width, int pixel_height, BOOL trans);
  37. BOOL __cdecl Linear_Scale_To_Linear( void *, void *, int, int, int, int, int, int, int, int, BOOL, char *);
  38. LONG __cdecl Buffer_Print(void *thisptr, const char *str, int x, int y, int fcolor, int bcolor);
  39. /*======================================================================*/
  40. /* Externs for all of the graphic buffer class only functions */
  41. /*======================================================================*/
  42. VOID __cdecl Buffer_Draw_Line(void *thisptr, int sx, int sy, int dx, int dy, unsigned char color);
  43. VOID __cdecl Buffer_Fill_Rect(void *thisptr, int sx, int sy, int dx, int dy, unsigned char color);
  44. VOID __cdecl Buffer_Remap(void * thisptr, int sx, int sy, int width, int height, void *remap);
  45. VOID __cdecl Buffer_Fill_Quad(void * thisptr, VOID *span_buff, int x0, int y0, int x1, int y1,
  46. int x2, int y2, int x3, int y3, int color);
  47. void __cdecl Buffer_Draw_Stamp(void const *thisptr, void const *icondata, int icon, int x_pixel, int y_pixel, void const *remap);
  48. void __cdecl Buffer_Draw_Stamp_Clip(void const *thisptr, void const *icondata, int icon, int x_pixel, int y_pixel, void const *remap, int ,int,int,int);
  49. void * __cdecl Get_Font_Palette_Ptr ( void );
  50. }
  51. extern GraphicViewPortClass *LogicPage;
  52. extern BOOL AllowHardwareBlitFills;
  53. #endif