Reapply "remove powerbike plugin"

This reverts commit 9e12f3ee60.
This commit is contained in:
NinjaRaven 2024-10-14 22:59:48 -04:00
parent 9e12f3ee60
commit de4da304b7
8 changed files with 1 additions and 591 deletions

1
.gitignore vendored
View File

@ -102,6 +102,7 @@ ipch/
*.vsidx
*.dat
*.lock
.vs
# Guidance Automation Toolkit

View File

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30104.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POWERBIKE", "POWERBIKE\POWERBIKE.csproj", "{5CBD7ECF-00AC-4A69-9F44-B8F92D296EBD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5CBD7ECF-00AC-4A69-9F44-B8F92D296EBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CBD7ECF-00AC-4A69-9F44-B8F92D296EBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CBD7ECF-00AC-4A69-9F44-B8F92D296EBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CBD7ECF-00AC-4A69-9F44-B8F92D296EBD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1E950926-24B3-44AE-A2C9-18AAFAF3ADD0}
EndGlobalSection
EndGlobal

View File

@ -1,168 +0,0 @@
// ----------------------------------------------------------------------
// <copyright file="Main.cs" company="none">
// Copyright (C) 2012
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// </copyright>
// <author>Daviex94</author>
// <email>david.iuffri94@hotmail.it</email>
// <date>05/07/2012 2:41:51</date>
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.IO;
using Ekona;
using Ekona.Images;
namespace TIMEACE
{
public class Main : IGamePlugin
{
IPluginHost pluginHost;
string gameCode;
public void Initialize(IPluginHost pluginHost, string gameCode)
{
this.pluginHost = pluginHost;
this.gameCode = gameCode;
}
public bool IsCompatible()
{
if (gameCode == "C2BE")
return true;
return false;
}
public Format Get_Format(sFile file, byte[] magic)
{
if (this.IsImage(file.id))
{
return Format.FullImage;
}
if (file.name.EndsWith(".cfg"))
{
return Format.Text;
}
if (file.name.EndsWith(".area") || file.name.EndsWith(".unit") ||
file.name.EndsWith(".spawn"))
{
return Format.Text;
}
if (file.name.EndsWith(".fsf") || file.name.EndsWith(".fss"))
{
return Format.Text;
}
if (file.name.EndsWith(".tmpl") || file.name.EndsWith(".cam") ||
file.name.EndsWith(".ncam"))
{
return Format.Text;
}
if (file.name.EndsWith(".fca") || file.name.EndsWith(".col"))
{
return Format.Text;
}
if (file.name.EndsWith(".emit"))
{
return Format.Text;
}
return Format.Unknown;
}
private bool IsImage(int id)
{
if (gameCode == "C2BE" && id >= 0x3A && id <= 0x82)
return true;
return false;
}
public string Pack(ref sFolder unpacked, sFile file)
{
throw new NotImplementedException();
}
public void Read(sFile file)
{
throw new NotImplementedException();
}
public sFolder Unpack(sFile file)
{
throw new NotImplementedException();
}
public System.Windows.Forms.Control Show_Info(sFile file)
{
if (this.IsImage(file.id))
{
return this.ShowImage(file);
}
return new TextEditor(this.pluginHost, file);
}
private System.Windows.Forms.Control ShowImage(sFile file)
{
#region Palette
BinaryReader br = new BinaryReader(File.OpenRead(file.path));
br.ReadUInt32(); // 4 Bytes Stupid
uint num_colors = 256;
byte[] pal = br.ReadBytes((int)num_colors * 2);
Color[] colors = Actions.BGR555ToColor(pal);
PaletteBase palette = new RawPalette(colors, false, ColorFormat.colors256, file.name);
br.ReadUInt32(); // 4 Bytes Stupid
#endregion
#region Map
NTFS[] map_info = new NTFS[1024];
for (int i = 0; i < 1024; i++)
{
ushort value = br.ReadUInt16();
map_info[i] = Actions.MapInfo(value);
}
MapBase map = new RawMap(map_info, 256, 192, false, file.name);
#endregion
#region Tiles
uint size_section = (uint)(br.ReadUInt32() * 64);
Console.WriteLine("Size section: " + size_section.ToString("x"));
byte[] readsize = br.ReadBytes((int)size_section);
ImageBase image = new RawImage(readsize, TileForm.Horizontal, ColorFormat.colors256, 256, 192, false, file.name);
#endregion
br.Close();
pluginHost.Set_Palette(palette);
pluginHost.Set_Image(image);
pluginHost.Set_Map(map);
return new ImageControl(pluginHost, image, palette, map);
}
}
}

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5CBD7ECF-00AC-4A69-9F44-B8F92D296EBD}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TIMEACE</RootNamespace>
<AssemblyName>TIMEACE</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\Tinke\bin\Debug\Plugins\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ekona">
<HintPath>..\..\..\Ekona\bin\Debug\Ekona.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TextEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="TextEditor.Designer.cs">
<DependentUpon>TextEditor.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TextEditor.resx">
<DependentUpon>TextEditor.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Per modificare le informazioni associate a un assembly
// occorre quindi modificare i valori di questi attributi.
[assembly: AssemblyTitle("TIMEACE")]
[assembly: AssemblyDescription("Time Ace")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Tinke")]
[assembly: AssemblyCopyright("Daviex94")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
// COM, impostare su true l'attributo ComVisible per tale tipo.
[assembly: ComVisible(false)]
// Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
[assembly: Guid("6121cf6d-b466-49e7-970f-93a8235bac01")]
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
//
// Numero di versione principale
// Numero di versione secondario
// Numero build
// Revisione
//
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// utilizzando l'asterisco (*) come descritto di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,100 +0,0 @@
namespace TIMEACE
{
partial class TextEditor
{
/// <summary>
/// Variable del diseñador requerida.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpiar los recursos que se estén utilizando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Código generado por el Diseñador de componentes
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido del método con el editor de código.
/// </summary>
private void InitializeComponent()
{
this.txtText = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button();
this.btnExport = new System.Windows.Forms.Button();
this.btnImport = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txtText
//
this.txtText.Location = new System.Drawing.Point(4, 4);
this.txtText.Multiline = true;
this.txtText.Name = "txtText";
this.txtText.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtText.Size = new System.Drawing.Size(503, 445);
this.txtText.TabIndex = 0;
this.txtText.WordWrap = false;
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(432, 455);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 52);
this.btnSave.TabIndex = 1;
this.btnSave.Text = "Save";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnExport
//
this.btnExport.Location = new System.Drawing.Point(3, 484);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(75, 23);
this.btnExport.TabIndex = 2;
this.btnExport.Text = "Export";
this.btnExport.UseVisualStyleBackColor = true;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// btnImport
//
this.btnImport.Location = new System.Drawing.Point(3, 455);
this.btnImport.Name = "btnImport";
this.btnImport.Size = new System.Drawing.Size(75, 23);
this.btnImport.TabIndex = 3;
this.btnImport.Text = "Import";
this.btnImport.UseVisualStyleBackColor = true;
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
//
// TextEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.btnImport);
this.Controls.Add(this.btnExport);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.txtText);
this.Name = "TextEditor";
this.Size = new System.Drawing.Size(512, 512);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtText;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnExport;
private System.Windows.Forms.Button btnImport;
}
}

View File

@ -1,71 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Ekona;
namespace TIMEACE
{
public partial class TextEditor : UserControl
{
IPluginHost pluginHost;
int id;
public TextEditor()
{
InitializeComponent();
}
public TextEditor(IPluginHost pluginHost, sFile file)
: this()
{
this.pluginHost = pluginHost;
this.id = file.id;
this.txtText.Text = File.ReadAllText(file.path);
}
private void btnSave_Click(object sender, EventArgs e)
{
string tmpFile = this.pluginHost.Get_TempFile();
File.WriteAllText(tmpFile, this.txtText.Text);
this.pluginHost.ChangeFile(this.id, tmpFile);
}
private void btnImport_Click(object sender, EventArgs e)
{
using (OpenFileDialog ofd = new OpenFileDialog())
{
ofd.DefaultExt = ".txt";
ofd.Filter = "Plain text file (*.txt)|*.txt";
ofd.CheckFileExists = true;
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
this.txtText.Text = File.ReadAllText(ofd.FileName);
this.btnSave.PerformClick();
}
}
}
private void btnExport_Click(object sender, EventArgs e)
{
using (SaveFileDialog sfd = new SaveFileDialog())
{
sfd.Filter = "Plain text file (*.txt)|*.txt";
sfd.AddExtension = true;
sfd.OverwritePrompt = true;
if (sfd.ShowDialog() == DialogResult.OK)
{
File.WriteAllText(sfd.FileName, this.txtText.Text);
}
}
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>