From b83b17385d3fba96a3417a84460b37735ba76d88 Mon Sep 17 00:00:00 2001 From: bob Date: Sun, 24 Jun 2007 14:46:57 +0000 Subject: [PATCH] git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1070 993157c7-ee19-0410-b2c4-bb4e9862e678 --- OpenRa.FileFormats/BitmapBuilder.cs | 20 +++++ OpenRa.FileFormats/OpenRa.FileFormats.csproj | 12 +-- OpenRa.FileFormats/Terrain.cs | 76 +++++++++++++++++++ ShpViewer/Program.cs | 2 +- ShpViewer/ShpViewForm.Designer.cs | 12 +-- ShpViewer/ShpViewForm.cs | 54 ++++++++----- interior.pal | Bin 0 -> 768 bytes rv01.tem | Bin 0 -> 8158 bytes sh03.sno | Bin 0 -> 5263 bytes snow.pal | Bin 0 -> 768 bytes xtra0014.int | Bin 0 -> 3514 bytes 11 files changed, 146 insertions(+), 30 deletions(-) create mode 100644 OpenRa.FileFormats/BitmapBuilder.cs create mode 100644 OpenRa.FileFormats/Terrain.cs create mode 100644 interior.pal create mode 100644 rv01.tem create mode 100644 sh03.sno create mode 100644 snow.pal create mode 100644 xtra0014.int diff --git a/OpenRa.FileFormats/BitmapBuilder.cs b/OpenRa.FileFormats/BitmapBuilder.cs new file mode 100644 index 0000000000..7e4d1bfaba --- /dev/null +++ b/OpenRa.FileFormats/BitmapBuilder.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Drawing; + +namespace OpenRa.FileFormats +{ + public static class BitmapBuilder + { + public static Bitmap FromBytes( byte[] imageBytes, int width, int height, Palette pal ) + { + Bitmap bitmap = new Bitmap( width, height ); + for( int x = 0 ; x < width ; x++ ) + for( int y = 0 ; y < height ; y++ ) + bitmap.SetPixel( x, y, pal.GetColor( imageBytes[ x + width * y ] ) ); + + return bitmap; + } + } +} diff --git a/OpenRa.FileFormats/OpenRa.FileFormats.csproj b/OpenRa.FileFormats/OpenRa.FileFormats.csproj index 446e0b62f0..bf8204c2d8 100644 --- a/OpenRa.FileFormats/OpenRa.FileFormats.csproj +++ b/OpenRa.FileFormats/OpenRa.FileFormats.csproj @@ -28,12 +28,17 @@ 4 + + False + ..\debug\MixDecrypt.dll + + @@ -42,12 +47,7 @@ - - - - {6F5D4280-3D23-41FF-AE2A-511B5553E377} - MixDecrypt - +