maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
retroglu.h
Go to the documentation of this file.
1
2#ifndef RETROGLU_H
3#define RETROGLU_H
4
5/* TODO */
6#ifndef MAUG_CONST
7# define MAUG_CONST const
8#endif /* !MAUG_CONST */
9
19
20#ifndef RETROGLU_TRACE_LVL
21# define RETROGLU_TRACE_LVL 0
22#endif /* !RETROGLU_TRACE_LVL */
23
24#ifndef RETROGLU_SPRITE_TEX_FRAMES_SZ
25# define RETROGLU_SPRITE_TEX_FRAMES_SZ 10
26#endif /* !RETROGLU_SPRITE_TEX_FRAMES_SZ */
27
28#ifndef MAUG_OS_NDS
29# define glShininessf( side, light, f ) glMaterialf( side, light, f )
30#endif /* MAUG_OS_NDS */
31
32typedef float RETROGLU_COLOR[4];
33
38
39#define RETROGLU_SPRITE_X 0
40#define RETROGLU_SPRITE_Y 1
41
42#ifndef RETROGLU_SPRITE_LIST_SZ_MAX
43# define RETROGLU_SPRITE_LIST_SZ_MAX 10
44#endif /* !RETROGLU_SPRITE_LIST_SZ_MAX */
45
52 uint32_t front_px;
53 uint32_t front_py;
54 uint32_t back_px;
55 uint32_t back_py;
56 uint32_t pw;
57 uint32_t ph;
58 uint8_t flags;
59};
60
62 float vertices_front[6][2];
63 float vtexture_front[6][2];
64 float vertices_back[6][2];
65 float vtexture_back[6][2];
66 float translate_x;
67 float translate_y;
68 int rotate_y;
69 RETROGLU_COLOR color;
70 struct RETROFLAT_BITMAP texture;
71#ifdef RETROGLU_NO_LISTS
72 struct RETROGLU_SPRITE_PARMS parms[RETROGLU_SPRITE_LIST_SZ_MAX];
73#else
74 int32_t lists[RETROGLU_SPRITE_LIST_SZ_MAX];
75#endif /* RETROGLU_NO_LISTS */
76};
77
79 float vertices[6][2];
80 float vtexture[6][2];
81 int rotate_x;
82 struct RETROFLAT_BITMAP texture;
83};
84 /* maug_retroglu_sprite */
86
87#ifdef RETROFLAT_API_LIBNDS
88# define retroglu_enable_lightning()
89# define retroglu_disable_lightning()
90#else
91# define retroglu_enable_lightning() glEnable( GL_LIGHTING )
92# define retroglu_disable_lightning() glDisable( GL_LIGHTING )
93#endif /* RETROFLAT_API_NDS */
94
101
105#define retroglu_pop_overlay() \
106 glPopMatrix(); \
107 glMatrixMode( GL_MODELVIEW );
108 /* maug_retroglu_overlay */
110
111#define retroglu_tex_px_x_to_f( px, sprite ) \
112 ((px) * 1.0 / sprite->texture.tex.w)
113#define retroglu_tex_px_y_to_f( px, sprite ) \
114 ((px) * 1.0 / sprite->texture.tex.h)
115
116#define retroglu_scr_px_x_to_f( px ) \
117 (float)(((px) * 1.0 / (retroflat_screen_w() / 2)) - 1.0)
118#define retroglu_scr_px_y_to_f( py ) \
119 (float)(((py) * 1.0 / (retroflat_screen_h() / 2)) - 1.0)
120
121#define retroglu_set_sprite_tex( sprite, texture_id, bmp_w, bmp_h ) \
122 sprite->texture_id = texture_id; \
123 sprite->texture_w = bmp_w; \
124 sprite->texture_h = bmp_h;
125
126#define retroglu_set_sprite_color( sprite, color_in ) \
127 memcpy( (sprite)->color, (color_in), 3 * sizeof( float ) )
128
129void retroglu_set_tile_clip(
130 struct RETROGLU_TILE* tile,
131 uint32_t px, uint32_t py, uint32_t pw, uint32_t ph, uint8_t flags );
132
133void retroglu_set_sprite_clip(
134 struct RETROGLU_SPRITE* sprite,
135 uint32_t front_px, uint32_t front_py, uint32_t back_px, uint32_t back_py,
136 uint32_t pw, uint32_t ph, uint8_t flags );
137
144
145void retroglu_init_sprite_vertices_scale(
146 struct RETROGLU_SPRITE* sprite, float scale );
147
148void retroglu_set_sprite_pos(
149 struct RETROGLU_SPRITE* sprite, uint32_t px, uint32_t py );
150
151void retroglu_tsrot_sprite( struct RETROGLU_SPRITE* sprite );
152
158
166 struct RETROGLU_SPRITE* sprite, int list_idx,
167 uint32_t front_px, uint32_t front_py, uint32_t back_px, uint32_t back_py,
168 uint32_t pw, uint32_t ph, uint8_t flags );
169
174void retroglu_jitrender_sprite( struct RETROGLU_SPRITE* sprite, int list_idx );
175
176void retroglu_free_sprite( struct RETROGLU_SPRITE* sprite );
177
178MERROR_RETVAL retroglu_init_glyph_tex();
179
180void retroglu_destroy_glyph_tex();
181
182void retroglu_string(
183 float x, float y, float z, const RETROGLU_COLOR color,
184 const char* str, size_t str_sz, const char* font_str, uint8_t flags );
185
186MERROR_RETVAL retroglu_check_errors( const char* desc );
187
188/* int retroglu_draw_lock( struct RETROFLAT_BITMAP* bmp ); */
189
190int retroglu_draw_release( struct RETROFLAT_BITMAP* bmp );
191
192MERROR_RETVAL retroglu_blit_bitmap(
193 struct RETROFLAT_BITMAP* target, struct RETROFLAT_BITMAP* src,
194 size_t s_x, size_t s_y, size_t d_x, size_t d_y, size_t w, size_t h,
195 int16_t instance );
196
197void retroglu_px(
198 struct RETROFLAT_BITMAP* target, const RETROFLAT_COLOR color_idx,
199 size_t x, size_t y, uint8_t flags );
200
201#ifdef RETROGLU_C
202
203# define RETROFLAT_COLOR_TABLE_GL( idx, name_l, name_u, r, g, b, cgac, cgad ) \
204 MAUG_CONST float RETROGLU_COLOR_ ## name_u[] = { \
205 (float)((float)r * 1.0f / 255.0f), \
206 (float)((float)g * 1.0f / 255.0f), \
207 (float)((float)b * 1.0f / 255.0f) };
208
209RETROFLAT_COLOR_TABLE( RETROFLAT_COLOR_TABLE_GL )
210
211void retroglu_set_tile_clip(
212 struct RETROGLU_TILE* tile,
213 uint32_t px, uint32_t py, uint32_t pw, uint32_t ph, uint8_t flags
214) {
215 /* Set vertices in terms of half the clip size so that rotation is around
216 * the midpoint of the sprite, not the side!
217 */
218 float clip_tex_x = 0, /* Front tex X */
219 clip_tex_y = 0, /* Front tex Y */
220 clip_tex_w = 0,
221 clip_tex_h = 0;
222
223 /* Setup texture tilesheet. */
224
225 clip_tex_x = retroglu_tex_px_x_to_f( px, tile );
226 clip_tex_y = retroglu_tex_px_y_to_f( py, tile );
227 clip_tex_w = retroglu_tex_px_x_to_f( pw, tile );
228 clip_tex_h = retroglu_tex_px_y_to_f( ph, tile );
229
230 /* == Front Face Textures == */
231
232 /* Lower Left */
233 tile->vtexture[0][RETROGLU_SPRITE_X] = clip_tex_x;
234 tile->vtexture[0][RETROGLU_SPRITE_Y] = clip_tex_y;
235
236 /* Lower Right */
237 tile->vtexture[1][RETROGLU_SPRITE_X] = clip_tex_x + clip_tex_w;
238 tile->vtexture[1][RETROGLU_SPRITE_Y] = clip_tex_y;
239
240 /* Upper Right */
241 tile->vtexture[2][RETROGLU_SPRITE_X] = clip_tex_x + clip_tex_w;
242 tile->vtexture[2][RETROGLU_SPRITE_Y] = clip_tex_y + clip_tex_h;
243
244 /* Upper Right */
245 tile->vtexture[3][RETROGLU_SPRITE_X] = clip_tex_x + clip_tex_w;
246 tile->vtexture[3][RETROGLU_SPRITE_Y] = clip_tex_y + clip_tex_h;
247
248 /* Upper Left */
249 tile->vtexture[4][RETROGLU_SPRITE_X] = clip_tex_x;
250 tile->vtexture[4][RETROGLU_SPRITE_Y] = clip_tex_y + clip_tex_h;
251
252 /* Lower Left */
253 tile->vtexture[5][RETROGLU_SPRITE_X] = clip_tex_x;
254 tile->vtexture[5][RETROGLU_SPRITE_Y] = clip_tex_y;
255}
256
257void retroglu_init_tile_vertices( struct RETROGLU_TILE* tile ) {
258
259 /* == Front Face Vertices == */
260
261 /* Lower-Left */
262 tile->vertices[0][RETROGLU_SPRITE_X] = -1;
263 tile->vertices[0][RETROGLU_SPRITE_Y] = -1;
264
265 /* Lower-Right */
266 tile->vertices[1][RETROGLU_SPRITE_X] = 1;
267 tile->vertices[1][RETROGLU_SPRITE_Y] = -1;
268
269 /* Upper-Right */
270 tile->vertices[2][RETROGLU_SPRITE_X] = 1;
271 tile->vertices[2][RETROGLU_SPRITE_Y] = 1;
272
273 /* Upper-Right */
274 tile->vertices[3][RETROGLU_SPRITE_X] = 1;
275 tile->vertices[3][RETROGLU_SPRITE_Y] = 1;
276
277 /* Upper-Left */
278 tile->vertices[4][RETROGLU_SPRITE_X] = -1;
279 tile->vertices[4][RETROGLU_SPRITE_Y] = 1;
280
281 /* Lower-Left */
282 tile->vertices[5][RETROGLU_SPRITE_X] = -1;
283 tile->vertices[5][RETROGLU_SPRITE_Y] = -1;
284}
285
286void retroglu_set_sprite_clip(
287 struct RETROGLU_SPRITE* sprite,
288 uint32_t front_px, uint32_t front_py, uint32_t back_px, uint32_t back_py,
289 uint32_t pw, uint32_t ph, uint8_t flags
290) {
291 /* Set vertices in terms of half the clip size so that rotation is around
292 * the midpoint of the sprite, not the side!
293 */
294 float clip_tex_fx = 0, /* Front tex X */
295 clip_tex_fy = 0, /* Front tex Y */
296 clip_tex_bx = 0, /* Back tex X */
297 clip_tex_by = 0, /* Back tex Y */
298 clip_tex_w = 0,
299 clip_tex_h = 0;
300
301 /* Setup texture spritesheet. */
302
303 clip_tex_fx = retroglu_tex_px_x_to_f( front_px, sprite );
304 clip_tex_fy = retroglu_tex_px_y_to_f( front_py, sprite );
305 clip_tex_bx = retroglu_tex_px_x_to_f( back_px, sprite );
306 clip_tex_by = retroglu_tex_px_y_to_f( back_py, sprite );
307 clip_tex_w = retroglu_tex_px_x_to_f( pw, sprite );
308 clip_tex_h = retroglu_tex_px_y_to_f( ph, sprite );
309
310 /* == Front Face Textures == */
311
312 /* Lower Left */
313 sprite->vtexture_front[0][RETROGLU_SPRITE_X] = clip_tex_fx;
314 sprite->vtexture_front[0][RETROGLU_SPRITE_Y] = clip_tex_fy;
315
316 /* Lower Right */
317 sprite->vtexture_front[1][RETROGLU_SPRITE_X] = clip_tex_fx + clip_tex_w;
318 sprite->vtexture_front[1][RETROGLU_SPRITE_Y] = clip_tex_fy;
319
320 /* Upper Right */
321 sprite->vtexture_front[2][RETROGLU_SPRITE_X] = clip_tex_fx + clip_tex_w;
322 sprite->vtexture_front[2][RETROGLU_SPRITE_Y] = clip_tex_fy + clip_tex_h;
323
324 /* Upper Right */
325 sprite->vtexture_front[3][RETROGLU_SPRITE_X] = clip_tex_fx + clip_tex_w;
326 sprite->vtexture_front[3][RETROGLU_SPRITE_Y] = clip_tex_fy + clip_tex_h;
327
328 /* Upper Left */
329 sprite->vtexture_front[4][RETROGLU_SPRITE_X] = clip_tex_fx;
330 sprite->vtexture_front[4][RETROGLU_SPRITE_Y] = clip_tex_fy + clip_tex_h;
331
332 /* Lower Left */
333 sprite->vtexture_front[5][RETROGLU_SPRITE_X] = clip_tex_fx;
334 sprite->vtexture_front[5][RETROGLU_SPRITE_Y] = clip_tex_fy;
335
336 /* == Back face Textures == */
337
338 /* Lower Left */
339 sprite->vtexture_back[0][RETROGLU_SPRITE_X] = clip_tex_bx;
340 sprite->vtexture_back[0][RETROGLU_SPRITE_Y] = clip_tex_by;
341
342 /* Lower Right */
343 sprite->vtexture_back[1][RETROGLU_SPRITE_X] = clip_tex_bx + clip_tex_w;
344 sprite->vtexture_back[1][RETROGLU_SPRITE_Y] = clip_tex_by;
345
346 /* Upper Right */
347 sprite->vtexture_back[2][RETROGLU_SPRITE_X] = clip_tex_bx + clip_tex_w;
348 sprite->vtexture_back[2][RETROGLU_SPRITE_Y] = clip_tex_by + clip_tex_h;
349
350 /* Upper Right */
351 sprite->vtexture_back[3][RETROGLU_SPRITE_X] = clip_tex_bx + clip_tex_w;
352 sprite->vtexture_back[3][RETROGLU_SPRITE_Y] = clip_tex_by + clip_tex_h;
353
354 /* Upper Left */
355 sprite->vtexture_back[4][RETROGLU_SPRITE_X] = clip_tex_bx;
356 sprite->vtexture_back[4][RETROGLU_SPRITE_Y] = clip_tex_by + clip_tex_h;
357
358 /* Lower Left */
359 sprite->vtexture_back[5][RETROGLU_SPRITE_X] = clip_tex_bx;
360 sprite->vtexture_back[5][RETROGLU_SPRITE_Y] = clip_tex_by;
361}
362
363/* === */
364
365void retroglu_init_sprite_vertices( struct RETROGLU_SPRITE* sprite ) {
366 retroglu_init_sprite_vertices_scale( sprite, 1.0f );
367}
368
369/* === */
370
371void retroglu_init_sprite_vertices_scale(
372 struct RETROGLU_SPRITE* sprite, float scale
373) {
374
375 /* == Front Face Vertices == */
376
377 /* Lower-Left */
378 sprite->vertices_front[0][RETROGLU_SPRITE_X] = -1.0f * scale;
379 sprite->vertices_front[0][RETROGLU_SPRITE_Y] = -1.0f * scale;
380
381 /* Lower-Right */
382 sprite->vertices_front[1][RETROGLU_SPRITE_X] = scale;
383 sprite->vertices_front[1][RETROGLU_SPRITE_Y] = -1.0f * scale;
384
385 /* Upper-Right */
386 sprite->vertices_front[2][RETROGLU_SPRITE_X] = scale;
387 sprite->vertices_front[2][RETROGLU_SPRITE_Y] = scale;
388
389 /* Upper-Right */
390 sprite->vertices_front[3][RETROGLU_SPRITE_X] = scale;
391 sprite->vertices_front[3][RETROGLU_SPRITE_Y] = scale;
392
393 /* Upper-Left */
394 sprite->vertices_front[4][RETROGLU_SPRITE_X] = -1.0f * scale;
395 sprite->vertices_front[4][RETROGLU_SPRITE_Y] = scale;
396
397 /* Lower-Left */
398 sprite->vertices_front[5][RETROGLU_SPRITE_X] = -1.0f * scale;
399 sprite->vertices_front[5][RETROGLU_SPRITE_Y] = -1.0f * scale;
400
401 /* == Back Face Vertices == */
402
403 /* Lower-Right */
404 sprite->vertices_back[0][RETROGLU_SPRITE_X] = scale;
405 sprite->vertices_back[0][RETROGLU_SPRITE_Y] = -1.0f * scale;
406
407 /* Lower-Left */
408 sprite->vertices_back[1][RETROGLU_SPRITE_X] = -1.0f * scale;
409 sprite->vertices_back[1][RETROGLU_SPRITE_Y] = -1.0f * scale;
410
411 /* Upper-Left */
412 sprite->vertices_back[2][RETROGLU_SPRITE_X] = -1.0f * scale;
413 sprite->vertices_back[2][RETROGLU_SPRITE_Y] = scale;
414
415 /* Upper-Left */
416 sprite->vertices_back[3][RETROGLU_SPRITE_X] = -1.0f * scale;
417 sprite->vertices_back[3][RETROGLU_SPRITE_Y] = scale;
418
419 /* Upper-Right */
420 sprite->vertices_back[4][RETROGLU_SPRITE_X] = scale;
421 sprite->vertices_back[4][RETROGLU_SPRITE_Y] = scale;
422
423 /* Lower-Right */
424 sprite->vertices_back[5][RETROGLU_SPRITE_X] = scale;
425 sprite->vertices_back[5][RETROGLU_SPRITE_Y] = -1.0f * scale;
426}
427
428/* === */
429
430void retroglu_set_sprite_pos(
431 struct RETROGLU_SPRITE* sprite, uint32_t px, uint32_t py
432) {
433 sprite->translate_x = retroglu_scr_px_x_to_f( px );
434 sprite->translate_y = retroglu_scr_px_y_to_f( py );
435}
436
437/* === */
438
439void retroglu_tsrot_sprite( struct RETROGLU_SPRITE* sprite ) {
440 /* Set the matrix to translate/rotate/scale based on sprite props. */
441 glTranslatef( sprite->translate_x, sprite->translate_y, 0 );
442 glRotatef( sprite->rotate_y, 0.0f, 1.0f, 0.0f );
443}
444
445/* === */
446
447void retroglu_draw_sprite( struct RETROGLU_SPRITE* sprite ) {
448 int i = 0;
449#ifndef RETROGLU_NO_TEXTURES
450# ifdef RETROGLU_NO_TEXTURE_LISTS
451 MERROR_RETVAL retval = MERROR_OK;
452# endif /* RETROGLU_NO_TEXTURES */
453
454 glColor3fv( sprite->color );
455
456# ifndef RETROGLU_NO_TEXTURE_LISTS
457 glBindTexture( GL_TEXTURE_2D, sprite->texture.tex.id );
458# else
459 maug_mlock( sprite->texture.tex.bytes_h, sprite->texture.tex.bytes );
460 maug_cleanup_if_null_alloc( uint8_t*, sprite->texture.tex.bytes );
461 glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA,
462 sprite->texture.tex.w, sprite->texture.tex.h, 0,
463 GL_RGBA, GL_UNSIGNED_BYTE,
464 sprite->texture.tex.bytes );
465# endif /* !RETROGLU_NO_TEXTURE_LISTS */
466 glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
467 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
468 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
469
470 glBegin( GL_TRIANGLES );
471
472 for( i = 0 ; 6 > i ; i++ ) {
473 glTexCoord2fv( sprite->vtexture_front[i] );
474 glVertex2fv( sprite->vertices_front[i] );
475 }
476
477 for( i = 0 ; 6 > i ; i++ ) {
478 glTexCoord2fv( sprite->vtexture_back[i] );
479 glVertex2fv( sprite->vertices_back[i] );
480 }
481
482 glEnd();
483
484# ifndef RETROGLU_NO_TEXTURE_LISTS
485 glBindTexture( GL_TEXTURE_2D, 0 );
486# else
487cleanup:
488 if( NULL != sprite->texture.tex.bytes ) {
489 maug_munlock( sprite->texture.tex.bytes_h, sprite->texture.tex.bytes );
490 }
491# endif /* !RETROGLU_NO_TEXTURE_LISTS */
492#endif /* !RETROGLU_NO_TEXTURES */
493}
494
495/* === */
496
498 struct RETROGLU_SPRITE* sprite, int list_idx,
499 uint32_t front_px, uint32_t front_py, uint32_t back_px, uint32_t back_py,
500 uint32_t pw, uint32_t ph, uint8_t flags
501) {
502#ifdef RETROGLU_NO_LISTS
503 sprite->parms[list_idx].front_px = front_px;
504 sprite->parms[list_idx].front_py = front_py;
505 sprite->parms[list_idx].back_px = back_px;
506 sprite->parms[list_idx].back_py = back_py;
507 sprite->parms[list_idx].pw = pw;
508 sprite->parms[list_idx].ph = ph;
509 sprite->parms[list_idx].flags = flags;
510#else
511 /* Prerender the sprite to a GL list to call later. */
512 sprite->lists[list_idx] = glGenLists( 1 );
513 retroglu_set_sprite_clip(
514 sprite, front_px, front_py, back_px, back_py, pw, ph, flags );
515 glNewList( sprite->lists[list_idx], GL_COMPILE );
516 retroglu_draw_sprite( sprite );
517 glEndList();
518#endif /* RETROGLU_NO_LISTS */
519}
520
521/* === */
522
523void retroglu_jitrender_sprite( struct RETROGLU_SPRITE* sprite, int list_idx ) {
524#ifdef RETROGLU_NO_LISTS
525 /* Prerender the sprite to a GL list to call later. */
526 retroglu_set_sprite_clip(
527 sprite,
528 sprite->parms[list_idx].front_px,
529 sprite->parms[list_idx].front_py,
530 sprite->parms[list_idx].back_px,
531 sprite->parms[list_idx].back_py,
532 sprite->parms[list_idx].pw,
533 sprite->parms[list_idx].ph,
534 sprite->parms[list_idx].flags );
535 retroglu_draw_sprite( sprite );
536#else
537 glCallList( sprite->lists[list_idx] );
538#endif /* RETROGLU_NO_LISTS */
539}
540
541/* === */
542
543void retroglu_free_sprite( struct RETROGLU_SPRITE* sprite ) {
544#ifndef RETROGLU_NO_TEXTURES
545 if( NULL != sprite->texture.tex.bytes_h ) {
546 if( NULL != sprite->texture.tex.bytes ) {
547 maug_munlock( sprite->texture.tex.bytes_h, sprite->texture.tex.bytes );
548 }
549
550 maug_mfree( sprite->texture.tex.bytes_h );
551 }
552
553# ifndef RETROGLU_NO_TEXTURE_LISTS
554 if( 0 < sprite->texture.tex.id ) {
555 glDeleteTextures( 1, (GLuint*)&(sprite->texture.tex.id) );
556 }
557# endif /* !RETROGLU_NO_TEXTURE_LISTS */
558#endif /* !RETROGLU_NO_TEXTURES */
559}
560
561#else
562
563# define RETROFLAT_COLOR_TABLE_GL( idx, name_l, name_u, r, g, b, cgac, cgad ) \
564 extern MAUG_CONST float RETROGLU_COLOR_ ## name_u[];
565
566RETROFLAT_COLOR_TABLE( RETROFLAT_COLOR_TABLE_GL )
567
568#endif /* RETROGLU_C */
569 /* maug_retroglu */
571
572#endif /* !RETROGLU_H */
573
int MERROR_RETVAL
Return type indicating function returns a value from this list.
Definition merror.h:19
int8_t RETROFLAT_COLOR
Defines an index in the platform-specific color-table.
Definition retroflt.h:325
#define RETROFLAT_COLOR_TABLE(f)
This macro defines all colors supported by RetroFlat for primative operations, particularly using ret...
Definition retroflt.h:306
void retroglu_prerender_sprite(struct RETROGLU_SPRITE *sprite, int list_idx, uint32_t front_px, uint32_t front_py, uint32_t back_px, uint32_t back_py, uint32_t pw, uint32_t ph, uint8_t flags)
If lists are enabled, prerender the sprite to a list using the given params to retroglu_set_sprite_cl...
void retroglu_draw_sprite(struct RETROGLU_SPRITE *sprite)
Draw the given sprite. This function never uses a list, and can therefore be used to create a draw li...
void retroglu_init_sprite_vertices(struct RETROGLU_SPRITE *sprite)
Setup the sprite vertices for the poly the sprite will be drawn on. This should be called once when t...
void retroglu_jitrender_sprite(struct RETROGLU_SPRITE *sprite, int list_idx)
If lists are enabled, render the sprite list at list_idx. Otherwise, draw the sprite using retroglu_d...
Platform-specific bitmap structure. retroflat_bitmap_ok() can be used on a pointer to it to determine...
Definition retpltd.h:21
uint8_t flags
Platform-specific bitmap flags.
Definition retpltd.h:25
If draw lists are disabled, this struct holds a list of params for retroglu_set_sprite_clip() so that...
Definition retroglu.h:51
Definition retroglu.h:61
Definition retroglu.h:78