mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-25 21:45:33 +00:00
Added proper support for float values in GenerateModel
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -256,18 +256,18 @@ namespace PckStudio
|
||||
graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
// makes sure it reders/draws the full pixel in top left corner
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
int headbodyY = (displayBox.Height / 2) + 25; // 25
|
||||
int armY = (displayBox.Height / 2) + 35; // -60;
|
||||
int legY = (displayBox.Height / 2) + 85; // -80;
|
||||
int groundLevel = (displayBox.Height / 2) + 145;
|
||||
float headbodyY = (displayBox.Height / 2) + 25; // 25
|
||||
float armY = (displayBox.Height / 2) + 35; // -60;
|
||||
float legY = (displayBox.Height / 2) + 85; // -80;
|
||||
float groundLevel = (displayBox.Height / 2) + 145;
|
||||
graphics.DrawLine(Pens.White, 0, groundLevel, displayBox.Width, groundLevel);
|
||||
// Chooses Render settings based on current direction
|
||||
foreach (ListViewItem listViewItem in listViewBoxes.Items)
|
||||
{
|
||||
if (!(listViewItem.Tag is ModelPart)) continue;
|
||||
ModelPart part = listViewItem.Tag as ModelPart;
|
||||
int x = displayBox.Width / 2;
|
||||
int y = 0;
|
||||
float x = displayBox.Width / 2;
|
||||
float y = 0;
|
||||
switch (direction)
|
||||
{
|
||||
case eViewDirection.front:
|
||||
@@ -341,27 +341,27 @@ namespace PckStudio
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
y = headbodyY + float.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
|
||||
case "BODY":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
y = headbodyY + float.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM0":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM1":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG0":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG1":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -395,26 +395,26 @@ namespace PckStudio
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
y = headbodyY + float.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
case "BODY":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
y = headbodyY + float.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
case "ARM0":
|
||||
x -= 25;
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
case "ARM1":
|
||||
x += 25;
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
case "LEG0":
|
||||
x -= 10;
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
case "LEG1":
|
||||
x += 10;
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -447,25 +447,25 @@ namespace PckStudio
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
y = headbodyY + float.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
case "BODY":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
y = headbodyY + float.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM0":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
case "ARM1":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG0":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG1":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
}
|
||||
//Maps imported Texture if auto texture is disabled
|
||||
@@ -544,7 +544,7 @@ namespace PckStudio
|
||||
{
|
||||
if (listViewItemCurrent.SubItems[9].Text == "unchecked")
|
||||
{
|
||||
int x = 0;
|
||||
float x = 0;
|
||||
if (listViewItemCurrent.Tag.ToString() == "HEAD")
|
||||
x = displayBox.Width / 2;
|
||||
else if (listViewItemCurrent.Tag.ToString() == "BODY")
|
||||
@@ -595,7 +595,7 @@ namespace PckStudio
|
||||
{
|
||||
if (listViewItem1.SubItems[listViewItem1.SubItems.Count - 1].Text == "unchecked")
|
||||
{
|
||||
int x = 0;
|
||||
float x = 0;
|
||||
if (listViewItem1.Tag.ToString() == "HEAD")
|
||||
x = displayBox.Width / 2;
|
||||
else if (listViewItem1.Tag.ToString() == "BODY")
|
||||
@@ -711,7 +711,7 @@ namespace PckStudio
|
||||
{
|
||||
if (listViewItem1.SubItems[listViewItem1.SubItems.Count - 1].Text == "unchecked")
|
||||
{
|
||||
int x = 0;
|
||||
float x = 0;
|
||||
if (listViewItem1.Tag.ToString() == "HEAD")
|
||||
x = displayBox.Width / 2;
|
||||
else if (listViewItem1.Tag.ToString() == "BODY")
|
||||
|
||||
@@ -1393,7 +1393,7 @@
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="X.Width" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="Y.Text" xml:space="preserve">
|
||||
<value>Y</value>
|
||||
@@ -1402,7 +1402,7 @@
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="Y.Width" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="Z.Text" xml:space="preserve">
|
||||
<value>Z</value>
|
||||
@@ -1411,7 +1411,7 @@
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="Z.Width" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="Width.Text" xml:space="preserve">
|
||||
<value>Width</value>
|
||||
|
||||
Reference in New Issue
Block a user