feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -144,7 +144,7 @@ void LineBuilder::build() {
} else if (texture_mode == Line2D::LINE_TEXTURE_STRETCH) {
uvx0 = width * width_factor / total_distance;
}
new_arc(pos0, pos_up0 - pos0, -Math_PI, color0, Rect2(0.f, 0.f, uvx0 * 2, 1.f));
new_arc(pos0, pos_up0 - pos0, -Math::PI, color0, Rect2(0.f, 0.f, uvx0 * 2, 1.f));
current_distance0 += modified_hw;
current_distance1 = current_distance0;
}
@ -426,7 +426,7 @@ void LineBuilder::build() {
} else if (texture_mode == Line2D::LINE_TEXTURE_STRETCH) {
dist = width * width_factor / total_distance;
}
new_arc(pos1, pos_up1 - pos1, Math_PI, color, Rect2(uvx1 - 0.5f * dist, 0.f, dist, 1.f));
new_arc(pos1, pos_up1 - pos1, Math::PI, color, Rect2(uvx1 - 0.5f * dist, 0.f, dist, 1.f));
}
}
}
@ -509,7 +509,7 @@ void LineBuilder::strip_add_arc(Vector2 center, float angle_delta, Orientation o
Orientation opposite_orientation = orientation == UP ? DOWN : UP;
Vector2 vbegin = vertices[_last_index[opposite_orientation]] - center;
float radius = vbegin.length();
float angle_step = Math_PI / static_cast<float>(round_precision);
float angle_step = Math::PI / static_cast<float>(round_precision);
float steps = Math::abs(angle_delta) / angle_step;
if (angle_delta < 0.f) {
@ -536,7 +536,7 @@ void LineBuilder::new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Col
// with undistorted UVs from within a square section
float radius = vbegin.length();
float angle_step = Math_PI / static_cast<float>(round_precision);
float angle_step = Math::PI / static_cast<float>(round_precision);
float steps = Math::abs(angle_delta) / angle_step;
if (angle_delta < 0.f) {
@ -546,7 +546,7 @@ void LineBuilder::new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Col
float t = Vector2(1, 0).angle_to(vbegin);
float end_angle = t + angle_delta;
Vector2 rpos(0, 0);
float tt_begin = -Math_PI / 2.0f;
float tt_begin = -Math::PI / 2.0f;
float tt = tt_begin;
// Center vertice