mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[10163] Update vmap_extractor to support new vmap implementation.
Note: This is not compatible with current assembler, wait for upcoming commits * Now also supports Linux (CMake) and Visual Studio 2010, see README for build and use instructions * Uses libmpq for now, since at project start stormlib did not work properly on 64bit linux. * Should be a lot faster, a few badly written lines ate most CPU time for nothing... Special thanks to arrai and faramir118 for additional code and fixes
This commit is contained in:
parent
f3f8e5f812
commit
cda38d9370
37 changed files with 1357 additions and 2869 deletions
BIN
contrib/vmap_extract_assembler_bin/vmapExtractor3.exe
Normal file
BIN
contrib/vmap_extract_assembler_bin/vmapExtractor3.exe
Normal file
Binary file not shown.
10
contrib/vmap_extractor_v2/.gitignore
vendored
10
contrib/vmap_extractor_v2/.gitignore
vendored
|
|
@ -10,7 +10,11 @@
|
||||||
# MaNGOS generated files at Windows build
|
# MaNGOS generated files at Windows build
|
||||||
#
|
#
|
||||||
|
|
||||||
*.ncb
|
|
||||||
*.suo
|
|
||||||
*.user
|
|
||||||
bin
|
bin
|
||||||
|
|
||||||
|
# CMake files
|
||||||
|
|
||||||
|
CMakeFiles
|
||||||
|
CMakeCache.txt
|
||||||
|
cmake_install.cmake
|
||||||
|
|
||||||
|
|
|
||||||
25
contrib/vmap_extractor_v2/CMakeLists.txt
Normal file
25
contrib/vmap_extractor_v2/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
project (MANGOS_VMAP_EXTRACT_IO)
|
||||||
|
|
||||||
|
|
||||||
|
# uncomment next line to disable debug mode
|
||||||
|
ADD_DEFINITIONS("-DIOMAP_DEBUG")
|
||||||
|
# build setup currently only supports libmpq 0.4.x
|
||||||
|
ADD_DEFINITIONS("-DUSE_LIBMPQ04")
|
||||||
|
ADD_DEFINITIONS("-Wall")
|
||||||
|
ADD_DEFINITIONS("-ggdb")
|
||||||
|
ADD_DEFINITIONS("-O3")
|
||||||
|
|
||||||
|
include_directories(../../dep/libmpq)
|
||||||
|
|
||||||
|
add_subdirectory(vmapextract)
|
||||||
42
contrib/vmap_extractor_v2/README
Normal file
42
contrib/vmap_extractor_v2/README
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
Linux:
|
||||||
|
|
||||||
|
1. Building
|
||||||
|
|
||||||
|
Because vmap_extractor depends on libmpq for reading mpq files, you will have
|
||||||
|
to build libmpq prior to vmap_extractor. Therefore cd to dep/libmpq and execute:
|
||||||
|
|
||||||
|
$ ./autogen.sh
|
||||||
|
$ ./configure
|
||||||
|
$ make
|
||||||
|
|
||||||
|
After that, cd to contrib/vmap_extractor_v2/ and execute:
|
||||||
|
|
||||||
|
$ cmake .
|
||||||
|
$ make
|
||||||
|
|
||||||
|
You should now have an executable file at vmapextract/vmapextractor
|
||||||
|
|
||||||
|
2. Extracting
|
||||||
|
|
||||||
|
Use the created executable to extract model information. Change the data path if
|
||||||
|
needed.
|
||||||
|
|
||||||
|
$ vmapextract/vmapextractor -d /mnt/windows/games/wow/Data/
|
||||||
|
|
||||||
|
Resulting files will be in ./Buildings
|
||||||
|
|
||||||
|
###########################
|
||||||
|
Windows:
|
||||||
|
|
||||||
|
1. Building
|
||||||
|
|
||||||
|
Just buid the solution in contrib\vmap_extractor_v2\win
|
||||||
|
Resulting binaries will be in contrib\vmap_extractor_v2\bin\$(PlatformName)_$(ConfigurationName)
|
||||||
|
|
||||||
|
2. Extracting
|
||||||
|
|
||||||
|
Use the created executable (from command prompt) to extract model information.
|
||||||
|
It should find the data path for your client installation through the windows registry,
|
||||||
|
but the data path can be specified with the -d option.
|
||||||
|
|
||||||
|
Resulting files will be in .\Buildings
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
|
||||||
# Visual C++ Express 2005
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmapExtractor", "vmapExtractor_VC80.vcproj", "{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug Ansi Static|Win32 = Debug Ansi Static|Win32
|
|
||||||
Release Ansi Static|Win32 = Release Ansi Static|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Debug Ansi Static|Win32.ActiveCfg = Debug Ansi Static|Win32
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Debug Ansi Static|Win32.Build.0 = Debug Ansi Static|Win32
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Release Ansi Static|Win32.ActiveCfg = Release Ansi Static|Win32
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Release Ansi Static|Win32.Build.0 = Release Ansi Static|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,19 +0,0 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
|
||||||
# Visual Studio 2008
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmapExtractor", "vmapExtractor_VC90.vcproj", "{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug Ansi Static|Win32 = Debug Ansi Static|Win32
|
|
||||||
Release Ansi Static|Win32 = Release Ansi Static|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Debug Ansi Static|Win32.ActiveCfg = Debug Ansi Static|Win32
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Debug Ansi Static|Win32.Build.0 = Debug Ansi Static|Win32
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Release Ansi Static|Win32.ActiveCfg = Release Ansi Static|Win32
|
|
||||||
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Release Ansi Static|Win32.Build.0 = Release Ansi Static|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
|
|
@ -1,999 +0,0 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="9,00"
|
|
||||||
Name="vmapExtractor"
|
|
||||||
ProjectGUID="{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}"
|
|
||||||
TargetFrameworkVersion="131072"
|
|
||||||
>
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"
|
|
||||||
/>
|
|
||||||
</Platforms>
|
|
||||||
<ToolFiles>
|
|
||||||
</ToolFiles>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
OutputDirectory=".\bin\Win32\DebugAS"
|
|
||||||
IntermediateDirectory=".\bin\Win32\DebugAS"
|
|
||||||
ConfigurationType="1"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TypeLibraryName=".\bin\StormLibTest\Win32\DebugAS/StormLibTest.tlb"
|
|
||||||
HeaderFileName=""
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalOptions="/wd 4996"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=".\stormlib"
|
|
||||||
PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
EnableEnhancedInstructionSet="1"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
PrecompiledHeaderFile=""
|
|
||||||
AssemblerListingLocation=".\bin\Win32\DebugAS/"
|
|
||||||
ObjectFile=".\bin\Win32\DebugAS/"
|
|
||||||
ProgramDataBaseFileName=".\bin\Win32\DebugAS/"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="4"
|
|
||||||
SuppressStartupBanner="true"
|
|
||||||
DebugInformationFormat="4"
|
|
||||||
CompileAs="0"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
Culture="1029"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile=".\bin\Win32\DebugAS\vmapextract_v2.exe"
|
|
||||||
LinkIncremental="2"
|
|
||||||
SuppressStartupBanner="true"
|
|
||||||
GenerateDebugInformation="true"
|
|
||||||
ProgramDatabaseFile=".\bin\Win32\DebugAS/StormLib.pdb"
|
|
||||||
SubSystem="1"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
OutputDirectory=".\bin\Win32\ReleaseAS"
|
|
||||||
IntermediateDirectory=".\bin\Win32\ReleaseAS"
|
|
||||||
ConfigurationType="1"
|
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TypeLibraryName=".\bin\StormLibTest\Win32\ReleaseAS/StormLibTest.tlb"
|
|
||||||
HeaderFileName=""
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalOptions="/wd 4996"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="1"
|
|
||||||
AdditionalIncludeDirectories=".\stormlib"
|
|
||||||
PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32"
|
|
||||||
StringPooling="true"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
EnableFunctionLevelLinking="true"
|
|
||||||
EnableEnhancedInstructionSet="1"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
PrecompiledHeaderFile=""
|
|
||||||
AssemblerListingLocation=".\bin\Win32\ReleaseAS/"
|
|
||||||
ObjectFile=".\bin\Win32\ReleaseAS/"
|
|
||||||
ProgramDataBaseFileName=".\bin\Win32\ReleaseAS/"
|
|
||||||
WarningLevel="4"
|
|
||||||
SuppressStartupBanner="true"
|
|
||||||
CompileAs="0"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
Culture="1029"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile=".\bin\Win32\ReleaseAS\vmapextract_v2.exe"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="true"
|
|
||||||
ProgramDatabaseFile=".\bin\Win32\ReleaseAS/StormLib.pdb"
|
|
||||||
SubSystem="1"
|
|
||||||
RandomizedBaseAddress="1"
|
|
||||||
DataExecutionPrevention="0"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
|
||||||
>
|
|
||||||
<Filter
|
|
||||||
Name="pklib"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\pklib\crc32.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\pklib\explode.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\pklib\implode.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\pklib\pklib.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="zlib"
|
|
||||||
>
|
|
||||||
<Filter
|
|
||||||
Name="Zlib Headers"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\zconf.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\zlib.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Zlib Sources"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\adler32.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\deflate.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\infblock.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\infcodes.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\inffast.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\inflate.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\inftrees.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\infutil.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\trees.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\zlib\zmemory.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="huffman"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\huffman\huff.cpp"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\huffman\huff.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="wave"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\wave\wave.cpp"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\wave\wave.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="bzip2"
|
|
||||||
Filter="*.h;*.c"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\blocksort.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\bzlib.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\compress.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\crctable.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\decompress.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\huffman.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="stormlib\bzip2\randtable.c"
|
|
||||||
>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release Ansi Static|Win32"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions=""
|
|
||||||
WarningLevel="3"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="vmap"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\adtfile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\adtfile.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\dbcfile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\dbcfile.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\model.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\model.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\modelheaders.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\mpq.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\mpq.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\vec3d.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\vmapexport.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\wdtfile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\wdtfile.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\wmo.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\vmapextract\wmo.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="stormlib"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SCommon.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SCommon.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SCompression.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileCompactArchive.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileCreateArchiveEx.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileExtractFile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileFindFile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileOpenArchive.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileOpenFileEx.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SFileReadFile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\SListFile.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\StormDll.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\StormLib.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\StormPort.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\StormPortLinux.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\stormlib\StormPortMac.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
||||||
18
contrib/vmap_extractor_v2/vmapextract/.gitignore
vendored
Normal file
18
contrib/vmap_extractor_v2/vmapextract/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#
|
||||||
|
# NOTE! Don't add files that are generated in specific
|
||||||
|
# subdirectories here. Add them in the ".gitignore" file
|
||||||
|
# in that subdirectory instead.
|
||||||
|
#
|
||||||
|
# NOTE! Please use 'git-ls-files -i --exclude-standard'
|
||||||
|
# command after changing this file, to see if there are
|
||||||
|
# any tracked files which get ignored after the change.
|
||||||
|
#
|
||||||
|
# MaNGOS generated files at Windows build
|
||||||
|
#
|
||||||
|
|
||||||
|
# CMake files
|
||||||
|
|
||||||
|
CMakeFiles
|
||||||
|
CMakeCache.txt
|
||||||
|
cmake_install.cmake
|
||||||
|
|
||||||
16
contrib/vmap_extractor_v2/vmapextract/CMakeLists.txt
Normal file
16
contrib/vmap_extractor_v2/vmapextract/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
project (MANGOS_IOMAP_EXTRACTOR)
|
||||||
|
|
||||||
|
LINK_DIRECTORIES( ${LINK_DIRECTORIES} ../../../dep/libmpq/libmpq/.libs/ )
|
||||||
|
add_executable(vmapextractor adtfile.cpp dbcfile.cpp model.cpp mpq_libmpq.cpp vmapexport.cpp wdtfile.cpp wmo.cpp)
|
||||||
|
target_link_libraries(vmapextractor libmpq.a bz2 z)
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
|
#include "vmapexport.h"
|
||||||
#include "adtfile.h"
|
#include "adtfile.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
char * GetPlainName(char * FileName)
|
char * GetPlainName(char * FileName)
|
||||||
{
|
{
|
||||||
|
|
@ -23,6 +29,9 @@ void fixnamen(char *name, size_t len)
|
||||||
name[i] &= ~0x20;
|
name[i] &= ~0x20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//extension in lowercase
|
||||||
|
for(size_t i=len-3; i<len; i++)
|
||||||
|
name[i] |= 0x20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fixname2(char *name, size_t len)
|
void fixname2(char *name, size_t len)
|
||||||
|
|
@ -39,12 +48,12 @@ ADTFile::ADTFile(char* filename): ADT(filename)
|
||||||
Adtfilename.append(filename);
|
Adtfilename.append(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ADTFile::init(char *map_id)
|
bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY)
|
||||||
{
|
{
|
||||||
if(ADT.isEof ())
|
if(ADT.isEof ())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
size_t size;
|
uint32 size;
|
||||||
|
|
||||||
string xMap;
|
string xMap;
|
||||||
string yMap;
|
string yMap;
|
||||||
|
|
@ -56,17 +65,17 @@ bool ADTFile::init(char *map_id)
|
||||||
yMap = TempMapNumber.substr(TempMapNumber.find_last_of("_")+1,(TempMapNumber.length()) - (TempMapNumber.find_last_of("_")));
|
yMap = TempMapNumber.substr(TempMapNumber.find_last_of("_")+1,(TempMapNumber.length()) - (TempMapNumber.find_last_of("_")));
|
||||||
Adtfilename.erase((Adtfilename.length()-xMap.length()-yMap.length()-2), (xMap.length()+yMap.length()+2));
|
Adtfilename.erase((Adtfilename.length()-xMap.length()-yMap.length()-2), (xMap.length()+yMap.length()+2));
|
||||||
string AdtMapNumber = xMap + ' ' + yMap + ' ' + GetPlainName((char*)Adtfilename.c_str());
|
string AdtMapNumber = xMap + ' ' + yMap + ' ' + GetPlainName((char*)Adtfilename.c_str());
|
||||||
printf("Processing map %s...\n", AdtMapNumber.c_str());
|
//printf("Processing map %s...\n", AdtMapNumber.c_str());
|
||||||
//printf("MapNumber = %s\n", TempMapNumber.c_str());
|
//printf("MapNumber = %s\n", TempMapNumber.c_str());
|
||||||
//printf("xMap = %s\n", xMap.c_str());
|
//printf("xMap = %s\n", xMap.c_str());
|
||||||
//printf("yMap = %s\n", yMap.c_str());
|
//printf("yMap = %s\n", yMap.c_str());
|
||||||
|
|
||||||
const char dirname[] = "buildings\\dir";
|
std::string dirname = std::string(szWorkDirWmo) + "/dir_bin";
|
||||||
FILE *dirfile;
|
FILE *dirfile;
|
||||||
dirfile = fopen(dirname, "ab");
|
dirfile = fopen(dirname.c_str(), "ab");
|
||||||
if(!dirfile)
|
if(!dirfile)
|
||||||
{
|
{
|
||||||
printf("Can't open dirfile!'%s'\n");
|
printf("Can't open dirfile!'%s'\n", dirname.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,15 +125,14 @@ bool ADTFile::init(char *map_id)
|
||||||
// >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file
|
// >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file
|
||||||
// nothing do
|
// nothing do
|
||||||
|
|
||||||
char szLocalFile[MAX_PATH];
|
char szLocalFile[1024];
|
||||||
sprintf(szLocalFile, ".\\buildings\\%s", s);
|
snprintf(szLocalFile, 1024, "%s/%s", szWorkDirWmo, s);
|
||||||
FILE * output = fopen(szLocalFile,"rb");
|
FILE * output = fopen(szLocalFile,"rb");
|
||||||
if(!output)
|
if(!output)
|
||||||
{
|
{
|
||||||
Model * m2 = new Model(path);
|
Model m2(path);
|
||||||
if(m2->open())
|
if(m2.open())
|
||||||
m2->ConvertToVMAPModel(szLocalFile);
|
m2.ConvertToVMAPModel(szLocalFile);
|
||||||
delete m2;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fclose(output);
|
fclose(output);
|
||||||
|
|
@ -161,9 +169,9 @@ bool ADTFile::init(char *map_id)
|
||||||
nMDX = (int)size / 36;
|
nMDX = (int)size / 36;
|
||||||
for (int i=0; i<nMDX; ++i)
|
for (int i=0; i<nMDX; ++i)
|
||||||
{
|
{
|
||||||
int id;
|
uint32 id;
|
||||||
ADT.read(&id, 4);
|
ADT.read(&id, 4);
|
||||||
ModelInstance inst(ADT,ModelInstansName[id].c_str(),map_id, dirfile);//!!!!!!!!!!!
|
ModelInstance inst(ADT,ModelInstansName[id].c_str(), map_num, tileX, tileY, dirfile);
|
||||||
}
|
}
|
||||||
delete[] ModelInstansName;
|
delete[] ModelInstansName;
|
||||||
}
|
}
|
||||||
|
|
@ -175,44 +183,14 @@ bool ADTFile::init(char *map_id)
|
||||||
nWMO = (int)size / 64;
|
nWMO = (int)size / 64;
|
||||||
for (int i=0; i<nWMO; ++i)
|
for (int i=0; i<nWMO; ++i)
|
||||||
{
|
{
|
||||||
int id;
|
uint32 id;
|
||||||
ADT.read(&id, 4);
|
ADT.read(&id, 4);
|
||||||
WMOInstance inst(ADT,WmoInstansName[id].c_str(),map_id, dirfile);//!!!!!!!!!!!!!
|
WMOInstance inst(ADT,WmoInstansName[id].c_str(), map_num, tileX, tileY, dirfile);
|
||||||
}
|
}
|
||||||
delete[] WmoInstansName;
|
delete[] WmoInstansName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//======================
|
//======================
|
||||||
#if 0
|
|
||||||
else if (!strcmp(fourcc,"MDDF"))
|
|
||||||
{
|
|
||||||
if (size)
|
|
||||||
{
|
|
||||||
nMDX = (int)size / 36;
|
|
||||||
for (int i=0; i<nMDX; ++i)
|
|
||||||
{
|
|
||||||
int id;
|
|
||||||
ADT.read(&id, 4);
|
|
||||||
ModelInstance inst(ADT,ModelInstansName[id].c_str(),AdtMapNumber.c_str(), dirfile);
|
|
||||||
}
|
|
||||||
delete[] ModelInstansName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!strcmp(fourcc,"MODF"))
|
|
||||||
{
|
|
||||||
if (size)
|
|
||||||
{
|
|
||||||
nWMO = (int)size / 64;
|
|
||||||
for (int i=0; i<nWMO; ++i)
|
|
||||||
{
|
|
||||||
int id;
|
|
||||||
ADT.read(&id, 4);
|
|
||||||
WMOInstance inst(ADT,WmoInstansName[id].c_str(),AdtMapNumber.c_str(), dirfile);
|
|
||||||
}
|
|
||||||
delete[] WmoInstansName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ADT.seek(nextpos);
|
ADT.seek(nextpos);
|
||||||
}
|
}
|
||||||
ADT.close();
|
ADT.close();
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,14 @@
|
||||||
#ifndef ADT_H
|
#ifndef ADT_H
|
||||||
#define ADT_H
|
#define ADT_H
|
||||||
|
|
||||||
#include "mpq.h"
|
#include "mpq_libmpq04.h"
|
||||||
#include "wmo.h"
|
#include "wmo.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
|
|
||||||
#define __STORMLIB_SELF__
|
|
||||||
|
|
||||||
#define TILESIZE (533.33333f)
|
#define TILESIZE (533.33333f)
|
||||||
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
||||||
#define UNITSIZE (CHUNKSIZE / 8.0f)
|
#define UNITSIZE (CHUNKSIZE / 8.0f)
|
||||||
|
|
||||||
typedef unsigned char uint8;
|
|
||||||
typedef unsigned short uint16;
|
|
||||||
typedef unsigned int uint32;
|
|
||||||
|
|
||||||
class Liquid;
|
class Liquid;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
@ -104,7 +98,7 @@ public:
|
||||||
int nMDX;
|
int nMDX;
|
||||||
string* WmoInstansName;
|
string* WmoInstansName;
|
||||||
string* ModelInstansName;
|
string* ModelInstansName;
|
||||||
bool init(char *map_id);
|
bool init(uint32 map_num, uint32 tileX, uint32 tileY);
|
||||||
//void LoadMapChunks();
|
//void LoadMapChunks();
|
||||||
|
|
||||||
//uint32 wmo_count;
|
//uint32 wmo_count;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
#include "dbcfile.h"
|
#include "dbcfile.h"
|
||||||
#include "mpq.h"
|
#include "mpq_libmpq04.h"
|
||||||
#include "Stormlib.h"
|
#undef min
|
||||||
#define __STORMLIB_SELF__
|
#undef max
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
DBCFile::DBCFile(const std::string &filename) : filename(filename)
|
DBCFile::DBCFile(const std::string &filename) : filename(filename)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
#ifndef DBCFILE_H
|
#ifndef DBCFILE_H
|
||||||
#define DBCFILE_H
|
#define DBCFILE_H
|
||||||
#define __STORMLIB_SELF__
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "Stormlib.h"
|
|
||||||
|
|
||||||
class DBCFile
|
class DBCFile
|
||||||
{
|
{
|
||||||
|
|
@ -80,8 +78,8 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {}
|
Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {}
|
||||||
unsigned char *offset;
|
|
||||||
DBCFile &file;
|
DBCFile &file;
|
||||||
|
unsigned char *offset;
|
||||||
|
|
||||||
friend class DBCFile;
|
friend class DBCFile;
|
||||||
friend class Iterator;
|
friend class Iterator;
|
||||||
|
|
|
||||||
59
contrib/vmap_extractor_v2/vmapextract/loadlib/loadlib.h
Normal file
59
contrib/vmap_extractor_v2/vmapextract/loadlib/loadlib.h
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
#ifndef LOAD_LIB_H
|
||||||
|
#define LOAD_LIB_H
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
typedef __int64 int64;
|
||||||
|
typedef __int32 int32;
|
||||||
|
typedef __int16 int16;
|
||||||
|
typedef __int8 int8;
|
||||||
|
typedef unsigned __int64 uint64;
|
||||||
|
typedef unsigned __int32 uint32;
|
||||||
|
typedef unsigned __int16 uint16;
|
||||||
|
typedef unsigned __int8 uint8;
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#ifndef uint64_t
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <linux/types.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
typedef int64_t int64;
|
||||||
|
typedef int32_t int32;
|
||||||
|
typedef int16_t int16;
|
||||||
|
typedef int8_t int8;
|
||||||
|
typedef uint64_t uint64;
|
||||||
|
typedef uint32_t uint32;
|
||||||
|
typedef uint16_t uint16;
|
||||||
|
typedef uint8_t uint8;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define FILE_FORMAT_VERSION 18
|
||||||
|
|
||||||
|
//
|
||||||
|
// File version chunk
|
||||||
|
//
|
||||||
|
struct file_MVER
|
||||||
|
{
|
||||||
|
union{
|
||||||
|
uint32 fcc;
|
||||||
|
char fcc_txt[4];
|
||||||
|
};
|
||||||
|
uint32 size;
|
||||||
|
uint32 ver;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FileLoader{
|
||||||
|
uint8 *data;
|
||||||
|
uint32 data_size;
|
||||||
|
public:
|
||||||
|
virtual bool prepareLoadedData();
|
||||||
|
uint8 *GetData() {return data;}
|
||||||
|
uint32 GetDataSize() {return data_size;}
|
||||||
|
|
||||||
|
file_MVER *version;
|
||||||
|
FileLoader();
|
||||||
|
~FileLoader();
|
||||||
|
bool loadFile(char *filename, bool log = true);
|
||||||
|
virtual void free();
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
|
#include "vmapexport.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
|
#include "wmo.h"
|
||||||
|
#include "mpq_libmpq04.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
Model::Model(std::string &filename) : filename(filename)
|
Model::Model(std::string &filename) : filename(filename)
|
||||||
{
|
{
|
||||||
|
|
@ -47,20 +51,22 @@ bool Model::open()
|
||||||
|
|
||||||
bool Model::ConvertToVMAPModel(char * outfilename)
|
bool Model::ConvertToVMAPModel(char * outfilename)
|
||||||
{
|
{
|
||||||
int N[] = {0x00000000};
|
int N[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
FILE * output=fopen(outfilename,"wb");
|
FILE * output=fopen(outfilename,"wb");
|
||||||
if(!output)
|
if(!output)
|
||||||
{
|
{
|
||||||
printf("Can't create the output file '%s'\n",outfilename);
|
printf("Can't create the output file '%s'\n",outfilename);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
fwrite("VMAP002",8,1,output);
|
fwrite("VMAP003",8,1,output);
|
||||||
uint32 nVertices = 0;
|
uint32 nVertices = 0;
|
||||||
nVertices = header.nBoundingVertices;
|
nVertices = header.nBoundingVertices;
|
||||||
fwrite(&nVertices, sizeof(int), 1, output);
|
fwrite(&nVertices, sizeof(int), 1, output);
|
||||||
uint32 nofgroups = 1;
|
uint32 nofgroups = 1;
|
||||||
fwrite(&nofgroups,sizeof(uint32), 1, output);
|
fwrite(&nofgroups,sizeof(uint32), 1, output);
|
||||||
fwrite(N,4,1,output);
|
fwrite(N,4*3,1,output);// rootwmoid, flags, groupid
|
||||||
|
fwrite(N,sizeof(float),3*2,output);//bbox, only needed for WMO currently
|
||||||
|
fwrite(N,4,1,output);// liquidflags
|
||||||
fwrite("GRP ",4,1,output);
|
fwrite("GRP ",4,1,output);
|
||||||
uint32 branches = 1;
|
uint32 branches = 1;
|
||||||
int wsize;
|
int wsize;
|
||||||
|
|
@ -115,12 +121,12 @@ Vec3D fixCoordSystem2(Vec3D v)
|
||||||
return Vec3D(v.x, v.z, v.y);
|
return Vec3D(v.x, v.z, v.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName,const char*MapName, FILE *pDirfile)
|
ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile)
|
||||||
{
|
{
|
||||||
float ff[3];
|
float ff[3];
|
||||||
f.read(&d1, 4);
|
f.read(&id, 4);
|
||||||
f.read(ff,12);
|
f.read(ff,12);
|
||||||
pos = Vec3D(ff[0],ff[1],ff[2]);
|
pos = fixCoords(Vec3D(ff[0],ff[1],ff[2]));
|
||||||
f.read(ff,12);
|
f.read(ff,12);
|
||||||
rot = Vec3D(ff[0],ff[1],ff[2]);
|
rot = Vec3D(ff[0],ff[1],ff[2]);
|
||||||
f.read(&scale,4);
|
f.read(&scale,4);
|
||||||
|
|
@ -128,12 +134,15 @@ ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName,const char*Map
|
||||||
sc = scale / 1024.0f;
|
sc = scale / 1024.0f;
|
||||||
|
|
||||||
char tempname[512];
|
char tempname[512];
|
||||||
sprintf(tempname, ".\\buildings\\%s", ModelInstName);
|
sprintf(tempname, "%s/%s", szWorkDirWmo, ModelInstName);
|
||||||
FILE *input;
|
FILE *input;
|
||||||
input = fopen(tempname, "r+b");
|
input = fopen(tempname, "r+b");
|
||||||
|
|
||||||
if(!input)
|
if(!input)
|
||||||
|
{
|
||||||
|
//printf("ModelInstance::ModelInstance couldn't open %s\n", tempname);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fseek(input, 8, SEEK_SET); // get the correct no of vertices
|
fseek(input, 8, SEEK_SET); // get the correct no of vertices
|
||||||
int nVertices;
|
int nVertices;
|
||||||
|
|
@ -143,9 +152,24 @@ ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName,const char*Map
|
||||||
if(nVertices == 0)
|
if(nVertices == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(pDirfile)
|
uint16 adtId = 0;// not used for models
|
||||||
{
|
uint32 flags = MOD_M2;
|
||||||
int realx1 = (int) ((float) pos.x / 533.333333f);
|
if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN;
|
||||||
|
//write mapID, tileX, tileY, Flags, ID, Pos, Rot, Scale, name
|
||||||
|
fwrite(&mapID, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&tileX, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&tileY, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&flags, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&adtId, sizeof(uint16), 1, pDirfile);
|
||||||
|
fwrite(&id, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&pos, sizeof(float), 3, pDirfile);
|
||||||
|
fwrite(&rot, sizeof(float), 3, pDirfile);
|
||||||
|
fwrite(&sc, sizeof(float), 1, pDirfile);
|
||||||
|
uint32 nlen=strlen(ModelInstName);
|
||||||
|
fwrite(&nlen, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(ModelInstName, sizeof(char), nlen, pDirfile);
|
||||||
|
|
||||||
|
/* int realx1 = (int) ((float) pos.x / 533.333333f);
|
||||||
int realy1 = (int) ((float) pos.z / 533.333333f);
|
int realy1 = (int) ((float) pos.z / 533.333333f);
|
||||||
int realx2 = (int) ((float) pos.x / 533.333333f);
|
int realx2 = (int) ((float) pos.x / 533.333333f);
|
||||||
int realy2 = (int) ((float) pos.z / 533.333333f);
|
int realy2 = (int) ((float) pos.z / 533.333333f);
|
||||||
|
|
@ -159,6 +183,5 @@ ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName,const char*Map
|
||||||
nVertices,
|
nVertices,
|
||||||
realx1, realy1,
|
realx1, realy1,
|
||||||
realx2, realy2
|
realx2, realy2
|
||||||
);
|
); */
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
#ifndef MODEL_H
|
#ifndef MODEL_H
|
||||||
#define MODEL_H
|
#define MODEL_H
|
||||||
|
|
||||||
|
#include "loadlib/loadlib.h"
|
||||||
#include "vec3d.h"
|
#include "vec3d.h"
|
||||||
#include "mpq.h"
|
//#include "mpq.h"
|
||||||
#include "modelheaders.h"
|
#include "modelheaders.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class Model;
|
class Model;
|
||||||
class WMOInstance;
|
class WMOInstance;
|
||||||
|
class MPQFile;
|
||||||
|
|
||||||
Vec3D fixCoordSystem(Vec3D v);
|
Vec3D fixCoordSystem(Vec3D v);
|
||||||
|
|
||||||
|
|
@ -38,13 +40,13 @@ class ModelInstance
|
||||||
public:
|
public:
|
||||||
Model *model;
|
Model *model;
|
||||||
|
|
||||||
int id;
|
uint32 id;
|
||||||
Vec3D pos, rot;
|
Vec3D pos, rot;
|
||||||
unsigned int d1, scale;
|
unsigned int d1, scale;
|
||||||
float w,sc;
|
float w,sc;
|
||||||
|
|
||||||
ModelInstance() {}
|
ModelInstance() {}
|
||||||
ModelInstance(MPQFile &f,const char* ModelInstName,const char*MapName, FILE *pDirfile);
|
ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
#ifndef MODELHEADERS_H
|
#ifndef MODELHEADERS_H
|
||||||
#define MODELHEADERS_H
|
#define MODELHEADERS_H
|
||||||
|
|
||||||
typedef unsigned char uint8;
|
/* typedef unsigned char uint8;
|
||||||
typedef char int8;
|
typedef char int8;
|
||||||
typedef unsigned short uint16;
|
typedef unsigned short uint16;
|
||||||
typedef short int16;
|
typedef short int16;
|
||||||
typedef unsigned int uint32;
|
typedef unsigned int uint32;
|
||||||
typedef int int32;
|
typedef int int32; */
|
||||||
|
|
||||||
#pragma pack(push,1)
|
#pragma pack(push,1)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
#include "mpq.h"
|
|
||||||
//#include <vector>
|
|
||||||
#include "Stormlib.h"
|
|
||||||
#define __STORMLIB_SELF__
|
|
||||||
|
|
||||||
MPQArchiveSet gOpenArchives;
|
|
||||||
|
|
||||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
MPQArchive::MPQArchive(const char* filename)
|
|
||||||
{
|
|
||||||
BOOL succ = SFileOpenArchive(filename, 0, 0,&hMPQ);
|
|
||||||
if (succ)
|
|
||||||
printf("Opening %s\n", filename);
|
|
||||||
else
|
|
||||||
printf("Error!!!Not open archive %s\n", filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MPQArchive::close()
|
|
||||||
{
|
|
||||||
SFileCloseArchive(hMPQ);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MPQArchiveSet::Open( std::vector<std::string> const& archiveNames )
|
|
||||||
{
|
|
||||||
for (size_t i=0; i < archiveNames.size(); ++i)
|
|
||||||
{
|
|
||||||
MPQArchive mpqarch(archiveNames[i].c_str());
|
|
||||||
if(mpqarch.isOpen())
|
|
||||||
archives.push_back(mpqarch);
|
|
||||||
}
|
|
||||||
|
|
||||||
return !archives.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
MPQArchiveSet::~MPQArchiveSet()
|
|
||||||
{
|
|
||||||
// close archives
|
|
||||||
for (ArchiveSet::iterator ar_itr = archives.begin(); ar_itr != archives.end(); ++ar_itr)
|
|
||||||
ar_itr->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
MPQFile::MPQFile(const char* filename):
|
|
||||||
eof(false),
|
|
||||||
buffer(0),
|
|
||||||
pointer(0),
|
|
||||||
size(0)
|
|
||||||
{
|
|
||||||
for(ArchiveSet::const_iterator i=gOpenArchives.archives.begin(); i!=gOpenArchives.archives.end();++i)
|
|
||||||
{
|
|
||||||
HANDLE hFile = "";
|
|
||||||
hMPQ = i->hMPQ;
|
|
||||||
BOOL succ = SFileOpenFileEx(hMPQ,filename,0, &hFile);
|
|
||||||
if (succ)
|
|
||||||
{
|
|
||||||
DWORD s = SFileGetFileSize(hFile, 0);
|
|
||||||
if (!s)
|
|
||||||
{
|
|
||||||
eof = true;
|
|
||||||
buffer = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
size = (size_t)s;
|
|
||||||
buffer = new char[s];
|
|
||||||
SFileReadFile(hFile, buffer, s, 0, 0);
|
|
||||||
SFileCloseFile(hFile);
|
|
||||||
|
|
||||||
eof = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
eof = true;
|
|
||||||
buffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
MPQFile::~MPQFile()
|
|
||||||
{
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t MPQFile::read(void* dest, size_t bytes)
|
|
||||||
{
|
|
||||||
if (eof)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
size_t rpos = pointer + bytes;
|
|
||||||
if (rpos > size)
|
|
||||||
{
|
|
||||||
bytes = size - pointer;
|
|
||||||
eof = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(dest, &(buffer[pointer]), bytes);
|
|
||||||
|
|
||||||
pointer = rpos;
|
|
||||||
|
|
||||||
return bytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MPQFile::isEof()
|
|
||||||
{
|
|
||||||
return eof;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MPQFile::seek(int offset)
|
|
||||||
{
|
|
||||||
pointer = offset;
|
|
||||||
eof = (pointer >= size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MPQFile::seekRelative(int offset)
|
|
||||||
{
|
|
||||||
pointer += offset;
|
|
||||||
eof = (pointer >= size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MPQFile::close()
|
|
||||||
{
|
|
||||||
if (buffer)
|
|
||||||
delete[] buffer;
|
|
||||||
buffer = 0;
|
|
||||||
eof = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t MPQFile::getSize()
|
|
||||||
{
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t MPQFile::getPos()
|
|
||||||
{
|
|
||||||
return pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
char* MPQFile::getBuffer()
|
|
||||||
{
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
char* MPQFile::getPointer()
|
|
||||||
{
|
|
||||||
return buffer + pointer;
|
|
||||||
}
|
|
||||||
|
|
@ -1,80 +0,0 @@
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
|
||||||
|
|
||||||
#ifndef MPQ_H
|
|
||||||
#define MPQ_H
|
|
||||||
|
|
||||||
#define __STORMLIB_SELF__
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <vector>
|
|
||||||
#include <iostream>
|
|
||||||
#include "Stormlib.h"
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
typedef unsigned int uint32;
|
|
||||||
|
|
||||||
class MPQArchive
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
HANDLE hMPQ;
|
|
||||||
MPQArchive(const char* filename);
|
|
||||||
void close();
|
|
||||||
bool isOpen() const { return hMPQ != 0; }
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef std::vector<MPQArchive> ArchiveSet;
|
|
||||||
|
|
||||||
class MPQArchiveSet
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MPQArchiveSet() {}
|
|
||||||
~MPQArchiveSet();
|
|
||||||
|
|
||||||
bool Open(std::vector<std::string> const& archiveNames);
|
|
||||||
|
|
||||||
ArchiveSet archives;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern MPQArchiveSet gOpenArchives;
|
|
||||||
|
|
||||||
class MPQFile
|
|
||||||
{
|
|
||||||
HANDLE hFile;
|
|
||||||
HANDLE hMPQ;
|
|
||||||
bool eof;
|
|
||||||
char *buffer;
|
|
||||||
size_t pointer,
|
|
||||||
size;
|
|
||||||
|
|
||||||
// disable copying
|
|
||||||
//MPQFile(const MPQFile &f) {}
|
|
||||||
//void operator=(const MPQFile &f) {}
|
|
||||||
|
|
||||||
public:
|
|
||||||
MPQFile(const char* filename);
|
|
||||||
~MPQFile();
|
|
||||||
size_t read(void* dest, size_t bytes);
|
|
||||||
size_t getSize();
|
|
||||||
size_t getPos();
|
|
||||||
char* getBuffer();
|
|
||||||
char* getPointer();
|
|
||||||
bool isEof();
|
|
||||||
void seek(int offset);
|
|
||||||
void seekRelative(int offset);
|
|
||||||
void close();
|
|
||||||
};
|
|
||||||
|
|
||||||
inline void flipcc(char *fcc)
|
|
||||||
{
|
|
||||||
char t;
|
|
||||||
t=fcc[0];
|
|
||||||
fcc[0]=fcc[3];
|
|
||||||
fcc[3]=t;
|
|
||||||
t=fcc[1];
|
|
||||||
fcc[1]=fcc[2];
|
|
||||||
fcc[2]=t;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
111
contrib/vmap_extractor_v2/vmapextract/mpq_libmpq.cpp
Normal file
111
contrib/vmap_extractor_v2/vmapextract/mpq_libmpq.cpp
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
#include "mpq_libmpq04.h"
|
||||||
|
#include <deque>
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
ArchiveSet gOpenArchives;
|
||||||
|
|
||||||
|
MPQArchive::MPQArchive(const char* filename)
|
||||||
|
{
|
||||||
|
int result = libmpq__archive_open(&mpq_a, filename, -1);
|
||||||
|
printf("Opening %s\n", filename);
|
||||||
|
if(result) {
|
||||||
|
switch(result) {
|
||||||
|
case LIBMPQ_ERROR_OPEN :
|
||||||
|
printf("Error opening archive '%s': Does file really exist?\n", filename);
|
||||||
|
break;
|
||||||
|
case LIBMPQ_ERROR_FORMAT : /* bad file format */
|
||||||
|
printf("Error opening archive '%s': Bad file format\n", filename);
|
||||||
|
break;
|
||||||
|
case LIBMPQ_ERROR_SEEK : /* seeking in file failed */
|
||||||
|
printf("Error opening archive '%s': Seeking in file failed\n", filename);
|
||||||
|
break;
|
||||||
|
case LIBMPQ_ERROR_READ : /* Read error in archive */
|
||||||
|
printf("Error opening archive '%s': Read error in archive\n", filename);
|
||||||
|
break;
|
||||||
|
case LIBMPQ_ERROR_MALLOC : /* maybe not enough memory? :) */
|
||||||
|
printf("Error opening archive '%s': Maybe not enough memory\n", filename);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Error opening archive '%s': Unknown error\n", filename);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gOpenArchives.push_front(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MPQArchive::close()
|
||||||
|
{
|
||||||
|
//gOpenArchives.erase(erase(&mpq_a);
|
||||||
|
libmpq__archive_close(mpq_a);
|
||||||
|
}
|
||||||
|
|
||||||
|
MPQFile::MPQFile(const char* filename):
|
||||||
|
eof(false),
|
||||||
|
buffer(0),
|
||||||
|
pointer(0),
|
||||||
|
size(0)
|
||||||
|
{
|
||||||
|
for(ArchiveSet::iterator i=gOpenArchives.begin(); i!=gOpenArchives.end();++i)
|
||||||
|
{
|
||||||
|
mpq_archive *mpq_a = (*i)->mpq_a;
|
||||||
|
|
||||||
|
uint32 filenum;
|
||||||
|
if(libmpq__file_number(mpq_a, filename, &filenum)) continue;
|
||||||
|
libmpq__off_t transferred;
|
||||||
|
libmpq__file_unpacked_size(mpq_a, filenum, &size);
|
||||||
|
|
||||||
|
// HACK: in patch.mpq some files don't want to open and give 1 for filesize
|
||||||
|
if (size<=1) {
|
||||||
|
// printf("info: file %s has size %d; considered dummy file.\n", filename, size);
|
||||||
|
eof = true;
|
||||||
|
buffer = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
buffer = new char[size];
|
||||||
|
|
||||||
|
//libmpq_file_getdata
|
||||||
|
libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
|
||||||
|
/*libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);*/
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
eof = true;
|
||||||
|
buffer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t MPQFile::read(void* dest, size_t bytes)
|
||||||
|
{
|
||||||
|
if (eof) return 0;
|
||||||
|
|
||||||
|
size_t rpos = pointer + bytes;
|
||||||
|
if (rpos > size) {
|
||||||
|
bytes = size - pointer;
|
||||||
|
eof = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(dest, &(buffer[pointer]), bytes);
|
||||||
|
|
||||||
|
pointer = rpos;
|
||||||
|
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MPQFile::seek(int offset)
|
||||||
|
{
|
||||||
|
pointer = offset;
|
||||||
|
eof = (pointer >= size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MPQFile::seekRelative(int offset)
|
||||||
|
{
|
||||||
|
pointer += offset;
|
||||||
|
eof = (pointer >= size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MPQFile::close()
|
||||||
|
{
|
||||||
|
if (buffer) delete[] buffer;
|
||||||
|
buffer = 0;
|
||||||
|
eof = true;
|
||||||
|
}
|
||||||
91
contrib/vmap_extractor_v2/vmapextract/mpq_libmpq04.h
Normal file
91
contrib/vmap_extractor_v2/vmapextract/mpq_libmpq04.h
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
|
#ifndef MPQ_H
|
||||||
|
#define MPQ_H
|
||||||
|
|
||||||
|
#include "loadlib/loadlib.h"
|
||||||
|
#include "libmpq/mpq.h"
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <iostream>
|
||||||
|
#include <deque>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class MPQArchive
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
mpq_archive_s *mpq_a;
|
||||||
|
|
||||||
|
MPQArchive(const char* filename);
|
||||||
|
void close();
|
||||||
|
|
||||||
|
void GetFileListTo(vector<string>& filelist) {
|
||||||
|
uint32 filenum;
|
||||||
|
if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
|
||||||
|
libmpq__off_t size, transferred;
|
||||||
|
libmpq__file_unpacked_size(mpq_a, filenum, &size);
|
||||||
|
|
||||||
|
char *buffer = new char[size];
|
||||||
|
|
||||||
|
libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
|
||||||
|
|
||||||
|
char seps[] = "\n";
|
||||||
|
char *token;
|
||||||
|
|
||||||
|
token = strtok( buffer, seps );
|
||||||
|
uint32 counter = 0;
|
||||||
|
while ((token != NULL) && (counter < size)) {
|
||||||
|
//cout << token << endl;
|
||||||
|
token[strlen(token) - 1] = 0;
|
||||||
|
string s = token;
|
||||||
|
filelist.push_back(s);
|
||||||
|
counter += strlen(token) + 2;
|
||||||
|
token = strtok(NULL, seps);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] buffer;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
typedef std::deque<MPQArchive*> ArchiveSet;
|
||||||
|
|
||||||
|
class MPQFile
|
||||||
|
{
|
||||||
|
//MPQHANDLE handle;
|
||||||
|
bool eof;
|
||||||
|
char *buffer;
|
||||||
|
libmpq__off_t pointer,size;
|
||||||
|
|
||||||
|
// disable copying
|
||||||
|
MPQFile(const MPQFile &f) {}
|
||||||
|
void operator=(const MPQFile &f) {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
MPQFile(const char* filename); // filenames are not case sensitive
|
||||||
|
~MPQFile() { close(); }
|
||||||
|
size_t read(void* dest, size_t bytes);
|
||||||
|
size_t getSize() { return size; }
|
||||||
|
size_t getPos() { return pointer; }
|
||||||
|
char* getBuffer() { return buffer; }
|
||||||
|
char* getPointer() { return buffer + pointer; }
|
||||||
|
bool isEof() { return eof; }
|
||||||
|
void seek(int offset);
|
||||||
|
void seekRelative(int offset);
|
||||||
|
void close();
|
||||||
|
};
|
||||||
|
|
||||||
|
inline void flipcc(char *fcc)
|
||||||
|
{
|
||||||
|
char t;
|
||||||
|
t=fcc[0];
|
||||||
|
fcc[0]=fcc[3];
|
||||||
|
fcc[3]=t;
|
||||||
|
t=fcc[1];
|
||||||
|
fcc[1]=fcc[2];
|
||||||
|
fcc[2]=t;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -107,6 +107,12 @@ public:
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
friend std::ostream& operator<<(std::ostream& out, const Vec3D& v)
|
||||||
|
{
|
||||||
|
out << v.x << " " << v.y << " " << v.z;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
operator float*()
|
operator float*()
|
||||||
{
|
{
|
||||||
return (float*)this;
|
return (float*)this;
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,33 @@
|
||||||
/*****************************************************************************/
|
|
||||||
/* StormLibTest.cpp Copyright (c) Ladislav Zezula 2003 */
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
/* This module uses very brutal test methods for StormLib. It extracts all */
|
|
||||||
/* files from the archive with Storm.dll and with stormlib and compares them,*/
|
|
||||||
/* then tries to build a copy of the entire archive, then removes a few files*/
|
|
||||||
/* from the archive and adds them back, then compares the two archives, ... */
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
/* Date Ver Who Comment */
|
|
||||||
/* -------- ---- --- ------- */
|
|
||||||
/* 25.03.03 1.00 Lad The first version of StormLibTest.cpp */
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
#include <io.h>
|
#include <cstdio>
|
||||||
#include <conio.h>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <mmsystem.h>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <direct.h>
|
||||||
|
#define mkdir _mkdir
|
||||||
|
#else
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __STORMLIB_SELF__ // Don't use StormLib.lib
|
#undef min
|
||||||
#include "StormLib.h"
|
#undef max
|
||||||
|
|
||||||
#pragma warning(disable : 4505)
|
//#pragma warning(disable : 4505)
|
||||||
#pragma comment(lib, "Winmm.lib")
|
//#pragma comment(lib, "Winmm.lib")
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
//From Extractor
|
//From Extractor
|
||||||
#include "adtfile.h"
|
#include "adtfile.h"
|
||||||
#include "wdtfile.h"
|
#include "wdtfile.h"
|
||||||
#include "dbcfile.h"
|
#include "dbcfile.h"
|
||||||
#include "mpq.h"
|
|
||||||
#include "wmo.h"
|
#include "wmo.h"
|
||||||
|
#include "mpq_libmpq04.h"
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Defines
|
// Defines
|
||||||
|
|
@ -40,10 +35,9 @@
|
||||||
#define MPQ_BLOCK_SIZE 0x1000
|
#define MPQ_BLOCK_SIZE 0x1000
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// from extractor
|
|
||||||
typedef unsigned char uint8;
|
extern ArchiveSet gOpenArchives;
|
||||||
typedef unsigned short uint16;
|
|
||||||
typedef unsigned int uint32;
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char name[64];
|
char name[64];
|
||||||
|
|
@ -51,26 +45,17 @@ typedef struct
|
||||||
}map_id;
|
}map_id;
|
||||||
|
|
||||||
map_id * map_ids;
|
map_id * map_ids;
|
||||||
uint16 * areas;
|
uint16 *LiqType = 0;
|
||||||
uint16 *areamax;
|
|
||||||
uint32 map_count;
|
uint32 map_count;
|
||||||
char output_path[128]=".";
|
char output_path[128]=".";
|
||||||
char input_path[1024]=".";
|
char input_path[1024]=".";
|
||||||
bool hasInputPathParam = false;
|
bool hasInputPathParam = false;
|
||||||
char tmp[512];
|
|
||||||
bool preciseVectorData = false;
|
bool preciseVectorData = false;
|
||||||
//char gamepath[1024];
|
|
||||||
|
|
||||||
//Convert function
|
|
||||||
//bool ConvertADT(char*,char*);
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
|
||||||
//static const char * szWorkDirMaps = ".\\Maps";
|
//static const char * szWorkDirMaps = ".\\Maps";
|
||||||
static const char * szWorkDirWmo = ".\\buildings";
|
const char * szWorkDirWmo = "./Buildings";
|
||||||
|
|
||||||
//static LPBYTE pbBuffer1 = NULL;
|
|
||||||
//static LPBYTE pbBuffer2 = NULL;
|
|
||||||
|
|
||||||
// Local testing functions
|
// Local testing functions
|
||||||
|
|
||||||
|
|
@ -79,6 +64,15 @@ static void clreol()
|
||||||
printf("\r \r");
|
printf("\r \r");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void strToLower(char* str)
|
||||||
|
{
|
||||||
|
while(*str)
|
||||||
|
{
|
||||||
|
*str=tolower(*str);
|
||||||
|
++str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static const char * GetPlainName(const char * szFileName)
|
static const char * GetPlainName(const char * szFileName)
|
||||||
{
|
{
|
||||||
const char * szTemp;
|
const char * szTemp;
|
||||||
|
|
@ -88,56 +82,55 @@ static const char * GetPlainName(const char * szFileName)
|
||||||
return szFileName;
|
return szFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowProcessedFile(const char * szFileName)
|
// copied from contrib/extractor/System.cpp
|
||||||
|
void ReadLiquidTypeTableDBC()
|
||||||
{
|
{
|
||||||
/* not truncate file names in output
|
printf("Read LiquidType.dbc file...");
|
||||||
char szLine[80];
|
DBCFile dbc("DBFilesClient\\LiquidType.dbc");
|
||||||
size_t nLength = strlen(szFileName);
|
if(!dbc.open())
|
||||||
|
{
|
||||||
|
printf("Fatal error: Invalid LiquidType.dbc file format!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
memset(szLine, 0x20, sizeof(szLine));
|
size_t LiqType_count = dbc.getRecordCount();
|
||||||
szLine[sizeof(szLine)-1] = 0;
|
size_t LiqType_maxid = dbc.getRecord(LiqType_count - 1).getUInt(0);
|
||||||
|
LiqType = new uint16[LiqType_maxid + 1];
|
||||||
|
memset(LiqType, 0xff, (LiqType_maxid + 1) * sizeof(uint16));
|
||||||
|
|
||||||
if(nLength > sizeof(szLine)-1)
|
for(uint32 x = 0; x < LiqType_count; ++x)
|
||||||
nLength = sizeof(szLine)-1;
|
LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
|
||||||
memcpy(szLine, szFileName, nLength);
|
|
||||||
printf("\r%s\n", szLine);
|
printf("Done! (%u LiqTypes loaded)\n", (unsigned int)LiqType_count);
|
||||||
*/
|
|
||||||
printf("\r%s\n", szFileName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ExtractWmo()
|
int ExtractWmo()
|
||||||
{
|
{
|
||||||
char* szListFile = "";
|
char szLocalFile[1024] = "";
|
||||||
char szLocalFile[MAX_PATH] = "";
|
bool success=true;
|
||||||
BOOL bResult = FALSE;
|
|
||||||
|
|
||||||
//const char* ParsArchiveNames[] = {"patch-2.MPQ", "patch.MPQ", "common.MPQ", "expansion.MPQ"};
|
//const char* ParsArchiveNames[] = {"patch-2.MPQ", "patch.MPQ", "common.MPQ", "expansion.MPQ"};
|
||||||
|
|
||||||
int nError = ERROR_SUCCESS;
|
for (ArchiveSet::const_iterator ar_itr = gOpenArchives.begin(); ar_itr != gOpenArchives.end() && success; ++ar_itr)
|
||||||
if(szListFile == NULL || *szListFile == 0)
|
{
|
||||||
szListFile = NULL;
|
vector<string> filelist;
|
||||||
|
|
||||||
for (ArchiveSet::const_iterator ar_itr = gOpenArchives.archives.begin(); ar_itr != gOpenArchives.archives.end(); ++ar_itr)
|
(*ar_itr)->GetFileListTo(filelist);
|
||||||
|
for (vector<string>::iterator fname=filelist.begin(); fname != filelist.end() && success; ++fname)
|
||||||
|
{
|
||||||
|
bool file_ok=true;
|
||||||
|
if (fname->find(".wmo") != string::npos)
|
||||||
{
|
{
|
||||||
// Copy files from archive
|
// Copy files from archive
|
||||||
if(nError == ERROR_SUCCESS)
|
//std::cout << "found *.wmo file " << *fname << std::endl;
|
||||||
{
|
sprintf(szLocalFile, "%s/%s", szWorkDirWmo, GetPlainName(fname->c_str()));
|
||||||
SFILE_FIND_DATA wf;
|
|
||||||
HANDLE hFind = SFileFindFirstFile(ar_itr->hMPQ,"*.wmo*", &wf, szListFile);
|
|
||||||
bResult = TRUE;
|
|
||||||
|
|
||||||
while(hFind != NULL && bResult == TRUE)
|
|
||||||
{
|
|
||||||
ShowProcessedFile(wf.cFileName);
|
|
||||||
SFileSetLocale(wf.lcLocale);
|
|
||||||
sprintf(szLocalFile, "%s\\%s", szWorkDirWmo, GetPlainName(wf.cFileName));
|
|
||||||
fixnamen(szLocalFile,strlen(szLocalFile));
|
fixnamen(szLocalFile,strlen(szLocalFile));
|
||||||
FILE * n;
|
FILE * n;
|
||||||
if ((n = fopen(szLocalFile, "rb"))== NULL)
|
if ((n = fopen(szLocalFile, "rb"))== NULL)
|
||||||
{
|
{
|
||||||
int p = 0;
|
int p = 0;
|
||||||
//Select root wmo files
|
//Select root wmo files
|
||||||
const char * rchr = strrchr(GetPlainName(wf.cFileName),0x5f);
|
const char * rchr = strrchr(GetPlainName(fname->c_str()),0x5f);
|
||||||
if(rchr != NULL)
|
if(rchr != NULL)
|
||||||
{
|
{
|
||||||
char cpy[4];
|
char cpy[4];
|
||||||
|
|
@ -151,67 +144,67 @@ int ExtractWmo()
|
||||||
}
|
}
|
||||||
if(p != 3)
|
if(p != 3)
|
||||||
{
|
{
|
||||||
//printf("RootWmo!\n");
|
std::cout << "Extracting " << *fname << std::endl;
|
||||||
string s = wf.cFileName;
|
WMORoot * froot = new WMORoot(*fname);
|
||||||
WMORoot * froot = new WMORoot(s);
|
|
||||||
if(!froot->open())
|
if(!froot->open())
|
||||||
{
|
{
|
||||||
printf("Not open RootWmo!!!\n");
|
printf("Couldn't open RootWmo!!!\n");
|
||||||
bResult = SFileFindNextFile(hFind, &wf);
|
delete froot;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
FILE *output=fopen(szLocalFile,"wb");
|
FILE *output=fopen(szLocalFile,"wb");
|
||||||
|
if(!output)
|
||||||
|
{
|
||||||
|
printf("couldn't open %s for writing!\n", szLocalFile);
|
||||||
|
success=false;
|
||||||
|
}
|
||||||
froot->ConvertToVMAPRootWmo(output);
|
froot->ConvertToVMAPRootWmo(output);
|
||||||
int Wmo_nVertices = 0;
|
int Wmo_nVertices = 0;
|
||||||
|
//printf("root has %d groups\n", froot->nGroups);
|
||||||
if(froot->nGroups !=0)
|
if(froot->nGroups !=0)
|
||||||
{
|
{
|
||||||
for (int i=0; i<froot->nGroups; ++i)
|
for (uint32 i=0; i<froot->nGroups; ++i)
|
||||||
{
|
{
|
||||||
char temp[MAX_PATH];
|
char temp[1024];
|
||||||
strcpy(temp, wf.cFileName);
|
strcpy(temp, fname->c_str());
|
||||||
temp[strlen(wf.cFileName)-4] = 0;
|
temp[fname->length()-4] = 0;
|
||||||
char groupFileName[MAX_PATH];
|
char groupFileName[1024];
|
||||||
sprintf(groupFileName,"%s_%03d.wmo",temp, i);
|
sprintf(groupFileName,"%s_%03d.wmo",temp, i);
|
||||||
printf("%s\n",groupFileName);
|
//printf("Trying to open groupfile %s\n",groupFileName);
|
||||||
//printf("GroupWmo!\n");
|
|
||||||
string s = groupFileName;
|
string s = groupFileName;
|
||||||
WMOGroup * fgroup = new WMOGroup(s);
|
WMOGroup * fgroup = new WMOGroup(s);
|
||||||
if(!fgroup->open())
|
if(!fgroup->open())
|
||||||
{
|
{
|
||||||
printf("Not all open Group file for: %s\n",GetPlainName(wf.cFileName));
|
printf("Could not open all Group file for: %s\n",GetPlainName(fname->c_str()));
|
||||||
bResult = SFileFindNextFile(hFind, &wf);
|
file_ok=false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Wmo_nVertices += fgroup->ConvertToVMAPGroupWmo(output, preciseVectorData);
|
|
||||||
|
Wmo_nVertices += fgroup->ConvertToVMAPGroupWmo(output, froot, preciseVectorData);
|
||||||
|
delete fgroup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fseek(output, 8, SEEK_SET); // store the correct no of vertices
|
fseek(output, 8, SEEK_SET); // store the correct no of vertices
|
||||||
fwrite(&Wmo_nVertices,sizeof(int),1,output);
|
fwrite(&Wmo_nVertices,sizeof(int),1,output);
|
||||||
fclose(output);
|
fclose(output);
|
||||||
|
delete froot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fclose(n);
|
fclose(n);
|
||||||
}
|
}
|
||||||
wf.dwFileFlags &= ~MPQ_FILE_HAS_EXTRA;
|
|
||||||
wf.dwFileFlags &= ~MPQ_FILE_EXISTS;
|
|
||||||
// Find the next file
|
|
||||||
bResult = SFileFindNextFile(hFind, &wf);
|
|
||||||
}
|
}
|
||||||
// Delete the extracted file in the case of an error
|
// Delete the extracted file in the case of an error
|
||||||
if(nError != ERROR_SUCCESS)
|
if(!file_ok)
|
||||||
DeleteFile(szLocalFile);
|
remove(szLocalFile);
|
||||||
// Close the search handle
|
|
||||||
if(hFind != NULL)
|
|
||||||
SFileFindClose(hFind);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nError == ERROR_SUCCESS)
|
if(success)
|
||||||
printf("\nExtract wmo complete (No errors)\n");
|
printf("\nExtract wmo complete (No (fatal) errors)\n");
|
||||||
|
|
||||||
return nError;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtractMapsFromMpq()
|
void ExtractMapsFromMpq()
|
||||||
|
|
@ -221,55 +214,34 @@ void ExtractMapsFromMpq()
|
||||||
void ParsMapFiles()
|
void ParsMapFiles()
|
||||||
{
|
{
|
||||||
char fn[512];
|
char fn[512];
|
||||||
char id_filename[64];
|
//char id_filename[64];
|
||||||
char id[10];
|
char id[10];
|
||||||
for (unsigned int i=0; i<map_count; ++i)
|
for (unsigned int i=0; i<map_count; ++i)
|
||||||
{
|
{
|
||||||
sprintf(id,"%03u",map_ids[i].id);
|
sprintf(id,"%03u",map_ids[i].id);
|
||||||
sprintf(fn,"World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name);
|
sprintf(fn,"World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name);
|
||||||
WDTFile WDT(fn,map_ids[i].name);
|
WDTFile WDT(fn,map_ids[i].name);
|
||||||
if(WDT.init(id))
|
if(WDT.init(id, map_ids[i].id))
|
||||||
{
|
{
|
||||||
|
printf("Processing Map %u\n[", map_ids[i].id);
|
||||||
for (int x=0; x<64; ++x)
|
for (int x=0; x<64; ++x)
|
||||||
{
|
{
|
||||||
for (int y=0; y<64; ++y)
|
for (int y=0; y<64; ++y)
|
||||||
{
|
{
|
||||||
if (ADTFile*ADT = WDT.GetMap(x,y))
|
if (ADTFile *ADT = WDT.GetMap(x,y))
|
||||||
{
|
{
|
||||||
sprintf(id_filename,"%02u %02u %03u",x,y,map_ids[i].id);//!!!!!!!!!
|
//sprintf(id_filename,"%02u %02u %03u",x,y,map_ids[i].id);//!!!!!!!!!
|
||||||
ADT->init(id_filename);
|
ADT->init(map_ids[i].id, x, y);
|
||||||
delete ADT;
|
delete ADT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf("#");
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
printf("]\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
void ParsMapFiles()
|
|
||||||
{
|
|
||||||
char fn[512];
|
|
||||||
for (unsigned int i=0; i<map_count; ++i)
|
|
||||||
{
|
|
||||||
sprintf(fn,"World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name);
|
|
||||||
WDTFile WDT(fn,map_ids[i].name);
|
|
||||||
if(WDT.init())
|
|
||||||
{
|
|
||||||
for (int x=0; x<64; ++x)
|
|
||||||
{
|
|
||||||
for (int y=0; y<64; ++y)
|
|
||||||
{
|
|
||||||
if (ADTFile*ADT = WDT.GetMap(x,y))
|
|
||||||
{
|
|
||||||
ADT->init();
|
|
||||||
delete ADT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void getGamePath()
|
void getGamePath()
|
||||||
{
|
{
|
||||||
|
|
@ -289,7 +261,7 @@ void getGamePath()
|
||||||
}
|
}
|
||||||
strcat(input_path,"Data\\");
|
strcat(input_path,"Data\\");
|
||||||
#else
|
#else
|
||||||
strcpy(input_path,"data/");
|
strcpy(input_path,"Data/");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -297,37 +269,28 @@ bool scan_patches(char* scanmatch, std::vector<std::string>& pArchiveNames)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char path[512];
|
char path[512];
|
||||||
std::list<std::string> matches;
|
|
||||||
|
|
||||||
WIN32_FIND_DATA ffData;
|
|
||||||
HANDLE hFind;
|
|
||||||
|
|
||||||
for (i = 1; i <= 99; i++)
|
for (i = 1; i <= 99; i++)
|
||||||
{
|
{
|
||||||
if (i != 1)
|
if (i != 1)
|
||||||
{
|
{
|
||||||
sprintf(path, "%s-%d.mpq", scanmatch, i);
|
sprintf(path, "%s-%d.MPQ", scanmatch, i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(path, "%s.mpq", scanmatch);
|
sprintf(path, "%s.MPQ", scanmatch);
|
||||||
}
|
}
|
||||||
|
#ifdef __linux__
|
||||||
hFind = INVALID_HANDLE_VALUE;
|
if(FILE* h = fopen64(path, "rb"))
|
||||||
hFind = FindFirstFile(path, &ffData);
|
#else
|
||||||
if (hFind == INVALID_HANDLE_VALUE) break;
|
if(FILE* h = fopen(path, "rb"))
|
||||||
FindClose(hFind);
|
#endif
|
||||||
|
|
||||||
matches.push_back(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
matches.reverse();
|
|
||||||
for (std::list<std::string>::iterator i = matches.begin(); i != matches.end(); ++i)
|
|
||||||
{
|
{
|
||||||
pArchiveNames.push_back(i->c_str());
|
fclose(h);
|
||||||
|
//matches.push_back(path);
|
||||||
|
pArchiveNames.push_back(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
@ -340,96 +303,75 @@ bool fillArchiveNameVector(std::vector<std::string>& pArchiveNames)
|
||||||
printf("\nGame path: %s\n", input_path);
|
printf("\nGame path: %s\n", input_path);
|
||||||
|
|
||||||
char path[512];
|
char path[512];
|
||||||
std::vector<std::string> locales;
|
string in_path(input_path);
|
||||||
|
std::vector<std::string> locales, searchLocales;
|
||||||
|
|
||||||
// scan game directories
|
searchLocales.push_back("enGB");
|
||||||
WIN32_FIND_DATA ffData;
|
searchLocales.push_back("enUS");
|
||||||
HANDLE hFind;
|
searchLocales.push_back("deDE");
|
||||||
DWORD dwError;
|
searchLocales.push_back("esES");
|
||||||
|
searchLocales.push_back("frFR");
|
||||||
|
searchLocales.push_back("koKR");
|
||||||
|
searchLocales.push_back("ruRU");
|
||||||
|
|
||||||
// first, scan for locales (4-letter directories)
|
for (std::vector<std::string>::iterator i = searchLocales.begin(); i != searchLocales.end(); ++i)
|
||||||
printf("Scanning for locales.\n");
|
|
||||||
sprintf(path, "%s*.*", input_path);
|
|
||||||
hFind = INVALID_HANDLE_VALUE;
|
|
||||||
hFind = FindFirstFile(path, &ffData);
|
|
||||||
if (hFind == INVALID_HANDLE_VALUE)
|
|
||||||
{
|
{
|
||||||
printf("\nCould not open data directory for reading. Aborting.\n");
|
std::string localePath = in_path + *i;
|
||||||
return(false);
|
// check if locale exists:
|
||||||
}
|
struct stat status;
|
||||||
do
|
if (stat(localePath.c_str(), &status))
|
||||||
{
|
continue;
|
||||||
if (ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
if ((status.st_mode & S_IFDIR) == 0)
|
||||||
{
|
continue;
|
||||||
if (ffData.cFileName[0] != '.')
|
printf("Found locale '%s'\n", i->c_str());
|
||||||
{
|
locales.push_back(*i);
|
||||||
if (strlen(ffData.cFileName) == 4)
|
|
||||||
{
|
|
||||||
printf("Found locale: %s\n", ffData.cFileName);
|
|
||||||
locales.push_back(ffData.cFileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (FindNextFile(hFind, &ffData) != 0);
|
|
||||||
dwError = GetLastError();
|
|
||||||
FindClose(hFind);
|
|
||||||
if (dwError != ERROR_NO_MORE_FILES)
|
|
||||||
{
|
|
||||||
printf("\nError reading data directory while scanning locales. Aborting.\n");
|
|
||||||
return(false);
|
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (locales.size() == 0)
|
// open locale expansion and common files
|
||||||
|
printf("Adding data files from locale directories.\n");
|
||||||
|
for (std::vector<std::string>::iterator i = locales.begin(); i != locales.end(); ++i)
|
||||||
{
|
{
|
||||||
printf("Sorry, no locales found. Aborting.\n");
|
pArchiveNames.push_back(in_path + *i + "/locale-" + *i + ".MPQ");
|
||||||
return(false);
|
pArchiveNames.push_back(in_path + *i + "/expansion-locale-" + *i + ".MPQ");
|
||||||
|
pArchiveNames.push_back(in_path + *i + "/lichking-locale-" + *i + ".MPQ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open expansion and common files
|
||||||
|
pArchiveNames.push_back(input_path + string("common.MPQ"));
|
||||||
|
pArchiveNames.push_back(input_path + string("common-2.MPQ"));
|
||||||
|
pArchiveNames.push_back(input_path + string("expansion.MPQ"));
|
||||||
|
pArchiveNames.push_back(input_path + string("lichking.MPQ"));
|
||||||
|
|
||||||
// now, scan for the patch levels in the core dir
|
// now, scan for the patch levels in the core dir
|
||||||
printf("Loading patch levels from data directory.\n");
|
printf("Scanning patch levels from data directory.\n");
|
||||||
sprintf(path, "%spatch", input_path);
|
sprintf(path, "%spatch", input_path);
|
||||||
if (!scan_patches(path, pArchiveNames))
|
if (!scan_patches(path, pArchiveNames))
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
// now, scan for the patch levels in locale dirs
|
// now, scan for the patch levels in locale dirs
|
||||||
printf("Loading patch levels from locale directories.\n");
|
printf("Scanning patch levels from locale directories.\n");
|
||||||
|
bool foundOne = false;
|
||||||
for (std::vector<std::string>::iterator i = locales.begin(); i != locales.end(); ++i)
|
for (std::vector<std::string>::iterator i = locales.begin(); i != locales.end(); ++i)
|
||||||
{
|
{
|
||||||
printf("Locale: %s\n", i->c_str());
|
printf("Locale: %s\n", i->c_str());
|
||||||
sprintf(path, "%s%s\\patch-%s", input_path, i->c_str(), i->c_str());
|
sprintf(path, "%s%s/patch-%s", input_path, i->c_str(), i->c_str());
|
||||||
if (!scan_patches(path, pArchiveNames)) return(false);
|
if(scan_patches(path, pArchiveNames))
|
||||||
|
foundOne = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// open expansion and common files
|
|
||||||
printf("Opening data files from data directory.\n");
|
|
||||||
sprintf(path, "%slichking.mpq", input_path);
|
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
sprintf(path, "%scommon-2.mpq", input_path);
|
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
sprintf(path, "%sexpansion.mpq", input_path);
|
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
sprintf(path, "%scommon.mpq", input_path);
|
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
// open locale expansion and common files
|
if(!foundOne)
|
||||||
printf("Opening data files from locale directories.\n");
|
|
||||||
for (std::vector<std::string>::iterator i = locales.begin(); i != locales.end(); ++i)
|
|
||||||
{
|
{
|
||||||
printf("Locale: %s\n", i->c_str());
|
printf("no locale found\n");
|
||||||
sprintf(path, "%s%s\\lichking-locale-%s.mpq", input_path, i->c_str(), i->c_str());
|
return false;
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
sprintf(path, "%s%s\\expansion-locale-%s.mpq", input_path, i->c_str(), i->c_str());
|
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
sprintf(path, "%s%s\\locale-%s.mpq", input_path, i->c_str(), i->c_str());
|
|
||||||
pArchiveNames.push_back(path);
|
|
||||||
printf("\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool processArgv(int argc, char ** argv, char*versionString)
|
bool processArgv(int argc, char ** argv, const char *versionString)
|
||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
hasInputPathParam = false;
|
hasInputPathParam = false;
|
||||||
|
|
@ -448,7 +390,7 @@ bool processArgv(int argc, char ** argv, char*versionString)
|
||||||
hasInputPathParam = true;
|
hasInputPathParam = true;
|
||||||
strcpy(input_path, argv[i+1]);
|
strcpy(input_path, argv[i+1]);
|
||||||
if (input_path[strlen(input_path) - 1] != '\\' || input_path[strlen(input_path) - 1] != '/')
|
if (input_path[strlen(input_path) - 1] != '\\' || input_path[strlen(input_path) - 1] != '/')
|
||||||
strcat(input_path, "\\");
|
strcat(input_path, "/");
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -493,52 +435,63 @@ bool processArgv(int argc, char ** argv, char*versionString)
|
||||||
|
|
||||||
int main(int argc, char ** argv)
|
int main(int argc, char ** argv)
|
||||||
{
|
{
|
||||||
//char tmp[512];
|
bool success=true;
|
||||||
// FILE* pDatei;
|
const char *versionString = "V2.90 2010_05";
|
||||||
// char tmp[512];
|
|
||||||
// char tmp1[512];
|
|
||||||
//char tmp2[512];
|
|
||||||
// char tmp3[512];
|
|
||||||
// char tmp4[512];
|
|
||||||
// char szMpqName[MAX_PATH] = "";
|
|
||||||
// char szListFile[MAX_PATH] = "";
|
|
||||||
int nError = ERROR_SUCCESS;
|
|
||||||
char *versionString = "V2.4 2007_07_12";
|
|
||||||
|
|
||||||
// Use command line arguments, when some
|
// Use command line arguments, when some
|
||||||
if(!processArgv(argc, argv, versionString))
|
if(!processArgv(argc, argv, versionString))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
// some simple check if working dir is dirty
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::string sdir = std::string(szWorkDirWmo) + "/dir";
|
||||||
|
std::string sdir_bin = std::string(szWorkDirWmo) + "/dir_bin";
|
||||||
|
struct stat status;
|
||||||
|
if (!stat(sdir.c_str(), &status) || !stat(sdir_bin.c_str(), &status))
|
||||||
|
{
|
||||||
|
printf("Your output directory seems to be polluted, please use an empty directory!\n");
|
||||||
|
printf("<press return to exit>");
|
||||||
|
char garbage[2];
|
||||||
|
scanf("%c", garbage);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf("Extract %s. Beginning work ....\n",versionString);
|
printf("Extract %s. Beginning work ....\n",versionString);
|
||||||
// Set the lowest priority to allow running in the background
|
|
||||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
|
|
||||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
// Create the working directory
|
// Create the working directory
|
||||||
if(nError == ERROR_SUCCESS)
|
if(mkdir(szWorkDirWmo
|
||||||
{
|
#ifdef __linux__
|
||||||
//if(!CreateDirectory(szWorkDirMaps, NULL))
|
, 0711
|
||||||
// nError = GetLastError();
|
#endif
|
||||||
if(!CreateDirectory(szWorkDirWmo, NULL))
|
))
|
||||||
nError = GetLastError();
|
success = (errno == EEXIST);
|
||||||
if(nError == ERROR_ALREADY_EXISTS)
|
|
||||||
nError = ERROR_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// prepare archive name list
|
// prepare archive name list
|
||||||
std::vector<std::string> archiveNames;
|
std::vector<std::string> archiveNames;
|
||||||
fillArchiveNameVector(archiveNames);
|
fillArchiveNameVector(archiveNames);
|
||||||
if(!gOpenArchives.Open(archiveNames))
|
for (size_t i=0; i < archiveNames.size(); ++i)
|
||||||
|
{
|
||||||
|
MPQArchive *archive = new MPQArchive(archiveNames[i].c_str());
|
||||||
|
if(!gOpenArchives.size() || gOpenArchives.front() != archive)
|
||||||
|
delete archive;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(gOpenArchives.empty())
|
||||||
{
|
{
|
||||||
printf("FATAL ERROR: None MPQ archive found by path '%s'. Use -d option with proper path.\n",input_path);
|
printf("FATAL ERROR: None MPQ archive found by path '%s'. Use -d option with proper path.\n",input_path);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
ReadLiquidTypeTableDBC();
|
||||||
|
|
||||||
// extract data
|
// extract data
|
||||||
ExtractWmo();
|
if(success)
|
||||||
|
success = ExtractWmo();
|
||||||
|
|
||||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
//map.dbc
|
//map.dbc
|
||||||
if(nError == ERROR_SUCCESS)
|
if(success)
|
||||||
{
|
{
|
||||||
DBCFile * dbc = new DBCFile("DBFilesClient\\Map.dbc");
|
DBCFile * dbc = new DBCFile("DBFilesClient\\Map.dbc");
|
||||||
if(!dbc->open())
|
if(!dbc->open())
|
||||||
|
|
@ -556,18 +509,21 @@ int main(int argc, char ** argv)
|
||||||
printf("Map - %s\n",map_ids[x].name);
|
printf("Map - %s\n",map_ids[x].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
delete dbc;
|
delete dbc;
|
||||||
ParsMapFiles();
|
ParsMapFiles();
|
||||||
delete [] map_ids;
|
delete [] map_ids;
|
||||||
nError = ERROR_SUCCESS;
|
//nError = ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
clreol();
|
clreol();
|
||||||
if(nError != ERROR_SUCCESS)
|
if(!success)
|
||||||
{
|
{
|
||||||
printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData);
|
printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData);
|
||||||
_getch();
|
getchar();
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Extract %s. Work complete. No errors.",versionString);
|
printf("Extract %s. Work complete. No errors.\n",versionString);
|
||||||
|
delete [] LiqType;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
contrib/vmap_extractor_v2/vmapextract/vmapexport.h
Normal file
13
contrib/vmap_extractor_v2/vmapextract/vmapexport.h
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef VMAPEXPORT_H
|
||||||
|
#define VMAPEXPORT_H
|
||||||
|
|
||||||
|
enum ModelFlags
|
||||||
|
{
|
||||||
|
MOD_M2 = 1,
|
||||||
|
MOD_WORLDSPAWN = 1<<1,
|
||||||
|
MOD_HAS_BOUND = 1<<2
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const char * szWorkDirWmo;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#define __STORMLIB_SELF__
|
#include "vmapexport.h"
|
||||||
|
|
||||||
#include "wdtfile.h"
|
#include "wdtfile.h"
|
||||||
#include "adtfile.h"
|
#include "adtfile.h"
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
char * wdtGetPlainName(char * FileName)
|
char * wdtGetPlainName(char * FileName)
|
||||||
{
|
{
|
||||||
|
|
@ -17,7 +17,7 @@ WDTFile::WDTFile(char* file_name, char* file_name1):WDT(file_name)
|
||||||
filename.append(file_name1,strlen(file_name1));
|
filename.append(file_name1,strlen(file_name1));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WDTFile::init(char *map_id)
|
bool WDTFile::init(char *map_id, unsigned int mapID)
|
||||||
{
|
{
|
||||||
if (WDT.isEof())
|
if (WDT.isEof())
|
||||||
{
|
{
|
||||||
|
|
@ -26,14 +26,14 @@ bool WDTFile::init(char *map_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
char fourcc[5];
|
char fourcc[5];
|
||||||
size_t size;
|
uint32 size;
|
||||||
|
|
||||||
const char dirname[] = "buildings\\dir";
|
std::string dirname = std::string(szWorkDirWmo) + "/dir_bin";
|
||||||
FILE *dirfile;
|
FILE *dirfile;
|
||||||
dirfile = fopen(dirname, "ab");
|
dirfile = fopen(dirname.c_str(), "ab");
|
||||||
if(!dirfile)
|
if(!dirfile)
|
||||||
{
|
{
|
||||||
printf("Can't open dirfile!'%s'\n");
|
printf("Can't open dirfile!'%s'\n", dirname.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ bool WDTFile::init(char *map_id)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
WDT.read(&id, 4);
|
WDT.read(&id, 4);
|
||||||
WMOInstance inst(WDT,gWmoInstansName[id].c_str(),gWMO_mapname.c_str(), dirfile);
|
WMOInstance inst(WDT,gWmoInstansName[id].c_str(),mapID, 65, 65, dirfile);
|
||||||
}
|
}
|
||||||
delete[] gWmoInstansName;
|
delete[] gWmoInstansName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#ifndef WDTFILE_H
|
#ifndef WDTFILE_H
|
||||||
#define WDTFILE_H
|
#define WDTFILE_H
|
||||||
|
|
||||||
#define __STORMLIB_SELF__
|
#include "mpq_libmpq04.h"
|
||||||
|
|
||||||
#include "mpq.h"
|
|
||||||
#include "adtfile.h"
|
|
||||||
#include "wmo.h"
|
#include "wmo.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
|
|
||||||
|
class ADTFile;
|
||||||
|
|
||||||
class WDTFile
|
class WDTFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WDTFile(char* file_name, char* file_name1);
|
WDTFile(char* file_name, char* file_name1);
|
||||||
~WDTFile(void);
|
~WDTFile(void);
|
||||||
bool init(char *map_id);
|
bool init(char *map_id, unsigned int mapID);
|
||||||
|
|
||||||
string* gWmoInstansName;
|
string* gWmoInstansName;
|
||||||
int gnWMO, nMaps;
|
int gnWMO, nMaps;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,18 @@
|
||||||
#define __STORMLIB_SELF__
|
|
||||||
|
|
||||||
|
#include "vmapexport.h"
|
||||||
#include "wmo.h"
|
#include "wmo.h"
|
||||||
#include "Stormlib.h"
|
#include "vec3d.h"
|
||||||
#include "mpq.h"
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cassert>
|
||||||
|
#include <map>
|
||||||
|
#include <fstream>
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
|
#include "mpq_libmpq04.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
extern uint16 *LiqType;
|
||||||
|
|
||||||
WMORoot::WMORoot(std::string &filename) : filename(filename)
|
WMORoot::WMORoot(std::string &filename) : filename(filename)
|
||||||
{
|
{
|
||||||
|
|
@ -19,10 +27,8 @@ bool WMORoot::open()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t size;
|
uint32 size;
|
||||||
char fourcc[5];
|
char fourcc[5];
|
||||||
bbcorn1[3] = 0;
|
|
||||||
bbcorn2[3]= 0;
|
|
||||||
|
|
||||||
while (!f.isEof())
|
while (!f.isEof())
|
||||||
{
|
{
|
||||||
|
|
@ -44,9 +50,10 @@ bool WMORoot::open()
|
||||||
f.read(&nDoodads, 4);
|
f.read(&nDoodads, 4);
|
||||||
f.read(&nDoodadSets, 4);
|
f.read(&nDoodadSets, 4);
|
||||||
f.read(&col, 4);
|
f.read(&col, 4);
|
||||||
f.read(&RootID, 4);
|
f.read(&RootWMOID, 4);
|
||||||
f.read(bbcorn1,12);
|
f.read(bbcorn1,12);
|
||||||
f.read(bbcorn2,12);
|
f.read(bbcorn2,12);
|
||||||
|
f.read(&liquidType, 4);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
@ -100,10 +107,11 @@ bool WMORoot::ConvertToVMAPRootWmo(FILE *pOutfile)
|
||||||
{
|
{
|
||||||
//printf("Convert RootWmo...\n");
|
//printf("Convert RootWmo...\n");
|
||||||
|
|
||||||
fwrite("VMAP002",1,8,pOutfile);
|
fwrite("VMAP003",1,8,pOutfile);
|
||||||
unsigned int nVectors = 0;
|
unsigned int nVectors = 0;
|
||||||
fwrite(&nVectors,sizeof(nVectors),1,pOutfile); // will be filled later
|
fwrite(&nVectors,sizeof(nVectors),1,pOutfile); // will be filled later
|
||||||
fwrite(&nGroups,4,1,pOutfile);
|
fwrite(&nGroups,4,1,pOutfile);
|
||||||
|
fwrite(&RootWMOID,4,1,pOutfile);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,7 +119,8 @@ WMORoot::~WMORoot()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
WMOGroup::WMOGroup(std::string &filename) : filename(filename)
|
WMOGroup::WMOGroup(std::string &filename) : filename(filename),
|
||||||
|
MOPY(0), MOVI(0), MoviEx(0), MOVT(0), MOBA(0), MobaEx(0), hlq(0), LiquEx(0), LiquBytes(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,10 +132,8 @@ bool WMOGroup::open()
|
||||||
printf("No such file.\n");
|
printf("No such file.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
size_t size;
|
uint32 size;
|
||||||
char fourcc[5];
|
char fourcc[5];
|
||||||
bbcorn1[3] = 0;
|
|
||||||
bbcorn2[3] = 0;
|
|
||||||
while (!f.isEof())
|
while (!f.isEof())
|
||||||
{
|
{
|
||||||
f.read(fourcc,4);
|
f.read(fourcc,4);
|
||||||
|
|
@ -143,19 +150,20 @@ bool WMOGroup::open()
|
||||||
|
|
||||||
if (!strcmp(fourcc,"MOGP"))//header
|
if (!strcmp(fourcc,"MOGP"))//header
|
||||||
{
|
{
|
||||||
f.seekRelative(-4);
|
f.read(&groupName, 4);
|
||||||
f.read(&offsize, 4);
|
f.read(&descGroupName, 4);
|
||||||
f.read(&flag, 4);
|
f.read(&mogpFlags, 4);
|
||||||
f.read(&flag1, 4);
|
|
||||||
f.read(&Xid, 4);
|
|
||||||
f.read(bbcorn1, 12);
|
f.read(bbcorn1, 12);
|
||||||
f.read(bbcorn2, 12);
|
f.read(bbcorn2, 12);
|
||||||
f.read(&Xid2, 4);
|
f.read(&moprIdx, 2);
|
||||||
f.read(&Xid3, 4);
|
f.read(&moprNItems, 2);
|
||||||
f.read(&zero1, 4);
|
f.read(&nBatchA, 2);
|
||||||
f.read(&Xflag, 4);
|
f.read(&nBatchB, 2);
|
||||||
f.read(&nTexture,4);
|
f.read(&nBatchC, 4);
|
||||||
f.read(&GroupID,4);
|
f.read(&fogIdx, 4);
|
||||||
|
f.read(&liquidType, 4);
|
||||||
|
f.read(&groupWMOID,4);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (!strcmp(fourcc,"MOPY"))
|
else if (!strcmp(fourcc,"MOPY"))
|
||||||
{
|
{
|
||||||
|
|
@ -190,26 +198,21 @@ bool WMOGroup::open()
|
||||||
else if (!strcmp(fourcc,"MLIQ"))
|
else if (!strcmp(fourcc,"MLIQ"))
|
||||||
{
|
{
|
||||||
liquflags |= 1;
|
liquflags |= 1;
|
||||||
WMOLiquidHeader hlq;
|
hlq = new WMOLiquidHeader;
|
||||||
f.read(&hlq, 0x1E);
|
f.read(hlq, 0x1E);
|
||||||
float ydir = -1.0f;
|
LiquEx_size = sizeof(WMOLiquidVert) * hlq->xverts * hlq->yverts;
|
||||||
hlq_xverts = hlq.xverts;
|
LiquEx = new WMOLiquidVert[hlq->xverts * hlq->yverts];
|
||||||
hlq_yverts = hlq.yverts;
|
f.read(LiquEx, LiquEx_size);
|
||||||
int noVer = hlq.xverts * hlq.yverts;
|
int nLiquBytes = hlq->xtiles * hlq->ytiles;
|
||||||
float tilesize = CHUNKSIZE / 8.0f;
|
LiquBytes = new char[nLiquBytes];
|
||||||
LiquEx_size = sizeof(float) * 3 * noVer;
|
f.read(LiquBytes, nLiquBytes);
|
||||||
LiquEx = new float[sizeof(float) * 3 * noVer];
|
|
||||||
int p = 0;
|
|
||||||
|
|
||||||
for (int j=0; j<hlq.yverts; ++j)
|
/* std::ofstream llog("Buildings/liquid.log", ios_base::out | ios_base::app);
|
||||||
{
|
llog << filename;
|
||||||
for (int i=0; i<hlq.xverts; ++i)
|
llog << "\nbbox: " << bbcorn1[0] << ", " << bbcorn1[1] << ", " << bbcorn1[2] << " | " << bbcorn2[0] << ", " << bbcorn2[1] << ", " << bbcorn2[2];
|
||||||
{
|
llog << "\nlpos: " << hlq->pos_x << ", " << hlq->pos_y << ", " << hlq->pos_z;
|
||||||
LiquEx[p++] = hlq.pos_x + tilesize * i;
|
llog << "\nx-/yvert: " << hlq->xverts << "/" << hlq->yverts << " size: " << size << " expected size: " << 30 + hlq->xverts*hlq->yverts*8 + hlq->xtiles*hlq->ytiles << std::endl;
|
||||||
LiquEx[p++] = hlq.pos_z;
|
llog.close(); */
|
||||||
LiquEx[p++] = ydir * (hlq.pos_y + tilesize * j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
f.seek((int)nextpos);
|
f.seek((int)nextpos);
|
||||||
}
|
}
|
||||||
|
|
@ -217,11 +220,17 @@ bool WMOGroup::open()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData)
|
int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool pPreciseVectorData)
|
||||||
{
|
{
|
||||||
|
fwrite(&mogpFlags,sizeof(uint32),1,output);
|
||||||
|
fwrite(&groupWMOID,sizeof(uint32),1,output);
|
||||||
|
// group bound
|
||||||
|
fwrite(bbcorn1, sizeof(float), 3, output);
|
||||||
|
fwrite(bbcorn2, sizeof(float), 3, output);
|
||||||
|
fwrite(&liquflags,sizeof(uint32),1,output);
|
||||||
|
int nColTriangles = 0;
|
||||||
if(pPreciseVectorData)
|
if(pPreciseVectorData)
|
||||||
{
|
{
|
||||||
fwrite(&liquflags,sizeof(uint32),1,output);
|
|
||||||
char GRP[] = "GRP ";
|
char GRP[] = "GRP ";
|
||||||
fwrite(GRP,1,4,output);
|
fwrite(GRP,1,4,output);
|
||||||
|
|
||||||
|
|
@ -232,7 +241,6 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData)
|
||||||
{
|
{
|
||||||
MobaEx[k++] = MOBA[i];
|
MobaEx[k++] = MOBA[i];
|
||||||
}
|
}
|
||||||
delete [] MOBA;
|
|
||||||
int moba_size_grp = moba_batch*4+4;
|
int moba_size_grp = moba_batch*4+4;
|
||||||
fwrite(&moba_size_grp,4,1,output);
|
fwrite(&moba_size_grp,4,1,output);
|
||||||
fwrite(&moba_batch,4,1,output);
|
fwrite(&moba_batch,4,1,output);
|
||||||
|
|
@ -291,21 +299,10 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(LiquEx_size != 0)
|
nColTriangles = nTriangles;
|
||||||
{
|
|
||||||
int LIQU_h[] = {0x5551494C,LiquEx_size+8,hlq_xverts,hlq_yverts};// "LIQU"
|
|
||||||
fwrite(LIQU_h,4,4,output);
|
|
||||||
fwrite(LiquEx,4,LiquEx_size/4,output);
|
|
||||||
delete [] LiquEx;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nTriangles;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//printf("Convert GroupWmo...\n");
|
|
||||||
//-------GRP -------------------------------------
|
|
||||||
fwrite(&liquflags,sizeof(uint32),1,output);
|
|
||||||
char GRP[] = "GRP ";
|
char GRP[] = "GRP ";
|
||||||
fwrite(GRP,1,4,output);
|
fwrite(GRP,1,4,output);
|
||||||
int k = 0;
|
int k = 0;
|
||||||
|
|
@ -315,7 +312,7 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData)
|
||||||
{
|
{
|
||||||
MobaEx[k++] = MOBA[i];
|
MobaEx[k++] = MOBA[i];
|
||||||
}
|
}
|
||||||
delete [] MOBA;
|
|
||||||
int moba_size_grp = moba_batch*4+4;
|
int moba_size_grp = moba_batch*4+4;
|
||||||
fwrite(&moba_size_grp,4,1,output);
|
fwrite(&moba_size_grp,4,1,output);
|
||||||
fwrite(&moba_batch,4,1,output);
|
fwrite(&moba_batch,4,1,output);
|
||||||
|
|
@ -324,146 +321,106 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData)
|
||||||
|
|
||||||
//-------INDX------------------------------------
|
//-------INDX------------------------------------
|
||||||
//-------MOPY--------
|
//-------MOPY--------
|
||||||
int n = 0;
|
MoviEx = new uint16[nTriangles*3]; // "worst case" size...
|
||||||
int j = 0;
|
int *IndexRenum = new int[nVertices];
|
||||||
MopyEx = new char[mopy_size];
|
memset(IndexRenum, 0xFF, nVertices*sizeof(int));
|
||||||
IndexExTr = new int[mopy_size];
|
for (int i=0; i<nTriangles; ++i)
|
||||||
for (int i=0; i<mopy_size; i+=2)
|
|
||||||
{
|
{
|
||||||
// Skip no collision triangles
|
// Skip no collision triangles
|
||||||
if ((int)MOPY[i]&WMO_MATERIAL_NO_COLLISION)
|
if (MOPY[2*i]&WMO_MATERIAL_NO_COLLISION ||
|
||||||
|
!(MOPY[2*i]&(WMO_MATERIAL_HINT|WMO_MATERIAL_COLLIDE_HIT)) )
|
||||||
continue;
|
continue;
|
||||||
// Use only this triangles
|
// Use this triangle
|
||||||
if ((int)MOPY[i]&(WMO_MATERIAL_HINT|WMO_MATERIAL_COLLIDE_HIT))
|
for (int j=0; j<3; ++j)
|
||||||
{
|
{
|
||||||
MopyEx[n] = MOPY[i];
|
IndexRenum[MOVI[3*i + j]] = 1;
|
||||||
MopyEx[(n+1)] = MOPY[(i+1)];
|
MoviEx[3*nColTriangles + j] = MOVI[3*i + j];
|
||||||
IndexExTr[j] = i/2;
|
|
||||||
j+=1;
|
|
||||||
n+=2;
|
|
||||||
}
|
}
|
||||||
}
|
++nColTriangles;
|
||||||
MopyEx_size = n;
|
|
||||||
IndexExTr_size = j;
|
|
||||||
delete [] MOPY;
|
|
||||||
delete [] MopyEx;
|
|
||||||
|
|
||||||
//---------MOVI-----------
|
|
||||||
MoviEx = new uint16[IndexExTr_size*3];
|
|
||||||
int m = 0;
|
|
||||||
for (int i=0; i<IndexExTr_size; ++i)
|
|
||||||
{
|
|
||||||
int n = 0;
|
|
||||||
n = IndexExTr[i]*3;
|
|
||||||
for (int x=0; x<3; ++x)
|
|
||||||
{
|
|
||||||
MoviEx[m] = MOVI[n];
|
|
||||||
n++;
|
|
||||||
m++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
delete [] MOVI;
|
|
||||||
|
|
||||||
MoviExSort = new uint16[IndexExTr_size*3];
|
|
||||||
for(int y=0; y<IndexExTr_size*3; ++y)
|
|
||||||
{
|
|
||||||
MoviExSort[y]=MoviEx[y];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 hold;
|
// assign new vertex index numbers
|
||||||
for (int pass = 1; pass < IndexExTr_size*3; ++pass)
|
int nColVertices = 0;
|
||||||
|
for (uint32 i=0; i<nVertices; ++i)
|
||||||
{
|
{
|
||||||
for (int i=0; i < IndexExTr_size*3-1; ++i)
|
if (IndexRenum[i] == 1)
|
||||||
{
|
{
|
||||||
if (MoviExSort[i] > MoviExSort[i+1])
|
IndexRenum[i] = nColVertices;
|
||||||
{
|
++nColVertices;
|
||||||
hold = MoviExSort[i];
|
|
||||||
MoviExSort[i] = MoviExSort[i+1];
|
|
||||||
MoviExSort[i+1] = hold;
|
|
||||||
}
|
}
|
||||||
//double = 65535
|
|
||||||
else
|
|
||||||
if (MoviExSort[i] == MoviExSort[i+1])
|
|
||||||
MoviExSort[i+1] = 65535;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// double delet
|
|
||||||
uint16 s = 0;
|
|
||||||
for (int i=0; i < IndexExTr_size*3; ++i)
|
|
||||||
{
|
|
||||||
if (MoviExSort[i]!=65535)
|
|
||||||
{
|
|
||||||
MoviExSort[s] = MoviExSort[i];
|
|
||||||
s++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MovtExSort = new uint16[s];
|
|
||||||
for (int i=0; i < s; ++i)
|
|
||||||
{
|
|
||||||
MovtExSort[i] = MoviExSort[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i < IndexExTr_size*3; ++i)
|
// translate triangle indices to new numbers
|
||||||
|
for (int i=0; i<3*nColTriangles; ++i)
|
||||||
{
|
{
|
||||||
uint16 b = MoviEx[i];
|
assert(MoviEx[i] < nVertices);
|
||||||
for (uint16 x = 0; x < s; ++x)
|
MoviEx[i] = IndexRenum[MoviEx[i]];
|
||||||
{
|
|
||||||
if(MoviExSort[x] == b)
|
|
||||||
{
|
|
||||||
MoviEx[i] = x;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
// write triangle indices
|
||||||
int INDX[] = {0x58444E49,IndexExTr_size*6+4,IndexExTr_size*3};
|
int INDX[] = {0x58444E49, nColTriangles*6+4, nColTriangles*3};
|
||||||
fwrite(INDX,4,3,output);
|
fwrite(INDX,4,3,output);
|
||||||
fwrite(MoviEx,2,IndexExTr_size*3,output);
|
fwrite(MoviEx,2,nColTriangles*3,output);
|
||||||
|
|
||||||
|
// write vertices
|
||||||
|
int VERT[] = {0x54524556, nColVertices*3*sizeof(float)+4, nColVertices};// "VERT"
|
||||||
|
int check = 3*nColVertices;
|
||||||
|
fwrite(VERT,4,3,output);
|
||||||
|
for (uint32 i=0; i<nVertices; ++i)
|
||||||
|
if(IndexRenum[i] >= 0)
|
||||||
|
check -= fwrite(MOVT+3*i, sizeof(float), 3, output);
|
||||||
|
|
||||||
|
assert(check==0);
|
||||||
|
|
||||||
delete [] MoviEx;
|
delete [] MoviEx;
|
||||||
delete [] MoviExSort;
|
delete [] IndexRenum;
|
||||||
delete [] IndexExTr;
|
}
|
||||||
|
|
||||||
//----------VERT---------
|
|
||||||
//-----MOVT----------
|
|
||||||
int d = 0;
|
|
||||||
MovtEx = new float[s*3];
|
|
||||||
for (uint16 i=0; i<s; ++i)
|
|
||||||
{
|
|
||||||
int c=0;//!!!!data in MovtExSort[i] more uint16 in great group wmo files!!!!
|
|
||||||
c = MovtExSort[i]*3;
|
|
||||||
for (int y=0; y<3; ++y)
|
|
||||||
{
|
|
||||||
MovtEx[d] = MOVT[c];
|
|
||||||
c++;
|
|
||||||
d++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int VERT[] = {0x54524556,d*4+4,d*4/12};// "VERT"
|
|
||||||
fwrite(VERT,4,3,output);
|
|
||||||
fwrite(MovtEx,4,d,output);
|
|
||||||
//------LIQU------------------------
|
//------LIQU------------------------
|
||||||
if(LiquEx_size != 0)
|
if(LiquEx_size != 0)
|
||||||
{
|
{
|
||||||
int LIQU_h[] = {0x5551494C,LiquEx_size+8,hlq_xverts,hlq_yverts};// "LIQU"
|
int LIQU_h[] = {0x5551494C, sizeof(WMOLiquidHeader) + LiquEx_size + hlq->xtiles*hlq->ytiles};// "LIQU"
|
||||||
fwrite(LIQU_h,4,4,output);
|
fwrite(LIQU_h, 4, 2, output);
|
||||||
fwrite(LiquEx,4,LiquEx_size/4,output);
|
|
||||||
delete [] LiquEx;
|
// according to WoW.Dev Wiki:
|
||||||
|
uint32 liquidEntry;
|
||||||
|
if (rootWMO->liquidType & 4)
|
||||||
|
liquidEntry = liquidType;
|
||||||
|
else if (liquidType == 15)
|
||||||
|
liquidEntry = 1; // first entry, generic "Water"
|
||||||
|
else
|
||||||
|
liquidEntry = liquidType + 1;
|
||||||
|
// overwrite material type in header...
|
||||||
|
hlq->type = LiqType[liquidEntry];
|
||||||
|
|
||||||
|
/* std::ofstream llog("Buildings/liquid.log", ios_base::out | ios_base::app);
|
||||||
|
llog << filename;
|
||||||
|
llog << ":\nliquidEntry: " << liquidEntry << " type: " << hlq->type << " (root:" << rootWMO->liquidType << " group:" << liquidType << ")\n";
|
||||||
|
llog.close(); */
|
||||||
|
|
||||||
|
fwrite(hlq, sizeof(WMOLiquidHeader), 1, output);
|
||||||
|
// only need height values, the other values are unknown anyway
|
||||||
|
for (uint32 i = 0; i<LiquEx_size/sizeof(WMOLiquidVert); ++i)
|
||||||
|
fwrite(&LiquEx[i].height, sizeof(float), 1, output);
|
||||||
|
// todo: compress to bit field
|
||||||
|
fwrite(LiquBytes, 1, hlq->xtiles*hlq->ytiles, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete [] MOVT;
|
return nColTriangles;
|
||||||
delete [] MovtEx;
|
|
||||||
delete [] MovtExSort;
|
|
||||||
|
|
||||||
//---------------------------------------------
|
|
||||||
return IndexExTr_size;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WMOGroup::~WMOGroup()
|
WMOGroup::~WMOGroup()
|
||||||
{
|
{
|
||||||
|
delete [] MOPY;
|
||||||
|
delete [] MOVI;
|
||||||
|
delete [] MOVT;
|
||||||
|
delete [] MOBA;
|
||||||
|
delete hlq;
|
||||||
|
delete [] LiquEx;
|
||||||
|
delete [] LiquBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
WMOInstance::WMOInstance(MPQFile &f,const char* WmoInstName,const char*MapName, FILE *pDirfile)
|
WMOInstance::WMOInstance(MPQFile &f,const char* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile)
|
||||||
{
|
{
|
||||||
pos = Vec3D(0,0,0);
|
pos = Vec3D(0,0,0);
|
||||||
|
|
||||||
|
|
@ -478,35 +435,23 @@ WMOInstance::WMOInstance(MPQFile &f,const char* WmoInstName,const char*MapName,
|
||||||
f.read(ff,12);
|
f.read(ff,12);
|
||||||
pos3 = Vec3D(ff[0],ff[1],ff[2]);
|
pos3 = Vec3D(ff[0],ff[1],ff[2]);
|
||||||
f.read(&d2,4);
|
f.read(&d2,4);
|
||||||
f.read(&d3,4);
|
|
||||||
|
|
||||||
doodadset = (d2 & 0xFFFF0000) >> 16;
|
uint16 trash,adtId;
|
||||||
|
f.read(&adtId,2);
|
||||||
int realx1 = (int) ((float) pos2.x / 533.333333f);
|
f.read(&trash,2);
|
||||||
int realy1 = (int) ((float) pos2.z / 533.333333f);
|
|
||||||
int realx2 = (int) ((float) pos3.x / 533.333333f);
|
|
||||||
int realy2 = (int) ((float) pos3.z / 533.333333f);
|
|
||||||
|
|
||||||
if(realx1 < 0)
|
|
||||||
{
|
|
||||||
realx1 +=20; realx2+=20;
|
|
||||||
}
|
|
||||||
if(realy1 < 0)
|
|
||||||
{
|
|
||||||
realy1 +=20; realy2+=20;
|
|
||||||
} // hack to prevent neg. values
|
|
||||||
|
|
||||||
//-----------add_in _dir_file----------------
|
//-----------add_in _dir_file----------------
|
||||||
|
|
||||||
char tempname[512];
|
char tempname[512];
|
||||||
// const char dirname[] = "buildings\\dir";
|
sprintf(tempname, "%s/%s", szWorkDirWmo, WmoInstName);
|
||||||
|
|
||||||
sprintf(tempname, "buildings\\%s", WmoInstName);
|
|
||||||
FILE *input;
|
FILE *input;
|
||||||
input = fopen(tempname, "r+b");
|
input = fopen(tempname, "r+b");
|
||||||
|
|
||||||
if(!input)
|
if(!input)
|
||||||
|
{
|
||||||
|
printf("WMOInstance::WMOInstance: couldn't open %s\n", tempname);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fseek(input, 8, SEEK_SET); // get the correct no of vertices
|
fseek(input, 8, SEEK_SET); // get the correct no of vertices
|
||||||
int nVertices;
|
int nVertices;
|
||||||
|
|
@ -516,24 +461,38 @@ WMOInstance::WMOInstance(MPQFile &f,const char* WmoInstName,const char*MapName,
|
||||||
if(nVertices == 0)
|
if(nVertices == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* FILE *dirfile;
|
|
||||||
dirfile = fopen(dirname, "ab");
|
|
||||||
if(!dirfile)
|
|
||||||
{
|
|
||||||
printf("Can't open dirfile!'%s'\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
float x,z;
|
float x,z;
|
||||||
x = pos.x;
|
x = pos.x;
|
||||||
z = pos.z;
|
z = pos.z;
|
||||||
if(x==0 && z == 0)
|
if(x==0 && z == 0)
|
||||||
{
|
{
|
||||||
x = 533.33333f*32;
|
pos.x = 533.33333f*32;
|
||||||
z = 533.33333f*32;
|
pos.z = 533.33333f*32;
|
||||||
}
|
}
|
||||||
|
pos = fixCoords(pos);
|
||||||
|
pos2 = fixCoords(pos2);
|
||||||
|
pos3 = fixCoords(pos3);
|
||||||
|
|
||||||
fprintf(pDirfile,"%s/%s %f,%f,%f_%f,%f,%f 1.0 %d %d %d,%d %d\n",
|
float scale = 1.0f;
|
||||||
|
uint32 flags = MOD_HAS_BOUND;
|
||||||
|
if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN;
|
||||||
|
//write mapID, tileX, tileY, Flags, ID, Pos, Rot, Scale, Bound_lo, Bound_hi, name
|
||||||
|
fwrite(&mapID, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&tileX, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&tileY, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&flags, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&adtId, sizeof(uint16), 1, pDirfile);
|
||||||
|
fwrite(&id, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(&pos, sizeof(float), 3, pDirfile);
|
||||||
|
fwrite(&rot, sizeof(float), 3, pDirfile);
|
||||||
|
fwrite(&scale, sizeof(float), 1, pDirfile);
|
||||||
|
fwrite(&pos2, sizeof(float), 3, pDirfile);
|
||||||
|
fwrite(&pos3, sizeof(float), 3, pDirfile);
|
||||||
|
uint32 nlen=strlen(WmoInstName);
|
||||||
|
fwrite(&nlen, sizeof(uint32), 1, pDirfile);
|
||||||
|
fwrite(WmoInstName, sizeof(char), nlen, pDirfile);
|
||||||
|
|
||||||
|
/* fprintf(pDirfile,"%s/%s %f,%f,%f_%f,%f,%f 1.0 %d %d %d,%d %d\n",
|
||||||
MapName,
|
MapName,
|
||||||
WmoInstName,
|
WmoInstName,
|
||||||
(float) x, (float) pos.y, (float) z,
|
(float) x, (float) pos.y, (float) z,
|
||||||
|
|
@ -541,7 +500,7 @@ WMOInstance::WMOInstance(MPQFile &f,const char* WmoInstName,const char*MapName,
|
||||||
nVertices,
|
nVertices,
|
||||||
realx1, realy1,
|
realx1, realy1,
|
||||||
realx2, realy2
|
realx2, realy2
|
||||||
);
|
); */
|
||||||
|
|
||||||
// fclose(dirfile);
|
// fclose(dirfile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
#ifndef WMO_H
|
#ifndef WMO_H
|
||||||
#define WMO_H
|
#define WMO_H
|
||||||
#define __STORMLIB_SELF__
|
|
||||||
#define TILESIZE (533.33333f)
|
#define TILESIZE (533.33333f)
|
||||||
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
||||||
|
|
||||||
#include "Stormlib.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "vec3d.h"
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include "mpq.h"
|
#include "vec3d.h"
|
||||||
|
#include "loadlib/loadlib.h"
|
||||||
|
|
||||||
// MOPY flags
|
// MOPY flags
|
||||||
#define WMO_MATERIAL_NOCAMCOLLIDE 0x01
|
#define WMO_MATERIAL_NOCAMCOLLIDE 0x01
|
||||||
|
|
@ -21,19 +19,18 @@
|
||||||
|
|
||||||
class WMOInstance;
|
class WMOInstance;
|
||||||
class WMOManager;
|
class WMOManager;
|
||||||
|
class MPQFile;
|
||||||
|
|
||||||
typedef unsigned char uint8;
|
/* for whatever reason a certain company just can't stick to one coordinate system... */
|
||||||
typedef unsigned short uint16;
|
static inline Vec3D fixCoords(const Vec3D &v){ return Vec3D(v.z, v.x, v.y); }
|
||||||
typedef unsigned int uint32;
|
|
||||||
|
|
||||||
|
|
||||||
class WMORoot
|
class WMORoot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootID;
|
uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
|
||||||
unsigned int col;
|
unsigned int col;
|
||||||
int bbcorn1[3];
|
float bbcorn1[3];
|
||||||
int bbcorn2[3];
|
float bbcorn2[3];
|
||||||
|
|
||||||
WMORoot(std::string &filename);
|
WMORoot(std::string &filename);
|
||||||
~WMORoot();
|
~WMORoot();
|
||||||
|
|
@ -45,43 +42,6 @@ private:
|
||||||
char outfilename;
|
char outfilename;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WMOGroup
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
int offsize,flag,flag1,Xid,Xid2,Xid3,zero1,Xflag,nTexture,GroupID;
|
|
||||||
int mopy_size,moba_size,hlq_xverts,hlq_yverts;
|
|
||||||
int MopyEx_size,IndexExTr_size,LiquEx_size;
|
|
||||||
unsigned int nVertices; // number when loaded
|
|
||||||
int nTriangles; // number when loaded
|
|
||||||
int bbcorn1[3];
|
|
||||||
int bbcorn2[3];
|
|
||||||
int * IndexExTr;
|
|
||||||
char* MOPY;
|
|
||||||
char* MopyEx;
|
|
||||||
uint16* MOVI;
|
|
||||||
uint16* MoviEx;
|
|
||||||
uint16* MoviExSort;
|
|
||||||
float* MOVT;
|
|
||||||
float* MovtEx;
|
|
||||||
uint16* MovtExSort;
|
|
||||||
float* MONR;
|
|
||||||
float* MonrEx;
|
|
||||||
uint16* MOBA;
|
|
||||||
int* MobaEx;
|
|
||||||
float* LiquEx;
|
|
||||||
uint32 liquflags;
|
|
||||||
|
|
||||||
WMOGroup(std::string &filename);
|
|
||||||
~WMOGroup();
|
|
||||||
|
|
||||||
bool open();
|
|
||||||
int ConvertToVMAPGroupWmo(FILE *output, bool pPreciseVectorData);
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::string filename;
|
|
||||||
char outfilename;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct WMOLiquidHeader
|
struct WMOLiquidHeader
|
||||||
{
|
{
|
||||||
int xverts, yverts, xtiles, ytiles;
|
int xverts, yverts, xtiles, ytiles;
|
||||||
|
|
@ -91,20 +51,66 @@ struct WMOLiquidHeader
|
||||||
short type;
|
short type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct WMOLiquidVert
|
||||||
|
{
|
||||||
|
uint16 unk1;
|
||||||
|
uint16 unk2;
|
||||||
|
float height;
|
||||||
|
};
|
||||||
|
|
||||||
|
class WMOGroup
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// MOGP
|
||||||
|
int groupName, descGroupName, mogpFlags;
|
||||||
|
float bbcorn1[3];
|
||||||
|
float bbcorn2[3];
|
||||||
|
uint16 moprIdx;
|
||||||
|
uint16 moprNItems;
|
||||||
|
uint16 nBatchA;
|
||||||
|
uint16 nBatchB;
|
||||||
|
uint32 nBatchC, fogIdx, liquidType, groupWMOID;
|
||||||
|
|
||||||
|
int mopy_size,moba_size;
|
||||||
|
int LiquEx_size;
|
||||||
|
unsigned int nVertices; // number when loaded
|
||||||
|
int nTriangles; // number when loaded
|
||||||
|
char *MOPY;
|
||||||
|
uint16 *MOVI;
|
||||||
|
uint16 *MoviEx;
|
||||||
|
float *MOVT;
|
||||||
|
uint16 *MOBA;
|
||||||
|
int *MobaEx;
|
||||||
|
WMOLiquidHeader *hlq;
|
||||||
|
WMOLiquidVert *LiquEx;
|
||||||
|
char *LiquBytes;
|
||||||
|
uint32 liquflags;
|
||||||
|
|
||||||
|
WMOGroup(std::string &filename);
|
||||||
|
~WMOGroup();
|
||||||
|
|
||||||
|
bool open();
|
||||||
|
int ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool pPreciseVectorData);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string filename;
|
||||||
|
char outfilename;
|
||||||
|
};
|
||||||
|
|
||||||
class WMOInstance
|
class WMOInstance
|
||||||
{
|
{
|
||||||
static std::set<int> ids;
|
static std::set<int> ids;
|
||||||
public:
|
public:
|
||||||
string MapName;
|
std::string MapName;
|
||||||
int currx;
|
int currx;
|
||||||
int curry;
|
int curry;
|
||||||
WMOGroup *wmo;
|
WMOGroup *wmo;
|
||||||
Vec3D pos;
|
Vec3D pos;
|
||||||
Vec3D pos2, pos3, rot;
|
Vec3D pos2, pos3, rot;
|
||||||
int indx,id, d2, d3;
|
uint32 indx,id, d2, d3;
|
||||||
int doodadset;
|
int doodadset;
|
||||||
|
|
||||||
WMOInstance(MPQFile &f,const char* WmoInstName,const char*MapName, FILE *pDirfile);
|
WMOInstance(MPQFile &f,const char* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile);
|
||||||
|
|
||||||
static void reset();
|
static void reset();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
6
contrib/vmap_extractor_v2/win/.gitignore
vendored
Normal file
6
contrib/vmap_extractor_v2/win/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.suo
|
||||||
|
bin
|
||||||
|
ipch
|
||||||
2
contrib/vmap_extractor_v2/win/VC100/.gitignore
vendored
Normal file
2
contrib/vmap_extractor_v2/win/VC100/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
*.user
|
||||||
106
contrib/vmap_extractor_v2/win/VC100/vmapExtractor3.vcxproj
Normal file
106
contrib/vmap_extractor_v2/win/VC100/vmapExtractor3.vcxproj
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}</ProjectGuid>
|
||||||
|
<RootNamespace>vmapExtractor3</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\..\dep\libmpq;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libmpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\..\dep\libmpq\bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\..\dep\libmpq;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libmpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\..\dep\libmpq\bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\vmapextract\adtfile.cpp" />
|
||||||
|
<ClCompile Include="..\..\vmapextract\dbcfile.cpp" />
|
||||||
|
<ClCompile Include="..\..\vmapextract\model.cpp" />
|
||||||
|
<ClCompile Include="..\..\vmapextract\mpq_libmpq.cpp" />
|
||||||
|
<ClCompile Include="..\..\vmapextract\vmapexport.cpp" />
|
||||||
|
<ClCompile Include="..\..\vmapextract\wdtfile.cpp" />
|
||||||
|
<ClCompile Include="..\..\vmapextract\wmo.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\vmapextract\adtfile.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\dbcfile.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\model.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\modelheaders.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\mpq_libmpq04.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\vec3d.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\vmapexport.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\wdtfile.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\wmo.h" />
|
||||||
|
<ClInclude Include="..\..\vmapextract\loadlib\loadlib.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
2
contrib/vmap_extractor_v2/win/VC90/.gitignore
vendored
Normal file
2
contrib/vmap_extractor_v2/win/VC90/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
*.user
|
||||||
246
contrib/vmap_extractor_v2/win/VC90/vmapExtractor3.vcproj
Normal file
246
contrib/vmap_extractor_v2/win/VC90/vmapExtractor3.vcproj
Normal file
|
|
@ -0,0 +1,246 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="vmapExtractor3"
|
||||||
|
ProjectGUID="{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}"
|
||||||
|
RootNamespace="vmapExtractor3"
|
||||||
|
TargetFrameworkVersion="196613"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="..\..\bin\$(PlatformName)_$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="..\bin\$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\..\dep\libmpq;..\..\..\..\dep\include\zlib;..\..\..\..\dep\libmpq\win"
|
||||||
|
PreprocessorDefinitions="WIN32;USE_LIBMPQ04"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libmpq.lib"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\..\dep\libmpq\bin\$(PlatformName)_$(ConfigurationName)"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="..\..\bin\$(PlatformName)_$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="..\bin\$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\..\dep\libmpq;..\..\..\..\dep\include\zlib;..\..\..\..\dep\libmpq\win"
|
||||||
|
PreprocessorDefinitions="WIN32;USE_LIBMPQ04"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libmpq.lib"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\..\dep\libmpq\bin\$(PlatformName)_$(ConfigurationName)"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="vmapextractor"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\adtfile.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\adtfile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\dbcfile.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\dbcfile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\model.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\model.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\modelheaders.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\mpq_libmpq.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\mpq_libmpq04.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\vec3d.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\vmapexport.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\vmapexport.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\wdtfile.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\wdtfile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\wmo.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\wmo.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="loadlib"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\vmapextract\loadlib\loadlib.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
42
contrib/vmap_extractor_v2/win/vmapExtractor3_VC100.sln
Normal file
42
contrib/vmap_extractor_v2/win/vmapExtractor3_VC100.sln
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmapExtractor3", "VC100\vmapExtractor3.vcxproj", "{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C} = {B96F612A-C91D-43B3-A4C3-D4294817EC6C}
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50} = {03AB0F44-628E-4855-99A0-C98A1EB52C50}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpq", "..\..\..\dep\libmpq\win\VC100\libmpq.vcxproj", "{03AB0F44-628E-4855-99A0-C98A1EB52C50}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\win\VC100\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\..\..\win\VC100\bzip2.vcxproj", "{B96F612A-C91D-43B3-A4C3-D4294817EC6C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
42
contrib/vmap_extractor_v2/win/vmapExtractor3_VC90.sln
Normal file
42
contrib/vmap_extractor_v2/win/vmapExtractor3_VC90.sln
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmapExtractor3", "VC90\vmapExtractor3.vcproj", "{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C} = {B96F612A-C91D-43B3-A4C3-D4294817EC6C}
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50} = {03AB0F44-628E-4855-99A0-C98A1EB52C50}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpq", "..\..\..\dep\libmpq\win\VC90\libmpq.vcproj", "{03AB0F44-628E-4855-99A0-C98A1EB52C50}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\win\VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\..\..\win\VC90\bzip2.vcproj", "{B96F612A-C91D-43B3-A4C3-D4294817EC6C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B96F612A-C91D-43B3-A4C3-D4294817EC6C}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10162"
|
#define REVISION_NR "10163"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue