Skip to content

Commit 44d5797

Browse files
committed
WIP .INT changes, pushing for map fix
1 parent caaa6bf commit 44d5797

File tree

4 files changed

+1367
-1242
lines changed

4 files changed

+1367
-1242
lines changed

VBLauncher/Classes.cs

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ public IEnumerable<byte> ToByte()
895895
ret.Write(12, chunks.Count);
896896
for (int i = 0, loopTo = chunks.Count - 1; i <= loopTo; i++)
897897
ret.Write(16 + i * 30, chunks[i].ToByte());
898-
return default;
898+
return ret;
899899
}
900900
}
901901

@@ -1269,8 +1269,6 @@ void ProcessProperties(List<string> props)
12691269
return ms.ToArray();
12701270
}
12711271

1272-
1273-
12741272
public VEG(byte[] b)
12751273
{
12761274
if (b.Length == 0) return;
@@ -1749,4 +1747,41 @@ public static string[] AllEnumValues()
17491747
}
17501748
}
17511749

1750+
public class INT
1751+
{
1752+
enum flags
1753+
{
1754+
Stretch,
1755+
TileX,
1756+
TileY,
1757+
TileBoth,
1758+
}
1759+
1760+
public struct fragment
1761+
{
1762+
public int width;
1763+
public int height;
1764+
public string texture;
1765+
public int x1;
1766+
public int y1;
1767+
public int x2;
1768+
public int y2;
1769+
}
1770+
1771+
public struct obj
1772+
{
1773+
public List<fragment> fragments;
1774+
}
1775+
1776+
public INT(byte[] b)
1777+
{
1778+
var ms = new MemoryStream();
1779+
ms.Write(b, 0, b.Length);
1780+
var br = new BinaryReader(ms);
1781+
1782+
var twofont = false;
1783+
var ret = new obj();
1784+
}
1785+
}
1786+
17521787
#endregion

VBLauncher/EditorWindow.NonUI.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private void LoadFile(byte[] fb, string ext)
130130
_currentFile = fb.ReadCRT();
131131
break;
132132
case ".int":
133-
DarkMessageBox.ShowMessage("Not yet implemented", "Not Implemented");
133+
//_currentFile = INT.Parse(fb);
134134
break;
135135
case ".itm":
136136
_currentFile = fb.ReadITM();
@@ -149,12 +149,10 @@ private void LoadFile(byte[] fb, string ext)
149149
_currentFile = fb.ReadWEA();
150150
break;
151151
case ".veg":
152-
{
153-
InitVEG();
154-
_currentFile = new VEG(fb);
155-
_vegTextEditor.AllText = _currentFile.Text;
156-
break;
157-
}
152+
InitVEG();
153+
_currentFile = new VEG(fb);
154+
_vegTextEditor.AllText = _currentFile.Text;
155+
break;
158156
}
159157
}
160158
else

0 commit comments

Comments
 (0)