init
This commit is contained in:
commit
fd52928ff9
353
.gitignore
vendored
Normal file
353
.gitignore
vendored
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*[.json, .xml, .info]
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
.ionide/
|
25
GiantsMapTextureChanger.sln
Normal file
25
GiantsMapTextureChanger.sln
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28307.572
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GiantsMapTextureChanger", "GiantsMapTextureChanger\GiantsMapTextureChanger.csproj", "{06A0FCD6-9A1C-40BD-AF5C-546DE39CF4F0}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{06A0FCD6-9A1C-40BD-AF5C-546DE39CF4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{06A0FCD6-9A1C-40BD-AF5C-546DE39CF4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{06A0FCD6-9A1C-40BD-AF5C-546DE39CF4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{06A0FCD6-9A1C-40BD-AF5C-546DE39CF4F0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {279855BA-1FFC-423C-A703-A10DDF62260C}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
6
GiantsMapTextureChanger/App.config
Normal file
6
GiantsMapTextureChanger/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
291
GiantsMapTextureChanger/ChangeTextureForm.Designer.cs
generated
Normal file
291
GiantsMapTextureChanger/ChangeTextureForm.Designer.cs
generated
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
namespace GiantsMapTextureChanger
|
||||||
|
{
|
||||||
|
partial class ChangeTextureForm
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Variable nécessaire au concepteur.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Nettoyage des ressources utilisées.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Code généré par le Concepteur Windows Form
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
|
||||||
|
/// le contenu de cette méthode avec l'éditeur de code.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangeTextureForm));
|
||||||
|
this.mapFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||||
|
this.Separator1 = new System.Windows.Forms.Label();
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.texturesinmapList = new System.Windows.Forms.ListBox();
|
||||||
|
this.exportButton = new System.Windows.Forms.Button();
|
||||||
|
this.status = new System.Windows.Forms.StatusStrip();
|
||||||
|
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
|
this.gameFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||||
|
this.textureList = new System.Windows.Forms.ComboBox();
|
||||||
|
this.ThumbImage = new System.Windows.Forms.PictureBox();
|
||||||
|
this.saveTextureDialog = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
|
this.button3 = new System.Windows.Forms.Button();
|
||||||
|
this.textureAddDialog = new System.Windows.Forms.OpenFileDialog();
|
||||||
|
this.saveMapDialog = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.openmapButton = new System.Windows.Forms.Button();
|
||||||
|
this.status.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ThumbImage)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// mapFileDialog
|
||||||
|
//
|
||||||
|
this.mapFileDialog.Filter = "Giants map file (*.gck)|*.gck";
|
||||||
|
this.mapFileDialog.Title = "Enter path to the Giants map you want to modify";
|
||||||
|
//
|
||||||
|
// Separator1
|
||||||
|
//
|
||||||
|
this.Separator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.Separator1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
this.Separator1.Location = new System.Drawing.Point(261, 15);
|
||||||
|
this.Separator1.Name = "Separator1";
|
||||||
|
this.Separator1.Size = new System.Drawing.Size(2, 485);
|
||||||
|
this.Separator1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.button1.Enabled = false;
|
||||||
|
this.button1.Location = new System.Drawing.Point(19, 52);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(220, 39);
|
||||||
|
this.button1.TabIndex = 2;
|
||||||
|
this.button1.Text = "Add texture to map";
|
||||||
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(12, 186);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(129, 20);
|
||||||
|
this.label1.TabIndex = 3;
|
||||||
|
this.label1.Text = "Possible textures";
|
||||||
|
//
|
||||||
|
// texturesinmapList
|
||||||
|
//
|
||||||
|
this.texturesinmapList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.texturesinmapList.FormattingEnabled = true;
|
||||||
|
this.texturesinmapList.ItemHeight = 20;
|
||||||
|
this.texturesinmapList.Location = new System.Drawing.Point(294, 52);
|
||||||
|
this.texturesinmapList.Name = "texturesinmapList";
|
||||||
|
this.texturesinmapList.Size = new System.Drawing.Size(341, 384);
|
||||||
|
this.texturesinmapList.TabIndex = 4;
|
||||||
|
this.texturesinmapList.SelectedIndexChanged += new System.EventHandler(this.texturesinmapList_SelectedIndexChanged);
|
||||||
|
//
|
||||||
|
// exportButton
|
||||||
|
//
|
||||||
|
this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.exportButton.Enabled = false;
|
||||||
|
this.exportButton.Location = new System.Drawing.Point(16, 254);
|
||||||
|
this.exportButton.Name = "exportButton";
|
||||||
|
this.exportButton.Size = new System.Drawing.Size(220, 38);
|
||||||
|
this.exportButton.TabIndex = 5;
|
||||||
|
this.exportButton.Text = "Export texture...";
|
||||||
|
this.exportButton.UseVisualStyleBackColor = true;
|
||||||
|
this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
|
||||||
|
//
|
||||||
|
// status
|
||||||
|
//
|
||||||
|
this.status.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||||
|
this.status.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.toolStripStatusLabel1});
|
||||||
|
this.status.Location = new System.Drawing.Point(0, 514);
|
||||||
|
this.status.Name = "status";
|
||||||
|
this.status.Size = new System.Drawing.Size(679, 22);
|
||||||
|
this.status.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// toolStripStatusLabel1
|
||||||
|
//
|
||||||
|
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||||
|
this.toolStripStatusLabel1.Size = new System.Drawing.Size(0, 17);
|
||||||
|
//
|
||||||
|
// gameFileDialog
|
||||||
|
//
|
||||||
|
this.gameFileDialog.Filter = "Giants.exe (Giants.exe)|Giants.exe";
|
||||||
|
this.gameFileDialog.Title = "Enter path to Giants.exe";
|
||||||
|
//
|
||||||
|
// textureList
|
||||||
|
//
|
||||||
|
this.textureList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.textureList.Enabled = false;
|
||||||
|
this.textureList.FormattingEnabled = true;
|
||||||
|
this.textureList.Location = new System.Drawing.Point(16, 209);
|
||||||
|
this.textureList.Name = "textureList";
|
||||||
|
this.textureList.Size = new System.Drawing.Size(220, 28);
|
||||||
|
this.textureList.TabIndex = 7;
|
||||||
|
this.textureList.SelectedIndexChanged += new System.EventHandler(this.textureList_SelectedIndexChanged);
|
||||||
|
//
|
||||||
|
// ThumbImage
|
||||||
|
//
|
||||||
|
this.ThumbImage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ThumbImage.Location = new System.Drawing.Point(16, 298);
|
||||||
|
this.ThumbImage.MinimumSize = new System.Drawing.Size(220, 201);
|
||||||
|
this.ThumbImage.Name = "ThumbImage";
|
||||||
|
this.ThumbImage.Size = new System.Drawing.Size(220, 201);
|
||||||
|
this.ThumbImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||||
|
this.ThumbImage.TabIndex = 8;
|
||||||
|
this.ThumbImage.TabStop = false;
|
||||||
|
//
|
||||||
|
// saveTextureDialog
|
||||||
|
//
|
||||||
|
this.saveTextureDialog.Filter = "Texture file|*.tga";
|
||||||
|
this.saveTextureDialog.Title = "Save texture file";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(290, 10);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(121, 20);
|
||||||
|
this.label2.TabIndex = 9;
|
||||||
|
this.label2.Text = "Textures in map";
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.button2.Enabled = false;
|
||||||
|
this.button2.Location = new System.Drawing.Point(294, 442);
|
||||||
|
this.button2.Name = "button2";
|
||||||
|
this.button2.Size = new System.Drawing.Size(341, 48);
|
||||||
|
this.button2.TabIndex = 10;
|
||||||
|
this.button2.Text = "Delete texture";
|
||||||
|
this.button2.UseVisualStyleBackColor = true;
|
||||||
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
|
//
|
||||||
|
// button3
|
||||||
|
//
|
||||||
|
this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.button3.Enabled = false;
|
||||||
|
this.button3.Location = new System.Drawing.Point(19, 97);
|
||||||
|
this.button3.Name = "button3";
|
||||||
|
this.button3.Size = new System.Drawing.Size(220, 39);
|
||||||
|
this.button3.TabIndex = 11;
|
||||||
|
this.button3.Text = "Save map as";
|
||||||
|
this.button3.UseVisualStyleBackColor = true;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
|
//
|
||||||
|
// textureAddDialog
|
||||||
|
//
|
||||||
|
this.textureAddDialog.Filter = "Texture file|*.tga";
|
||||||
|
this.textureAddDialog.Title = "Select a texture to add to map";
|
||||||
|
//
|
||||||
|
// saveMapDialog
|
||||||
|
//
|
||||||
|
this.saveMapDialog.Filter = "Map|*.gck";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
this.label3.Location = new System.Drawing.Point(19, 164);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(220, 2);
|
||||||
|
this.label3.TabIndex = 12;
|
||||||
|
//
|
||||||
|
// openmapButton
|
||||||
|
//
|
||||||
|
this.openmapButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.openmapButton.Enabled = false;
|
||||||
|
this.openmapButton.Location = new System.Drawing.Point(19, 10);
|
||||||
|
this.openmapButton.Name = "openmapButton";
|
||||||
|
this.openmapButton.Size = new System.Drawing.Size(220, 39);
|
||||||
|
this.openmapButton.TabIndex = 13;
|
||||||
|
this.openmapButton.Text = "Open map";
|
||||||
|
this.openmapButton.UseVisualStyleBackColor = true;
|
||||||
|
this.openmapButton.Click += new System.EventHandler(this.openmapButton_Click);
|
||||||
|
//
|
||||||
|
// ChangeTextureForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.ClientSize = new System.Drawing.Size(679, 536);
|
||||||
|
this.Controls.Add(this.openmapButton);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Controls.Add(this.button3);
|
||||||
|
this.Controls.Add(this.button2);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.ThumbImage);
|
||||||
|
this.Controls.Add(this.textureList);
|
||||||
|
this.Controls.Add(this.status);
|
||||||
|
this.Controls.Add(this.exportButton);
|
||||||
|
this.Controls.Add(this.texturesinmapList);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.button1);
|
||||||
|
this.Controls.Add(this.Separator1);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MinimumSize = new System.Drawing.Size(701, 592);
|
||||||
|
this.Name = "ChangeTextureForm";
|
||||||
|
this.Text = " Giants map retexturer";
|
||||||
|
this.Load += new System.EventHandler(this.ChangeTextureForm_Load);
|
||||||
|
this.Shown += new System.EventHandler(this.ChangeTextureForm_Shown);
|
||||||
|
this.status.ResumeLayout(false);
|
||||||
|
this.status.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ThumbImage)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.OpenFileDialog mapFileDialog;
|
||||||
|
private System.Windows.Forms.Label Separator1;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.ListBox texturesinmapList;
|
||||||
|
private System.Windows.Forms.Button exportButton;
|
||||||
|
private System.Windows.Forms.StatusStrip status;
|
||||||
|
private System.Windows.Forms.OpenFileDialog gameFileDialog;
|
||||||
|
private System.Windows.Forms.ComboBox textureList;
|
||||||
|
private System.Windows.Forms.PictureBox ThumbImage;
|
||||||
|
private System.Windows.Forms.SaveFileDialog saveTextureDialog;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.Button button3;
|
||||||
|
private System.Windows.Forms.OpenFileDialog textureAddDialog;
|
||||||
|
private System.Windows.Forms.SaveFileDialog saveMapDialog;
|
||||||
|
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Button openmapButton;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
383
GiantsMapTextureChanger/ChangeTextureForm.cs
Normal file
383
GiantsMapTextureChanger/ChangeTextureForm.cs
Normal file
@ -0,0 +1,383 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.IO;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using TGASharpLib;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace GiantsMapTextureChanger
|
||||||
|
{
|
||||||
|
public partial class ChangeTextureForm : Form
|
||||||
|
{
|
||||||
|
public ChangeTextureForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string map_filename { get; private set; }
|
||||||
|
public string giantsPath { get; private set; }
|
||||||
|
public Dictionary<string, Image> all_textures { get; private set; }
|
||||||
|
public Dictionary<string, Image> map_textures { get; private set; }
|
||||||
|
|
||||||
|
private void ChangeTextureForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
private Dictionary<string, Image> ReadAllTextures()
|
||||||
|
{
|
||||||
|
Dictionary<string, Image> all = new Dictionary<string, Image>();
|
||||||
|
|
||||||
|
string bin_path = Path.GetDirectoryName(this.giantsPath) + "\\Bin";
|
||||||
|
var all_files_in_bin = Directory.EnumerateFiles(bin_path);
|
||||||
|
// MessageBox.Show(all_files_in_bin.Count() + " files in Bin");
|
||||||
|
foreach (string currentFile in all_files_in_bin)
|
||||||
|
{
|
||||||
|
if (currentFile.EndsWith(".gzp"))
|
||||||
|
{
|
||||||
|
// it's a .gzp
|
||||||
|
toolStripStatusLabel1.Text = "Reading file " + currentFile;
|
||||||
|
Application.DoEvents();
|
||||||
|
Dictionary<string, Image> textures_in_gzp = ReadTexturesInGzp(currentFile);
|
||||||
|
textures_in_gzp.ToList().ForEach(x => {
|
||||||
|
if (!all.ContainsKey(x.Key))
|
||||||
|
{
|
||||||
|
all.Add(x.Key, x.Value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
private Dictionary<string, Image> ReadTexturesInGzp(string gzp_file)
|
||||||
|
{
|
||||||
|
Dictionary<string, Image> all = new Dictionary<string, Image>();
|
||||||
|
|
||||||
|
using (BinaryReader reader = new BinaryReader(File.Open(gzp_file, FileMode.Open)))
|
||||||
|
{
|
||||||
|
int checksum = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
if (checksum != 0x6608F101)
|
||||||
|
{
|
||||||
|
throw new Exception("GZP checksum invalid: " + checksum);
|
||||||
|
}
|
||||||
|
|
||||||
|
int meta_info_offset = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
reader.BaseStream.Seek(meta_info_offset, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
int unk = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
int entries_count = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
|
||||||
|
// MessageBox.Show(entries_count + " files in " + gzp_file);
|
||||||
|
|
||||||
|
for (int i=0; i<entries_count; i++)
|
||||||
|
{
|
||||||
|
int compressed_size = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
int original_size = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
int file_time = BitConverter.ToInt32(reader.ReadBytes(4), 0);
|
||||||
|
int content_offset = BitConverter.ToInt32(reader.ReadBytes(4), 0) + 16;
|
||||||
|
byte compression = reader.ReadBytes(1)[0];
|
||||||
|
byte name_length = reader.ReadBytes(1)[0];
|
||||||
|
string name = Encoding.UTF8.GetString(reader.ReadBytes(name_length)).Trim().Replace("\0", "");
|
||||||
|
// MessageBox.Show(name);
|
||||||
|
|
||||||
|
if (name.EndsWith(".tga"))
|
||||||
|
{
|
||||||
|
// MessageBox.Show("TGA file found: " + name);
|
||||||
|
long current_offset = reader.BaseStream.Position;
|
||||||
|
reader.BaseStream.Seek(content_offset, SeekOrigin.Begin);
|
||||||
|
byte[] tgaData = reader.ReadBytes(compressed_size);
|
||||||
|
reader.BaseStream.Seek(current_offset, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
if (compression == 1)
|
||||||
|
{
|
||||||
|
tgaData = DecompressBytes(tgaData, original_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
Image img = TGAToImage(tgaData);
|
||||||
|
all.Add(name, img);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dictionary<string, Image> ReadMapTextures(string map_file)
|
||||||
|
{
|
||||||
|
Dictionary<string, Image> res = new Dictionary<string, Image>();
|
||||||
|
|
||||||
|
// read all files in gck file
|
||||||
|
ZipArchive zip = ZipFile.OpenRead(map_file);
|
||||||
|
foreach (ZipArchiveEntry file in zip.Entries)
|
||||||
|
{
|
||||||
|
if(file.Name.EndsWith(".tga"))
|
||||||
|
{
|
||||||
|
Stream rs = file.Open();
|
||||||
|
byte[] tgaData = new byte[file.Length];
|
||||||
|
rs.Read(tgaData, 0, (int)file.Length);
|
||||||
|
TGA t = TGA.FromBytes(tgaData);
|
||||||
|
|
||||||
|
Image img = (Image)t;
|
||||||
|
res.Add(file.Name, img);
|
||||||
|
rs.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
zip.Dispose();
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] DecompressBytes(byte[] compressed_bytes, int original_size)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
int j = 0;
|
||||||
|
int dec_byte = 0;
|
||||||
|
int dec_bits = 8;
|
||||||
|
int buff_start = 0xFEE;
|
||||||
|
|
||||||
|
byte[] res = new byte[original_size];
|
||||||
|
|
||||||
|
if (original_size == 0)
|
||||||
|
{
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (j < original_size)
|
||||||
|
{
|
||||||
|
if (dec_bits == 8)
|
||||||
|
{
|
||||||
|
dec_byte = compressed_bytes[i];
|
||||||
|
i++;
|
||||||
|
dec_bits = 0;
|
||||||
|
}
|
||||||
|
if ((dec_byte >> dec_bits & 1) == 0)
|
||||||
|
{
|
||||||
|
int dec_pos = ((compressed_bytes[i] + ((compressed_bytes[i + 1] & 0xF0) << 4) - buff_start - j) & 0xFFF) - 0x1000 + j;
|
||||||
|
int dec_len = (compressed_bytes[i + 1] & 0xF) + 3;
|
||||||
|
i += 2;
|
||||||
|
while (dec_len > 0)
|
||||||
|
{
|
||||||
|
if (dec_pos >= 0)
|
||||||
|
{
|
||||||
|
res[j] = res[dec_pos];
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
res[j] = 32;
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
dec_pos++;
|
||||||
|
dec_len--;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
res[j] = compressed_bytes[i];
|
||||||
|
i++;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
dec_bits++;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Image TGAToImage(byte[] data)
|
||||||
|
{
|
||||||
|
TGA tga = TGA.FromBytes(data);
|
||||||
|
return (Image)tga;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textureList_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// texturesinmapList.SelectedIndex = -1;
|
||||||
|
string selected = textureList.Text;
|
||||||
|
if (this.all_textures.ContainsKey(selected)) {
|
||||||
|
ThumbImage.Image = this.all_textures[selected];
|
||||||
|
ThumbImage.Tag = selected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void exportButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
saveTextureDialog.FileName = (string)ThumbImage.Tag;
|
||||||
|
saveTextureDialog.ShowDialog();
|
||||||
|
// If the file name is not an empty string open it for saving.
|
||||||
|
if (saveTextureDialog.FileName != "")
|
||||||
|
{
|
||||||
|
// Saves the Image via a FileStream created by the OpenFile method.
|
||||||
|
System.IO.FileStream fs = (System.IO.FileStream)saveTextureDialog.OpenFile();
|
||||||
|
|
||||||
|
TGA t = (TGA)ThumbImage.Image;
|
||||||
|
t.Save(fs);
|
||||||
|
fs.Close();
|
||||||
|
toolStripStatusLabel1.Text = "Saved texture to "+ saveTextureDialog.FileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toolStripStatusLabel1.Text = "Error: you did not choose a file to save texture";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void texturesinmapList_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// textureList.SelectedIndex = -1;
|
||||||
|
string selected = texturesinmapList.Text;
|
||||||
|
if (this.map_textures.ContainsKey(selected))
|
||||||
|
{
|
||||||
|
ThumbImage.Image = this.map_textures[selected];
|
||||||
|
ThumbImage.Tag = selected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string selected = texturesinmapList.Text;
|
||||||
|
texturesinmapList.Items.Remove(selected);
|
||||||
|
map_textures.Remove(selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
textureAddDialog.ShowDialog();
|
||||||
|
if (textureAddDialog.FileName != "")
|
||||||
|
{
|
||||||
|
Image img = (Image)new TGA(textureAddDialog.FileName);
|
||||||
|
string name = Path.GetFileName(textureAddDialog.FileName);
|
||||||
|
map_textures.Add(name, img);
|
||||||
|
texturesinmapList.Items.Add(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
saveMapDialog.ShowDialog();
|
||||||
|
toolStripStatusLabel1.Text = "Saving map to: " + saveMapDialog.FileName;
|
||||||
|
if (saveMapDialog.FileName != "")
|
||||||
|
{
|
||||||
|
if (this.map_filename != saveMapDialog.FileName) {
|
||||||
|
File.Copy(this.map_filename, saveMapDialog.FileName, true);
|
||||||
|
}
|
||||||
|
ZipArchive map = ZipFile.Open(saveMapDialog.FileName, ZipArchiveMode.Update);
|
||||||
|
for(int i = map.Entries.Count-1;i>=0;i--)
|
||||||
|
{
|
||||||
|
ZipArchiveEntry entry = map.Entries[i];
|
||||||
|
if (entry.Name.EndsWith(".tga"))
|
||||||
|
{
|
||||||
|
entry.Delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(string texture_name in this.map_textures.Keys)
|
||||||
|
{
|
||||||
|
TGA texture = (TGA)map_textures[texture_name];
|
||||||
|
|
||||||
|
ZipArchiveEntry newentry = map.CreateEntry(texture_name);
|
||||||
|
using (StreamWriter writer = new StreamWriter(newentry.Open()))
|
||||||
|
{
|
||||||
|
texture.Save(writer.BaseStream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
toolStripStatusLabel1.Text = "Saved map to: " + Path.GetFileName(saveMapDialog.FileName);
|
||||||
|
map.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangeTextureForm_Shown(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Get Giants.exe location
|
||||||
|
object install_dir = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software\PlanetMoon\Giants", "DestDir", "");
|
||||||
|
if (install_dir != null) {
|
||||||
|
this.giantsPath = install_dir.ToString();
|
||||||
|
this.giantsPath += "\\Giants.exe";
|
||||||
|
}
|
||||||
|
if (this.giantsPath == null || !File.Exists(this.giantsPath))
|
||||||
|
{
|
||||||
|
if (gameFileDialog.ShowDialog() != DialogResult.OK)
|
||||||
|
{
|
||||||
|
Application.Exit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.giantsPath = gameFileDialog.FileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get map location
|
||||||
|
if (mapFileDialog.ShowDialog() != DialogResult.OK)
|
||||||
|
{
|
||||||
|
Application.Exit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.map_filename = mapFileDialog.FileName;
|
||||||
|
|
||||||
|
toolStripStatusLabel1.Text = "Reading files...";
|
||||||
|
Application.DoEvents();
|
||||||
|
|
||||||
|
this.all_textures = ReadAllTextures();
|
||||||
|
foreach (string i in all_textures.Keys)
|
||||||
|
{
|
||||||
|
textureList.Items.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
toolStripStatusLabel1.Text = "Reading map file " + this.map_filename;
|
||||||
|
Application.DoEvents();
|
||||||
|
this.map_textures = ReadMapTextures(this.map_filename); ;
|
||||||
|
foreach (string i in map_textures.Keys)
|
||||||
|
{
|
||||||
|
texturesinmapList.Items.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Activate();
|
||||||
|
toolStripStatusLabel1.Text = "Done";
|
||||||
|
|
||||||
|
button1.Enabled = true;
|
||||||
|
button3.Enabled = true;
|
||||||
|
textureList.Enabled = true;
|
||||||
|
exportButton.Enabled = true;
|
||||||
|
button2.Enabled = true;
|
||||||
|
openmapButton.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openmapButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
button1.Enabled = false;
|
||||||
|
button3.Enabled = false;
|
||||||
|
textureList.Enabled = false;
|
||||||
|
exportButton.Enabled = false;
|
||||||
|
button2.Enabled = false;
|
||||||
|
openmapButton.Enabled = false;
|
||||||
|
|
||||||
|
Application.DoEvents();
|
||||||
|
|
||||||
|
|
||||||
|
// Get map location
|
||||||
|
if (mapFileDialog.ShowDialog() != DialogResult.OK)
|
||||||
|
{
|
||||||
|
Application.Exit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.map_filename = mapFileDialog.FileName;
|
||||||
|
|
||||||
|
toolStripStatusLabel1.Text = "Reading map file " + this.map_filename;
|
||||||
|
Application.DoEvents();
|
||||||
|
this.map_textures = ReadMapTextures(this.map_filename);
|
||||||
|
|
||||||
|
texturesinmapList.Items.Clear();
|
||||||
|
foreach (string i in map_textures.Keys)
|
||||||
|
{
|
||||||
|
texturesinmapList.Items.Add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Activate();
|
||||||
|
toolStripStatusLabel1.Text = "Done";
|
||||||
|
|
||||||
|
button1.Enabled = true;
|
||||||
|
button3.Enabled = true;
|
||||||
|
textureList.Enabled = true;
|
||||||
|
exportButton.Enabled = true;
|
||||||
|
button2.Enabled = true;
|
||||||
|
openmapButton.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
181
GiantsMapTextureChanger/ChangeTextureForm.resx
Normal file
181
GiantsMapTextureChanger/ChangeTextureForm.resx
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="mapFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="status.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>196, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="gameFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>306, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="saveTextureDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>494, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="textureAddDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>705, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="saveMapDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>911, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
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
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
BIN
GiantsMapTextureChanger/Giants.ico
Normal file
BIN
GiantsMapTextureChanger/Giants.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
123
GiantsMapTextureChanger/GiantsMapTextureChanger.csproj
Normal file
123
GiantsMapTextureChanger/GiantsMapTextureChanger.csproj
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{06A0FCD6-9A1C-40BD-AF5C-546DE39CF4F0}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>GiantsMapTextureChanger</RootNamespace>
|
||||||
|
<AssemblyName>Giants Map Texture Changer</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>Giants.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ChangeTextureForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ChangeTextureForm.Designer.cs">
|
||||||
|
<DependentUpon>ChangeTextureForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="TGASharpLib.cs" />
|
||||||
|
<EmbeddedResource Include="ChangeTextureForm.resx">
|
||||||
|
<DependentUpon>ChangeTextureForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Giants.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 et x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
22
GiantsMapTextureChanger/Program.cs
Normal file
22
GiantsMapTextureChanger/Program.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace GiantsMapTextureChanger
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Point d'entrée principal de l'application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new ChangeTextureForm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
GiantsMapTextureChanger/Properties/AssemblyInfo.cs
Normal file
36
GiantsMapTextureChanger/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Les informations générales relatives à un assembly dépendent de
|
||||||
|
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||||
|
// associées à un assembly.
|
||||||
|
[assembly: AssemblyTitle("Giants Map Texture Changer")]
|
||||||
|
[assembly: AssemblyDescription("Allows to change the textures inside a map")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Amazed")]
|
||||||
|
[assembly: AssemblyProduct("Giants Map Texture Changer")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||||
|
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||||
|
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||||
|
[assembly: Guid("06a0fcd6-9a1c-40bd-af5c-546de39cf4f0")]
|
||||||
|
|
||||||
|
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||||
|
//
|
||||||
|
// Version principale
|
||||||
|
// Version secondaire
|
||||||
|
// Numéro de build
|
||||||
|
// Révision
|
||||||
|
//
|
||||||
|
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||||
|
// en utilisant '*', comme indiqué ci-dessous :
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
63
GiantsMapTextureChanger/Properties/Resources.Designer.cs
generated
Normal file
63
GiantsMapTextureChanger/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Ce code a été généré par un outil.
|
||||||
|
// Version du runtime :4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
||||||
|
// le code est régénéré.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace GiantsMapTextureChanger.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
|
||||||
|
/// </summary>
|
||||||
|
// Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
|
||||||
|
// à l'aide d'un outil, tel que ResGen ou Visual Studio.
|
||||||
|
// Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
|
||||||
|
// avec l'option /str ou régénérez votre projet VS.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GiantsMapTextureChanger.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remplace la propriété CurrentUICulture du thread actuel pour toutes
|
||||||
|
/// les recherches de ressources à l'aide de cette classe de ressource fortement typée.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
GiantsMapTextureChanger/Properties/Resources.resx
Normal file
117
GiantsMapTextureChanger/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?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.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: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" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</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" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</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>
|
26
GiantsMapTextureChanger/Properties/Settings.Designer.cs
generated
Normal file
26
GiantsMapTextureChanger/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Ce code a été généré par un outil.
|
||||||
|
// Version du runtime :4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
||||||
|
// le code est régénéré.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace GiantsMapTextureChanger.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
GiantsMapTextureChanger/Properties/Settings.settings
Normal file
7
GiantsMapTextureChanger/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
5963
GiantsMapTextureChanger/TGASharpLib.cs
Normal file
5963
GiantsMapTextureChanger/TGASharpLib.cs
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user