Skip to content

Commit

Permalink
WIP .INT changes, pushing for map fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kran27 committed Dec 24, 2024
1 parent caaa6bf commit 44d5797
Show file tree
Hide file tree
Showing 4 changed files with 1,367 additions and 1,242 deletions.
41 changes: 38 additions & 3 deletions VBLauncher/Classes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ public IEnumerable<byte> ToByte()
ret.Write(12, chunks.Count);
for (int i = 0, loopTo = chunks.Count - 1; i <= loopTo; i++)
ret.Write(16 + i * 30, chunks[i].ToByte());
return default;
return ret;
}
}

Expand Down Expand Up @@ -1269,8 +1269,6 @@ void ProcessProperties(List<string> props)
return ms.ToArray();
}



public VEG(byte[] b)
{
if (b.Length == 0) return;
Expand Down Expand Up @@ -1749,4 +1747,41 @@ public static string[] AllEnumValues()
}
}

public class INT
{
enum flags
{
Stretch,
TileX,
TileY,
TileBoth,
}

public struct fragment
{
public int width;
public int height;
public string texture;
public int x1;
public int y1;
public int x2;
public int y2;
}

public struct obj
{
public List<fragment> fragments;
}

public INT(byte[] b)
{
var ms = new MemoryStream();
ms.Write(b, 0, b.Length);
var br = new BinaryReader(ms);

var twofont = false;
var ret = new obj();
}
}

#endregion
12 changes: 5 additions & 7 deletions VBLauncher/EditorWindow.NonUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private void LoadFile(byte[] fb, string ext)
_currentFile = fb.ReadCRT();
break;
case ".int":
DarkMessageBox.ShowMessage("Not yet implemented", "Not Implemented");
//_currentFile = INT.Parse(fb);
break;
case ".itm":
_currentFile = fb.ReadITM();
Expand All @@ -149,12 +149,10 @@ private void LoadFile(byte[] fb, string ext)
_currentFile = fb.ReadWEA();
break;
case ".veg":
{
InitVEG();
_currentFile = new VEG(fb);
_vegTextEditor.AllText = _currentFile.Text;
break;
}
InitVEG();
_currentFile = new VEG(fb);
_vegTextEditor.AllText = _currentFile.Text;
break;
}
}
else
Expand Down
Loading

0 comments on commit 44d5797

Please sign in to comment.