├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── README.md └── SatellaWave ├── SatellaWave.sln └── SatellaWave ├── AddChannel.Designer.cs ├── AddChannel.cs ├── AddChannel.resx ├── App.config ├── ChannelClass.cs ├── EditChannel.Designer.cs ├── EditChannel.cs ├── EditChannel.resx ├── EventPlazaAnimationEditor.Designer.cs ├── EventPlazaAnimationEditor.cs ├── EventPlazaAnimationEditor.resx ├── EventPlazaCollisionEditor.Designer.cs ├── EventPlazaCollisionEditor.cs ├── EventPlazaCollisionEditor.resx ├── EventPlazaEasyGraphicsImport.Designer.cs ├── EventPlazaEasyGraphicsImport.cs ├── EventPlazaEasyGraphicsImport.resx ├── EventPlazaEditor.Designer.cs ├── EventPlazaEditor.cs ├── EventPlazaEditor.resx ├── EventPlazaTilesetEditor.Designer.cs ├── EventPlazaTilesetEditor.cs ├── EventPlazaTilesetEditor.resx ├── FolderSelectDialog ├── FolderSelectDialog.cs └── Reflector.cs ├── Images ├── Mugshot │ ├── 00.png │ ├── 01.png │ ├── 02.png │ ├── 03.png │ ├── 04.png │ ├── 05.png │ ├── 06.png │ ├── 07.png │ ├── 08.png │ ├── 09.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 13.png │ ├── 14.png │ ├── 15.png │ └── 16.png ├── bsxtileset.png └── icon.ico ├── MainWindow.Designer.cs ├── MainWindow.cs ├── MainWindow.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── ResourceAccess.cs ├── Resources └── Data │ ├── bsxpalette.bin │ ├── bsxtiles.bin │ ├── bsxtileset.bin │ └── bsxtilesetconfig.bin ├── SatellaWave.csproj └── 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 -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 LuigiBlood 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SatellaWave 2 | ======== 3 | 4 | Compiling: 5 | - You can compile this project with a vanilla install of Visual Studio 2017 on Windows. There are no dependencies. 6 | 7 | Satellaview Server Manager 8 | Features: 9 | - Export as BSX*-*.bin (bsnes-plus and snes9x) 10 | - Online Server Management (not yet) 11 | 12 | TODO: 13 | - BS-X Expansion Support 14 | - Set up other kinds of channels 15 | - Derby Stallion 96 (1.2.129.0, 1.2.129.16) -------------------------------------------------------------------------------- /SatellaWave/SatellaWave.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2009 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SatellaWave", "SatellaWave\SatellaWave.csproj", "{EFB2B9D3-D659-42BC-A96A-217DDC58FBF4}" 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 | {EFB2B9D3-D659-42BC-A96A-217DDC58FBF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {EFB2B9D3-D659-42BC-A96A-217DDC58FBF4}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {EFB2B9D3-D659-42BC-A96A-217DDC58FBF4}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {EFB2B9D3-D659-42BC-A96A-217DDC58FBF4}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {88EBEE97-94D6-4748-8F60-32C90ED5120C} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/AddChannel.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SatellaWave 2 | { 3 | partial class AddChannel 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.comboBoxChannelType = new System.Windows.Forms.ComboBox(); 32 | this.buttonOK = new System.Windows.Forms.Button(); 33 | this.buttonCancel = new System.Windows.Forms.Button(); 34 | this.label1 = new System.Windows.Forms.Label(); 35 | this.SuspendLayout(); 36 | // 37 | // comboBoxChannelType 38 | // 39 | this.comboBoxChannelType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 40 | | System.Windows.Forms.AnchorStyles.Right))); 41 | this.comboBoxChannelType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 42 | this.comboBoxChannelType.FormattingEnabled = true; 43 | this.comboBoxChannelType.Items.AddRange(new object[] { 44 | "BS-X - Welcome Message (1.1.0.4)", 45 | "BS-X - Town Status (1.1.0.5)", 46 | "BS-X - Directory (1.1.0.6)", 47 | "BS-X - Patch (1.1.0.7)", 48 | "BS-X - Time Channel (1.1.0.8)", 49 | "Game - Time Channel (1.2.0.48)", 50 | "Itoi Shigesato no Bass Tsuri No. 1 - Contest 1 (1.2.130.0)", 51 | "Itoi Shigesato no Bass Tsuri No. 1 - Contest 2 (1.2.130.16)", 52 | "Itoi Shigesato no Bass Tsuri No. 1 - Contest 3 (1.2.130.32)", 53 | "Itoi Shigesato no Bass Tsuri No. 1 - Contest 4 (1.2.130.48)"}); 54 | this.comboBoxChannelType.Location = new System.Drawing.Point(12, 28); 55 | this.comboBoxChannelType.Name = "comboBoxChannelType"; 56 | this.comboBoxChannelType.Size = new System.Drawing.Size(346, 21); 57 | this.comboBoxChannelType.TabIndex = 0; 58 | this.comboBoxChannelType.SelectedIndexChanged += new System.EventHandler(this.comboBoxChannelType_SelectedIndexChanged); 59 | // 60 | // buttonOK 61 | // 62 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; 63 | this.buttonOK.Location = new System.Drawing.Point(202, 68); 64 | this.buttonOK.Name = "buttonOK"; 65 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 66 | this.buttonOK.TabIndex = 1; 67 | this.buttonOK.Text = "OK"; 68 | this.buttonOK.UseVisualStyleBackColor = true; 69 | // 70 | // buttonCancel 71 | // 72 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 73 | this.buttonCancel.Location = new System.Drawing.Point(283, 68); 74 | this.buttonCancel.Name = "buttonCancel"; 75 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 76 | this.buttonCancel.TabIndex = 2; 77 | this.buttonCancel.Text = "Cancel"; 78 | this.buttonCancel.UseVisualStyleBackColor = true; 79 | // 80 | // label1 81 | // 82 | this.label1.AutoSize = true; 83 | this.label1.Location = new System.Drawing.Point(12, 12); 84 | this.label1.Name = "label1"; 85 | this.label1.Size = new System.Drawing.Size(136, 13); 86 | this.label1.TabIndex = 3; 87 | this.label1.Text = "Select a new channel type:"; 88 | // 89 | // AddChannel 90 | // 91 | this.AcceptButton = this.buttonOK; 92 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 93 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 94 | this.CancelButton = this.buttonCancel; 95 | this.ClientSize = new System.Drawing.Size(370, 103); 96 | this.ControlBox = false; 97 | this.Controls.Add(this.label1); 98 | this.Controls.Add(this.buttonCancel); 99 | this.Controls.Add(this.buttonOK); 100 | this.Controls.Add(this.comboBoxChannelType); 101 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 102 | this.MaximizeBox = false; 103 | this.MinimizeBox = false; 104 | this.Name = "AddChannel"; 105 | this.ShowInTaskbar = false; 106 | this.Text = "Add Channel..."; 107 | this.ResumeLayout(false); 108 | this.PerformLayout(); 109 | 110 | } 111 | 112 | #endregion 113 | 114 | private System.Windows.Forms.ComboBox comboBoxChannelType; 115 | private System.Windows.Forms.Button buttonOK; 116 | private System.Windows.Forms.Button buttonCancel; 117 | private System.Windows.Forms.Label label1; 118 | } 119 | } -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/AddChannel.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 SatellaWave 12 | { 13 | public partial class AddChannel : Form 14 | { 15 | public int returnChannelType { get; set; } 16 | 17 | public AddChannel() 18 | { 19 | InitializeComponent(); 20 | comboBoxChannelType.SelectedIndex = 0; 21 | returnChannelType = comboBoxChannelType.SelectedIndex; 22 | } 23 | 24 | private void comboBoxChannelType_SelectedIndexChanged(object sender, EventArgs e) 25 | { 26 | returnChannelType = comboBoxChannelType.SelectedIndex; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/AddChannel.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EditChannel.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SatellaWave 2 | { 3 | partial class EditChannel 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.buttonOK = new System.Windows.Forms.Button(); 32 | this.buttonCancel = new System.Windows.Forms.Button(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.textBoxChannelName = new System.Windows.Forms.TextBox(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.textBoxChannelService = new System.Windows.Forms.TextBox(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.textBoxChannelLCI = new System.Windows.Forms.TextBox(); 39 | this.label4 = new System.Windows.Forms.Label(); 40 | this.numericUpDownTimeout = new System.Windows.Forms.NumericUpDown(); 41 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); 42 | this.SuspendLayout(); 43 | // 44 | // buttonOK 45 | // 46 | this.buttonOK.Location = new System.Drawing.Point(12, 125); 47 | this.buttonOK.Name = "buttonOK"; 48 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 49 | this.buttonOK.TabIndex = 0; 50 | this.buttonOK.Text = "OK"; 51 | this.buttonOK.UseVisualStyleBackColor = true; 52 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); 53 | // 54 | // buttonCancel 55 | // 56 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 57 | this.buttonCancel.Location = new System.Drawing.Point(196, 125); 58 | this.buttonCancel.Name = "buttonCancel"; 59 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 60 | this.buttonCancel.TabIndex = 1; 61 | this.buttonCancel.Text = "Cancel"; 62 | this.buttonCancel.UseVisualStyleBackColor = true; 63 | // 64 | // label1 65 | // 66 | this.label1.AutoSize = true; 67 | this.label1.Location = new System.Drawing.Point(12, 9); 68 | this.label1.Name = "label1"; 69 | this.label1.Size = new System.Drawing.Size(38, 13); 70 | this.label1.TabIndex = 2; 71 | this.label1.Text = "Name:"; 72 | // 73 | // textBoxChannelName 74 | // 75 | this.textBoxChannelName.Location = new System.Drawing.Point(56, 6); 76 | this.textBoxChannelName.Name = "textBoxChannelName"; 77 | this.textBoxChannelName.Size = new System.Drawing.Size(215, 20); 78 | this.textBoxChannelName.TabIndex = 3; 79 | // 80 | // label2 81 | // 82 | this.label2.AutoSize = true; 83 | this.label2.Location = new System.Drawing.Point(12, 34); 84 | this.label2.Name = "label2"; 85 | this.label2.Size = new System.Drawing.Size(94, 13); 86 | this.label2.TabIndex = 4; 87 | this.label2.Text = "Software Channel:"; 88 | // 89 | // textBoxChannelService 90 | // 91 | this.textBoxChannelService.Location = new System.Drawing.Point(112, 31); 92 | this.textBoxChannelService.Name = "textBoxChannelService"; 93 | this.textBoxChannelService.Size = new System.Drawing.Size(100, 20); 94 | this.textBoxChannelService.TabIndex = 5; 95 | // 96 | // label3 97 | // 98 | this.label3.AutoSize = true; 99 | this.label3.Location = new System.Drawing.Point(12, 60); 100 | this.label3.Name = "label3"; 101 | this.label3.Size = new System.Drawing.Size(86, 13); 102 | this.label3.TabIndex = 6; 103 | this.label3.Text = "Logical Channel:"; 104 | // 105 | // textBoxChannelLCI 106 | // 107 | this.textBoxChannelLCI.Location = new System.Drawing.Point(112, 57); 108 | this.textBoxChannelLCI.MaxLength = 4; 109 | this.textBoxChannelLCI.Name = "textBoxChannelLCI"; 110 | this.textBoxChannelLCI.Size = new System.Drawing.Size(46, 20); 111 | this.textBoxChannelLCI.TabIndex = 7; 112 | // 113 | // label4 114 | // 115 | this.label4.AutoSize = true; 116 | this.label4.Location = new System.Drawing.Point(12, 88); 117 | this.label4.Name = "label4"; 118 | this.label4.Size = new System.Drawing.Size(108, 13); 119 | this.label4.TabIndex = 8; 120 | this.label4.Text = "Timeout (in seconds):"; 121 | // 122 | // numericUpDownTimeout 123 | // 124 | this.numericUpDownTimeout.Location = new System.Drawing.Point(126, 86); 125 | this.numericUpDownTimeout.Maximum = new decimal(new int[] { 126 | 65535, 127 | 0, 128 | 0, 129 | 0}); 130 | this.numericUpDownTimeout.Name = "numericUpDownTimeout"; 131 | this.numericUpDownTimeout.Size = new System.Drawing.Size(51, 20); 132 | this.numericUpDownTimeout.TabIndex = 9; 133 | // 134 | // EditChannel 135 | // 136 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 137 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 138 | this.CancelButton = this.buttonCancel; 139 | this.ClientSize = new System.Drawing.Size(283, 160); 140 | this.Controls.Add(this.numericUpDownTimeout); 141 | this.Controls.Add(this.label4); 142 | this.Controls.Add(this.textBoxChannelLCI); 143 | this.Controls.Add(this.label3); 144 | this.Controls.Add(this.textBoxChannelService); 145 | this.Controls.Add(this.label2); 146 | this.Controls.Add(this.textBoxChannelName); 147 | this.Controls.Add(this.label1); 148 | this.Controls.Add(this.buttonCancel); 149 | this.Controls.Add(this.buttonOK); 150 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 151 | this.MaximizeBox = false; 152 | this.MinimizeBox = false; 153 | this.Name = "EditChannel"; 154 | this.ShowIcon = false; 155 | this.ShowInTaskbar = false; 156 | this.Text = "Edit Channel Information..."; 157 | this.Shown += new System.EventHandler(this.EditChannel_Shown); 158 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).EndInit(); 159 | this.ResumeLayout(false); 160 | this.PerformLayout(); 161 | 162 | } 163 | 164 | #endregion 165 | 166 | private System.Windows.Forms.Button buttonOK; 167 | private System.Windows.Forms.Button buttonCancel; 168 | private System.Windows.Forms.Label label1; 169 | private System.Windows.Forms.TextBox textBoxChannelName; 170 | private System.Windows.Forms.Label label2; 171 | private System.Windows.Forms.TextBox textBoxChannelService; 172 | private System.Windows.Forms.Label label3; 173 | private System.Windows.Forms.TextBox textBoxChannelLCI; 174 | private System.Windows.Forms.Label label4; 175 | private System.Windows.Forms.NumericUpDown numericUpDownTimeout; 176 | } 177 | } -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EditChannel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Globalization; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Text.RegularExpressions; 10 | using System.Threading.Tasks; 11 | using System.Windows.Forms; 12 | 13 | namespace SatellaWave 14 | { 15 | public partial class EditChannel : Form 16 | { 17 | public string _ret_name; 18 | public string _ret_channel; 19 | public ushort _ret_service; 20 | public ushort _ret_program; 21 | public ushort _ret_lci; 22 | public ushort _ret_timeout; 23 | 24 | public EditChannel(string _name, string _broadcast, ushort _lci, ushort _timeout) 25 | { 26 | InitializeComponent(); 27 | 28 | textBoxChannelName.Text = _name; 29 | textBoxChannelService.Text = _broadcast; 30 | textBoxChannelLCI.Text = _lci.ToString("X4"); 31 | numericUpDownTimeout.Value = _timeout; 32 | } 33 | 34 | private void buttonOK_Click(object sender, EventArgs e) 35 | { 36 | //Get Name 37 | _ret_name = textBoxChannelName.Text; 38 | 39 | //Check Software Channel integrity 40 | Regex regex = new Regex(@"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"); 41 | if (!regex.Match(textBoxChannelService.Text).Success) 42 | { 43 | MessageBox.Show("This is not a correct Software Channel.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 44 | return; 45 | } 46 | 47 | _ret_channel = textBoxChannelService.Text; 48 | _ret_service = (ushort)((Convert.ToByte(textBoxChannelService.Text.Split('.')[0]) << 8) | Convert.ToByte(textBoxChannelService.Text.Split('.')[1])); 49 | _ret_program = (ushort)((Convert.ToByte(textBoxChannelService.Text.Split('.')[2]) << 8) | Convert.ToByte(textBoxChannelService.Text.Split('.')[3])); 50 | 51 | //Check LCI 52 | regex = new Regex(@"^[0-9a-fA-F]{4}$"); 53 | if (!regex.Match(textBoxChannelLCI.Text).Success) 54 | { 55 | MessageBox.Show("This is not a correct Logical Channel (must be 4 hexadecimal digit number).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 56 | return; 57 | } 58 | 59 | ushort.TryParse(textBoxChannelLCI.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out _ret_lci); 60 | 61 | _ret_timeout = (ushort)numericUpDownTimeout.Value; 62 | 63 | this.DialogResult = DialogResult.OK; 64 | this.Close(); 65 | } 66 | 67 | private void EditChannel_Shown(object sender, EventArgs e) 68 | { 69 | textBoxChannelName.Focus(); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EditChannel.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaAnimationEditor.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SatellaWave 2 | { 3 | partial class EventPlazaAnimationEditor 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.components = new System.ComponentModel.Container(); 32 | this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); 33 | this.panel1 = new System.Windows.Forms.Panel(); 34 | this.pictureBoxTileset = new System.Windows.Forms.PictureBox(); 35 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 36 | this.numericUpDownDuration = new System.Windows.Forms.NumericUpDown(); 37 | this.label2 = new System.Windows.Forms.Label(); 38 | this.labelFrame = new System.Windows.Forms.Label(); 39 | this.hScrollBar1 = new System.Windows.Forms.HScrollBar(); 40 | this.pictureBoxBuilding = new System.Windows.Forms.PictureBox(); 41 | this.buttonCancel = new System.Windows.Forms.Button(); 42 | this.buttonOK = new System.Windows.Forms.Button(); 43 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 44 | this.checkBoxHighlight = new System.Windows.Forms.CheckBox(); 45 | this.buttonClear = new System.Windows.Forms.Button(); 46 | this.buttonDelete = new System.Windows.Forms.Button(); 47 | this.buttonInsert = new System.Windows.Forms.Button(); 48 | this.buttonAdd = new System.Windows.Forms.Button(); 49 | this.buttonRemoveLast = new System.Windows.Forms.Button(); 50 | this.label1 = new System.Windows.Forms.Label(); 51 | ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); 52 | this.panel1.SuspendLayout(); 53 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileset)).BeginInit(); 54 | this.groupBox1.SuspendLayout(); 55 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).BeginInit(); 56 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBuilding)).BeginInit(); 57 | this.groupBox2.SuspendLayout(); 58 | this.SuspendLayout(); 59 | // 60 | // panel1 61 | // 62 | this.panel1.AutoScroll = true; 63 | this.panel1.Controls.Add(this.pictureBoxTileset); 64 | this.panel1.Dock = System.Windows.Forms.DockStyle.Left; 65 | this.panel1.Location = new System.Drawing.Point(0, 0); 66 | this.panel1.Name = "panel1"; 67 | this.panel1.Size = new System.Drawing.Size(145, 344); 68 | this.panel1.TabIndex = 0; 69 | // 70 | // pictureBoxTileset 71 | // 72 | this.pictureBoxTileset.BackColor = System.Drawing.Color.DimGray; 73 | this.pictureBoxTileset.Image = global::SatellaWave.Properties.Resources.Tileset; 74 | this.pictureBoxTileset.Location = new System.Drawing.Point(0, 0); 75 | this.pictureBoxTileset.Name = "pictureBoxTileset"; 76 | this.pictureBoxTileset.Size = new System.Drawing.Size(128, 2049); 77 | this.pictureBoxTileset.TabIndex = 1; 78 | this.pictureBoxTileset.TabStop = false; 79 | this.pictureBoxTileset.Click += new System.EventHandler(this.pictureBoxTileset_Click); 80 | // 81 | // groupBox1 82 | // 83 | this.groupBox1.Controls.Add(this.numericUpDownDuration); 84 | this.groupBox1.Controls.Add(this.label2); 85 | this.groupBox1.Controls.Add(this.labelFrame); 86 | this.groupBox1.Controls.Add(this.hScrollBar1); 87 | this.groupBox1.Controls.Add(this.pictureBoxBuilding); 88 | this.groupBox1.Location = new System.Drawing.Point(151, 6); 89 | this.groupBox1.Name = "groupBox1"; 90 | this.groupBox1.Size = new System.Drawing.Size(139, 330); 91 | this.groupBox1.TabIndex = 3; 92 | this.groupBox1.TabStop = false; 93 | this.groupBox1.Text = "Animation Editor"; 94 | // 95 | // numericUpDownDuration 96 | // 97 | this.numericUpDownDuration.Location = new System.Drawing.Point(65, 303); 98 | this.numericUpDownDuration.Maximum = new decimal(new int[] { 99 | 65535, 100 | 0, 101 | 0, 102 | 0}); 103 | this.numericUpDownDuration.Name = "numericUpDownDuration"; 104 | this.numericUpDownDuration.Size = new System.Drawing.Size(64, 20); 105 | this.numericUpDownDuration.TabIndex = 7; 106 | this.numericUpDownDuration.Value = new decimal(new int[] { 107 | 65535, 108 | 0, 109 | 0, 110 | 0}); 111 | this.numericUpDownDuration.ValueChanged += new System.EventHandler(this.numericUpDownDuration_ValueChanged); 112 | // 113 | // label2 114 | // 115 | this.label2.AutoSize = true; 116 | this.label2.Location = new System.Drawing.Point(6, 287); 117 | this.label2.Name = "label2"; 118 | this.label2.Size = new System.Drawing.Size(101, 13); 119 | this.label2.TabIndex = 6; 120 | this.label2.Text = "Duration (in frames):"; 121 | // 122 | // labelFrame 123 | // 124 | this.labelFrame.AutoSize = true; 125 | this.labelFrame.Location = new System.Drawing.Point(6, 268); 126 | this.labelFrame.Name = "labelFrame"; 127 | this.labelFrame.Size = new System.Drawing.Size(56, 13); 128 | this.labelFrame.TabIndex = 5; 129 | this.labelFrame.Text = "Frame 1/1"; 130 | // 131 | // hScrollBar1 132 | // 133 | this.hScrollBar1.LargeChange = 1; 134 | this.hScrollBar1.Location = new System.Drawing.Point(5, 246); 135 | this.hScrollBar1.Maximum = 0; 136 | this.hScrollBar1.Name = "hScrollBar1"; 137 | this.hScrollBar1.Size = new System.Drawing.Size(128, 17); 138 | this.hScrollBar1.TabIndex = 4; 139 | this.hScrollBar1.ValueChanged += new System.EventHandler(this.hScrollBar1_ValueChanged); 140 | // 141 | // pictureBoxBuilding 142 | // 143 | this.pictureBoxBuilding.BackColor = System.Drawing.Color.DimGray; 144 | this.pictureBoxBuilding.Location = new System.Drawing.Point(5, 19); 145 | this.pictureBoxBuilding.Name = "pictureBoxBuilding"; 146 | this.pictureBoxBuilding.Size = new System.Drawing.Size(128, 224); 147 | this.pictureBoxBuilding.TabIndex = 0; 148 | this.pictureBoxBuilding.TabStop = false; 149 | this.pictureBoxBuilding.Click += new System.EventHandler(this.pictureBoxBuilding_Click); 150 | // 151 | // buttonCancel 152 | // 153 | this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 154 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 155 | this.buttonCancel.Location = new System.Drawing.Point(355, 309); 156 | this.buttonCancel.Name = "buttonCancel"; 157 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 158 | this.buttonCancel.TabIndex = 11; 159 | this.buttonCancel.Text = "Cancel"; 160 | this.buttonCancel.UseVisualStyleBackColor = true; 161 | // 162 | // buttonOK 163 | // 164 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 165 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; 166 | this.buttonOK.Location = new System.Drawing.Point(355, 280); 167 | this.buttonOK.Name = "buttonOK"; 168 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 169 | this.buttonOK.TabIndex = 12; 170 | this.buttonOK.Text = "Save"; 171 | this.buttonOK.UseVisualStyleBackColor = true; 172 | // 173 | // groupBox2 174 | // 175 | this.groupBox2.Controls.Add(this.checkBoxHighlight); 176 | this.groupBox2.Controls.Add(this.buttonClear); 177 | this.groupBox2.Controls.Add(this.buttonDelete); 178 | this.groupBox2.Controls.Add(this.buttonInsert); 179 | this.groupBox2.Controls.Add(this.buttonAdd); 180 | this.groupBox2.Controls.Add(this.buttonRemoveLast); 181 | this.groupBox2.Location = new System.Drawing.Point(296, 6); 182 | this.groupBox2.Name = "groupBox2"; 183 | this.groupBox2.Size = new System.Drawing.Size(136, 199); 184 | this.groupBox2.TabIndex = 13; 185 | this.groupBox2.TabStop = false; 186 | this.groupBox2.Text = "Menu"; 187 | // 188 | // checkBoxHighlight 189 | // 190 | this.checkBoxHighlight.AutoSize = true; 191 | this.checkBoxHighlight.Location = new System.Drawing.Point(6, 19); 192 | this.checkBoxHighlight.Name = "checkBoxHighlight"; 193 | this.checkBoxHighlight.Size = new System.Drawing.Size(112, 17); 194 | this.checkBoxHighlight.TabIndex = 16; 195 | this.checkBoxHighlight.Text = "Highlight Changes"; 196 | this.checkBoxHighlight.UseVisualStyleBackColor = true; 197 | this.checkBoxHighlight.CheckedChanged += new System.EventHandler(this.checkBoxHighlight_CheckedChanged); 198 | // 199 | // buttonClear 200 | // 201 | this.buttonClear.Location = new System.Drawing.Point(6, 169); 202 | this.buttonClear.Name = "buttonClear"; 203 | this.buttonClear.Size = new System.Drawing.Size(125, 23); 204 | this.buttonClear.TabIndex = 15; 205 | this.buttonClear.Text = "Clear Animation"; 206 | this.buttonClear.UseVisualStyleBackColor = true; 207 | this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); 208 | // 209 | // buttonDelete 210 | // 211 | this.buttonDelete.Location = new System.Drawing.Point(6, 101); 212 | this.buttonDelete.Name = "buttonDelete"; 213 | this.buttonDelete.Size = new System.Drawing.Size(125, 23); 214 | this.buttonDelete.TabIndex = 14; 215 | this.buttonDelete.Text = "Delete Current Frame"; 216 | this.buttonDelete.UseVisualStyleBackColor = true; 217 | this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click); 218 | // 219 | // buttonInsert 220 | // 221 | this.buttonInsert.Location = new System.Drawing.Point(6, 72); 222 | this.buttonInsert.Name = "buttonInsert"; 223 | this.buttonInsert.Size = new System.Drawing.Size(125, 23); 224 | this.buttonInsert.TabIndex = 13; 225 | this.buttonInsert.Text = "Insert Frame"; 226 | this.buttonInsert.UseVisualStyleBackColor = true; 227 | this.buttonInsert.Click += new System.EventHandler(this.buttonInsert_Click); 228 | // 229 | // buttonAdd 230 | // 231 | this.buttonAdd.Location = new System.Drawing.Point(6, 43); 232 | this.buttonAdd.Name = "buttonAdd"; 233 | this.buttonAdd.Size = new System.Drawing.Size(125, 23); 234 | this.buttonAdd.TabIndex = 12; 235 | this.buttonAdd.Text = "Add Frame"; 236 | this.buttonAdd.UseVisualStyleBackColor = true; 237 | this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); 238 | // 239 | // buttonRemoveLast 240 | // 241 | this.buttonRemoveLast.Location = new System.Drawing.Point(6, 130); 242 | this.buttonRemoveLast.Name = "buttonRemoveLast"; 243 | this.buttonRemoveLast.Size = new System.Drawing.Size(125, 23); 244 | this.buttonRemoveLast.TabIndex = 11; 245 | this.buttonRemoveLast.Text = "Remove Last Frame"; 246 | this.buttonRemoveLast.UseVisualStyleBackColor = true; 247 | this.buttonRemoveLast.Click += new System.EventHandler(this.buttonRemoveLast_Click); 248 | // 249 | // label1 250 | // 251 | this.label1.AutoSize = true; 252 | this.label1.Location = new System.Drawing.Point(298, 209); 253 | this.label1.Name = "label1"; 254 | this.label1.Size = new System.Drawing.Size(131, 52); 255 | this.label1.TabIndex = 14; 256 | this.label1.Text = "Animation only plays when\r\na folder attributed to\r\nEvent Plaza exists.\r\nRight cli" + 257 | "ck deletes a tile."; 258 | // 259 | // EventPlazaAnimationEditor 260 | // 261 | this.AcceptButton = this.buttonOK; 262 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 263 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 264 | this.CancelButton = this.buttonCancel; 265 | this.ClientSize = new System.Drawing.Size(442, 344); 266 | this.Controls.Add(this.label1); 267 | this.Controls.Add(this.groupBox2); 268 | this.Controls.Add(this.buttonOK); 269 | this.Controls.Add(this.buttonCancel); 270 | this.Controls.Add(this.groupBox1); 271 | this.Controls.Add(this.panel1); 272 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 273 | this.Name = "EventPlazaAnimationEditor"; 274 | this.Text = "Animation Editor"; 275 | this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.EventPlazaAnimationEditor_FormClosed); 276 | ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); 277 | this.panel1.ResumeLayout(false); 278 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileset)).EndInit(); 279 | this.groupBox1.ResumeLayout(false); 280 | this.groupBox1.PerformLayout(); 281 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).EndInit(); 282 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBuilding)).EndInit(); 283 | this.groupBox2.ResumeLayout(false); 284 | this.groupBox2.PerformLayout(); 285 | this.ResumeLayout(false); 286 | this.PerformLayout(); 287 | 288 | } 289 | 290 | #endregion 291 | 292 | private System.Windows.Forms.BindingSource bindingSource1; 293 | private System.Windows.Forms.Panel panel1; 294 | private System.Windows.Forms.PictureBox pictureBoxTileset; 295 | private System.Windows.Forms.GroupBox groupBox1; 296 | private System.Windows.Forms.Label labelFrame; 297 | private System.Windows.Forms.HScrollBar hScrollBar1; 298 | private System.Windows.Forms.PictureBox pictureBoxBuilding; 299 | private System.Windows.Forms.Button buttonCancel; 300 | private System.Windows.Forms.Button buttonOK; 301 | private System.Windows.Forms.GroupBox groupBox2; 302 | private System.Windows.Forms.Button buttonClear; 303 | private System.Windows.Forms.Button buttonDelete; 304 | private System.Windows.Forms.Button buttonInsert; 305 | private System.Windows.Forms.Button buttonAdd; 306 | private System.Windows.Forms.Button buttonRemoveLast; 307 | private System.Windows.Forms.CheckBox checkBoxHighlight; 308 | private System.Windows.Forms.Label label1; 309 | private System.Windows.Forms.NumericUpDown numericUpDownDuration; 310 | private System.Windows.Forms.Label label2; 311 | } 312 | } -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaAnimationEditor.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 SatellaWave 12 | { 13 | public partial class EventPlazaAnimationEditor : Form 14 | { 15 | static List frames; 16 | static int currentFrame; 17 | static Bitmap tileSet; 18 | static Bitmap tileMap; 19 | static ushort selectedTile; 20 | 21 | public EventPlazaAnimationEditor(Bitmap _tileSet, Bitmap _tileMap, List _frames) 22 | { 23 | InitializeComponent(); 24 | frames = new List(); 25 | frames.AddRange(_frames); 26 | 27 | if (frames.Count == 0) 28 | { 29 | frames.Add(new EventPlazaAnimationFrame()); 30 | } 31 | 32 | tileSet = _tileSet; 33 | tileMap = _tileMap; 34 | selectedTile = 0; 35 | currentFrame = 0; 36 | hScrollBar1.Maximum = frames.Count - 1; 37 | hScrollBar1.Value = currentFrame; 38 | 39 | UpdateTilesetImage(); 40 | UpdateTilemapImage(); 41 | UpdateFrameLabel(); 42 | } 43 | 44 | private void UpdateFrameLabel() 45 | { 46 | labelFrame.Text = "Frame " + (currentFrame + 1).ToString() + "/" + frames.Count.ToString(); 47 | numericUpDownDuration.Value = frames[currentFrame].duration; 48 | } 49 | 50 | private void UpdateTilesetImage() 51 | { 52 | Bitmap updateTileSet = new Bitmap(tileSet); 53 | 54 | using (Graphics g = Graphics.FromImage(updateTileSet)) 55 | { 56 | Brush brush = new SolidBrush(Color.FromArgb(150, 255, 0, 0)); 57 | g.FillRectangle(brush, (selectedTile % 8) * 16, (selectedTile / 8) * 16, 16, 16); 58 | } 59 | 60 | pictureBoxTileset.Image = updateTileSet; 61 | } 62 | 63 | private void UpdateTilemapImage() 64 | { 65 | Bitmap tilemapimage = DrawTileMap(); 66 | 67 | using (Graphics g = Graphics.FromImage(tilemapimage)) 68 | { 69 | Bitmap tilemapimagetemp = new Bitmap(tilemapimage); 70 | g.ScaleTransform(2f, 2f); 71 | g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; 72 | g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; 73 | g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; 74 | g.Clear(Color.Transparent); 75 | g.DrawImage(tilemapimagetemp, 0f, 0f); 76 | } 77 | 78 | pictureBoxBuilding.Image = tilemapimage; 79 | } 80 | 81 | private Bitmap DrawTileMap() 82 | { 83 | Bitmap tilemapimage = new Bitmap(32 * 4, 32 * 7); 84 | 85 | using (Graphics g = Graphics.FromImage(tilemapimage)) 86 | { 87 | g.DrawImageUnscaled(tileMap, 0, 0); 88 | 89 | //Draw previous to current frames 90 | for (int i = 0; i < currentFrame; i++) 91 | { 92 | foreach (EventPlazaAnimationTile tile in frames[i].tiles) 93 | { 94 | for (int yt = 0; yt < 16; yt++) 95 | { 96 | for (int xt = 0; xt < 16; xt++) 97 | { 98 | if (tile.bg1_tile < 0x400 && (tile.x >= 6 && tile.x <= 9) && (tile.y >= 0xD && tile.x <= 0x13)) 99 | { 100 | tilemapimage.SetPixel(((tile.x - 0x6) * 16) + xt, ((tile.y - 0xD) * 16) + yt, tileSet.GetPixel(((tile.bg1_tile % 8) * 16) + xt, ((tile.bg1_tile / 8) * 16) + yt)); 101 | } 102 | } 103 | } 104 | } 105 | } 106 | 107 | //Make it transparent 108 | for (int yt = 0; yt < 16 * 7; yt++) 109 | { 110 | for (int xt = 0; xt < 16 * 4; xt++) 111 | { 112 | Color temp = Color.FromArgb(100, tilemapimage.GetPixel(xt, yt).R, tilemapimage.GetPixel(xt, yt).G, tilemapimage.GetPixel(xt, yt).B); 113 | tilemapimage.SetPixel(xt, yt, temp); 114 | } 115 | } 116 | 117 | foreach (EventPlazaAnimationTile tile in frames[currentFrame].tiles) 118 | { 119 | for (int yt = 0; yt < 16; yt++) 120 | { 121 | for (int xt = 0; xt < 16; xt++) 122 | { 123 | if (tile.bg1_tile < 0x400 && (tile.x >= 6 && tile.x <= 9) && (tile.y >= 0xD && tile.x <= 0x13)) 124 | { 125 | tilemapimage.SetPixel(((tile.x - 0x6) * 16) + xt, ((tile.y - 0xD) * 16) + yt, tileSet.GetPixel(((tile.bg1_tile % 8) * 16) + xt, ((tile.bg1_tile / 8) * 16) + yt)); 126 | } 127 | } 128 | } 129 | 130 | if (checkBoxHighlight.Checked) 131 | { 132 | Brush brush = new SolidBrush(Color.FromArgb(100, 255, 0, 0)); 133 | g.FillRectangle(brush, (tile.x - 0x6) * 16, (tile.y - 0xD) * 16, 16, 16); 134 | } 135 | } 136 | } 137 | 138 | return tilemapimage; 139 | } 140 | 141 | private void pictureBoxTileset_Click(object sender, EventArgs e) 142 | { 143 | Point coordinates = ((MouseEventArgs)e).Location; 144 | selectedTile = (ushort)((coordinates.X / 16) + ((coordinates.Y / 16) * 8)); 145 | UpdateTilesetImage(); 146 | } 147 | 148 | private void pictureBoxBuilding_Click(object sender, EventArgs e) 149 | { 150 | if (((MouseEventArgs)e).Button != MouseButtons.None 151 | && ((MouseEventArgs)e).Location.X >= 0 && ((MouseEventArgs)e).Location.X < (32 * 4) 152 | && ((MouseEventArgs)e).Location.Y >= 0 && ((MouseEventArgs)e).Location.Y < (32 * 7)) 153 | { 154 | if (frames[currentFrame].tiles.Count > 0) 155 | { 156 | for (int i = 0; i < frames[currentFrame].tiles.Count; i++) 157 | { 158 | if ((frames[currentFrame].tiles[i].x - 0x6) == (((MouseEventArgs)e).Location.X / 32) 159 | && (frames[currentFrame].tiles[i].y - 0xD) == (((MouseEventArgs)e).Location.Y / 32)) 160 | { 161 | if (((MouseEventArgs)e).Button == MouseButtons.Left) 162 | { 163 | frames[currentFrame].tiles[i].bg1_tile = selectedTile; 164 | } 165 | else if (((MouseEventArgs)e).Button == MouseButtons.Right) 166 | { 167 | frames[currentFrame].tiles.RemoveAt(i); 168 | } 169 | UpdateTilemapImage(); 170 | return; 171 | } 172 | } 173 | } 174 | 175 | if (((MouseEventArgs)e).Button == MouseButtons.Left) 176 | { 177 | EventPlazaAnimationTile data = new EventPlazaAnimationTile((ushort)((((MouseEventArgs)e).Location.X / 32) + 0x6), (ushort)((((MouseEventArgs)e).Location.Y / 32) + 0xD), selectedTile); 178 | frames[currentFrame].tiles.Add(data); 179 | 180 | UpdateTilemapImage(); 181 | } 182 | } 183 | } 184 | 185 | private void checkBoxHighlight_CheckedChanged(object sender, EventArgs e) 186 | { 187 | UpdateTilemapImage(); 188 | } 189 | 190 | private void hScrollBar1_ValueChanged(object sender, EventArgs e) 191 | { 192 | currentFrame = hScrollBar1.Value; 193 | UpdateFrameLabel(); 194 | UpdateTilemapImage(); 195 | } 196 | 197 | private void numericUpDownDuration_ValueChanged(object sender, EventArgs e) 198 | { 199 | frames[currentFrame].duration = (ushort)numericUpDownDuration.Value; 200 | } 201 | 202 | private void buttonAdd_Click(object sender, EventArgs e) 203 | { 204 | frames.Add(new EventPlazaAnimationFrame()); 205 | currentFrame = frames.Count - 1; 206 | hScrollBar1.Maximum = frames.Count - 1; 207 | hScrollBar1.Value = currentFrame; 208 | UpdateFrameLabel(); 209 | UpdateTilemapImage(); 210 | } 211 | 212 | private void buttonInsert_Click(object sender, EventArgs e) 213 | { 214 | frames.Insert(currentFrame, new EventPlazaAnimationFrame()); 215 | hScrollBar1.Maximum = frames.Count - 1; 216 | hScrollBar1.Value = currentFrame; 217 | UpdateFrameLabel(); 218 | UpdateTilemapImage(); 219 | } 220 | 221 | private void buttonDelete_Click(object sender, EventArgs e) 222 | { 223 | if (frames.Count > 1) 224 | { 225 | frames.RemoveAt(currentFrame); 226 | } 227 | else 228 | { 229 | frames[currentFrame].tiles.Clear(); 230 | frames[currentFrame].duration = 1; 231 | } 232 | 233 | if (currentFrame >= frames.Count) 234 | { 235 | currentFrame = frames.Count - 1; 236 | } 237 | hScrollBar1.Maximum = frames.Count - 1; 238 | hScrollBar1.Value = currentFrame; 239 | UpdateFrameLabel(); 240 | UpdateTilemapImage(); 241 | } 242 | 243 | private void buttonRemoveLast_Click(object sender, EventArgs e) 244 | { 245 | if (frames.Count > 1) 246 | { 247 | frames.RemoveAt(frames.Count - 1); 248 | } 249 | else 250 | { 251 | frames[frames.Count - 1].tiles.Clear(); 252 | frames[frames.Count - 1].duration = 1; 253 | } 254 | 255 | if (currentFrame >= frames.Count) 256 | { 257 | currentFrame = frames.Count - 1; 258 | } 259 | hScrollBar1.Maximum = frames.Count - 1; 260 | hScrollBar1.Value = currentFrame; 261 | UpdateFrameLabel(); 262 | UpdateTilemapImage(); 263 | } 264 | 265 | private void buttonClear_Click(object sender, EventArgs e) 266 | { 267 | if (MessageBox.Show("Are you sure you want to clear the animation? You will not be able to restore it.", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) 268 | { 269 | frames.Clear(); 270 | frames.Add(new EventPlazaAnimationFrame()); 271 | 272 | currentFrame = 0; 273 | 274 | hScrollBar1.Maximum = frames.Count - 1; 275 | hScrollBar1.Value = currentFrame; 276 | 277 | UpdateTilemapImage(); 278 | UpdateFrameLabel(); 279 | } 280 | } 281 | 282 | public List GetFrameData() 283 | { 284 | return frames; 285 | } 286 | 287 | private void EventPlazaAnimationEditor_FormClosed(object sender, FormClosedEventArgs e) 288 | { 289 | //If there's only one frame, and there's no animation data, then clear it. 290 | if (frames.Count == 1) 291 | { 292 | if (frames[0].tiles.Count == 0) 293 | { 294 | frames.Clear(); 295 | } 296 | } 297 | } 298 | } 299 | } 300 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaAnimationEditor.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaCollisionEditor.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SatellaWave 2 | { 3 | partial class EventPlazaCollisionEditor 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.buttonCancel = new System.Windows.Forms.Button(); 32 | this.buttonOK = new System.Windows.Forms.Button(); 33 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 34 | this.checkBoxPriority = new System.Windows.Forms.CheckBox(); 35 | this.checkBoxDiagonal = new System.Windows.Forms.CheckBox(); 36 | this.pictureBoxTile = new System.Windows.Forms.PictureBox(); 37 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 38 | this.pictureBoxTileset = new System.Windows.Forms.PictureBox(); 39 | this.groupBox1.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTile)).BeginInit(); 41 | this.groupBox2.SuspendLayout(); 42 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileset)).BeginInit(); 43 | this.SuspendLayout(); 44 | // 45 | // buttonCancel 46 | // 47 | this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 48 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 49 | this.buttonCancel.Location = new System.Drawing.Point(277, 110); 50 | this.buttonCancel.Name = "buttonCancel"; 51 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 52 | this.buttonCancel.TabIndex = 0; 53 | this.buttonCancel.Text = "Cancel"; 54 | this.buttonCancel.UseVisualStyleBackColor = true; 55 | // 56 | // buttonOK 57 | // 58 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 59 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; 60 | this.buttonOK.Location = new System.Drawing.Point(196, 110); 61 | this.buttonOK.Name = "buttonOK"; 62 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 63 | this.buttonOK.TabIndex = 1; 64 | this.buttonOK.Text = "OK"; 65 | this.buttonOK.UseVisualStyleBackColor = true; 66 | // 67 | // groupBox1 68 | // 69 | this.groupBox1.Controls.Add(this.checkBoxPriority); 70 | this.groupBox1.Controls.Add(this.checkBoxDiagonal); 71 | this.groupBox1.Controls.Add(this.pictureBoxTile); 72 | this.groupBox1.Location = new System.Drawing.Point(173, 12); 73 | this.groupBox1.Name = "groupBox1"; 74 | this.groupBox1.Size = new System.Drawing.Size(184, 89); 75 | this.groupBox1.TabIndex = 2; 76 | this.groupBox1.TabStop = false; 77 | this.groupBox1.Text = "Collision Setup"; 78 | // 79 | // checkBoxPriority 80 | // 81 | this.checkBoxPriority.AutoSize = true; 82 | this.checkBoxPriority.Location = new System.Drawing.Point(76, 42); 83 | this.checkBoxPriority.Name = "checkBoxPriority"; 84 | this.checkBoxPriority.Size = new System.Drawing.Size(99, 17); 85 | this.checkBoxPriority.TabIndex = 2; 86 | this.checkBoxPriority.Text = "Over the Player"; 87 | this.checkBoxPriority.UseVisualStyleBackColor = true; 88 | this.checkBoxPriority.CheckedChanged += new System.EventHandler(this.checkBoxPriority_CheckedChanged); 89 | // 90 | // checkBoxDiagonal 91 | // 92 | this.checkBoxDiagonal.AutoSize = true; 93 | this.checkBoxDiagonal.Location = new System.Drawing.Point(76, 19); 94 | this.checkBoxDiagonal.Name = "checkBoxDiagonal"; 95 | this.checkBoxDiagonal.Size = new System.Drawing.Size(109, 17); 96 | this.checkBoxDiagonal.TabIndex = 1; 97 | this.checkBoxDiagonal.Text = "Diagonal Collision"; 98 | this.checkBoxDiagonal.UseVisualStyleBackColor = true; 99 | this.checkBoxDiagonal.CheckedChanged += new System.EventHandler(this.checkBoxDiagonal_CheckedChanged); 100 | // 101 | // pictureBoxTile 102 | // 103 | this.pictureBoxTile.BackColor = System.Drawing.Color.DimGray; 104 | this.pictureBoxTile.Location = new System.Drawing.Point(6, 19); 105 | this.pictureBoxTile.Name = "pictureBoxTile"; 106 | this.pictureBoxTile.Size = new System.Drawing.Size(64, 64); 107 | this.pictureBoxTile.TabIndex = 0; 108 | this.pictureBoxTile.TabStop = false; 109 | this.pictureBoxTile.Click += new System.EventHandler(this.pictureBoxTile_Click); 110 | // 111 | // groupBox2 112 | // 113 | this.groupBox2.Controls.Add(this.pictureBoxTileset); 114 | this.groupBox2.Location = new System.Drawing.Point(12, 12); 115 | this.groupBox2.Name = "groupBox2"; 116 | this.groupBox2.Size = new System.Drawing.Size(140, 121); 117 | this.groupBox2.TabIndex = 3; 118 | this.groupBox2.TabStop = false; 119 | this.groupBox2.Text = "Select Tile"; 120 | // 121 | // pictureBoxTileset 122 | // 123 | this.pictureBoxTileset.BackColor = System.Drawing.Color.DimGray; 124 | this.pictureBoxTileset.Location = new System.Drawing.Point(6, 19); 125 | this.pictureBoxTileset.Name = "pictureBoxTileset"; 126 | this.pictureBoxTileset.Size = new System.Drawing.Size(128, 96); 127 | this.pictureBoxTileset.TabIndex = 0; 128 | this.pictureBoxTileset.TabStop = false; 129 | this.pictureBoxTileset.Click += new System.EventHandler(this.pictureBoxTileset_Click); 130 | // 131 | // EventPlazaCollisionEditor 132 | // 133 | this.AcceptButton = this.buttonOK; 134 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 135 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 136 | this.CancelButton = this.buttonCancel; 137 | this.ClientSize = new System.Drawing.Size(364, 145); 138 | this.Controls.Add(this.groupBox2); 139 | this.Controls.Add(this.groupBox1); 140 | this.Controls.Add(this.buttonOK); 141 | this.Controls.Add(this.buttonCancel); 142 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 143 | this.Name = "EventPlazaCollisionEditor"; 144 | this.Text = "Collision Editor"; 145 | this.groupBox1.ResumeLayout(false); 146 | this.groupBox1.PerformLayout(); 147 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTile)).EndInit(); 148 | this.groupBox2.ResumeLayout(false); 149 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileset)).EndInit(); 150 | this.ResumeLayout(false); 151 | 152 | } 153 | 154 | #endregion 155 | 156 | private System.Windows.Forms.Button buttonCancel; 157 | private System.Windows.Forms.Button buttonOK; 158 | private System.Windows.Forms.GroupBox groupBox1; 159 | private System.Windows.Forms.CheckBox checkBoxPriority; 160 | private System.Windows.Forms.CheckBox checkBoxDiagonal; 161 | private System.Windows.Forms.PictureBox pictureBoxTile; 162 | private System.Windows.Forms.GroupBox groupBox2; 163 | private System.Windows.Forms.PictureBox pictureBoxTileset; 164 | } 165 | } -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaCollisionEditor.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 SatellaWave 12 | { 13 | public partial class EventPlazaCollisionEditor : Form 14 | { 15 | static Bitmap tileset; 16 | static byte[] collision; 17 | static ushort selectedTile; 18 | 19 | public EventPlazaCollisionEditor(Bitmap _set, byte[] _col) 20 | { 21 | InitializeComponent(); 22 | 23 | tileset = _set; 24 | 25 | collision = new byte[_col.Length]; 26 | _col.CopyTo(collision, 0); 27 | 28 | selectedTile = 0; 29 | 30 | UpdateTilesetImage(); 31 | UpdateTileImage(); 32 | 33 | checkBoxDiagonal.Checked = (collision[selectedTile] & 0x10) != 0; 34 | checkBoxPriority.Checked = (collision[selectedTile] & 0x20) != 0; 35 | } 36 | 37 | private void UpdateTilesetImage() 38 | { 39 | Bitmap update = new Bitmap(tileset); 40 | using (Graphics g = Graphics.FromImage(update)) 41 | { 42 | Brush brush = new SolidBrush(Color.FromArgb(150, 255, 0, 0)); 43 | g.FillRectangle(brush, (selectedTile % 8) * 16, (selectedTile / 8) * 16, 16, 16); 44 | } 45 | 46 | pictureBoxTileset.Image = update; 47 | } 48 | 49 | private void UpdateTileImage() 50 | { 51 | Bitmap tile = new Bitmap(16, 16); 52 | 53 | //Copy Tile Data 54 | for (int y = 0; y < 16; y++) 55 | { 56 | for (int x = 0; x < 16; x++) 57 | { 58 | tile.SetPixel(x, y, tileset.GetPixel(((selectedTile % 8) * 16) + x, ((selectedTile / 8) * 16) + y)); 59 | } 60 | } 61 | 62 | using (Graphics g = Graphics.FromImage(tile)) 63 | { 64 | 65 | if ((collision[selectedTile] & 0x10) != 0) 66 | { 67 | //Diagonal Collision 68 | Brush brush = new SolidBrush(Color.FromArgb(170, 255, 255, 100)); 69 | g.DrawLine(new Pen(brush), 11, 0, 4, 15); 70 | } 71 | else 72 | { 73 | Brush brush = new SolidBrush(Color.FromArgb(170, 255, 0, 100)); 74 | if ((collision[selectedTile] & 0x01) != 0) 75 | { 76 | //Top Left 77 | g.FillRectangle(brush, 0, 0, 8, 8); 78 | } 79 | if ((collision[selectedTile] & 0x02) != 0) 80 | { 81 | //Bottom Left 82 | g.FillRectangle(brush, 0, 8, 8, 8); 83 | } 84 | if ((collision[selectedTile] & 0x04) != 0) 85 | { 86 | //Top Right 87 | g.FillRectangle(brush, 8, 0, 8, 8); 88 | } 89 | if ((collision[selectedTile] & 0x08) != 0) 90 | { 91 | //Bottom Right 92 | g.FillRectangle(brush, 8, 8, 8, 8); 93 | } 94 | } 95 | } 96 | 97 | Bitmap tileUpdate = new Bitmap(64, 64); 98 | 99 | using (Graphics g = Graphics.FromImage(tileUpdate)) 100 | { 101 | g.ScaleTransform(4f, 4f); 102 | g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; 103 | g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; 104 | g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; 105 | g.Clear(Color.Transparent); 106 | g.DrawImage(tile, 0f, 0f); 107 | 108 | if ((collision[selectedTile] & 0x10) == 0) 109 | { 110 | //Diagonal Collision 111 | g.ScaleTransform(0.25f, 0.25f); 112 | g.DrawLine(new Pen(Brushes.White), 32, 0, 32, 64); 113 | g.DrawLine(new Pen(Brushes.White), 0, 32, 64, 32); 114 | } 115 | } 116 | 117 | pictureBoxTile.Image = tileUpdate; 118 | } 119 | 120 | private void pictureBoxTileset_Click(object sender, EventArgs e) 121 | { 122 | //Select Tile 123 | Point coordinates = ((MouseEventArgs)e).Location; 124 | selectedTile = (ushort)((coordinates.X / 16) + ((coordinates.Y / 16) * 8)); 125 | 126 | checkBoxDiagonal.Checked = (collision[selectedTile] & 0x10) != 0; 127 | checkBoxPriority.Checked = (collision[selectedTile] & 0x20) != 0; 128 | 129 | UpdateTilesetImage(); 130 | UpdateTileImage(); 131 | } 132 | 133 | private void pictureBoxTile_Click(object sender, EventArgs e) 134 | { 135 | //Set Collision 136 | Point coordinates = ((MouseEventArgs)e).Location; 137 | int coltemp = ((coordinates.Y / 32) + ((coordinates.X / 32) * 2)); 138 | collision[selectedTile] ^= (byte)(1 << coltemp); 139 | 140 | UpdateTileImage(); 141 | } 142 | 143 | private void checkBoxDiagonal_CheckedChanged(object sender, EventArgs e) 144 | { 145 | collision[selectedTile] &= 0x2F; 146 | collision[selectedTile] |= (byte)(Convert.ToByte(checkBoxDiagonal.Checked) * 0x10); 147 | UpdateTileImage(); 148 | } 149 | 150 | private void checkBoxPriority_CheckedChanged(object sender, EventArgs e) 151 | { 152 | collision[selectedTile] &= 0x1F; 153 | collision[selectedTile] |= (byte)(Convert.ToByte(checkBoxPriority.Checked) * 0x20); 154 | } 155 | 156 | public byte[] GetCollisions() 157 | { 158 | for (int i = 0; i < collision.Length; i++) 159 | { 160 | if ((collision[i] & 0x10) != 0) 161 | collision[i] &= 0x30; 162 | } 163 | 164 | return collision; 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaCollisionEditor.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaEasyGraphicsImport.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SatellaWave 2 | { 3 | partial class EventPlazaEasyGraphicsImport 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.buttonOK = new System.Windows.Forms.Button(); 32 | this.buttonCancel = new System.Windows.Forms.Button(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.textBoxPAL = new System.Windows.Forms.TextBox(); 36 | this.buttonBrowsePAL = new System.Windows.Forms.Button(); 37 | this.textBoxGFX = new System.Windows.Forms.TextBox(); 38 | this.buttonBrowseGFX = new System.Windows.Forms.Button(); 39 | this.label3 = new System.Windows.Forms.Label(); 40 | this.buttonBrowseMAP = new System.Windows.Forms.Button(); 41 | this.textBoxMAP = new System.Windows.Forms.TextBox(); 42 | this.label4 = new System.Windows.Forms.Label(); 43 | this.SuspendLayout(); 44 | // 45 | // buttonOK 46 | // 47 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 48 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; 49 | this.buttonOK.Location = new System.Drawing.Point(208, 193); 50 | this.buttonOK.Name = "buttonOK"; 51 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 52 | this.buttonOK.TabIndex = 0; 53 | this.buttonOK.Text = "OK"; 54 | this.buttonOK.UseVisualStyleBackColor = true; 55 | // 56 | // buttonCancel 57 | // 58 | this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 59 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 60 | this.buttonCancel.Location = new System.Drawing.Point(289, 193); 61 | this.buttonCancel.Name = "buttonCancel"; 62 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 63 | this.buttonCancel.TabIndex = 1; 64 | this.buttonCancel.Text = "Cancel"; 65 | this.buttonCancel.UseVisualStyleBackColor = true; 66 | // 67 | // label1 68 | // 69 | this.label1.AutoSize = true; 70 | this.label1.Location = new System.Drawing.Point(12, 42); 71 | this.label1.Name = "label1"; 72 | this.label1.Size = new System.Drawing.Size(84, 13); 73 | this.label1.TabIndex = 2; 74 | this.label1.Text = "16-color Palette:"; 75 | // 76 | // label2 77 | // 78 | this.label2.AutoSize = true; 79 | this.label2.Location = new System.Drawing.Point(12, 91); 80 | this.label2.Name = "label2"; 81 | this.label2.Size = new System.Drawing.Size(118, 13); 82 | this.label2.TabIndex = 3; 83 | this.label2.Text = "8x8 Tile Graphics Data:"; 84 | // 85 | // textBoxPAL 86 | // 87 | this.textBoxPAL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 88 | | System.Windows.Forms.AnchorStyles.Right))); 89 | this.textBoxPAL.Location = new System.Drawing.Point(15, 58); 90 | this.textBoxPAL.Name = "textBoxPAL"; 91 | this.textBoxPAL.Size = new System.Drawing.Size(268, 20); 92 | this.textBoxPAL.TabIndex = 4; 93 | // 94 | // buttonBrowsePAL 95 | // 96 | this.buttonBrowsePAL.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 97 | this.buttonBrowsePAL.Location = new System.Drawing.Point(289, 56); 98 | this.buttonBrowsePAL.Name = "buttonBrowsePAL"; 99 | this.buttonBrowsePAL.Size = new System.Drawing.Size(75, 23); 100 | this.buttonBrowsePAL.TabIndex = 5; 101 | this.buttonBrowsePAL.Text = "Browse..."; 102 | this.buttonBrowsePAL.UseVisualStyleBackColor = true; 103 | this.buttonBrowsePAL.Click += new System.EventHandler(this.buttonBrowsePAL_Click); 104 | // 105 | // textBoxGFX 106 | // 107 | this.textBoxGFX.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 108 | | System.Windows.Forms.AnchorStyles.Right))); 109 | this.textBoxGFX.Location = new System.Drawing.Point(15, 107); 110 | this.textBoxGFX.Name = "textBoxGFX"; 111 | this.textBoxGFX.Size = new System.Drawing.Size(268, 20); 112 | this.textBoxGFX.TabIndex = 6; 113 | // 114 | // buttonBrowseGFX 115 | // 116 | this.buttonBrowseGFX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 117 | this.buttonBrowseGFX.Location = new System.Drawing.Point(289, 105); 118 | this.buttonBrowseGFX.Name = "buttonBrowseGFX"; 119 | this.buttonBrowseGFX.Size = new System.Drawing.Size(75, 23); 120 | this.buttonBrowseGFX.TabIndex = 7; 121 | this.buttonBrowseGFX.Text = "Browse..."; 122 | this.buttonBrowseGFX.UseVisualStyleBackColor = true; 123 | this.buttonBrowseGFX.Click += new System.EventHandler(this.buttonBrowseGFX_Click); 124 | // 125 | // label3 126 | // 127 | this.label3.AutoSize = true; 128 | this.label3.Location = new System.Drawing.Point(12, 140); 129 | this.label3.Name = "label3"; 130 | this.label3.Size = new System.Drawing.Size(343, 13); 131 | this.label3.TabIndex = 8; 132 | this.label3.Text = "8x8 SuperFamiconv Building Tile Map (original picture must be 64x112):"; 133 | // 134 | // buttonBrowseMAP 135 | // 136 | this.buttonBrowseMAP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 137 | this.buttonBrowseMAP.Location = new System.Drawing.Point(289, 154); 138 | this.buttonBrowseMAP.Name = "buttonBrowseMAP"; 139 | this.buttonBrowseMAP.Size = new System.Drawing.Size(75, 23); 140 | this.buttonBrowseMAP.TabIndex = 9; 141 | this.buttonBrowseMAP.Text = "Browse..."; 142 | this.buttonBrowseMAP.UseVisualStyleBackColor = true; 143 | this.buttonBrowseMAP.Click += new System.EventHandler(this.buttonBrowseMAP_Click); 144 | // 145 | // textBoxMAP 146 | // 147 | this.textBoxMAP.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 148 | | System.Windows.Forms.AnchorStyles.Right))); 149 | this.textBoxMAP.Location = new System.Drawing.Point(15, 156); 150 | this.textBoxMAP.Name = "textBoxMAP"; 151 | this.textBoxMAP.Size = new System.Drawing.Size(268, 20); 152 | this.textBoxMAP.TabIndex = 10; 153 | // 154 | // label4 155 | // 156 | this.label4.AutoSize = true; 157 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 158 | this.label4.Location = new System.Drawing.Point(82, 9); 159 | this.label4.Name = "label4"; 160 | this.label4.Size = new System.Drawing.Size(224, 26); 161 | this.label4.TabIndex = 11; 162 | this.label4.Text = "You can just import your palette / tiles\r\nand make your tileset manually."; 163 | this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; 164 | // 165 | // EventPlazaEasyGraphicsImport 166 | // 167 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 168 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 169 | this.ClientSize = new System.Drawing.Size(376, 228); 170 | this.Controls.Add(this.label4); 171 | this.Controls.Add(this.textBoxMAP); 172 | this.Controls.Add(this.buttonBrowseMAP); 173 | this.Controls.Add(this.label3); 174 | this.Controls.Add(this.buttonBrowseGFX); 175 | this.Controls.Add(this.textBoxGFX); 176 | this.Controls.Add(this.buttonBrowsePAL); 177 | this.Controls.Add(this.textBoxPAL); 178 | this.Controls.Add(this.label2); 179 | this.Controls.Add(this.label1); 180 | this.Controls.Add(this.buttonCancel); 181 | this.Controls.Add(this.buttonOK); 182 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 183 | this.Name = "EventPlazaEasyGraphicsImport"; 184 | this.Text = "Easy Import SuperFamiconv Graphics..."; 185 | this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.EventPlazaEasyGraphicsImport_FormClosed); 186 | this.ResumeLayout(false); 187 | this.PerformLayout(); 188 | 189 | } 190 | 191 | #endregion 192 | 193 | private System.Windows.Forms.Button buttonOK; 194 | private System.Windows.Forms.Button buttonCancel; 195 | private System.Windows.Forms.Label label1; 196 | private System.Windows.Forms.Label label2; 197 | private System.Windows.Forms.TextBox textBoxPAL; 198 | private System.Windows.Forms.Button buttonBrowsePAL; 199 | private System.Windows.Forms.TextBox textBoxGFX; 200 | private System.Windows.Forms.Button buttonBrowseGFX; 201 | private System.Windows.Forms.Label label3; 202 | private System.Windows.Forms.Button buttonBrowseMAP; 203 | private System.Windows.Forms.TextBox textBoxMAP; 204 | private System.Windows.Forms.Label label4; 205 | } 206 | } -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaEasyGraphicsImport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace SatellaWave 13 | { 14 | public partial class EventPlazaEasyGraphicsImport : Form 15 | { 16 | Color[] PALdata; 17 | byte[] TILEdata; 18 | ushort[] TILESETdata; 19 | 20 | public bool isPaletteDataImported; 21 | public bool isTileDataImported; 22 | public bool isTilesetDataImported; 23 | 24 | public EventPlazaEasyGraphicsImport() 25 | { 26 | InitializeComponent(); 27 | isPaletteDataImported = false; 28 | isTileDataImported = false; 29 | isTilesetDataImported = false; 30 | } 31 | 32 | private void buttonBrowsePAL_Click(object sender, EventArgs e) 33 | { 34 | OpenFileDialog ofd = new OpenFileDialog(); 35 | ofd.Filter = "All files (*.*)|*.*"; 36 | ofd.Multiselect = false; 37 | ofd.Title = "Open Binary Palette File..."; 38 | 39 | if (ofd.ShowDialog() == DialogResult.OK) 40 | { 41 | textBoxPAL.Text = ofd.FileName; 42 | } 43 | } 44 | 45 | private void buttonBrowseGFX_Click(object sender, EventArgs e) 46 | { 47 | OpenFileDialog ofd = new OpenFileDialog(); 48 | ofd.Filter = "All files (*.*)|*.*"; 49 | ofd.Multiselect = false; 50 | ofd.Title = "Open Binary Tile Graphics File..."; 51 | 52 | if (ofd.ShowDialog() == DialogResult.OK) 53 | { 54 | textBoxGFX.Text = ofd.FileName; 55 | } 56 | } 57 | 58 | private void buttonBrowseMAP_Click(object sender, EventArgs e) 59 | { 60 | OpenFileDialog ofd = new OpenFileDialog(); 61 | ofd.Filter = "All files (*.*)|*.*"; 62 | ofd.Multiselect = false; 63 | ofd.Title = "Open Binary Tile Map File..."; 64 | 65 | if (ofd.ShowDialog() == DialogResult.OK) 66 | { 67 | textBoxMAP.Text = ofd.FileName; 68 | } 69 | } 70 | 71 | private void LoadPaletteData() 72 | { 73 | if (!File.Exists(textBoxPAL.Text)) 74 | { 75 | isPaletteDataImported = false; 76 | return; 77 | } 78 | 79 | Stream file = new FileStream(textBoxPAL.Text, FileMode.Open); 80 | BinaryReader binaryReader = new BinaryReader(file); 81 | 82 | if (file.Length < 0x20) 83 | { 84 | if (MessageBox.Show("Palette Data is too small. Cancelling import.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) == DialogResult.OK) 85 | { 86 | isPaletteDataImported = false; 87 | binaryReader.Close(); 88 | file.Close(); 89 | return; 90 | } 91 | } 92 | 93 | PALdata = new Color[16]; 94 | for (int j = 0; j < PALdata.Length; j++) 95 | { 96 | ushort colordata = binaryReader.ReadUInt16(); 97 | int r = (int)((float)((colordata & 0x1F) / 31.0f) * 255); 98 | int g = (int)((float)(((colordata >> 5) & 0x1F) / 31.0f) * 255); 99 | int b = (int)((float)(((colordata >> 10) & 0x1F) / 31.0f) * 255); 100 | 101 | if (j != 0) 102 | PALdata[j] = Color.FromArgb(r, g, b); 103 | else 104 | PALdata[j] = Color.FromArgb(0, r, g, b); 105 | } 106 | 107 | binaryReader.Close(); 108 | file.Close(); 109 | 110 | isPaletteDataImported = true; 111 | } 112 | 113 | private void LoadTileData() 114 | { 115 | if (!File.Exists(textBoxGFX.Text)) 116 | { 117 | isTileDataImported = false; 118 | return; 119 | } 120 | 121 | Stream file = new FileStream(textBoxGFX.Text, FileMode.Open); 122 | 123 | if (file.Length > 0xE00) 124 | { 125 | if (MessageBox.Show("Tile Data is too big (more than 0xE00 bytes) to fit dedicated VRAM, do you want to continue? It will not copy the rest of the data.", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.Cancel) 126 | { 127 | isTileDataImported = false; 128 | file.Close(); 129 | return; 130 | } 131 | } 132 | 133 | TILEdata = new byte[Math.Min(file.Length, 0xE00)]; 134 | file.Read(TILEdata, 0, (int)Math.Min(file.Length, 0xE00)); 135 | 136 | file.Close(); 137 | isTileDataImported = true; 138 | } 139 | 140 | private void LoadTileSetData() 141 | { 142 | if (!File.Exists(textBoxMAP.Text)) 143 | { 144 | isTilesetDataImported = false; 145 | return; 146 | } 147 | 148 | Stream file = new FileStream(textBoxMAP.Text, FileMode.Open); 149 | BinaryReader binaryReader = new BinaryReader(file); 150 | 151 | if ((file.Length != 224)) 152 | { 153 | MessageBox.Show("Tile Map Data size is not 224 bytes. Cancelling import.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 154 | binaryReader.Close(); 155 | file.Close(); 156 | isTilesetDataImported = false; 157 | return; 158 | } 159 | 160 | List MAPtemp = new List(); 161 | 162 | //Load TileSet in order 163 | for (int i = 0; i < (4 * 7); i++) 164 | { 165 | file.Seek(((i / 4) * 32) + (((i % 4) * 4)), SeekOrigin.Begin); 166 | MAPtemp.Add(binaryReader.ReadUInt16()); 167 | file.Seek(((i / 4) * 32) + (((i % 4) * 4) + 16), SeekOrigin.Begin); 168 | MAPtemp.Add(binaryReader.ReadUInt16()); 169 | file.Seek(((i / 4) * 32) + (((i % 4) * 4) + 2), SeekOrigin.Begin); 170 | MAPtemp.Add(binaryReader.ReadUInt16()); 171 | file.Seek(((i / 4) * 32) + (((i % 4) * 4) + 16 + 2), SeekOrigin.Begin); 172 | MAPtemp.Add(binaryReader.ReadUInt16()); 173 | } 174 | 175 | //Adapt data for BS-X VRAM 176 | for (int i = 0; i < MAPtemp.Count; i++) 177 | { 178 | MAPtemp[i] = (ushort)((MAPtemp[i] + 0x390) | 0x3400); 179 | //First Custom Tile ID is 0x390, select Custom Palette (Palette 5), BG Priority 180 | } 181 | 182 | TILESETdata = MAPtemp.ToArray(); 183 | 184 | binaryReader.Close(); 185 | file.Close(); 186 | 187 | isTilesetDataImported = true; 188 | } 189 | 190 | private void EventPlazaEasyGraphicsImport_FormClosed(object sender, FormClosedEventArgs e) 191 | { 192 | if (DialogResult == DialogResult.OK) 193 | { 194 | LoadPaletteData(); 195 | LoadTileData(); 196 | LoadTileSetData(); 197 | } 198 | } 199 | 200 | public Color[] GetCustomPalette() 201 | { 202 | return PALdata; 203 | } 204 | 205 | public byte[] GetCustomTiles() 206 | { 207 | return TILEdata; 208 | } 209 | 210 | public ushort[] GetCustomTileSet() 211 | { 212 | return TILESETdata; 213 | } 214 | 215 | public ushort[] GetCustomTileMap() 216 | { 217 | ushort[] temp = new ushort[4 * 7]; 218 | for (int i = 0; i < temp.Length; i++) 219 | { 220 | temp[i] = (ushort)(0x03D0 + i); 221 | } 222 | return temp; 223 | } 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaEasyGraphicsImport.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaEditor.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaTilesetEditor.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SatellaWave 2 | { 3 | partial class EventPlazaTilesetEditor 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.pictureBoxTileData = new System.Windows.Forms.PictureBox(); 32 | this.panelTiles = new System.Windows.Forms.Panel(); 33 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 34 | this.pictureBoxTileEditor = new System.Windows.Forms.PictureBox(); 35 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 36 | this.checkBoxFlipX = new System.Windows.Forms.CheckBox(); 37 | this.checkBoxFlipY = new System.Windows.Forms.CheckBox(); 38 | this.buttonCancel = new System.Windows.Forms.Button(); 39 | this.buttonSave = new System.Windows.Forms.Button(); 40 | this.pictureBoxTilesetSelect = new System.Windows.Forms.PictureBox(); 41 | this.numericUpDownPAL = new System.Windows.Forms.NumericUpDown(); 42 | this.label1 = new System.Windows.Forms.Label(); 43 | this.groupBox3 = new System.Windows.Forms.GroupBox(); 44 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileData)).BeginInit(); 45 | this.panelTiles.SuspendLayout(); 46 | this.groupBox1.SuspendLayout(); 47 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileEditor)).BeginInit(); 48 | this.groupBox2.SuspendLayout(); 49 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTilesetSelect)).BeginInit(); 50 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPAL)).BeginInit(); 51 | this.groupBox3.SuspendLayout(); 52 | this.SuspendLayout(); 53 | // 54 | // pictureBoxTileData 55 | // 56 | this.pictureBoxTileData.BackColor = System.Drawing.Color.DimGray; 57 | this.pictureBoxTileData.Location = new System.Drawing.Point(0, 0); 58 | this.pictureBoxTileData.Name = "pictureBoxTileData"; 59 | this.pictureBoxTileData.Size = new System.Drawing.Size(128, 2048); 60 | this.pictureBoxTileData.TabIndex = 0; 61 | this.pictureBoxTileData.TabStop = false; 62 | this.pictureBoxTileData.Click += new System.EventHandler(this.pictureBoxTileData_Click); 63 | // 64 | // panelTiles 65 | // 66 | this.panelTiles.AutoScroll = true; 67 | this.panelTiles.Controls.Add(this.pictureBoxTileData); 68 | this.panelTiles.Dock = System.Windows.Forms.DockStyle.Left; 69 | this.panelTiles.Location = new System.Drawing.Point(0, 0); 70 | this.panelTiles.Name = "panelTiles"; 71 | this.panelTiles.Size = new System.Drawing.Size(145, 298); 72 | this.panelTiles.TabIndex = 1; 73 | // 74 | // groupBox1 75 | // 76 | this.groupBox1.Controls.Add(this.pictureBoxTileEditor); 77 | this.groupBox1.Location = new System.Drawing.Point(151, 129); 78 | this.groupBox1.Name = "groupBox1"; 79 | this.groupBox1.Size = new System.Drawing.Size(76, 89); 80 | this.groupBox1.TabIndex = 2; 81 | this.groupBox1.TabStop = false; 82 | this.groupBox1.Text = "Tile Setup"; 83 | // 84 | // pictureBoxTileEditor 85 | // 86 | this.pictureBoxTileEditor.BackColor = System.Drawing.Color.DimGray; 87 | this.pictureBoxTileEditor.Location = new System.Drawing.Point(6, 19); 88 | this.pictureBoxTileEditor.Name = "pictureBoxTileEditor"; 89 | this.pictureBoxTileEditor.Size = new System.Drawing.Size(64, 64); 90 | this.pictureBoxTileEditor.TabIndex = 0; 91 | this.pictureBoxTileEditor.TabStop = false; 92 | this.pictureBoxTileEditor.Click += new System.EventHandler(this.pictureBoxTileEditor_Click); 93 | // 94 | // groupBox2 95 | // 96 | this.groupBox2.Controls.Add(this.pictureBoxTilesetSelect); 97 | this.groupBox2.Location = new System.Drawing.Point(151, 5); 98 | this.groupBox2.Name = "groupBox2"; 99 | this.groupBox2.Size = new System.Drawing.Size(172, 118); 100 | this.groupBox2.TabIndex = 3; 101 | this.groupBox2.TabStop = false; 102 | this.groupBox2.Text = "Select 16x16 Tile"; 103 | // 104 | // checkBoxFlipX 105 | // 106 | this.checkBoxFlipX.AutoSize = true; 107 | this.checkBoxFlipX.Location = new System.Drawing.Point(11, 45); 108 | this.checkBoxFlipX.Name = "checkBoxFlipX"; 109 | this.checkBoxFlipX.Size = new System.Drawing.Size(52, 17); 110 | this.checkBoxFlipX.TabIndex = 1; 111 | this.checkBoxFlipX.Text = "Flip X"; 112 | this.checkBoxFlipX.UseVisualStyleBackColor = true; 113 | this.checkBoxFlipX.CheckedChanged += new System.EventHandler(this.checkBoxFlipX_CheckedChanged); 114 | // 115 | // checkBoxFlipY 116 | // 117 | this.checkBoxFlipY.AutoSize = true; 118 | this.checkBoxFlipY.Location = new System.Drawing.Point(11, 68); 119 | this.checkBoxFlipY.Name = "checkBoxFlipY"; 120 | this.checkBoxFlipY.Size = new System.Drawing.Size(52, 17); 121 | this.checkBoxFlipY.TabIndex = 2; 122 | this.checkBoxFlipY.Text = "Flip Y"; 123 | this.checkBoxFlipY.UseVisualStyleBackColor = true; 124 | this.checkBoxFlipY.CheckedChanged += new System.EventHandler(this.checkBoxFlipY_CheckedChanged); 125 | // 126 | // buttonCancel 127 | // 128 | this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 129 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 130 | this.buttonCancel.Location = new System.Drawing.Point(249, 263); 131 | this.buttonCancel.Name = "buttonCancel"; 132 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 133 | this.buttonCancel.TabIndex = 4; 134 | this.buttonCancel.Text = "Cancel"; 135 | this.buttonCancel.UseVisualStyleBackColor = true; 136 | // 137 | // buttonSave 138 | // 139 | this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 140 | this.buttonSave.DialogResult = System.Windows.Forms.DialogResult.OK; 141 | this.buttonSave.Location = new System.Drawing.Point(249, 234); 142 | this.buttonSave.Name = "buttonSave"; 143 | this.buttonSave.Size = new System.Drawing.Size(75, 23); 144 | this.buttonSave.TabIndex = 5; 145 | this.buttonSave.Text = "Save"; 146 | this.buttonSave.UseVisualStyleBackColor = true; 147 | this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); 148 | // 149 | // pictureBoxTilesetSelect 150 | // 151 | this.pictureBoxTilesetSelect.BackColor = System.Drawing.Color.DimGray; 152 | this.pictureBoxTilesetSelect.Location = new System.Drawing.Point(22, 16); 153 | this.pictureBoxTilesetSelect.Name = "pictureBoxTilesetSelect"; 154 | this.pictureBoxTilesetSelect.Size = new System.Drawing.Size(128, 96); 155 | this.pictureBoxTilesetSelect.TabIndex = 0; 156 | this.pictureBoxTilesetSelect.TabStop = false; 157 | this.pictureBoxTilesetSelect.Click += new System.EventHandler(this.pictureBoxTilesetSelect_Click); 158 | // 159 | // numericUpDownPAL 160 | // 161 | this.numericUpDownPAL.Location = new System.Drawing.Point(53, 19); 162 | this.numericUpDownPAL.Maximum = new decimal(new int[] { 163 | 7, 164 | 0, 165 | 0, 166 | 0}); 167 | this.numericUpDownPAL.Name = "numericUpDownPAL"; 168 | this.numericUpDownPAL.Size = new System.Drawing.Size(30, 20); 169 | this.numericUpDownPAL.TabIndex = 3; 170 | this.numericUpDownPAL.ValueChanged += new System.EventHandler(this.numericUpDownPAL_ValueChanged); 171 | // 172 | // label1 173 | // 174 | this.label1.AutoSize = true; 175 | this.label1.Location = new System.Drawing.Point(7, 21); 176 | this.label1.Name = "label1"; 177 | this.label1.Size = new System.Drawing.Size(43, 13); 178 | this.label1.TabIndex = 4; 179 | this.label1.Text = "Palette:"; 180 | // 181 | // groupBox3 182 | // 183 | this.groupBox3.Controls.Add(this.numericUpDownPAL); 184 | this.groupBox3.Controls.Add(this.label1); 185 | this.groupBox3.Controls.Add(this.checkBoxFlipX); 186 | this.groupBox3.Controls.Add(this.checkBoxFlipY); 187 | this.groupBox3.Location = new System.Drawing.Point(233, 129); 188 | this.groupBox3.Name = "groupBox3"; 189 | this.groupBox3.Size = new System.Drawing.Size(90, 89); 190 | this.groupBox3.TabIndex = 6; 191 | this.groupBox3.TabStop = false; 192 | this.groupBox3.Text = "Tile Setting"; 193 | // 194 | // EventPlazaTilesetEditor 195 | // 196 | this.AcceptButton = this.buttonSave; 197 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 198 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 199 | this.CancelButton = this.buttonCancel; 200 | this.ClientSize = new System.Drawing.Size(336, 298); 201 | this.Controls.Add(this.groupBox3); 202 | this.Controls.Add(this.buttonSave); 203 | this.Controls.Add(this.buttonCancel); 204 | this.Controls.Add(this.groupBox2); 205 | this.Controls.Add(this.groupBox1); 206 | this.Controls.Add(this.panelTiles); 207 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; 208 | this.Name = "EventPlazaTilesetEditor"; 209 | this.Text = "Tileset Editor"; 210 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileData)).EndInit(); 211 | this.panelTiles.ResumeLayout(false); 212 | this.groupBox1.ResumeLayout(false); 213 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTileEditor)).EndInit(); 214 | this.groupBox2.ResumeLayout(false); 215 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTilesetSelect)).EndInit(); 216 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPAL)).EndInit(); 217 | this.groupBox3.ResumeLayout(false); 218 | this.groupBox3.PerformLayout(); 219 | this.ResumeLayout(false); 220 | 221 | } 222 | 223 | #endregion 224 | 225 | private System.Windows.Forms.PictureBox pictureBoxTileData; 226 | private System.Windows.Forms.Panel panelTiles; 227 | private System.Windows.Forms.GroupBox groupBox1; 228 | private System.Windows.Forms.PictureBox pictureBoxTileEditor; 229 | private System.Windows.Forms.CheckBox checkBoxFlipY; 230 | private System.Windows.Forms.CheckBox checkBoxFlipX; 231 | private System.Windows.Forms.GroupBox groupBox2; 232 | private System.Windows.Forms.Button buttonCancel; 233 | private System.Windows.Forms.Button buttonSave; 234 | private System.Windows.Forms.PictureBox pictureBoxTilesetSelect; 235 | private System.Windows.Forms.Label label1; 236 | private System.Windows.Forms.NumericUpDown numericUpDownPAL; 237 | private System.Windows.Forms.GroupBox groupBox3; 238 | } 239 | } -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaTilesetEditor.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 SatellaWave 12 | { 13 | public partial class EventPlazaTilesetEditor : Form 14 | { 15 | private static byte[] tile8; 16 | private static ushort[] tileSet; 17 | private static Color[][] palette; 18 | 19 | private static int selectedTileSet; 20 | private static int selectedTile; 21 | 22 | public EventPlazaTilesetEditor(byte[] _tile8, ushort[] _tileSet, Color[][] _pal) 23 | { 24 | InitializeComponent(); 25 | 26 | tile8 = _tile8; 27 | palette = _pal; 28 | 29 | tileSet = new ushort[_tileSet.Length]; 30 | _tileSet.CopyTo(tileSet, 0); 31 | 32 | selectedTileSet = 0; 33 | selectedTile = 0; 34 | 35 | UpdateTileSetImage(); 36 | UpdateTileSetup(); 37 | UpdateTile8Image(); 38 | } 39 | 40 | private void UpdateTileSetImage() 41 | { 42 | Bitmap customTileSetImage = new Bitmap(16 * 8, 16 * 6); 43 | 44 | using (Graphics g = Graphics.FromImage(customTileSetImage)) 45 | { 46 | for (int y = 0; y < 6; y++) 47 | { 48 | for (int x = 0; x < 8; x++) 49 | { 50 | g.DrawImageUnscaled(DrawCell(0x3D0 + x + y * 8), 16 * x, 16 * y); 51 | } 52 | } 53 | 54 | Brush brush = new SolidBrush(Color.FromArgb(150, 255, 0, 0)); 55 | g.FillRectangle(brush, (selectedTileSet % 8) * 16, (selectedTileSet / 8) * 16, 16, 16); 56 | } 57 | 58 | pictureBoxTilesetSelect.Image = customTileSetImage; 59 | } 60 | 61 | private void UpdateTileSetup() 62 | { 63 | Bitmap customTileSetupImage = new Bitmap(64, 64); 64 | 65 | using (Graphics g = Graphics.FromImage(customTileSetupImage)) 66 | { 67 | g.ScaleTransform(4f, 4f); 68 | g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; 69 | g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; 70 | g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; 71 | 72 | g.DrawImage(DrawCell(0x3D0 + selectedTileSet), 0, 0); 73 | 74 | Brush brush = new SolidBrush(Color.FromArgb(150, 255, 0, 0)); 75 | g.FillRectangle(brush, ((selectedTile >> 1) & 1) * 8, ((selectedTile >> 0) & 1) * 8, 8, 8); 76 | } 77 | 78 | pictureBoxTileEditor.Image = customTileSetupImage; 79 | 80 | numericUpDownPAL.Value = (tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] & 0x1C00) >> 10; 81 | checkBoxFlipX.Checked = ((tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] & 0x4000) != 0); 82 | checkBoxFlipY.Checked = ((tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] & 0x8000) != 0); 83 | } 84 | 85 | private void UpdateTile8Image() 86 | { 87 | Bitmap customTileImage = new Bitmap(16 * 8, 16 * 128); 88 | 89 | using (Graphics g = Graphics.FromImage(customTileImage)) 90 | { 91 | g.ScaleTransform(2f, 2f); 92 | g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; 93 | g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; 94 | g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; 95 | 96 | for (int y = 0; y < 128; y++) 97 | { 98 | for (int x = 0; x < 8; x++) 99 | { 100 | g.DrawImage(DrawTile(x + y * 8, ((tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] & 0x1C00) >> 10)), 8 * x, 8 * y); 101 | } 102 | } 103 | 104 | Brush brush = new SolidBrush(Color.FromArgb(150, 255, 0, 0)); 105 | g.FillRectangle(brush, ((tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] & 0x03FF) % 8) * 8, ((tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] & 0x03FF) / 8) * 8, 8, 8); 106 | } 107 | 108 | pictureBoxTileData.Image = customTileImage; 109 | } 110 | 111 | private static Bitmap DrawCell(int id) 112 | { 113 | Bitmap celltemp = new Bitmap(16, 16); 114 | 115 | id &= 0x3FF; 116 | 117 | using (Graphics g = Graphics.FromImage(celltemp)) 118 | { 119 | g.DrawImageUnscaled(DrawTile(tileSet[id * 4 + 0] & 0x03FF, (tileSet[id * 4 + 0] & 0x1C00) >> 10, (tileSet[id * 4 + 0] & 0x4000) != 0, (tileSet[id * 4 + 0] & 0x8000) != 0), 0, 0); 120 | g.DrawImageUnscaled(DrawTile(tileSet[id * 4 + 1] & 0x03FF, (tileSet[id * 4 + 1] & 0x1C00) >> 10, (tileSet[id * 4 + 1] & 0x4000) != 0, (tileSet[id * 4 + 1] & 0x8000) != 0), 0, 8); 121 | g.DrawImageUnscaled(DrawTile(tileSet[id * 4 + 2] & 0x03FF, (tileSet[id * 4 + 2] & 0x1C00) >> 10, (tileSet[id * 4 + 2] & 0x4000) != 0, (tileSet[id * 4 + 2] & 0x8000) != 0), 8, 0); 122 | g.DrawImageUnscaled(DrawTile(tileSet[id * 4 + 3] & 0x03FF, (tileSet[id * 4 + 3] & 0x1C00) >> 10, (tileSet[id * 4 + 3] & 0x4000) != 0, (tileSet[id * 4 + 3] & 0x8000) != 0), 8, 8); 123 | } 124 | 125 | return celltemp; 126 | } 127 | 128 | private static Bitmap DrawTile(int id, int pal, bool xflip = false, bool yflip = false) 129 | { 130 | //4BPP SNES 131 | Bitmap tiletemp = new Bitmap(8, 8); 132 | 133 | id = id & 0x3FF; 134 | 135 | for (int y = 0; y < 8; y++) 136 | { 137 | for (int x = 0; x < 8; x++) 138 | { 139 | int colorID = (((tile8[(id * 32) + (y * 2)] & (1 << (7 - x))) << x) >> 7) 140 | | (((tile8[(id * 32) + (y * 2) + 1] & (1 << (7 - x))) << x) >> 6) 141 | | (((tile8[(id * 32) + (y * 2) + 16] & (1 << (7 - x))) << x) >> 5) 142 | | (((tile8[(id * 32) + (y * 2) + 16 + 1] & (1 << (7 - x))) << x) >> 4); 143 | 144 | int xt = x; 145 | if (xflip) xt = 7 - x; 146 | 147 | int yt = y; 148 | if (yflip) yt = 7 - y; 149 | 150 | tiletemp.SetPixel(xt, yt, palette[pal][colorID]); 151 | } 152 | } 153 | 154 | return tiletemp; 155 | } 156 | 157 | private void buttonSave_Click(object sender, EventArgs e) 158 | { 159 | 160 | } 161 | 162 | private void pictureBoxTileEditor_Click(object sender, EventArgs e) 163 | { 164 | //Set Collision 165 | Point coordinates = ((MouseEventArgs)e).Location; 166 | selectedTile = ((coordinates.Y / 32) + ((coordinates.X / 32) * 2)); 167 | 168 | UpdateTileSetup(); 169 | UpdateTile8Image(); 170 | } 171 | 172 | private void pictureBoxTilesetSelect_Click(object sender, EventArgs e) 173 | { 174 | Point coordinates = ((MouseEventArgs)e).Location; 175 | selectedTileSet = ((coordinates.X / 16) + ((coordinates.Y / 16) * 8)); 176 | 177 | UpdateTileSetImage(); 178 | UpdateTileSetup(); 179 | UpdateTile8Image(); 180 | } 181 | 182 | private void numericUpDownPAL_ValueChanged(object sender, EventArgs e) 183 | { 184 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] &= 0xE3FF; 185 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] |= (ushort)(Convert.ToUInt16(numericUpDownPAL.Value) << 10); 186 | 187 | UpdateTileSetImage(); 188 | UpdateTileSetup(); 189 | UpdateTile8Image(); 190 | } 191 | 192 | private void checkBoxFlipX_CheckedChanged(object sender, EventArgs e) 193 | { 194 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] &= 0xBFFF; 195 | if (checkBoxFlipX.Checked) 196 | { 197 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] |= 0x4000; 198 | } 199 | 200 | UpdateTileSetImage(); 201 | UpdateTileSetup(); 202 | } 203 | 204 | private void checkBoxFlipY_CheckedChanged(object sender, EventArgs e) 205 | { 206 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] &= 0x7FFF; 207 | if (checkBoxFlipY.Checked) 208 | { 209 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] |= 0x8000; 210 | } 211 | 212 | UpdateTileSetImage(); 213 | UpdateTileSetup(); 214 | } 215 | 216 | private void pictureBoxTileData_Click(object sender, EventArgs e) 217 | { 218 | Point coordinates = ((MouseEventArgs)e).Location; 219 | int selectedTileData = ((coordinates.X / 16) + ((coordinates.Y / 16) * 8)); 220 | 221 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] &= 0xFC00; 222 | tileSet[((0x3D0 + selectedTileSet) * 4) + selectedTile] += (ushort)(selectedTileData & 0x3FF); 223 | 224 | UpdateTileSetImage(); 225 | UpdateTileSetup(); 226 | UpdateTile8Image(); 227 | } 228 | 229 | public ushort[] GetNewTileSet() 230 | { 231 | return tileSet; 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/EventPlazaTilesetEditor.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 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/FolderSelectDialog/FolderSelectDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | // ------------------------------------------------------------------ 5 | // Wraps System.Windows.Forms.OpenFileDialog to make it present 6 | // a vista-style dialog. 7 | // ------------------------------------------------------------------ 8 | 9 | namespace FolderSelect 10 | { 11 | /// 12 | /// Wraps System.Windows.Forms.OpenFileDialog to make it present 13 | /// a vista-style dialog. 14 | /// 15 | public class FolderSelectDialog 16 | { 17 | // Wrapped dialog 18 | System.Windows.Forms.OpenFileDialog ofd = null; 19 | 20 | /// 21 | /// Default constructor 22 | /// 23 | public FolderSelectDialog() 24 | { 25 | ofd = new System.Windows.Forms.OpenFileDialog(); 26 | 27 | ofd.Filter = "Folders|\n"; 28 | ofd.AddExtension = false; 29 | ofd.CheckFileExists = false; 30 | ofd.DereferenceLinks = true; 31 | ofd.Multiselect = false; 32 | } 33 | 34 | #region Properties 35 | 36 | /// 37 | /// Gets/Sets the initial folder to be selected. A null value selects the current directory. 38 | /// 39 | public string InitialDirectory 40 | { 41 | get { return ofd.InitialDirectory; } 42 | set { ofd.InitialDirectory = value == null || value.Length == 0 ? Environment.CurrentDirectory : value; } 43 | } 44 | 45 | /// 46 | /// Gets/Sets the title to show in the dialog 47 | /// 48 | public string Title 49 | { 50 | get { return ofd.Title; } 51 | set { ofd.Title = value == null ? "Select a folder" : value; } 52 | } 53 | 54 | /// 55 | /// Gets the selected folder 56 | /// 57 | public string FileName 58 | { 59 | get { return ofd.FileName; } 60 | } 61 | 62 | #endregion 63 | 64 | #region Methods 65 | 66 | /// 67 | /// Shows the dialog 68 | /// 69 | /// True if the user presses OK else false 70 | public bool ShowDialog() 71 | { 72 | return ShowDialog(IntPtr.Zero); 73 | } 74 | 75 | /// 76 | /// Shows the dialog 77 | /// 78 | /// Handle of the control to be parent 79 | /// True if the user presses OK else false 80 | public bool ShowDialog(IntPtr hWndOwner) 81 | { 82 | bool flag = false; 83 | 84 | if (Environment.OSVersion.Version.Major >= 6) 85 | { 86 | var r = new Reflector("System.Windows.Forms"); 87 | 88 | uint num = 0; 89 | Type typeIFileDialog = r.GetType("FileDialogNative.IFileDialog"); 90 | object dialog = r.Call(ofd, "CreateVistaDialog"); 91 | r.Call(ofd, "OnBeforeVistaDialog", dialog); 92 | 93 | uint options = (uint)r.CallAs(typeof(System.Windows.Forms.FileDialog), ofd, "GetOptions"); 94 | options |= (uint)r.GetEnum("FileDialogNative.FOS", "FOS_PICKFOLDERS"); 95 | r.CallAs(typeIFileDialog, dialog, "SetOptions", options); 96 | 97 | object pfde = r.New("FileDialog.VistaDialogEvents", ofd); 98 | object[] parameters = new object[] { pfde, num }; 99 | r.CallAs2(typeIFileDialog, dialog, "Advise", parameters); 100 | num = (uint)parameters[1]; 101 | try 102 | { 103 | int num2 = (int)r.CallAs(typeIFileDialog, dialog, "Show", hWndOwner); 104 | flag = 0 == num2; 105 | } 106 | finally 107 | { 108 | r.CallAs(typeIFileDialog, dialog, "Unadvise", num); 109 | GC.KeepAlive(pfde); 110 | } 111 | } 112 | else 113 | { 114 | var fbd = new FolderBrowserDialog(); 115 | fbd.Description = this.Title; 116 | fbd.SelectedPath = this.InitialDirectory; 117 | fbd.ShowNewFolderButton = false; 118 | if (fbd.ShowDialog(new WindowWrapper(hWndOwner)) != DialogResult.OK) return false; 119 | ofd.FileName = fbd.SelectedPath; 120 | flag = true; 121 | } 122 | 123 | return flag; 124 | } 125 | 126 | #endregion 127 | } 128 | 129 | /// 130 | /// Creates IWin32Window around an IntPtr 131 | /// 132 | public class WindowWrapper : System.Windows.Forms.IWin32Window 133 | { 134 | /// 135 | /// Constructor 136 | /// 137 | /// Handle to wrap 138 | public WindowWrapper(IntPtr handle) 139 | { 140 | _hwnd = handle; 141 | } 142 | 143 | /// 144 | /// Original ptr 145 | /// 146 | public IntPtr Handle 147 | { 148 | get { return _hwnd; } 149 | } 150 | 151 | private IntPtr _hwnd; 152 | } 153 | 154 | } 155 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/FolderSelectDialog/Reflector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace FolderSelect 5 | { 6 | /// 7 | /// This class is from the Front-End for Dosbox and is used to present a 'vista' dialog box to select folders. 8 | /// Being able to use a vista style dialog box to select folders is much better then using the shell folder browser. 9 | /// http://code.google.com/p/fed/ 10 | /// 11 | /// Example: 12 | /// var r = new Reflector("System.Windows.Forms"); 13 | /// 14 | public class Reflector 15 | { 16 | #region variables 17 | 18 | string m_ns; 19 | Assembly m_asmb; 20 | 21 | #endregion 22 | 23 | #region Constructors 24 | 25 | /// 26 | /// Constructor 27 | /// 28 | /// The namespace containing types to be used 29 | public Reflector(string ns) 30 | : this(ns, ns) 31 | { } 32 | 33 | /// 34 | /// Constructor 35 | /// 36 | /// A specific assembly name (used if the assembly name does not tie exactly with the namespace) 37 | /// The namespace containing types to be used 38 | public Reflector(string an, string ns) 39 | { 40 | m_ns = ns; 41 | m_asmb = null; 42 | foreach (AssemblyName aN in Assembly.GetExecutingAssembly().GetReferencedAssemblies()) 43 | { 44 | if (aN.FullName.StartsWith(an)) 45 | { 46 | m_asmb = Assembly.Load(aN); 47 | break; 48 | } 49 | } 50 | } 51 | 52 | #endregion 53 | 54 | #region Methods 55 | 56 | /// 57 | /// Return a Type instance for a type 'typeName' 58 | /// 59 | /// The name of the type 60 | /// A type instance 61 | public Type GetType(string typeName) 62 | { 63 | Type type = null; 64 | string[] names = typeName.Split('.'); 65 | 66 | if (names.Length > 0) 67 | type = m_asmb.GetType(m_ns + "." + names[0]); 68 | 69 | for (int i = 1; i < names.Length; ++i) { 70 | type = type.GetNestedType(names[i], BindingFlags.NonPublic); 71 | } 72 | return type; 73 | } 74 | 75 | /// 76 | /// Create a new object of a named type passing along any params 77 | /// 78 | /// The name of the type to create 79 | /// 80 | /// An instantiated type 81 | public object New(string name, params object[] parameters) 82 | { 83 | Type type = GetType(name); 84 | 85 | ConstructorInfo[] ctorInfos = type.GetConstructors(); 86 | foreach (ConstructorInfo ci in ctorInfos) { 87 | try { 88 | return ci.Invoke(parameters); 89 | } catch { } 90 | } 91 | 92 | return null; 93 | } 94 | 95 | /// 96 | /// Calls method 'func' on object 'obj' passing parameters 'parameters' 97 | /// 98 | /// The object on which to excute function 'func' 99 | /// The function to execute 100 | /// The parameters to pass to function 'func' 101 | /// The result of the function invocation 102 | public object Call(object obj, string func, params object[] parameters) 103 | { 104 | return Call2(obj, func, parameters); 105 | } 106 | 107 | /// 108 | /// Calls method 'func' on object 'obj' passing parameters 'parameters' 109 | /// 110 | /// The object on which to excute function 'func' 111 | /// The function to execute 112 | /// The parameters to pass to function 'func' 113 | /// The result of the function invocation 114 | public object Call2(object obj, string func, object[] parameters) 115 | { 116 | return CallAs2(obj.GetType(), obj, func, parameters); 117 | } 118 | 119 | /// 120 | /// Calls method 'func' on object 'obj' which is of type 'type' passing parameters 'parameters' 121 | /// 122 | /// The type of 'obj' 123 | /// The object on which to excute function 'func' 124 | /// The function to execute 125 | /// The parameters to pass to function 'func' 126 | /// The result of the function invocation 127 | public object CallAs(Type type, object obj, string func, params object[] parameters) 128 | { 129 | return CallAs2(type, obj, func, parameters); 130 | } 131 | 132 | /// 133 | /// Calls method 'func' on object 'obj' which is of type 'type' passing parameters 'parameters' 134 | /// 135 | /// The type of 'obj' 136 | /// The object on which to excute function 'func' 137 | /// The function to execute 138 | /// The parameters to pass to function 'func' 139 | /// The result of the function invocation 140 | public object CallAs2(Type type, object obj, string func, object[] parameters) { 141 | MethodInfo methInfo = type.GetMethod(func, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 142 | return methInfo.Invoke(obj, parameters); 143 | } 144 | 145 | /// 146 | /// Returns the value of property 'prop' of object 'obj' 147 | /// 148 | /// The object containing 'prop' 149 | /// The property name 150 | /// The property value 151 | public object Get(object obj, string prop) 152 | { 153 | return GetAs(obj.GetType(), obj, prop); 154 | } 155 | 156 | /// 157 | /// Returns the value of property 'prop' of object 'obj' which has type 'type' 158 | /// 159 | /// The type of 'obj' 160 | /// The object containing 'prop' 161 | /// The property name 162 | /// The property value 163 | public object GetAs(Type type, object obj, string prop) { 164 | PropertyInfo propInfo = type.GetProperty(prop, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 165 | return propInfo.GetValue(obj, null); 166 | } 167 | 168 | /// 169 | /// Returns an enum value 170 | /// 171 | /// The name of enum type 172 | /// The name of the value 173 | /// The enum value 174 | public object GetEnum(string typeName, string name) { 175 | Type type = GetType(typeName); 176 | FieldInfo fieldInfo = type.GetField(name); 177 | return fieldInfo.GetValue(null); 178 | } 179 | 180 | #endregion 181 | 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/00.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/01.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/02.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/03.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/04.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/05.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/06.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/07.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/08.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/09.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/10.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/11.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/12.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/13.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/14.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/15.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/Mugshot/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/Mugshot/16.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/bsxtileset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/bsxtileset.png -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Images/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Images/icon.ico -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Les informations générales relatives à un assembly dépendent de 6 | // l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations 7 | // associées à un assembly. 8 | [assembly: AssemblyTitle("SatellaWave")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("LuigiBlood")] 12 | [assembly: AssemblyProduct("SatellaWave")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 18 | // aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de 19 | // COM, affectez la valeur true à l'attribut ComVisible sur ce type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM 23 | [assembly: Guid("efb2b9d3-d659-42bc-a96a-217ddc58fbf4")] 24 | 25 | // Les informations de version pour un assembly se composent des quatre valeurs suivantes : 26 | // 27 | // Version principale 28 | // Version secondaire 29 | // Numéro de build 30 | // Révision 31 | // 32 | // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 33 | // en utilisant '*', comme indiqué ci-dessous : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("0.5.1.0")] 36 | [assembly: AssemblyFileVersion("0.5.1.0")] 37 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SatellaWave.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. 17 | /// 18 | // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder 19 | // à l'aide d'un outil, tel que ResGen ou Visual Studio. 20 | // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen 21 | // avec l'option /str ou régénérez votre projet VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SatellaWave.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Remplace la propriété CurrentUICulture du thread actuel pour toutes 51 | /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Recherche une ressource localisée de type System.Byte[]. 65 | /// 66 | internal static byte[] bsxpalette { 67 | get { 68 | object obj = ResourceManager.GetObject("bsxpalette", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Recherche une ressource localisée de type System.Byte[]. 75 | /// 76 | internal static byte[] bsxtiles { 77 | get { 78 | object obj = ResourceManager.GetObject("bsxtiles", resourceCulture); 79 | return ((byte[])(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Recherche une ressource localisée de type System.Byte[]. 85 | /// 86 | internal static byte[] bsxtileset { 87 | get { 88 | object obj = ResourceManager.GetObject("bsxtileset", resourceCulture); 89 | return ((byte[])(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Recherche une ressource localisée de type System.Byte[]. 95 | /// 96 | internal static byte[] bsxtilesetconfig { 97 | get { 98 | object obj = ResourceManager.GetObject("bsxtilesetconfig", resourceCulture); 99 | return ((byte[])(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Recherche une ressource localisée de type System.Drawing.Icon semblable à (Icône). 105 | /// 106 | internal static System.Drawing.Icon icon { 107 | get { 108 | object obj = ResourceManager.GetObject("icon", resourceCulture); 109 | return ((System.Drawing.Icon)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap Mugshot_00 { 117 | get { 118 | object obj = ResourceManager.GetObject("Mugshot_00", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap Mugshot_01 { 127 | get { 128 | object obj = ResourceManager.GetObject("Mugshot_01", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap Mugshot_02 { 137 | get { 138 | object obj = ResourceManager.GetObject("Mugshot_02", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap Mugshot_03 { 147 | get { 148 | object obj = ResourceManager.GetObject("Mugshot_03", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | 153 | /// 154 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 155 | /// 156 | internal static System.Drawing.Bitmap Mugshot_04 { 157 | get { 158 | object obj = ResourceManager.GetObject("Mugshot_04", resourceCulture); 159 | return ((System.Drawing.Bitmap)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 165 | /// 166 | internal static System.Drawing.Bitmap Mugshot_05 { 167 | get { 168 | object obj = ResourceManager.GetObject("Mugshot_05", resourceCulture); 169 | return ((System.Drawing.Bitmap)(obj)); 170 | } 171 | } 172 | 173 | /// 174 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 175 | /// 176 | internal static System.Drawing.Bitmap Mugshot_06 { 177 | get { 178 | object obj = ResourceManager.GetObject("Mugshot_06", resourceCulture); 179 | return ((System.Drawing.Bitmap)(obj)); 180 | } 181 | } 182 | 183 | /// 184 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 185 | /// 186 | internal static System.Drawing.Bitmap Mugshot_07 { 187 | get { 188 | object obj = ResourceManager.GetObject("Mugshot_07", resourceCulture); 189 | return ((System.Drawing.Bitmap)(obj)); 190 | } 191 | } 192 | 193 | /// 194 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 195 | /// 196 | internal static System.Drawing.Bitmap Mugshot_08 { 197 | get { 198 | object obj = ResourceManager.GetObject("Mugshot_08", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | /// 204 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 205 | /// 206 | internal static System.Drawing.Bitmap Mugshot_09 { 207 | get { 208 | object obj = ResourceManager.GetObject("Mugshot_09", resourceCulture); 209 | return ((System.Drawing.Bitmap)(obj)); 210 | } 211 | } 212 | 213 | /// 214 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 215 | /// 216 | internal static System.Drawing.Bitmap Mugshot_0A { 217 | get { 218 | object obj = ResourceManager.GetObject("Mugshot_0A", resourceCulture); 219 | return ((System.Drawing.Bitmap)(obj)); 220 | } 221 | } 222 | 223 | /// 224 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 225 | /// 226 | internal static System.Drawing.Bitmap Mugshot_0B { 227 | get { 228 | object obj = ResourceManager.GetObject("Mugshot_0B", resourceCulture); 229 | return ((System.Drawing.Bitmap)(obj)); 230 | } 231 | } 232 | 233 | /// 234 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 235 | /// 236 | internal static System.Drawing.Bitmap Mugshot_0C { 237 | get { 238 | object obj = ResourceManager.GetObject("Mugshot_0C", resourceCulture); 239 | return ((System.Drawing.Bitmap)(obj)); 240 | } 241 | } 242 | 243 | /// 244 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 245 | /// 246 | internal static System.Drawing.Bitmap Mugshot_0D { 247 | get { 248 | object obj = ResourceManager.GetObject("Mugshot_0D", resourceCulture); 249 | return ((System.Drawing.Bitmap)(obj)); 250 | } 251 | } 252 | 253 | /// 254 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 255 | /// 256 | internal static System.Drawing.Bitmap Mugshot_0E { 257 | get { 258 | object obj = ResourceManager.GetObject("Mugshot_0E", resourceCulture); 259 | return ((System.Drawing.Bitmap)(obj)); 260 | } 261 | } 262 | 263 | /// 264 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 265 | /// 266 | internal static System.Drawing.Bitmap Mugshot_0F { 267 | get { 268 | object obj = ResourceManager.GetObject("Mugshot_0F", resourceCulture); 269 | return ((System.Drawing.Bitmap)(obj)); 270 | } 271 | } 272 | 273 | /// 274 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 275 | /// 276 | internal static System.Drawing.Bitmap Mugshot_10 { 277 | get { 278 | object obj = ResourceManager.GetObject("Mugshot_10", resourceCulture); 279 | return ((System.Drawing.Bitmap)(obj)); 280 | } 281 | } 282 | 283 | /// 284 | /// Recherche une ressource localisée de type System.Drawing.Bitmap. 285 | /// 286 | internal static System.Drawing.Bitmap Tileset { 287 | get { 288 | object obj = ResourceManager.GetObject("Tileset", resourceCulture); 289 | return ((System.Drawing.Bitmap)(obj)); 290 | } 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/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 | 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 | 122 | ..\Images\icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Images\Mugshot\00.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Images\Mugshot\01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Images\Mugshot\02.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Images\Mugshot\03.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Images\Mugshot\04.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Images\Mugshot\05.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Images\Mugshot\06.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Images\Mugshot\07.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | ..\Images\Mugshot\08.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 150 | 151 | 152 | ..\Images\Mugshot\09.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 153 | 154 | 155 | ..\Images\Mugshot\10.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 156 | 157 | 158 | ..\Images\Mugshot\11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 159 | 160 | 161 | ..\Images\Mugshot\12.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 162 | 163 | 164 | ..\Images\Mugshot\13.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 165 | 166 | 167 | ..\Images\Mugshot\14.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 168 | 169 | 170 | ..\Images\Mugshot\15.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 171 | 172 | 173 | ..\Images\Mugshot\16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 174 | 175 | 176 | ..\Images\bsxtileset.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 177 | 178 | 179 | ..\Resources\Data\bsxpalette.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 180 | 181 | 182 | ..\Resources\Data\bsxtiles.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 183 | 184 | 185 | ..\Resources\Data\bsxtileset.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 186 | 187 | 188 | ..\Resources\Data\bsxtilesetconfig.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 189 | 190 | 191 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SatellaWave.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/ResourceAccess.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SatellaWave 9 | { 10 | public class ResourceAccess 11 | { 12 | public static Bitmap[] mugshotImageList = 13 | { 14 | SatellaWave.Properties.Resources.Mugshot_00, 15 | SatellaWave.Properties.Resources.Mugshot_01, 16 | SatellaWave.Properties.Resources.Mugshot_02, 17 | SatellaWave.Properties.Resources.Mugshot_03, 18 | SatellaWave.Properties.Resources.Mugshot_04, 19 | SatellaWave.Properties.Resources.Mugshot_05, 20 | SatellaWave.Properties.Resources.Mugshot_06, 21 | SatellaWave.Properties.Resources.Mugshot_07, 22 | SatellaWave.Properties.Resources.Mugshot_08, 23 | SatellaWave.Properties.Resources.Mugshot_09, 24 | SatellaWave.Properties.Resources.Mugshot_0A, 25 | SatellaWave.Properties.Resources.Mugshot_0B, 26 | SatellaWave.Properties.Resources.Mugshot_0C, 27 | SatellaWave.Properties.Resources.Mugshot_0D, 28 | SatellaWave.Properties.Resources.Mugshot_0E, 29 | SatellaWave.Properties.Resources.Mugshot_0F, 30 | SatellaWave.Properties.Resources.Mugshot_10 31 | }; 32 | 33 | public static byte[] defaultPaletteBSX = SatellaWave.Properties.Resources.bsxpalette; 34 | public static byte[] defaultTilesBSX = SatellaWave.Properties.Resources.bsxtiles; 35 | public static byte[] defaultTileSetBSX = SatellaWave.Properties.Resources.bsxtileset; 36 | public static byte[] defaultTileSetConfigBSX = SatellaWave.Properties.Resources.bsxtilesetconfig; 37 | 38 | public static Bitmap tilesetBSX = SatellaWave.Properties.Resources.Tileset; 39 | 40 | public static byte[] latestBSXUpdatePatchData = 41 | { 42 | 0x08, //8 patches 43 | 44 | 0x00, 0x00, 0x00, 0x08, 0x10, 0x59, 0x74, //0x0008 bytes, to 0x105974 (boot_hook & nmi_hook) 45 | 0x5C, 0x00, 0x50, 0x11, 0x5C, 0x6A, 0x50, 0x11, 46 | 47 | 0x00, 0x00, 0x00, 0x04, 0x10, 0x59, 0x84, //0x0004 bytes, to 0x105984 (file_start_hook) 48 | 0x5C, 0x76, 0x52, 0x11, 49 | 50 | 0x00, 0x00, 0x00, 0x04, 0x10, 0x59, 0xB0, //0x0004 bytes, to 0x1059B0 (send_16bit_to_port_2199) 51 | 0x5C, 0x3C, 0x50, 0x11, 52 | 53 | 0x00, 0x00, 0x00, 0x04, 0x10, 0x5A, 0x24, //0x0004 bytes, to 0x105A24 (forward_queue_to_channel_map) 54 | 0x5C, 0xAA, 0x50, 0x11, 55 | 56 | 0x00, 0x00, 0x00, 0x04, 0x10, 0x5A, 0x80, //0x0004 bytes, to 0x105A80 (execute_game_code) 57 | 0x5C, 0x75, 0x50, 0x11, 58 | 59 | 0x00, 0x00, 0x00, 0x08, 0x10, 0x5B, 0x0C, //0x0008 bytes, to 0x105B0C (flash_get_and_interprete_id & flash_get_id) 60 | 0x5C, 0x63, 0x52, 0x11, 0x5C, 0x85, 0x50, 0x11, 61 | 62 | 0x00, 0x00, 0x00, 0x04, 0x10, 0x5B, 0x6C, //0x0004 bytes, to 0x105B6C (detect_receiver_and_do_downloads) 63 | 0x5C, 0x45, 0x50, 0x11, 64 | 65 | 0x00, 0x00, 0x03, 0xA0, 0x11, 0x50, 0x00, //0x03A0 bytes, to 0x115000 (code) 66 | 0xE2, 0x30, 0xA9, 0x01, 0x8D, 0x94, 0x21, 0x8D, 0x3B, 0x01, 0x3A, 0x8F, 0xB8, 0xA1, 0x7E, 0xA2, 67 | 0x07, 0xAD, 0x10, 0x42, 0x10, 0xFB, 0xAD, 0x10, 0x42, 0x30, 0xFB, 0xCA, 0xD0, 0xF3, 0xAD, 0x65, 68 | 0x06, 0xC9, 0x47, 0xD0, 0x16, 0xE2, 0x20, 0xC2, 0x10, 0x9C, 0x3F, 0x14, 0x22, 0x8C, 0x59, 0x10, 69 | 0xF0, 0x03, 0xEE, 0x3F, 0x14, 0x68, 0xFA, 0x5C, 0x48, 0x90, 0x80, 0x6B, 0x8B, 0x4B, 0xAB, 0x22, 70 | 0xD6, 0xC3, 0x80, 0xAB, 0x6B, 0xE2, 0x20, 0xC2, 0x10, 0x22, 0x84, 0x5B, 0x10, 0x22, 0x8C, 0x59, 71 | 0x10, 0xF0, 0x04, 0xA9, 0x01, 0x80, 0x08, 0x22, 0x94, 0x59, 0x10, 0xF0, 0x06, 0xA9, 0x02, 0x5C, 72 | 0x61, 0xF4, 0x80, 0xA2, 0x22, 0x01, 0x5C, 0x97, 0xF3, 0x80, 0x08, 0xE2, 0x20, 0xAD, 0x3B, 0x01, 73 | 0x8D, 0x0D, 0x42, 0x28, 0x6B, 0xE2, 0x20, 0xA9, 0x00, 0x8F, 0x00, 0x50, 0x0C, 0x8F, 0x00, 0x50, 74 | 0x0D, 0x5C, 0x84, 0xBC, 0x80, 0x08, 0xE2, 0x30, 0xA9, 0x38, 0x8F, 0x00, 0x00, 0xC0, 0xA9, 0xD0, 75 | 0x8F, 0x00, 0x00, 0xC0, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, 0xA9, 0x71, 0x8F, 0x00, 0x00, 0xC0, 76 | 0xAF, 0x04, 0x00, 0xC0, 0x10, 0xFA, 0x5C, 0xE6, 0xC1, 0x80, 0xE2, 0x20, 0xAF, 0xB8, 0xA1, 0x7E, 77 | 0xD0, 0x09, 0x1A, 0x8F, 0xB8, 0xA1, 0x7E, 0x5C, 0xE5, 0xE0, 0x80, 0xC2, 0x20, 0xAD, 0x29, 0x14, 78 | 0x29, 0xFF, 0x00, 0x0A, 0xAA, 0xE2, 0x20, 0xFC, 0xCB, 0x50, 0x6B, 0xD1, 0x50, 0xDA, 0x50, 0xBF, 79 | 0x51, 0xEE, 0x29, 0x14, 0x9C, 0x13, 0x14, 0x9C, 0x12, 0x14, 0xAD, 0x3C, 0x14, 0x29, 0x1C, 0xC9, 80 | 0x10, 0xF0, 0x03, 0x4C, 0x85, 0x51, 0xAC, 0x35, 0x14, 0x8C, 0x33, 0x14, 0x9C, 0x37, 0x14, 0xA0, 81 | 0xFF, 0xFF, 0x84, 0x4B, 0xC8, 0xB9, 0x20, 0x9A, 0x89, 0x10, 0xD0, 0x09, 0xC8, 0xCC, 0x3D, 0x14, 82 | 0xD0, 0xF3, 0x4C, 0x85, 0x51, 0x84, 0x47, 0xB9, 0x20, 0x9A, 0x89, 0x80, 0xD0, 0x1C, 0xC8, 0xCC, 83 | 0x3D, 0x14, 0xF0, 0x18, 0xB9, 0x20, 0x9A, 0x89, 0x90, 0xD0, 0x08, 0xC8, 0xCC, 0x3D, 0x14, 0xD0, 84 | 0xF3, 0x80, 0x09, 0x89, 0x10, 0xF0, 0x03, 0x4C, 0x1C, 0x52, 0x84, 0x4B, 0x20, 0x52, 0x52, 0xA4, 85 | 0x47, 0xC8, 0xC8, 0xB9, 0x34, 0x9A, 0x8D, 0x11, 0x14, 0xC8, 0xB9, 0x34, 0x9A, 0x8D, 0x10, 0x14, 86 | 0xC8, 0xB9, 0x34, 0x9A, 0x8D, 0x0F, 0x14, 0xC8, 0x84, 0x49, 0xA2, 0xEC, 0x9B, 0x86, 0x51, 0xA9, 87 | 0x7E, 0x85, 0x53, 0xA6, 0x4B, 0x10, 0x2F, 0xAE, 0x3D, 0x14, 0x86, 0x47, 0x20, 0x52, 0x52, 0xA2, 88 | 0x00, 0x00, 0xB9, 0x34, 0x9A, 0x5A, 0x9B, 0x97, 0x51, 0x7A, 0xC8, 0xE8, 0xC4, 0x47, 0xD0, 0xF2, 89 | 0x9B, 0x20, 0x43, 0x52, 0xC2, 0x20, 0xA5, 0x47, 0x38, 0xE5, 0x49, 0x85, 0x47, 0x20, 0x2E, 0x52, 90 | 0xE2, 0x20, 0xEE, 0x29, 0x14, 0x60, 0x86, 0x47, 0x20, 0x52, 0x52, 0xAD, 0x11, 0x14, 0xD0, 0x20, 91 | 0xAE, 0x0F, 0x14, 0xF0, 0x17, 0x86, 0x47, 0xA2, 0x00, 0x00, 0xB9, 0x34, 0x9A, 0x5A, 0x9B, 0x97, 92 | 0x51, 0x7A, 0xC8, 0xE8, 0xE4, 0x47, 0xD0, 0xF2, 0x9B, 0x20, 0x43, 0x52, 0x9C, 0x27, 0x14, 0x60, 93 | 0xA9, 0x01, 0x8D, 0x29, 0x14, 0xAC, 0x35, 0x14, 0x8C, 0x33, 0x14, 0x9C, 0x37, 0x14, 0x60, 0xAE, 94 | 0x3D, 0x14, 0x86, 0x47, 0x20, 0x52, 0x52, 0xAD, 0x3C, 0x14, 0x89, 0x1C, 0xD0, 0x4E, 0x89, 0x80, 95 | 0xD0, 0x19, 0xC2, 0x20, 0xA0, 0x00, 0x00, 0xB9, 0x34, 0x9A, 0x97, 0x51, 0xC8, 0xC8, 0xC4, 0x47, 96 | 0xD0, 0xF5, 0xE2, 0x20, 0x20, 0x2E, 0x52, 0x20, 0x43, 0x52, 0x60, 0xAD, 0x11, 0x14, 0x30, 0x19, 97 | 0xD0, 0x1B, 0xAC, 0x0F, 0x14, 0xF0, 0x12, 0x84, 0x47, 0xA0, 0x00, 0x00, 0xB9, 0x34, 0x9A, 0x97, 98 | 0x51, 0xC8, 0xC4, 0x47, 0xD0, 0xF6, 0x20, 0x43, 0x52, 0x9C, 0x27, 0x14, 0x60, 0xA9, 0x01, 0x8D, 99 | 0x29, 0x14, 0xAC, 0x35, 0x14, 0x8C, 0x33, 0x14, 0x9C, 0x37, 0x14, 0x60, 0x9C, 0x29, 0x14, 0xAC, 100 | 0x35, 0x14, 0x8C, 0x33, 0x14, 0x9C, 0x37, 0x14, 0xA9, 0x05, 0x8D, 0xC9, 0x13, 0x60, 0x08, 0xC2, 101 | 0x20, 0xAD, 0x0F, 0x14, 0x38, 0xE5, 0x47, 0x8D, 0x0F, 0x14, 0xE2, 0x20, 0xB0, 0x03, 0xCE, 0x11, 102 | 0x14, 0x28, 0x60, 0xC2, 0x20, 0x98, 0x18, 0x65, 0x51, 0x85, 0x51, 0xE2, 0x20, 0x90, 0x02, 0xE6, 103 | 0x53, 0x60, 0xC2, 0x20, 0xA5, 0x47, 0x0A, 0x0A, 0x65, 0x47, 0x0A, 0x65, 0x47, 0x0A, 0x85, 0x47, 104 | 0xE2, 0x20, 0x60, 0x22, 0x77, 0xC1, 0x80, 0x08, 0xE2, 0x20, 0xAD, 0x41, 0x14, 0xC9, 0x04, 0x90, 105 | 0x03, 0x9C, 0x41, 0x14, 0x28, 0x6B, 0xA9, 0x52, 0x11, 0x85, 0xAD, 0xA9, 0x81, 0x52, 0x85, 0xAC, 106 | 0x6B, 0x3A, 0x81, 0x00, 0x00, 0x06, 0x20, 0x00, 0x20, 0x00, 0x69, 0x00, 0x05, 0x00, 0x00, 0x63, 107 | 0x60, 0x9E, 0x81, 0x95, 0x60, 0x93, 0xA6, 0x81, 0xDA, 0x19, 0x01, 0xCF, 0x99, 0x7E, 0x29, 0xDA, 108 | 0x19, 0x01, 0x80, 0x00, 0x00, 0x2F, 0xDA, 0x19, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x80, 109 | 0x95, 0x60, 0xAD, 0x81, 0x95, 0x60, 0x7D, 0xB4, 0x80, 0x60, 0x08, 0xA5, 0x81, 0xF1, 0x9B, 0x94, 110 | 0xE1, 0x99, 0x94, 0x60, 0x34, 0xA6, 0x81, 0x31, 0xA4, 0x94, 0x60, 0x1E, 0xB9, 0x80, 0x60, 0x51, 111 | 0xA5, 0x81, 0x00, 0x00, 0x02, 0x0B, 0x1C, 0x0A, 0x60, 0x9A, 0xA5, 0x81, 0x00, 0x00, 0x01, 0x00, 112 | 0x00, 0x60, 0x7B, 0xA5, 0x81, 0x00, 0x00, 0xFF, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x53, 0x11, 0x64, 0x3D, 0x00, 0xF3, 0xFF, 0x9F, 0x25, 114 | 0x01, 0x00, 0x3A, 0x12, 0x00, 0x00, 0x25, 0x02, 0x00, 0x05, 0x20, 0x00, 0x20, 0x00, 0x25, 0x20, 115 | 0x00, 0x3B, 0x01, 0x00, 0x00, 0x03, 0x03, 0x25, 0x40, 0x00, 0x20, 0xCB, 0x80, 0x95, 0x20, 0x20, 116 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x82, 0x69, 0x82, 0x6E, 0x82, 0x51, 0x82, 0x52, 0x81, 0x7C, 0x82, 117 | 0x61, 0x82, 0x72, 0x81, 0x7C, 0x82, 0x73, 0x82, 0x63, 0x82, 0x6C, 0x82, 0x50, 0x5C, 0x6E, 0x20, 118 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x82, 0x72, 0x82, 0x94, 0x81, 119 | 0x44, 0x82, 0x66, 0x82, 0x68, 0x82, 0x66, 0x82, 0x60, 0x5C, 0x6E, 0x5C, 0x6E, 0x20, 0x82, 0xB1, 120 | 0x82, 0xEA, 0x82, 0xA9, 0x82, 0xE7, 0x82, 0xA8, 0x91, 0x97, 0x82, 0xE8, 0x82, 0xB5, 0x82, 0xDC, 121 | 0x82, 0xB7, 0x8F, 0xEE, 0x95, 0xF1, 0x82, 0xF0, 0x96, 0xB3, 0x92, 0x66, 0x82, 0xC5, 0x91, 0xBC, 122 | 0x82, 0xC9, 0x5C, 0x6E, 0x20, 0x95, 0xA1, 0x90, 0xBB, 0x82, 0xB7, 0x82, 0xE9, 0x82, 0xB1, 0x82, 123 | 0xC6, 0x82, 0xF0, 0x8B, 0xD6, 0x8E, 0x7E, 0x82, 0xB5, 0x82, 0xDC, 0x82, 0xB7, 0x81, 0x42, 0x00 124 | }; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Resources/Data/bsxpalette.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Resources/Data/bsxpalette.bin -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Resources/Data/bsxtiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Resources/Data/bsxtiles.bin -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Resources/Data/bsxtileset.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuigiBlood/sat_wave/52910801677b4c9a370989187adf763df2a4b8cf/SatellaWave/SatellaWave/Resources/Data/bsxtileset.bin -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/Resources/Data/bsxtilesetconfig.bin: -------------------------------------------------------------------------------- 1 |    2 |   /////,              # * #       3 | 4 |      ,#    5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |  16 | 17 |     -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/SatellaWave.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {EFB2B9D3-D659-42BC-A96A-217DDC58FBF4} 8 | WinExe 9 | SatellaWave 10 | SatellaWave 11 | v4.6 12 | 512 13 | true 14 | publish\ 15 | true 16 | Disk 17 | false 18 | Foreground 19 | 7 20 | Days 21 | false 22 | false 23 | true 24 | 0 25 | 1.0.0.%2a 26 | false 27 | false 28 | true 29 | 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 | Images\icon.ico 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | Form 70 | 71 | 72 | EditChannel.cs 73 | 74 | 75 | Form 76 | 77 | 78 | EventPlazaAnimationEditor.cs 79 | 80 | 81 | Form 82 | 83 | 84 | EventPlazaCollisionEditor.cs 85 | 86 | 87 | Form 88 | 89 | 90 | EventPlazaEasyGraphicsImport.cs 91 | 92 | 93 | Form 94 | 95 | 96 | EventPlazaEditor.cs 97 | 98 | 99 | Form 100 | 101 | 102 | EventPlazaTilesetEditor.cs 103 | 104 | 105 | 106 | 107 | 108 | Form 109 | 110 | 111 | MainWindow.cs 112 | 113 | 114 | 115 | Form 116 | 117 | 118 | AddChannel.cs 119 | 120 | 121 | 122 | AddChannel.cs 123 | 124 | 125 | EditChannel.cs 126 | 127 | 128 | EventPlazaAnimationEditor.cs 129 | 130 | 131 | EventPlazaCollisionEditor.cs 132 | 133 | 134 | EventPlazaEasyGraphicsImport.cs 135 | 136 | 137 | EventPlazaEditor.cs 138 | 139 | 140 | EventPlazaTilesetEditor.cs 141 | 142 | 143 | MainWindow.cs 144 | 145 | 146 | ResXFileCodeGenerator 147 | Resources.Designer.cs 148 | Designer 149 | 150 | 151 | True 152 | Resources.resx 153 | True 154 | 155 | 156 | SettingsSingleFileGenerator 157 | Settings.Designer.cs 158 | 159 | 160 | True 161 | Settings.settings 162 | True 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | False 175 | Microsoft .NET Framework 4.6.1 %28x86 et x64%29 176 | true 177 | 178 | 179 | False 180 | .NET Framework 3.5 SP1 181 | false 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | Always 206 | 207 | 208 | 209 | 210 | -------------------------------------------------------------------------------- /SatellaWave/SatellaWave/readme.txt: -------------------------------------------------------------------------------- 1 | SatellaWave 0.5.1 (2019-03-06) 2 | by LuigiBlood 3 | 4 | This software can make Satellaview compatible server binary files. 5 | A tree of channels is managed by the user and it is possible to save, then load a repository of channels with all their attributes. 6 | You can then export to binary files compatible with SNES emulators that supports them. 7 | 8 | As of this time of writing, the SNES emulators that supports such files are: 9 | - bsnes-plus v074 and later (in bsxdat folder) 10 | - SNES9X 1.56 and later (in SatData folder by default) 11 | 12 | Currently supported channels: 13 | - Message Channel 14 | - Town Status 15 | - Directory 16 | - Folders 17 | - Files (also Include Files) 18 | - Items 19 | - Expansion - Event Plaza 20 | - Expansion - Script 21 | - Patch 22 | - Time Channel (BS-X - Global) 23 | - Time Channel (Game Specific) 24 | - Shigesato Itoi no Bass Fishing No. 1 Contest Channels 25 | 26 | 27 | 28 | Notes about SuperFamiconv: 29 | SuperFamiconv (by Optiroc) can be found here for Custom Event Plaza Buildings: https://github.com/Optiroc/SuperFamiconv 30 | Make sure the palette mode has subpalettes set to 1 (-P 1), and map mode is for 8x14 tilemap. 31 | To make it easier, the original picture has to be 64x112 (you can still cheat a bit). 32 | 33 | Notes about Expansion Scripts: 34 | Scripts uses the BS-X's own full on bytecode script engine. It will have to be already assembled and compiled into a bin file for import. 35 | Much more info about it will rolled out over time, it is implemented for advanced usage and future experimentations. 36 | It is used by BS-X for a lot of things such as managing the town and its NPCs, to entire magazines. 37 | 38 | 39 | 40 | Changelog: 41 | 0.5.1 (2019-03-06) 42 | - Load generic channels from XML files (Time, Bass Fishing Tournament) (bugfix) 43 | - Mention that you can delete a tile in the Event Plaza Animation Editor with a right click. 44 | 45 | 0.5.0 (2019-03-04) 46 | - Basic Script Expansion File Import 47 | - Fix Padding to prevent Tile Copy bug (bugfix) 48 | - Update People List with Bakusho Mondai names 49 | - Add option to reset all data on Event Plaza Editor [LittleToonCat] 50 | - Fix 'Edit Event Plaza Building' toolstrip (bugfix) [LittleToonCat] 51 | - Always update display when importing graphics to Event Plaza Editor (bugfix) [LittleToonCat] 52 | - Update edited generic channel names (bugfix) 53 | - Focus on Channel name when editing the channel info 54 | 55 | 0.4.0 (2018-07-12) 56 | - Full Event Plaza Expansion Support 57 | - Automatically adapt the header for Memory Pack downloads 58 | - Prevent making too many files in folders 59 | - Update Window when you create a new / load repository (bugfix) 60 | - Unix ready support for Export (bugfix) [LittleToonCat] 61 | - Fix SNES Patch loading from repository (bugfix) [LittleToonCat] 62 | - Fix latest BS-X Patch (bugfix, now it works) 63 | NOTE: As of this release, all aforementioned emulators fully supports file downloads now. I suggest to use the latest BS-X Patch channel for stable downloads in BS-X. 64 | 65 | 0.3.1 (2018-01-09) 66 | - Prevent Folder and File Descriptions to be too long. 67 | - Automatically select the recommended file destination after browsing the file. 68 | - BS-X Patch Support (Official BS-X Update & Custom Patches) 69 | - Warn User if Software Channel and/or Logical Channel already exists after editing the channel. 70 | - Software Channel detection now detects Directory. 71 | - Before Export, Repository will be checked for conflicts. 72 | 73 | 0.3 (2018-01-05) 74 | - Fix CheckUsedLCI() which didn't take into account directories themselves (fixes hang in BS-X). 75 | - [Special Event] is now [Hydrant Access]. 76 | - Exporting now changes the Town ID and Directory ID. This allows to change the satellite data in real time as it is emulated if you directly export to the folder. 77 | NOTE: As said earlier in the readme, current stable versions of emulators do not support file downloads properly. 78 | 79 | 0.2 (2018-01-04) 80 | - Prevent User from choosing more than 5 NPCs/Events (with exceptions). 81 | - Streamed File signification a little clearer (and prevent use of it). 82 | - Added feedback when the folder/file name is too long. 83 | - Prevent new lines for item descriptions. 84 | - Warn user if BS-X will not react properly to the exported bin files. 85 | - Show Current XML filepath in window title [ToontownLittleCat] 86 | 87 | 0.1 (2017-12-29) 88 | - Initial release --------------------------------------------------------------------------------