DRAWBUFF.H (3447B)
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 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 17 #ifndef DRAWBUFF_H 18 #define DRAWBUFF_H 19 20 21 #ifndef WWSTD_H 22 #include "wwstd.h" 23 #endif 24 25 class GraphicViewPortClass; 26 class GraphicBufferClass; 27 /*=========================================================================*/ 28 /* Define functions which have not under-gone name mangling */ 29 /*=========================================================================*/ 30 31 extern "C" { 32 /*======================================================================*/ 33 /* Externs for all of the common functions between the video buffer */ 34 /* class and the graphic buffer class. */ 35 /*======================================================================*/ 36 long __cdecl Buffer_Size_Of_Region(void *thisptr, int w, int h); 37 38 void __cdecl Buffer_Put_Pixel(void * thisptr, int x, int y, unsigned char color); 39 int __cdecl Buffer_Get_Pixel(void * thisptr, int x, int y); 40 void __cdecl Buffer_Clear(void *thisptr, unsigned char color); 41 long __cdecl Buffer_To_Buffer(void *thisptr, int x, int y, int w, int h, void *buff, long size); 42 long __cdecl Buffer_To_Page(int x, int y, int w, int h, void *Buffer, void *view); 43 BOOL __cdecl Linear_Blit_To_Linear( void *thisptr, void * dest, int x_pixel, int y_pixel, int dx_pixel, 44 int dy_pixel, int pixel_width, int pixel_height, BOOL trans); 45 BOOL __cdecl Linear_Scale_To_Linear( void *, void *, int, int, int, int, int, int, int, int, BOOL, char *); 46 47 LONG __cdecl Buffer_Print(void *thisptr, const char *str, int x, int y, int fcolor, int bcolor); 48 49 /*======================================================================*/ 50 /* Externs for all of the graphic buffer class only functions */ 51 /*======================================================================*/ 52 VOID __cdecl Buffer_Draw_Line(void *thisptr, int sx, int sy, int dx, int dy, unsigned char color); 53 VOID __cdecl Buffer_Fill_Rect(void *thisptr, int sx, int sy, int dx, int dy, unsigned char color); 54 VOID __cdecl Buffer_Remap(void * thisptr, int sx, int sy, int width, int height, void *remap); 55 VOID __cdecl Buffer_Fill_Quad(void * thisptr, VOID *span_buff, int x0, int y0, int x1, int y1, 56 int x2, int y2, int x3, int y3, int color); 57 void __cdecl Buffer_Draw_Stamp(void const *thisptr, void const *icondata, int icon, int x_pixel, int y_pixel, void const *remap); 58 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); 59 void * __cdecl Get_Font_Palette_Ptr ( void ); 60 } 61 62 extern GraphicViewPortClass *LogicPage; 63 extern BOOL AllowHardwareBlitFills; 64 #endif