Skip to content

Commit

Permalink
update 2.4
Browse files Browse the repository at this point in the history
sort and clean folders
  • Loading branch information
Grille committed May 7, 2018
1 parent 869ef0e commit 1fbd076
Show file tree
Hide file tree
Showing 78 changed files with 1,713 additions and 1,725 deletions.
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
.vs
2D-isoedit/bin
2D-isoedit/output
2D-isoedit/obj
*.csproj.user
40 changes: 20 additions & 20 deletions src/2D-isoedit.sln → 2D-isoedit.sln
@@ -1,20 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2D-isoedit", "2D-isoedit\2D-isoedit.csproj", "{D87893FC-ABFB-466B-BA6A-A79830B293E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Debug|x86.ActiveCfg = Debug|x86
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Debug|x86.Build.0 = Debug|x86
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Release|x86.ActiveCfg = Release|x86
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2D-isoedit", "2D-isoedit\2D-isoedit.csproj", "{D87893FC-ABFB-466B-BA6A-A79830B293E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Debug|x86.ActiveCfg = Debug|x86
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Debug|x86.Build.0 = Debug|x86
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Release|x86.ActiveCfg = Release|x86
{D87893FC-ABFB-466B-BA6A-A79830B293E2}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added 2D-isoedit.suo
Binary file not shown.
221 changes: 115 additions & 106 deletions src/2D-isoedit/2D-isoedit.csproj → 2D-isoedit/2D-isoedit.csproj
@@ -1,107 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D87893FC-ABFB-466B-BA6A-A79830B293E2}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>program</RootNamespace>
<AssemblyName>2D-isoedit</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Classes.cs" />
<Compile Include="ByteStream.cs" />
<Compile Include="FormEditor.cs" />
<Compile Include="FormEditor.Designer.cs">
<DependentUpon>FormEditor.cs</DependentUpon>
</Compile>
<Compile Include="FormEditor_EventArgs.cs" />
<Compile Include="FormEditor_Logik.cs" />
<Compile Include="FormFileExplorer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormFileExplorer.Designer.cs">
<DependentUpon>FormFileExplorer.cs</DependentUpon>
</Compile>
<Compile Include="LockBitmap.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FormEditor.resx">
<DependentUpon>FormEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FormFileExplorer.resx">
<DependentUpon>FormFileExplorer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D87893FC-ABFB-466B-BA6A-A79830B293E2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>program</RootNamespace>
<AssemblyName>2D-isoedit</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="src\Classes.cs" />
<Compile Include="src\ByteStream.cs" />
<Compile Include="src\FormEditor.cs" />
<Compile Include="src\FormEditor.Designer.cs">
<DependentUpon>FormEditor.cs</DependentUpon>
</Compile>
<Compile Include="src\FormEditor_EventArgs.cs" />
<Compile Include="src\FormEditor_Logik.cs" />
<Compile Include="src\FormFileExplorer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="src\FormFileExplorer.Designer.cs">
<DependentUpon>FormFileExplorer.cs</DependentUpon>
</Compile>
<Compile Include="src\LockBitmap.cs" />
<Compile Include="src\Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="src\TextureEditor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="src\TextureEditor.Designer.cs">
<DependentUpon>TextureEditor.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="src\FormEditor.resx">
<DependentUpon>FormEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="src\FormFileExplorer.resx">
<DependentUpon>FormFileExplorer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="src\TextureEditor.resx">
<DependentUpon>TextureEditor.cs</DependentUpon>
</EmbeddedResource>
<None Include="src\app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
44 changes: 39 additions & 5 deletions src/2D-isoedit/ByteStream.cs → 2D-isoedit/ByteStream.cs
Expand Up @@ -48,8 +48,16 @@ public void WriteByteArray(byte[] input)
public void WriteByteArray(byte[] input, int compressionMode)
{
testSize(input.Length);
WriteByte((byte)compressionMode);
WriteInt((int)input.Length);
if (input.Length < 256)
{
WriteByte((byte)(compressionMode + 4));
WriteByte((byte)input.Length);
}
else
{
WriteByte((byte)compressionMode);
WriteInt((int)input.Length);
}
if (compressionMode == 0)//direct 8bit
{
for (int i = 0; i < input.Length; i++)
Expand Down Expand Up @@ -101,7 +109,17 @@ public void WriteIntArray(byte[] input)
public void WriteString(string input)
{
char[] stringData = input.ToCharArray();
WriteInt(stringData.Length);

if (input.Length < 256)
{
WriteByte(0);
WriteByte((byte)input.Length);
}
else
{
WriteByte(1);
WriteInt((int)input.Length);
}
for (int i = 0; i < stringData.Length; i++)
{
data[index++] = (byte)stringData[i];
Expand All @@ -126,7 +144,14 @@ public byte ReadByte()
public byte[] ReadByteArray()
{
byte mode = ReadByte();
int length = ReadInt();
int length;
if (mode > 3)
{
length = ReadByte();
mode -= 4;
}
else length = ReadInt();

byte[] retData = new byte[length];

if (mode == 0)
Expand All @@ -149,7 +174,11 @@ public byte[] ReadByteArray()
}
public string ReadString()
{
int length = ReadInt();
byte mode = ReadByte();
int length;
if (mode == 0) length = ReadByte();
else length = ReadInt();

char[] retData = new char[length];

for (int i = 0; i < retData.Length; i++)
Expand All @@ -175,6 +204,11 @@ public string[] ReadStringArray()
}
#endregion

private int testArraySize(Array addValue)
{
return 0;
//if (index + addValue >= data.Length) resize(data.Length + addValue);
}
private void testSize(int addValue)
{
//if (index + addValue >= data.Length) resize(data.Length + addValue);
Expand Down

0 comments on commit 1fbd076

Please sign in to comment.