1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-28 16:59:30 +00:00

Updated all the libs, added citro3d, added ctr.swkbd (WIP, untested)

This commit is contained in:
Firew0lf 2016-08-05 17:30:24 +02:00
parent 68a44645f7
commit 49c87e5526
97 changed files with 7341 additions and 944 deletions

View file

@ -45,11 +45,19 @@ static sf2d_texture *_sfil_load_BMP_generic(
sf2d_texture *texture = sf2d_create_texture(bmp_ih->biWidth, bmp_ih->biHeight,
GPU_RGBA8, place);
if (!texture)
return NULL;
seek_fn(user_data, bmp_fh->bfOffBits);
int stride = texture->pow2_w * 4;
int stride = texture->tex.width * 4;
void *buffer = malloc(row_size);
if (!buffer) {
sf2d_free_texture(texture);
return NULL;
}
unsigned int *tex_ptr;
unsigned int color;
int i, x, y;
@ -59,7 +67,7 @@ static sf2d_texture *_sfil_load_BMP_generic(
read_fn(user_data, buffer, row_size);
y = bmp_ih->biHeight - 1 - i;
tex_ptr = (unsigned int *)(texture->data + y*stride);
tex_ptr = (unsigned int *)(texture->tex.data + y*stride);
for (x = 0; x < bmp_ih->biWidth; x++) {