summaryrefslogtreecommitdiff
path: root/TestApp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-02-20 05:30:01 +0100
committerTreeki <treeki@gmail.com>2012-02-20 05:30:01 +0100
commit31380b4bb93d1fb65faff8f71753de80fb0a8c9d (patch)
tree8880321028df33877fec9af6c424afe48e7ac4ef /TestApp
parent364e99d849378546323d1d06307b6773e813b742 (diff)
downloadnw4rtools-31380b4bb93d1fb65faff8f71753de80fb0a8c9d.tar.gz
nw4rtools-31380b4bb93d1fb65faff8f71753de80fb0a8c9d.zip
AnmChr/Clr/TexSrt writing done for now. Not 100% perfect but it works!
Diffstat (limited to 'TestApp')
-rwxr-xr-x[-rw-r--r--]TestApp/Main.cs29
-rw-r--r--TestApp/TestApp.csproj102
2 files changed, 79 insertions, 52 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs
index 9d01957..a61577f 100644..100755
--- a/TestApp/Main.cs
+++ b/TestApp/Main.cs
@@ -9,10 +9,14 @@ using OpenTK.Graphics.OpenGL;
namespace TestApp {
class MainClass {
public static void Main(string[] args) {
+ blah(args);
+ return;
+
string mdlPath = "/home/me/Games/Newer/ModelRev/";
//skawo(); return;
- oldBehaviour(); return;
+ oldBehaviour();
+ return;
// Going to create a model!
@@ -116,6 +120,29 @@ namespace TestApp {
//ColladaExporter.WriteModel(objFile, rf, "lift_han_wood_M");
//objFile.Close();
}
+
+
+ private static void blah(string[] args) {
+ string mdlPath;
+ if (Directory.Exists("/home/me"))
+ mdlPath = "/home/me/Games/Newer/WaterL/";
+ else
+ mdlPath = "Z:/stuff/Games/Newer/WaterL/";
+
+ ResFile rf = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4.brres"));
+ File.WriteAllBytes(mdlPath + "CS_W4a.brres", BrresWriter.WriteFile(rf));
+
+ if (args.Length > 0 && args [0] == "a") {
+ ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4a.brres"));
+ File.WriteAllBytes(mdlPath + "CS_W4b.brres", BrresWriter.WriteFile(rf2));
+ ResFile rf3 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4b.brres"));
+ File.WriteAllBytes(mdlPath + "CS_W4c.brres", BrresWriter.WriteFile(rf3));
+ ResFile rf4 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4c.brres"));
+ File.WriteAllBytes(mdlPath + "CS_W4d.brres", BrresWriter.WriteFile(rf4));
+ ResFile rf5 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + "CS_W4d.brres"));
+ File.WriteAllBytes(mdlPath + "CS_W4e.brres", BrresWriter.WriteFile(rf5));
+ }
+ }
}
}
diff --git a/TestApp/TestApp.csproj b/TestApp/TestApp.csproj
index d21525e..4168d26 100644
--- a/TestApp/TestApp.csproj
+++ b/TestApp/TestApp.csproj
@@ -1,51 +1,51 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{3A064CD8-CFAD-412D-986F-ED7D2D54CDB1}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <RootNamespace>TestApp</RootNamespace>
- <AssemblyName>TestApp</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Externalconsole>true</Externalconsole>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Externalconsole>true</Externalconsole>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="OpenTK, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\ExternalLibs\OpenTK.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Main.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="RenderWindow.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <ProjectReference Include="..\NW4RTools\NW4RTools.csproj">
- <Project>{A9C9FABD-0A5F-4DAB-979D-9F288F96866F}</Project>
- <Name>NW4RTools</Name>
- </ProjectReference>
- </ItemGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3A064CD8-CFAD-412D-986F-ED7D2D54CDB1}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>TestApp</RootNamespace>
+ <AssemblyName>TestApp</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="OpenTK">
+ <HintPath>..\ExternalLibs\OpenTK.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Drawing" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Main.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="RenderWindow.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\NW4RTools\NW4RTools.csproj">
+ <Project>{A9C9FABD-0A5F-4DAB-979D-9F288F96866F}</Project>
+ <Name>NW4RTools</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project> \ No newline at end of file