DRAWBUFF.H 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef DRAWBUFF_H
  19. #define DRAWBUFF_H
  20. #ifndef WWSTD_H
  21. #include "wwstd.h"
  22. #endif
  23. class GraphicViewPortClass;
  24. class GraphicBufferClass;
  25. /*=========================================================================*/
  26. /* Define functions which have not under-gone name mangling */
  27. /*=========================================================================*/
  28. extern "C" {
  29. /*======================================================================*/
  30. /* Externs for all of the common functions between the video buffer */
  31. /* class and the graphic buffer class. */
  32. /*======================================================================*/
  33. long __cdecl Buffer_Size_Of_Region(void *thisptr, int w, int h);
  34. void __cdecl Buffer_Put_Pixel(void * thisptr, int x, int y, unsigned char color);
  35. int __cdecl Buffer_Get_Pixel(void * thisptr, int x, int y);
  36. void __cdecl Buffer_Clear(void *thisptr, unsigned char color);
  37. long __cdecl Buffer_To_Buffer(void *thisptr, int x, int y, int w, int h, void *buff, long size);
  38. long __cdecl Buffer_To_Page(int x, int y, int w, int h, void *Buffer, void *view);
  39. BOOL __cdecl Linear_Blit_To_Linear( void *thisptr, void * dest, int x_pixel, int y_pixel, int dx_pixel,
  40. int dy_pixel, int pixel_width, int pixel_height, BOOL trans);
  41. BOOL __cdecl Linear_Scale_To_Linear( void *, void *, int, int, int, int, int, int, int, int, BOOL, char *);
  42. LONG __cdecl Buffer_Print(void *thisptr, const char *str, int x, int y, int fcolor, int bcolor);
  43. /*======================================================================*/
  44. /* Externs for all of the graphic buffer class only functions */
  45. /*======================================================================*/
  46. VOID __cdecl Buffer_Draw_Line(void *thisptr, int sx, int sy, int dx, int dy, unsigned char color);
  47. VOID __cdecl Buffer_Fill_Rect(void *thisptr, int sx, int sy, int dx, int dy, unsigned char color);
  48. VOID __cdecl Buffer_Remap(void * thisptr, int sx, int sy, int width, int height, void *remap);
  49. VOID __cdecl Buffer_Fill_Quad(void * thisptr, VOID *span_buff, int x0, int y0, int x1, int y1,
  50. int x2, int y2, int x3, int y3, int color);
  51. void __cdecl Buffer_Draw_Stamp(void const *thisptr, void const *icondata, int icon, int x_pixel, int y_pixel, void const *remap);
  52. 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);
  53. void * __cdecl Get_Font_Palette_Ptr ( void );
  54. }
  55. extern GraphicViewPortClass *LogicPage;
  56. extern BOOL AllowHardwareBlitFills;
  57. #endif