00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00049 #include <nds/arm9/videoGL.h>
00050
00051 #ifndef GL2D__H
00052 #define GL2D__H
00053
00054
00074 typedef enum
00075 {
00076
00077 GL_FLIP_NONE = (1 << 0),
00078 GL_FLIP_V = (1 << 1),
00079 GL_FLIP_H = (1 << 2),
00081 } GL_FLIP_MODE;
00082
00083
00107 typedef struct
00108 {
00109
00110 int width;
00111 int height;
00112 int u_off;
00113 int v_off;
00114 int textureID;
00118 } glImage;
00119
00120
00121
00122 #ifdef __cplusplus
00123 extern "C"
00124 {
00125 #endif
00126
00127
00128
00129
00130
00131
00132
00133
00134
00136 void glScreen2D( void );
00137
00138
00142 void glBegin2D( void );
00143
00144
00148 void glEnd2D( void );
00149
00150
00156 void glPutPixel( int x, int y, int color );
00157
00158
00164 void glLine( int x1, int y1, int x2, int y2, int color );
00165
00166
00172 void glBox( int x1, int y1, int x2, int y2, int color );
00173
00174
00180 void glBoxFilled( int x1, int y1, int x2, int y2, int color );
00181
00182
00191 void glBoxFilledGradient( int x1, int y1, int x2, int y2,
00192 int color1, int color2, int color3, int color4
00193 );
00194
00195
00202 void glTriangle( int x1, int y1, int x2, int y2, int x3, int y3, int color );
00203
00204
00211 void glTriangleFilled( int x1, int y1, int x2, int y2, int x3, int y3, int color );
00212
00213
00214
00223 void glTriangleFilledGradient( int x1, int y1, int x2, int y2, int x3, int y3,
00224 int color1, int color2, int color3
00225 );
00226
00227
00228
00235 void glSprite( int x, int y, int flipmode, const glImage *spr );
00236
00237
00245 void glSpriteScale( int x, int y, s32 scale, int flipmode, const glImage *spr );
00246
00247
00256 void glSpriteScaleXY( int x, int y, s32 scaleX, s32 scaleY, int flipmode, const glImage *spr );
00257
00258
00266 void glSpriteRotate( int x, int y, s32 angle, int flipmode, const glImage *spr );
00267
00268
00277 void glSpriteRotateScale( int x, int y, s32 angle, s32 scale, int flipmode, const glImage *spr);
00278
00279
00289 void glSpriteRotateScaleXY( int x, int y, s32 angle, s32 scaleX, s32 scaleY, int flipmode, const glImage *spr);
00290
00291
00299 void glSpriteStretchHorizontal(int x, int y, int length_x, const glImage *spr );
00300
00301
00311 void glSpriteOnQuad( int x1, int y1,
00312 int x2, int y2,
00313 int x3, int y3,
00314 int x4, int y4,
00315 int flipmode, const glImage *spr
00316 );
00317
00318
00332 int glLoadSpriteSet( glImage *sprite,
00333 const unsigned int numframes,
00334 const unsigned int *texcoords,
00335 GL_TEXTURE_TYPE_ENUM type,
00336 int sizeX,
00337 int sizeY,
00338 int param,
00339 int pallette_width,
00340 const u16 *palette,
00341 const uint8 *texture
00342 );
00343
00344
00360 int glLoadTileSet( glImage *sprite,
00361 int tile_wid,
00362 int tile_hei,
00363 int bmp_wid,
00364 int bmp_hei,
00365 GL_TEXTURE_TYPE_ENUM type,
00366 int sizeX,
00367 int sizeY,
00368 int param,
00369 int pallette_width,
00370 const u16 *palette,
00371 const uint8 *texture
00372 );
00373
00374
00375
00376 #ifdef __cplusplus
00377 }
00378 #endif
00379
00380 #endif
00381
00382