| 52 : ASC_RENDER_GROUP_SPRITE_BLEND; |
52 : ASC_RENDER_GROUP_SPRITE_BLEND; |
| 53 node->free_func = asc_sprite_free; |
53 node->free_func = asc_sprite_free; |
| 54 |
54 |
| 55 node->position.x = (float) args.x; |
55 node->position.x = (float) args.x; |
| 56 node->position.y = (float) args.y; |
56 node->position.y = (float) args.y; |
| 57 |
|
| 58 node->scale.x = (float) (args.width == 0 ? args.texture->width : args.width); |
57 node->scale.x = (float) (args.width == 0 ? args.texture->width : args.width); |
| 59 node->scale.y = (float) (args.height == 0 ? args.texture->height : args.height); |
58 node->scale.y = (float) (args.height == 0 ? args.texture->height : args.height); |
| |
59 asc_node_update_transform(node); |
| 60 |
60 |
| 61 return node; |
61 return node; |
| 62 } |
62 } |
| 63 |
63 |
| 64 void asc_sprite_draw(AscSprite const *node) { |
64 void asc_sprite_draw(AscSprite const *node) { |