1 #ifndef _LICE_EXTENDED_
2 #define _LICE_EXTENDED_
6 #define DISABLE_LICE_EXTENSIONS
8 // stuff to pass to LICE_IBitmap::Extended
12 LICE_EXT_SUPPORTS_ID
, // data = ID, returns 1 if that extension ID is supported
15 LICE_EXT_FILLRECT_ACCEL
,
16 LICE_EXT_DRAWCBEZIER_ACCEL
,
17 LICE_EXT_DRAWGLYPH_ACCEL
,
19 LICE_EXT_SCALEDBLIT_ACCEL
,
20 LICE_EXT_GETFBOTEX_ACCEL
, // if the bitmap is implemented as an openGL framebuffer object, get its texture backing store
21 LICE_EXT_DASHEDLINE_ACCEL
,
22 LICE_EXT_GETPIXEL_ACCEL
,
23 LICE_EXT_PUTPIXEL_ACCEL
,
24 LICE_EXT_SETCLIP
, // data == 0 to clear clip
26 LICE_EXT_FORGET
, // optimizations can sometimes happen if a bitmap can be told it doesn't need to retain data after it's accessed
27 LICE_EXT_DRAWTRIANGLE_ACCEL
,
30 struct LICE_Ext_Line_acceldata
38 LICE_Ext_Line_acceldata(float _x1
, float _y1
, float _x2
, float _y2
, LICE_pixel _color
, float _alpha
, int _mode
, bool _aa
)
39 : x1(_x1
), y1(_y1
), x2(_x2
), y2(_y2
), color(_color
), alpha(_alpha
), mode(_mode
), aa(_aa
) {}
42 struct LICE_Ext_FillRect_acceldata
49 LICE_Ext_FillRect_acceldata(int _x
, int _y
, int _w
, int _h
, LICE_pixel _color
, float _alpha
, int _mode
)
50 : x(_x
), y(_y
), w(_w
), h(_h
), color(_color
), alpha(_alpha
), mode(_mode
) {}
53 struct LICE_Ext_DrawCBezier_acceldata
55 float xstart
, ystart
, xctl1
, yctl1
, xctl2
, yctl2
, xend
, yend
;
61 LICE_Ext_DrawCBezier_acceldata(float _xstart
, float _ystart
, float _xctl1
, float _yctl1
, float _xctl2
, float _yctl2
, float _xend
, float _yend
,
62 LICE_pixel _color
, float _alpha
, int _mode
, bool _aa
)
63 : xstart(_xstart
), ystart(_ystart
), xctl1(_xctl1
), yctl1(_yctl1
), xctl2(_xctl2
), yctl2(_yctl2
), xend(_xend
), yend(_yend
),
64 color(_color
), alpha(_alpha
), mode(_mode
), aa(_aa
) {}
67 struct LICE_Ext_DrawGlyph_acceldata
72 const LICE_pixel_chan
* alphas
;
77 LICE_Ext_DrawGlyph_acceldata(int _x
, int _y
, LICE_pixel _color
, LICE_pixel_chan
* _alphas
, int _glyph_w
, int _glyph_h
, float _alpha
, int _mode
)
78 : x(_x
), y(_y
), color(_color
), alphas(_alphas
), glyph_w(_glyph_w
), glyph_h(_glyph_h
), alpha(_alpha
), mode(_mode
) {}
81 struct LICE_Ext_Blit_acceldata
84 int dstx
, dsty
, srcx
, srcy
, srcw
, srch
;
88 LICE_Ext_Blit_acceldata(LICE_IBitmap
* _src
, int _dstx
, int _dsty
, int _srcx
, int _srcy
, int _srcw
, int _srch
, float _alpha
, int _mode
)
89 : src(_src
), dstx(_dstx
), dsty(_dsty
), srcx(_srcx
), srcy(_srcy
), srcw(_srcw
), srch(_srch
), alpha(_alpha
), mode(_mode
) {}
92 struct LICE_Ext_ScaledBlit_acceldata
95 int dstx
, dsty
, dstw
, dsth
;
96 float srcx
, srcy
, srcw
, srch
;
100 LICE_Ext_ScaledBlit_acceldata(LICE_IBitmap
* _src
, int _dstx
, int _dsty
, int _dstw
, int _dsth
, float _srcx
, float _srcy
, float _srcw
, float _srch
, float _alpha
, int _mode
)
101 : src(_src
), dstx(_dstx
), dsty(_dsty
), dstw(_dstw
), dsth(_dsth
), srcx(_srcx
), srcy(_srcy
), srcw(_srcw
), srch(_srch
), alpha(_alpha
), mode(_mode
) {}
104 struct LICE_Ext_DashedLine_acceldata
106 float x1
, y1
, x2
, y2
;
113 LICE_Ext_DashedLine_acceldata(float _x1
, float _y1
, float _x2
, float _y2
, int _pxon
, int _pxoff
, LICE_pixel _color
, float _alpha
, int _mode
, bool _aa
)
114 : x1(_x1
), y1(_y1
), x2(_x2
), y2(_y2
), pxon(_pxon
), pxoff(_pxoff
), color(_color
), alpha(_alpha
), mode(_mode
), aa(_aa
) {}
117 struct LICE_Ext_GetPixel_acceldata
120 LICE_pixel px
; // return
122 LICE_Ext_GetPixel_acceldata(int _x
, int _y
)
123 : x(_x
), y(_y
), px(0) {}
126 struct LICE_Ext_PutPixel_acceldata
133 LICE_Ext_PutPixel_acceldata(int _x
, int _y
, LICE_pixel _color
, float _alpha
, int _mode
)
134 : x(_x
), y(_y
), color(_color
), alpha(_alpha
), mode(_mode
) {}
137 struct LICE_Ext_SetClip_data
141 LICE_Ext_SetClip_data(int _x
, int _y
, int _w
, int _h
)
142 : x(_x
), y(_y
), w(_w
), h(_h
) {}
147 struct LICE_Ext_DrawTriangle_acceldata
149 pl_Mat
*mat
; // will need to include plush.h to access this
150 double VertexShades
[3][3]; // for solid element
151 float scrx
[3], scry
[3], scrz
[3]; // scrz = 1/Zdist
152 double mapping_coords
[2][3][2]; // [texture or texture2][vertex][uv]
155 struct LICE_Ext_WindowBlit_data
158 int destx
, desty
, srcx
, srcy
, w
, h
;
160 LICE_Ext_WindowBlit_data(HWND _hwnd
, int _destx
, int _desty
, int _srcx
, int _srcy
, int _w
, int _h
)
161 : hwnd(_hwnd
), destx(_destx
), desty(_desty
), srcx(_srcx
), srcy(_srcy
), w(_w
), h(_h
) {}