-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphics.h
38 lines (31 loc) · 1.3 KB
/
graphics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef GRAPHICS_H
#define GRAPHICS_H
#include "defs.h"
#include "common.h"
typedef enum
{
OT_SDLOPENGL,
OT_SDLOPENGLVBO,
OT_LAST
} OutType;
typedef enum {GT_NONE, GT_V, GT_H} GradientType;
typedef enum {FT_FLAT, FT_GRADIENT} FillType;
typedef BitmapId (*OutLoadBitmapFunc)(const char *file, int *w, int *h);
typedef void (*OutInitSubsystemFunc)(int screen_width, int screen_height);
typedef void (*OutBlitBitmapFunc)(BitmapId bitmap_id, Transformations *transfs);
typedef void (*OutSetBackground)(FillType bt, Color main_color, Color aux_color, GradientType gt);
typedef void (*OutClearBuffer)();
typedef void (*OutBlitBuffer)();
typedef void (*OutSetFadeColor)(Color fcolor);
typedef void (*OutDrawRectangle)(Point left_top, Point right_bottom, FillType ft, GradientType gt, Color main_color, Color aux_color);
typedef void (*OutBlitPartBitmap)(BitmapId textureID, Transformations *transfs, IntPoint *leftTop, IntPoint *partSize);
OutLoadBitmapFunc graphics_LoadBitmap;
OutBlitBitmapFunc graphics_BlitBitmap;
OutBlitPartBitmap graphics_BlitPartBitmap;
OutSetBackground graphics_SetBackground;
OutClearBuffer graphics_ClearBuffer;
OutBlitBuffer graphics_BlitBuffer;
OutSetFadeColor graphics_SetFadeColor;
OutDrawRectangle graphics_DrawRectangle;
void graphics_Init(int screen_width, int screen_height);
#endif