mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-28 00:39:30 +00:00
Updated sftdlib and sf2dlib
This commit is contained in:
parent
3fd2efb77e
commit
49ae4454d3
11 changed files with 373 additions and 170 deletions
|
|
@ -31,7 +31,7 @@ void texture_atlas_free(texture_atlas *atlas)
|
|||
free(atlas);
|
||||
}
|
||||
|
||||
int texture_atlas_insert(texture_atlas *atlas, unsigned int character, const void *image, int width, int height, int bitmap_left, int bitmap_top, int advance_x, int advance_y)
|
||||
int texture_atlas_insert(texture_atlas *atlas, unsigned int character, const void *image, int width, int height, int bitmap_left, int bitmap_top, int advance_x, int advance_y, int glyph_size)
|
||||
{
|
||||
bp2d_size size;
|
||||
size.w = width;
|
||||
|
|
@ -51,6 +51,7 @@ int texture_atlas_insert(texture_atlas *atlas, unsigned int character, const voi
|
|||
entry->bitmap_top = bitmap_top;
|
||||
entry->advance_x = advance_x;
|
||||
entry->advance_y = advance_y;
|
||||
entry->glyph_size = glyph_size;
|
||||
|
||||
int_htab_insert(atlas->htab, character, entry);
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ int texture_atlas_exists(texture_atlas *atlas, unsigned int character)
|
|||
return int_htab_find(atlas->htab, character) != NULL;
|
||||
}
|
||||
|
||||
void texture_atlas_get(texture_atlas *atlas, unsigned int character, bp2d_rectangle *rect, int *bitmap_left, int *bitmap_top, int *advance_x, int *advance_y)
|
||||
void texture_atlas_get(texture_atlas *atlas, unsigned int character, bp2d_rectangle *rect, int *bitmap_left, int *bitmap_top, int *advance_x, int *advance_y, int *glyph_size)
|
||||
{
|
||||
atlas_htab_entry *entry = int_htab_find(atlas->htab, character);
|
||||
|
||||
|
|
@ -83,4 +84,5 @@ void texture_atlas_get(texture_atlas *atlas, unsigned int character, bp2d_rectan
|
|||
*bitmap_top = entry->bitmap_top;
|
||||
*advance_x = entry->advance_x;
|
||||
*advance_y = entry->advance_y;
|
||||
*glyph_size = entry->glyph_size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue