├── .gitattributes ├── .gitignore ├── N64GFXCookie.sln └── N64GFXCookie ├── App.config ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── N64GFXCookie.csproj ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings └── readme.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /N64GFXCookie.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "N64GFXCookie", "N64GFXCookie\N64GFXCookie.csproj", "{54CAF128-3501-4098-8D89-F89CA02240E3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {54CAF128-3501-4098-8D89-F89CA02240E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {54CAF128-3501-4098-8D89-F89CA02240E3}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {54CAF128-3501-4098-8D89-F89CA02240E3}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {54CAF128-3501-4098-8D89-F89CA02240E3}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /N64GFXCookie/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /N64GFXCookie/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace N64GFXCookie 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.menuStrip1 = new System.Windows.Forms.MenuStrip(); 32 | this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 33 | this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 34 | this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 35 | this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); 36 | this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 37 | this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 38 | this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 39 | this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); 41 | this.label3 = new System.Windows.Forms.Label(); 42 | this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); 43 | this.label2 = new System.Windows.Forms.Label(); 44 | this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); 45 | this.label1 = new System.Windows.Forms.Label(); 46 | this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); 47 | this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); 48 | this.panel1 = new System.Windows.Forms.Panel(); 49 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 50 | this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); 51 | this.openCI4toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 52 | this.saveAsCI4toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 53 | this.menuStrip1.SuspendLayout(); 54 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); 55 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); 56 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); 57 | this.panel1.SuspendLayout(); 58 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 59 | this.SuspendLayout(); 60 | // 61 | // menuStrip1 62 | // 63 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 64 | this.fileToolStripMenuItem, 65 | this.editToolStripMenuItem}); 66 | this.menuStrip1.Location = new System.Drawing.Point(0, 0); 67 | this.menuStrip1.Name = "menuStrip1"; 68 | this.menuStrip1.Size = new System.Drawing.Size(283, 24); 69 | this.menuStrip1.TabIndex = 0; 70 | this.menuStrip1.Text = "menuStrip1"; 71 | // 72 | // fileToolStripMenuItem 73 | // 74 | this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 75 | this.openToolStripMenuItem, 76 | this.saveAsToolStripMenuItem, 77 | this.toolStripSeparator1, 78 | this.openCI4toolStripMenuItem, 79 | this.saveAsCI4toolStripMenuItem, 80 | this.toolStripSeparator2, 81 | this.exitToolStripMenuItem}); 82 | this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; 83 | this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); 84 | this.fileToolStripMenuItem.Text = "File"; 85 | // 86 | // openToolStripMenuItem 87 | // 88 | this.openToolStripMenuItem.Name = "openToolStripMenuItem"; 89 | this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); 90 | this.openToolStripMenuItem.Text = "Open as CI8..."; 91 | this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); 92 | // 93 | // saveAsToolStripMenuItem 94 | // 95 | this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; 96 | this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); 97 | this.saveAsToolStripMenuItem.Text = "Save as CI8..."; 98 | this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click); 99 | // 100 | // toolStripSeparator1 101 | // 102 | this.toolStripSeparator1.Name = "toolStripSeparator1"; 103 | this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); 104 | // 105 | // exitToolStripMenuItem 106 | // 107 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; 108 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); 109 | this.exitToolStripMenuItem.Text = "Exit"; 110 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); 111 | // 112 | // editToolStripMenuItem 113 | // 114 | this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 115 | this.exportToolStripMenuItem, 116 | this.importToolStripMenuItem}); 117 | this.editToolStripMenuItem.Name = "editToolStripMenuItem"; 118 | this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); 119 | this.editToolStripMenuItem.Text = "Edit"; 120 | // 121 | // exportToolStripMenuItem 122 | // 123 | this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; 124 | this.exportToolStripMenuItem.Size = new System.Drawing.Size(175, 22); 125 | this.exportToolStripMenuItem.Text = "Export to PNG..."; 126 | this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click); 127 | // 128 | // importToolStripMenuItem 129 | // 130 | this.importToolStripMenuItem.Name = "importToolStripMenuItem"; 131 | this.importToolStripMenuItem.Size = new System.Drawing.Size(175, 22); 132 | this.importToolStripMenuItem.Text = "Import from PNG..."; 133 | this.importToolStripMenuItem.Click += new System.EventHandler(this.importToolStripMenuItem_Click); 134 | // 135 | // numericUpDown3 136 | // 137 | this.numericUpDown3.Location = new System.Drawing.Point(73, 53); 138 | this.numericUpDown3.Maximum = new decimal(new int[] { 139 | 10, 140 | 0, 141 | 0, 142 | 0}); 143 | this.numericUpDown3.Minimum = new decimal(new int[] { 144 | 1, 145 | 0, 146 | 0, 147 | 0}); 148 | this.numericUpDown3.Name = "numericUpDown3"; 149 | this.numericUpDown3.Size = new System.Drawing.Size(46, 20); 150 | this.numericUpDown3.TabIndex = 12; 151 | this.numericUpDown3.Value = new decimal(new int[] { 152 | 1, 153 | 0, 154 | 0, 155 | 0}); 156 | this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged); 157 | // 158 | // label3 159 | // 160 | this.label3.AutoSize = true; 161 | this.label3.Location = new System.Drawing.Point(12, 55); 162 | this.label3.Name = "label3"; 163 | this.label3.Size = new System.Drawing.Size(55, 13); 164 | this.label3.TabIndex = 11; 165 | this.label3.Text = "Pixel Size:"; 166 | // 167 | // numericUpDown2 168 | // 169 | this.numericUpDown2.Location = new System.Drawing.Point(158, 28); 170 | this.numericUpDown2.Maximum = new decimal(new int[] { 171 | 10000, 172 | 0, 173 | 0, 174 | 0}); 175 | this.numericUpDown2.Minimum = new decimal(new int[] { 176 | 1, 177 | 0, 178 | 0, 179 | 0}); 180 | this.numericUpDown2.Name = "numericUpDown2"; 181 | this.numericUpDown2.Size = new System.Drawing.Size(44, 20); 182 | this.numericUpDown2.TabIndex = 10; 183 | this.numericUpDown2.Value = new decimal(new int[] { 184 | 16, 185 | 0, 186 | 0, 187 | 0}); 188 | this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged); 189 | // 190 | // label2 191 | // 192 | this.label2.AutoSize = true; 193 | this.label2.Location = new System.Drawing.Point(111, 30); 194 | this.label2.Name = "label2"; 195 | this.label2.Size = new System.Drawing.Size(41, 13); 196 | this.label2.TabIndex = 9; 197 | this.label2.Text = "Height:"; 198 | // 199 | // numericUpDown1 200 | // 201 | this.numericUpDown1.Location = new System.Drawing.Point(57, 28); 202 | this.numericUpDown1.Maximum = new decimal(new int[] { 203 | 10000, 204 | 0, 205 | 0, 206 | 0}); 207 | this.numericUpDown1.Minimum = new decimal(new int[] { 208 | 1, 209 | 0, 210 | 0, 211 | 0}); 212 | this.numericUpDown1.Name = "numericUpDown1"; 213 | this.numericUpDown1.Size = new System.Drawing.Size(48, 20); 214 | this.numericUpDown1.TabIndex = 8; 215 | this.numericUpDown1.Value = new decimal(new int[] { 216 | 16, 217 | 0, 218 | 0, 219 | 0}); 220 | this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); 221 | // 222 | // label1 223 | // 224 | this.label1.AutoSize = true; 225 | this.label1.Location = new System.Drawing.Point(13, 30); 226 | this.label1.Name = "label1"; 227 | this.label1.Size = new System.Drawing.Size(38, 13); 228 | this.label1.TabIndex = 7; 229 | this.label1.Text = "Width:"; 230 | // 231 | // openFileDialog1 232 | // 233 | this.openFileDialog1.FileName = "openFileDialog1"; 234 | this.openFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.openFileDialog1_FileOk); 235 | // 236 | // saveFileDialog1 237 | // 238 | this.saveFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.saveFileDialog1_FileOk); 239 | // 240 | // panel1 241 | // 242 | this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 243 | | System.Windows.Forms.AnchorStyles.Left) 244 | | System.Windows.Forms.AnchorStyles.Right))); 245 | this.panel1.AutoScroll = true; 246 | this.panel1.Controls.Add(this.pictureBox1); 247 | this.panel1.Location = new System.Drawing.Point(12, 79); 248 | this.panel1.Name = "panel1"; 249 | this.panel1.Size = new System.Drawing.Size(259, 263); 250 | this.panel1.TabIndex = 14; 251 | // 252 | // pictureBox1 253 | // 254 | this.pictureBox1.Location = new System.Drawing.Point(3, 3); 255 | this.pictureBox1.Name = "pictureBox1"; 256 | this.pictureBox1.Size = new System.Drawing.Size(253, 257); 257 | this.pictureBox1.TabIndex = 15; 258 | this.pictureBox1.TabStop = false; 259 | // 260 | // toolStripSeparator2 261 | // 262 | this.toolStripSeparator2.Name = "toolStripSeparator2"; 263 | this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); 264 | // 265 | // openCI4toolStripMenuItem 266 | // 267 | this.openCI4toolStripMenuItem.Name = "openCI4toolStripMenuItem"; 268 | this.openCI4toolStripMenuItem.Size = new System.Drawing.Size(152, 22); 269 | this.openCI4toolStripMenuItem.Text = "Open as CI4..."; 270 | this.openCI4toolStripMenuItem.Click += new System.EventHandler(this.openCI4toolStripMenuItem_Click); 271 | // 272 | // saveAsCI4toolStripMenuItem 273 | // 274 | this.saveAsCI4toolStripMenuItem.Name = "saveAsCI4toolStripMenuItem"; 275 | this.saveAsCI4toolStripMenuItem.Size = new System.Drawing.Size(152, 22); 276 | this.saveAsCI4toolStripMenuItem.Text = "Save as CI4..."; 277 | this.saveAsCI4toolStripMenuItem.Click += new System.EventHandler(this.saveAsCI4toolStripMenuItem_Click); 278 | // 279 | // Form1 280 | // 281 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 282 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 283 | this.ClientSize = new System.Drawing.Size(283, 354); 284 | this.Controls.Add(this.panel1); 285 | this.Controls.Add(this.numericUpDown3); 286 | this.Controls.Add(this.label3); 287 | this.Controls.Add(this.numericUpDown2); 288 | this.Controls.Add(this.label2); 289 | this.Controls.Add(this.numericUpDown1); 290 | this.Controls.Add(this.label1); 291 | this.Controls.Add(this.menuStrip1); 292 | this.MainMenuStrip = this.menuStrip1; 293 | this.Name = "Form1"; 294 | this.Text = "N64 GFX Cookie"; 295 | this.menuStrip1.ResumeLayout(false); 296 | this.menuStrip1.PerformLayout(); 297 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); 298 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); 299 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); 300 | this.panel1.ResumeLayout(false); 301 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 302 | this.ResumeLayout(false); 303 | this.PerformLayout(); 304 | 305 | } 306 | 307 | #endregion 308 | 309 | private System.Windows.Forms.MenuStrip menuStrip1; 310 | private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; 311 | private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; 312 | private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; 313 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; 314 | private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; 315 | private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; 316 | private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem; 317 | private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem; 318 | private System.Windows.Forms.NumericUpDown numericUpDown3; 319 | private System.Windows.Forms.Label label3; 320 | private System.Windows.Forms.NumericUpDown numericUpDown2; 321 | private System.Windows.Forms.Label label2; 322 | private System.Windows.Forms.NumericUpDown numericUpDown1; 323 | private System.Windows.Forms.Label label1; 324 | private System.Windows.Forms.OpenFileDialog openFileDialog1; 325 | private System.Windows.Forms.SaveFileDialog saveFileDialog1; 326 | private System.Windows.Forms.Panel panel1; 327 | private System.Windows.Forms.PictureBox pictureBox1; 328 | private System.Windows.Forms.ToolStripMenuItem openCI4toolStripMenuItem; 329 | private System.Windows.Forms.ToolStripMenuItem saveAsCI4toolStripMenuItem; 330 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; 331 | } 332 | } 333 | 334 | -------------------------------------------------------------------------------- /N64GFXCookie/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace N64GFXCookie 12 | { 13 | public partial class Form1 : Form 14 | { 15 | public Form1() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void openToolStripMenuItem_Click(object sender, EventArgs e) 21 | { 22 | openFileDialog1.Title = "Open CI8 File..."; 23 | openFileDialog1.Filter = "Binary File (*.bin)|*.bin|All files|*.*"; 24 | openFileDialog1.Tag = "ci8"; 25 | openFileDialog1.ShowDialog(); 26 | } 27 | 28 | private void openCI4toolStripMenuItem_Click(object sender, EventArgs e) 29 | { 30 | openFileDialog1.Title = "Open CI4 File..."; 31 | openFileDialog1.Filter = "Binary File (*.bin)|*.bin|All files|*.*"; 32 | openFileDialog1.Tag = "ci4"; 33 | openFileDialog1.ShowDialog(); 34 | } 35 | 36 | private void importToolStripMenuItem_Click(object sender, EventArgs e) 37 | { 38 | openFileDialog1.Title = "Import PNG"; 39 | openFileDialog1.Filter = "Portable Network Graphics (*.png)|*.png"; 40 | openFileDialog1.Tag = "import"; 41 | openFileDialog1.ShowDialog(); 42 | } 43 | 44 | private void openFileDialog1_FileOk(object sender, CancelEventArgs e) 45 | { 46 | if ((string)openFileDialog1.Tag == "ci8") 47 | { 48 | //Load CI8 49 | Program.LoadCI8File(openFileDialog1.OpenFile()); 50 | UpdateImage(); 51 | } 52 | else if ((string)openFileDialog1.Tag == "ci4") 53 | { 54 | //Load CI4 55 | Program.LoadCI4File(openFileDialog1.OpenFile()); 56 | UpdateImage(); 57 | } 58 | else if ((string)openFileDialog1.Tag == "import") 59 | { 60 | //Import PNG 61 | Program.ImportPNG(openFileDialog1.OpenFile()); 62 | UpdateImage(); 63 | } 64 | } 65 | 66 | private void exportToolStripMenuItem_Click(object sender, EventArgs e) 67 | { 68 | saveFileDialog1.Title = "Export to PNG"; 69 | saveFileDialog1.Filter = "Portable Network Graphics (*.png)|*.png"; 70 | saveFileDialog1.Tag = "to"; 71 | saveFileDialog1.ShowDialog(); 72 | } 73 | 74 | private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) 75 | { 76 | saveFileDialog1.Title = "Save CI8 File..."; 77 | saveFileDialog1.Filter = "Binary File (*.bin)|*.bin|All files|*.*"; 78 | saveFileDialog1.Tag = "ci8"; 79 | saveFileDialog1.ShowDialog(); 80 | } 81 | 82 | private void saveAsCI4toolStripMenuItem_Click(object sender, EventArgs e) 83 | { 84 | saveFileDialog1.Title = "Save CI4 File..."; 85 | saveFileDialog1.Filter = "Binary File (*.bin)|*.bin|All files|*.*"; 86 | saveFileDialog1.Tag = "ci4"; 87 | saveFileDialog1.ShowDialog(); 88 | } 89 | 90 | private void saveFileDialog1_FileOk(object sender, CancelEventArgs e) 91 | { 92 | if ((string)saveFileDialog1.Tag == "to") 93 | { 94 | //Export to PNG 95 | Program.SavePNGRender(saveFileDialog1.OpenFile(), (int)numericUpDown1.Value, (int)numericUpDown2.Value); 96 | } 97 | else if ((string)saveFileDialog1.Tag == "ci8") 98 | { 99 | //Save CI8 binary file 100 | Program.SaveCI8File(saveFileDialog1.OpenFile()); 101 | } 102 | else if ((string)saveFileDialog1.Tag == "ci4") 103 | { 104 | //Save CI4 binary file 105 | Program.SaveCI4File(saveFileDialog1.OpenFile()); 106 | } 107 | } 108 | 109 | private void exitToolStripMenuItem_Click(object sender, EventArgs e) 110 | { 111 | //Exit 112 | Application.Exit(); 113 | } 114 | 115 | private void numericUpDown1_ValueChanged(object sender, EventArgs e) 116 | { 117 | UpdateImage(); 118 | } 119 | 120 | private void numericUpDown2_ValueChanged(object sender, EventArgs e) 121 | { 122 | UpdateImage(); 123 | } 124 | 125 | private void numericUpDown3_ValueChanged(object sender, EventArgs e) 126 | { 127 | UpdateImage(); 128 | } 129 | 130 | 131 | //Other Functions 132 | private void UpdateImage() 133 | { 134 | pictureBox1.Image = Program.RenderGFX((int)numericUpDown1.Value, (int)numericUpDown2.Value, (int)numericUpDown3.Value); 135 | pictureBox1.Width = pictureBox1.Image.Width; 136 | pictureBox1.Height = pictureBox1.Image.Height; 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /N64GFXCookie/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 132, 17 125 | 126 | 127 | 272, 17 128 | 129 | -------------------------------------------------------------------------------- /N64GFXCookie/N64GFXCookie.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {54CAF128-3501-4098-8D89-F89CA02240E3} 8 | WinExe 9 | Properties 10 | N64GFXCookie 11 | N64GFXCookie 12 | v4.5.2 13 | 512 14 | true 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 0 26 | 0.1.0.%2a 27 | false 28 | false 29 | true 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | 41 | 42 | AnyCPU 43 | pdbonly 44 | true 45 | bin\Release\ 46 | TRACE 47 | prompt 48 | 4 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Form 66 | 67 | 68 | Form1.cs 69 | 70 | 71 | 72 | 73 | Form1.cs 74 | 75 | 76 | ResXFileCodeGenerator 77 | Resources.Designer.cs 78 | Designer 79 | 80 | 81 | True 82 | Resources.resx 83 | 84 | 85 | SettingsSingleFileGenerator 86 | Settings.Designer.cs 87 | 88 | 89 | True 90 | Settings.settings 91 | True 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | Always 100 | 101 | 102 | 103 | 104 | False 105 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29 106 | true 107 | 108 | 109 | False 110 | .NET Framework 3.5 SP1 111 | false 112 | 113 | 114 | 115 | 122 | -------------------------------------------------------------------------------- /N64GFXCookie/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | using System.IO; 7 | using System.Drawing; 8 | using System.Drawing.Imaging; 9 | 10 | namespace N64GFXCookie 11 | { 12 | static class Program 13 | { 14 | /// 15 | /// The main entry point for the application. 16 | /// 17 | /// 18 | 19 | static Color[] palette; 20 | static byte[] graphics; 21 | static int filetype; //0 = CI8, 1 = CI4 22 | 23 | [STAThread] 24 | static void Main() 25 | { 26 | Application.EnableVisualStyles(); 27 | Application.SetCompatibleTextRenderingDefault(false); 28 | Application.Run(new Form1()); 29 | } 30 | 31 | public static bool LoadCI8File(Stream file) 32 | { 33 | if (file.Length < 512) 34 | { 35 | MessageBox.Show("File under 512 bytes, invalid CI8 file. Palette expected."); 36 | return false; 37 | } 38 | 39 | filetype = 0; 40 | 41 | file.Seek(0, SeekOrigin.Begin); 42 | 43 | byte[] palettetemp = new byte[512]; 44 | file.Read(palettetemp, 0, 512); 45 | 46 | // Palette processing RGBA 5551 47 | palette = new Color[256]; 48 | ushort colortemp; 49 | Color colortemp2; 50 | byte R, G, B, A; 51 | for (int i = 0; i < 256; i++) 52 | { 53 | colortemp = (ushort)((palettetemp[i * 2] << 8) | (palettetemp[i * 2 + 1])); 54 | B = (byte)((colortemp & 0x3E) << 2); 55 | G = (byte)((colortemp & 0x7C0) >> 3); 56 | R = (byte)((colortemp & 0xF800) >> 8); 57 | A = (byte)(0xFF * ((colortemp) & 1)); 58 | 59 | colortemp2 = Color.FromArgb(A, R, G, B); 60 | palette[i] = colortemp2; 61 | } 62 | 63 | if (file.Length > 512) 64 | { 65 | //If there's more than just the palette, then get the graphics too 66 | int GFXsize = (int)file.Length - 512; 67 | graphics = new byte[GFXsize]; 68 | file.Read(graphics, 0, GFXsize); 69 | } 70 | file.Close(); 71 | return true; 72 | } 73 | 74 | public static bool SaveCI8File(Stream file) 75 | { 76 | //Color save 77 | ushort colortemp; 78 | byte[] palettetemp = new byte[512]; 79 | int R, G, B, A; 80 | for (int i = 0; i < 256; i++) 81 | { 82 | B = palette[i].B >> 2; 83 | G = palette[i].G << 3; 84 | R = palette[i].R << 8; 85 | A = palette[i].A; 86 | 87 | colortemp = (ushort)(R | G | B | (A & 1)); 88 | palettetemp[i * 2] = (byte)(colortemp >> 8); 89 | palettetemp[i * 2 + 1] = (byte)(colortemp & 0xFF); 90 | } 91 | 92 | file.Write(palettetemp, 0, 512); 93 | //GFX save 94 | file.Write(graphics, 0, graphics.Length); 95 | 96 | file.Close(); 97 | return true; 98 | } 99 | 100 | public static bool LoadCI4File(Stream file) 101 | { 102 | if (file.Length < 32) 103 | { 104 | MessageBox.Show("File under 32 bytes, invalid CI4 file. Palette expected."); 105 | return false; 106 | } 107 | 108 | filetype = 1; 109 | 110 | file.Seek(0, SeekOrigin.Begin); 111 | 112 | byte[] palettetemp = new byte[32]; 113 | file.Read(palettetemp, 0, 32); 114 | 115 | // Palette processing RGBA 5551 116 | palette = new Color[16]; 117 | ushort colortemp; 118 | Color colortemp2; 119 | byte R, G, B, A; 120 | for (int i = 0; i < 16; i++) 121 | { 122 | colortemp = (ushort)((palettetemp[i * 2] << 8) | (palettetemp[i * 2 + 1])); 123 | B = (byte)((colortemp & 0x3E) << 2); 124 | G = (byte)((colortemp & 0x7C0) >> 3); 125 | R = (byte)((colortemp & 0xF800) >> 8); 126 | A = (byte)(0xFF * ((colortemp) & 1)); 127 | 128 | colortemp2 = Color.FromArgb(A, R, G, B); 129 | palette[i] = colortemp2; 130 | } 131 | 132 | if (file.Length > 32) 133 | { 134 | //If there's more than just the palette, then get the graphics too 135 | int GFXsize = (int)file.Length - 32; 136 | byte[] graphicstemp = new byte[GFXsize]; 137 | file.Read(graphicstemp, 0, GFXsize); 138 | 139 | //Convert to CI8 internally 140 | graphics = new byte[GFXsize * 2]; 141 | for (int i = 0; i < GFXsize; i++) 142 | { 143 | graphics[i * 2] = (byte)(graphicstemp[i] >> 4); 144 | graphics[(i * 2) + 1] = (byte)(graphicstemp[i] & 0xF); 145 | } 146 | } 147 | file.Close(); 148 | return true; 149 | } 150 | 151 | public static bool SaveCI4File(Stream file) 152 | { 153 | //Color save 154 | ushort colortemp; 155 | byte[] palettetemp = new byte[32]; 156 | int R, G, B, A; 157 | for (int i = 0; i < 16; i++) 158 | { 159 | B = palette[i].B >> 2; 160 | G = palette[i].G << 3; 161 | R = palette[i].R << 8; 162 | A = palette[i].A; 163 | 164 | colortemp = (ushort)(R | G | B | (A & 1)); 165 | palettetemp[i * 2] = (byte)(colortemp >> 8); 166 | palettetemp[i * 2 + 1] = (byte)(colortemp & 0xFF); 167 | } 168 | 169 | file.Write(palettetemp, 0, 32); 170 | //GFX save 171 | byte[] graphicstemp = new byte[graphics.Length / 2]; 172 | for (int i = 0; i < graphics.Length; i += 2) 173 | { 174 | graphicstemp[i / 2] = (byte)((graphics[i] << 4) | (graphics[i + 1] & 0xF)); 175 | } 176 | 177 | file.Write(graphicstemp, 0, graphicstemp.Length); 178 | 179 | file.Close(); 180 | return true; 181 | } 182 | 183 | public static Bitmap RenderGFX(int width, int height, int zoom) 184 | { 185 | if (palette == null || graphics == null) 186 | { 187 | return new Bitmap(1, 1); 188 | } 189 | 190 | Bitmap img = new Bitmap(width * zoom, height * zoom); 191 | 192 | for (int y = 0; y < height; y++) 193 | { 194 | for (int x = 0; x < width; x++) 195 | { 196 | if ((x + y * width) >= graphics.Length) 197 | return img; 198 | 199 | for (int i = 0; i < zoom; i++) 200 | { 201 | for (int j = 0; j < zoom; j++) 202 | { 203 | img.SetPixel((x * zoom) + j, (y * zoom) + i, palette[graphics[x + y * width]]); 204 | } 205 | } 206 | } 207 | } 208 | 209 | return img; 210 | } 211 | 212 | public static bool SavePNGRender(Stream file, int width, int height) 213 | { 214 | if (palette == null || graphics == null) 215 | { 216 | return false; 217 | } 218 | 219 | Bitmap img = RenderGFX(width, height, 1); 220 | img.Save(file, ImageFormat.Png); 221 | 222 | file.Close(); 223 | return true; 224 | } 225 | 226 | public static bool ImportPNG(Stream file) 227 | { 228 | if (palette == null) 229 | { 230 | return false; 231 | } 232 | 233 | Bitmap img = new Bitmap(file); 234 | 235 | Color colortemp; 236 | graphics = new byte[img.Width * img.Height]; 237 | 238 | for (int y = 0; y < img.Height; y++) 239 | { 240 | for (int x = 0; x < img.Width; x++) 241 | { 242 | colortemp = img.GetPixel(x, y); 243 | graphics[x + y * img.Width] = (byte)BitmapImport.closestColor2(new List(palette), colortemp); 244 | } 245 | } 246 | file.Close(); 247 | return true; 248 | } 249 | } 250 | 251 | // THIS CODE IS NOT MINE, modified it slightly. 252 | // CANNOT SEEM TO FIND THE ORIGINAL SOURCE OF IT. 253 | static class BitmapImport 254 | { 255 | // closed match for hues only: 256 | static int closestColor1(List colors, Color target) 257 | { 258 | var hue1 = target.GetHue(); 259 | var diffs = colors.Select(n => getHueDistance(n.GetHue(), hue1)); 260 | var diffMin = diffs.Min(n => n); 261 | return diffs.ToList().FindIndex(n => n == diffMin); 262 | } 263 | 264 | // closed match in RGB space 265 | public static int closestColor2(List colors, Color target) 266 | { 267 | var colorDiffs = colors.Select(n => ColorDiff(n, target)).Min(n => n); 268 | return colors.FindIndex(n => ColorDiff(n, target) == colorDiffs); 269 | } 270 | 271 | // color brightness as perceived: 272 | static float getBrightness(Color c) 273 | { return (c.R * 0.299f + c.G * 0.587f + c.B * 0.114f) / 256f; } 274 | 275 | // distance between two hues: 276 | static float getHueDistance(float hue1, float hue2) 277 | { 278 | float d = Math.Abs(hue1 - hue2); return d > 180 ? 360 - d : d; 279 | } 280 | 281 | // distance in RGB space 282 | static int ColorDiff(Color c1, Color c2) 283 | { 284 | return (int)Math.Sqrt((c1.R - c2.R) * (c1.R - c2.R) 285 | + (c1.G - c2.G) * (c1.G - c2.G) 286 | + (c1.B - c2.B) * (c1.B - c2.B) 287 | + (c1.A - c2.A) * (c1.A - c2.A)); 288 | } 289 | } 290 | } 291 | -------------------------------------------------------------------------------- /N64GFXCookie/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("N64GFXCookie")] 9 | [assembly: AssemblyDescription("CI8 N64 Graphics Viewer/Editor")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("LuigiBlood")] 12 | [assembly: AssemblyProduct("N64GFXCookie")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("54caf128-3501-4098-8d89-f89ca02240e3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("0.2.0.0")] 36 | [assembly: AssemblyFileVersion("0.2.0.0")] 37 | -------------------------------------------------------------------------------- /N64GFXCookie/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace N64GFXCookie.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("N64GFXCookie.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /N64GFXCookie/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /N64GFXCookie/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace N64GFXCookie.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /N64GFXCookie/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /N64GFXCookie/readme.txt: -------------------------------------------------------------------------------- 1 | N64 GFX Cookie 0.2 2 | by LuigiBlood 3 | 4 | This tool deals with CI4/CI8 N64 graphics data. It can render graphics, export them to PNG (with alpha channel as RGBA5551 does support), and import PNGs back into CI4/CI8 format and fits them into the same palette. 5 | The expected file format: 6 | 7 | CI4 Format: 8 | Offset - Size - Description 9 | 0x0000 - 0x20 - RGBA5551 16 color palette Data 10 | 0x0200 - ? - CI4 Graphics Data (optional) 11 | 12 | CI8 Format: 13 | Offset - Size - Description 14 | 0x0000 - 0x200 - RGBA5551 256 color palette Data 15 | 0x0200 - ? - CI8 Graphics Data (optional) --------------------------------------------------------------------------------