summaryrefslogtreecommitdiff
path: root/src/prenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/prenderer.cpp')
-rw-r--r--src/prenderer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/prenderer.cpp b/src/prenderer.cpp
index 1cc490c..1d8f512 100644
--- a/src/prenderer.cpp
+++ b/src/prenderer.cpp
@@ -72,7 +72,7 @@ Transform_ApplyInteractive(interact_transform Interact, real32 *OutputX, real32
real32 Point0Y = Center.y - *OutputY;
real32 Rad = Interact.Radians;
- real32 Rotation = Interact.Radians / (PI / 180);
+ real32 Rotation = Rad / (PI / 180);
v2 XAxis = (Point0X * Interact.Scale)*V2(cos(Rad), sin(Rad));
v2 YAxis = (Point0Y * -Interact.Scale)*V2(sin(Rad), -cos(Rad));
@@ -182,7 +182,7 @@ Interact_Transform_Begin(project_data *File, memory *Memory, project_state *Stat
&MinX, &MinY, &MaxX, &MaxY);
if (MinX != 100000) {
State->Interact_Active = interact_type_viewport_transform;
- interact_transform *Interact = (interact_transform *)&State->Interact_Offset[0];
+ interact_transform *Interact = &State->Interact_Transform;
Interact->Min = V2(MinX, MinY);
Interact->Max = V2(MaxX, MaxY);
Interact->Position = V2(0);
@@ -212,7 +212,7 @@ Interact_Transform_Begin(project_data *File, memory *Memory, project_state *Stat
}
if (Activate) {
State->Interact_Active = interact_type_viewport_transform;
- interact_transform *Interact = (interact_transform *)&State->Interact_Offset[0];
+ interact_transform *Interact = &State->Interact_Transform;
Interact->Min = V2(MinX, MinY);
Interact->Max = V2(MaxX, MaxY);
Interact->Position = V2(0);
@@ -238,7 +238,7 @@ Interact_Transform2_Begin(project_data *File, memory *Memory, project_state *Sta
&MinX, &MinY, &MaxX, &MaxY);
if (MinX != 100000) {
State->Interact_Active = interact_type_viewport_transform;
- interact_transform *Interact = (interact_transform *)&State->Interact_Offset[0];
+ interact_transform *Interact = &State->Interact_Transform;
Interact->Min = V2(MinX, MinY);
Interact->Max = V2(MaxX, MaxY);
Interact->Position = V2(0);
@@ -290,7 +290,7 @@ Layer_LocalToScreenSpace(project_state *State, memory *Memory, block_layer *Laye
if ((State->Interact_Active == interact_type_viewport_transform ||
State->Interact_Active == interact_type_viewport_transform_gizmo) && Layer->IsSelected == 1) {
- Transform_ApplyInteractive(*(interact_transform *)&State->Interact_Offset[0], &T.x, &T.y, &T.rotation, &T.scale);
+ Transform_ApplyInteractive(State->Interact_Transform, &T.x, &T.y, &T.rotation, &T.scale);
}
v2 NewPos = TransformPoint(T, Width, Height, Point);
@@ -392,7 +392,7 @@ Transform_Calculate(project_state *State, memory *Memory, project_data *File, bl
if ((State->Interact_Active == interact_type_viewport_transform ||
State->Interact_Active == interact_type_viewport_transform_gizmo) && Layer->IsSelected == 1) {
- Transform_ApplyInteractive(*(interact_transform *)&State->Interact_Offset[0], &X, &Y, &Rotation, &s);
+ Transform_ApplyInteractive(State->Interact_Transform, &X, &Y, &Rotation, &s);
}
/*