Format string refactor

This commit is contained in:
Krzosa Karol
2025-11-27 23:13:28 +01:00
parent e9e8751981
commit d72485a137
24 changed files with 80 additions and 116 deletions

View File

@@ -296,36 +296,12 @@ void PushVertex2D(Allocator allocator, VertexList2D *list, Vertex2D *vertices, i
void PushQuad2D(Allocator arena, VertexList2D *list, Rect2 rect, Rect2 tex, Color color, float rotation = 0.f, Vec2 rotation_point = {}) {
Vertex2D *v = AllocVertex2D(arena, list, 6);
v[0] = {
{rect.min.x, rect.max.y},
{ tex.min.x, tex.max.y},
color
};
v[1] = {
{rect.max.x, rect.max.y},
{ tex.max.x, tex.max.y},
color
};
v[2] = {
{rect.min.x, rect.min.y},
{ tex.min.x, tex.min.y},
color
};
v[3] = {
{rect.min.x, rect.min.y},
{ tex.min.x, tex.min.y},
color
};
v[4] = {
{rect.max.x, rect.max.y},
{ tex.max.x, tex.max.y},
color
};
v[5] = {
{rect.max.x, rect.min.y},
{ tex.max.x, tex.min.y},
color
};
v[0] = { {rect.min.x, rect.max.y}, { tex.min.x, tex.max.y}, color };
v[1] = { {rect.max.x, rect.max.y}, { tex.max.x, tex.max.y}, color };
v[2] = { {rect.min.x, rect.min.y}, { tex.min.x, tex.min.y}, color };
v[3] = { {rect.min.x, rect.min.y}, { tex.min.x, tex.min.y}, color };
v[4] = { {rect.max.x, rect.max.y}, { tex.max.x, tex.max.y}, color };
v[5] = { {rect.max.x, rect.min.y}, { tex.max.x, tex.min.y}, color };
if (rotation != 0.f) {
float s = sinf(rotation);
float c = cosf(rotation);
@@ -385,7 +361,6 @@ Vec2 DrawString(Font *font, String16 string, Vec2 pos, Color color, bool draw =
return result;
}
#define PI32 3.14159265359f
void DrawCircle(Vec2 pos, float radius, Color color) {
const int segment_count = 16;
const int vertex_count = segment_count * 3;