reorganization of twn_util.h, reletion of some seldom used procedures
This commit is contained in:
@ -216,7 +216,7 @@ void render_sprite_batch(const Primitive2D primitives[],
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
const Vec2 c = rect_center(sprite.rect);
|
||||
const Vec2 c = { sprite.rect.x + sprite.rect.w / 2, sprite.rect.y + sprite.rect.h / 2 };
|
||||
const Vec2 t = fast_cossine(sprite.rotation + (float)M_PI_4);
|
||||
const Vec2 d = {
|
||||
.x = t.x * sprite.rect.w * (float)M_SQRT1_2,
|
||||
@ -231,7 +231,7 @@ void render_sprite_batch(const Primitive2D primitives[],
|
||||
} else {
|
||||
/* rotated non-square case*/
|
||||
|
||||
const Vec2 c = rect_center(sprite.rect);
|
||||
const Vec2 c = { sprite.rect.x + sprite.rect.w / 2, sprite.rect.y + sprite.rect.h / 2 };
|
||||
const Vec2 t = fast_cossine(sprite.rotation);
|
||||
|
||||
const Vec2 h = { sprite.rect.w / 2, sprite.rect.h / 2 };
|
||||
|
Reference in New Issue
Block a user