diff options
| author | Andre Weissflog <floooh@gmail.com> | 2022-10-15 13:34:57 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2022-10-15 13:34:57 +0200 |
| commit | bbc24eae752a3a8c3472fbe5927df20bc2fc4156 (patch) | |
| tree | 109294809487b2969702df7923e42809961ceff3 /tests | |
| parent | 8548e3900afa897f825022d697596a97c5716d05 (diff) | |
sokol_spine.h: imbed sspine_image_info into sspine_atlas_page_info
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/functional/sokol_spine_test.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/tests/functional/sokol_spine_test.c b/tests/functional/sokol_spine_test.c index cb296557..3a28ce04 100644 --- a/tests/functional/sokol_spine_test.c +++ b/tests/functional/sokol_spine_test.c @@ -169,8 +169,8 @@ UTEST(sokol_spine, atlas_image_info) { T(sspine_num_images(atlas) == 1); const sspine_image_info img_info = sspine_get_image_info(atlas, 0); T(img_info.valid); - T(img_info.image.id != SG_INVALID_ID); - T(sg_query_image_state(img_info.image) == SG_RESOURCESTATE_ALLOC); + T(img_info.sgimage.id != SG_INVALID_ID); + T(sg_query_image_state(img_info.sgimage) == SG_RESOURCESTATE_ALLOC); T(strcmp(img_info.filename, "spineboy.png") == 0); T(img_info.min_filter == SG_FILTER_LINEAR); T(img_info.mag_filter == SG_FILTER_LINEAR); @@ -199,8 +199,8 @@ UTEST(sokol_spine, atlas_with_overrides) { T(sspine_num_images(atlas) == 1); const sspine_image_info img_info = sspine_get_image_info(atlas, 0); T(img_info.valid); - T(img_info.image.id != SG_INVALID_ID); - T(sg_query_image_state(img_info.image) == SG_RESOURCESTATE_ALLOC); + T(img_info.sgimage.id != SG_INVALID_ID); + T(sg_query_image_state(img_info.sgimage) == SG_RESOURCESTATE_ALLOC); T(strcmp(img_info.filename, "spineboy.png") == 0); T(img_info.min_filter == SG_FILTER_NEAREST_MIPMAP_NEAREST); T(img_info.mag_filter == SG_FILTER_NEAREST); @@ -585,16 +585,17 @@ UTEST(sokol_spine, get_atlas_page_info) { const sspine_atlas_page_info info = sspine_get_atlas_page_info(atlas, 0); T(info.valid); T(info.atlas.id == atlas.id); - T(info.image.id != SG_INVALID_ID); - T(sg_query_image_state(info.image) == SG_RESOURCESTATE_ALLOC); - T(strcmp(info.name, "spineboy.png") == 0); - T(info.min_filter == SG_FILTER_LINEAR); - T(info.mag_filter == SG_FILTER_LINEAR); - T(info.wrap_u == SG_WRAP_MIRRORED_REPEAT); - T(info.wrap_v == SG_WRAP_MIRRORED_REPEAT); - T(info.width == 1024); - T(info.height == 256); - T(info.premul_alpha == false); + T(info.image.valid); + T(info.image.sgimage.id != SG_INVALID_ID); + T(sg_query_image_state(info.image.sgimage) == SG_RESOURCESTATE_ALLOC); + T(strcmp(info.image.filename, "spineboy.png") == 0); + T(info.image.min_filter == SG_FILTER_LINEAR); + T(info.image.mag_filter == SG_FILTER_LINEAR); + T(info.image.wrap_u == SG_WRAP_MIRRORED_REPEAT); + T(info.image.wrap_v == SG_WRAP_MIRRORED_REPEAT); + T(info.image.width == 1024); + T(info.image.height == 256); + T(info.image.premul_alpha == false); T(info.overrides.min_filter == _SG_FILTER_DEFAULT); T(info.overrides.mag_filter == _SG_FILTER_DEFAULT); T(info.overrides.wrap_u == _SG_WRAP_DEFAULT); @@ -643,16 +644,17 @@ UTEST(sokol_spine, atlas_get_atlas_page_info_with_overrides) { const sspine_atlas_page_info info = sspine_get_atlas_page_info(atlas, 0); T(info.valid); T(info.atlas.id == atlas.id); - T(info.image.id != SG_INVALID_ID); - T(sg_query_image_state(info.image) == SG_RESOURCESTATE_ALLOC); - T(strcmp(info.name, "spineboy.png") == 0); - T(info.min_filter == SG_FILTER_LINEAR); - T(info.mag_filter == SG_FILTER_LINEAR); - T(info.wrap_u == SG_WRAP_MIRRORED_REPEAT); - T(info.wrap_v == SG_WRAP_MIRRORED_REPEAT); - T(info.width == 1024); - T(info.height == 256); - T(info.premul_alpha == true); // FIXME: hmm, this is actually inconsistent + T(info.image.valid); + T(info.image.sgimage.id != SG_INVALID_ID); + T(sg_query_image_state(info.image.sgimage) == SG_RESOURCESTATE_ALLOC); + T(strcmp(info.image.filename, "spineboy.png") == 0); + T(info.image.min_filter == SG_FILTER_LINEAR); + T(info.image.mag_filter == SG_FILTER_LINEAR); + T(info.image.wrap_u == SG_WRAP_MIRRORED_REPEAT); + T(info.image.wrap_v == SG_WRAP_MIRRORED_REPEAT); + T(info.image.width == 1024); + T(info.image.height == 256); + T(info.image.premul_alpha == true); // FIXME: hmm, this is actually inconsistent T(info.overrides.min_filter == SG_FILTER_NEAREST_MIPMAP_NEAREST); T(info.overrides.mag_filter == SG_FILTER_NEAREST); T(info.overrides.wrap_u == SG_WRAP_REPEAT); |