Ylva And Malin
Typedefs | Functions
ym_gfx_sprite.h File Reference
#include <ym_core.h>
#include <ym_memory.h>
#include <ym_gfx_gl.h>
Include dependency graph for ym_gfx_sprite.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef GLuint ym_sheet_id
 
typedef GLuint ym_sprite_id
 

Functions

YM_NO_DISCARD ym_errc ym_gfx_load_png (const char *filename, u8 **out_image, int *out_width, int *out_height)
 PNG loading. More...
 
YM_NO_DISCARD ym_errc ym_sprite_init (ym_mem_region *memory_region, ym_gfx_window *window)
 ym_sprite API implementation More...
 
YM_NO_DISCARD ym_errc ym_sprite_shutdown ()
 
YM_NO_DISCARD ym_errc ym_sprite_load_sheet (const char *filename, uint col_count, uint row_count, ym_sheet_id *out_sheet_id)
 
YM_NO_DISCARD ym_errc ym_sprite_delete_sheet (ym_sheet_id sheet_id)
 
ym_errc ym_sprite_draw (ym_sheet_id sheet_id, ym_sprite_id sprite_id, uint layer, ym_vec2 pos)
 
ym_errc ym_sprite_draw_extd (ym_sheet_id sheet_id, ym_sprite_id sprite_id, uint layer, ym_vec2 pos, ym_vec2 scale, float angle)
 
ym_errc ym_sprite_commit_layer (uint layer)
 
void ym_sprite_set_camera_pos (ym_vec3 camera_pos)
 

Typedef Documentation

typedef GLuint ym_sheet_id
typedef GLuint ym_sprite_id

Function Documentation

YM_NO_DISCARD ym_errc ym_gfx_load_png ( const char *  filename,
u8 **  out_image,
int out_width,
int out_height 
)

PNG loading.

Todo:
Move over to using the lodepng function that takes in memory

Here is the call graph for this function:

Here is the caller graph for this function:

ym_errc ym_sprite_commit_layer ( uint  layer)
YM_NO_DISCARD ym_errc ym_sprite_delete_sheet ( ym_sheet_id  sheet_id)
ym_errc ym_sprite_draw ( ym_sheet_id  sheet_id,
ym_sprite_id  sprite_id,
uint  layer,
ym_vec2  pos 
)
Todo:
Add layering support

Here is the call graph for this function:

Here is the caller graph for this function:

ym_errc ym_sprite_draw_extd ( ym_sheet_id  sheet_id,
ym_sprite_id  sprite_id,
uint  layer,
ym_vec2  pos,
ym_vec2  scale,
float  angle 
)
Todo:
add layering support

Here is the call graph for this function:

Here is the caller graph for this function:

YM_NO_DISCARD ym_errc ym_sprite_init ( ym_mem_region memory_region,
ym_gfx_window window 
)

ym_sprite API implementation

Here is the call graph for this function:

Here is the caller graph for this function:

YM_NO_DISCARD ym_errc ym_sprite_load_sheet ( const char *  filename,
uint  col_count,
uint  row_count,
ym_sheet_id out_sheet_id 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ym_sprite_set_camera_pos ( ym_vec3  camera_pos)

Here is the call graph for this function:

Here is the caller graph for this function:

YM_NO_DISCARD ym_errc ym_sprite_shutdown ( )

Here is the caller graph for this function: