mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Applied dep and realm updates
This commit is contained in:
parent
12257a5bc2
commit
5260602e28
2020 changed files with 39571 additions and 173090 deletions
18
src/tools/.gitignore
vendored
Normal file
18
src/tools/.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
|
||||
#
|
||||
|
||||
*.bsc
|
||||
*.pdb
|
||||
debug
|
||||
release
|
||||
*.ilk
|
||||
ad_debug.exe
|
||||
47
src/tools/CMakeLists.txt
Normal file
47
src/tools/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
#Used by vmap-assembler and mmap-generator
|
||||
include_directories(
|
||||
"${CMAKE_SOURCE_DIR}/src/shared"
|
||||
"${CMAKE_SOURCE_DIR}/src/game/vmap/"
|
||||
"${CMAKE_SOURCE_DIR}/dep/include/g3dlite/"
|
||||
"${CMAKE_SOURCE_DIR}/src/framework/"
|
||||
"${ACE_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
add_definitions(-DMMAP_GENERATOR -DNO_CORE_FUNCS)
|
||||
|
||||
add_library(vmap
|
||||
${CMAKE_SOURCE_DIR}/src/game/vmap/BIH.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/vmap/VMapManager2.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/vmap/MapTree.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/vmap/TileAssembler.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/vmap/WorldModel.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/vmap/ModelInstance.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(vmap g3dlite zlib)
|
||||
|
||||
# Used for install targets in subdirs
|
||||
set(TOOLS_DIR "tools")
|
||||
|
||||
add_subdirectory(Movemap-Generator)
|
||||
add_subdirectory(map-extractor)
|
||||
add_subdirectory(vmap-assembler)
|
||||
add_subdirectory(vmap-extractor)
|
||||
190
src/tools/Extractor_Binaries/ExtractResources.sh
Normal file
190
src/tools/Extractor_Binaries/ExtractResources.sh
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# 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.
|
||||
|
||||
## Expected param 1 to be 'a' for all, else ask some questions
|
||||
|
||||
## Normal log file (if not overwritten by second param
|
||||
LOG_FILE="MaNGOSExtractor.log"
|
||||
## Detailed log file
|
||||
DETAIL_LOG_FILE="MaNGOSExtractor_detailed.log"
|
||||
|
||||
## Change this to a value fitting for your sys!
|
||||
NUM_CPU="2"
|
||||
|
||||
## ! Use below only for finetuning or if you know what you are doing !
|
||||
|
||||
USE_AD="0"
|
||||
USE_VMAPS="0"
|
||||
USE_MMAPS="0"
|
||||
USE_MMAPS_OFFMESH="0"
|
||||
USE_MMAPS_DELAY=""
|
||||
|
||||
if [ "$1" = "a" ]
|
||||
then
|
||||
## extract all
|
||||
USE_AD="1"
|
||||
USE_VMAPS="1"
|
||||
USE_MMAPS="1"
|
||||
USE_MMAPS_DELAY="no"
|
||||
else
|
||||
## do some questioning!
|
||||
echo
|
||||
echo "Welcome to helper script to extract required data for MaNGOS!"
|
||||
echo "Should all data (dbc, maps, vmaps and mmaps be extracted? (y/n) - Selecting n will give you the option to pick each step"
|
||||
read line
|
||||
if [ "$line" = "y" ]
|
||||
then
|
||||
## extract all
|
||||
USE_AD="1"
|
||||
USE_VMAPS="1"
|
||||
USE_MMAPS="1"
|
||||
else
|
||||
echo
|
||||
echo "Should dbc and maps be extracted? (y/n)"
|
||||
read line
|
||||
if [ "$line" = "y" ]; then USE_AD="1"; fi
|
||||
|
||||
echo
|
||||
echo "Should vmaps be extracted? (y/n)"
|
||||
read line
|
||||
if [ "$line" = "y" ]; then USE_VMAPS="1"; fi
|
||||
|
||||
echo
|
||||
echo "Should mmaps be extracted? (y/n)"
|
||||
echo "WARNING! This will take several hours! (you can later tell to start delayed)"
|
||||
read line
|
||||
if [ "$line" = "y" ]
|
||||
then
|
||||
USE_MMAPS="1";
|
||||
else
|
||||
echo "Only reextract offmesh tiles for mmaps?"
|
||||
read line
|
||||
if [ "$line" = "y" ]
|
||||
then
|
||||
USE_MMAPS_OFFMESH="1";
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
## Special case: Only reextract offmesh tiles
|
||||
if [ "$USE_MMAPS_OFFMESH" = "1" ]
|
||||
then
|
||||
echo "Only extracting offmesh meshes"
|
||||
MoveMapGen.sh offmesh $LOG_FILE $DETAIL_LOG_FILE
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## MMap Extraction specific
|
||||
if [ "$USE_MMAPS" = "1" ]
|
||||
then
|
||||
## Obtain number of processes
|
||||
echo "How many CPUs should be used for extracting mmaps? (1-4)"
|
||||
read line
|
||||
echo
|
||||
if [ "$line" -ge "1" -a "$line" -le "4" ]
|
||||
then
|
||||
NUM_CPU=$line
|
||||
else
|
||||
echo "Only number between 1 and 4 supported!"
|
||||
exit 1
|
||||
fi
|
||||
## Extract MMaps delayed?
|
||||
if [ "$USE_MMAPS_DELAY" != "no" ]; then
|
||||
echo "MMap extraction can be started delayed"
|
||||
echo "If you do _not_ want MMap Extraction to start delayed, just press return"
|
||||
echo "Else enter number followed by s for seconds, m for minutes, h for hours"
|
||||
echo "Example: \"3h\" - will start mmap extraction in 3 hours"
|
||||
read -p"MMap Extraction Delay (leave blank for direct extraction): " USE_MMAPS_DELAY
|
||||
echo
|
||||
else
|
||||
USE_MMAPS_DELAY=""
|
||||
fi
|
||||
fi
|
||||
|
||||
## Give some status
|
||||
echo "Current Settings: Extract DBCs/maps: $USE_AD, Extract vmaps: $USE_VMAPS, Extract mmaps: $USE_MMAPS on $NUM_CPU processes"
|
||||
if [ "$USE_MMAPS_DELAY" != "" ]; then
|
||||
echo
|
||||
echo "MMap Extraction will be started delayed by: $USE_MMAPS_DELAY"
|
||||
fi
|
||||
echo
|
||||
if [ "$1" != "a" ]
|
||||
then
|
||||
echo "If you don't like these settings, interrupt with CTRL+C"
|
||||
echo
|
||||
echo "Press any key to proceed"
|
||||
read line
|
||||
fi
|
||||
|
||||
echo "`date`: Start extracting data for MaNGOS" | tee $LOG_FILE
|
||||
|
||||
## Handle log messages
|
||||
if [ "$USE_AD" = "1" ];
|
||||
then
|
||||
echo "DBC and map files will be extracted" | tee -a $LOG_FILE
|
||||
else
|
||||
echo "DBC and map files won't be extracted!" | tee -a $LOG_FILE
|
||||
fi
|
||||
if [ "$USE_VMAPS" = "1" ]
|
||||
then
|
||||
echo "Vmaps will be extracted" | tee -a $LOG_FILE
|
||||
else
|
||||
echo "Vmaps won't be extracted!" | tee -a $LOG_FILE
|
||||
fi
|
||||
if [ "$USE_MMAPS" = "1" ]
|
||||
then
|
||||
echo "Mmaps will be extracted with $NUM_CPU processes" | tee -a $LOG_FILE
|
||||
else
|
||||
echo "Mmaps files won't be extracted!" | tee -a $LOG_FILE
|
||||
fi
|
||||
echo | tee -a $LOG_FILE
|
||||
|
||||
echo "`date`: Start extracting data for MaNGOS, DBCs/maps $USE_AD, vmaps $USE_VMAPS, mmaps $USE_MMAPS on $NUM_CPU processes" | tee $DETAIL_LOG_FILE
|
||||
echo | tee -a $DETAIL_LOG_FILE
|
||||
|
||||
## Extract dbcs and maps
|
||||
if [ "$USE_AD" = "1" ]
|
||||
then
|
||||
echo "`date`: Start extraction of DBCs and map files..." | tee -a $LOG_FILE
|
||||
map-extractor | tee -a $DETAIL_LOG_FILE
|
||||
echo "`date`: Extracting of DBCs and map files finished" | tee -a $LOG_FILE
|
||||
echo | tee -a $LOG_FILE
|
||||
echo | tee -a $DETAIL_LOG_FILE
|
||||
fi
|
||||
|
||||
## Extract vmaps
|
||||
if [ "$USE_VMAPS" = "1" ]
|
||||
then
|
||||
echo "`date`: Start extraction of vmaps..." | tee -a $LOG_FILE
|
||||
vmap-extractor | tee -a $DETAIL_LOG_FILE
|
||||
echo "`date`: Extracting of vmaps finished" | tee -a $LOG_FILE
|
||||
mkdir vmaps
|
||||
echo "`date`: Start assembling of vmaps..." | tee -a $LOG_FILE
|
||||
vmap-assembler Buildings vmaps | tee -a $DETAIL_LOG_FILE
|
||||
echo "`date`: Assembling of vmaps finished" | tee -a $LOG_FILE
|
||||
|
||||
echo | tee -a $LOG_FILE
|
||||
echo | tee -a $DETAIL_LOG_FILE
|
||||
fi
|
||||
|
||||
## Extract mmaps
|
||||
if [ "$USE_MMAPS" = "1" ]
|
||||
then
|
||||
if [ "$USE_MMAPS_DELAY" != "" ]; then
|
||||
echo "Extracting of MMaps is set to be started delayed by $USE_MMAPS_DELAY"
|
||||
echo "Current time: $(date)"
|
||||
sleep $USE_MMAPS_DELAY
|
||||
fi
|
||||
sh MoveMapGen.sh $NUM_CPU $LOG_FILE $DETAIL_LOG_FILE
|
||||
fi
|
||||
|
||||
158
src/tools/Extractor_Binaries/MoveMapGen.sh
Normal file
158
src/tools/Extractor_Binaries/MoveMapGen.sh
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# 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.
|
||||
|
||||
## Syntax of this helper
|
||||
## First param must be number of to be used CPUs (only 1, 2, 3, 4 supported) or "offmesh" to recreate the special tiles from the OFFMESH_FILE
|
||||
## Second param can be an additional filename for storing log
|
||||
## Third param can be an addition filename for storing detailed log
|
||||
|
||||
## Additional Parameters to be forwarded to MoveMapGen, see mmaps/readme for instructions
|
||||
PARAMS="--silent"
|
||||
|
||||
## Already a few map extracted, and don't care anymore
|
||||
EXCLUDE_MAPS=""
|
||||
#EXCLUDE_MAPS="0 1 530 571" # example to exclude the continents
|
||||
|
||||
## Offmesh file
|
||||
OFFMESH_FILE="offmesh.txt"
|
||||
|
||||
## Normal log file (if not overwritten by second param
|
||||
LOG_FILE="MoveMapGen.log"
|
||||
## Detailed log file
|
||||
DETAIL_LOG_FILE="MoveMapGen_detailed.log"
|
||||
|
||||
## ! Use below only for finetuning or if you know what you are doing !
|
||||
|
||||
## All maps
|
||||
MAP_LIST_A="1 37 543 595 289 572 529 562 531 269 47 649 650 599 548 559 429 230 573 349 13 25 409 229 43 48 546 553 547 604 545 90 576 742 743 746 747 748 749 750 762 763 764 765 766 767 859 861 930 938 939 940 980"
|
||||
MAP_LIST_B="571 628 560 509 723 532 607 600 668 33 585 566 389 601 369 129 550 189 542 70 109 554 632 552 555 540 598 450 558 249 35 624 557 659 660 661 662 719 720 721 731 732 734 736 738 739 740 741 951 967 969"
|
||||
MAP_LIST_C="0 631 609 534 533 619 469 602 329 580 615 578 36 556 44 565 544 34 617 608 618 449 616 42 451 582 584 586 587 588 589 590 591 592 643 644 645 646 648 627 637 638 669 670 671 674 725 726 727 728 730"
|
||||
MAP_LIST_D="530 169 575 603 309 574 30 564 568 209 724 658 489 593 594 596 597 605 606 610 612 613 614 620 621 622 623 641 642 647 672 673 712 713 718 651 654 655 656 657 751 752 753 754 755 757 759 760 761 974 977"
|
||||
MAP_LIST_D1="209 724 658 489 606 610 612 613 614 620 621 754 755 757 759 760 761"
|
||||
MAP_LIST_D2="169 575 603 309 574 30 564 568 622 623 641 642 647 672 673 712 713"
|
||||
MAP_LIST_D3="530 593 594 596 597 605 651 654 655 656 657 751 752 753 974 977 718"
|
||||
|
||||
badParam()
|
||||
{
|
||||
echo "ERROR! Bad arguments!"
|
||||
echo "You can (re)extract mmaps with this helper script,"
|
||||
echo "or recreate only the tiles from the offmash file"
|
||||
echo
|
||||
echo "Call with number of processes (1 - 4) to create mmaps"
|
||||
echo "Call with 'offmesh' to reextract the tiles from offmash file"
|
||||
echo
|
||||
echo "For further fine-tuning edit this helper script"
|
||||
echo
|
||||
}
|
||||
|
||||
if [ "$#" = "3" ]
|
||||
then
|
||||
LOG_FILE=$2
|
||||
DETAIL_LOG_FILE=$3
|
||||
elif [ "$#" = "2" ]
|
||||
then
|
||||
LOG_FILE=$2
|
||||
fi
|
||||
|
||||
# Offmesh file provided?
|
||||
OFFMESH=""
|
||||
if [ "$OFFMESH_FILE" != "" ]
|
||||
then
|
||||
if [ ! -f "$OFFMESH_FILE" ]
|
||||
then
|
||||
echo "ERROR! Offmesh file $OFFMESH_FILE could not be found."
|
||||
echo "Provide valid file or none. You need to edit the script"
|
||||
exit 1
|
||||
else
|
||||
OFFMESH="--offMeshInput $OFFMESH_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Function to process a list
|
||||
createMMaps()
|
||||
{
|
||||
for i in $@
|
||||
do
|
||||
for j in $EXCLUDE_MAPS
|
||||
do
|
||||
if [ "$i" = "$j" ]
|
||||
then
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
./MoveMapGen $PARAMS $OFFMESH $i | tee -a $DETAIL_LOG_FILE
|
||||
echo "`date`: (Re)created map $i" | tee -a $LOG_FILE
|
||||
done
|
||||
}
|
||||
|
||||
createHeader()
|
||||
{
|
||||
echo "`date`: Start creating MoveMaps" | tee -a $LOG_FILE
|
||||
echo "Used params: $PARAMS $OFFMESH" | tee -a $LOG_FILE
|
||||
echo "Detailed log can be found in $DETAIL_LOG_FILE" | tee -a $LOG_FILE
|
||||
echo "Start creating MoveMaps" | tee -a $DETAIL_LOG_FILE
|
||||
echo
|
||||
echo "Be PATIENT - This will take a long time and might also have gaps between visible changes on the console."
|
||||
echo "WAIT until you are informed that 'creating MoveMaps' is 'finished'!"
|
||||
}
|
||||
|
||||
# Create mmaps directory if not exist
|
||||
if [ ! -d mmaps ]
|
||||
then
|
||||
mkdir mmaps
|
||||
fi
|
||||
|
||||
# Param control
|
||||
case "$1" in
|
||||
"1" )
|
||||
createHeader $1
|
||||
createMMaps $MAP_LIST_A $MAP_LIST_B $MAP_LIST_C $MAP_LIST_D &
|
||||
;;
|
||||
"2" )
|
||||
createHeader $1
|
||||
createMMaps $MAP_LIST_A $MAP_LIST_D &
|
||||
createMMaps $MAP_LIST_B $MAP_LIST_C &
|
||||
;;
|
||||
"3" )
|
||||
createHeader $1
|
||||
createMMaps $MAP_LIST_A $MAP_LIST_D1&
|
||||
createMMaps $MAP_LIST_B $MAP_LIST_D2&
|
||||
createMMaps $MAP_LIST_C $MAP_LIST_D3&
|
||||
;;
|
||||
"4" )
|
||||
createHeader $1
|
||||
createMMaps $MAP_LIST_A &
|
||||
createMMaps $MAP_LIST_B &
|
||||
createMMaps $MAP_LIST_C &
|
||||
createMMaps $MAP_LIST_D &
|
||||
;;
|
||||
"offmesh" )
|
||||
echo "`date`: Recreate offmeshs from file $OFFMESH_FILE" | tee -a $LOG_FILE
|
||||
echo "Recreate offmeshs from file $OFFMESH_FILE" | tee -a $DETAIL_LOG_FILE
|
||||
while read map tile line
|
||||
do
|
||||
./MoveMapGen $PARAMS $OFFMESH $map --tile $tile | tee -a $DETAIL_LOG_FILE
|
||||
echo "`date`: Recreated $map $tile from $OFFMESH_FILE" | tee -a $LOG_FILE
|
||||
done < $OFFMESH_FILE &
|
||||
;;
|
||||
* )
|
||||
badParam
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
wait
|
||||
|
||||
echo | tee -a $LOG_FILE
|
||||
echo | tee -a $DETAIL_LOG_FILE
|
||||
echo "`date`: Finished creating MoveMaps" | tee -a $LOG_FILE
|
||||
echo "`date`: Finished creating MoveMaps" >> $DETAIL_LOG_FILE
|
||||
51
src/tools/Extractor_Binaries/README.txt
Normal file
51
src/tools/Extractor_Binaries/README.txt
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
Client data extraction helpers
|
||||
==============================
|
||||
This directory provides a few helper scripts which will extract maps for both
|
||||
calculating maps positions using the *mangos* map tools built during the build
|
||||
process.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
You will need a working installation of the [World of Warcraft][1] client patched
|
||||
to version 1.12.x.
|
||||
|
||||
Also, you will have to run a full build of *mangos* to create all map tools.
|
||||
|
||||
Instructions
|
||||
------------
|
||||
Copy the created map tools to the [World of Warcraft][1] installation directory,
|
||||
namely the tolls named:
|
||||
|
||||
* `map-extractor`
|
||||
* `vmap-extractor`
|
||||
* `vmap-assembler`
|
||||
* `mmap-generator`
|
||||
|
||||
Then copy `ExtractResources.sh`, `MoveMapGen.sh` and `offmesh.txt` into the client
|
||||
installation directory.
|
||||
|
||||
Now open a [git Bash shell][2], and change to the installation directory.
|
||||
|
||||
Execute `ExtractResources.sh`, and answer the questions asked by the tool to
|
||||
|
||||
* extract client database files, and maps (**required**).
|
||||
* extract and assemble vmaps (**required**).
|
||||
* extract movement maps (**optional**). Be aware that this process is very CPU
|
||||
intense, and depending on your CPU may take up to a half day to create all
|
||||
movement maps.
|
||||
|
||||
If you edit `offmesh.txt` to fix any issues with navigation meshes, you can rerun
|
||||
`ExtractResources.sh` to rebuild movement maps.
|
||||
|
||||
Logging
|
||||
-------
|
||||
The helper scripts will log every step of the process. Both `map-tools.log`
|
||||
and `map-tools_detailed.log` will provide the output generated by all map
|
||||
tools.
|
||||
|
||||
If you extracted movement maps too, there will be additional logs available:
|
||||
`mmap-generator.log`, and `mmap-generator_detailed.log`.
|
||||
|
||||
|
||||
[1]: http://blizzard.com/games/wow/ "World of Warcraft"
|
||||
[2]: http://git-scm.com/ "git"
|
||||
3
src/tools/Extractor_Binaries/offmesh.txt
Normal file
3
src/tools/Extractor_Binaries/offmesh.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
0 31,59 (-14429.889648 450.344452 15.430828) (-14424.218750 444.332855 12.773965) 2.5 // booty bay dock
|
||||
562 31,20 (6234.545898 256.902100 11.075373) (6230.961914 252.127274 11.180979) 2.5 // Blade's Edge Arena
|
||||
562 31,20 (6243.081543 266.918854 11.059557) (6246.507324 271.623505 11.230524) 2.5 // Blade's Edge Arena
|
||||
5
src/tools/Movemap-Generator/.gitignore
vendored
Normal file
5
src/tools/Movemap-Generator/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
bin
|
||||
i686
|
||||
x86_64
|
||||
build
|
||||
70
src/tools/Movemap-Generator/CMakeLists.txt
Normal file
70
src/tools/Movemap-Generator/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
#
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
project(mmap-generator)
|
||||
|
||||
set(EXECUTABLE_NAME movemap-generator)
|
||||
|
||||
if(WIN32)
|
||||
# add resource file to windows build
|
||||
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} Movemap-Generator.rc)
|
||||
endif()
|
||||
if(debug)
|
||||
add_definitions(-DDEBUG)
|
||||
endif()
|
||||
|
||||
# zlib
|
||||
if(WIN32 AND MSVC)
|
||||
add_definitions(-DNO_vsnprintf)
|
||||
endif()
|
||||
|
||||
# For 64bit definitions in Detour
|
||||
add_definitions(-DDT_POLYREF64)
|
||||
|
||||
include_directories(
|
||||
"${CMAKE_SOURCE_DIR}/src"
|
||||
"${CMAKE_SOURCE_DIR}/src/shared"
|
||||
"${CMAKE_SOURCE_DIR}/src/game"
|
||||
"${CMAKE_SOURCE_DIR}/src/game/vmap"
|
||||
"${CMAKE_SOURCE_DIR}/dep/include/g3dlite"
|
||||
"${CMAKE_SOURCE_DIR}/src/framework"
|
||||
"${CMAKE_SOURCE_DIR}/src/game/WorldHandlers"
|
||||
"${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour/Include"
|
||||
"${CMAKE_SOURCE_DIR}/dep/recastnavigation/Recast/Include"
|
||||
"${CMAKE_SOURCE_DIR}/dep/src/zlib"
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
target_link_libraries(vmap g3dlite zlib)
|
||||
|
||||
|
||||
set(SOURCES
|
||||
./src/IntermediateValues.cpp
|
||||
./src/generator.cpp
|
||||
./src/MapBuilder.cpp
|
||||
./src/TerrainBuilder.cpp
|
||||
./src/VMapExtensions.cpp
|
||||
)
|
||||
|
||||
add_executable( MoveMapGen ${SOURCES} )
|
||||
|
||||
target_link_libraries( MoveMapGen g3dlite vmap Detour Recast zlib )
|
||||
68
src/tools/Movemap-Generator/mmap_extract.py
Normal file
68
src/tools/Movemap-Generator/mmap_extract.py
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
"""
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
|
||||
import os, sys, threading, time, subprocess
|
||||
from multiprocessing import cpu_count
|
||||
from collections import deque
|
||||
|
||||
mapList = deque([0,1,530,571,13,25,30,33,34,35,36,37,42,43,44,47,48,70,90,109,129,169,189,209,229,230,249,269,289,309,329,349,369,
|
||||
389,409,429,449,450,451,469,489,509,529,531,532,533,534,540,542,543,544,545,546,547,548,550,552,553,554,555,556,557,558,559,
|
||||
560,562,564,565,566,568,572,573,574,575,576,578,580,582,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,
|
||||
601,602,603,604,605,606,607,608,609,610,612,613,614,615,616,617,618,619,620,621,622,623,624,627,628,631,632,637,638,641,642,
|
||||
643,644,645,646,647,648,649,650,651,654,655,656,657,658,659,660,661,662,668,669,670,671,672,673,674,712,713,718,719,720,721,
|
||||
723,724,725,726,727,728,730,731,732,734,736,738,739,740,741,742,743,746,747,748,749,750,751,752,753,754,755,757,759,760,761,
|
||||
762,763,764,765,766,767,859,861,930,938,939,940,951,967,969,974,977,980])
|
||||
|
||||
class workerThread(threading.Thread):
|
||||
def __init__(self, mapID):
|
||||
threading.Thread.__init__(self)
|
||||
self.mapID = mapID
|
||||
|
||||
def run(self):
|
||||
name = "Worker for map %u" % (self.mapID)
|
||||
print "++ %s" % (name)
|
||||
if sys.platform == 'win32':
|
||||
stInfo = subprocess.STARTUPINFO()
|
||||
stInfo.dwFlags |= 0x00000001
|
||||
stInfo.wShowWindow = 7
|
||||
cFlags = subprocess.CREATE_NEW_CONSOLE
|
||||
binName = "movemap-generator.exe"
|
||||
else:
|
||||
stInfo = None
|
||||
cFlags = 0
|
||||
binName = "./MoveMapGen"
|
||||
if self.mapID == 0:
|
||||
retcode = subprocess.call([binName, "%u" % (self.mapID), "--silent", "--offMeshInput", "offmesh.txt"], startupinfo=stInfo, creationflags=cFlags)
|
||||
else:
|
||||
retcode = subprocess.call([binName, "%u" % (self.mapID), "--silent"], startupinfo=stInfo, creationflags=cFlags)
|
||||
print "-- %s" % (name)
|
||||
|
||||
if __name__ == "__main__":
|
||||
cpu = cpu_count() - 0 # You can reduce the load by putting 1 instead of 0 if you need to free 1 core/cpu
|
||||
if cpu < 1:
|
||||
cpu = 1
|
||||
print "I will always maintain %u MoveMapGen tasks running in //\n" % (cpu)
|
||||
while (len(mapList) > 0):
|
||||
if (threading.active_count() <= cpu):
|
||||
workerThread(mapList.popleft()).start()
|
||||
time.sleep(0.2)
|
||||
1
src/tools/Movemap-Generator/offmesh_example.txt
Normal file
1
src/tools/Movemap-Generator/offmesh_example.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
0 31,59 (-14429.889648 450.344452 15.430828) (-14424.218750 444.332855 12.773965) 2.5 // booty bay dock
|
||||
64
src/tools/Movemap-Generator/readme
Normal file
64
src/tools/Movemap-Generator/readme
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
mmap generator
|
||||
==============
|
||||
The *movement map generator* will extract pathfinding information from the
|
||||
game client in order to enable the *mangos-zero server* to let creatures walk
|
||||
on the terrain as naturally as possible.
|
||||
|
||||
Please note that due to the complex nature of the process, the extraction and
|
||||
generation process may require a high amount of computing power any time.
|
||||
|
||||
Depending on your system, you should except ranges from four hours up to a full
|
||||
day for a full map generation of all in-game zones. Reducing the amount of zones
|
||||
generated will also reduce the time needed to wait.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
You will need a working installation of the [World of Warcraft][1] client patched
|
||||
to version 1.12.x.
|
||||
|
||||
Usage
|
||||
-----
|
||||
The `mmap-generator` command can be used with a set of parameters to fine-tune the
|
||||
process of movement map generation.
|
||||
|
||||
* `--offMeshInput [file.*]`: Path to file containing off mesh connections data,
|
||||
with a single mesh connection per line. Format must be:
|
||||
|
||||
`map_id tile_x,tile_y (start_x start_y start_z) (end_x end_y end_z) size //optional comments`
|
||||
|
||||
* `--silent`: Make us script friendly. Do not wait for user input on error or
|
||||
completion.
|
||||
* `--bigBaseUnit [true|false]`: Generate tile/map using bigger basic unit. Use this
|
||||
option only if you have unexpected gaps. If set to `false`, we will use normal
|
||||
metrics.
|
||||
* `--maxAngle [#]`: the maximum walkable inclination angle. By default this is set
|
||||
to `60`. Float values between 45 and 90 degrees are allowed.
|
||||
* `--skipLiquid`: skip liquid data for maps. Skipping liquid maps is disabled by
|
||||
default.
|
||||
* `--skipContinents [true|false]`: skip building continents. Disabled by default.
|
||||
Available continents are `0` (*Eastern Kingdoms*), and `1` (*Kalimdor*).
|
||||
* `--skipJunkMaps [true|false]`: skip junk maps, including some unused maps,
|
||||
transport maps, and some other maps. Junk maps are skipped by default.
|
||||
* `--skipBattlegrounds [true|false]`: skip battleground maps. By default battleground
|
||||
maps are included.
|
||||
* `--debugOutput [true|false]`: create debugging files for use with RecastDemo. If you
|
||||
are only creating movement maps for use with MaNGOS, you do not need debugging
|
||||
files built. By default, debugging files are not created.
|
||||
* `--tile [#,#]`: Build the specified tile seperate number with a comma ','.
|
||||
Must specify a map number (see below). If this option is not used, all tiles are
|
||||
built. If only one number is specified, builds the map specified by it.
|
||||
This command will build the map regardless of --skip* option settings. If you do
|
||||
not specify a map number, builds all maps that pass the filters specified by
|
||||
`--skip*` options.
|
||||
* `-h`, `--help`: show usage information.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
* `mmap-generator`: builds maps using the default settings (see above for defaults)
|
||||
* `mmap-generator --skipContinents true`: builds the default maps, except continents
|
||||
* `mmap-generator 0`: builds all tiles of map 0
|
||||
* `mmap-generator 0 --tile 34,46`: builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain)
|
||||
|
||||
|
||||
[1]: http://blizzard.com/games/wow/ "World of Warcraft"
|
||||
283
src/tools/Movemap-Generator/src/IntermediateValues.cpp
Normal file
283
src/tools/Movemap-Generator/src/IntermediateValues.cpp
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include "IntermediateValues.h"
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
IntermediateValues::~IntermediateValues()
|
||||
{
|
||||
rcFreeCompactHeightfield(compactHeightfield);
|
||||
rcFreeHeightField(heightfield);
|
||||
rcFreeContourSet(contours);
|
||||
rcFreePolyMesh(polyMesh);
|
||||
rcFreePolyMeshDetail(polyMeshDetail);
|
||||
}
|
||||
|
||||
void IntermediateValues::writeIV(uint32 mapID, uint32 tileX, uint32 tileY)
|
||||
{
|
||||
char fileName[255];
|
||||
char tileString[25];
|
||||
sprintf(tileString, "[%02u,%02u]: ", tileX, tileY);
|
||||
|
||||
printf("%sWriting debug output... \r", tileString);
|
||||
|
||||
string name("meshes/%03u%02i%02i.");
|
||||
|
||||
#define DEBUG_WRITE(fileExtension,data) \
|
||||
do { \
|
||||
sprintf(fileName, (name + fileExtension).c_str(), mapID, tileY, tileX); \
|
||||
FILE* file = fopen(fileName, "wb"); \
|
||||
if (!file) \
|
||||
{ \
|
||||
char message[1024]; \
|
||||
sprintf(message, "%sFailed to open %s for writing!\n", tileString, fileName); \
|
||||
perror(message); \
|
||||
} \
|
||||
else \
|
||||
debugWrite(file, data); \
|
||||
if(file) fclose(file); \
|
||||
printf("%sWriting debug output... \r", tileString); \
|
||||
} while (false)
|
||||
|
||||
if (heightfield)
|
||||
DEBUG_WRITE("hf", heightfield);
|
||||
if (compactHeightfield)
|
||||
DEBUG_WRITE("chf", compactHeightfield);
|
||||
if (contours)
|
||||
DEBUG_WRITE("cs", contours);
|
||||
if (polyMesh)
|
||||
DEBUG_WRITE("pmesh", polyMesh);
|
||||
if (polyMeshDetail)
|
||||
DEBUG_WRITE("dmesh", polyMeshDetail);
|
||||
|
||||
#undef DEBUG_WRITE
|
||||
}
|
||||
|
||||
void IntermediateValues::debugWrite(FILE* file, const rcHeightfield* mesh)
|
||||
{
|
||||
if (!file || !mesh)
|
||||
return;
|
||||
|
||||
fwrite(&(mesh->cs), sizeof(float), 1, file);
|
||||
fwrite(&(mesh->ch), sizeof(float), 1, file);
|
||||
fwrite(&(mesh->width), sizeof(int), 1, file);
|
||||
fwrite(&(mesh->height), sizeof(int), 1, file);
|
||||
fwrite(mesh->bmin, sizeof(float), 3, file);
|
||||
fwrite(mesh->bmax, sizeof(float), 3, file);
|
||||
|
||||
for (int y = 0; y < mesh->height; ++y)
|
||||
for (int x = 0; x < mesh->width; ++x)
|
||||
{
|
||||
rcSpan* span = mesh->spans[x + y * mesh->width];
|
||||
|
||||
// first, count the number of spans
|
||||
int spanCount = 0;
|
||||
while (span)
|
||||
{
|
||||
spanCount++;
|
||||
span = span->next;
|
||||
}
|
||||
|
||||
// write the span count
|
||||
fwrite(&spanCount, sizeof(int), 1, file);
|
||||
|
||||
// write the spans
|
||||
span = mesh->spans[x + y * mesh->width];
|
||||
while (span)
|
||||
{
|
||||
fwrite(span, sizeof(rcSpan), 1, file);
|
||||
span = span->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IntermediateValues::debugWrite(FILE* file, const rcCompactHeightfield* chf)
|
||||
{
|
||||
if (!file | !chf)
|
||||
return;
|
||||
|
||||
fwrite(&(chf->width), sizeof(chf->width), 1, file);
|
||||
fwrite(&(chf->height), sizeof(chf->height), 1, file);
|
||||
fwrite(&(chf->spanCount), sizeof(chf->spanCount), 1, file);
|
||||
|
||||
fwrite(&(chf->walkableHeight), sizeof(chf->walkableHeight), 1, file);
|
||||
fwrite(&(chf->walkableClimb), sizeof(chf->walkableClimb), 1, file);
|
||||
|
||||
fwrite(&(chf->maxDistance), sizeof(chf->maxDistance), 1, file);
|
||||
fwrite(&(chf->maxRegions), sizeof(chf->maxRegions), 1, file);
|
||||
|
||||
fwrite(chf->bmin, sizeof(chf->bmin), 1, file);
|
||||
fwrite(chf->bmax, sizeof(chf->bmax), 1, file);
|
||||
|
||||
fwrite(&(chf->cs), sizeof(chf->cs), 1, file);
|
||||
fwrite(&(chf->ch), sizeof(chf->ch), 1, file);
|
||||
|
||||
int tmp = 0;
|
||||
if (chf->cells) tmp |= 1;
|
||||
if (chf->spans) tmp |= 2;
|
||||
if (chf->dist) tmp |= 4;
|
||||
if (chf->areas) tmp |= 8;
|
||||
|
||||
fwrite(&tmp, sizeof(tmp), 1, file);
|
||||
|
||||
if (chf->cells)
|
||||
fwrite(chf->cells, sizeof(rcCompactCell), chf->width * chf->height, file);
|
||||
if (chf->spans)
|
||||
fwrite(chf->spans, sizeof(rcCompactSpan), chf->spanCount, file);
|
||||
if (chf->dist)
|
||||
fwrite(chf->dist, sizeof(unsigned short), chf->spanCount, file);
|
||||
if (chf->areas)
|
||||
fwrite(chf->areas, sizeof(unsigned char), chf->spanCount, file);
|
||||
}
|
||||
|
||||
void IntermediateValues::debugWrite(FILE* file, const rcContourSet* cs)
|
||||
{
|
||||
if (!file || !cs)
|
||||
return;
|
||||
|
||||
fwrite(&(cs->cs), sizeof(float), 1, file);
|
||||
fwrite(&(cs->ch), sizeof(float), 1, file);
|
||||
fwrite(cs->bmin, sizeof(float), 3, file);
|
||||
fwrite(cs->bmax, sizeof(float), 3, file);
|
||||
fwrite(&(cs->nconts), sizeof(int), 1, file);
|
||||
for (int i = 0; i < cs->nconts; ++i)
|
||||
{
|
||||
fwrite(&cs->conts[i].area, sizeof(unsigned char), 1, file);
|
||||
fwrite(&cs->conts[i].reg, sizeof(unsigned short), 1, file);
|
||||
fwrite(&cs->conts[i].nverts, sizeof(int), 1, file);
|
||||
fwrite(cs->conts[i].verts, sizeof(int), cs->conts[i].nverts * 4, file);
|
||||
fwrite(&cs->conts[i].nrverts, sizeof(int), 1, file);
|
||||
fwrite(cs->conts[i].rverts, sizeof(int), cs->conts[i].nrverts * 4, file);
|
||||
}
|
||||
}
|
||||
|
||||
void IntermediateValues::debugWrite(FILE* file, const rcPolyMesh* mesh)
|
||||
{
|
||||
if (!file || !mesh)
|
||||
return;
|
||||
|
||||
fwrite(&(mesh->cs), sizeof(float), 1, file);
|
||||
fwrite(&(mesh->ch), sizeof(float), 1, file);
|
||||
fwrite(&(mesh->nvp), sizeof(int), 1, file);
|
||||
fwrite(mesh->bmin, sizeof(float), 3, file);
|
||||
fwrite(mesh->bmax, sizeof(float), 3, file);
|
||||
fwrite(&(mesh->nverts), sizeof(int), 1, file);
|
||||
fwrite(mesh->verts, sizeof(unsigned short), mesh->nverts * 3, file);
|
||||
fwrite(&(mesh->npolys), sizeof(int), 1, file);
|
||||
fwrite(mesh->polys, sizeof(unsigned short), mesh->npolys * mesh->nvp * 2, file);
|
||||
fwrite(mesh->flags, sizeof(unsigned short), mesh->npolys, file);
|
||||
fwrite(mesh->areas, sizeof(unsigned char), mesh->npolys, file);
|
||||
fwrite(mesh->regs, sizeof(unsigned short), mesh->npolys, file);
|
||||
}
|
||||
|
||||
void IntermediateValues::debugWrite(FILE* file, const rcPolyMeshDetail* mesh)
|
||||
{
|
||||
if (!file || !mesh)
|
||||
return;
|
||||
|
||||
fwrite(&(mesh->nverts), sizeof(int), 1, file);
|
||||
fwrite(mesh->verts, sizeof(float), mesh->nverts * 3, file);
|
||||
fwrite(&(mesh->ntris), sizeof(int), 1, file);
|
||||
fwrite(mesh->tris, sizeof(char), mesh->ntris * 4, file);
|
||||
fwrite(&(mesh->nmeshes), sizeof(int), 1, file);
|
||||
fwrite(mesh->meshes, sizeof(int), mesh->nmeshes * 4, file);
|
||||
}
|
||||
|
||||
void IntermediateValues::generateObjFile(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
|
||||
{
|
||||
char objFileName[255];
|
||||
sprintf(objFileName, "meshes/map%03u%02u%02u.obj", mapID, tileY, tileX);
|
||||
|
||||
FILE* objFile = fopen(objFileName, "wb");
|
||||
if (!objFile)
|
||||
{
|
||||
char message[1024];
|
||||
sprintf(message, "Failed to open %s for writing!\n", objFileName);
|
||||
perror(message);
|
||||
return;
|
||||
}
|
||||
|
||||
G3D::Array<float> allVerts;
|
||||
G3D::Array<int> allTris;
|
||||
|
||||
allTris.append(meshData.liquidTris);
|
||||
allVerts.append(meshData.liquidVerts);
|
||||
TerrainBuilder::copyIndices(meshData.solidTris, allTris, allVerts.size() / 3);
|
||||
allVerts.append(meshData.solidVerts);
|
||||
|
||||
float* verts = allVerts.getCArray();
|
||||
int vertCount = allVerts.size() / 3;
|
||||
int* tris = allTris.getCArray();
|
||||
int triCount = allTris.size() / 3;
|
||||
|
||||
for (int i = 0; i < allVerts.size() / 3; i++)
|
||||
fprintf(objFile, "v %f %f %f\n", verts[i * 3], verts[i * 3 + 1], verts[i * 3 + 2]);
|
||||
|
||||
for (int i = 0; i < allTris.size() / 3; i++)
|
||||
fprintf(objFile, "f %i %i %i\n", tris[i * 3] + 1, tris[i * 3 + 1] + 1, tris[i * 3 + 2] + 1);
|
||||
|
||||
fclose(objFile);
|
||||
|
||||
|
||||
char tileString[25];
|
||||
sprintf(tileString, "[%02u,%02u]: ", tileY, tileX);
|
||||
printf("%sWriting debug output... \r", tileString);
|
||||
|
||||
sprintf(objFileName, "meshes/%03u.map", mapID);
|
||||
|
||||
objFile = fopen(objFileName, "wb");
|
||||
if (!objFile)
|
||||
{
|
||||
char message[1024];
|
||||
sprintf(message, "Failed to open %s for writing!\n", objFileName);
|
||||
perror(message);
|
||||
return;
|
||||
}
|
||||
|
||||
char b = '\0';
|
||||
fwrite(&b, sizeof(char), 1, objFile);
|
||||
fclose(objFile);
|
||||
|
||||
sprintf(objFileName, "meshes/%03u%02u%02u.mesh", mapID, tileY, tileX);
|
||||
objFile = fopen(objFileName, "wb");
|
||||
if (!objFile)
|
||||
{
|
||||
char message[1024];
|
||||
sprintf(message, "Failed to open %s for writing!\n", objFileName);
|
||||
perror(message);
|
||||
return;
|
||||
}
|
||||
|
||||
fwrite(&vertCount, sizeof(int), 1, objFile);
|
||||
fwrite(verts, sizeof(float), vertCount * 3, objFile);
|
||||
fflush(objFile);
|
||||
|
||||
fwrite(&triCount, sizeof(int), 1, objFile);
|
||||
fwrite(tris, sizeof(int), triCount * 3, objFile);
|
||||
fflush(objFile);
|
||||
|
||||
fclose(objFile);
|
||||
}
|
||||
}
|
||||
60
src/tools/Movemap-Generator/src/IntermediateValues.h
Normal file
60
src/tools/Movemap-Generator/src/IntermediateValues.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _INTERMEDIATE_VALUES_H
|
||||
#define _INTERMEDIATE_VALUES_H
|
||||
|
||||
#include "MMapCommon.h"
|
||||
#include "TerrainBuilder.h"
|
||||
|
||||
#include "Recast.h"
|
||||
#include "DetourNavMesh.h"
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
// this class gathers all debug info holding and output
|
||||
struct IntermediateValues
|
||||
{
|
||||
rcHeightfield* heightfield;
|
||||
rcCompactHeightfield* compactHeightfield;
|
||||
rcContourSet* contours;
|
||||
rcPolyMesh* polyMesh;
|
||||
rcPolyMeshDetail* polyMeshDetail;
|
||||
|
||||
IntermediateValues() : compactHeightfield(NULL), heightfield(NULL),
|
||||
contours(NULL), polyMesh(NULL), polyMeshDetail(NULL) {}
|
||||
~IntermediateValues();
|
||||
|
||||
void writeIV(uint32 mapID, uint32 tileX, uint32 tileY);
|
||||
|
||||
void debugWrite(FILE* file, const rcHeightfield* mesh);
|
||||
void debugWrite(FILE* file, const rcCompactHeightfield* chf);
|
||||
void debugWrite(FILE* file, const rcContourSet* cs);
|
||||
void debugWrite(FILE* file, const rcPolyMesh* mesh);
|
||||
void debugWrite(FILE* file, const rcPolyMeshDetail* mesh);
|
||||
|
||||
void generateObjFile(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
135
src/tools/Movemap-Generator/src/MMapCommon.h
Normal file
135
src/tools/Movemap-Generator/src/MMapCommon.h
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _MMAP_COMMON_H
|
||||
#define _MMAP_COMMON_H
|
||||
|
||||
// stop warning spam from ACE includes
|
||||
#ifdef WIN32
|
||||
# pragma warning( disable : 4996 )
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Platform/Define.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <stddef.h>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
inline bool matchWildcardFilter(const char* filter, const char* str)
|
||||
{
|
||||
if (!filter || !str)
|
||||
return false;
|
||||
|
||||
// end on null character
|
||||
while (*filter && *str)
|
||||
{
|
||||
if (*filter == '*')
|
||||
{
|
||||
if (*++filter == '\0') // wildcard at end of filter means all remaing chars match
|
||||
return true;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (*filter == *str)
|
||||
break;
|
||||
if (*str == '\0')
|
||||
return false; // reached end of string without matching next filter character
|
||||
str++;
|
||||
}
|
||||
}
|
||||
else if (*filter != *str)
|
||||
return false; // mismatch
|
||||
|
||||
filter++;
|
||||
str++;
|
||||
}
|
||||
|
||||
return ((*filter == '\0' || (*filter == '*' && *++filter == '\0')) && *str == '\0');
|
||||
}
|
||||
|
||||
enum ListFilesResult
|
||||
{
|
||||
LISTFILE_DIRECTORY_NOT_FOUND = 0,
|
||||
LISTFILE_OK = 1
|
||||
};
|
||||
|
||||
inline ListFilesResult getDirContents(vector<string>& fileList, string dirpath = ".", string filter = "*", bool includeSubDirs = false)
|
||||
{
|
||||
#ifdef WIN32
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA findFileInfo;
|
||||
string directory;
|
||||
|
||||
directory = dirpath + "/" + filter;
|
||||
|
||||
hFind = FindFirstFile(directory.c_str(), &findFileInfo);
|
||||
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
return LISTFILE_DIRECTORY_NOT_FOUND;
|
||||
|
||||
do
|
||||
{
|
||||
if (includeSubDirs || (findFileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
|
||||
fileList.push_back(string(findFileInfo.cFileName));
|
||||
}
|
||||
while (FindNextFile(hFind, &findFileInfo));
|
||||
|
||||
FindClose(hFind);
|
||||
|
||||
#else
|
||||
const char* p = dirpath.c_str();
|
||||
DIR* dirp = opendir(p);
|
||||
struct dirent* dp;
|
||||
|
||||
while (dirp)
|
||||
{
|
||||
errno = 0;
|
||||
if ((dp = readdir(dirp)) != NULL)
|
||||
{
|
||||
if (matchWildcardFilter(filter.c_str(), dp->d_name))
|
||||
fileList.push_back(string(dp->d_name));
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (dirp)
|
||||
closedir(dirp);
|
||||
else
|
||||
return LISTFILE_DIRECTORY_NOT_FOUND;
|
||||
#endif
|
||||
|
||||
return LISTFILE_OK;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
111
src/tools/Movemap-Generator/src/MangosMap.h
Normal file
111
src/tools/Movemap-Generator/src/MangosMap.h
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _MMAP_MANGOS_MAP_H
|
||||
#define _MMAP_MANGOS_MAP_H
|
||||
|
||||
// following is copied from src/game/GridMap.h (too many useless includes there to use original file)
|
||||
namespace MaNGOS
|
||||
{
|
||||
struct GridMapFileHeader
|
||||
{
|
||||
uint32 mapMagic;
|
||||
uint32 versionMagic;
|
||||
uint32 buildMagic;
|
||||
uint32 areaMapOffset;
|
||||
uint32 areaMapSize;
|
||||
uint32 heightMapOffset;
|
||||
uint32 heightMapSize;
|
||||
uint32 liquidMapOffset;
|
||||
uint32 liquidMapSize;
|
||||
uint32 holesOffset;
|
||||
uint32 holesSize;
|
||||
};
|
||||
|
||||
// ==============mmaps don't use area==============
|
||||
//#define MAP_AREA_NO_AREA 0x0001
|
||||
|
||||
//struct GridMapAreaHeader
|
||||
//{
|
||||
// uint32 fourcc;
|
||||
// uint16 flags;
|
||||
// uint16 gridArea;
|
||||
//};
|
||||
|
||||
#define MAP_HEIGHT_NO_HEIGHT 0x0001
|
||||
#define MAP_HEIGHT_AS_INT16 0x0002
|
||||
#define MAP_HEIGHT_AS_INT8 0x0004
|
||||
|
||||
struct GridMapHeightHeader
|
||||
{
|
||||
uint32 fourcc;
|
||||
uint32 flags;
|
||||
float gridHeight;
|
||||
float gridMaxHeight;
|
||||
};
|
||||
|
||||
#define MAP_LIQUID_NO_TYPE 0x0001
|
||||
#define MAP_LIQUID_NO_HEIGHT 0x0002
|
||||
|
||||
struct GridMapLiquidHeader
|
||||
{
|
||||
uint32 fourcc;
|
||||
uint16 flags;
|
||||
uint16 liquidType;
|
||||
uint8 offsetX;
|
||||
uint8 offsetY;
|
||||
uint8 width;
|
||||
uint8 height;
|
||||
float liquidLevel;
|
||||
};
|
||||
|
||||
//enum GridMapLiquidStatus
|
||||
//{
|
||||
// LIQUID_MAP_NO_WATER = 0x00000000,
|
||||
// LIQUID_MAP_ABOVE_WATER = 0x00000001,
|
||||
// LIQUID_MAP_WATER_WALK = 0x00000002,
|
||||
// LIQUID_MAP_IN_WATER = 0x00000004,
|
||||
// LIQUID_MAP_UNDER_WATER = 0x00000008
|
||||
//};
|
||||
|
||||
#define MAP_LIQUID_TYPE_NO_WATER 0x00
|
||||
#define MAP_LIQUID_TYPE_WATER 0x01
|
||||
#define MAP_LIQUID_TYPE_OCEAN 0x02
|
||||
#define MAP_LIQUID_TYPE_MAGMA 0x04
|
||||
#define MAP_LIQUID_TYPE_SLIME 0x08
|
||||
|
||||
#define MAP_ALL_LIQUIDS (MAP_LIQUID_TYPE_WATER | MAP_LIQUID_TYPE_OCEAN | MAP_LIQUID_TYPE_MAGMA | MAP_LIQUID_TYPE_SLIME)
|
||||
|
||||
#define MAP_LIQUID_TYPE_DARK_WATER 0x10
|
||||
#define MAP_LIQUID_TYPE_WMO_WATER 0x20
|
||||
|
||||
//struct GridMapLiquidData
|
||||
//{
|
||||
// uint32 type;
|
||||
// float level;
|
||||
// float depth_level;
|
||||
//};
|
||||
}
|
||||
|
||||
#endif
|
||||
911
src/tools/Movemap-Generator/src/MapBuilder.cpp
Normal file
911
src/tools/Movemap-Generator/src/MapBuilder.cpp
Normal file
|
|
@ -0,0 +1,911 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include "MMapCommon.h"
|
||||
#include "MapBuilder.h"
|
||||
|
||||
#include "MapTree.h"
|
||||
#include "ModelInstance.h"
|
||||
|
||||
#include "DetourNavMeshBuilder.h"
|
||||
#include "DetourCommon.h"
|
||||
|
||||
using namespace VMAP;
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
MapBuilder::MapBuilder(float maxWalkableAngle, bool skipLiquid,
|
||||
bool skipContinents, bool skipJunkMaps, bool skipBattlegrounds,
|
||||
bool debugOutput, bool bigBaseUnit, const char* offMeshFilePath) :
|
||||
m_terrainBuilder(NULL),
|
||||
m_debugOutput(debugOutput),
|
||||
m_skipContinents(skipContinents),
|
||||
m_skipJunkMaps(skipJunkMaps),
|
||||
m_skipBattlegrounds(skipBattlegrounds),
|
||||
m_maxWalkableAngle(maxWalkableAngle),
|
||||
m_bigBaseUnit(bigBaseUnit),
|
||||
m_rcContext(NULL),
|
||||
m_offMeshFilePath(offMeshFilePath)
|
||||
{
|
||||
m_terrainBuilder = new TerrainBuilder(skipLiquid);
|
||||
|
||||
m_rcContext = new rcContext(false);
|
||||
|
||||
discoverTiles();
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
MapBuilder::~MapBuilder()
|
||||
{
|
||||
for (TileList::iterator it = m_tiles.begin(); it != m_tiles.end(); ++it)
|
||||
{
|
||||
(*it).second->clear();
|
||||
delete(*it).second;
|
||||
}
|
||||
|
||||
delete m_terrainBuilder;
|
||||
delete m_rcContext;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::discoverTiles()
|
||||
{
|
||||
vector<string> files;
|
||||
uint32 mapID, tileX, tileY, tileID, count = 0;
|
||||
char filter[12];
|
||||
|
||||
printf("Discovering maps... ");
|
||||
getDirContents(files, "maps");
|
||||
for (uint32 i = 0; i < files.size(); ++i)
|
||||
{
|
||||
mapID = uint32(atoi(files[i].substr(0, 3).c_str()));
|
||||
if (m_tiles.find(mapID) == m_tiles.end())
|
||||
{
|
||||
m_tiles.insert(pair<uint32, set<uint32>*>(mapID, new set<uint32>));
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
files.clear();
|
||||
getDirContents(files, "vmaps", "*.vmtree");
|
||||
for (uint32 i = 0; i < files.size(); ++i)
|
||||
{
|
||||
mapID = uint32(atoi(files[i].substr(0, 3).c_str()));
|
||||
m_tiles.insert(pair<uint32, set<uint32>*>(mapID, new set<uint32>));
|
||||
count++;
|
||||
}
|
||||
printf("found %u.\n", count);
|
||||
|
||||
count = 0;
|
||||
printf("Discovering tiles... ");
|
||||
for (TileList::iterator itr = m_tiles.begin(); itr != m_tiles.end(); ++itr)
|
||||
{
|
||||
set<uint32>* tiles = (*itr).second;
|
||||
mapID = (*itr).first;
|
||||
|
||||
sprintf(filter, "%03u*.vmtile", mapID);
|
||||
files.clear();
|
||||
getDirContents(files, "vmaps", filter);
|
||||
for (uint32 i = 0; i < files.size(); ++i)
|
||||
{
|
||||
tileX = uint32(atoi(files[i].substr(7, 2).c_str()));
|
||||
tileY = uint32(atoi(files[i].substr(4, 2).c_str()));
|
||||
tileID = StaticMapTree::packTileID(tileY, tileX);
|
||||
|
||||
tiles->insert(tileID);
|
||||
count++;
|
||||
}
|
||||
|
||||
sprintf(filter, "%03u*", mapID);
|
||||
files.clear();
|
||||
getDirContents(files, "maps", filter);
|
||||
for (uint32 i = 0; i < files.size(); ++i)
|
||||
{
|
||||
tileY = uint32(atoi(files[i].substr(3, 2).c_str()));
|
||||
tileX = uint32(atoi(files[i].substr(5, 2).c_str()));
|
||||
tileID = StaticMapTree::packTileID(tileX, tileY);
|
||||
|
||||
if (tiles->insert(tileID).second)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
printf("found %u.\n\n", count);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
set<uint32>* MapBuilder::getTileList(uint32 mapID)
|
||||
{
|
||||
TileList::iterator itr = m_tiles.find(mapID);
|
||||
if (itr != m_tiles.end())
|
||||
return (*itr).second;
|
||||
|
||||
set<uint32>* tiles = new set<uint32>();
|
||||
m_tiles.insert(pair<uint32, set<uint32>*>(mapID, tiles));
|
||||
return tiles;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::buildAllMaps()
|
||||
{
|
||||
for (TileList::iterator it = m_tiles.begin(); it != m_tiles.end(); ++it)
|
||||
{
|
||||
uint32 mapID = (*it).first;
|
||||
if (!shouldSkipMap(mapID))
|
||||
buildMap(mapID);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::getGridBounds(uint32 mapID, uint32& minX, uint32& minY, uint32& maxX, uint32& maxY)
|
||||
{
|
||||
maxX = INT_MAX;
|
||||
maxY = INT_MAX;
|
||||
minX = INT_MIN;
|
||||
minY = INT_MIN;
|
||||
|
||||
float bmin[3], bmax[3], lmin[3], lmax[3];
|
||||
MeshData meshData;
|
||||
|
||||
// make sure we process maps which don't have tiles
|
||||
// initialize the static tree, which loads WDT models
|
||||
if (!m_terrainBuilder->loadVMap(mapID, 64, 64, meshData))
|
||||
return;
|
||||
|
||||
// get the coord bounds of the model data
|
||||
if (meshData.solidVerts.size() + meshData.liquidVerts.size() == 0)
|
||||
return;
|
||||
|
||||
// get the coord bounds of the model data
|
||||
if (meshData.solidVerts.size() && meshData.liquidVerts.size())
|
||||
{
|
||||
rcCalcBounds(meshData.solidVerts.getCArray(), meshData.solidVerts.size() / 3, bmin, bmax);
|
||||
rcCalcBounds(meshData.liquidVerts.getCArray(), meshData.liquidVerts.size() / 3, lmin, lmax);
|
||||
rcVmin(bmin, lmin);
|
||||
rcVmax(bmax, lmax);
|
||||
}
|
||||
else if (meshData.solidVerts.size())
|
||||
rcCalcBounds(meshData.solidVerts.getCArray(), meshData.solidVerts.size() / 3, bmin, bmax);
|
||||
else
|
||||
rcCalcBounds(meshData.liquidVerts.getCArray(), meshData.liquidVerts.size() / 3, lmin, lmax);
|
||||
|
||||
// convert coord bounds to grid bounds
|
||||
maxX = 32 - bmin[0] / GRID_SIZE;
|
||||
maxY = 32 - bmin[2] / GRID_SIZE;
|
||||
minX = 32 - bmax[0] / GRID_SIZE;
|
||||
minY = 32 - bmax[2] / GRID_SIZE;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::buildSingleTile(uint32 mapID, uint32 tileX, uint32 tileY)
|
||||
{
|
||||
dtNavMesh* navMesh = NULL;
|
||||
buildNavMesh(mapID, navMesh);
|
||||
if (!navMesh)
|
||||
{
|
||||
printf("Failed creating navmesh! \n");
|
||||
return;
|
||||
}
|
||||
|
||||
buildTile(mapID, tileX, tileY, navMesh);
|
||||
dtFreeNavMesh(navMesh);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::buildMap(uint32 mapID)
|
||||
{
|
||||
printf("Building map %03u:\n", mapID);
|
||||
|
||||
set<uint32>* tiles = getTileList(mapID);
|
||||
|
||||
// make sure we process maps which don't have tiles
|
||||
if (!tiles->size())
|
||||
{
|
||||
// convert coord bounds to grid bounds
|
||||
uint32 minX, minY, maxX, maxY;
|
||||
getGridBounds(mapID, minX, minY, maxX, maxY);
|
||||
|
||||
// add all tiles within bounds to tile list.
|
||||
for (uint32 i = minX; i <= maxX; ++i)
|
||||
for (uint32 j = minY; j <= maxY; ++j)
|
||||
tiles->insert(StaticMapTree::packTileID(i, j));
|
||||
}
|
||||
|
||||
if (!tiles->size())
|
||||
return;
|
||||
|
||||
// build navMesh
|
||||
dtNavMesh* navMesh = NULL;
|
||||
buildNavMesh(mapID, navMesh);
|
||||
if (!navMesh)
|
||||
{
|
||||
printf("Failed creating navmesh! \n");
|
||||
return;
|
||||
}
|
||||
|
||||
// now start building mmtiles for each tile
|
||||
printf("We have %u tiles. \n", (unsigned int)tiles->size());
|
||||
for (set<uint32>::iterator it = tiles->begin(); it != tiles->end(); ++it)
|
||||
{
|
||||
uint32 tileX, tileY;
|
||||
|
||||
// unpack tile coords
|
||||
StaticMapTree::unpackTileID((*it), tileX, tileY);
|
||||
|
||||
if (shouldSkipTile(mapID, tileX, tileY))
|
||||
continue;
|
||||
|
||||
buildTile(mapID, tileX, tileY, navMesh);
|
||||
}
|
||||
|
||||
dtFreeNavMesh(navMesh);
|
||||
|
||||
printf("Complete! \n\n");
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::buildTile(uint32 mapID, uint32 tileX, uint32 tileY, dtNavMesh* navMesh)
|
||||
{
|
||||
printf("Building map %03u, tile [%02u,%02u]\n", mapID, tileX, tileY);
|
||||
|
||||
MeshData meshData;
|
||||
|
||||
// get heightmap data
|
||||
m_terrainBuilder->loadMap(mapID, tileX, tileY, meshData);
|
||||
|
||||
// get model data
|
||||
m_terrainBuilder->loadVMap(mapID, tileY, tileX, meshData);
|
||||
|
||||
// if there is no data, give up now
|
||||
if (!meshData.solidVerts.size() && !meshData.liquidVerts.size())
|
||||
return;
|
||||
|
||||
// remove unused vertices
|
||||
TerrainBuilder::cleanVertices(meshData.solidVerts, meshData.solidTris);
|
||||
TerrainBuilder::cleanVertices(meshData.liquidVerts, meshData.liquidTris);
|
||||
|
||||
// gather all mesh data for final data check, and bounds calculation
|
||||
G3D::Array<float> allVerts;
|
||||
allVerts.append(meshData.liquidVerts);
|
||||
allVerts.append(meshData.solidVerts);
|
||||
|
||||
if (!allVerts.size())
|
||||
return;
|
||||
|
||||
// get bounds of current tile
|
||||
float bmin[3], bmax[3];
|
||||
getTileBounds(tileX, tileY, allVerts.getCArray(), allVerts.size() / 3, bmin, bmax);
|
||||
|
||||
m_terrainBuilder->loadOffMeshConnections(mapID, tileX, tileY, meshData, m_offMeshFilePath);
|
||||
|
||||
// build navmesh tile
|
||||
buildMoveMapTile(mapID, tileX, tileY, meshData, bmin, bmax, navMesh);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::buildNavMesh(uint32 mapID, dtNavMesh*& navMesh)
|
||||
{
|
||||
set<uint32>* tiles = getTileList(mapID);
|
||||
|
||||
// old code for non-statically assigned bitmask sizes:
|
||||
///*** calculate number of bits needed to store tiles & polys ***/
|
||||
//int tileBits = dtIlog2(dtNextPow2(tiles->size()));
|
||||
//if (tileBits < 1) tileBits = 1; // need at least one bit!
|
||||
//int polyBits = sizeof(dtPolyRef)*8 - SALT_MIN_BITS - tileBits;
|
||||
|
||||
int tileBits = STATIC_TILE_BITS;
|
||||
int polyBits = STATIC_POLY_BITS;
|
||||
|
||||
int maxTiles = tiles->size();
|
||||
int maxPolysPerTile = 1 << polyBits;
|
||||
|
||||
/*** calculate bounds of map ***/
|
||||
|
||||
uint32 tileXMin = 64, tileYMin = 64, tileXMax = 0, tileYMax = 0, tileX, tileY;
|
||||
for (set<uint32>::iterator it = tiles->begin(); it != tiles->end(); ++it)
|
||||
{
|
||||
StaticMapTree::unpackTileID((*it), tileX, tileY);
|
||||
|
||||
if (tileX > tileXMax)
|
||||
tileXMax = tileX;
|
||||
else if (tileX < tileXMin)
|
||||
tileXMin = tileX;
|
||||
|
||||
if (tileY > tileYMax)
|
||||
tileYMax = tileY;
|
||||
else if (tileY < tileYMin)
|
||||
tileYMin = tileY;
|
||||
}
|
||||
|
||||
// use Max because '32 - tileX' is negative for values over 32
|
||||
float bmin[3], bmax[3];
|
||||
getTileBounds(tileXMax, tileYMax, NULL, 0, bmin, bmax);
|
||||
|
||||
/*** now create the navmesh ***/
|
||||
|
||||
// navmesh creation params
|
||||
dtNavMeshParams navMeshParams;
|
||||
memset(&navMeshParams, 0, sizeof(dtNavMeshParams));
|
||||
navMeshParams.tileWidth = GRID_SIZE;
|
||||
navMeshParams.tileHeight = GRID_SIZE;
|
||||
rcVcopy(navMeshParams.orig, bmin);
|
||||
navMeshParams.maxTiles = maxTiles;
|
||||
navMeshParams.maxPolys = maxPolysPerTile;
|
||||
|
||||
navMesh = dtAllocNavMesh();
|
||||
printf("Creating navMesh... \r");
|
||||
if (!navMesh->init(&navMeshParams))
|
||||
{
|
||||
printf("Failed creating navmesh! \n");
|
||||
return;
|
||||
}
|
||||
|
||||
char fileName[25];
|
||||
sprintf(fileName, "mmaps/%03u.mmap", mapID);
|
||||
|
||||
FILE* file = fopen(fileName, "wb");
|
||||
if (!file)
|
||||
{
|
||||
dtFreeNavMesh(navMesh);
|
||||
char message[1024];
|
||||
sprintf(message, "Failed to open %s for writing!\n", fileName);
|
||||
perror(message);
|
||||
return;
|
||||
}
|
||||
|
||||
// now that we know navMesh params are valid, we can write them to file
|
||||
fwrite(&navMeshParams, sizeof(dtNavMeshParams), 1, file);
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::buildMoveMapTile(uint32 mapID, uint32 tileX, uint32 tileY,
|
||||
MeshData& meshData, float bmin[3], float bmax[3],
|
||||
dtNavMesh* navMesh)
|
||||
{
|
||||
// console output
|
||||
char tileString[10];
|
||||
sprintf(tileString, "[%02i,%02i]: ", tileX, tileY);
|
||||
printf("%s Building movemap tiles... \r", tileString);
|
||||
|
||||
IntermediateValues iv;
|
||||
|
||||
float* tVerts = meshData.solidVerts.getCArray();
|
||||
int tVertCount = meshData.solidVerts.size() / 3;
|
||||
int* tTris = meshData.solidTris.getCArray();
|
||||
int tTriCount = meshData.solidTris.size() / 3;
|
||||
|
||||
float* lVerts = meshData.liquidVerts.getCArray();
|
||||
int lVertCount = meshData.liquidVerts.size() / 3;
|
||||
int* lTris = meshData.liquidTris.getCArray();
|
||||
int lTriCount = meshData.liquidTris.size() / 3;
|
||||
uint8* lTriFlags = meshData.liquidType.getCArray();
|
||||
|
||||
// these are WORLD UNIT based metrics
|
||||
// this are basic unit dimentions
|
||||
// value have to divide GRID_SIZE(533.33333f) ( aka: 0.5333, 0.2666, 0.3333, 0.1333, etc )
|
||||
const static float BASE_UNIT_DIM = m_bigBaseUnit ? 0.533333f : 0.266666f;
|
||||
|
||||
// All are in UNIT metrics!
|
||||
const static int VERTEX_PER_MAP = int(GRID_SIZE / BASE_UNIT_DIM + 0.5f);
|
||||
const static int VERTEX_PER_TILE = m_bigBaseUnit ? 40 : 80; // must divide VERTEX_PER_MAP
|
||||
const static int TILES_PER_MAP = VERTEX_PER_MAP / VERTEX_PER_TILE;
|
||||
|
||||
rcConfig config;
|
||||
memset(&config, 0, sizeof(rcConfig));
|
||||
|
||||
rcVcopy(config.bmin, bmin);
|
||||
rcVcopy(config.bmax, bmax);
|
||||
|
||||
config.maxVertsPerPoly = DT_VERTS_PER_POLYGON;
|
||||
config.cs = BASE_UNIT_DIM;
|
||||
config.ch = BASE_UNIT_DIM;
|
||||
config.walkableSlopeAngle = m_maxWalkableAngle;
|
||||
config.tileSize = VERTEX_PER_TILE;
|
||||
config.walkableRadius = m_bigBaseUnit ? 1 : 2;
|
||||
config.borderSize = config.walkableRadius + 3;
|
||||
config.maxEdgeLen = VERTEX_PER_TILE + 1; //anything bigger than tileSize
|
||||
config.walkableHeight = m_bigBaseUnit ? 3 : 6;
|
||||
config.walkableClimb = m_bigBaseUnit ? 2 : 4; // keep less than walkableHeight
|
||||
config.minRegionArea = rcSqr(60);
|
||||
config.mergeRegionArea = rcSqr(50);
|
||||
config.maxSimplificationError = 2.0f; // eliminates most jagged edges (tinny polygons)
|
||||
config.detailSampleDist = config.cs * 64;
|
||||
config.detailSampleMaxError = config.ch * 2;
|
||||
|
||||
// this sets the dimensions of the heightfield - should maybe happen before border padding
|
||||
rcCalcGridSize(config.bmin, config.bmax, config.cs, &config.width, &config.height);
|
||||
|
||||
// allocate subregions : tiles
|
||||
Tile* tiles = new Tile[TILES_PER_MAP * TILES_PER_MAP];
|
||||
|
||||
// Initialize per tile config.
|
||||
rcConfig tileCfg;
|
||||
memcpy(&tileCfg, &config, sizeof(rcConfig));
|
||||
tileCfg.width = config.tileSize + config.borderSize * 2;
|
||||
tileCfg.height = config.tileSize + config.borderSize * 2;
|
||||
|
||||
// build all tiles
|
||||
for (int y = 0; y < TILES_PER_MAP; ++y)
|
||||
{
|
||||
for (int x = 0; x < TILES_PER_MAP; ++x)
|
||||
{
|
||||
Tile& tile = tiles[x + y * TILES_PER_MAP];
|
||||
|
||||
// Calculate the per tile bounding box.
|
||||
tileCfg.bmin[0] = config.bmin[0] + (x * config.tileSize - config.borderSize) * config.cs;
|
||||
tileCfg.bmin[2] = config.bmin[2] + (y * config.tileSize - config.borderSize) * config.cs;
|
||||
tileCfg.bmax[0] = config.bmin[0] + ((x + 1) * config.tileSize + config.borderSize) * config.cs;
|
||||
tileCfg.bmax[2] = config.bmin[2] + ((y + 1) * config.tileSize + config.borderSize) * config.cs;
|
||||
|
||||
float tbmin[2], tbmax[2];
|
||||
tbmin[0] = tileCfg.bmin[0];
|
||||
tbmin[1] = tileCfg.bmin[2];
|
||||
tbmax[0] = tileCfg.bmax[0];
|
||||
tbmax[1] = tileCfg.bmax[2];
|
||||
|
||||
// build heightfield
|
||||
tile.solid = rcAllocHeightfield();
|
||||
if (!tile.solid || !rcCreateHeightfield(m_rcContext, *tile.solid, tileCfg.width, tileCfg.height, tileCfg.bmin, tileCfg.bmax, tileCfg.cs, tileCfg.ch))
|
||||
{
|
||||
printf("%sFailed building heightfield! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
// mark all walkable tiles, both liquids and solids
|
||||
unsigned char* triFlags = new unsigned char[tTriCount];
|
||||
memset(triFlags, NAV_GROUND, tTriCount * sizeof(unsigned char));
|
||||
rcClearUnwalkableTriangles(m_rcContext, tileCfg.walkableSlopeAngle, tVerts, tVertCount, tTris, tTriCount, triFlags);
|
||||
rcRasterizeTriangles(m_rcContext, tVerts, tVertCount, tTris, triFlags, tTriCount, *tile.solid, config.walkableClimb);
|
||||
delete [] triFlags;
|
||||
|
||||
rcFilterLowHangingWalkableObstacles(m_rcContext, config.walkableClimb, *tile.solid);
|
||||
rcFilterLedgeSpans(m_rcContext, tileCfg.walkableHeight, tileCfg.walkableClimb, *tile.solid);
|
||||
rcFilterWalkableLowHeightSpans(m_rcContext, tileCfg.walkableHeight, *tile.solid);
|
||||
|
||||
rcRasterizeTriangles(m_rcContext, lVerts, lVertCount, lTris, lTriFlags, lTriCount, *tile.solid, config.walkableClimb);
|
||||
|
||||
// compact heightfield spans
|
||||
tile.chf = rcAllocCompactHeightfield();
|
||||
if (!tile.chf || !rcBuildCompactHeightfield(m_rcContext, tileCfg.walkableHeight, tileCfg.walkableClimb, *tile.solid, *tile.chf))
|
||||
{
|
||||
printf("%sFailed compacting heightfield! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
// build polymesh intermediates
|
||||
if (!rcErodeWalkableArea(m_rcContext, config.walkableRadius, *tile.chf))
|
||||
{
|
||||
printf("%sFailed eroding area! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!rcBuildDistanceField(m_rcContext, *tile.chf))
|
||||
{
|
||||
printf("%sFailed building distance field! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!rcBuildRegions(m_rcContext, *tile.chf, tileCfg.borderSize, tileCfg.minRegionArea, tileCfg.mergeRegionArea))
|
||||
{
|
||||
printf("%sFailed building regions! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
tile.cset = rcAllocContourSet();
|
||||
if (!tile.cset || !rcBuildContours(m_rcContext, *tile.chf, tileCfg.maxSimplificationError, tileCfg.maxEdgeLen, *tile.cset))
|
||||
{
|
||||
printf("%sFailed building contours! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
// build polymesh
|
||||
tile.pmesh = rcAllocPolyMesh();
|
||||
if (!tile.pmesh || !rcBuildPolyMesh(m_rcContext, *tile.cset, tileCfg.maxVertsPerPoly, *tile.pmesh))
|
||||
{
|
||||
printf("%sFailed building polymesh! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
tile.dmesh = rcAllocPolyMeshDetail();
|
||||
if (!tile.dmesh || !rcBuildPolyMeshDetail(m_rcContext, *tile.pmesh, *tile.chf, tileCfg.detailSampleDist, tileCfg .detailSampleMaxError, *tile.dmesh))
|
||||
{
|
||||
printf("%sFailed building polymesh detail! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
// free those up
|
||||
// we may want to keep them in the future for debug
|
||||
// but right now, we don't have the code to merge them
|
||||
rcFreeHeightField(tile.solid);
|
||||
tile.solid = NULL;
|
||||
rcFreeCompactHeightfield(tile.chf);
|
||||
tile.chf = NULL;
|
||||
rcFreeContourSet(tile.cset);
|
||||
tile.cset = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// merge per tile poly and detail meshes
|
||||
rcPolyMesh** pmmerge = new rcPolyMesh*[TILES_PER_MAP * TILES_PER_MAP];
|
||||
if (!pmmerge)
|
||||
{
|
||||
printf("%s alloc pmmerge FIALED! \r", tileString);
|
||||
return;
|
||||
}
|
||||
|
||||
rcPolyMeshDetail** dmmerge = new rcPolyMeshDetail*[TILES_PER_MAP * TILES_PER_MAP];
|
||||
if (!dmmerge)
|
||||
{
|
||||
printf("%s alloc dmmerge FIALED! \r", tileString);
|
||||
return;
|
||||
}
|
||||
|
||||
int nmerge = 0;
|
||||
for (int y = 0; y < TILES_PER_MAP; ++y)
|
||||
{
|
||||
for (int x = 0; x < TILES_PER_MAP; ++x)
|
||||
{
|
||||
Tile& tile = tiles[x + y * TILES_PER_MAP];
|
||||
if (tile.pmesh)
|
||||
{
|
||||
pmmerge[nmerge] = tile.pmesh;
|
||||
dmmerge[nmerge] = tile.dmesh;
|
||||
nmerge++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
iv.polyMesh = rcAllocPolyMesh();
|
||||
if (!iv.polyMesh)
|
||||
{
|
||||
printf("%s alloc iv.polyMesh FAILED! \r", tileString);
|
||||
return;
|
||||
}
|
||||
rcMergePolyMeshes(m_rcContext, pmmerge, nmerge, *iv.polyMesh);
|
||||
|
||||
iv.polyMeshDetail = rcAllocPolyMeshDetail();
|
||||
if (!iv.polyMeshDetail)
|
||||
{
|
||||
printf("%s alloc m_dmesh FAILED! \r", tileString);
|
||||
return;
|
||||
}
|
||||
rcMergePolyMeshDetails(m_rcContext, dmmerge, nmerge, *iv.polyMeshDetail);
|
||||
|
||||
// free things up
|
||||
delete [] pmmerge;
|
||||
delete [] dmmerge;
|
||||
|
||||
delete [] tiles;
|
||||
|
||||
// remove padding for extraction
|
||||
for (int i = 0; i < iv.polyMesh->nverts; ++i)
|
||||
{
|
||||
unsigned short* v = &iv.polyMesh->verts[i * 3];
|
||||
v[0] -= (unsigned short)config.borderSize;
|
||||
v[2] -= (unsigned short)config.borderSize;
|
||||
}
|
||||
|
||||
// set polygons as walkable
|
||||
// TODO: special flags for DYNAMIC polygons, ie surfaces that can be turned on and off
|
||||
for (int i = 0; i < iv.polyMesh->npolys; ++i)
|
||||
if (iv.polyMesh->areas[i] & RC_WALKABLE_AREA)
|
||||
iv.polyMesh->flags[i] = iv.polyMesh->areas[i];
|
||||
|
||||
// setup mesh parameters
|
||||
dtNavMeshCreateParams params;
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
params.verts = iv.polyMesh->verts;
|
||||
params.vertCount = iv.polyMesh->nverts;
|
||||
params.polys = iv.polyMesh->polys;
|
||||
params.polyAreas = iv.polyMesh->areas;
|
||||
params.polyFlags = iv.polyMesh->flags;
|
||||
params.polyCount = iv.polyMesh->npolys;
|
||||
params.nvp = iv.polyMesh->nvp;
|
||||
params.detailMeshes = iv.polyMeshDetail->meshes;
|
||||
params.detailVerts = iv.polyMeshDetail->verts;
|
||||
params.detailVertsCount = iv.polyMeshDetail->nverts;
|
||||
params.detailTris = iv.polyMeshDetail->tris;
|
||||
params.detailTriCount = iv.polyMeshDetail->ntris;
|
||||
|
||||
params.offMeshConVerts = meshData.offMeshConnections.getCArray();
|
||||
params.offMeshConCount = meshData.offMeshConnections.size() / 6;
|
||||
params.offMeshConRad = meshData.offMeshConnectionRads.getCArray();
|
||||
params.offMeshConDir = meshData.offMeshConnectionDirs.getCArray();
|
||||
params.offMeshConAreas = meshData.offMeshConnectionsAreas.getCArray();
|
||||
params.offMeshConFlags = meshData.offMeshConnectionsFlags.getCArray();
|
||||
|
||||
params.walkableHeight = BASE_UNIT_DIM * config.walkableHeight; // agent height
|
||||
params.walkableRadius = BASE_UNIT_DIM * config.walkableRadius; // agent radius
|
||||
params.walkableClimb = BASE_UNIT_DIM * config.walkableClimb; // keep less that walkableHeight (aka agent height)!
|
||||
params.tileX = (((bmin[0] + bmax[0]) / 2) - navMesh->getParams()->orig[0]) / GRID_SIZE;
|
||||
params.tileY = (((bmin[2] + bmax[2]) / 2) - navMesh->getParams()->orig[2]) / GRID_SIZE;
|
||||
rcVcopy(params.bmin, bmin);
|
||||
rcVcopy(params.bmax, bmax);
|
||||
params.cs = config.cs;
|
||||
params.ch = config.ch;
|
||||
params.tileSize = VERTEX_PER_MAP;
|
||||
|
||||
// will hold final navmesh
|
||||
unsigned char* navData = NULL;
|
||||
int navDataSize = 0;
|
||||
|
||||
do
|
||||
{
|
||||
// these values are checked within dtCreateNavMeshData - handle them here
|
||||
// so we have a clear error message
|
||||
if (params.nvp > DT_VERTS_PER_POLYGON)
|
||||
{
|
||||
printf("%s Invalid verts-per-polygon value! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
if (params.vertCount >= 0xffff)
|
||||
{
|
||||
printf("%s Too many vertices! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
if (!params.vertCount || !params.verts)
|
||||
{
|
||||
// occurs mostly when adjacent tiles have models
|
||||
// loaded but those models don't span into this tile
|
||||
|
||||
// message is an annoyance
|
||||
//printf("%sNo vertices to build tile! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
if (!params.polyCount || !params.polys ||
|
||||
TILES_PER_MAP * TILES_PER_MAP == params.polyCount)
|
||||
{
|
||||
// we have flat tiles with no actual geometry - don't build those, its useless
|
||||
// keep in mind that we do output those into debug info
|
||||
// drop tiles with only exact count - some tiles may have geometry while having less tiles
|
||||
printf("%s No polygons to build on tile! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
if (!params.detailMeshes || !params.detailVerts || !params.detailTris)
|
||||
{
|
||||
printf("%s No detail mesh to build tile! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("%s Building navmesh tile... \r", tileString);
|
||||
if (!dtCreateNavMeshData(¶ms, &navData, &navDataSize))
|
||||
{
|
||||
printf("%s Failed building navmesh tile! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
dtTileRef tileRef = 0;
|
||||
printf("%s Adding tile to navmesh... \r", tileString);
|
||||
// DT_TILE_FREE_DATA tells detour to unallocate memory when the tile
|
||||
// is removed via removeTile()
|
||||
dtStatus dtResult = navMesh->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, &tileRef);
|
||||
if (!tileRef || dtResult != DT_SUCCESS)
|
||||
{
|
||||
printf("%s Failed adding tile to navmesh! \n", tileString);
|
||||
continue;
|
||||
}
|
||||
|
||||
// file output
|
||||
char fileName[255];
|
||||
sprintf(fileName, "mmaps/%03u%02i%02i.mmtile", mapID, tileY, tileX);
|
||||
FILE* file = fopen(fileName, "wb");
|
||||
if (!file)
|
||||
{
|
||||
char message[1024];
|
||||
sprintf(message, "Failed to open %s for writing!\n", fileName);
|
||||
perror(message);
|
||||
navMesh->removeTile(tileRef, NULL, NULL);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("%s Writing to file... \r", tileString);
|
||||
|
||||
// write header
|
||||
MmapTileHeader header;
|
||||
header.usesLiquids = m_terrainBuilder->usesLiquids();
|
||||
header.size = uint32(navDataSize);
|
||||
fwrite(&header, sizeof(MmapTileHeader), 1, file);
|
||||
|
||||
// write data
|
||||
fwrite(navData, sizeof(unsigned char), navDataSize, file);
|
||||
fclose(file);
|
||||
|
||||
// now that tile is written to disk, we can unload it
|
||||
navMesh->removeTile(tileRef, NULL, NULL);
|
||||
}
|
||||
while (0);
|
||||
|
||||
if (m_debugOutput)
|
||||
{
|
||||
// restore padding so that the debug visualization is correct
|
||||
for (int i = 0; i < iv.polyMesh->nverts; ++i)
|
||||
{
|
||||
unsigned short* v = &iv.polyMesh->verts[i * 3];
|
||||
v[0] += (unsigned short)config.borderSize;
|
||||
v[2] += (unsigned short)config.borderSize;
|
||||
}
|
||||
|
||||
iv.generateObjFile(mapID, tileX, tileY, meshData);
|
||||
iv.writeIV(mapID, tileX, tileY);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void MapBuilder::getTileBounds(uint32 tileX, uint32 tileY, float* verts, int vertCount, float* bmin, float* bmax)
|
||||
{
|
||||
// this is for elevation
|
||||
if (verts && vertCount)
|
||||
rcCalcBounds(verts, vertCount, bmin, bmax);
|
||||
else
|
||||
{
|
||||
bmin[1] = FLT_MIN;
|
||||
bmax[1] = FLT_MAX;
|
||||
}
|
||||
|
||||
// this is for width and depth
|
||||
bmax[0] = (32 - int(tileX)) * GRID_SIZE;
|
||||
bmax[2] = (32 - int(tileY)) * GRID_SIZE;
|
||||
bmin[0] = bmax[0] - GRID_SIZE;
|
||||
bmin[2] = bmax[2] - GRID_SIZE;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool MapBuilder::shouldSkipMap(uint32 mapID)
|
||||
{
|
||||
if (m_skipContinents)
|
||||
switch (mapID)
|
||||
{
|
||||
case 0: // Eastern Kingdoms
|
||||
case 1: // Kalimdor
|
||||
case 530: // Outland
|
||||
case 571: // Northrend
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_skipJunkMaps)
|
||||
switch (mapID)
|
||||
{
|
||||
case 13: // test.wdt
|
||||
case 25: // ScottTest.wdt
|
||||
case 29: // Test.wdt
|
||||
case 42: // Colin.wdt
|
||||
case 169: // EmeraldDream.wdt (unused, and very large)
|
||||
case 451: // development.wdt
|
||||
case 573: // ExteriorTest.wdt
|
||||
case 597: // CraigTest.wdt
|
||||
case 605: // development_nonweighted.wdt
|
||||
case 606: // QA_DVD.wdt
|
||||
case 627: // unused.wdt
|
||||
return true;
|
||||
default:
|
||||
if (isTransportMap(mapID))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_skipBattlegrounds)
|
||||
switch (mapID)
|
||||
{
|
||||
case 30: // AV
|
||||
case 37: // AC
|
||||
case 489: // WSG
|
||||
case 529: // AB
|
||||
case 566: // EotS
|
||||
case 607: // SotA
|
||||
case 628: // IoC
|
||||
case 726: // TP
|
||||
case 727: // SM
|
||||
case 728: // BfG
|
||||
case 761: // BfG2
|
||||
case 968: // EotS2
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool MapBuilder::isTransportMap(uint32 mapID)
|
||||
{
|
||||
switch (mapID)
|
||||
{
|
||||
// transport maps
|
||||
case 582: // Transport: Rut'theran to Auberdine
|
||||
case 584: // Transport: Menethil to Theramore
|
||||
case 586: // Transport: Exodar to Auberdine
|
||||
case 587: // Transport: Feathermoon Ferry
|
||||
case 588: // Transport: Menethil to Auberdine
|
||||
case 589: // Transport: Orgrimmar to Grom'Gol
|
||||
case 590: // Transport: Grom'Gol to Undercity
|
||||
case 591: // Transport: Undercity to Orgrimmar
|
||||
case 592: // Transport: Borean Tundra Test
|
||||
case 593: // Transport: Booty Bay to Ratchet
|
||||
case 594: // Transport: Howling Fjord Sister Mercy (Quest)
|
||||
case 596: // Transport: Naglfar
|
||||
case 610: // Transport: Tirisfal to Vengeance Landing
|
||||
case 612: // Transport: Menethil to Valgarde
|
||||
case 613: // Transport: Orgrimmar to Warsong Hold
|
||||
case 614: // Transport: Stormwind to Valiance Keep
|
||||
case 620: // Transport: Moa'ki to Unu'pe
|
||||
case 621: // Transport: Moa'ki to Kamagua
|
||||
case 622: // Transport: Orgrim's Hammer
|
||||
case 623: // Transport: The Skybreaker
|
||||
case 641: // Transport: Alliance Airship BG
|
||||
case 642: // Transport: HordeAirshipBG
|
||||
case 647: // Transport: Orgrimmar to Thunder Bluff
|
||||
case 662: // Transport: Alliance Vashj'ir Ship
|
||||
case 672: // Transport: The Skybreaker (Icecrown Citadel Raid)
|
||||
case 673: // Transport: Orgrim's Hammer (Icecrown Citadel Raid)
|
||||
case 674: // Transport: Ship to Vashj'ir
|
||||
case 712: // Transport: The Skybreaker (IC Dungeon)
|
||||
case 713: // Transport: Orgrim's Hammer (IC Dungeon)
|
||||
case 718: // Transport: The Mighty Wind (Icecrown Citadel Raid)
|
||||
case 738: // Ship to Vashj'ir (Orgrimmar -> Vashj'ir)
|
||||
case 739: // Vashj'ir Sub - Horde
|
||||
case 740: // Vashj'ir Sub - Alliance
|
||||
case 741: // Twilight Highlands Horde Transport
|
||||
case 742: // Vashj'ir Sub - Horde - Circling Abyssal Maw
|
||||
case 743: // Vashj'ir Sub - Alliance circling Abyssal Maw
|
||||
case 746: // Uldum Phase Oasis
|
||||
case 747: // Transport: Deepholm Gunship
|
||||
case 748: // Transport: Onyxia/Nefarian Elevator
|
||||
case 749: // Transport: Gilneas Moving Gunship
|
||||
case 750: // Transport: Gilneas Static Gunship
|
||||
case 762: // Twilight Highlands Zeppelin 1
|
||||
case 763: // Twilight Highlands Zeppelin 2
|
||||
case 765: // Krazzworks Attack Zeppelin
|
||||
case 766: // Transport: Gilneas Moving Gunship 02
|
||||
case 767: // Transport: Gilneas Moving Gunship 03
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool MapBuilder::shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY)
|
||||
{
|
||||
char fileName[255];
|
||||
sprintf(fileName, "mmaps/%03u%02i%02i.mmtile", mapID, tileY, tileX);
|
||||
FILE* file = fopen(fileName, "rb");
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
MmapTileHeader header;
|
||||
fread(&header, sizeof(MmapTileHeader), 1, file);
|
||||
fclose(file);
|
||||
|
||||
if (header.mmapMagic != MMAP_MAGIC || header.dtVersion != DT_NAVMESH_VERSION)
|
||||
return false;
|
||||
|
||||
if (header.mmapVersion != MMAP_VERSION)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
134
src/tools/Movemap-Generator/src/MapBuilder.h
Normal file
134
src/tools/Movemap-Generator/src/MapBuilder.h
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _MAP_BUILDER_H
|
||||
#define _MAP_BUILDER_H
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
#include "TerrainBuilder.h"
|
||||
#include "IntermediateValues.h"
|
||||
|
||||
#include "IVMapManager.h"
|
||||
#include "WorldModel.h"
|
||||
|
||||
#include "Recast.h"
|
||||
#include "DetourNavMesh.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace VMAP;
|
||||
// G3D namespace typedefs conflicts with ACE typedefs
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
typedef map<uint32, set<uint32>*> TileList;
|
||||
struct Tile
|
||||
{
|
||||
Tile() : chf(NULL), solid(NULL), cset(NULL), pmesh(NULL), dmesh(NULL) {}
|
||||
~Tile()
|
||||
{
|
||||
rcFreeCompactHeightfield(chf);
|
||||
rcFreeContourSet(cset);
|
||||
rcFreeHeightField(solid);
|
||||
rcFreePolyMesh(pmesh);
|
||||
rcFreePolyMeshDetail(dmesh);
|
||||
}
|
||||
rcCompactHeightfield* chf;
|
||||
rcHeightfield* solid;
|
||||
rcContourSet* cset;
|
||||
rcPolyMesh* pmesh;
|
||||
rcPolyMeshDetail* dmesh;
|
||||
};
|
||||
|
||||
class MapBuilder
|
||||
{
|
||||
public:
|
||||
MapBuilder(float maxWalkableAngle = 60.f,
|
||||
bool skipLiquid = false,
|
||||
bool skipContinents = false,
|
||||
bool skipJunkMaps = true,
|
||||
bool skipBattlegrounds = false,
|
||||
bool debugOutput = false,
|
||||
bool bigBaseUnit = false,
|
||||
const char* offMeshFilePath = NULL);
|
||||
|
||||
~MapBuilder();
|
||||
|
||||
// builds all mmap tiles for the specified map id (ignores skip settings)
|
||||
void buildMap(uint32 mapID);
|
||||
|
||||
// builds an mmap tile for the specified map and its mesh
|
||||
void buildSingleTile(uint32 mapID, uint32 tileX, uint32 tileY);
|
||||
|
||||
// builds list of maps, then builds all of mmap tiles (based on the skip settings)
|
||||
void buildAllMaps();
|
||||
|
||||
private:
|
||||
// detect maps and tiles
|
||||
void discoverTiles();
|
||||
set<uint32>* getTileList(uint32 mapID);
|
||||
|
||||
void buildNavMesh(uint32 mapID, dtNavMesh*& navMesh);
|
||||
|
||||
void buildTile(uint32 mapID, uint32 tileX, uint32 tileY, dtNavMesh* navMesh);
|
||||
|
||||
// move map building
|
||||
void buildMoveMapTile(uint32 mapID,
|
||||
uint32 tileX,
|
||||
uint32 tileY,
|
||||
MeshData& meshData,
|
||||
float bmin[3],
|
||||
float bmax[3],
|
||||
dtNavMesh* navMesh);
|
||||
|
||||
void getTileBounds(uint32 tileX, uint32 tileY,
|
||||
float* verts, int vertCount,
|
||||
float* bmin, float* bmax);
|
||||
void getGridBounds(uint32 mapID, uint32& minX, uint32& minY, uint32& maxX, uint32& maxY);
|
||||
|
||||
bool shouldSkipMap(uint32 mapID);
|
||||
bool isTransportMap(uint32 mapID);
|
||||
bool shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY);
|
||||
|
||||
TerrainBuilder* m_terrainBuilder;
|
||||
TileList m_tiles;
|
||||
|
||||
bool m_debugOutput;
|
||||
|
||||
const char* m_offMeshFilePath;
|
||||
bool m_skipContinents;
|
||||
bool m_skipJunkMaps;
|
||||
bool m_skipBattlegrounds;
|
||||
|
||||
float m_maxWalkableAngle;
|
||||
bool m_bigBaseUnit;
|
||||
|
||||
// build performance - not really used for now
|
||||
rcContext* m_rcContext;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
862
src/tools/Movemap-Generator/src/TerrainBuilder.cpp
Normal file
862
src/tools/Movemap-Generator/src/TerrainBuilder.cpp
Normal file
|
|
@ -0,0 +1,862 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include "TerrainBuilder.h"
|
||||
|
||||
#include "MMapCommon.h"
|
||||
#include "MapBuilder.h"
|
||||
|
||||
#include "VMapManager2.h"
|
||||
#include "MapTree.h"
|
||||
#include "ModelInstance.h"
|
||||
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
TerrainBuilder::TerrainBuilder(bool skipLiquid) : m_skipLiquid(skipLiquid) { }
|
||||
TerrainBuilder::~TerrainBuilder() { }
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::getLoopVars(Spot portion, int& loopStart, int& loopEnd, int& loopInc)
|
||||
{
|
||||
switch (portion)
|
||||
{
|
||||
case ENTIRE:
|
||||
loopStart = 0;
|
||||
loopEnd = V8_SIZE_SQ;
|
||||
loopInc = 1;
|
||||
break;
|
||||
case TOP:
|
||||
loopStart = 0;
|
||||
loopEnd = V8_SIZE;
|
||||
loopInc = 1;
|
||||
break;
|
||||
case LEFT:
|
||||
loopStart = 0;
|
||||
loopEnd = V8_SIZE_SQ - V8_SIZE + 1;
|
||||
loopInc = V8_SIZE;
|
||||
break;
|
||||
case RIGHT:
|
||||
loopStart = V8_SIZE - 1;
|
||||
loopEnd = V8_SIZE_SQ;
|
||||
loopInc = V8_SIZE;
|
||||
break;
|
||||
case BOTTOM:
|
||||
loopStart = V8_SIZE_SQ - V8_SIZE;
|
||||
loopEnd = V8_SIZE_SQ;
|
||||
loopInc = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
|
||||
{
|
||||
if (loadMap(mapID, tileX, tileY, meshData, ENTIRE))
|
||||
{
|
||||
loadMap(mapID, tileX + 1, tileY, meshData, LEFT);
|
||||
loadMap(mapID, tileX - 1, tileY, meshData, RIGHT);
|
||||
loadMap(mapID, tileX, tileY + 1, meshData, TOP);
|
||||
loadMap(mapID, tileX, tileY - 1, meshData, BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, Spot portion)
|
||||
{
|
||||
char mapFileName[255];
|
||||
sprintf(mapFileName, "maps/%03u%02u%02u.map", mapID, tileY, tileX);
|
||||
|
||||
FILE* mapFile = fopen(mapFileName, "rb");
|
||||
if (!mapFile)
|
||||
return false;
|
||||
|
||||
GridMapFileHeader fheader;
|
||||
fread(&fheader, sizeof(GridMapFileHeader), 1, mapFile);
|
||||
|
||||
if (fheader.versionMagic != *((uint32 const*)(MAP_VERSION_MAGIC)))
|
||||
{
|
||||
fclose(mapFile);
|
||||
printf("%s is the wrong version, please extract new .map files\n", mapFileName);
|
||||
return false;
|
||||
}
|
||||
|
||||
GridMapHeightHeader hheader;
|
||||
fseek(mapFile, fheader.heightMapOffset, SEEK_SET);
|
||||
fread(&hheader, sizeof(GridMapHeightHeader), 1, mapFile);
|
||||
|
||||
bool haveTerrain = !(hheader.flags & MAP_HEIGHT_NO_HEIGHT);
|
||||
bool haveLiquid = fheader.liquidMapOffset && !m_skipLiquid;
|
||||
|
||||
// no data in this map file
|
||||
if (!haveTerrain && !haveLiquid)
|
||||
{
|
||||
fclose(mapFile);
|
||||
return false;
|
||||
}
|
||||
|
||||
// data used later
|
||||
uint16 holes[16][16];
|
||||
memset(holes, 0, sizeof(holes));
|
||||
uint8 liquid_type[16][16];
|
||||
memset(liquid_type, 0, sizeof(liquid_type));
|
||||
G3D::Array<int> ltriangles;
|
||||
G3D::Array<int> ttriangles;
|
||||
|
||||
// terrain data
|
||||
if (haveTerrain)
|
||||
{
|
||||
int i;
|
||||
float heightMultiplier;
|
||||
float V9[V9_SIZE_SQ], V8[V8_SIZE_SQ];
|
||||
|
||||
if (hheader.flags & MAP_HEIGHT_AS_INT8)
|
||||
{
|
||||
uint8 v9[V9_SIZE_SQ];
|
||||
uint8 v8[V8_SIZE_SQ];
|
||||
fread(v9, sizeof(uint8), V9_SIZE_SQ, mapFile);
|
||||
fread(v8, sizeof(uint8), V8_SIZE_SQ, mapFile);
|
||||
heightMultiplier = (hheader.gridMaxHeight - hheader.gridHeight) / 255;
|
||||
|
||||
for (i = 0; i < V9_SIZE_SQ; ++i)
|
||||
V9[i] = (float)v9[i] * heightMultiplier + hheader.gridHeight;
|
||||
|
||||
for (i = 0; i < V8_SIZE_SQ; ++i)
|
||||
V8[i] = (float)v8[i] * heightMultiplier + hheader.gridHeight;
|
||||
}
|
||||
else if (hheader.flags & MAP_HEIGHT_AS_INT16)
|
||||
{
|
||||
uint16 v9[V9_SIZE_SQ];
|
||||
uint16 v8[V8_SIZE_SQ];
|
||||
fread(v9, sizeof(uint16), V9_SIZE_SQ, mapFile);
|
||||
fread(v8, sizeof(uint16), V8_SIZE_SQ, mapFile);
|
||||
heightMultiplier = (hheader.gridMaxHeight - hheader.gridHeight) / 65535;
|
||||
|
||||
for (i = 0; i < V9_SIZE_SQ; ++i)
|
||||
V9[i] = (float)v9[i] * heightMultiplier + hheader.gridHeight;
|
||||
|
||||
for (i = 0; i < V8_SIZE_SQ; ++i)
|
||||
V8[i] = (float)v8[i] * heightMultiplier + hheader.gridHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
fread(V9, sizeof(float), V9_SIZE_SQ, mapFile);
|
||||
fread(V8, sizeof(float), V8_SIZE_SQ, mapFile);
|
||||
}
|
||||
|
||||
// hole data
|
||||
memset(holes, 0, fheader.holesSize);
|
||||
fseek(mapFile, fheader.holesOffset, SEEK_SET);
|
||||
fread(holes, fheader.holesSize, 1, mapFile);
|
||||
|
||||
int count = meshData.solidVerts.size() / 3;
|
||||
float xoffset = (float(tileX) - 32) * GRID_SIZE;
|
||||
float yoffset = (float(tileY) - 32) * GRID_SIZE;
|
||||
|
||||
float coord[3];
|
||||
|
||||
for (i = 0; i < V9_SIZE_SQ; ++i)
|
||||
{
|
||||
getHeightCoord(i, GRID_V9, xoffset, yoffset, coord, V9);
|
||||
meshData.solidVerts.append(coord[0]);
|
||||
meshData.solidVerts.append(coord[2]);
|
||||
meshData.solidVerts.append(coord[1]);
|
||||
}
|
||||
|
||||
for (i = 0; i < V8_SIZE_SQ; ++i)
|
||||
{
|
||||
getHeightCoord(i, GRID_V8, xoffset, yoffset, coord, V8);
|
||||
meshData.solidVerts.append(coord[0]);
|
||||
meshData.solidVerts.append(coord[2]);
|
||||
meshData.solidVerts.append(coord[1]);
|
||||
}
|
||||
|
||||
int j, indices[3], loopStart, loopEnd, loopInc;
|
||||
getLoopVars(portion, loopStart, loopEnd, loopInc);
|
||||
for (i = loopStart; i < loopEnd; i += loopInc)
|
||||
for (j = TOP; j <= BOTTOM; j += 1)
|
||||
{
|
||||
getHeightTriangle(i, Spot(j), indices);
|
||||
ttriangles.append(indices[2] + count);
|
||||
ttriangles.append(indices[1] + count);
|
||||
ttriangles.append(indices[0] + count);
|
||||
}
|
||||
}
|
||||
|
||||
// liquid data
|
||||
if (haveLiquid)
|
||||
{
|
||||
GridMapLiquidHeader lheader;
|
||||
fseek(mapFile, fheader.liquidMapOffset, SEEK_SET);
|
||||
fread(&lheader, sizeof(GridMapLiquidHeader), 1, mapFile);
|
||||
|
||||
float* liquid_map = NULL;
|
||||
|
||||
if (!(lheader.flags & MAP_LIQUID_NO_TYPE))
|
||||
fread(liquid_type, sizeof(liquid_type), 1, mapFile);
|
||||
|
||||
if (!(lheader.flags & MAP_LIQUID_NO_HEIGHT))
|
||||
{
|
||||
liquid_map = new float [lheader.width * lheader.height];
|
||||
fread(liquid_map, sizeof(float), lheader.width * lheader.height, mapFile);
|
||||
}
|
||||
|
||||
if (liquid_type && liquid_map)
|
||||
{
|
||||
int count = meshData.liquidVerts.size() / 3;
|
||||
float xoffset = (float(tileX) - 32) * GRID_SIZE;
|
||||
float yoffset = (float(tileY) - 32) * GRID_SIZE;
|
||||
|
||||
float coord[3];
|
||||
int row, col;
|
||||
|
||||
// generate coordinates
|
||||
if (!(lheader.flags & MAP_LIQUID_NO_HEIGHT))
|
||||
{
|
||||
int j = 0;
|
||||
for (int i = 0; i < V9_SIZE_SQ; ++i)
|
||||
{
|
||||
row = i / V9_SIZE;
|
||||
col = i % V9_SIZE;
|
||||
|
||||
if (row < lheader.offsetY || row >= lheader.offsetY + lheader.height ||
|
||||
col < lheader.offsetX || col >= lheader.offsetX + lheader.width)
|
||||
{
|
||||
// dummy vert using invalid height
|
||||
meshData.liquidVerts.append((xoffset + col * GRID_PART_SIZE) * -1, INVALID_MAP_LIQ_HEIGHT, (yoffset + row * GRID_PART_SIZE) * -1);
|
||||
continue;
|
||||
}
|
||||
|
||||
getLiquidCoord(i, j, xoffset, yoffset, coord, liquid_map);
|
||||
meshData.liquidVerts.append(coord[0]);
|
||||
meshData.liquidVerts.append(coord[2]);
|
||||
meshData.liquidVerts.append(coord[1]);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < V9_SIZE_SQ; ++i)
|
||||
{
|
||||
row = i / V9_SIZE;
|
||||
col = i % V9_SIZE;
|
||||
meshData.liquidVerts.append((xoffset + col * GRID_PART_SIZE) * -1, lheader.liquidLevel, (yoffset + row * GRID_PART_SIZE) * -1);
|
||||
}
|
||||
}
|
||||
|
||||
delete [] liquid_map;
|
||||
|
||||
int indices[3], loopStart, loopEnd, loopInc, triInc;
|
||||
getLoopVars(portion, loopStart, loopEnd, loopInc);
|
||||
triInc = BOTTOM - TOP;
|
||||
|
||||
// generate triangles
|
||||
for (int i = loopStart; i < loopEnd; i += loopInc)
|
||||
for (int j = TOP; j <= BOTTOM; j += triInc)
|
||||
{
|
||||
getHeightTriangle(i, Spot(j), indices, true);
|
||||
ltriangles.append(indices[2] + count);
|
||||
ltriangles.append(indices[1] + count);
|
||||
ltriangles.append(indices[0] + count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(mapFile);
|
||||
|
||||
// now that we have gathered the data, we can figure out which parts to keep:
|
||||
// liquid above ground, ground above liquid
|
||||
int loopStart, loopEnd, loopInc, tTriCount = 4;
|
||||
bool useTerrain, useLiquid;
|
||||
|
||||
float* lverts = meshData.liquidVerts.getCArray();
|
||||
int* ltris = ltriangles.getCArray();
|
||||
|
||||
float* tverts = meshData.solidVerts.getCArray();
|
||||
int* ttris = ttriangles.getCArray();
|
||||
|
||||
if (ltriangles.size() + ttriangles.size() == 0)
|
||||
return false;
|
||||
|
||||
// make a copy of liquid vertices
|
||||
// used to pad right-bottom frame due to lost vertex data at extraction
|
||||
float* lverts_copy = NULL;
|
||||
if (meshData.liquidVerts.size())
|
||||
{
|
||||
lverts_copy = new float[meshData.liquidVerts.size()];
|
||||
memcpy(lverts_copy, lverts, sizeof(float)*meshData.liquidVerts.size());
|
||||
}
|
||||
|
||||
getLoopVars(portion, loopStart, loopEnd, loopInc);
|
||||
for (int i = loopStart; i < loopEnd; i += loopInc)
|
||||
{
|
||||
for (int j = 0; j < 2; ++j)
|
||||
{
|
||||
// default is true, will change to false if needed
|
||||
useTerrain = true;
|
||||
useLiquid = true;
|
||||
uint8 liquidType = MAP_LIQUID_TYPE_NO_WATER;
|
||||
|
||||
// if there is no liquid, don't use liquid
|
||||
if (!liquid_type || !meshData.liquidVerts.size() || !ltriangles.size())
|
||||
useLiquid = false;
|
||||
else
|
||||
{
|
||||
liquidType = getLiquidType(i, liquid_type);
|
||||
switch (liquidType)
|
||||
{
|
||||
default:
|
||||
useLiquid = false;
|
||||
break;
|
||||
case MAP_LIQUID_TYPE_WATER:
|
||||
case MAP_LIQUID_TYPE_OCEAN:
|
||||
// merge different types of water
|
||||
liquidType = NAV_WATER;
|
||||
break;
|
||||
case MAP_LIQUID_TYPE_MAGMA:
|
||||
liquidType = NAV_MAGMA;
|
||||
break;
|
||||
case MAP_LIQUID_TYPE_SLIME:
|
||||
liquidType = NAV_SLIME;
|
||||
break;
|
||||
case MAP_LIQUID_TYPE_DARK_WATER:
|
||||
// players should not be here, so logically neither should creatures
|
||||
useTerrain = false;
|
||||
useLiquid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if there is no terrain, don't use terrain
|
||||
if (!ttriangles.size())
|
||||
useTerrain = false;
|
||||
|
||||
// while extracting ADT data we are losing right-bottom vertices
|
||||
// this code adds fair approximation of lost data
|
||||
if (useLiquid)
|
||||
{
|
||||
float quadHeight = 0;
|
||||
uint32 validCount = 0;
|
||||
for (uint32 idx = 0; idx < 3; idx++)
|
||||
{
|
||||
float h = lverts_copy[ltris[idx] * 3 + 1];
|
||||
if (h != INVALID_MAP_LIQ_HEIGHT && h < INVALID_MAP_LIQ_HEIGHT_MAX)
|
||||
{
|
||||
quadHeight += h;
|
||||
validCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// update vertex height data
|
||||
if (validCount > 0 && validCount < 3)
|
||||
{
|
||||
quadHeight /= validCount;
|
||||
for (uint32 idx = 0; idx < 3; idx++)
|
||||
{
|
||||
float h = lverts[ltris[idx] * 3 + 1];
|
||||
if (h == INVALID_MAP_LIQ_HEIGHT || h > INVALID_MAP_LIQ_HEIGHT_MAX)
|
||||
lverts[ltris[idx] * 3 + 1] = quadHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// no valid vertexes - don't use this poly at all
|
||||
if (validCount == 0)
|
||||
useLiquid = false;
|
||||
}
|
||||
|
||||
// if there is a hole here, don't use the terrain
|
||||
if (useTerrain)
|
||||
useTerrain = !isHole(i, holes);
|
||||
|
||||
// we use only one terrain kind per quad - pick higher one
|
||||
if (useTerrain && useLiquid)
|
||||
{
|
||||
float minLLevel = INVALID_MAP_LIQ_HEIGHT_MAX;
|
||||
float maxLLevel = INVALID_MAP_LIQ_HEIGHT;
|
||||
for (uint32 x = 0; x < 3; x++)
|
||||
{
|
||||
float h = lverts[ltris[x] * 3 + 1];
|
||||
if (minLLevel > h)
|
||||
minLLevel = h;
|
||||
|
||||
if (maxLLevel < h)
|
||||
maxLLevel = h;
|
||||
}
|
||||
|
||||
float maxTLevel = INVALID_MAP_LIQ_HEIGHT;
|
||||
float minTLevel = INVALID_MAP_LIQ_HEIGHT_MAX;
|
||||
for (uint32 x = 0; x < 6; x++)
|
||||
{
|
||||
float h = tverts[ttris[x] * 3 + 1];
|
||||
if (maxTLevel < h)
|
||||
maxTLevel = h;
|
||||
|
||||
if (minTLevel > h)
|
||||
minTLevel = h;
|
||||
}
|
||||
|
||||
// terrain under the liquid?
|
||||
if (minLLevel > maxTLevel)
|
||||
useTerrain = false;
|
||||
|
||||
//liquid under the terrain?
|
||||
if (minTLevel > maxLLevel)
|
||||
useLiquid = false;
|
||||
}
|
||||
|
||||
// store the result
|
||||
if (useLiquid)
|
||||
{
|
||||
meshData.liquidType.append(liquidType);
|
||||
for (int k = 0; k < 3; ++k)
|
||||
meshData.liquidTris.append(ltris[k]);
|
||||
}
|
||||
|
||||
if (useTerrain)
|
||||
for (int k = 0; k < 3 * tTriCount / 2; ++k)
|
||||
meshData.solidTris.append(ttris[k]);
|
||||
|
||||
// advance to next set of triangles
|
||||
ltris += 3;
|
||||
ttris += 3 * tTriCount / 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (lverts_copy)
|
||||
delete [] lverts_copy;
|
||||
|
||||
return meshData.solidTris.size() || meshData.liquidTris.size();
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::getHeightCoord(int index, Grid grid, float xOffset, float yOffset, float* coord, float* v)
|
||||
{
|
||||
// wow coords: x, y, height
|
||||
// coord is mirroed about the horizontal axes
|
||||
switch (grid)
|
||||
{
|
||||
case GRID_V9:
|
||||
coord[0] = (xOffset + index % (V9_SIZE) * GRID_PART_SIZE) * -1.f;
|
||||
coord[1] = (yOffset + (int)(index / (V9_SIZE)) * GRID_PART_SIZE) * -1.f;
|
||||
coord[2] = v[index];
|
||||
break;
|
||||
case GRID_V8:
|
||||
coord[0] = (xOffset + index % (V8_SIZE) * GRID_PART_SIZE + GRID_PART_SIZE / 2.f) * -1.f;
|
||||
coord[1] = (yOffset + (int)(index / (V8_SIZE)) * GRID_PART_SIZE + GRID_PART_SIZE / 2.f) * -1.f;
|
||||
coord[2] = v[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::getHeightTriangle(int square, Spot triangle, int* indices, bool liquid/* = false*/)
|
||||
{
|
||||
int rowOffset = square / V8_SIZE;
|
||||
if (!liquid)
|
||||
switch (triangle)
|
||||
{
|
||||
case TOP:
|
||||
indices[0] = square + rowOffset; // 0-----1 .... 128
|
||||
indices[1] = square + 1 + rowOffset; // |\ T /|
|
||||
indices[2] = (V9_SIZE_SQ) + square; // | \ / |
|
||||
break; // |L 0 R| .. 127
|
||||
case LEFT: // | / \ |
|
||||
indices[0] = square + rowOffset; // |/ B \|
|
||||
indices[1] = (V9_SIZE_SQ) + square; // 129---130 ... 386
|
||||
indices[2] = square + V9_SIZE + rowOffset; // |\ /|
|
||||
break; // | \ / |
|
||||
case RIGHT: // | 128 | .. 255
|
||||
indices[0] = square + 1 + rowOffset; // | / \ |
|
||||
indices[1] = square + V9_SIZE + 1 + rowOffset; // |/ \|
|
||||
indices[2] = (V9_SIZE_SQ) + square; // 258---259 ... 515
|
||||
break;
|
||||
case BOTTOM:
|
||||
indices[0] = (V9_SIZE_SQ) + square;
|
||||
indices[1] = square + V9_SIZE + 1 + rowOffset;
|
||||
indices[2] = square + V9_SIZE + rowOffset;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
else
|
||||
switch (triangle)
|
||||
{
|
||||
// 0-----1 .... 128
|
||||
case TOP: // |\ |
|
||||
indices[0] = square + rowOffset; // | \ T |
|
||||
indices[1] = square + 1 + rowOffset; // | \ |
|
||||
indices[2] = square + V9_SIZE + 1 + rowOffset; // | B \ |
|
||||
break; // | \|
|
||||
case BOTTOM: // 129---130 ... 386
|
||||
indices[0] = square + rowOffset; // |\ |
|
||||
indices[1] = square + V9_SIZE + 1 + rowOffset; // | \ |
|
||||
indices[2] = square + V9_SIZE + rowOffset; // | \ |
|
||||
break; // | \ |
|
||||
default: break; // | \|
|
||||
} // 258---259 ... 515
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::getLiquidCoord(int index, int index2, float xOffset, float yOffset, float* coord, float* v)
|
||||
{
|
||||
// wow coords: x, y, height
|
||||
// coord is mirroed about the horizontal axes
|
||||
coord[0] = (xOffset + index % (V9_SIZE) * GRID_PART_SIZE) * -1.f;
|
||||
coord[1] = (yOffset + (int)(index / (V9_SIZE)) * GRID_PART_SIZE) * -1.f;
|
||||
coord[2] = v[index2];
|
||||
}
|
||||
|
||||
static uint16 holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
|
||||
static uint16 holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
|
||||
|
||||
/**************************************************************************/
|
||||
bool TerrainBuilder::isHole(int square, const uint16 holes[16][16])
|
||||
{
|
||||
int row = square / 128;
|
||||
int col = square % 128;
|
||||
int cellRow = row / 8; // 8 squares per cell
|
||||
int cellCol = col / 8;
|
||||
int holeRow = row % 8 / 2;
|
||||
int holeCol = (square - (row * 128 + cellCol * 8)) / 2;
|
||||
|
||||
uint16 hole = holes[cellRow][cellCol];
|
||||
|
||||
return (hole & holetab_h[holeCol] & holetab_v[holeRow]) != 0;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
uint8 TerrainBuilder::getLiquidType(int square, const uint8 liquid_type[16][16])
|
||||
{
|
||||
int row = square / 128;
|
||||
int col = square % 128;
|
||||
int cellRow = row / 8; // 8 squares per cell
|
||||
int cellCol = col / 8;
|
||||
|
||||
return liquid_type[cellRow][cellCol];
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool TerrainBuilder::loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
|
||||
{
|
||||
IVMapManager* vmapManager = new VMapManager2();
|
||||
VMAPLoadResult result = vmapManager->loadMap("vmaps", mapID, tileX, tileY);
|
||||
bool retval = false;
|
||||
|
||||
do
|
||||
{
|
||||
if (result == VMAP_LOAD_RESULT_ERROR)
|
||||
break;
|
||||
|
||||
InstanceTreeMap instanceTrees;
|
||||
((VMapManager2*)vmapManager)->getInstanceMapTree(instanceTrees);
|
||||
|
||||
if (!instanceTrees[mapID])
|
||||
break;
|
||||
|
||||
ModelInstance* models = NULL;
|
||||
uint32 count = 0;
|
||||
instanceTrees[mapID]->getModelInstances(models, count);
|
||||
|
||||
if (!models)
|
||||
break;
|
||||
|
||||
for (uint32 i = 0; i < count; ++i)
|
||||
{
|
||||
ModelInstance instance = models[i];
|
||||
|
||||
// model instances exist in tree even though there are instances of that model in this tile
|
||||
WorldModel* worldModel = instance.getWorldModel();
|
||||
if (!worldModel)
|
||||
continue;
|
||||
|
||||
// now we have a model to add to the meshdata
|
||||
retval = true;
|
||||
|
||||
vector<GroupModel> groupModels;
|
||||
worldModel->getGroupModels(groupModels);
|
||||
|
||||
// all M2s need to have triangle indices reversed
|
||||
bool isM2 = instance.name.find(".m2") != instance.name.npos || instance.name.find(".M2") != instance.name.npos;
|
||||
|
||||
// transform data
|
||||
float scale = instance.iScale;
|
||||
G3D::Matrix3 rotation = G3D::Matrix3::fromEulerAnglesXYZ(G3D::pi() * instance.iRot.z / -180.f, G3D::pi() * instance.iRot.x / -180.f, G3D::pi() * instance.iRot.y / -180.f);
|
||||
Vector3 position = instance.iPos;
|
||||
position.x -= 32 * GRID_SIZE;
|
||||
position.y -= 32 * GRID_SIZE;
|
||||
|
||||
for (vector<GroupModel>::iterator it = groupModels.begin(); it != groupModels.end(); ++it)
|
||||
{
|
||||
vector<Vector3> tempVertices;
|
||||
vector<Vector3> transformedVertices;
|
||||
vector<MeshTriangle> tempTriangles;
|
||||
WmoLiquid* liquid = NULL;
|
||||
|
||||
(*it).getMeshData(tempVertices, tempTriangles, liquid);
|
||||
|
||||
// first handle collision mesh
|
||||
transform(tempVertices, transformedVertices, scale, rotation, position);
|
||||
|
||||
int offset = meshData.solidVerts.size() / 3;
|
||||
|
||||
copyVertices(transformedVertices, meshData.solidVerts);
|
||||
copyIndices(tempTriangles, meshData.solidTris, offset, isM2);
|
||||
|
||||
// now handle liquid data
|
||||
if (liquid)
|
||||
{
|
||||
vector<Vector3> liqVerts;
|
||||
vector<int> liqTris;
|
||||
uint32 tilesX, tilesY, vertsX, vertsY;
|
||||
Vector3 corner;
|
||||
liquid->getPosInfo(tilesX, tilesY, corner);
|
||||
vertsX = tilesX + 1;
|
||||
vertsY = tilesY + 1;
|
||||
uint8* flags = liquid->GetFlagsStorage();
|
||||
float* data = liquid->GetHeightStorage();
|
||||
uint8 type = NAV_EMPTY;
|
||||
|
||||
// convert liquid type to NavTerrain
|
||||
switch (liquid->GetType())
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
type = NAV_WATER;
|
||||
break;
|
||||
case 2:
|
||||
type = NAV_MAGMA;
|
||||
break;
|
||||
case 3:
|
||||
type = NAV_SLIME;
|
||||
break;
|
||||
}
|
||||
|
||||
// indexing is weird...
|
||||
// after a lot of trial and error, this is what works:
|
||||
// vertex = y*vertsX+x
|
||||
// tile = x*tilesY+y
|
||||
// flag = y*tilesY+x
|
||||
|
||||
Vector3 vert;
|
||||
for (uint32 x = 0; x < vertsX; ++x)
|
||||
for (uint32 y = 0; y < vertsY; ++y)
|
||||
{
|
||||
vert = Vector3(corner.x + x * GRID_PART_SIZE, corner.y + y * GRID_PART_SIZE, data[y * vertsX + x]);
|
||||
vert = vert * rotation * scale + position;
|
||||
vert.x *= -1.f;
|
||||
vert.y *= -1.f;
|
||||
liqVerts.push_back(vert);
|
||||
}
|
||||
|
||||
int idx1, idx2, idx3, idx4;
|
||||
uint32 square;
|
||||
for (uint32 x = 0; x < tilesX; ++x)
|
||||
for (uint32 y = 0; y < tilesY; ++y)
|
||||
if ((flags[x + y * tilesX] & 0x0f) != 0x0f)
|
||||
{
|
||||
square = x * tilesY + y;
|
||||
idx1 = square + x;
|
||||
idx2 = square + 1 + x;
|
||||
idx3 = square + tilesY + 1 + 1 + x;
|
||||
idx4 = square + tilesY + 1 + x;
|
||||
|
||||
// top triangle
|
||||
liqTris.push_back(idx3);
|
||||
liqTris.push_back(idx2);
|
||||
liqTris.push_back(idx1);
|
||||
// bottom triangle
|
||||
liqTris.push_back(idx4);
|
||||
liqTris.push_back(idx3);
|
||||
liqTris.push_back(idx1);
|
||||
}
|
||||
|
||||
uint32 liqOffset = meshData.liquidVerts.size() / 3;
|
||||
for (uint32 i = 0; i < liqVerts.size(); ++i)
|
||||
meshData.liquidVerts.append(liqVerts[i].y, liqVerts[i].z, liqVerts[i].x);
|
||||
|
||||
for (uint32 i = 0; i < liqTris.size() / 3; ++i)
|
||||
{
|
||||
meshData.liquidTris.append(liqTris[i * 3 + 1] + liqOffset, liqTris[i * 3 + 2] + liqOffset, liqTris[i * 3] + liqOffset);
|
||||
meshData.liquidType.append(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (false);
|
||||
|
||||
vmapManager->unloadMap(mapID, tileX, tileY);
|
||||
delete vmapManager;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::transform(vector<Vector3>& source, vector<Vector3>& transformedVertices, float scale, G3D::Matrix3& rotation, Vector3& position)
|
||||
{
|
||||
for (vector<Vector3>::iterator it = source.begin(); it != source.end(); ++it)
|
||||
{
|
||||
// apply tranform, then mirror along the horizontal axes
|
||||
Vector3 v((*it) * rotation * scale + position);
|
||||
v.x *= -1.f;
|
||||
v.y *= -1.f;
|
||||
transformedVertices.push_back(v);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::copyVertices(vector<Vector3>& source, G3D::Array<float>& dest)
|
||||
{
|
||||
for (vector<Vector3>::iterator it = source.begin(); it != source.end(); ++it)
|
||||
{
|
||||
dest.push_back((*it).y);
|
||||
dest.push_back((*it).z);
|
||||
dest.push_back((*it).x);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::copyIndices(vector<MeshTriangle>& source, G3D::Array<int>& dest, int offset, bool flip)
|
||||
{
|
||||
if (flip)
|
||||
{
|
||||
for (vector<MeshTriangle>::iterator it = source.begin(); it != source.end(); ++it)
|
||||
{
|
||||
dest.push_back((*it).idx2 + offset);
|
||||
dest.push_back((*it).idx1 + offset);
|
||||
dest.push_back((*it).idx0 + offset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (vector<MeshTriangle>::iterator it = source.begin(); it != source.end(); ++it)
|
||||
{
|
||||
dest.push_back((*it).idx0 + offset);
|
||||
dest.push_back((*it).idx1 + offset);
|
||||
dest.push_back((*it).idx2 + offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::copyIndices(G3D::Array<int>& source, G3D::Array<int>& dest, int offset)
|
||||
{
|
||||
int* src = source.getCArray();
|
||||
for (int32 i = 0; i < source.size(); ++i)
|
||||
dest.append(src[i] + offset);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::cleanVertices(G3D::Array<float>& verts, G3D::Array<int>& tris)
|
||||
{
|
||||
map<int, int> vertMap;
|
||||
|
||||
int* t = tris.getCArray();
|
||||
float* v = verts.getCArray();
|
||||
|
||||
// collect all the vertex indices from triangle
|
||||
for (int i = 0; i < tris.size(); ++i)
|
||||
{
|
||||
if (vertMap.find(t[i]) != vertMap.end())
|
||||
continue;
|
||||
|
||||
vertMap.insert(std::pair<int, int>(t[i], 0));
|
||||
}
|
||||
|
||||
// collect the vertices
|
||||
G3D::Array<float> cleanVerts;
|
||||
int index, count = 0;
|
||||
for (map<int, int>::iterator it = vertMap.begin(); it != vertMap.end(); ++it)
|
||||
{
|
||||
index = (*it).first;
|
||||
(*it).second = count;
|
||||
cleanVerts.append(v[index * 3], v[index * 3 + 1], v[index * 3 + 2]);
|
||||
count++;
|
||||
}
|
||||
verts.fastClear();
|
||||
verts.append(cleanVerts);
|
||||
cleanVerts.clear();
|
||||
|
||||
// update triangles to use new indices
|
||||
for (int i = 0; i < tris.size(); ++i)
|
||||
{
|
||||
map<int, int>::iterator it;
|
||||
if ((it = vertMap.find(t[i])) == vertMap.end())
|
||||
continue;
|
||||
|
||||
t[i] = (*it).second;
|
||||
}
|
||||
|
||||
vertMap.clear();
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
void TerrainBuilder::loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, const char* offMeshFilePath)
|
||||
{
|
||||
// no meshfile input given?
|
||||
if (offMeshFilePath == NULL)
|
||||
return;
|
||||
|
||||
FILE* fp = fopen(offMeshFilePath, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
printf(" loadOffMeshConnections:: input file %s not found!\n", offMeshFilePath);
|
||||
return;
|
||||
}
|
||||
|
||||
// pretty silly thing, as we parse entire file and load only the tile we need
|
||||
// but we don't expect this file to be too large
|
||||
char* buf = new char[512];
|
||||
while (fgets(buf, 512, fp))
|
||||
{
|
||||
float p0[3], p1[3];
|
||||
int mid, tx, ty;
|
||||
float size;
|
||||
if (10 != sscanf(buf, "%d %d,%d (%f %f %f) (%f %f %f) %f", &mid, &tx, &ty,
|
||||
&p0[0], &p0[1], &p0[2], &p1[0], &p1[1], &p1[2], &size))
|
||||
continue;
|
||||
|
||||
if (mapID == mid, tileX == tx, tileY == ty)
|
||||
{
|
||||
meshData.offMeshConnections.append(p0[1]);
|
||||
meshData.offMeshConnections.append(p0[2]);
|
||||
meshData.offMeshConnections.append(p0[0]);
|
||||
|
||||
meshData.offMeshConnections.append(p1[1]);
|
||||
meshData.offMeshConnections.append(p1[2]);
|
||||
meshData.offMeshConnections.append(p1[0]);
|
||||
|
||||
meshData.offMeshConnectionDirs.append(1); // 1 - both direction, 0 - one sided
|
||||
meshData.offMeshConnectionRads.append(size); // agent size equivalent
|
||||
// can be used same way as polygon flags
|
||||
meshData.offMeshConnectionsAreas.append((unsigned char)0xFF);
|
||||
meshData.offMeshConnectionsFlags.append((unsigned short)0xFF); // all movement masks can make this path
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delete [] buf;
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
143
src/tools/Movemap-Generator/src/TerrainBuilder.h
Normal file
143
src/tools/Movemap-Generator/src/TerrainBuilder.h
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _MMAP_TERRAIN_BUILDER_H
|
||||
#define _MMAP_TERRAIN_BUILDER_H
|
||||
|
||||
#include "MMapCommon.h"
|
||||
#include "MangosMap.h"
|
||||
#include "../../src/game/MoveMapSharedDefines.h"
|
||||
|
||||
#include "WorldModel.h"
|
||||
|
||||
#include "G3D/Array.h"
|
||||
#include "G3D/Vector3.h"
|
||||
#include "G3D/Matrix3.h"
|
||||
|
||||
using namespace MaNGOS;
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
enum Spot
|
||||
{
|
||||
TOP = 1,
|
||||
RIGHT = 2,
|
||||
LEFT = 3,
|
||||
BOTTOM = 4,
|
||||
ENTIRE = 5
|
||||
};
|
||||
|
||||
enum Grid
|
||||
{
|
||||
GRID_V8,
|
||||
GRID_V9
|
||||
};
|
||||
|
||||
static const int V9_SIZE = 129;
|
||||
static const int V9_SIZE_SQ = V9_SIZE* V9_SIZE;
|
||||
static const int V8_SIZE = 128;
|
||||
static const int V8_SIZE_SQ = V8_SIZE* V8_SIZE;
|
||||
static const float GRID_SIZE = 533.33333f;
|
||||
static const float GRID_PART_SIZE = GRID_SIZE / V8_SIZE;
|
||||
|
||||
// see contrib/extractor/system.cpp, CONF_use_minHeight
|
||||
static const float INVALID_MAP_LIQ_HEIGHT = -500.f;
|
||||
static const float INVALID_MAP_LIQ_HEIGHT_MAX = 5000.0f;
|
||||
|
||||
// see following files:
|
||||
// contrib/extractor/system.cpp
|
||||
// src/game/GridMap.cpp
|
||||
static char const* MAP_VERSION_MAGIC = "c1.3";
|
||||
|
||||
struct MeshData
|
||||
{
|
||||
G3D::Array<float> solidVerts;
|
||||
G3D::Array<int> solidTris;
|
||||
|
||||
G3D::Array<float> liquidVerts;
|
||||
G3D::Array<int> liquidTris;
|
||||
G3D::Array<uint8> liquidType;
|
||||
|
||||
// offmesh connection data
|
||||
G3D::Array<float> offMeshConnections; // [p0y,p0z,p0x,p1y,p1z,p1x] - per connection
|
||||
G3D::Array<float> offMeshConnectionRads;
|
||||
G3D::Array<unsigned char> offMeshConnectionDirs;
|
||||
G3D::Array<unsigned char> offMeshConnectionsAreas;
|
||||
G3D::Array<unsigned short> offMeshConnectionsFlags;
|
||||
};
|
||||
|
||||
class TerrainBuilder
|
||||
{
|
||||
public:
|
||||
TerrainBuilder(bool skipLiquid);
|
||||
~TerrainBuilder();
|
||||
|
||||
void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
|
||||
bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
|
||||
void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, const char* offMeshFilePath);
|
||||
|
||||
bool usesLiquids() { return !m_skipLiquid; }
|
||||
|
||||
// vert and triangle methods
|
||||
static void transform(vector<G3D::Vector3>& original, vector<G3D::Vector3>& transformed,
|
||||
float scale, G3D::Matrix3& rotation, G3D::Vector3& position);
|
||||
static void copyVertices(vector<G3D::Vector3>& source, G3D::Array<float>& dest);
|
||||
static void copyIndices(vector<VMAP::MeshTriangle>& source, G3D::Array<int>& dest, int offest, bool flip);
|
||||
static void copyIndices(G3D::Array<int>& src, G3D::Array<int>& dest, int offset);
|
||||
static void cleanVertices(G3D::Array<float>& verts, G3D::Array<int>& tris);
|
||||
private:
|
||||
/// Loads a portion of a map's terrain
|
||||
bool loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, Spot portion);
|
||||
|
||||
/// Sets loop variables for selecting only certain parts of a map's terrain
|
||||
void getLoopVars(Spot portion, int& loopStart, int& loopEnd, int& loopInc);
|
||||
|
||||
/// Controls whether liquids are loaded
|
||||
bool m_skipLiquid;
|
||||
|
||||
/// Load the map terrain from file
|
||||
bool loadHeightMap(uint32 mapID, uint32 tileX, uint32 tileY, G3D::Array<float>& vertices, G3D::Array<int>& triangles, Spot portion);
|
||||
|
||||
/// Get the vector coordinate for a specific position
|
||||
void getHeightCoord(int index, Grid grid, float xOffset, float yOffset, float* coord, float* v);
|
||||
|
||||
/// Get the triangle's vector indices for a specific position
|
||||
void getHeightTriangle(int square, Spot triangle, int* indices, bool liquid = false);
|
||||
|
||||
/// Determines if the specific position's triangles should be rendered
|
||||
bool isHole(int square, const uint16 holes[16][16]);
|
||||
|
||||
/// Get the liquid vector coordinate for a specific position
|
||||
void getLiquidCoord(int index, int index2, float xOffset, float yOffset, float* coord, float* v);
|
||||
|
||||
/// Get the liquid type for a specific position
|
||||
uint8 getLiquidType(int square, const uint8 liquid_type[16][16]);
|
||||
|
||||
// hide parameterless and copy constructor
|
||||
TerrainBuilder();
|
||||
TerrainBuilder(const TerrainBuilder& tb);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
79
src/tools/Movemap-Generator/src/VMapExtensions.cpp
Normal file
79
src/tools/Movemap-Generator/src/VMapExtensions.cpp
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "MapTree.h"
|
||||
#include "VMapManager2.h"
|
||||
#include "WorldModel.h"
|
||||
#include "ModelInstance.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace VMAP
|
||||
{
|
||||
// Need direct access to encapsulated VMAP data, so we add functions for MMAP generator
|
||||
// maybe add MapBuilder as friend to all of the below classes would be better?
|
||||
|
||||
// declared in src/shared/vmap/MapTree.h
|
||||
void StaticMapTree::getModelInstances(ModelInstance*& models, uint32& count)
|
||||
{
|
||||
models = iTreeValues;
|
||||
count = iNTreeValues;
|
||||
}
|
||||
|
||||
// declared in src/shared/vmap/VMapManager2.h
|
||||
void VMapManager2::getInstanceMapTree(InstanceTreeMap& instanceMapTree)
|
||||
{
|
||||
instanceMapTree = iInstanceMapTrees;
|
||||
}
|
||||
|
||||
// declared in src/shared/vmap/WorldModel.h
|
||||
void WorldModel::getGroupModels(vector<GroupModel>& groupModels)
|
||||
{
|
||||
groupModels = this->groupModels;
|
||||
}
|
||||
|
||||
// declared in src/shared/vmap/WorldModel.h
|
||||
void GroupModel::getMeshData(vector<Vector3>& vertices, vector<MeshTriangle>& triangles, WmoLiquid*& liquid)
|
||||
{
|
||||
vertices = this->vertices;
|
||||
triangles = this->triangles;
|
||||
liquid = iLiquid;
|
||||
}
|
||||
|
||||
// declared in src/shared/vmap/ModelInstance.h
|
||||
WorldModel* const ModelInstance::getWorldModel()
|
||||
{
|
||||
return iModel;
|
||||
}
|
||||
|
||||
// declared in src/shared/vmap/WorldModel.h
|
||||
void WmoLiquid::getPosInfo(uint32& tilesX, uint32& tilesY, Vector3& corner) const
|
||||
{
|
||||
tilesX = iTilesX;
|
||||
tilesY = iTilesY;
|
||||
corner = iCorner;
|
||||
}
|
||||
}
|
||||
305
src/tools/Movemap-Generator/src/generator.cpp
Normal file
305
src/tools/Movemap-Generator/src/generator.cpp
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include "MMapCommon.h"
|
||||
#include "MapBuilder.h"
|
||||
|
||||
using namespace MMAP;
|
||||
|
||||
bool checkDirectories(bool debugOutput)
|
||||
{
|
||||
vector<string> dirFiles;
|
||||
|
||||
if (getDirContents(dirFiles, "maps") == LISTFILE_DIRECTORY_NOT_FOUND || !dirFiles.size())
|
||||
{
|
||||
printf("'maps' directory is empty or does not exist\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
dirFiles.clear();
|
||||
if (getDirContents(dirFiles, "vmaps", "*.vmtree") == LISTFILE_DIRECTORY_NOT_FOUND || !dirFiles.size())
|
||||
{
|
||||
printf("'vmaps' directory is empty or does not exist\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
dirFiles.clear();
|
||||
if (getDirContents(dirFiles, "mmaps") == LISTFILE_DIRECTORY_NOT_FOUND)
|
||||
{
|
||||
printf("'mmaps' directory does not exist\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
dirFiles.clear();
|
||||
if (debugOutput)
|
||||
{
|
||||
if (getDirContents(dirFiles, "meshes") == LISTFILE_DIRECTORY_NOT_FOUND)
|
||||
{
|
||||
printf("'meshes' directory does not exist (no place to put debugOutput files)\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void printUsage()
|
||||
{
|
||||
printf("Generator command line args\n\n");
|
||||
printf("-? : This help\n");
|
||||
printf("[#] : Build only the map specified by #.\n");
|
||||
printf("--maxAngle [#] : Max walkable inclination angle\n");
|
||||
printf("--tile [#,#] : Build the specified tile\n");
|
||||
printf("--skipLiquid [true|false] : liquid data for maps\n");
|
||||
printf("--skipContinents [true|false] : skip continents\n");
|
||||
printf("--skipJunkMaps [true|false] : junk maps include some unused\n");
|
||||
printf("--skipBattlegrounds [true|false] : does not include PVP arenas\n");
|
||||
printf("--debugOutput [true|false] : create debugging files for use with RecastDemo\n");
|
||||
printf("--bigBaseUnit [true|false] : Generate tile/map using bigger basic unit.\n");
|
||||
printf("--silent : Make script friendly. No wait for user input, error, completion.\n");
|
||||
printf("--offMeshInput [file.*] : Path to file containing off mesh connections data.\n\n");
|
||||
printf("Exemple:\nmovemapgen (generate all mmap with default arg\n"
|
||||
"movemapgen 0 (generate map 0)\n"
|
||||
"movemapgen --tile 34,46 (builds only tile 34,46 of map 0)\n\n");
|
||||
printf("Please read readme file for more information and exemples.\n");
|
||||
}
|
||||
|
||||
bool handleArgs(int argc, char** argv,
|
||||
int& mapnum,
|
||||
int& tileX,
|
||||
int& tileY,
|
||||
float& maxAngle,
|
||||
bool& skipLiquid,
|
||||
bool& skipContinents,
|
||||
bool& skipJunkMaps,
|
||||
bool& skipBattlegrounds,
|
||||
bool& debugOutput,
|
||||
bool& silent,
|
||||
bool& bigBaseUnit,
|
||||
char*& offMeshInputPath)
|
||||
{
|
||||
char* param = NULL;
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
if (strcmp(argv[i], "--maxAngle") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
float maxangle = atof(param);
|
||||
if (maxangle <= 90.f && maxangle >= 45.f)
|
||||
maxAngle = maxangle;
|
||||
else
|
||||
printf("invalid option for '--maxAngle', using default\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--tile") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
char* stileX = strtok(param, ",");
|
||||
char* stileY = strtok(NULL, ",");
|
||||
int tilex = atoi(stileX);
|
||||
int tiley = atoi(stileY);
|
||||
|
||||
if ((tilex > 0 && tilex < 64) || (tilex == 0 && strcmp(stileX, "0") == 0))
|
||||
tileX = tilex;
|
||||
if ((tiley > 0 && tiley < 64) || (tiley == 0 && strcmp(stileY, "0") == 0))
|
||||
tileY = tiley;
|
||||
|
||||
if (tileX < 0 || tileY < 0)
|
||||
{
|
||||
printf("invalid tile coords.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[i], "--skipLiquid") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
if (strcmp(param, "true") == 0)
|
||||
skipLiquid = true;
|
||||
else if (strcmp(param, "false") == 0)
|
||||
skipLiquid = false;
|
||||
else
|
||||
printf("invalid option for '--skipLiquid', using default\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--skipContinents") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
if (strcmp(param, "true") == 0)
|
||||
skipContinents = true;
|
||||
else if (strcmp(param, "false") == 0)
|
||||
skipContinents = false;
|
||||
else
|
||||
printf("invalid option for '--skipContinents', using default\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--skipJunkMaps") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
if (strcmp(param, "true") == 0)
|
||||
skipJunkMaps = true;
|
||||
else if (strcmp(param, "false") == 0)
|
||||
skipJunkMaps = false;
|
||||
else
|
||||
printf("invalid option for '--skipJunkMaps', using default\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--skipBattlegrounds") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
if (strcmp(param, "true") == 0)
|
||||
skipBattlegrounds = true;
|
||||
else if (strcmp(param, "false") == 0)
|
||||
skipBattlegrounds = false;
|
||||
else
|
||||
printf("invalid option for '--skipBattlegrounds', using default\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--debugOutput") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
if (strcmp(param, "true") == 0)
|
||||
debugOutput = true;
|
||||
else if (strcmp(param, "false") == 0)
|
||||
debugOutput = false;
|
||||
else
|
||||
printf("invalid option for '--debugOutput', using default true\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--silent") == 0)
|
||||
{
|
||||
silent = true;
|
||||
}
|
||||
else if (strcmp(argv[i], "--bigBaseUnit") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
if (strcmp(param, "true") == 0)
|
||||
bigBaseUnit = true;
|
||||
else if (strcmp(param, "false") == 0)
|
||||
bigBaseUnit = false;
|
||||
else
|
||||
printf("invalid option for '--bigBaseUnit', using default false\n");
|
||||
}
|
||||
else if (strcmp(argv[i], "--offMeshInput") == 0)
|
||||
{
|
||||
param = argv[++i];
|
||||
if (!param)
|
||||
return false;
|
||||
|
||||
offMeshInputPath = param;
|
||||
}
|
||||
else if (strcmp(argv[i], "-?") == 0)
|
||||
{
|
||||
printUsage();
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
int map = atoi(argv[i]);
|
||||
if (map > 0 || (map == 0 && (strcmp(argv[i], "0") == 0)))
|
||||
mapnum = map;
|
||||
else
|
||||
{
|
||||
printf("invalid map id\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int finish(const char* message, int returnValue)
|
||||
{
|
||||
printf("%s", message);
|
||||
getchar();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int mapnum = -1;
|
||||
float maxAngle = 60.0f;
|
||||
int tileX = -1, tileY = -1;
|
||||
bool skipLiquid = false,
|
||||
skipContinents = false,
|
||||
skipJunkMaps = true,
|
||||
skipBattlegrounds = false,
|
||||
debugOutput = false,
|
||||
silent = false,
|
||||
bigBaseUnit = false;
|
||||
char* offMeshInputPath = NULL;
|
||||
|
||||
bool validParam = handleArgs(argc, argv, mapnum,
|
||||
tileX, tileY, maxAngle,
|
||||
skipLiquid, skipContinents, skipJunkMaps, skipBattlegrounds,
|
||||
debugOutput, silent, bigBaseUnit, offMeshInputPath);
|
||||
|
||||
if (!validParam)
|
||||
return silent ? -1 : finish("You have specified invalid parameters (use -? for more help)", -1);
|
||||
|
||||
if (mapnum == -1 && debugOutput)
|
||||
{
|
||||
if (silent)
|
||||
return -2;
|
||||
|
||||
printf("You have specifed debug output, but didn't specify a map to generate.\n");
|
||||
printf("This will generate debug output for ALL maps.\n");
|
||||
printf("Are you sure you want to continue? (y/n) ");
|
||||
if (getchar() != 'y')
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!checkDirectories(debugOutput))
|
||||
return silent ? -3 : finish("Press any key to close...", -3);
|
||||
|
||||
MapBuilder builder(maxAngle, skipLiquid, skipContinents, skipJunkMaps,
|
||||
skipBattlegrounds, debugOutput, bigBaseUnit, offMeshInputPath);
|
||||
|
||||
if (tileX > -1 && tileY > -1 && mapnum >= 0)
|
||||
builder.buildSingleTile(mapnum, tileX, tileY);
|
||||
else if (mapnum >= 0)
|
||||
builder.buildMap(uint32(mapnum));
|
||||
else
|
||||
builder.buildAllMaps();
|
||||
|
||||
return silent ? 1 : finish("Movemap build is complete!", 1);
|
||||
}
|
||||
87
src/tools/Movemap-Generator/win/MoveMapGen_VC100.sln
Normal file
87
src/tools/Movemap-Generator/win/MoveMapGen_VC100.sln
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoveMapGen", "VC100\MoveMapGen_VC100.vcxproj", "{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64} = {00B9DC66-96A6-465D-A6C1-5DFF94E48A64}
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\..\win\VC100\g3dlite.vcxproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\win\VC100\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Recast", "..\..\..\dep\recastnavigation\Recast\win\VC100\Recast.vcxproj", "{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detour", "..\..\..\dep\recastnavigation\Detour\win\VC100\Detour.vcxproj", "{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_NoPCH|Win32 = Debug_NoPCH|Win32
|
||||
Debug_NoPCH|x64 = Debug_NoPCH|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|Win32.Build.0 = Release|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|Win32.Build.0 = Release|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|x64.ActiveCfg = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|Win32.Build.0 = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
86
src/tools/Movemap-Generator/win/MoveMapGen_VC110.sln
Normal file
86
src/tools/Movemap-Generator/win/MoveMapGen_VC110.sln
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoveMapGen", "VC110\MoveMapGen_VC110.vcxproj", "{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64} = {00B9DC66-96A6-465D-A6C1-5DFF94E48A64}
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\..\win\VC110\g3dlite.vcxproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\win\VC110\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Recast", "..\..\..\dep\recastnavigation\Recast\win\VC110\Recast.vcxproj", "{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detour", "..\..\..\dep\recastnavigation\Detour\win\VC110\Detour.vcxproj", "{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_NoPCH|Win32 = Debug_NoPCH|Win32
|
||||
Debug_NoPCH|x64 = Debug_NoPCH|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|Win32.Build.0 = Release|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|Win32.Build.0 = Release|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|x64.ActiveCfg = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|Win32.Build.0 = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
86
src/tools/Movemap-Generator/win/MoveMapGen_VC120.sln
Normal file
86
src/tools/Movemap-Generator/win/MoveMapGen_VC120.sln
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoveMapGen", "VC120\MoveMapGen_VC120.vcxproj", "{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64} = {00B9DC66-96A6-465D-A6C1-5DFF94E48A64}
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\..\win\VC120\g3dlite.vcxproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\win\VC120\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Recast", "..\..\..\dep\recastnavigation\Recast\win\VC120\Recast.vcxproj", "{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detour", "..\..\..\dep\recastnavigation\Detour\win\VC120\Detour.vcxproj", "{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_NoPCH|Win32 = Debug_NoPCH|Win32
|
||||
Debug_NoPCH|x64 = Debug_NoPCH|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|Win32.Build.0 = Release|Win32
|
||||
{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|Win32.Build.0 = Release|Win32
|
||||
{00B9DC66-96A6-465D-A6C1-5DFF94E48A64}.Release|x64.ActiveCfg = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug_NoPCH|x64.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|Win32.Build.0 = Release|Win32
|
||||
{72BDF975-4D4A-42C7-B2C4-F9ED90A2ABB6}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
6
src/tools/Movemap-Generator/win/VC100/.gitignore
vendored
Normal file
6
src/tools/Movemap-Generator/win/VC100/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
*Win32_Debug
|
||||
*Win32_Release
|
||||
*x64_Debug
|
||||
*x64_Release
|
||||
*.user
|
||||
155
src/tools/Movemap-Generator/win/VC100/MoveMapGen_VC100.vcxproj
Normal file
155
src/tools/Movemap-Generator/win/VC100/MoveMapGen_VC100.vcxproj
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
<?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>{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}</ProjectGuid>
|
||||
<RootNamespace>MoveMapGen_VC100</RootNamespace>
|
||||
<ProjectName>MoveMapGen</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>.\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>.\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\;..\..\..\..\dep\recastnavigation\Detour\Include\;..\..\..\..\dep\recastnavigation\Recast\Include\;..\..\..\..\src\game\vmap;..\..\..\..\dep\include\g3dlite;..\..\..\..\src\framework\;..\..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;MMAP_GENERATOR;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>msvcrtd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\src\;..\..\..\..\dep\recastnavigation\Detour\Include\;..\..\..\..\dep\recastnavigation\Recast\Include\;..\..\..\..\src\game\vmap;..\..\..\..\dep\include\g3dlite;..\..\..\..\src\framework\;..\..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;MMAP_GENERATOR;_CRT_SECURE_NO_WARNINGS;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>msvcrt.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ProjectReference>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\BIH.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\MapTree.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\ModelInstance.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\TileAssembler.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapFactory.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapManager2.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\WorldModel.cpp" />
|
||||
<ClCompile Include="..\..\src\generator.cpp" />
|
||||
<ClCompile Include="..\..\src\MapBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\TerrainBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\VMapExtensions.cpp" />
|
||||
<ClCompile Include="..\..\src\IntermediateValues.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\BIH.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\IVMapManager.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\MapTree.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\ModelInstance.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\TileAssembler.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapDefinitions.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapFactory.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapManager2.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapTools.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\WorldModel.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\MoveMapSharedDefines.h" />
|
||||
<ClInclude Include="..\..\src\MangosMap.h" />
|
||||
<ClInclude Include="..\..\src\MapBuilder.h" />
|
||||
<ClInclude Include="..\..\src\MMapCommon.h" />
|
||||
<ClInclude Include="..\..\src\TerrainBuilder.h" />
|
||||
<ClInclude Include="..\..\src\IntermediateValues.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\dep\recastnavigation\Detour\win\VC100\Detour.vcxproj">
|
||||
<Project>{72bdf975-4d4a-42c7-b2c4-f9ed90a2abb6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\dep\recastnavigation\Recast\win\VC100\Recast.vcxproj">
|
||||
<Project>{00b9dc66-96a6-465d-a6c1-5dff94e48a64}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\win\VC100\g3dlite.vcxproj">
|
||||
<Project>{8072769e-cf10-48bf-b9e1-12752a5dac6e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\win\VC100\zlib.vcxproj">
|
||||
<Project>{8f1dea42-6a5b-4b62-839d-c141a7bfacf2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="generator">
|
||||
<UniqueIdentifier>{dcfc8b46-b41f-4c19-9f6b-257a463f6c67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="vmap">
|
||||
<UniqueIdentifier>{8c2c5f18-4147-4fdb-bd45-aa9664476e6c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\generator.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\VMapExtensions.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\MapBuilder.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\BIH.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\MapTree.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\ModelInstance.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\TileAssembler.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapFactory.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapManager2.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\WorldModel.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\TerrainBuilder.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\IntermediateValues.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\MMapCommon.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\IntermediateValues.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\MangosMap.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\MapBuilder.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\MoveMapSharedDefines.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\BIH.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\IVMapManager.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\MapTree.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\ModelInstance.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\TileAssembler.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapDefinitions.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapFactory.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapManager2.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapTools.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\WorldModel.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\TerrainBuilder.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
src/tools/Movemap-Generator/win/VC110/.gitignore
vendored
Normal file
6
src/tools/Movemap-Generator/win/VC110/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
*Win32_Debug
|
||||
*Win32_Release
|
||||
*x64_Debug
|
||||
*x64_Release
|
||||
*.user
|
||||
157
src/tools/Movemap-Generator/win/VC110/MoveMapGen_VC110.vcxproj
Normal file
157
src/tools/Movemap-Generator/win/VC110/MoveMapGen_VC110.vcxproj
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.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>{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}</ProjectGuid>
|
||||
<RootNamespace>MoveMapGen_VC110</RootNamespace>
|
||||
<ProjectName>MoveMapGen</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>.\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>.\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\;..\..\..\..\dep\recastnavigation\Detour\Include\;..\..\..\..\dep\recastnavigation\Recast\Include\;..\..\..\..\src\game\vmap;..\..\..\..\dep\include\g3dlite;..\..\..\..\src\framework\;..\..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;MMAP_GENERATOR;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>msvcrtd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\src\;..\..\..\..\dep\recastnavigation\Detour\Include\;..\..\..\..\dep\recastnavigation\Recast\Include\;..\..\..\..\src\game\vmap;..\..\..\..\dep\include\g3dlite;..\..\..\..\src\framework\;..\..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;MMAP_GENERATOR;_CRT_SECURE_NO_WARNINGS;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>msvcrt.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ProjectReference>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\BIH.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\MapTree.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\ModelInstance.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\TileAssembler.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapFactory.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapManager2.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\WorldModel.cpp" />
|
||||
<ClCompile Include="..\..\src\generator.cpp" />
|
||||
<ClCompile Include="..\..\src\MapBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\TerrainBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\VMapExtensions.cpp" />
|
||||
<ClCompile Include="..\..\src\IntermediateValues.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\BIH.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\IVMapManager.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\MapTree.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\ModelInstance.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\TileAssembler.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapDefinitions.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapFactory.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapManager2.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapTools.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\WorldModel.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\MoveMapSharedDefines.h" />
|
||||
<ClInclude Include="..\..\src\MangosMap.h" />
|
||||
<ClInclude Include="..\..\src\MapBuilder.h" />
|
||||
<ClInclude Include="..\..\src\MMapCommon.h" />
|
||||
<ClInclude Include="..\..\src\TerrainBuilder.h" />
|
||||
<ClInclude Include="..\..\src\IntermediateValues.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\dep\recastnavigation\Detour\win\VC110\Detour.vcxproj">
|
||||
<Project>{72bdf975-4d4a-42c7-b2c4-f9ed90a2abb6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\dep\recastnavigation\Recast\win\VC110\Recast.vcxproj">
|
||||
<Project>{00b9dc66-96a6-465d-a6c1-5dff94e48a64}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\win\VC110\g3dlite.vcxproj">
|
||||
<Project>{8072769e-cf10-48bf-b9e1-12752a5dac6e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\win\VC110\zlib.vcxproj">
|
||||
<Project>{8f1dea42-6a5b-4b62-839d-c141a7bfacf2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="generator">
|
||||
<UniqueIdentifier>{dcfc8b46-b41f-4c19-9f6b-257a463f6c67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="vmap">
|
||||
<UniqueIdentifier>{8c2c5f18-4147-4fdb-bd45-aa9664476e6c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\generator.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\VMapExtensions.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\MapBuilder.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\BIH.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\MapTree.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\ModelInstance.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\TileAssembler.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapFactory.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapManager2.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\WorldModel.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\TerrainBuilder.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\IntermediateValues.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\MMapCommon.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\IntermediateValues.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\MangosMap.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\MapBuilder.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\MoveMapSharedDefines.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\BIH.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\IVMapManager.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\MapTree.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\ModelInstance.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\TileAssembler.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapDefinitions.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapFactory.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapManager2.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapTools.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\WorldModel.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\TerrainBuilder.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
src/tools/Movemap-Generator/win/VC120/.gitignore
vendored
Normal file
6
src/tools/Movemap-Generator/win/VC120/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
*Win32_Debug
|
||||
*Win32_Release
|
||||
*x64_Debug
|
||||
*x64_Release
|
||||
*.user
|
||||
157
src/tools/Movemap-Generator/win/VC120/MoveMapGen_VC120.vcxproj
Normal file
157
src/tools/Movemap-Generator/win/VC120/MoveMapGen_VC120.vcxproj
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.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>{8028C1F8-4C3E-44D4-96D7-1D6F51B7AB47}</ProjectGuid>
|
||||
<RootNamespace>MoveMapGen_VC120</RootNamespace>
|
||||
<ProjectName>MoveMapGen</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>.\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>.\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\;..\..\..\..\dep\recastnavigation\Detour\Include\;..\..\..\..\dep\recastnavigation\Recast\Include\;..\..\..\..\src\game\vmap;..\..\..\..\dep\include\g3dlite;..\..\..\..\src\framework\;..\..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;MMAP_GENERATOR;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>msvcrtd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\src\;..\..\..\..\dep\recastnavigation\Detour\Include\;..\..\..\..\dep\recastnavigation\Recast\Include\;..\..\..\..\src\game\vmap;..\..\..\..\dep\include\g3dlite;..\..\..\..\src\framework\;..\..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;MMAP_GENERATOR;_CRT_SECURE_NO_WARNINGS;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies>msvcrt.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ProjectReference>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\BIH.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\MapTree.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\ModelInstance.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\TileAssembler.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapFactory.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapManager2.cpp" />
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\WorldModel.cpp" />
|
||||
<ClCompile Include="..\..\src\generator.cpp" />
|
||||
<ClCompile Include="..\..\src\MapBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\TerrainBuilder.cpp" />
|
||||
<ClCompile Include="..\..\src\VMapExtensions.cpp" />
|
||||
<ClCompile Include="..\..\src\IntermediateValues.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\BIH.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\IVMapManager.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\MapTree.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\ModelInstance.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\TileAssembler.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapDefinitions.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapFactory.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapManager2.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapTools.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\WorldModel.h" />
|
||||
<ClInclude Include="..\..\..\..\src\game\MoveMapSharedDefines.h" />
|
||||
<ClInclude Include="..\..\src\MangosMap.h" />
|
||||
<ClInclude Include="..\..\src\MapBuilder.h" />
|
||||
<ClInclude Include="..\..\src\MMapCommon.h" />
|
||||
<ClInclude Include="..\..\src\TerrainBuilder.h" />
|
||||
<ClInclude Include="..\..\src\IntermediateValues.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\dep\recastnavigation\Detour\win\VC120\Detour.vcxproj">
|
||||
<Project>{72bdf975-4d4a-42c7-b2c4-f9ed90a2abb6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\dep\recastnavigation\Recast\win\VC120\Recast.vcxproj">
|
||||
<Project>{00b9dc66-96a6-465d-a6c1-5dff94e48a64}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\win\VC120\g3dlite.vcxproj">
|
||||
<Project>{8072769e-cf10-48bf-b9e1-12752a5dac6e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\win\VC120\zlib.vcxproj">
|
||||
<Project>{8f1dea42-6a5b-4b62-839d-c141a7bfacf2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="generator">
|
||||
<UniqueIdentifier>{dcfc8b46-b41f-4c19-9f6b-257a463f6c67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="vmap">
|
||||
<UniqueIdentifier>{8c2c5f18-4147-4fdb-bd45-aa9664476e6c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\generator.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\VMapExtensions.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\MapBuilder.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\BIH.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\MapTree.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\ModelInstance.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\TileAssembler.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapFactory.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\VMapManager2.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\game\vmap\WorldModel.cpp">
|
||||
<Filter>vmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\TerrainBuilder.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\IntermediateValues.cpp">
|
||||
<Filter>generator</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\MMapCommon.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\IntermediateValues.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\MangosMap.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\MapBuilder.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\MoveMapSharedDefines.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\BIH.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\IVMapManager.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\MapTree.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\ModelInstance.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\TileAssembler.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapDefinitions.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapFactory.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapManager2.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\VMapTools.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\src\game\vmap\WorldModel.h">
|
||||
<Filter>vmap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\TerrainBuilder.h">
|
||||
<Filter>generator</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,326 +0,0 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
struct RawData
|
||||
{
|
||||
char rev_str[200];
|
||||
char date_str[200];
|
||||
char time_str[200];
|
||||
};
|
||||
|
||||
void extractDataFromSvn(FILE* EntriesFile, bool url, RawData& data)
|
||||
{
|
||||
char buf[200];
|
||||
|
||||
char repo_str[200];
|
||||
char num_str[200];
|
||||
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile); sscanf(buf, "%s", num_str);
|
||||
fgets(buf, 200, EntriesFile); sscanf(buf, "%s", repo_str);
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile);
|
||||
fgets(buf, 200, EntriesFile); sscanf(buf, "%10sT%8s", data.date_str, data.time_str);
|
||||
|
||||
if (url)
|
||||
sprintf(data.rev_str, "%s at %s", num_str, repo_str);
|
||||
else
|
||||
strcpy(data.rev_str, num_str);
|
||||
}
|
||||
|
||||
void extractDataFromGit(FILE* EntriesFile, std::string path, bool url, RawData& data)
|
||||
{
|
||||
char buf[200];
|
||||
|
||||
char hash_str[200];
|
||||
char branch_str[200];
|
||||
char url_str[200];
|
||||
|
||||
bool found = false;
|
||||
while (fgets(buf, 200, EntriesFile))
|
||||
{
|
||||
if (sscanf(buf, "%s\t\tbranch %s of %s", hash_str, branch_str, url_str) == 3)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
strcpy(data.rev_str, "*");
|
||||
strcpy(data.date_str, "*");
|
||||
strcpy(data.time_str, "*");
|
||||
return;
|
||||
}
|
||||
|
||||
if (url)
|
||||
{
|
||||
char* host_str = NULL;
|
||||
char* acc_str = NULL;
|
||||
char* repo_str = NULL;
|
||||
|
||||
// parse URL like git@github.com:mangos/mangos
|
||||
char url_buf[200];
|
||||
int res = sscanf(url_str, "git@%s", url_buf);
|
||||
if (res)
|
||||
{
|
||||
host_str = strtok(url_buf, ":");
|
||||
acc_str = strtok(NULL, "/");
|
||||
repo_str = strtok(NULL, " ");
|
||||
}
|
||||
else
|
||||
{
|
||||
res = sscanf(url_str, "git://%s", url_buf);
|
||||
if (res)
|
||||
{
|
||||
host_str = strtok(url_buf, "/");
|
||||
acc_str = strtok(NULL, "/");
|
||||
repo_str = strtok(NULL, ".");
|
||||
}
|
||||
}
|
||||
|
||||
// can generate nice link
|
||||
if (res)
|
||||
sprintf(data.rev_str, "http://%s/%s/%s/commit/%s", host_str, acc_str, repo_str, hash_str);
|
||||
// unknonw URL format, use as-is
|
||||
else
|
||||
sprintf(data.rev_str, "%s at %s", hash_str, url_str);
|
||||
}
|
||||
else
|
||||
strcpy(data.rev_str, hash_str);
|
||||
|
||||
time_t rev_time = 0;
|
||||
// extracting date/time
|
||||
FILE* LogFile = fopen((path + ".git/logs/HEAD").c_str(), "r");
|
||||
if (LogFile)
|
||||
{
|
||||
while (fgets(buf, 200, LogFile))
|
||||
{
|
||||
char buf2[200];
|
||||
char new_hash[200];
|
||||
int unix_time = 0;
|
||||
int res2 = sscanf(buf, "%s %s %s %s %i", buf2, new_hash, buf2, buf2, &unix_time);
|
||||
if (res2 != 5)
|
||||
continue;
|
||||
|
||||
if (strcmp(hash_str, new_hash))
|
||||
continue;
|
||||
|
||||
rev_time = unix_time;
|
||||
break;
|
||||
}
|
||||
|
||||
fclose(LogFile);
|
||||
|
||||
if (rev_time)
|
||||
{
|
||||
tm* aTm = localtime(&rev_time);
|
||||
// YYYY year
|
||||
// MM month (2 digits 01-12)
|
||||
// DD day (2 digits 01-31)
|
||||
// HH hour (2 digits 00-23)
|
||||
// MM minutes (2 digits 00-59)
|
||||
// SS seconds (2 digits 00-59)
|
||||
sprintf(data.date_str, "%04d-%02d-%02d", aTm->tm_year + 1900, aTm->tm_mon + 1, aTm->tm_mday);
|
||||
sprintf(data.time_str, "%02d:%02d:%02d", aTm->tm_hour, aTm->tm_min, aTm->tm_sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(data.date_str, "*");
|
||||
strcpy(data.time_str, "*");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(data.date_str, "*");
|
||||
strcpy(data.time_str, "*");
|
||||
}
|
||||
}
|
||||
|
||||
bool extractDataFromSvn(std::string filename, bool url, RawData& data)
|
||||
{
|
||||
FILE* EntriesFile = fopen(filename.c_str(), "r");
|
||||
if (!EntriesFile)
|
||||
return false;
|
||||
|
||||
extractDataFromSvn(EntriesFile, url, data);
|
||||
fclose(EntriesFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool extractDataFromGit(std::string filename, std::string path, bool url, RawData& data)
|
||||
{
|
||||
FILE* EntriesFile = fopen(filename.c_str(), "r");
|
||||
if (!EntriesFile)
|
||||
return false;
|
||||
|
||||
extractDataFromGit(EntriesFile, path, url, data);
|
||||
fclose(EntriesFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string generateHeader(char const* rev_str, char const* date_str, char const* time_str)
|
||||
{
|
||||
std::ostringstream newData;
|
||||
newData << "#ifndef __REVISION_H__" << std::endl;
|
||||
newData << "#define __REVISION_H__" << std::endl;
|
||||
newData << " #define REVISION_ID \"" << rev_str << "\"" << std::endl;
|
||||
newData << " #define REVISION_DATE \"" << date_str << "\"" << std::endl;
|
||||
newData << " #define REVISION_TIME \"" << time_str << "\"" << std::endl;
|
||||
newData << "#endif // __REVISION_H__" << std::endl;
|
||||
return newData.str();
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
bool use_url = false;
|
||||
bool svn_prefered = false;
|
||||
std::string path;
|
||||
std::string outfile = "revision.h";
|
||||
|
||||
// Call: tool {options} [path]
|
||||
// -g use git prefered (default)
|
||||
// -s use svn prefered
|
||||
// -r use only revision (without repo URL) (default)
|
||||
// -u include repositire URL as commit URL or "rev at URL"
|
||||
// -o <file> write header to specified target file
|
||||
for (int k = 1; k <= argc; ++k)
|
||||
{
|
||||
if (!argv[k] || !*argv[k])
|
||||
break;
|
||||
|
||||
if (argv[k][0] != '-')
|
||||
{
|
||||
path = argv[k];
|
||||
if (path.size() > 0 && (path[path.size() - 1] != '/' || path[path.size() - 1] != '\\'))
|
||||
path += '/';
|
||||
break;
|
||||
}
|
||||
|
||||
switch (argv[k][1])
|
||||
{
|
||||
case 'g':
|
||||
svn_prefered = false;
|
||||
continue;
|
||||
case 'r':
|
||||
use_url = false;
|
||||
continue;
|
||||
case 's':
|
||||
svn_prefered = true;
|
||||
continue;
|
||||
case 'u':
|
||||
use_url = true;
|
||||
continue;
|
||||
case 'o':
|
||||
// read next argument as target file, if not available return error
|
||||
if (++k == argc)
|
||||
return 1;
|
||||
outfile = argv[k];
|
||||
continue;
|
||||
default:
|
||||
printf("Unknown option %s", argv[k]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// new data extraction
|
||||
std::string newData;
|
||||
|
||||
{
|
||||
RawData data;
|
||||
|
||||
bool res = false;
|
||||
|
||||
if (svn_prefered)
|
||||
{
|
||||
/// SVN data
|
||||
res = extractDataFromSvn(path + ".svn/entries", use_url, data);
|
||||
if (!res)
|
||||
res = extractDataFromSvn(path + "_svn/entries", use_url, data);
|
||||
// GIT data
|
||||
if (!res)
|
||||
res = extractDataFromGit(path + ".git/FETCH_HEAD", path, use_url, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
// GIT data
|
||||
res = extractDataFromGit(path + ".git/FETCH_HEAD", path, use_url, data);
|
||||
/// SVN data
|
||||
if (!res)
|
||||
res = extractDataFromSvn(path + ".svn/entries", use_url, data);
|
||||
if (!res)
|
||||
res = extractDataFromSvn(path + "_svn/entries", use_url, data);
|
||||
}
|
||||
|
||||
if (res)
|
||||
newData = generateHeader(data.rev_str, data.date_str, data.time_str);
|
||||
else
|
||||
newData = generateHeader("*", "*", "*");
|
||||
}
|
||||
|
||||
/// get existed header data for compare
|
||||
std::string oldData;
|
||||
|
||||
if (FILE* HeaderFile = fopen(outfile.c_str(), "rb"))
|
||||
{
|
||||
while (!feof(HeaderFile))
|
||||
{
|
||||
int c = fgetc(HeaderFile);
|
||||
if (c < 0)
|
||||
break;
|
||||
oldData += (char)c;
|
||||
}
|
||||
|
||||
fclose(HeaderFile);
|
||||
}
|
||||
|
||||
/// update header only if different data
|
||||
if (newData != oldData)
|
||||
{
|
||||
if (FILE* OutputFile = fopen(outfile.c_str(), "wb"))
|
||||
{
|
||||
fprintf(OutputFile, "%s", newData.c_str());
|
||||
fclose(OutputFile);
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
19
src/tools/map-extractor/.gitignore
vendored
Normal file
19
src/tools/map-extractor/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
*.bsc
|
||||
*.pdb
|
||||
debug
|
||||
release
|
||||
*.ilk
|
||||
ad_debug.exe
|
||||
ad.exe
|
||||
311
src/tools/map-extractor/CMakeLists.txt
Normal file
311
src/tools/map-extractor/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
#
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
project(MANGOS_MAP_EXTRACTOR)
|
||||
|
||||
|
||||
set(SRC_FILES
|
||||
../../dep/StormLib/src/adpcm/adpcm.cpp
|
||||
../../dep/StormLib/src/huffman/huff.cpp
|
||||
../../dep/StormLib/src/jenkins/lookup3.c
|
||||
../../dep/StormLib/src/lzma/C/LzFind.c
|
||||
../../dep/StormLib/src/lzma/C/LzmaDec.c
|
||||
../../dep/StormLib/src/lzma/C/LzmaEnc.c
|
||||
../../dep/StormLib/src/pklib/explode.c
|
||||
../../dep/StormLib/src/pklib/implode.c
|
||||
../../dep/StormLib/src/sparse/sparse.cpp
|
||||
../../dep/StormLib/src/FileStream.cpp
|
||||
../../dep/StormLib/src/SBaseCommon.cpp
|
||||
../../dep/StormLib/src/SBaseDumpData.cpp
|
||||
../../dep/StormLib/src/SBaseFileTable.cpp
|
||||
../../dep/StormLib/src/SCompression.cpp
|
||||
../../dep/StormLib/src/SFileAddFile.cpp
|
||||
../../dep/StormLib/src/SFileAttributes.cpp
|
||||
../../dep/StormLib/src/SFileCompactArchive.cpp
|
||||
../../dep/StormLib/src/SFileCreateArchive.cpp
|
||||
../../dep/StormLib/src/SFileExtractFile.cpp
|
||||
../../dep/StormLib/src/SFileFindFile.cpp
|
||||
../../dep/StormLib/src/SFileListFile.cpp
|
||||
../../dep/StormLib/src/SFileOpenArchive.cpp
|
||||
../../dep/StormLib/src/SFileOpenFileEx.cpp
|
||||
../../dep/StormLib/src/SFilePatchArchives.cpp
|
||||
../../dep/StormLib/src/SFileReadFile.cpp
|
||||
../../dep/StormLib/src/SFileVerify.cpp
|
||||
)
|
||||
|
||||
set(TOMCRYPT_FILES
|
||||
../../dep/StormLib/src/libtomcrypt/src/hashes/hash_memory.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/hashes/md5.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/hashes/sha1.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/math/ltm_desc.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/math/multi.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/math/rand_prime.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/base64_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_argchk.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_find_hash.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_find_prng.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_hash_descriptor.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_hash_is_valid.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_libc.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_prng_descriptor.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_prng_is_valid.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_register_hash.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_register_prng.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/zeromem.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_boolean.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_choice.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utctime.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_bit_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_boolean.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_octet_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_printable_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_sequence.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utctime.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_sequence_free.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_short_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_exptmod.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_free.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_import.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_make_key.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c
|
||||
)
|
||||
|
||||
set(TOMMATH_FILES
|
||||
../../dep/StormLib/src/libtommath/bncore.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_mp_invmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_mp_montgomery_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_s_mp_mul_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_s_mp_mul_high_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_s_mp_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_2expt.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_abs.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_add.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_addmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_add_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_and.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_clamp.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_clear.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_clear_multi.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cmp.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cmp_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cmp_mag.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cnt_lsb.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_copy.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_count_bits.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_2.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_2d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_3.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_dr_is_modulus.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_dr_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_dr_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exch.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exptmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exptmod_fast.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_expt_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exteuclid.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_fread.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_fwrite.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_gcd.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_get_int.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_grow.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_copy.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_multi.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_set.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_set_int.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_invmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_invmod_slow.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_is_square.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_jacobi.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_karatsuba_mul.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_karatsuba_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_lcm.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_lshd.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mod_2d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mod_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_montgomery_calc_normalization.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_montgomery_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_montgomery_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mulmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul_2.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul_2d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_neg.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_n_root.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_or.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_fermat.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_is_divisible.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_is_prime.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_miller_rabin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_next_prime.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_rabin_miller_trials.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_random_ex.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_radix_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_radix_smap.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_rand.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_read_radix.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_read_signed_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_read_unsigned_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k_l.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k_setup_l.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_is_2k.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_is_2k_l.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_rshd.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_set.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_set_int.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_shrink.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_signed_bin_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sqrmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sqrt.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sub.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_submod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sub_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toom_mul.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toom_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toradix.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toradix_n.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_signed_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_signed_bin_n.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_unsigned_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_unsigned_bin_n.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_unsigned_bin_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_xor.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_zero.c
|
||||
../../dep/StormLib/src/libtommath/bn_prime_tab.c
|
||||
../../dep/StormLib/src/libtommath/bn_reverse.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_add.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_exptmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_mul_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_mul_high_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_sub.c
|
||||
)
|
||||
|
||||
set(ZLIB_BZIP2_FILES
|
||||
../../dep/StormLib/src/bzip2/blocksort.c
|
||||
../../dep/StormLib/src/bzip2/bzlib.c
|
||||
../../dep/StormLib/src/bzip2/compress.c
|
||||
../../dep/StormLib/src/bzip2/crctable.c
|
||||
../../dep/StormLib/src/bzip2/decompress.c
|
||||
../../dep/StormLib/src/bzip2/huffman.c
|
||||
../../dep/StormLib/src/bzip2/randtable.c
|
||||
../../dep/StormLib/src/zlib/adler32.c
|
||||
../../dep/StormLib/src/zlib/compress2.c
|
||||
../../dep/StormLib/src/zlib/crc32.c
|
||||
../../dep/StormLib/src/zlib/deflate.c
|
||||
../../dep/StormLib/src/zlib/inffast.c
|
||||
../../dep/StormLib/src/zlib/inflate.c
|
||||
../../dep/StormLib/src/zlib/inftrees.c
|
||||
../../dep/StormLib/src/zlib/trees.c
|
||||
../../dep/StormLib/src/zlib/zutil.c
|
||||
)
|
||||
|
||||
|
||||
|
||||
# set(TEST_SRC_FILES
|
||||
# test/Test.cpp
|
||||
# )
|
||||
|
||||
add_definitions(-D_7ZIP_ST -DBZ_STRICT_ANSI)
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
message(STATUS "Using MSVC")
|
||||
add_definitions(-D_7ZIP_ST -DWIN32)
|
||||
else()
|
||||
message(STATUS "Using mingw")
|
||||
endif()
|
||||
set(SRC_ADDITIONAL_FILES ${ZLIB_BZIP2_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES})
|
||||
set(LINK_LIBS wininet)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
message(STATUS "Using Mac OS X port")
|
||||
set(LINK_LIBS z bz2)
|
||||
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL Linux)
|
||||
message(STATUS "Using Linux port")
|
||||
option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF)
|
||||
if(WITH_LIBTOMCRYPT)
|
||||
set(LINK_LIBS z bz2 tomcrypt)
|
||||
else()
|
||||
set(LINK_LIBS z bz2)
|
||||
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(storm SHARED ${SRC_FILES} ${SRC_ADDITIONAL_FILES})
|
||||
target_link_libraries(storm ${LINK_LIBS})
|
||||
|
||||
include_directories(
|
||||
"${CMAKE_SOURCE_DIR}/dep/StormLib/src"
|
||||
"${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/loadlib"
|
||||
)
|
||||
|
||||
link_directories(
|
||||
"${CMAKE_SOURCE_DIR}/dep/StormLib/src"
|
||||
"${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/loadlib"
|
||||
)
|
||||
|
||||
add_subdirectory (loadlib)
|
||||
|
||||
add_executable (ad dbcfile.cpp System.cpp)
|
||||
target_link_libraries (ad storm loadlib)
|
||||
|
||||
|
||||
45
src/tools/map-extractor/README.md
Normal file
45
src/tools/map-extractor/README.md
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
map extractor
|
||||
--------------
|
||||
The *map extractor* will extract map information from the game client.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
You will need a working installation of the [World of Warcraft][1] client patched
|
||||
to version 1.12.x.
|
||||
|
||||
Instructions - Linux
|
||||
--------------------
|
||||
Use the created executable to extract model information. Change the data path if
|
||||
needed.
|
||||
|
||||
$ map-extractor -i /mnt/windows/games/world of warcraft/
|
||||
|
||||
Resulting files will be in `./dbc` and `./maps`
|
||||
|
||||
Instructions - Windows
|
||||
----------------------
|
||||
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 `.\dbc` and `.\maps`
|
||||
|
||||
Parameters
|
||||
----------
|
||||
The *map extractor* can be used with a few parameters to customize input, output
|
||||
and generated output.
|
||||
|
||||
* `-i PATH`, `--input PATH`: set the path for reading the client's MPQ archives to the given
|
||||
path.
|
||||
* `-o PATH`, `--output PATH`: set the path for writing the extracted client database files and
|
||||
the generated maps to the given path
|
||||
* `-e FLAG`, `--extract FLAG`: extract/generate a specific set of data. To only extract and
|
||||
generate map files, set to `1`. To extract client database files only,
|
||||
set to `2`. By default it is set to `3` to extract both client database
|
||||
files and generate maps.
|
||||
* `-f NUMBER`, `--flat NUMBER`: set to different values to decrease/increase the map size,
|
||||
and thus decrease/increase map accuracy.
|
||||
* `-h`, `--help`: display the usage message, and an example call.
|
||||
|
||||
|
||||
[1]: http://blizzard.com/games/wow/ "World of Warcraft"
|
||||
1334
src/tools/map-extractor/System.cpp
Normal file
1334
src/tools/map-extractor/System.cpp
Normal file
File diff suppressed because it is too large
Load diff
28
src/tools/map-extractor/VC100_AD.sln
Normal file
28
src/tools/map-extractor/VC100_AD.sln
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ad", "VC100_ad.vcxproj", "{D7552D4F-408F-4F8E-859B-366659150CF4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055} = {78424708-1F6E-4D4B-920C-FB6D26847055}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StormLib", "..\..\dep\StormLib\StormLib.vcxproj", "{78424708-1F6E-4D4B-920C-FB6D26847055}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.Build.0 = Release|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|Win32.ActiveCfg = DebugAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|Win32.Build.0 = DebugAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Release|Win32.ActiveCfg = ReleaseAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Release|Win32.Build.0 = ReleaseAS|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
163
src/tools/map-extractor/VC100_ad.vcxproj
Normal file
163
src/tools/map-extractor/VC100_ad.vcxproj
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
<?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">
|
||||
<ProjectName>ad</ProjectName>
|
||||
<ProjectGuid>{D7552D4F-408F-4F8E-859B-366659150CF4}</ProjectGuid>
|
||||
<RootNamespace>ad</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ad_debug</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>./ad.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)ad.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0419</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibDAS.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>ad_debug.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>./ad_debug.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>./ad.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)ad.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0419</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibRAS.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>./ad.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>./ad.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="loadlib\adt.cpp" />
|
||||
<ClCompile Include="dbcfile.cpp" />
|
||||
<ClCompile Include="loadlib\loadlib.cpp" />
|
||||
<ClCompile Include="system.cpp" />
|
||||
<ClCompile Include="loadlib\wdt.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="loadlib\adt.h" />
|
||||
<ClInclude Include="dbcfile.h" />
|
||||
<ClInclude Include="loadlib\loadlib.h" />
|
||||
<ClInclude Include="loadlib\wdt.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
44
src/tools/map-extractor/VC100_ad.vcxproj.filters
Normal file
44
src/tools/map-extractor/VC100_ad.vcxproj.filters
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{7748a821-40c1-4432-a07e-ff4da1273091}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{bd48cc48-7a79-4088-9e3f-8bf123692891}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="loadlib\adt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dbcfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="loadlib\loadlib.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="system.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="loadlib\wdt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="loadlib\adt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dbcfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadlib\loadlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadlib\wdt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
28
src/tools/map-extractor/VC110_AD.sln
Normal file
28
src/tools/map-extractor/VC110_AD.sln
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ad", "VC110_ad.vcxproj", "{D7552D4F-408F-4F8E-859B-366659150CF4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055} = {78424708-1F6E-4D4B-920C-FB6D26847055}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StormLib", "..\..\dep\StormLib\StormLib_vc110.vcxproj", "{78424708-1F6E-4D4B-920C-FB6D26847055}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.Build.0 = Release|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|Win32.ActiveCfg = DebugAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|Win32.Build.0 = DebugAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Release|Win32.ActiveCfg = ReleaseAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Release|Win32.Build.0 = ReleaseAS|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
165
src/tools/map-extractor/VC110_ad.vcxproj
Normal file
165
src/tools/map-extractor/VC110_ad.vcxproj
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
<?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">
|
||||
<ProjectName>ad</ProjectName>
|
||||
<ProjectGuid>{D7552D4F-408F-4F8E-859B-366659150CF4}</ProjectGuid>
|
||||
<RootNamespace>ad</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ad_debug</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>./ad.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)ad.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0419</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibDAS.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>ad_debug.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>./ad_debug.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>./ad.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)ad.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0419</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibRAS.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>./ad.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>./ad.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="loadlib\adt.cpp" />
|
||||
<ClCompile Include="dbcfile.cpp" />
|
||||
<ClCompile Include="loadlib\loadlib.cpp" />
|
||||
<ClCompile Include="system.cpp" />
|
||||
<ClCompile Include="loadlib\wdt.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="loadlib\adt.h" />
|
||||
<ClInclude Include="dbcfile.h" />
|
||||
<ClInclude Include="loadlib\loadlib.h" />
|
||||
<ClInclude Include="loadlib\wdt.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
44
src/tools/map-extractor/VC110_ad.vcxproj.filters
Normal file
44
src/tools/map-extractor/VC110_ad.vcxproj.filters
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{7748a821-40c1-4432-a07e-ff4da1273091}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{bd48cc48-7a79-4088-9e3f-8bf123692891}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="loadlib\adt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dbcfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="loadlib\loadlib.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="system.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="loadlib\wdt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="loadlib\adt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dbcfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadlib\loadlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadlib\wdt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
28
src/tools/map-extractor/VC120_AD.sln
Normal file
28
src/tools/map-extractor/VC120_AD.sln
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ad", "VC120_ad.vcxproj", "{D7552D4F-408F-4F8E-859B-366659150CF4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055} = {78424708-1F6E-4D4B-920C-FB6D26847055}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StormLib", "..\..\dep\StormLib\StormLib_vc120.vcxproj", "{78424708-1F6E-4D4B-920C-FB6D26847055}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.Build.0 = Release|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|Win32.ActiveCfg = DebugAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|Win32.Build.0 = DebugAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Release|Win32.ActiveCfg = ReleaseAS|Win32
|
||||
{78424708-1F6E-4D4B-920C-FB6D26847055}.Release|Win32.Build.0 = ReleaseAS|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
165
src/tools/map-extractor/VC120_ad.vcxproj
Normal file
165
src/tools/map-extractor/VC120_ad.vcxproj
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.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">
|
||||
<ProjectName>ad</ProjectName>
|
||||
<ProjectGuid>{D7552D4F-408F-4F8E-859B-366659150CF4}</ProjectGuid>
|
||||
<RootNamespace>ad</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ad_debug</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>./ad.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)ad.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0419</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibDAS.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>ad_debug.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>./ad_debug.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>./ad.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)ad.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<XMLDocumentationFileName>$(IntDir)</XMLDocumentationFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0419</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibRAS.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>./ad.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>./ad.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="loadlib\adt.cpp" />
|
||||
<ClCompile Include="dbcfile.cpp" />
|
||||
<ClCompile Include="loadlib\loadlib.cpp" />
|
||||
<ClCompile Include="system.cpp" />
|
||||
<ClCompile Include="loadlib\wdt.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="loadlib\adt.h" />
|
||||
<ClInclude Include="dbcfile.h" />
|
||||
<ClInclude Include="loadlib\loadlib.h" />
|
||||
<ClInclude Include="loadlib\wdt.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
44
src/tools/map-extractor/VC120_ad.vcxproj.filters
Normal file
44
src/tools/map-extractor/VC120_ad.vcxproj.filters
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{7748a821-40c1-4432-a07e-ff4da1273091}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{bd48cc48-7a79-4088-9e3f-8bf123692891}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="loadlib\adt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dbcfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="loadlib\loadlib.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="system.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="loadlib\wdt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="loadlib\adt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dbcfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadlib\loadlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadlib\wdt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
142
src/tools/map-extractor/dbcfile.cpp
Normal file
142
src/tools/map-extractor/dbcfile.cpp
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "dbcfile.h"
|
||||
#include "loadlib/loadlib.h"
|
||||
|
||||
DBCFile::DBCFile(const std::string& filename):
|
||||
filename(filename),
|
||||
data(0)
|
||||
{
|
||||
}
|
||||
|
||||
DBCFile::DBCFile(HANDLE file) : fileHandle(file), data(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool DBCFile::open()
|
||||
{
|
||||
//if (!OpenNewestFile(filename.c_str(), &fileHandle))
|
||||
// return false;
|
||||
|
||||
char header[4];
|
||||
unsigned int na, nb, es, ss;
|
||||
|
||||
if (!SFileReadFile(fileHandle, header, 4, NULL, NULL)) // Magic header
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (header[0] != 'W' || header[1] != 'D' || header[2] != 'B' || header[3] != 'C')
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SFileReadFile(fileHandle, &na, 4, NULL, NULL)) // Number of records
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SFileReadFile(fileHandle, &nb, 4, NULL, NULL)) // Number of fields
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SFileReadFile(fileHandle, &es, 4, NULL, NULL)) // Size of a record
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SFileReadFile(fileHandle, &ss, 4, NULL, NULL)) // String size
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
recordSize = es;
|
||||
recordCount = na;
|
||||
fieldCount = nb;
|
||||
stringSize = ss;
|
||||
if (fieldCount * 4 != recordSize)
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
data = new unsigned char[recordSize * recordCount + stringSize];
|
||||
stringTable = data + recordSize * recordCount;
|
||||
|
||||
size_t data_size = recordSize * recordCount + stringSize;
|
||||
|
||||
if (!SFileReadFile(fileHandle, data, data_size, NULL, NULL))
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
SFileCloseFile(fileHandle);
|
||||
return true;
|
||||
}
|
||||
DBCFile::~DBCFile()
|
||||
{
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
DBCFile::Record DBCFile::getRecord(size_t id)
|
||||
{
|
||||
assert(data);
|
||||
return Record(*this, data + id * recordSize);
|
||||
}
|
||||
|
||||
size_t DBCFile::getMaxId()
|
||||
{
|
||||
assert(data);
|
||||
|
||||
size_t maxId = 0;
|
||||
for (size_t i = 0; i < getRecordCount(); ++i)
|
||||
{
|
||||
if (maxId < getRecord(i).getUInt(0))
|
||||
maxId = getRecord(i).getUInt(0);
|
||||
}
|
||||
return maxId;
|
||||
}
|
||||
|
||||
DBCFile::Iterator DBCFile::begin()
|
||||
{
|
||||
assert(data);
|
||||
return Iterator(*this, data);
|
||||
}
|
||||
DBCFile::Iterator DBCFile::end()
|
||||
{
|
||||
assert(data);
|
||||
return Iterator(*this, stringTable);
|
||||
}
|
||||
152
src/tools/map-extractor/dbcfile.h
Normal file
152
src/tools/map-extractor/dbcfile.h
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef DBCFILE_H
|
||||
#define DBCFILE_H
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
#ifdef _DLL
|
||||
#undef _DLL
|
||||
#endif
|
||||
|
||||
#include "StormLib.h"
|
||||
|
||||
class DBCFile
|
||||
{
|
||||
public:
|
||||
DBCFile(const std::string& filename);
|
||||
DBCFile(HANDLE file);
|
||||
~DBCFile();
|
||||
|
||||
// Open database. It must be openened before it can be used.
|
||||
bool open();
|
||||
|
||||
// Database exceptions
|
||||
class Exception
|
||||
{
|
||||
public:
|
||||
Exception(const std::string& message): message(message)
|
||||
{ }
|
||||
virtual ~Exception()
|
||||
{ }
|
||||
const std::string& getMessage() {return message;}
|
||||
private:
|
||||
std::string message;
|
||||
};
|
||||
class NotFound: public Exception
|
||||
{
|
||||
public:
|
||||
NotFound(): Exception("Key was not found")
|
||||
{ }
|
||||
};
|
||||
// Iteration over database
|
||||
class Iterator;
|
||||
class Record
|
||||
{
|
||||
public:
|
||||
float getFloat(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<float*>(offset + field * 4);
|
||||
}
|
||||
unsigned int getUInt(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<unsigned int*>(offset + field * 4);
|
||||
}
|
||||
int getInt(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<int*>(offset + field * 4);
|
||||
}
|
||||
const char* getString(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
size_t stringOffset = getUInt(field);
|
||||
assert(stringOffset < file.stringSize);
|
||||
return reinterpret_cast<char*>(file.stringTable + stringOffset);
|
||||
}
|
||||
private:
|
||||
Record(DBCFile& file, unsigned char* offset): file(file), offset(offset) {}
|
||||
unsigned char* offset;
|
||||
DBCFile& file;
|
||||
|
||||
friend class DBCFile;
|
||||
friend class DBCFile::Iterator;
|
||||
};
|
||||
/** Iterator that iterates over records
|
||||
*/
|
||||
class Iterator
|
||||
{
|
||||
public:
|
||||
Iterator(DBCFile& file, unsigned char* offset):
|
||||
record(file, offset) {}
|
||||
/// Advance (prefix only)
|
||||
Iterator& operator++()
|
||||
{
|
||||
record.offset += record.file.recordSize;
|
||||
return *this;
|
||||
}
|
||||
/// Return address of current instance
|
||||
Record const& operator*() const { return record; }
|
||||
const Record* operator->() const
|
||||
{
|
||||
return &record;
|
||||
}
|
||||
/// Comparison
|
||||
bool operator==(const Iterator& b) const
|
||||
{
|
||||
return record.offset == b.record.offset;
|
||||
}
|
||||
bool operator!=(const Iterator& b) const
|
||||
{
|
||||
return record.offset != b.record.offset;
|
||||
}
|
||||
private:
|
||||
Record record;
|
||||
};
|
||||
|
||||
// Get record by id
|
||||
Record getRecord(size_t id);
|
||||
/// Get begin iterator over records
|
||||
Iterator begin();
|
||||
/// Get begin iterator over records
|
||||
Iterator end();
|
||||
/// Trivial
|
||||
size_t getRecordCount() const { return recordCount;}
|
||||
size_t getFieldCount() const { return fieldCount; }
|
||||
size_t getMaxId();
|
||||
private:
|
||||
std::string filename;
|
||||
HANDLE fileHandle;
|
||||
size_t recordSize;
|
||||
size_t recordCount;
|
||||
size_t fieldCount;
|
||||
size_t stringSize;
|
||||
unsigned char* data;
|
||||
unsigned char* stringTable;
|
||||
};
|
||||
|
||||
#endif
|
||||
13
src/tools/map-extractor/loadlib/CMakeLists.txt
Normal file
13
src/tools/map-extractor/loadlib/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# 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.
|
||||
|
||||
add_library (loadlib loadlib.cpp adt.cpp wdt.cpp)
|
||||
# link loadlib with zlib
|
||||
target_link_libraries (loadlib z)
|
||||
152
src/tools/map-extractor/loadlib/adt.cpp
Normal file
152
src/tools/map-extractor/loadlib/adt.cpp
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "adt.h"
|
||||
|
||||
// Helper
|
||||
int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
|
||||
int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
|
||||
|
||||
bool isHole(int holes, int i, int j)
|
||||
{
|
||||
int testi = i / 2;
|
||||
int testj = j / 4;
|
||||
if (testi > 3) testi = 3;
|
||||
if (testj > 3) testj = 3;
|
||||
return (holes & holetab_h[testi] & holetab_v[testj]) != 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Adt file loader class
|
||||
//
|
||||
ADT_file::ADT_file()
|
||||
{
|
||||
a_grid = 0;
|
||||
}
|
||||
|
||||
ADT_file::~ADT_file()
|
||||
{
|
||||
free();
|
||||
}
|
||||
|
||||
void ADT_file::free()
|
||||
{
|
||||
a_grid = 0;
|
||||
FileLoader::free();
|
||||
}
|
||||
|
||||
//
|
||||
// Adt file check function
|
||||
//
|
||||
bool ADT_file::prepareLoadedData()
|
||||
{
|
||||
// Check parent
|
||||
if (!FileLoader::prepareLoadedData())
|
||||
return false;
|
||||
|
||||
// Check and prepare MHDR
|
||||
a_grid = (adt_MHDR*)(GetData() + 8 + version->size);
|
||||
if (!a_grid->prepareLoadedData())
|
||||
return false;
|
||||
|
||||
// funny offsets calculations because there is no mapping for them and they have variable lengths
|
||||
uint8* ptr = (uint8*)a_grid + a_grid->size + 8;
|
||||
uint32 mcnk_count = 0;
|
||||
memset(cells, 0, ADT_CELLS_PER_GRID * ADT_CELLS_PER_GRID * sizeof(adt_MCNK*));
|
||||
while (ptr < GetData() + GetDataSize())
|
||||
{
|
||||
uint32 header = *(uint32*)ptr;
|
||||
uint32 size = *(uint32*)(ptr + 4);
|
||||
if (header == 'MCNK')
|
||||
{
|
||||
cells[mcnk_count / ADT_CELLS_PER_GRID][mcnk_count % ADT_CELLS_PER_GRID] = (adt_MCNK*)ptr;
|
||||
++mcnk_count;
|
||||
}
|
||||
|
||||
// move to next chunk
|
||||
ptr += size + 8;
|
||||
}
|
||||
|
||||
if (mcnk_count != ADT_CELLS_PER_GRID * ADT_CELLS_PER_GRID)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool adt_MHDR::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MHDR')
|
||||
return false;
|
||||
|
||||
if (size != sizeof(adt_MHDR) - 8)
|
||||
return false;
|
||||
|
||||
// Check and prepare MCIN
|
||||
if (offsMCIN && !getMCIN()->prepareLoadedData())
|
||||
return false;
|
||||
|
||||
// Check and prepare MH2O
|
||||
if (offsMH2O && !getMH2O()->prepareLoadedData())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool adt_MCIN::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MCIN')
|
||||
return false;
|
||||
|
||||
// Check cells data
|
||||
for (int i = 0; i < ADT_CELLS_PER_GRID; i++)
|
||||
for (int j = 0; j < ADT_CELLS_PER_GRID; j++)
|
||||
if (cells[i][j].offsMCNK && !getMCNK(i, j)->prepareLoadedData())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool adt_MH2O::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MH2O')
|
||||
return false;
|
||||
|
||||
// Check liquid data
|
||||
// for (int i=0; i<ADT_CELLS_PER_GRID;i++)
|
||||
// for (int j=0; j<ADT_CELLS_PER_GRID;j++)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool adt_MCNK::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MCNK')
|
||||
return false;
|
||||
|
||||
// Check height map
|
||||
if (offsMCVT && !getMCVT()->prepareLoadedData())
|
||||
return false;
|
||||
// Check liquid data
|
||||
if (offsMCLQ && !getMCLQ()->prepareLoadedData())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool adt_MCVT::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MCVT')
|
||||
return false;
|
||||
|
||||
if (size != sizeof(adt_MCVT) - 8)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool adt_MCLQ::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MCLQ')
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
329
src/tools/map-extractor/loadlib/adt.h
Normal file
329
src/tools/map-extractor/loadlib/adt.h
Normal file
|
|
@ -0,0 +1,329 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef ADT_H
|
||||
#define ADT_H
|
||||
|
||||
#include "loadlib.h"
|
||||
|
||||
#define TILESIZE (533.33333f)
|
||||
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
||||
#define UNITSIZE (CHUNKSIZE / 8.0f)
|
||||
|
||||
enum LiquidType
|
||||
{
|
||||
LIQUID_TYPE_WATER = 0,
|
||||
LIQUID_TYPE_OCEAN = 1,
|
||||
LIQUID_TYPE_MAGMA = 2,
|
||||
LIQUID_TYPE_SLIME = 3
|
||||
};
|
||||
|
||||
//**************************************************************************************
|
||||
// ADT file class
|
||||
//**************************************************************************************
|
||||
#define ADT_CELLS_PER_GRID 16
|
||||
#define ADT_CELL_SIZE 8
|
||||
#define ADT_GRID_SIZE (ADT_CELLS_PER_GRID*ADT_CELL_SIZE)
|
||||
|
||||
//
|
||||
// Adt file height map chunk
|
||||
//
|
||||
class ADT_file;
|
||||
class adt_MCVT
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
public:
|
||||
float height_map[(ADT_CELL_SIZE + 1) * (ADT_CELL_SIZE + 1) + ADT_CELL_SIZE* ADT_CELL_SIZE];
|
||||
|
||||
bool prepareLoadedData();
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file liquid map chunk (old)
|
||||
//
|
||||
class adt_MCLQ
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
public:
|
||||
float height1;
|
||||
float height2;
|
||||
struct liquid_data
|
||||
{
|
||||
uint32 light;
|
||||
float height;
|
||||
} liquid[ADT_CELL_SIZE + 1][ADT_CELL_SIZE + 1];
|
||||
|
||||
// 1<<0 - ochen
|
||||
// 1<<1 - lava/slime
|
||||
// 1<<2 - water
|
||||
// 1<<6 - all water
|
||||
// 1<<7 - dark water
|
||||
// == 0x0F - not show liquid
|
||||
uint8 flags[ADT_CELL_SIZE][ADT_CELL_SIZE];
|
||||
uint8 data[84];
|
||||
bool prepareLoadedData();
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file cell chunk
|
||||
//
|
||||
class adt_MCNK
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
public:
|
||||
uint32 flags;
|
||||
uint32 ix;
|
||||
uint32 iy;
|
||||
uint32 nLayers;
|
||||
uint32 nDoodadRefs;
|
||||
uint32 offsMCVT; // height map
|
||||
uint32 offsMCNR; // Normal vectors for each vertex
|
||||
uint32 offsMCLY; // Texture layer definitions
|
||||
uint32 offsMCRF; // A list of indices into the parent file's MDDF chunk
|
||||
uint32 offsMCAL; // Alpha maps for additional texture layers
|
||||
uint32 sizeMCAL;
|
||||
uint32 offsMCSH; // Shadow map for static shadows on the terrain
|
||||
uint32 sizeMCSH;
|
||||
uint32 areaid;
|
||||
uint32 nMapObjRefs;
|
||||
uint16 holes; // locations where models pierce the heightmap
|
||||
uint16 pad;
|
||||
uint16 s[2];
|
||||
uint32 data1;
|
||||
uint32 data2;
|
||||
uint32 data3;
|
||||
uint32 predTex;
|
||||
uint32 nEffectDoodad;
|
||||
uint32 offsMCSE;
|
||||
uint32 nSndEmitters;
|
||||
uint32 offsMCLQ; // Liqid level (old)
|
||||
uint32 sizeMCLQ; //
|
||||
float zpos;
|
||||
float xpos;
|
||||
float ypos;
|
||||
uint32 offsMCCV; // offsColorValues in WotLK
|
||||
uint32 props;
|
||||
uint32 effectId;
|
||||
|
||||
bool prepareLoadedData();
|
||||
adt_MCVT* getMCVT()
|
||||
{
|
||||
if (offsMCVT)
|
||||
return (adt_MCVT*)((uint8*)this + offsMCVT);
|
||||
return 0;
|
||||
}
|
||||
adt_MCLQ* getMCLQ()
|
||||
{
|
||||
if (offsMCLQ)
|
||||
return (adt_MCLQ*)((uint8*)this + offsMCLQ);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file grid chunk
|
||||
//
|
||||
class adt_MCIN
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
public:
|
||||
struct adt_CELLS
|
||||
{
|
||||
uint32 offsMCNK;
|
||||
uint32 size;
|
||||
uint32 flags;
|
||||
uint32 asyncId;
|
||||
} cells[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
|
||||
|
||||
bool prepareLoadedData();
|
||||
// offset from begin file (used this-84)
|
||||
adt_MCNK* getMCNK(int x, int y)
|
||||
{
|
||||
if (cells[x][y].offsMCNK)
|
||||
return (adt_MCNK*)((uint8*)this + cells[x][y].offsMCNK - 84);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
#define ADT_LIQUID_HEADER_FULL_LIGHT 0x01
|
||||
#define ADT_LIQUID_HEADER_NO_HIGHT 0x02
|
||||
|
||||
struct adt_liquid_header
|
||||
{
|
||||
uint16 liquidType; // Index from LiquidType.dbc
|
||||
uint16 formatFlags;
|
||||
float heightLevel1;
|
||||
float heightLevel2;
|
||||
uint8 xOffset;
|
||||
uint8 yOffset;
|
||||
uint8 width;
|
||||
uint8 height;
|
||||
uint32 offsData2a;
|
||||
uint32 offsData2b;
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file liquid data chunk (new)
|
||||
//
|
||||
class adt_MH2O
|
||||
{
|
||||
public:
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
|
||||
struct adt_LIQUID
|
||||
{
|
||||
uint32 offsData1;
|
||||
uint32 used;
|
||||
uint32 offsData2;
|
||||
} liquid[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
|
||||
|
||||
bool prepareLoadedData();
|
||||
|
||||
adt_liquid_header* getLiquidData(int x, int y)
|
||||
{
|
||||
if (liquid[x][y].used && liquid[x][y].offsData1)
|
||||
return (adt_liquid_header*)((uint8*)this + 8 + liquid[x][y].offsData1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
float* getLiquidHeightMap(adt_liquid_header* h)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
|
||||
return 0;
|
||||
if (h->offsData2b)
|
||||
return (float*)((uint8*)this + 8 + h->offsData2b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8* getLiquidLightMap(adt_liquid_header* h)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_FULL_LIGHT)
|
||||
return 0;
|
||||
if (h->offsData2b)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
|
||||
return (uint8*)((uint8*)this + 8 + h->offsData2b);
|
||||
return (uint8*)((uint8*)this + 8 + h->offsData2b + (h->width + 1) * (h->height + 1) * 4);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32* getLiquidFullLightMap(adt_liquid_header* h)
|
||||
{
|
||||
if (!(h->formatFlags & ADT_LIQUID_HEADER_FULL_LIGHT))
|
||||
return 0;
|
||||
if (h->offsData2b)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
|
||||
return (uint32*)((uint8*)this + 8 + h->offsData2b);
|
||||
return (uint32*)((uint8*)this + 8 + h->offsData2b + (h->width + 1) * (h->height + 1) * 4);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 getLiquidShowMap(adt_liquid_header* h)
|
||||
{
|
||||
if (h->offsData2a)
|
||||
return *((uint64*)((uint8*)this + 8 + h->offsData2a));
|
||||
else
|
||||
return 0xFFFFFFFFFFFFFFFFLL;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file header chunk
|
||||
//
|
||||
class adt_MHDR
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
public:
|
||||
uint32 size;
|
||||
|
||||
uint32 flags;
|
||||
uint32 offsMCIN; // MCIN
|
||||
uint32 offsTex; // MTEX
|
||||
uint32 offsModels; // MMDX
|
||||
uint32 offsModelsIds; // MMID
|
||||
uint32 offsMapObejcts; // MWMO
|
||||
uint32 offsMapObejctsIds; // MWID
|
||||
uint32 offsDoodsDef; // MDDF
|
||||
uint32 offsObjectsDef; // MODF
|
||||
uint32 offsMFBO; // MFBO
|
||||
uint32 offsMH2O; // MH2O
|
||||
uint32 data1;
|
||||
uint32 data2;
|
||||
uint32 data3;
|
||||
uint32 data4;
|
||||
uint32 data5;
|
||||
public:
|
||||
bool prepareLoadedData();
|
||||
adt_MCIN* getMCIN() { return offsMCIN ? (adt_MCIN*)((uint8*)&flags + offsMCIN) : 0; }
|
||||
adt_MH2O* getMH2O() { return offsMH2O ? (adt_MH2O*)((uint8*)&flags + offsMH2O) : 0; }
|
||||
};
|
||||
|
||||
class ADT_file : public FileLoader
|
||||
{
|
||||
public:
|
||||
bool prepareLoadedData();
|
||||
ADT_file();
|
||||
~ADT_file();
|
||||
void free();
|
||||
|
||||
adt_MHDR* a_grid;
|
||||
adt_MCNK* cells[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
|
||||
};
|
||||
|
||||
bool isHole(int holes, int i, int j);
|
||||
|
||||
#endif
|
||||
149
src/tools/map-extractor/loadlib/loadlib.cpp
Normal file
149
src/tools/map-extractor/loadlib/loadlib.cpp
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "loadlib.h"
|
||||
|
||||
// list of mpq files for lookup most recent file version
|
||||
ArchiveSet gOpenArchives;
|
||||
|
||||
ArchiveSetBounds GetArchivesBounds()
|
||||
{
|
||||
return ArchiveSetBounds(gOpenArchives.begin(), gOpenArchives.end());
|
||||
}
|
||||
|
||||
bool OpenArchive(char const* mpqFileName, HANDLE* mpqHandlePtr /*= NULL*/)
|
||||
{
|
||||
HANDLE mpqHandle;
|
||||
|
||||
if (!SFileOpenArchive(mpqFileName, 0, MPQ_OPEN_READ_ONLY, &mpqHandle))
|
||||
return false;
|
||||
|
||||
gOpenArchives.push_back(mpqHandle);
|
||||
|
||||
if (mpqHandlePtr)
|
||||
*mpqHandlePtr = mpqHandle;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenNewestFile(char const* filename, HANDLE* fileHandlerPtr)
|
||||
{
|
||||
for (ArchiveSet::const_reverse_iterator i = gOpenArchives.rbegin(); i != gOpenArchives.rend(); ++i)
|
||||
{
|
||||
// always prefer get updated file version
|
||||
if (SFileOpenFileEx(*i, filename, SFILE_OPEN_PATCHED_FILE, fileHandlerPtr))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ExtractFile(char const* mpq_name, std::string const& filename)
|
||||
{
|
||||
for (ArchiveSet::const_reverse_iterator i = gOpenArchives.rbegin(); i != gOpenArchives.rend(); ++i)
|
||||
{
|
||||
HANDLE fileHandle;
|
||||
if (!SFileOpenFileEx(*i, mpq_name, SFILE_OPEN_PATCHED_FILE, &fileHandle))
|
||||
continue;
|
||||
|
||||
if (SFileGetFileSize(fileHandle, NULL) == 0) // some files removed in next updates and its reported size 0
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return true;
|
||||
}
|
||||
|
||||
SFileCloseFile(fileHandle);
|
||||
|
||||
if (!SFileExtractFile(*i, mpq_name, filename.c_str(), SFILE_OPEN_PATCHED_FILE))
|
||||
{
|
||||
printf("Can't extract file: %s\n", mpq_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
printf("Extracting file not found: %s\n", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void CloseArchives()
|
||||
{
|
||||
for (ArchiveSet::const_iterator i = gOpenArchives.begin(); i != gOpenArchives.end(); ++i)
|
||||
SFileCloseArchive(*i);
|
||||
gOpenArchives.clear();
|
||||
}
|
||||
|
||||
FileLoader::FileLoader()
|
||||
{
|
||||
data = 0;
|
||||
data_size = 0;
|
||||
version = 0;
|
||||
}
|
||||
|
||||
FileLoader::~FileLoader()
|
||||
{
|
||||
free();
|
||||
}
|
||||
|
||||
bool FileLoader::loadFile(char* filename, bool log)
|
||||
{
|
||||
free();
|
||||
|
||||
HANDLE fileHandle = 0;
|
||||
|
||||
if (!OpenNewestFile(filename, &fileHandle))
|
||||
{
|
||||
if (log)
|
||||
printf("No such file %s\n", filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
data_size = SFileGetFileSize(fileHandle, NULL);
|
||||
|
||||
data = new uint8 [data_size];
|
||||
if (!data)
|
||||
{
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SFileReadFile(fileHandle, data, data_size, NULL, NULL))
|
||||
{
|
||||
if (log)
|
||||
printf("Can't read file %s\n", filename);
|
||||
SFileCloseFile(fileHandle);
|
||||
return false;
|
||||
}
|
||||
|
||||
SFileCloseFile(fileHandle);
|
||||
|
||||
// ToDo: Fix WDT errors...
|
||||
if (!prepareLoadedData())
|
||||
{
|
||||
//printf("Error loading %s\n\n", filename);
|
||||
//free();
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileLoader::prepareLoadedData()
|
||||
{
|
||||
// Check version
|
||||
version = (file_MVER*) data;
|
||||
if (version->fcc != 'MVER')
|
||||
return false;
|
||||
if (version->ver != FILE_FORMAT_VERSION)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FileLoader::free()
|
||||
{
|
||||
if (data) delete[] data;
|
||||
data = 0;
|
||||
data_size = 0;
|
||||
version = 0;
|
||||
}
|
||||
102
src/tools/map-extractor/loadlib/loadlib.h
Normal file
102
src/tools/map-extractor/loadlib/loadlib.h
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef LOAD_LIB_H
|
||||
#define LOAD_LIB_H
|
||||
|
||||
#ifdef _DLL
|
||||
#undef _DLL
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "StormLib.h"
|
||||
#include <deque>
|
||||
|
||||
#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
|
||||
|
||||
typedef std::deque<HANDLE> ArchiveSet;
|
||||
typedef std::pair<ArchiveSet::const_iterator, ArchiveSet::const_iterator> ArchiveSetBounds;
|
||||
|
||||
bool OpenArchive(char const* mpqFileName, HANDLE* mpqHandlePtr = NULL);
|
||||
bool OpenNewestFile(char const* filename, HANDLE* fileHandlerPtr);
|
||||
ArchiveSetBounds GetArchivesBounds();
|
||||
bool ExtractFile(char const* mpq_name, std::string const& filename);
|
||||
void CloseArchives();
|
||||
|
||||
#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
|
||||
62
src/tools/map-extractor/loadlib/wdt.cpp
Normal file
62
src/tools/map-extractor/loadlib/wdt.cpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "wdt.h"
|
||||
|
||||
bool wdt_MWMO::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MWMO')
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wdt_MPHD::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MPHD')
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wdt_MAIN::prepareLoadedData()
|
||||
{
|
||||
if (fcc != 'MAIN')
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
WDT_file::WDT_file()
|
||||
{
|
||||
mphd = 0;
|
||||
main = 0;
|
||||
wmo = 0;
|
||||
}
|
||||
|
||||
WDT_file::~WDT_file()
|
||||
{
|
||||
free();
|
||||
}
|
||||
|
||||
void WDT_file::free()
|
||||
{
|
||||
mphd = 0;
|
||||
main = 0;
|
||||
wmo = 0;
|
||||
FileLoader::free();
|
||||
}
|
||||
|
||||
bool WDT_file::prepareLoadedData()
|
||||
{
|
||||
// Check parent
|
||||
if (!FileLoader::prepareLoadedData())
|
||||
return false;
|
||||
|
||||
mphd = (wdt_MPHD*)((uint8*)version + version->size + 8);
|
||||
if (!mphd->prepareLoadedData())
|
||||
return false;
|
||||
main = (wdt_MAIN*)((uint8*)mphd + mphd->size + 8);
|
||||
if (!main->prepareLoadedData())
|
||||
return false;
|
||||
wmo = (wdt_MWMO*)((uint8*)main + main->size + 8);
|
||||
if (!wmo->prepareLoadedData())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
100
src/tools/map-extractor/loadlib/wdt.h
Normal file
100
src/tools/map-extractor/loadlib/wdt.h
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef WDT_H
|
||||
#define WDT_H
|
||||
#include "loadlib.h"
|
||||
|
||||
//**************************************************************************************
|
||||
// WDT file class and structures
|
||||
//**************************************************************************************
|
||||
#define WDT_MAP_SIZE 64
|
||||
|
||||
class wdt_MWMO
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
public:
|
||||
uint32 size;
|
||||
bool prepareLoadedData();
|
||||
};
|
||||
|
||||
class wdt_MPHD
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
public:
|
||||
uint32 size;
|
||||
|
||||
uint32 data1;
|
||||
uint32 data2;
|
||||
uint32 data3;
|
||||
uint32 data4;
|
||||
uint32 data5;
|
||||
uint32 data6;
|
||||
uint32 data7;
|
||||
uint32 data8;
|
||||
bool prepareLoadedData();
|
||||
};
|
||||
|
||||
class wdt_MAIN
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
public:
|
||||
uint32 size;
|
||||
|
||||
struct adtData
|
||||
{
|
||||
uint32 exist;
|
||||
uint32 data1;
|
||||
} adt_list[64][64];
|
||||
|
||||
bool prepareLoadedData();
|
||||
};
|
||||
|
||||
class WDT_file : public FileLoader
|
||||
{
|
||||
public:
|
||||
bool prepareLoadedData();
|
||||
|
||||
WDT_file();
|
||||
~WDT_file();
|
||||
void free();
|
||||
|
||||
wdt_MPHD* mphd;
|
||||
wdt_MAIN* main;
|
||||
wdt_MWMO* wmo;
|
||||
};
|
||||
|
||||
#endif
|
||||
BIN
src/tools/tools.ico
Normal file
BIN
src/tools/tools.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
13
src/tools/vmap-assembler/.gitignore
vendored
Normal file
13
src/tools/vmap-assembler/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
bin
|
||||
71
src/tools/vmap-assembler/CMakeLists.txt
Normal file
71
src/tools/vmap-assembler/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
project (MANGOS_VMAP_ASSEMB_IO)
|
||||
|
||||
set(EXECUTABLE_NAME "vmap-assembler")
|
||||
|
||||
# comment next line to disable debug mode
|
||||
#TODO: These should be general, not with the -D part for windows to work too?
|
||||
add_definitions("-DIOMAP_DEBUG")
|
||||
add_definitions("-DNO_CORE_FUNCS")
|
||||
|
||||
include_directories(
|
||||
"${CMAKE_SOURCE_DIR}/src/shared"
|
||||
"${CMAKE_SOURCE_DIR}/src/game/vmap/"
|
||||
"${CMAKE_SOURCE_DIR}/dep/include/g3dlite/"
|
||||
"${CMAKE_SOURCE_DIR}/src/framework/"
|
||||
"${ACE_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# add resource file to windows build
|
||||
set(EXECUTABLE_SRCS ${EXECUTABLE_SRCS} vmap-assembler.rc)
|
||||
endif()
|
||||
|
||||
add_executable(${EXECUTABLE_NAME} vmap_assembler.cpp ${EXECUTABLE_SRCS})
|
||||
|
||||
if(NOT ACE_USE_EXTERNAL)
|
||||
target_link_libraries(${EXECUTABLE_NAME} ace)
|
||||
else()
|
||||
target_link_libraries(${EXECUTABLE_NAME} ACE)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${EXECUTABLE_NAME} vmap g3dlite zlib)
|
||||
|
||||
#Output the compiled exes to build/bin/$(Configuration)/tools directory on windows by default
|
||||
if(WIN32)
|
||||
if ( MSVC )
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/tools
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/tools
|
||||
)
|
||||
elseif ( MINGW )
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/tools
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/tools
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ${EXECUTABLE_NAME} DESTINATION "${BIN_DIR}/${TOOLS_DIR}")
|
||||
if(WIN32 AND MSVC)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb" DESTINATION "${BIN_DIR}/${TOOLS_DIR}" CONFIGURATIONS Debug)
|
||||
endif()
|
||||
44
src/tools/vmap-assembler/README
Normal file
44
src/tools/vmap-assembler/README
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
vmap assembler
|
||||
--------------
|
||||
The *vmap assembler* will assemble custom height maps based on the model information
|
||||
extracted with the *vmap extractor*.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
You will need a working installation of the [World of Warcraft][1] client patched
|
||||
to version 1.12.x.
|
||||
|
||||
Instructions - Linux
|
||||
--------------------
|
||||
Use the created executable to create the vmap files for MaNGOS.
|
||||
|
||||
The executable takes two arguments:
|
||||
|
||||
vmap-assembler <input_dir> <output_dir>
|
||||
|
||||
Example:
|
||||
|
||||
$ ./vmap-assembler Buildings vmaps
|
||||
|
||||
<output_dir> has to exist already and shall be empty.
|
||||
|
||||
The resulting files in <output_dir> are expected to be found in ${DataDir}/vmaps
|
||||
by mangos-worldd (DataDir is set in mangosd.conf).
|
||||
|
||||
Instructions - Windows
|
||||
----------------------
|
||||
Use the created executable (from command prompt) to create the vmap files for MaNGOS.
|
||||
The executable takes two arguments:
|
||||
|
||||
vmap-assembler.exe <input_dir> <output_dir>
|
||||
|
||||
Example:
|
||||
|
||||
C:\my_data_dir\> vmap-assembler.exe Buildings vmaps
|
||||
|
||||
<output_dir> has to exist already and shall be empty.
|
||||
The resulting files in <output_dir> are expected to be found in ${DataDir}\vmaps
|
||||
by mangos-worldd (DataDir is set in mangosd.conf).
|
||||
|
||||
|
||||
[1]: http://blizzard.com/games/wow/ "World of Warcraft"
|
||||
2
src/tools/vmap-assembler/VC100/.gitignore
vendored
Normal file
2
src/tools/vmap-assembler/VC100/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.user
|
||||
bin
|
||||
214
src/tools/vmap-assembler/VC100/vmap_assembler.vcxproj
Normal file
214
src/tools/vmap-assembler/VC100/vmap_assembler.vcxproj
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
<?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="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{572FFF74-480C-4472-8ABF-81733BB4049D}</ProjectGuid>
|
||||
<RootNamespace>vmap_assembler</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" 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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\vmap_assembler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\BIH.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\MapTree.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\ModelInstance.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\TileAssembler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\VMapManager2.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\WorldModel.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\game\vmap\BIH.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\MapTree.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\ModelInstance.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\TileAssembler.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\VMapManager2.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\VMapTools.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\WorldModel.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\win\VC100\g3dlite.vcxproj">
|
||||
<Project>{8072769e-cf10-48bf-b9e1-12752a5dac6e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\win\VC100\zlib.vcxproj">
|
||||
<Project>{8f1dea42-6a5b-4b62-839d-c141a7bfacf2}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
2
src/tools/vmap-assembler/VC110/.gitignore
vendored
Normal file
2
src/tools/vmap-assembler/VC110/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.user
|
||||
bin
|
||||
218
src/tools/vmap-assembler/VC110/vmap_assembler.vcxproj
Normal file
218
src/tools/vmap-assembler/VC110/vmap_assembler.vcxproj
Normal file
|
|
@ -0,0 +1,218 @@
|
|||
<?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="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{572FFF74-480C-4472-8ABF-81733BB4049D}</ProjectGuid>
|
||||
<RootNamespace>vmap_assembler</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\vmap_assembler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\BIH.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\MapTree.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\ModelInstance.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\TileAssembler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\VMapManager2.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\WorldModel.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\game\vmap\BIH.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\MapTree.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\ModelInstance.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\TileAssembler.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\VMapManager2.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\VMapTools.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\WorldModel.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\win\VC110\g3dlite.vcxproj">
|
||||
<Project>{8072769e-cf10-48bf-b9e1-12752a5dac6e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\win\VC110\zlib.vcxproj">
|
||||
<Project>{8f1dea42-6a5b-4b62-839d-c141a7bfacf2}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
2
src/tools/vmap-assembler/VC120/.gitignore
vendored
Normal file
2
src/tools/vmap-assembler/VC120/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.user
|
||||
bin
|
||||
218
src/tools/vmap-assembler/VC120/vmap_assembler.vcxproj
Normal file
218
src/tools/vmap-assembler/VC120/vmap_assembler.vcxproj
Normal file
|
|
@ -0,0 +1,218 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.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="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{572FFF74-480C-4472-8ABF-81733BB4049D}</ProjectGuid>
|
||||
<RootNamespace>vmap_assembler</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</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" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\bin\$(ProjectName)__$(Platform)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\dep\include\g3dlite;..\..\..\src\shared;..\..\..\src\game\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;NO_CORE_FUNCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)vmap_assembler.exe</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\vmap_assembler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\BIH.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\MapTree.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\ModelInstance.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\TileAssembler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\VMapManager2.cpp" />
|
||||
<ClCompile Include="..\..\..\src\game\vmap\WorldModel.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\game\vmap\BIH.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\MapTree.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\ModelInstance.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\TileAssembler.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\VMapManager2.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\VMapTools.h" />
|
||||
<ClInclude Include="..\..\..\src\game\vmap\WorldModel.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\win\VC120\g3dlite.vcxproj">
|
||||
<Project>{8072769e-cf10-48bf-b9e1-12752a5dac6e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\win\VC120\zlib.vcxproj">
|
||||
<Project>{8f1dea42-6a5b-4b62-839d-c141a7bfacf2}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
25
src/tools/vmap-assembler/vmap-assembler.rc
Normal file
25
src/tools/vmap-assembler/vmap-assembler.rc
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
IDI_APPICON ICON DISCARDABLE "../tools.ico"
|
||||
56
src/tools/vmap-assembler/vmap_assembler.cpp
Normal file
56
src/tools/vmap-assembler/vmap_assembler.cpp
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "TileAssembler.h"
|
||||
|
||||
//=======================================================
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc != 3)
|
||||
{
|
||||
std::cout << "usage: " << argv[0] << " <raw data dir> <vmap dest dir>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string src = argv[1];
|
||||
std::string dest = argv[2];
|
||||
|
||||
std::cout << "using " << src << " as source directory and writing output to " << dest << std::endl;
|
||||
|
||||
VMAP::TileAssembler* ta = new VMAP::TileAssembler(src, dest);
|
||||
|
||||
if (!ta->convertWorld2())
|
||||
{
|
||||
std::cout << "exit with errors" << std::endl;
|
||||
delete ta;
|
||||
return 1;
|
||||
}
|
||||
|
||||
delete ta;
|
||||
std::cout << "Ok, all done" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
59
src/tools/vmap-assembler/vmap_assemblerVC100.sln
Normal file
59
src/tools/vmap-assembler/vmap_assemblerVC100.sln
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap_assembler", "VC100\vmap_assembler.vcxproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\win\VC100\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\win\VC100\g3dlite.vcxproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_NoPCH|Win32 = Debug_NoPCH|Win32
|
||||
Debug_NoPCH|x64 = Debug_NoPCH|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|x64.ActiveCfg = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|x64.Build.0 = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|x64.Build.0 = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|x64.ActiveCfg = Release|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|x64.Build.0 = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
59
src/tools/vmap-assembler/vmap_assemblerVC110.sln
Normal file
59
src/tools/vmap-assembler/vmap_assemblerVC110.sln
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap_assembler", "VC110\vmap_assembler.vcxproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\win\VC110\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\win\VC110\g3dlite.vcxproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_NoPCH|Win32 = Debug_NoPCH|Win32
|
||||
Debug_NoPCH|x64 = Debug_NoPCH|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|x64.ActiveCfg = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|x64.Build.0 = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|x64.Build.0 = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|x64.ActiveCfg = Release|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|x64.Build.0 = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
59
src/tools/vmap-assembler/vmap_assemblerVC120.sln
Normal file
59
src/tools/vmap-assembler/vmap_assemblerVC120.sln
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap_assembler", "VC120\vmap_assembler.vcxproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\win\VC120\zlib.vcxproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\win\VC120\g3dlite.vcxproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_NoPCH|Win32 = Debug_NoPCH|Win32
|
||||
Debug_NoPCH|x64 = Debug_NoPCH|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|x64.ActiveCfg = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|x64.Build.0 = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|x64.Build.0 = Debug|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|x64.ActiveCfg = Release|x64
|
||||
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|x64.Build.0 = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|x64.Build.0 = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
19
src/tools/vmap-extractor/.gitignore
vendored
Normal file
19
src/tools/vmap-extractor/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
bin
|
||||
|
||||
# CMake files
|
||||
|
||||
CMakeFiles
|
||||
CMakeCache.txt
|
||||
cmake_install.cmake
|
||||
307
src/tools/vmap-extractor/CMakeLists.txt
Normal file
307
src/tools/vmap-extractor/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
#
|
||||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
project (MANGOS_VMAP_EXTRACT_IO)
|
||||
|
||||
|
||||
|
||||
set(SRC_FILES
|
||||
../../dep/StormLib/src/adpcm/adpcm.cpp
|
||||
../../dep/StormLib/src/huffman/huff.cpp
|
||||
../../dep/StormLib/src/jenkins/lookup3.c
|
||||
../../dep/StormLib/src/lzma/C/LzFind.c
|
||||
../../dep/StormLib/src/lzma/C/LzmaDec.c
|
||||
../../dep/StormLib/src/lzma/C/LzmaEnc.c
|
||||
../../dep/StormLib/src/pklib/explode.c
|
||||
../../dep/StormLib/src/pklib/implode.c
|
||||
../../dep/StormLib/src/sparse/sparse.cpp
|
||||
../../dep/StormLib/src/FileStream.cpp
|
||||
../../dep/StormLib/src/SBaseCommon.cpp
|
||||
../../dep/StormLib/src/SBaseDumpData.cpp
|
||||
../../dep/StormLib/src/SBaseFileTable.cpp
|
||||
../../dep/StormLib/src/SCompression.cpp
|
||||
../../dep/StormLib/src/SFileAddFile.cpp
|
||||
../../dep/StormLib/src/SFileAttributes.cpp
|
||||
../../dep/StormLib/src/SFileCompactArchive.cpp
|
||||
../../dep/StormLib/src/SFileCreateArchive.cpp
|
||||
../../dep/StormLib/src/SFileExtractFile.cpp
|
||||
../../dep/StormLib/src/SFileFindFile.cpp
|
||||
../../dep/StormLib/src/SFileListFile.cpp
|
||||
../../dep/StormLib/src/SFileOpenArchive.cpp
|
||||
../../dep/StormLib/src/SFileOpenFileEx.cpp
|
||||
../../dep/StormLib/src/SFilePatchArchives.cpp
|
||||
../../dep/StormLib/src/SFileReadFile.cpp
|
||||
../../dep/StormLib/src/SFileVerify.cpp
|
||||
)
|
||||
|
||||
set(TOMCRYPT_FILES
|
||||
../../dep/StormLib/src/libtomcrypt/src/hashes/hash_memory.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/hashes/md5.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/hashes/sha1.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/math/ltm_desc.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/math/multi.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/math/rand_prime.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/base64_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_argchk.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_find_hash.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_find_prng.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_hash_descriptor.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_hash_is_valid.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_libc.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_prng_descriptor.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_prng_is_valid.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_register_hash.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/crypt_register_prng.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/misc/zeromem.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_boolean.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_choice.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utctime.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_bit_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_boolean.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_octet_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_printable_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_sequence.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utctime.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_sequence_free.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/asn1/der_length_short_integer.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_exptmod.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_free.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_import.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_make_key.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c
|
||||
../../dep/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c
|
||||
)
|
||||
|
||||
set(TOMMATH_FILES
|
||||
../../dep/StormLib/src/libtommath/bncore.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_mp_invmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_mp_montgomery_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_s_mp_mul_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_s_mp_mul_high_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_fast_s_mp_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_2expt.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_abs.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_add.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_addmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_add_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_and.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_clamp.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_clear.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_clear_multi.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cmp.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cmp_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cmp_mag.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_cnt_lsb.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_copy.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_count_bits.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_2.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_2d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_3.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_div_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_dr_is_modulus.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_dr_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_dr_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exch.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exptmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exptmod_fast.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_expt_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_exteuclid.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_fread.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_fwrite.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_gcd.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_get_int.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_grow.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_copy.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_multi.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_set.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_set_int.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_init_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_invmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_invmod_slow.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_is_square.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_jacobi.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_karatsuba_mul.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_karatsuba_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_lcm.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_lshd.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mod_2d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mod_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_montgomery_calc_normalization.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_montgomery_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_montgomery_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mulmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul_2.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul_2d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_mul_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_neg.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_n_root.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_or.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_fermat.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_is_divisible.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_is_prime.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_miller_rabin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_next_prime.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_rabin_miller_trials.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_prime_random_ex.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_radix_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_radix_smap.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_rand.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_read_radix.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_read_signed_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_read_unsigned_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k_l.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_2k_setup_l.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_is_2k.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_is_2k_l.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_reduce_setup.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_rshd.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_set.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_set_int.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_shrink.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_signed_bin_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sqrmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sqrt.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sub.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_submod.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_sub_d.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toom_mul.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toom_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toradix.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_toradix_n.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_signed_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_signed_bin_n.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_unsigned_bin.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_to_unsigned_bin_n.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_unsigned_bin_size.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_xor.c
|
||||
../../dep/StormLib/src/libtommath/bn_mp_zero.c
|
||||
../../dep/StormLib/src/libtommath/bn_prime_tab.c
|
||||
../../dep/StormLib/src/libtommath/bn_reverse.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_add.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_exptmod.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_mul_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_mul_high_digs.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_sqr.c
|
||||
../../dep/StormLib/src/libtommath/bn_s_mp_sub.c
|
||||
)
|
||||
|
||||
set(ZLIB_BZIP2_FILES
|
||||
../../dep/StormLib/src/bzip2/blocksort.c
|
||||
../../dep/StormLib/src/bzip2/bzlib.c
|
||||
../../dep/StormLib/src/bzip2/compress.c
|
||||
../../dep/StormLib/src/bzip2/crctable.c
|
||||
../../dep/StormLib/src/bzip2/decompress.c
|
||||
../../dep/StormLib/src/bzip2/huffman.c
|
||||
../../dep/StormLib/src/bzip2/randtable.c
|
||||
../../dep/StormLib/src/zlib/adler32.c
|
||||
../../dep/StormLib/src/zlib/compress2.c
|
||||
../../dep/StormLib/src/zlib/crc32.c
|
||||
../../dep/StormLib/src/zlib/deflate.c
|
||||
../../dep/StormLib/src/zlib/inffast.c
|
||||
../../dep/StormLib/src/zlib/inflate.c
|
||||
../../dep/StormLib/src/zlib/inftrees.c
|
||||
../../dep/StormLib/src/zlib/trees.c
|
||||
../../dep/StormLib/src/zlib/zutil.c
|
||||
)
|
||||
|
||||
|
||||
|
||||
# set(TEST_SRC_FILES
|
||||
# test/Test.cpp
|
||||
# )
|
||||
|
||||
add_definitions(-D_7ZIP_ST -DBZ_STRICT_ANSI)
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
message(STATUS "Using MSVC")
|
||||
add_definitions(-D_7ZIP_ST -DWIN32)
|
||||
else()
|
||||
message(STATUS "Using mingw")
|
||||
endif()
|
||||
set(SRC_ADDITIONAL_FILES ${ZLIB_BZIP2_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES})
|
||||
set(LINK_LIBS wininet)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
message(STATUS "Using Mac OS X port")
|
||||
set(LINK_LIBS z bz2)
|
||||
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL Linux)
|
||||
message(STATUS "Using Linux port")
|
||||
option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF)
|
||||
if(WITH_LIBTOMCRYPT)
|
||||
set(LINK_LIBS z bz2 tomcrypt)
|
||||
else()
|
||||
set(LINK_LIBS z bz2)
|
||||
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(storm SHARED ${SRC_FILES} ${SRC_ADDITIONAL_FILES})
|
||||
target_link_libraries(storm ${LINK_LIBS})
|
||||
|
||||
# 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(${CMAKE_SOURCE_DIR}/../../dep/StormLib/src)
|
||||
|
||||
add_subdirectory(vmapextract)
|
||||
40
src/tools/vmap-extractor/README.md
Normal file
40
src/tools/vmap-extractor/README.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
vmap extractor
|
||||
--------------
|
||||
The *vmap extractor* will extract model information from the game client.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
You will need a working installation of the [World of Warcraft][1] client patched
|
||||
to version 1.12.x.
|
||||
|
||||
Instructions - Linux
|
||||
--------------------
|
||||
Use the created executable to extract model information. Change the data path if
|
||||
needed.
|
||||
|
||||
$ vmap-extractor -d /mnt/windows/games/world of warcraft/
|
||||
|
||||
Resulting files will be in `./Buildings`.
|
||||
|
||||
Instructions - Windows
|
||||
----------------------
|
||||
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`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
The *vmap extractor* can be used with a few parameters to customize input, output
|
||||
and generated output.
|
||||
|
||||
* `-d PATH`, `--data PATH`: set the path for reading the client's MPQ archives to the given
|
||||
path.
|
||||
* `-s`, `--small`: small size (data size optimization), ~500MB less vmap data. This is the
|
||||
default setting.
|
||||
* `-l`, `--large`: large size, ~500MB more vmap data. Stores additional details in vmap data.
|
||||
* `-h`, `--help`: display the usage message, and an example call.
|
||||
|
||||
|
||||
[1]: http://blizzard.com/games/wow/ "World of Warcraft"
|
||||
46
src/tools/vmap-extractor/make_vmaps.bat
Normal file
46
src/tools/vmap-extractor/make_vmaps.bat
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@echo off
|
||||
cls
|
||||
echo.
|
||||
echo Welcome to the vmaps extractor and assembler
|
||||
echo.
|
||||
echo You need 2GB of free space in disk, CTRL+C to stop process
|
||||
echo Hit Enter to start . . .
|
||||
pause>nul
|
||||
cls
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
IF EXIST Buildings\dir (ECHO The Buildings folder already exist do you want to delete it?
|
||||
echo If YES hit Enter to continue if no CLOSE the program now! . . .
|
||||
pause>nul
|
||||
DEL /S /Q buildings)
|
||||
vmapExtractor.exe
|
||||
cls
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
IF NOT %ERRORLEVEL% LEQ 1 (echo The vmap extract tool finalized with errors.
|
||||
echo Hit Enter to continue . . .
|
||||
pause>nul)
|
||||
cls
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo Vmaps extracted check log.txt for errors, now it's time to assemble the vmaps press any key to continue . . .
|
||||
pause>nul
|
||||
md vmaps
|
||||
vmap_assembler.exe buildings vmaps
|
||||
cls
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
IF NOT %ERRORLEVEL% LEQ 1 (echo The vmap assembler tool finalized with errors.
|
||||
echo Hit Enter to continue . . .
|
||||
pause>nul)
|
||||
cls
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo Process done! copy vmaps folder to the MaNGOS main directory
|
||||
echo Press any key to exit . . .
|
||||
pause>nul
|
||||
17
src/tools/vmap-extractor/vmapextract/CMakeLists.txt
Normal file
17
src/tools/vmap-extractor/vmapextract/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
#
|
||||
# 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.8)
|
||||
|
||||
project (MANGOS_IOMAP_EXTRACTOR)
|
||||
|
||||
LINK_DIRECTORIES( ${LINK_DIRECTORIES} ${CMAKE_SOURCE_DIR}/../../../dep/StormLib/src )
|
||||
add_executable(vmapextractor adtfile.cpp dbcfile.cpp gameobject_extract.cpp model.cpp mpqfile.cpp vmapexport.cpp wdtfile.cpp wmo.cpp)
|
||||
target_link_libraries(vmapextractor storm bz2 z)
|
||||
231
src/tools/vmap-extractor/vmapextract/adtfile.cpp
Normal file
231
src/tools/vmap-extractor/vmapextract/adtfile.cpp
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "vmapexport.h"
|
||||
#include "adtfile.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
const char* GetPlainName(const char* FileName)
|
||||
{
|
||||
const char* szTemp;
|
||||
|
||||
if ((szTemp = strrchr(FileName, '\\')) != NULL)
|
||||
FileName = szTemp + 1;
|
||||
return FileName;
|
||||
}
|
||||
|
||||
char* GetPlainName(char* FileName)
|
||||
{
|
||||
char* szTemp;
|
||||
|
||||
if ((szTemp = strrchr(FileName, '\\')) != NULL)
|
||||
FileName = szTemp + 1;
|
||||
return FileName;
|
||||
}
|
||||
|
||||
void fixnamen(char* name, size_t len)
|
||||
{
|
||||
for (size_t i = 0; i < len - 3; i++)
|
||||
{
|
||||
if (i > 0 && name[i] >= 'A' && name[i] <= 'Z' && isalpha(name[i - 1]))
|
||||
{
|
||||
name[i] |= 0x20;
|
||||
}
|
||||
else if ((i == 0 || !isalpha(name[i - 1])) && name[i] >= 'a' && name[i] <= 'z')
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (size_t i = 0; i < len - 3; i++)
|
||||
{
|
||||
if (name[i] == ' ')
|
||||
name[i] = '_';
|
||||
}
|
||||
}
|
||||
|
||||
char const* GetExtension(char const* FileName)
|
||||
{
|
||||
char const* szTemp;
|
||||
if ((szTemp = strrchr(FileName, '.')) != NULL)
|
||||
return szTemp;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern HANDLE WorldMpq;
|
||||
|
||||
ADTFile::ADTFile(char* filename): ADT(WorldMpq, filename)
|
||||
{
|
||||
Adtfilename.append(filename);
|
||||
}
|
||||
|
||||
bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY, StringSet& failedPaths)
|
||||
{
|
||||
if (ADT.isEof())
|
||||
return false;
|
||||
|
||||
uint32 size;
|
||||
|
||||
string xMap;
|
||||
string yMap;
|
||||
|
||||
Adtfilename.erase(Adtfilename.find(".adt"), 4);
|
||||
string TempMapNumber;
|
||||
TempMapNumber = Adtfilename.substr(Adtfilename.length() - 6, 6);
|
||||
xMap = TempMapNumber.substr(TempMapNumber.find("_") + 1, (TempMapNumber.find_last_of("_") - 1) - (TempMapNumber.find("_")));
|
||||
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));
|
||||
string AdtMapNumber = xMap + ' ' + yMap + ' ' + GetPlainName((char*)Adtfilename.c_str());
|
||||
//printf("Processing map %s...\n", AdtMapNumber.c_str());
|
||||
//printf("MapNumber = %s\n", TempMapNumber.c_str());
|
||||
//printf("xMap = %s\n", xMap.c_str());
|
||||
//printf("yMap = %s\n", yMap.c_str());
|
||||
|
||||
std::string dirname = std::string(szWorkDirWmo) + "/dir_bin";
|
||||
FILE* dirfile;
|
||||
dirfile = fopen(dirname.c_str(), "ab");
|
||||
if (!dirfile)
|
||||
{
|
||||
printf("Can't open dirfile!'%s'\n", dirname.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
while (!ADT.isEof())
|
||||
{
|
||||
char fourcc[5];
|
||||
ADT.read(&fourcc, 4);
|
||||
ADT.read(&size, 4);
|
||||
flipcc(fourcc);
|
||||
fourcc[4] = 0;
|
||||
|
||||
size_t nextpos = ADT.getPos() + size;
|
||||
|
||||
if (!strcmp(fourcc, "MCIN"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc, "MTEX"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc, "MMDX"))
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
char* buf = new char[size];
|
||||
ADT.read(buf, size);
|
||||
char* p = buf;
|
||||
int t = 0;
|
||||
ModelInstansName = new string[size];
|
||||
while (p < buf + size)
|
||||
{
|
||||
fixnamen(p, strlen(p));
|
||||
char* s = GetPlainName(p);
|
||||
fixname2(s, strlen(s));
|
||||
string path(p); // Store copy after name fixed
|
||||
|
||||
std::string fixedName;
|
||||
ExtractSingleModel(path, fixedName, failedPaths);
|
||||
ModelInstansName[t++] = fixedName;
|
||||
|
||||
p = p + strlen(p) + 1;
|
||||
}
|
||||
delete[] buf;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(fourcc, "MWMO"))
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
char* buf = new char[size];
|
||||
ADT.read(buf, size);
|
||||
char* p = buf;
|
||||
int q = 0;
|
||||
WmoInstansName = new string[size];
|
||||
while (p < buf + size)
|
||||
{
|
||||
string path(p);
|
||||
char* s = GetPlainName(p);
|
||||
fixnamen(s, strlen(s));
|
||||
fixname2(s, strlen(s));
|
||||
p = p + strlen(p) + 1;
|
||||
WmoInstansName[q++] = s;
|
||||
}
|
||||
delete[] buf;
|
||||
}
|
||||
}
|
||||
//======================
|
||||
else if (!strcmp(fourcc, "MDDF"))
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
nMDX = (int)size / 36;
|
||||
for (int i = 0; i < nMDX; ++i)
|
||||
{
|
||||
uint32 id;
|
||||
ADT.read(&id, 4);
|
||||
ModelInstance inst(ADT, ModelInstansName[id].c_str(), map_num, tileX, tileY, dirfile);
|
||||
}
|
||||
delete[] ModelInstansName;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(fourcc, "MODF"))
|
||||
{
|
||||
if (size)
|
||||
{
|
||||
nWMO = (int)size / 64;
|
||||
for (int i = 0; i < nWMO; ++i)
|
||||
{
|
||||
uint32 id;
|
||||
ADT.read(&id, 4);
|
||||
WMOInstance inst(ADT, WmoInstansName[id].c_str(), map_num, tileX, tileY, dirfile);
|
||||
}
|
||||
delete[] WmoInstansName;
|
||||
}
|
||||
}
|
||||
//======================
|
||||
ADT.seek(nextpos);
|
||||
}
|
||||
ADT.close();
|
||||
fclose(dirfile);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ADTFile::~ADTFile()
|
||||
{
|
||||
ADT.close();
|
||||
}
|
||||
150
src/tools/vmap-extractor/vmapextract/adtfile.h
Normal file
150
src/tools/vmap-extractor/vmapextract/adtfile.h
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef ADT_H
|
||||
#define ADT_H
|
||||
|
||||
#include "mpqfile.h"
|
||||
#include "wmo.h"
|
||||
#include "vmapexport.h"
|
||||
#include "model.h"
|
||||
|
||||
#define TILESIZE (533.33333f)
|
||||
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
||||
#define UNITSIZE (CHUNKSIZE / 8.0f)
|
||||
|
||||
class Liquid;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} svec;
|
||||
|
||||
struct vec
|
||||
{
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
struct triangle
|
||||
{
|
||||
vec v[3];
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float v9[16 * 8 + 1][16 * 8 + 1];
|
||||
float v8[16 * 8][16 * 8];
|
||||
} Cell;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double v9[9][9];
|
||||
double v8[8][8];
|
||||
uint16 area_id;
|
||||
//Liquid *lq;
|
||||
float waterlevel[9][9];
|
||||
uint8 flag;
|
||||
} chunk;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
chunk ch[16][16];
|
||||
} mcell;
|
||||
|
||||
struct MapChunkHeader
|
||||
{
|
||||
uint32 flags;
|
||||
uint32 ix;
|
||||
uint32 iy;
|
||||
uint32 nLayers;
|
||||
uint32 nDoodadRefs;
|
||||
uint32 ofsHeight;
|
||||
uint32 ofsNormal;
|
||||
uint32 ofsLayer;
|
||||
uint32 ofsRefs;
|
||||
uint32 ofsAlpha;
|
||||
uint32 sizeAlpha;
|
||||
uint32 ofsShadow;
|
||||
uint32 sizeShadow;
|
||||
uint32 areaid;
|
||||
uint32 nMapObjRefs;
|
||||
uint32 holes;
|
||||
uint16 s1;
|
||||
uint16 s2;
|
||||
uint32 d1;
|
||||
uint32 d2;
|
||||
uint32 d3;
|
||||
uint32 predTex;
|
||||
uint32 nEffectDoodad;
|
||||
uint32 ofsSndEmitters;
|
||||
uint32 nSndEmitters;
|
||||
uint32 ofsLiquid;
|
||||
uint32 sizeLiquid;
|
||||
float zpos;
|
||||
float xpos;
|
||||
float ypos;
|
||||
uint32 textureId;
|
||||
uint32 props;
|
||||
uint32 effectId;
|
||||
};
|
||||
|
||||
|
||||
class ADTFile
|
||||
{
|
||||
public:
|
||||
ADTFile(char* filename);
|
||||
~ADTFile();
|
||||
int nWMO;
|
||||
int nMDX;
|
||||
string* WmoInstansName;
|
||||
string* ModelInstansName;
|
||||
bool init(uint32 map_num, uint32 tileX, uint32 tileY, StringSet& failedPaths);
|
||||
//void LoadMapChunks();
|
||||
|
||||
//uint32 wmo_count;
|
||||
/*
|
||||
const mcell& Getmcell() const
|
||||
{
|
||||
return Mcell;
|
||||
}
|
||||
*/
|
||||
private:
|
||||
//size_t mcnk_offsets[256], mcnk_sizes[256];
|
||||
MPQFile ADT;
|
||||
//mcell Mcell;
|
||||
string Adtfilename;
|
||||
};
|
||||
|
||||
const char* GetPlainName(const char* FileName);
|
||||
char* GetPlainName(char* FileName);
|
||||
char const* GetExtension(char const* FileName);
|
||||
void fixnamen(char* name, size_t len);
|
||||
void fixname2(char* name, size_t len);
|
||||
//void fixMapNamen(char *name, size_t len);
|
||||
|
||||
#endif
|
||||
124
src/tools/vmap-extractor/vmapextract/dbcfile.cpp
Normal file
124
src/tools/vmap-extractor/vmapextract/dbcfile.cpp
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "dbcfile.h"
|
||||
|
||||
DBCFile::DBCFile(HANDLE mpq, const char* filename) :
|
||||
_mpq(mpq), _filename(filename), _file(NULL), _data(NULL), _stringTable(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
bool DBCFile::open()
|
||||
{
|
||||
if (!SFileOpenFileEx(_mpq, _filename, SFILE_OPEN_PATCHED_FILE, &_file))
|
||||
return false;
|
||||
|
||||
char header[4];
|
||||
unsigned int na, nb, es, ss;
|
||||
|
||||
DWORD readBytes = 0;
|
||||
SFileReadFile(_file, header, 4, &readBytes, NULL);
|
||||
if (readBytes != 4) // Number of records
|
||||
return false;
|
||||
|
||||
if (header[0] != 'W' || header[1] != 'D' || header[2] != 'B' || header[3] != 'C')
|
||||
return false;
|
||||
|
||||
readBytes = 0;
|
||||
SFileReadFile(_file, &na, 4, &readBytes, NULL);
|
||||
if (readBytes != 4) // Number of records
|
||||
return false;
|
||||
|
||||
readBytes = 0;
|
||||
SFileReadFile(_file, &nb, 4, &readBytes, NULL);
|
||||
if (readBytes != 4) // Number of fields
|
||||
return false;
|
||||
|
||||
readBytes = 0;
|
||||
SFileReadFile(_file, &es, 4, &readBytes, NULL);
|
||||
if (readBytes != 4) // Size of a record
|
||||
return false;
|
||||
|
||||
readBytes = 0;
|
||||
SFileReadFile(_file, &ss, 4, &readBytes, NULL);
|
||||
if (readBytes != 4) // String size
|
||||
return false;
|
||||
|
||||
_recordSize = es;
|
||||
_recordCount = na;
|
||||
_fieldCount = nb;
|
||||
_stringSize = ss;
|
||||
if (_fieldCount * 4 != _recordSize)
|
||||
return false;
|
||||
|
||||
_data = new unsigned char[_recordSize * _recordCount + _stringSize];
|
||||
_stringTable = _data + _recordSize * _recordCount;
|
||||
|
||||
size_t data_size = _recordSize * _recordCount + _stringSize;
|
||||
readBytes = 0;
|
||||
SFileReadFile(_file, _data, data_size, &readBytes, NULL);
|
||||
if (readBytes != data_size)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DBCFile::~DBCFile()
|
||||
{
|
||||
delete [] _data;
|
||||
if (_file != NULL)
|
||||
SFileCloseFile(_file);
|
||||
}
|
||||
|
||||
DBCFile::Record DBCFile::getRecord(size_t id)
|
||||
{
|
||||
assert(_data);
|
||||
return Record(*this, _data + id * _recordSize);
|
||||
}
|
||||
|
||||
size_t DBCFile::getMaxId()
|
||||
{
|
||||
assert(_data);
|
||||
|
||||
size_t maxId = 0;
|
||||
for (size_t i = 0; i < getRecordCount(); ++i)
|
||||
if (maxId < getRecord(i).getUInt(0))
|
||||
maxId = getRecord(i).getUInt(0);
|
||||
|
||||
return maxId;
|
||||
}
|
||||
|
||||
DBCFile::Iterator DBCFile::begin()
|
||||
{
|
||||
assert(_data);
|
||||
return Iterator(*this, _data);
|
||||
}
|
||||
|
||||
DBCFile::Iterator DBCFile::end()
|
||||
{
|
||||
assert(_data);
|
||||
return Iterator(*this, _stringTable);
|
||||
}
|
||||
153
src/tools/vmap-extractor/vmapextract/dbcfile.h
Normal file
153
src/tools/vmap-extractor/vmapextract/dbcfile.h
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef DBCFILE_H
|
||||
#define DBCFILE_H
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include "StormLib.h"
|
||||
|
||||
class DBCFile
|
||||
{
|
||||
public:
|
||||
DBCFile(HANDLE mpq, const char* filename);
|
||||
~DBCFile();
|
||||
|
||||
// Open database. It must be openened before it can be used.
|
||||
bool open();
|
||||
|
||||
// TODO: Add a close function?
|
||||
|
||||
// Database exceptions
|
||||
class Exception
|
||||
{
|
||||
public:
|
||||
Exception(const std::string& message): message(message)
|
||||
{ }
|
||||
virtual ~Exception()
|
||||
{ }
|
||||
const std::string& getMessage() {return message;}
|
||||
private:
|
||||
std::string message;
|
||||
};
|
||||
|
||||
//
|
||||
class NotFound: public Exception
|
||||
{
|
||||
public:
|
||||
NotFound(): Exception("Key was not found")
|
||||
{ }
|
||||
};
|
||||
|
||||
// Iteration over database
|
||||
class Iterator;
|
||||
class Record
|
||||
{
|
||||
public:
|
||||
float getFloat(size_t field) const
|
||||
{
|
||||
assert(field < file._fieldCount);
|
||||
return *reinterpret_cast<float*>(offset + field * 4);
|
||||
}
|
||||
unsigned int getUInt(size_t field) const
|
||||
{
|
||||
assert(field < file._fieldCount);
|
||||
return *reinterpret_cast<unsigned int*>(offset + field * 4);
|
||||
}
|
||||
int getInt(size_t field) const
|
||||
{
|
||||
assert(field < file._fieldCount);
|
||||
return *reinterpret_cast<int*>(offset + field * 4);
|
||||
}
|
||||
|
||||
const char* getString(size_t field) const
|
||||
{
|
||||
assert(field < file._fieldCount);
|
||||
size_t stringOffset = getUInt(field);
|
||||
assert(stringOffset < file._stringSize);
|
||||
return reinterpret_cast<char*>(file._stringTable + stringOffset);
|
||||
}
|
||||
private:
|
||||
Record(DBCFile& file, unsigned char* offset): file(file), offset(offset) {}
|
||||
DBCFile& file;
|
||||
unsigned char* offset;
|
||||
|
||||
friend class DBCFile;
|
||||
friend class DBCFile::Iterator;
|
||||
};
|
||||
|
||||
/* Iterator that iterates over records */
|
||||
class Iterator
|
||||
{
|
||||
public:
|
||||
Iterator(DBCFile& file, unsigned char* offset) : record(file, offset) { }
|
||||
|
||||
/// Advance (prefix only)
|
||||
Iterator& operator++()
|
||||
{
|
||||
record.offset += record.file._recordSize;
|
||||
return *this;
|
||||
}
|
||||
/// Return address of current instance
|
||||
Record const& operator*() const { return record; }
|
||||
const Record* operator->() const { return &record; }
|
||||
|
||||
/// Comparison
|
||||
bool operator==(const Iterator& b) const
|
||||
{
|
||||
return record.offset == b.record.offset;
|
||||
}
|
||||
bool operator!=(const Iterator& b) const
|
||||
{
|
||||
return record.offset != b.record.offset;
|
||||
}
|
||||
private:
|
||||
Record record;
|
||||
};
|
||||
|
||||
// Get record by id
|
||||
Record getRecord(size_t id);
|
||||
/// Get begin iterator over records
|
||||
Iterator begin();
|
||||
/// Get begin iterator over records
|
||||
Iterator end();
|
||||
/// Trivial
|
||||
size_t getRecordCount() const { return _recordCount; }
|
||||
size_t getFieldCount() const { return _fieldCount; }
|
||||
size_t getMaxId();
|
||||
|
||||
private:
|
||||
HANDLE _mpq;
|
||||
const char* _filename;
|
||||
HANDLE _file;
|
||||
size_t _recordSize;
|
||||
size_t _recordCount;
|
||||
size_t _fieldCount;
|
||||
size_t _stringSize;
|
||||
unsigned char* _data;
|
||||
unsigned char* _stringTable;
|
||||
};
|
||||
|
||||
#endif
|
||||
113
src/tools/vmap-extractor/vmapextract/gameobject_extract.cpp
Normal file
113
src/tools/vmap-extractor/vmapextract/gameobject_extract.cpp
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
#include "model.h"
|
||||
#include "dbcfile.h"
|
||||
#include "adtfile.h"
|
||||
#include "vmapexport.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdio.h>
|
||||
|
||||
bool ExtractSingleModel(std::string& origPath, std::string& fixedName, StringSet& failedPaths)
|
||||
{
|
||||
char const* ext = GetExtension(GetPlainName(origPath.c_str()));
|
||||
|
||||
// < 3.1.0 ADT MMDX section store filename.mdx filenames for corresponded .m2 file
|
||||
if (!strcmp(ext, ".mdx"))
|
||||
{
|
||||
// replace .mdx -> .m2
|
||||
origPath.erase(origPath.length() - 2, 2);
|
||||
origPath.append("2");
|
||||
}
|
||||
// >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file
|
||||
// nothing do
|
||||
|
||||
fixedName = GetPlainName(origPath.c_str());
|
||||
|
||||
std::string output(szWorkDirWmo); // Stores output filename (possible changed)
|
||||
output += "/";
|
||||
output += fixedName;
|
||||
|
||||
if (FileExists(output.c_str()))
|
||||
return true;
|
||||
|
||||
Model mdl(origPath); // Possible changed fname
|
||||
if (!mdl.open(failedPaths))
|
||||
return false;
|
||||
|
||||
return mdl.ConvertToVMAPModel(output.c_str());
|
||||
}
|
||||
|
||||
extern HANDLE LocaleMpq;
|
||||
|
||||
void ExtractGameobjectModels()
|
||||
{
|
||||
printf("\n");
|
||||
printf("Extracting GameObject models...\n");
|
||||
DBCFile dbc(LocaleMpq, "DBFilesClient\\GameObjectDisplayInfo.dbc");
|
||||
if (!dbc.open())
|
||||
{
|
||||
printf("Fatal error: Invalid GameObjectDisplayInfo.dbc file format!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
std::string basepath = szWorkDirWmo;
|
||||
basepath += "/";
|
||||
std::string path;
|
||||
StringSet failedPaths;
|
||||
|
||||
FILE* model_list = fopen((basepath + "temp_gameobject_models").c_str(), "wb");
|
||||
|
||||
for (DBCFile::Iterator it = dbc.begin(); it != dbc.end(); ++it)
|
||||
{
|
||||
path = it->getString(1);
|
||||
|
||||
if (path.length() < 4)
|
||||
continue;
|
||||
|
||||
fixnamen((char*)path.c_str(), path.size());
|
||||
char* name = GetPlainName((char*)path.c_str());
|
||||
fixname2(name, strlen(name));
|
||||
|
||||
char const* ch_ext = GetExtension(name);
|
||||
if (!ch_ext)
|
||||
continue;
|
||||
|
||||
//strToLower(ch_ext);
|
||||
|
||||
bool result = false;
|
||||
if (!strcmp(ch_ext, ".wmo"))
|
||||
{
|
||||
result = ExtractSingleWmo(path);
|
||||
}
|
||||
else if (!strcmp(ch_ext, ".mdl"))
|
||||
{
|
||||
// TODO: extract .mdl files, if needed
|
||||
continue;
|
||||
}
|
||||
else //if (!strcmp(ch_ext, ".mdx") || !strcmp(ch_ext, ".m2"))
|
||||
{
|
||||
std::string fixedName;
|
||||
result = ExtractSingleModel(path, fixedName, failedPaths);
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
uint32 displayId = it->getUInt(0);
|
||||
uint32 path_length = strlen(name);
|
||||
fwrite(&displayId, sizeof(uint32), 1, model_list);
|
||||
fwrite(&path_length, sizeof(uint32), 1, model_list);
|
||||
fwrite(name, sizeof(char), path_length, model_list);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(model_list);
|
||||
|
||||
if (!failedPaths.empty())
|
||||
{
|
||||
printf("Warning: Some models could not be extracted, see below\n");
|
||||
for (StringSet::const_iterator itr = failedPaths.begin(); itr != failedPaths.end(); ++itr)
|
||||
printf("Could not find file of model %s\n", itr->c_str());
|
||||
printf("A few of these warnings are expected to happen, so be not alarmed!\n");
|
||||
}
|
||||
|
||||
printf("Done!\n");
|
||||
}
|
||||
85
src/tools/vmap-extractor/vmapextract/loadlib/loadlib.h
Normal file
85
src/tools/vmap-extractor/vmapextract/loadlib/loadlib.h
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#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
|
||||
209
src/tools/vmap-extractor/vmapextract/model.cpp
Normal file
209
src/tools/vmap-extractor/vmapextract/model.cpp
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "vmapexport.h"
|
||||
#include "model.h"
|
||||
#include "wmo.h"
|
||||
#include "mpqfile.h"
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
extern HANDLE WorldMpq;
|
||||
|
||||
Model::Model(std::string& filename) : filename(filename), vertices(0), indices(0)
|
||||
{
|
||||
}
|
||||
|
||||
bool Model::open(StringSet& failedPaths)
|
||||
{
|
||||
MPQFile f(WorldMpq, filename.c_str());
|
||||
|
||||
ok = !f.isEof();
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
f.close();
|
||||
failedPaths.insert(filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
_unload();
|
||||
|
||||
memcpy(&header, f.getBuffer(), sizeof(ModelHeader));
|
||||
if (header.nBoundingTriangles > 0)
|
||||
{
|
||||
f.seek(0);
|
||||
f.seekRelative(header.ofsBoundingVertices);
|
||||
vertices = new Vec3D[header.nBoundingVertices];
|
||||
f.read(vertices, header.nBoundingVertices * 12);
|
||||
for (uint32 i = 0; i < header.nBoundingVertices; i++)
|
||||
{
|
||||
vertices[i] = fixCoordSystem(vertices[i]);
|
||||
}
|
||||
f.seek(0);
|
||||
f.seekRelative(header.ofsBoundingTriangles);
|
||||
indices = new uint16[header.nBoundingTriangles];
|
||||
f.read(indices, header.nBoundingTriangles * 2);
|
||||
f.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//printf("not included %s\n", filename.c_str());
|
||||
f.close();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Model::ConvertToVMAPModel(const char* outfilename)
|
||||
{
|
||||
int N[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
FILE* output = fopen(outfilename, "wb");
|
||||
if (!output)
|
||||
{
|
||||
printf("Can't create the output file '%s'\n", outfilename);
|
||||
return false;
|
||||
}
|
||||
fwrite(szRawVMAPMagic, 8, 1, output);
|
||||
uint32 nVertices = 0;
|
||||
nVertices = header.nBoundingVertices;
|
||||
fwrite(&nVertices, sizeof(int), 1, output);
|
||||
uint32 nofgroups = 1;
|
||||
fwrite(&nofgroups, sizeof(uint32), 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);
|
||||
uint32 branches = 1;
|
||||
int wsize;
|
||||
wsize = sizeof(branches) + sizeof(uint32) * branches;
|
||||
fwrite(&wsize, sizeof(int), 1, output);
|
||||
fwrite(&branches, sizeof(branches), 1, output);
|
||||
uint32 nIndexes = 0;
|
||||
nIndexes = header.nBoundingTriangles;
|
||||
fwrite(&nIndexes, sizeof(uint32), 1, output);
|
||||
fwrite("INDX", 4, 1, output);
|
||||
wsize = sizeof(uint32) + sizeof(unsigned short) * nIndexes;
|
||||
fwrite(&wsize, sizeof(int), 1, output);
|
||||
fwrite(&nIndexes, sizeof(uint32), 1, output);
|
||||
if (nIndexes > 0)
|
||||
{
|
||||
fwrite(indices, sizeof(unsigned short), nIndexes, output);
|
||||
}
|
||||
fwrite("VERT", 4, 1, output);
|
||||
wsize = sizeof(int) + sizeof(float) * 3 * nVertices;
|
||||
fwrite(&wsize, sizeof(int), 1, output);
|
||||
fwrite(&nVertices, sizeof(int), 1, output);
|
||||
if (nVertices > 0)
|
||||
{
|
||||
for (uint32 vpos = 0; vpos < nVertices; ++vpos)
|
||||
{
|
||||
std::swap(vertices[vpos].y, vertices[vpos].z);
|
||||
}
|
||||
fwrite(vertices, sizeof(float) * 3, nVertices, output);
|
||||
}
|
||||
|
||||
fclose(output);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Vec3D fixCoordSystem(Vec3D v)
|
||||
{
|
||||
return Vec3D(v.x, v.z, -v.y);
|
||||
}
|
||||
|
||||
Vec3D fixCoordSystem2(Vec3D v)
|
||||
{
|
||||
return Vec3D(v.x, v.z, v.y);
|
||||
}
|
||||
|
||||
ModelInstance::ModelInstance(MPQFile& f, const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile)
|
||||
{
|
||||
float ff[3];
|
||||
f.read(&id, 4);
|
||||
f.read(ff, 12);
|
||||
pos = fixCoords(Vec3D(ff[0], ff[1], ff[2]));
|
||||
f.read(ff, 12);
|
||||
rot = Vec3D(ff[0], ff[1], ff[2]);
|
||||
f.read(&scale, 4);
|
||||
// scale factor - divide by 1024. blizzard devs must be on crack, why not just use a float?
|
||||
sc = scale / 1024.0f;
|
||||
|
||||
char tempname[512];
|
||||
sprintf(tempname, "%s/%s", szWorkDirWmo, ModelInstName);
|
||||
FILE* input;
|
||||
input = fopen(tempname, "r+b");
|
||||
|
||||
if (!input)
|
||||
{
|
||||
//printf("ModelInstance::ModelInstance couldn't open %s\n", tempname);
|
||||
return;
|
||||
}
|
||||
|
||||
fseek(input, 8, SEEK_SET); // get the correct no of vertices
|
||||
int nVertices;
|
||||
fread(&nVertices, sizeof(int), 1, input);
|
||||
fclose(input);
|
||||
|
||||
if (nVertices == 0)
|
||||
return;
|
||||
|
||||
uint16 adtId = 0;// not used for models
|
||||
uint32 flags = MOD_M2;
|
||||
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 realx2 = (int) ((float) pos.x / 533.333333f);
|
||||
int realy2 = (int) ((float) pos.z / 533.333333f);
|
||||
|
||||
fprintf(pDirfile,"%s/%s %f,%f,%f_%f,%f,%f %f %d %d %d,%d %d\n",
|
||||
MapName,
|
||||
ModelInstName,
|
||||
(float) pos.x, (float) pos.y, (float) pos.z,
|
||||
(float) rot.x, (float) rot.y, (float) rot.z,
|
||||
sc,
|
||||
nVertices,
|
||||
realx1, realy1,
|
||||
realx2, realy2
|
||||
); */
|
||||
}
|
||||
83
src/tools/vmap-extractor/vmapextract/model.h
Normal file
83
src/tools/vmap-extractor/vmapextract/model.h
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef MODEL_H
|
||||
#define MODEL_H
|
||||
|
||||
#include "vec3d.h"
|
||||
//#include "mpq.h"
|
||||
#include "modelheaders.h"
|
||||
#include <vector>
|
||||
#include "vmapexport.h"
|
||||
|
||||
class WMOInstance;
|
||||
class MPQFile;
|
||||
|
||||
Vec3D fixCoordSystem(Vec3D v);
|
||||
|
||||
class Model
|
||||
{
|
||||
public:
|
||||
ModelHeader header;
|
||||
uint32 offsBB_vertices, offsBB_indices;
|
||||
Vec3D* BB_vertices, *vertices;
|
||||
uint16* BB_indices, *indices;
|
||||
size_t nIndices;
|
||||
|
||||
bool open(StringSet& failedPaths);
|
||||
bool ConvertToVMAPModel(const char* outfilename);
|
||||
|
||||
bool ok;
|
||||
|
||||
Model(std::string& filename);
|
||||
~Model() {_unload();}
|
||||
|
||||
private:
|
||||
void _unload()
|
||||
{
|
||||
delete[] vertices;
|
||||
delete[] indices;
|
||||
vertices = NULL;
|
||||
indices = NULL;
|
||||
}
|
||||
std::string filename;
|
||||
char outfilename;
|
||||
};
|
||||
|
||||
class ModelInstance
|
||||
{
|
||||
public:
|
||||
Model* model;
|
||||
|
||||
uint32 id;
|
||||
Vec3D pos, rot;
|
||||
unsigned int d1, scale;
|
||||
float w, sc;
|
||||
|
||||
ModelInstance() {}
|
||||
ModelInstance(MPQFile& f, const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
100
src/tools/vmap-extractor/vmapextract/modelheaders.h
Normal file
100
src/tools/vmap-extractor/vmapextract/modelheaders.h
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef MODELHEADERS_H
|
||||
#define MODELHEADERS_H
|
||||
|
||||
#include "mpqfile.h" // integer typedefs
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
struct ModelHeader
|
||||
{
|
||||
char id[4];
|
||||
uint8 version[4];
|
||||
uint32 nameLength;
|
||||
uint32 nameOfs;
|
||||
uint32 type;
|
||||
uint32 nGlobalSequences;
|
||||
uint32 ofsGlobalSequences;
|
||||
uint32 nAnimations;
|
||||
uint32 ofsAnimations;
|
||||
uint32 nAnimationLookup;
|
||||
uint32 ofsAnimationLookup;
|
||||
uint32 nBones;
|
||||
uint32 ofsBones;
|
||||
uint32 nKeyBoneLookup;
|
||||
uint32 ofsKeyBoneLookup;
|
||||
uint32 nVertices;
|
||||
uint32 ofsVertices;
|
||||
uint32 nViews;
|
||||
uint32 nColors;
|
||||
uint32 ofsColors;
|
||||
uint32 nTextures;
|
||||
uint32 ofsTextures;
|
||||
uint32 nTransparency;
|
||||
uint32 ofsTransparency;
|
||||
uint32 nTextureanimations;
|
||||
uint32 ofsTextureanimations;
|
||||
uint32 nTexReplace;
|
||||
uint32 ofsTexReplace;
|
||||
uint32 nRenderFlags;
|
||||
uint32 ofsRenderFlags;
|
||||
uint32 nBoneLookupTable;
|
||||
uint32 ofsBoneLookupTable;
|
||||
uint32 nTexLookup;
|
||||
uint32 ofsTexLookup;
|
||||
uint32 nTexUnits;
|
||||
uint32 ofsTexUnits;
|
||||
uint32 nTransLookup;
|
||||
uint32 ofsTransLookup;
|
||||
uint32 nTexAnimLookup;
|
||||
uint32 ofsTexAnimLookup;
|
||||
float floats[14];
|
||||
uint32 nBoundingTriangles;
|
||||
uint32 ofsBoundingTriangles;
|
||||
uint32 nBoundingVertices;
|
||||
uint32 ofsBoundingVertices;
|
||||
uint32 nBoundingNormals;
|
||||
uint32 ofsBoundingNormals;
|
||||
uint32 nAttachments;
|
||||
uint32 ofsAttachments;
|
||||
uint32 nAttachLookup;
|
||||
uint32 ofsAttachLookup;
|
||||
uint32 nAttachments_2;
|
||||
uint32 ofsAttachments_2;
|
||||
uint32 nLights;
|
||||
uint32 ofsLights;
|
||||
uint32 nCameras;
|
||||
uint32 ofsCameras;
|
||||
uint32 nCameraLookup;
|
||||
uint32 ofsCameraLookup;
|
||||
uint32 nRibbonEmitters;
|
||||
uint32 ofsRibbonEmitters;
|
||||
uint32 nParticleEmitters;
|
||||
uint32 ofsParticleEmitters;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
89
src/tools/vmap-extractor/vmapextract/mpqfile.cpp
Normal file
89
src/tools/vmap-extractor/vmapextract/mpqfile.cpp
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
#include "mpqfile.h"
|
||||
#include <deque>
|
||||
#include <cstdio>
|
||||
#include "StormLib.h"
|
||||
|
||||
MPQFile::MPQFile(HANDLE mpq, const char* filename):
|
||||
eof(false),
|
||||
buffer(0),
|
||||
pointer(0),
|
||||
size(0)
|
||||
{
|
||||
HANDLE file;
|
||||
if (!SFileOpenFileEx(mpq, filename, SFILE_OPEN_PATCHED_FILE, &file))
|
||||
{
|
||||
int error = GetLastError();
|
||||
if ( error != ERROR_FILE_NOT_FOUND )
|
||||
fprintf(stderr, "Can't open %s, err=%u!\n", filename, GetLastError());
|
||||
eof = true;
|
||||
return;
|
||||
}
|
||||
|
||||
DWORD hi = 0;
|
||||
size = SFileGetFileSize(file, &hi);
|
||||
|
||||
if (hi)
|
||||
{
|
||||
fprintf(stderr, "Can't open %s, size[hi] = %u!\n", filename, (uint32)hi);
|
||||
SFileCloseFile(file);
|
||||
eof = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (size <= 1)
|
||||
{
|
||||
fprintf(stderr, "Can't open %s, size = %u!\n", filename, size);
|
||||
SFileCloseFile(file);
|
||||
eof = true;
|
||||
return;
|
||||
}
|
||||
|
||||
DWORD read = 0;
|
||||
buffer = new char[size];
|
||||
if (!SFileReadFile(file, buffer, size, &read, NULL) || size != read)
|
||||
{
|
||||
fprintf(stderr, "Can't read %s, size=%u read=%u!\n", filename, size, read);
|
||||
SFileCloseFile(file);
|
||||
eof = true;
|
||||
return;
|
||||
}
|
||||
|
||||
SFileCloseFile(file);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
85
src/tools/vmap-extractor/vmapextract/mpqfile.h
Normal file
85
src/tools/vmap-extractor/vmapextract/mpqfile.h
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS // fuck the police^Wwarnings
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#ifndef MPQ_H
|
||||
#define MPQ_H
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <deque>
|
||||
#include "StormLib.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h> // mainly only HANDLE definition is required
|
||||
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;
|
||||
typedef void* HANDLE;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
class MPQFile
|
||||
{
|
||||
//MPQHANDLE handle;
|
||||
bool eof;
|
||||
char* buffer;
|
||||
size_t pointer, size;
|
||||
|
||||
// disable copying
|
||||
MPQFile(const MPQFile& f);
|
||||
void operator=(const MPQFile& f);
|
||||
|
||||
public:
|
||||
MPQFile(HANDLE mpq, 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
|
||||
256
src/tools/vmap-extractor/vmapextract/vec3d.h
Normal file
256
src/tools/vmap-extractor/vmapextract/vec3d.h
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef VEC3D_H
|
||||
#define VEC3D_H
|
||||
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
||||
class Vec3D
|
||||
{
|
||||
public:
|
||||
float x, y, z;
|
||||
|
||||
Vec3D(float x0 = 0.0f, float y0 = 0.0f, float z0 = 0.0f) : x(x0), y(y0), z(z0) {}
|
||||
|
||||
Vec3D(const Vec3D& v) : x(v.x), y(v.y), z(v.z) {}
|
||||
|
||||
Vec3D& operator= (const Vec3D& v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
z = v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec3D operator+ (const Vec3D& v) const
|
||||
{
|
||||
Vec3D r(x + v.x, y + v.y, z + v.z);
|
||||
return r;
|
||||
}
|
||||
|
||||
Vec3D operator- (const Vec3D& v) const
|
||||
{
|
||||
Vec3D r(x - v.x, y - v.y, z - v.z);
|
||||
return r;
|
||||
}
|
||||
|
||||
float operator* (const Vec3D& v) const
|
||||
{
|
||||
return x * v.x + y * v.y + z * v.z;
|
||||
}
|
||||
|
||||
Vec3D operator* (float d) const
|
||||
{
|
||||
Vec3D r(x * d, y * d, z * d);
|
||||
return r;
|
||||
}
|
||||
|
||||
friend Vec3D operator* (float d, const Vec3D& v)
|
||||
{
|
||||
return v * d;
|
||||
}
|
||||
|
||||
Vec3D operator% (const Vec3D& v) const
|
||||
{
|
||||
Vec3D r(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x);
|
||||
return r;
|
||||
}
|
||||
|
||||
Vec3D& operator+= (const Vec3D& v)
|
||||
{
|
||||
x += v.x;
|
||||
y += v.y;
|
||||
z += v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec3D& operator-= (const Vec3D& v)
|
||||
{
|
||||
x -= v.x;
|
||||
y -= v.y;
|
||||
z -= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec3D& operator*= (float d)
|
||||
{
|
||||
x *= d;
|
||||
y *= d;
|
||||
z *= d;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float lengthSquared() const
|
||||
{
|
||||
return x * x + y * y + z * z;
|
||||
}
|
||||
|
||||
float length() const
|
||||
{
|
||||
return sqrt(x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
Vec3D& normalize()
|
||||
{
|
||||
this->operator*= (1.0f / length());
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec3D operator~() const
|
||||
{
|
||||
Vec3D r(*this);
|
||||
r.normalize();
|
||||
return r;
|
||||
}
|
||||
|
||||
friend std::istream& operator>>(std::istream& in, Vec3D& v)
|
||||
{
|
||||
in >> v.x >> v.y >> v.z;
|
||||
return in;
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& out, const Vec3D& v)
|
||||
{
|
||||
out << v.x << " " << v.y << " " << v.z;
|
||||
return out;
|
||||
}
|
||||
|
||||
operator float* ()
|
||||
{
|
||||
return (float*)this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class Vec2D
|
||||
{
|
||||
public:
|
||||
float x, y;
|
||||
|
||||
Vec2D(float x0 = 0.0f, float y0 = 0.0f) : x(x0), y(y0) {}
|
||||
|
||||
Vec2D(const Vec2D& v) : x(v.x), y(v.y) {}
|
||||
|
||||
Vec2D& operator= (const Vec2D& v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec2D operator+ (const Vec2D& v) const
|
||||
{
|
||||
Vec2D r(x + v.x, y + v.y);
|
||||
return r;
|
||||
}
|
||||
|
||||
Vec2D operator- (const Vec2D& v) const
|
||||
{
|
||||
Vec2D r(x - v.x, y - v.y);
|
||||
return r;
|
||||
}
|
||||
|
||||
float operator* (const Vec2D& v) const
|
||||
{
|
||||
return x * v.x + y * v.y;
|
||||
}
|
||||
|
||||
Vec2D operator* (float d) const
|
||||
{
|
||||
Vec2D r(x * d, y * d);
|
||||
return r;
|
||||
}
|
||||
|
||||
friend Vec2D operator* (float d, const Vec2D& v)
|
||||
{
|
||||
return v * d;
|
||||
}
|
||||
|
||||
Vec2D& operator+= (const Vec2D& v)
|
||||
{
|
||||
x += v.x;
|
||||
y += v.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec2D& operator-= (const Vec2D& v)
|
||||
{
|
||||
x -= v.x;
|
||||
y -= v.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec2D& operator*= (float d)
|
||||
{
|
||||
x *= d;
|
||||
y *= d;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float lengthSquared() const
|
||||
{
|
||||
return x * x + y * y;
|
||||
}
|
||||
|
||||
float length() const
|
||||
{
|
||||
return sqrt(x * x + y * y);
|
||||
}
|
||||
|
||||
Vec2D& normalize()
|
||||
{
|
||||
this->operator*= (1.0f / length());
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vec2D operator~() const
|
||||
{
|
||||
Vec2D r(*this);
|
||||
r.normalize();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
friend std::istream& operator>>(std::istream& in, Vec2D& v)
|
||||
{
|
||||
in >> v.x >> v.y;
|
||||
return in;
|
||||
}
|
||||
|
||||
operator float* ()
|
||||
{
|
||||
return (float*)this;
|
||||
}
|
||||
};
|
||||
|
||||
inline void rotate(float x0, float y0, float* x, float* y, float angle)
|
||||
{
|
||||
float xa = *x - x0, ya = *y - y0;
|
||||
*x = xa * cosf(angle) - ya * sinf(angle) + x0;
|
||||
*y = xa * sinf(angle) + ya * cosf(angle) + y0;
|
||||
}
|
||||
|
||||
#endif
|
||||
659
src/tools/vmap-extractor/vmapextract/vmapexport.cpp
Normal file
659
src/tools/vmap-extractor/vmapextract/vmapexport.cpp
Normal file
|
|
@ -0,0 +1,659 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined WIN32
|
||||
#include <Windows.h>
|
||||
#include <sys/stat.h>
|
||||
#include <direct.h>
|
||||
#define mkdir _mkdir
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
//#pragma warning(disable : 4505)
|
||||
//#pragma comment(lib, "Winmm.lib")
|
||||
|
||||
#include <map>
|
||||
|
||||
//From Extractor
|
||||
#include "adtfile.h"
|
||||
#include "wdtfile.h"
|
||||
#include "dbcfile.h"
|
||||
#include "wmo.h"
|
||||
#include "mpqfile.h"
|
||||
|
||||
#include "vmapexport.h"
|
||||
|
||||
#include "vmapexport.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Defines
|
||||
|
||||
#define MPQ_BLOCK_SIZE 0x1000
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
HANDLE WorldMpq = NULL;
|
||||
HANDLE LocaleMpq = NULL;
|
||||
|
||||
uint32 CONF_TargetBuild = 15595; // 4.3.4.15595
|
||||
|
||||
// List MPQ for extract maps from
|
||||
char const* CONF_mpq_list[] =
|
||||
{
|
||||
"world.MPQ",
|
||||
"art.MPQ",
|
||||
"expansion1.MPQ",
|
||||
"expansion2.MPQ",
|
||||
"expansion3.MPQ",
|
||||
"world2.MPQ",
|
||||
};
|
||||
|
||||
uint32 const Builds[] = {13164, 13205, 13287, 13329, 13596, 13623, 13914, 14007, 14333, 14480, 14545, 15005, 15050, 15211, 15354, 15595, 0};
|
||||
#define LAST_DBC_IN_DATA_BUILD 13623 // after this build mpqs with dbc are back to locale folder
|
||||
|
||||
char* const Locales[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU"};
|
||||
TCHAR* const LocalesT[] =
|
||||
{
|
||||
_T("enGB"), _T("enUS"),
|
||||
_T("deDE"), _T("esES"),
|
||||
_T("frFR"), _T("koKR"),
|
||||
_T("zhCN"), _T("zhTW"),
|
||||
_T("enCN"), _T("enTW"),
|
||||
_T("esMX"), _T("ruRU"),
|
||||
};
|
||||
|
||||
#define LOCALES_COUNT 12
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
unsigned int id;
|
||||
} map_id;
|
||||
|
||||
map_id* map_ids;
|
||||
uint16* LiqType = 0;
|
||||
uint32 map_count;
|
||||
char output_path[128] = ".";
|
||||
char input_path[1024] = ".";
|
||||
bool preciseVectorData = false;
|
||||
|
||||
// Constants
|
||||
|
||||
//static const char * szWorkDirMaps = ".\\Maps";
|
||||
const char* szWorkDirWmo = "./Buildings";
|
||||
const char* szRawVMAPMagic = "VMAPc04";
|
||||
|
||||
bool LoadLocaleMPQFile(int locale)
|
||||
{
|
||||
TCHAR buff[512];
|
||||
memset(buff, 0, sizeof(buff));
|
||||
_stprintf(buff, _T("%s/Data/%s/locale-%s.MPQ"), input_path, LocalesT[locale], LocalesT[locale]);
|
||||
if (!SFileOpenArchive(buff, 0, MPQ_OPEN_READ_ONLY, &LocaleMpq))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
_tprintf(_T("Cannot open archive %s\n"), buff);
|
||||
return false;
|
||||
}
|
||||
|
||||
char const* prefix = NULL;
|
||||
for (int i = 0; Builds[i] && Builds[i] <= CONF_TargetBuild; ++i)
|
||||
{
|
||||
memset(buff, 0, sizeof(buff));
|
||||
if (Builds[i] > LAST_DBC_IN_DATA_BUILD)
|
||||
{
|
||||
prefix = "";
|
||||
_stprintf(buff, _T("%s/Data/%s/wow-update-%s-%u.MPQ"), input_path, LocalesT[locale], LocalesT[locale], Builds[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = Locales[locale];
|
||||
_stprintf(buff, _T("%s/Data/wow-update-%u.MPQ"), input_path, Builds[i]);
|
||||
}
|
||||
|
||||
if (!SFileOpenPatchArchive(LocaleMpq, buff, prefix, 0))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
_tprintf(_T("Cannot open patch archive %s\n"), buff);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LoadCommonMPQFiles(uint32 build)
|
||||
{
|
||||
TCHAR filename[512];
|
||||
_stprintf(filename, _T("%s/Data/world.MPQ"), input_path);
|
||||
if (!SFileOpenArchive(filename, 0, MPQ_OPEN_READ_ONLY, &WorldMpq))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
_tprintf(_T("Cannot open archive %s\n"), filename);
|
||||
return;
|
||||
}
|
||||
|
||||
int count = sizeof(CONF_mpq_list) / sizeof(char*);
|
||||
for (int i = 1; i < count; ++i)
|
||||
{
|
||||
if (build < 15211 && !strcmp("world2.MPQ", CONF_mpq_list[i])) // 4.3.2 and higher MPQ
|
||||
continue;
|
||||
|
||||
_stprintf(filename, _T("%s/Data/%s"), input_path, CONF_mpq_list[i]);
|
||||
if (!SFileOpenPatchArchive(WorldMpq, filename, "", 0))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
_tprintf(_T("Cannot open archive %s\n"), filename);
|
||||
else
|
||||
_tprintf(_T("Not found %s\n"), filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
_tprintf(_T("Loaded %s\n"), filename);
|
||||
|
||||
bool found = false;
|
||||
int count = 0;
|
||||
SFILE_FIND_DATA data;
|
||||
HANDLE find = SFileFindFirstFile(WorldMpq, "*.*", &data, NULL);
|
||||
if (find != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
++count;
|
||||
if (data.dwFileFlags & MPQ_FILE_PATCH_FILE)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (SFileFindNextFile(find, &data));
|
||||
}
|
||||
SFileFindClose(find);
|
||||
printf("Scanned %d files, found patch = %d\n", count, found);
|
||||
}
|
||||
}
|
||||
|
||||
char const* prefix = NULL;
|
||||
for (int i = 0; Builds[i] && Builds[i] <= CONF_TargetBuild; ++i)
|
||||
{
|
||||
memset(filename, 0, sizeof(filename));
|
||||
if (Builds[i] > LAST_DBC_IN_DATA_BUILD)
|
||||
{
|
||||
prefix = "";
|
||||
_stprintf(filename, _T("%s/Data/wow-update-base-%u.MPQ"), input_path, Builds[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = "base";
|
||||
_stprintf(filename, _T("%s/Data/wow-update-%u.MPQ"), input_path, Builds[i]);
|
||||
}
|
||||
|
||||
if (!SFileOpenPatchArchive(WorldMpq, filename, prefix, 0))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
_tprintf(_T("Cannot open patch archive %s\n"), filename);
|
||||
else
|
||||
_tprintf(_T("Not found %s\n"), filename);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_tprintf(_T("Loaded %s\n"), filename);
|
||||
|
||||
|
||||
bool found = false;
|
||||
int count = 0;
|
||||
SFILE_FIND_DATA data;
|
||||
HANDLE find = SFileFindFirstFile(WorldMpq, "*.*", &data, NULL);
|
||||
if (find != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
++count;
|
||||
if (data.dwFileFlags & MPQ_FILE_PATCH_FILE)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (SFileFindNextFile(find, &data));
|
||||
}
|
||||
SFileFindClose(find);
|
||||
printf("Scanned %d files, found patch = %d\n", count, found);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Local testing functions
|
||||
|
||||
bool FileExists(const char* file)
|
||||
{
|
||||
if (FILE* n = fopen(file, "rb"))
|
||||
{
|
||||
fclose(n);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void strToLower(char* str)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
*str = tolower(*str);
|
||||
++str;
|
||||
}
|
||||
}
|
||||
|
||||
// copied from contrib/extractor/System.cpp
|
||||
void ReadLiquidTypeTableDBC()
|
||||
{
|
||||
printf("Read LiquidType.dbc file...");
|
||||
|
||||
DBCFile dbc(LocaleMpq, "DBFilesClient/LiquidType.dbc");
|
||||
if (!dbc.open())
|
||||
{
|
||||
printf("Fatal error: Invalid LiquidType.dbc file format!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
size_t LiqType_count = dbc.getRecordCount();
|
||||
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));
|
||||
|
||||
for (uint32 x = 0; x < LiqType_count; ++x)
|
||||
LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
|
||||
|
||||
printf("Done! (%u LiqTypes loaded)\n", (unsigned int)LiqType_count);
|
||||
}
|
||||
|
||||
bool ExtractWmo()
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
//const char* ParsArchiveNames[] = {"patch-2.MPQ", "patch.MPQ", "common.MPQ", "expansion.MPQ"};
|
||||
|
||||
SFILE_FIND_DATA data;
|
||||
HANDLE find = SFileFindFirstFile(WorldMpq, "*.wmo", &data, NULL);
|
||||
if (find != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
std::string str = data.cFileName;
|
||||
//printf("Extracting wmo %s\n", str.c_str());
|
||||
success |= ExtractSingleWmo(str);
|
||||
}
|
||||
while (SFileFindNextFile(find, &data));
|
||||
}
|
||||
SFileFindClose(find);
|
||||
|
||||
if (success)
|
||||
printf("\nExtract wmo complete (No (fatal) errors)\n");
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool ExtractSingleWmo(std::string& fname)
|
||||
{
|
||||
// Copy files from archive
|
||||
|
||||
char szLocalFile[1024];
|
||||
const char* plain_name = GetPlainName(fname.c_str());
|
||||
sprintf(szLocalFile, "%s/%s", szWorkDirWmo, plain_name);
|
||||
fixnamen(szLocalFile, strlen(szLocalFile));
|
||||
|
||||
if (FileExists(szLocalFile))
|
||||
return true;
|
||||
|
||||
int p = 0;
|
||||
//Select root wmo files
|
||||
const char* rchr = strrchr(plain_name, '_');
|
||||
if (rchr != NULL)
|
||||
{
|
||||
char cpy[4];
|
||||
strncpy((char*)cpy, rchr, 4);
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
int m = cpy[i];
|
||||
if (isdigit(m))
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
if (p == 3)
|
||||
return true;
|
||||
|
||||
bool file_ok = true;
|
||||
std::cout << "Extracting " << fname << std::endl;
|
||||
WMORoot froot(fname);
|
||||
if (!froot.open())
|
||||
{
|
||||
printf("Couldn't open RootWmo!!!\n");
|
||||
return true;
|
||||
}
|
||||
FILE* output = fopen(szLocalFile, "wb");
|
||||
if (!output)
|
||||
{
|
||||
printf("couldn't open %s for writing!\n", szLocalFile);
|
||||
return false;
|
||||
}
|
||||
froot.ConvertToVMAPRootWmo(output);
|
||||
int Wmo_nVertices = 0;
|
||||
//printf("root has %d groups\n", froot->nGroups);
|
||||
if (froot.nGroups != 0)
|
||||
{
|
||||
for (uint32 i = 0; i < froot.nGroups; ++i)
|
||||
{
|
||||
char temp[1024];
|
||||
strcpy(temp, fname.c_str());
|
||||
temp[fname.length() - 4] = 0;
|
||||
char groupFileName[1024];
|
||||
sprintf(groupFileName, "%s_%03d.wmo", temp, i);
|
||||
//printf("Trying to open groupfile %s\n",groupFileName);
|
||||
|
||||
string s = groupFileName;
|
||||
WMOGroup fgroup(s);
|
||||
if (!fgroup.open())
|
||||
{
|
||||
printf("Could not open all Group file for: %s\n", plain_name);
|
||||
file_ok = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Wmo_nVertices += fgroup.ConvertToVMAPGroupWmo(output, &froot, preciseVectorData);
|
||||
}
|
||||
}
|
||||
|
||||
fseek(output, 8, SEEK_SET); // store the correct no of vertices
|
||||
fwrite(&Wmo_nVertices, sizeof(int), 1, output);
|
||||
fclose(output);
|
||||
|
||||
// Delete the extracted file in the case of an error
|
||||
if (!file_ok)
|
||||
remove(szLocalFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ParsMapFiles()
|
||||
{
|
||||
char fn[512];
|
||||
//char id_filename[64];
|
||||
char id[10];
|
||||
StringSet failedPaths;
|
||||
for (unsigned int i = 0; i < map_count; ++i)
|
||||
{
|
||||
sprintf(id, "%03u", map_ids[i].id);
|
||||
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(id, map_ids[i].id))
|
||||
{
|
||||
printf("Processing Map %u\n[", map_ids[i].id);
|
||||
for (int x = 0; x < 64; ++x)
|
||||
{
|
||||
for (int y = 0; y < 64; ++y)
|
||||
{
|
||||
if (ADTFile* ADT = WDT.GetMap(x, y))
|
||||
{
|
||||
//sprintf(id_filename,"%02u %02u %03u",x,y,map_ids[i].id);//!!!!!!!!!
|
||||
ADT->init(map_ids[i].id, x, y, failedPaths);
|
||||
delete ADT;
|
||||
}
|
||||
}
|
||||
printf("#");
|
||||
fflush(stdout);
|
||||
}
|
||||
printf("]\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (!failedPaths.empty())
|
||||
{
|
||||
printf("Warning: Some models could not be extracted, see below\n");
|
||||
for (StringSet::const_iterator itr = failedPaths.begin(); itr != failedPaths.end(); ++itr)
|
||||
printf("Could not find file of model %s\n", itr->c_str());
|
||||
printf("A few not found models can be expected and are not alarming.\n");
|
||||
}
|
||||
}
|
||||
|
||||
void getGamePath()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
strcpy(input_path, "Data\\");
|
||||
#else
|
||||
strcpy(input_path, "Data/");
|
||||
#endif
|
||||
}
|
||||
|
||||
bool scan_patches(char* scanmatch, std::vector<std::string>& pArchiveNames)
|
||||
{
|
||||
int i;
|
||||
char path[512];
|
||||
|
||||
for (i = 1; i <= 99; i++)
|
||||
{
|
||||
if (i != 1)
|
||||
{
|
||||
sprintf(path, "%s-%d.MPQ", scanmatch, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(path, "%s.MPQ", scanmatch);
|
||||
}
|
||||
#ifdef __linux__
|
||||
if (FILE* h = fopen64(path, "rb"))
|
||||
#else
|
||||
if (FILE* h = fopen(path, "rb"))
|
||||
#endif
|
||||
{
|
||||
fclose(h);
|
||||
//matches.push_back(path);
|
||||
pArchiveNames.push_back(path);
|
||||
}
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool processArgv(int argc, char** argv)
|
||||
{
|
||||
bool result = true;
|
||||
bool hasInputPathParam = false;
|
||||
bool preciseVectorData = false;
|
||||
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
if (strcmp("-s", argv[i]) == 0)
|
||||
{
|
||||
preciseVectorData = false;
|
||||
}
|
||||
else if (strcmp("-d", argv[i]) == 0)
|
||||
{
|
||||
if ((i + 1) < argc)
|
||||
{
|
||||
hasInputPathParam = true;
|
||||
strcpy(input_path, argv[i + 1]);
|
||||
if (input_path[strlen(input_path) - 1] != '\\' || input_path[strlen(input_path) - 1] != '/')
|
||||
strcat(input_path, "/");
|
||||
++i;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
else if (strcmp("-?", argv[1]) == 0)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
else if (strcmp("-l", argv[i]) == 0)
|
||||
{
|
||||
preciseVectorData = true;
|
||||
}
|
||||
else if (strcmp("-b", argv[i]) == 0)
|
||||
{
|
||||
if (i + 1 < argc) // all ok
|
||||
CONF_TargetBuild = atoi(argv[i++ + 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
printf("Extract for %s.\n", szRawVMAPMagic);
|
||||
printf("%s [-?][-s][-l][-d <path>]\n", argv[0]);
|
||||
printf(" -s : (default) small size (data size optimization), ~500MB less vmap data.\n");
|
||||
printf(" -l : large size, ~500MB more vmap data. (might contain more details)\n");
|
||||
printf(" -d <path>: Path to the vector data source folder.\n");
|
||||
printf(" -b : target build (default %u)", CONF_TargetBuild);
|
||||
printf(" -? : This message.\n");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
// Main
|
||||
//
|
||||
// The program must be run with two command line arguments
|
||||
//
|
||||
// Arg1 - The source MPQ name (for testing reading and file find)
|
||||
// Arg2 - Listfile name
|
||||
//
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
// Use command line arguments, when some
|
||||
if (!processArgv(argc, argv))
|
||||
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 for %s. Beginning work ....\n", szRawVMAPMagic);
|
||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
// Create the working directory
|
||||
if (mkdir(szWorkDirWmo
|
||||
#ifdef __linux__
|
||||
, 0711
|
||||
#endif
|
||||
))
|
||||
success = (errno == EEXIST);
|
||||
|
||||
LoadCommonMPQFiles(CONF_TargetBuild);
|
||||
|
||||
int FirstLocale = -1;
|
||||
|
||||
for (int i = 0; i < LOCALES_COUNT; ++i)
|
||||
{
|
||||
//Open MPQs
|
||||
if (!LoadLocaleMPQFile(i))
|
||||
{
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
printf("Unable to load %s locale archives!\n", Locales[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("Detected and using locale locale: %s\n", Locales[i]);
|
||||
break;
|
||||
}
|
||||
ReadLiquidTypeTableDBC();
|
||||
|
||||
// extract data
|
||||
if (success)
|
||||
success = ExtractWmo();
|
||||
|
||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
//map.dbc
|
||||
if (success)
|
||||
{
|
||||
DBCFile* dbc = new DBCFile(LocaleMpq, "DBFilesClient\\Map.dbc");
|
||||
if (!dbc->open())
|
||||
{
|
||||
delete dbc;
|
||||
printf("FATAL ERROR: Map.dbc not found in data file.\n");
|
||||
return 1;
|
||||
}
|
||||
map_count = dbc->getRecordCount();
|
||||
map_ids = new map_id[map_count];
|
||||
for (unsigned int x = 0; x < map_count; ++x)
|
||||
{
|
||||
map_ids[x].id = dbc->getRecord(x).getUInt(0);
|
||||
strcpy(map_ids[x].name, dbc->getRecord(x).getString(1));
|
||||
printf("Map - %s\n", map_ids[x].name);
|
||||
}
|
||||
|
||||
|
||||
delete dbc;
|
||||
ParsMapFiles();
|
||||
delete [] map_ids;
|
||||
//nError = ERROR_SUCCESS;
|
||||
// Extract models, listed in DameObjectDisplayInfo.dbc
|
||||
ExtractGameobjectModels();
|
||||
}
|
||||
|
||||
SFileCloseArchive(LocaleMpq);
|
||||
SFileCloseArchive(WorldMpq);
|
||||
|
||||
printf("\n");
|
||||
if (!success)
|
||||
{
|
||||
printf("ERROR: Extract for %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n", szRawVMAPMagic, preciseVectorData);
|
||||
getchar();
|
||||
}
|
||||
|
||||
printf("Extract for %s. Work complete. No errors.\n", szRawVMAPMagic);
|
||||
delete [] LiqType;
|
||||
return 0;
|
||||
}
|
||||
56
src/tools/vmap-extractor/vmapextract/vmapexport.h
Normal file
56
src/tools/vmap-extractor/vmapextract/vmapexport.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef VMAPEXPORT_H
|
||||
#define VMAPEXPORT_H
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
typedef std::set<std::string> StringSet;
|
||||
|
||||
enum ModelFlags
|
||||
{
|
||||
MOD_M2 = 1,
|
||||
MOD_WORLDSPAWN = 1 << 1,
|
||||
MOD_HAS_BOUND = 1 << 2
|
||||
};
|
||||
|
||||
extern const char* szWorkDirWmo;
|
||||
extern const char* szRawVMAPMagic; // vmap magic string for extracted raw vmap data
|
||||
|
||||
bool FileExists(const char* file);
|
||||
void strToLower(char* str);
|
||||
|
||||
bool ExtractSingleWmo(std::string& fname);
|
||||
|
||||
/* @param origPath = original path of the model, cleaned with fixnamen and fixname2
|
||||
* @param fixedName = will store the translated name (if changed)
|
||||
* @param failedPaths = Set to collect errors
|
||||
*/
|
||||
bool ExtractSingleModel(std::string& origPath, std::string& fixedName, StringSet& failedPaths);
|
||||
|
||||
void ExtractGameobjectModels();
|
||||
|
||||
#endif
|
||||
143
src/tools/vmap-extractor/vmapextract/wdtfile.cpp
Normal file
143
src/tools/vmap-extractor/vmapextract/wdtfile.cpp
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include "vmapexport.h"
|
||||
#include "wdtfile.h"
|
||||
#include "adtfile.h"
|
||||
#include <cstdio>
|
||||
|
||||
char* wdtGetPlainName(char* FileName)
|
||||
{
|
||||
char* szTemp;
|
||||
|
||||
if ((szTemp = strrchr(FileName, '\\')) != NULL)
|
||||
FileName = szTemp + 1;
|
||||
return FileName;
|
||||
}
|
||||
|
||||
extern HANDLE WorldMpq;
|
||||
|
||||
WDTFile::WDTFile(char* file_name, char* file_name1): WDT(WorldMpq, file_name)
|
||||
{
|
||||
filename.append(file_name1, strlen(file_name1));
|
||||
}
|
||||
|
||||
bool WDTFile::init(char* map_id, unsigned int mapID)
|
||||
{
|
||||
if (WDT.isEof())
|
||||
{
|
||||
//printf("Can't find WDT file.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
char fourcc[5];
|
||||
uint32 size;
|
||||
|
||||
std::string dirname = std::string(szWorkDirWmo) + "/dir_bin";
|
||||
FILE* dirfile;
|
||||
dirfile = fopen(dirname.c_str(), "ab");
|
||||
if (!dirfile)
|
||||
{
|
||||
printf("Can't open dirfile!'%s'\n", dirname.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
while (!WDT.isEof())
|
||||
{
|
||||
WDT.read(fourcc, 4);
|
||||
WDT.read(&size, 4);
|
||||
|
||||
flipcc(fourcc);
|
||||
fourcc[4] = 0;
|
||||
|
||||
size_t nextpos = WDT.getPos() + size;
|
||||
|
||||
if (!strcmp(fourcc, "MAIN"))
|
||||
{
|
||||
}
|
||||
if (!strcmp(fourcc, "MWMO"))
|
||||
{
|
||||
// global map objects
|
||||
if (size)
|
||||
{
|
||||
char* buf = new char[size];
|
||||
WDT.read(buf, size);
|
||||
char* p = buf;
|
||||
int q = 0;
|
||||
gWmoInstansName = new string[size];
|
||||
while (p < buf + size)
|
||||
{
|
||||
string path(p);
|
||||
char* s = wdtGetPlainName(p);
|
||||
fixnamen(s, strlen(s));
|
||||
p = p + strlen(p) + 1;
|
||||
gWmoInstansName[q++] = s;
|
||||
}
|
||||
delete[] buf;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(fourcc, "MODF"))
|
||||
{
|
||||
// global wmo instance data
|
||||
if (size)
|
||||
{
|
||||
gnWMO = (int)size / 64;
|
||||
string gWMO_mapname;
|
||||
string fake_mapname;
|
||||
fake_mapname = "65 65 ";
|
||||
//gWMO_mapname = fake_mapname + filename;
|
||||
gWMO_mapname = fake_mapname + std::string(map_id);
|
||||
for (int i = 0; i < gnWMO; ++i)
|
||||
{
|
||||
int id;
|
||||
WDT.read(&id, 4);
|
||||
WMOInstance inst(WDT, gWmoInstansName[id].c_str(), mapID, 65, 65, dirfile);
|
||||
}
|
||||
delete[] gWmoInstansName;
|
||||
}
|
||||
}
|
||||
WDT.seek((int)nextpos);
|
||||
}
|
||||
|
||||
WDT.close();
|
||||
fclose(dirfile);
|
||||
return true;
|
||||
}
|
||||
|
||||
WDTFile::~WDTFile(void)
|
||||
{
|
||||
WDT.close();
|
||||
}
|
||||
|
||||
ADTFile* WDTFile::GetMap(int x, int z)
|
||||
{
|
||||
if (!(x >= 0 && z >= 0 && x < 64 && z < 64))
|
||||
return NULL;
|
||||
|
||||
char name[512];
|
||||
|
||||
sprintf(name, "World\\Maps\\%s\\%s_%d_%d_obj0.adt", filename.c_str(), filename.c_str(), x, z);
|
||||
return new ADTFile(name);
|
||||
}
|
||||
53
src/tools/vmap-extractor/vmapextract/wdtfile.h
Normal file
53
src/tools/vmap-extractor/vmapextract/wdtfile.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef WDTFILE_H
|
||||
#define WDTFILE_H
|
||||
|
||||
#include "mpqfile.h"
|
||||
#include "wmo.h"
|
||||
#include <string>
|
||||
#include "stdlib.h"
|
||||
|
||||
class ADTFile;
|
||||
|
||||
class WDTFile
|
||||
{
|
||||
public:
|
||||
WDTFile(char* file_name, char* file_name1);
|
||||
~WDTFile(void);
|
||||
bool init(char* map_id, unsigned int mapID);
|
||||
|
||||
string* gWmoInstansName;
|
||||
int gnWMO, nMaps;
|
||||
|
||||
ADTFile* GetMap(int x, int z);
|
||||
|
||||
private:
|
||||
MPQFile WDT;
|
||||
bool maps[64][64];
|
||||
string filename;
|
||||
};
|
||||
|
||||
#endif
|
||||
575
src/tools/vmap-extractor/vmapextract/wmo.cpp
Normal file
575
src/tools/vmap-extractor/vmapextract/wmo.cpp
Normal file
|
|
@ -0,0 +1,575 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "vmapexport.h"
|
||||
#include "wmo.h"
|
||||
#include "vec3d.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <fstream>
|
||||
#undef min
|
||||
#undef max
|
||||
#include "mpqfile.h"
|
||||
|
||||
using namespace std;
|
||||
extern uint16* LiqType;
|
||||
|
||||
WMORoot::WMORoot(std::string& filename) : filename(filename)
|
||||
{
|
||||
}
|
||||
|
||||
extern HANDLE WorldMpq;
|
||||
|
||||
bool WMORoot::open()
|
||||
{
|
||||
MPQFile f(WorldMpq, filename.c_str());
|
||||
if (f.isEof())
|
||||
{
|
||||
printf("No such file %s.\n", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 size;
|
||||
char fourcc[5];
|
||||
|
||||
while (!f.isEof())
|
||||
{
|
||||
f.read(fourcc, 4);
|
||||
f.read(&size, 4);
|
||||
|
||||
flipcc(fourcc);
|
||||
fourcc[4] = 0;
|
||||
|
||||
size_t nextpos = f.getPos() + size;
|
||||
|
||||
if (!strcmp(fourcc, "MOHD")) //header
|
||||
{
|
||||
f.read(&nTextures, 4);
|
||||
f.read(&nGroups, 4);
|
||||
f.read(&nP, 4);
|
||||
f.read(&nLights, 4);
|
||||
f.read(&nModels, 4);
|
||||
f.read(&nDoodads, 4);
|
||||
f.read(&nDoodadSets, 4);
|
||||
f.read(&col, 4);
|
||||
f.read(&RootWMOID, 4);
|
||||
f.read(bbcorn1, 12);
|
||||
f.read(bbcorn2, 12);
|
||||
f.read(&liquidType, 4);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
else if (!strcmp(fourcc,"MOTX"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOMT"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOGN"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOGI"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOLT"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MODN"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MODS"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MODD"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOSB"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOPV"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOPT"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MOPR"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc,"MFOG"))
|
||||
{
|
||||
}
|
||||
*/
|
||||
f.seek((int)nextpos);
|
||||
}
|
||||
f.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WMORoot::ConvertToVMAPRootWmo(FILE* pOutfile)
|
||||
{
|
||||
//printf("Convert RootWmo...\n");
|
||||
|
||||
fwrite(szRawVMAPMagic, 1, 8, pOutfile);
|
||||
unsigned int nVectors = 0;
|
||||
fwrite(&nVectors, sizeof(nVectors), 1, pOutfile); // will be filled later
|
||||
fwrite(&nGroups, 4, 1, pOutfile);
|
||||
fwrite(&RootWMOID, 4, 1, pOutfile);
|
||||
return true;
|
||||
}
|
||||
|
||||
WMORoot::~WMORoot()
|
||||
{
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
bool WMOGroup::open()
|
||||
{
|
||||
MPQFile f(WorldMpq, filename.c_str());
|
||||
if (f.isEof())
|
||||
{
|
||||
printf("No such file.\n");
|
||||
return false;
|
||||
}
|
||||
uint32 size;
|
||||
char fourcc[5];
|
||||
while (!f.isEof())
|
||||
{
|
||||
f.read(fourcc, 4);
|
||||
f.read(&size, 4);
|
||||
flipcc(fourcc);
|
||||
if (!strcmp(fourcc, "MOGP")) //Fix sizeoff = Data size.
|
||||
{
|
||||
size = 68;
|
||||
}
|
||||
fourcc[4] = 0;
|
||||
size_t nextpos = f.getPos() + size;
|
||||
LiquEx_size = 0;
|
||||
liquflags = 0;
|
||||
|
||||
if (!strcmp(fourcc, "MOGP")) //header
|
||||
{
|
||||
f.read(&groupName, 4);
|
||||
f.read(&descGroupName, 4);
|
||||
f.read(&mogpFlags, 4);
|
||||
f.read(bbcorn1, 12);
|
||||
f.read(bbcorn2, 12);
|
||||
f.read(&moprIdx, 2);
|
||||
f.read(&moprNItems, 2);
|
||||
f.read(&nBatchA, 2);
|
||||
f.read(&nBatchB, 2);
|
||||
f.read(&nBatchC, 4);
|
||||
f.read(&fogIdx, 4);
|
||||
f.read(&liquidType, 4);
|
||||
f.read(&groupWMOID, 4);
|
||||
|
||||
}
|
||||
else if (!strcmp(fourcc, "MOPY"))
|
||||
{
|
||||
MOPY = new char[size];
|
||||
mopy_size = size;
|
||||
nTriangles = (int)size / 2;
|
||||
f.read(MOPY, size);
|
||||
}
|
||||
else if (!strcmp(fourcc, "MOVI"))
|
||||
{
|
||||
MOVI = new uint16[size / 2];
|
||||
f.read(MOVI, size);
|
||||
}
|
||||
else if (!strcmp(fourcc, "MOVT"))
|
||||
{
|
||||
MOVT = new float[size / 4];
|
||||
f.read(MOVT, size);
|
||||
nVertices = (int)size / 12;
|
||||
}
|
||||
else if (!strcmp(fourcc, "MONR"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc, "MOTV"))
|
||||
{
|
||||
}
|
||||
else if (!strcmp(fourcc, "MOBA"))
|
||||
{
|
||||
MOBA = new uint16[size / 2];
|
||||
moba_size = size / 2;
|
||||
f.read(MOBA, size);
|
||||
}
|
||||
else if (!strcmp(fourcc, "MLIQ"))
|
||||
{
|
||||
liquflags |= 1;
|
||||
hlq = new WMOLiquidHeader;
|
||||
f.read(hlq, 0x1E);
|
||||
LiquEx_size = sizeof(WMOLiquidVert) * hlq->xverts * hlq->yverts;
|
||||
LiquEx = new WMOLiquidVert[hlq->xverts * hlq->yverts];
|
||||
f.read(LiquEx, LiquEx_size);
|
||||
int nLiquBytes = hlq->xtiles * hlq->ytiles;
|
||||
LiquBytes = new char[nLiquBytes];
|
||||
f.read(LiquBytes, nLiquBytes);
|
||||
|
||||
/* std::ofstream llog("Buildings/liquid.log", ios_base::out | ios_base::app);
|
||||
llog << filename;
|
||||
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;
|
||||
llog << "\nx-/yvert: " << hlq->xverts << "/" << hlq->yverts << " size: " << size << " expected size: " << 30 + hlq->xverts*hlq->yverts*8 + hlq->xtiles*hlq->ytiles << std::endl;
|
||||
llog.close(); */
|
||||
}
|
||||
f.seek((int)nextpos);
|
||||
}
|
||||
f.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
char GRP[] = "GRP ";
|
||||
fwrite(GRP, 1, 4, output);
|
||||
|
||||
int k = 0;
|
||||
int moba_batch = moba_size / 12;
|
||||
MobaEx = new int[moba_batch * 4];
|
||||
for (int i = 8; i < moba_size; i += 12)
|
||||
{
|
||||
MobaEx[k++] = MOBA[i];
|
||||
}
|
||||
int moba_size_grp = moba_batch * 4 + 4;
|
||||
fwrite(&moba_size_grp, 4, 1, output);
|
||||
fwrite(&moba_batch, 4, 1, output);
|
||||
fwrite(MobaEx, 4, k, output);
|
||||
delete [] MobaEx;
|
||||
|
||||
uint32 nIdexes = nTriangles * 3;
|
||||
|
||||
if (fwrite("INDX", 4, 1, output) != 1)
|
||||
{
|
||||
printf("Error while writing file nbraches ID");
|
||||
exit(0);
|
||||
}
|
||||
int wsize = sizeof(uint32) + sizeof(unsigned short) * nIdexes;
|
||||
if (fwrite(&wsize, sizeof(int), 1, output) != 1)
|
||||
{
|
||||
printf("Error while writing file wsize");
|
||||
// no need to exit?
|
||||
}
|
||||
if (fwrite(&nIdexes, sizeof(uint32), 1, output) != 1)
|
||||
{
|
||||
printf("Error while writing file nIndexes");
|
||||
exit(0);
|
||||
}
|
||||
if (nIdexes > 0)
|
||||
{
|
||||
if (fwrite(MOVI, sizeof(unsigned short), nIdexes, output) != nIdexes)
|
||||
{
|
||||
printf("Error while writing file indexarray");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (fwrite("VERT", 4, 1, output) != 1)
|
||||
{
|
||||
printf("Error while writing file nbraches ID");
|
||||
exit(0);
|
||||
}
|
||||
wsize = sizeof(int) + sizeof(float) * 3 * nVertices;
|
||||
if (fwrite(&wsize, sizeof(int), 1, output) != 1)
|
||||
{
|
||||
printf("Error while writing file wsize");
|
||||
// no need to exit?
|
||||
}
|
||||
if (fwrite(&nVertices, sizeof(int), 1, output) != 1)
|
||||
{
|
||||
printf("Error while writing file nVertices");
|
||||
exit(0);
|
||||
}
|
||||
if (nVertices > 0)
|
||||
{
|
||||
if (fwrite(MOVT, sizeof(float) * 3, nVertices, output) != nVertices)
|
||||
{
|
||||
printf("Error while writing file vectors");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
nColTriangles = nTriangles;
|
||||
}
|
||||
else
|
||||
{
|
||||
char GRP[] = "GRP ";
|
||||
fwrite(GRP, 1, 4, output);
|
||||
int k = 0;
|
||||
int moba_batch = moba_size / 12;
|
||||
MobaEx = new int[moba_batch * 4];
|
||||
for (int i = 8; i < moba_size; i += 12)
|
||||
{
|
||||
MobaEx[k++] = MOBA[i];
|
||||
}
|
||||
|
||||
int moba_size_grp = moba_batch * 4 + 4;
|
||||
fwrite(&moba_size_grp, 4, 1, output);
|
||||
fwrite(&moba_batch, 4, 1, output);
|
||||
fwrite(MobaEx, 4, k, output);
|
||||
delete [] MobaEx;
|
||||
|
||||
//-------INDX------------------------------------
|
||||
//-------MOPY--------
|
||||
MoviEx = new uint16[nTriangles * 3]; // "worst case" size...
|
||||
int* IndexRenum = new int[nVertices];
|
||||
memset(IndexRenum, 0xFF, nVertices * sizeof(int));
|
||||
for (int i = 0; i < nTriangles; ++i)
|
||||
{
|
||||
// Skip no collision triangles
|
||||
if (MOPY[2 * i]&WMO_MATERIAL_NO_COLLISION ||
|
||||
!(MOPY[2 * i] & (WMO_MATERIAL_HINT | WMO_MATERIAL_COLLIDE_HIT)))
|
||||
continue;
|
||||
// Use this triangle
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
IndexRenum[MOVI[3 * i + j]] = 1;
|
||||
MoviEx[3 * nColTriangles + j] = MOVI[3 * i + j];
|
||||
}
|
||||
++nColTriangles;
|
||||
}
|
||||
|
||||
// assign new vertex index numbers
|
||||
int nColVertices = 0;
|
||||
for (uint32 i = 0; i < nVertices; ++i)
|
||||
{
|
||||
if (IndexRenum[i] == 1)
|
||||
{
|
||||
IndexRenum[i] = nColVertices;
|
||||
++nColVertices;
|
||||
}
|
||||
}
|
||||
|
||||
// translate triangle indices to new numbers
|
||||
for (int i = 0; i < 3 * nColTriangles; ++i)
|
||||
{
|
||||
assert(MoviEx[i] < nVertices);
|
||||
MoviEx[i] = IndexRenum[MoviEx[i]];
|
||||
}
|
||||
|
||||
// write triangle indices
|
||||
int INDX[] = {0x58444E49, nColTriangles * 6 + 4, nColTriangles * 3};
|
||||
fwrite(INDX, 4, 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 [] IndexRenum;
|
||||
}
|
||||
|
||||
//------LIQU------------------------
|
||||
if (LiquEx_size != 0)
|
||||
{
|
||||
int LIQU_h[] = {0x5551494C, sizeof(WMOLiquidHeader) + LiquEx_size + hlq->xtiles* hlq->ytiles}; // "LIQU"
|
||||
fwrite(LIQU_h, 4, 2, output);
|
||||
|
||||
// according to WoW.Dev Wiki:
|
||||
uint32 liquidEntry;
|
||||
if (rootWMO->liquidType & 4)
|
||||
liquidEntry = liquidType;
|
||||
else if (liquidType == 15)
|
||||
liquidEntry = 0;
|
||||
else
|
||||
liquidEntry = liquidType + 1;
|
||||
|
||||
if (!liquidEntry)
|
||||
{
|
||||
int v1; // edx@1
|
||||
int v2; // eax@1
|
||||
|
||||
v1 = hlq->xtiles * hlq->ytiles;
|
||||
v2 = 0;
|
||||
if (v1 > 0)
|
||||
{
|
||||
while ((LiquBytes[v2] & 0xF) == 15)
|
||||
{
|
||||
++v2;
|
||||
if (v2 >= v1)
|
||||
break;
|
||||
}
|
||||
|
||||
if (v2 < v1 && (LiquBytes[v2] & 0xF) != 15)
|
||||
liquidEntry = (LiquBytes[v2] & 0xF) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (liquidEntry && liquidEntry < 21)
|
||||
{
|
||||
switch (((uint8)liquidEntry - 1) & 3)
|
||||
{
|
||||
case 0:
|
||||
liquidEntry = ((mogpFlags & 0x80000) != 0) + 13;
|
||||
break;
|
||||
case 1:
|
||||
liquidEntry = 14;
|
||||
break;
|
||||
case 2:
|
||||
liquidEntry = 19;
|
||||
break;
|
||||
case 3:
|
||||
liquidEntry = 20;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
hlq->type = 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);
|
||||
}
|
||||
|
||||
return nColTriangles;
|
||||
}
|
||||
|
||||
WMOGroup::~WMOGroup()
|
||||
{
|
||||
delete [] MOPY;
|
||||
delete [] MOVI;
|
||||
delete [] MOVT;
|
||||
delete [] MOBA;
|
||||
delete hlq;
|
||||
delete [] LiquEx;
|
||||
delete [] LiquBytes;
|
||||
}
|
||||
|
||||
WMOInstance::WMOInstance(MPQFile& f, const char* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile)
|
||||
{
|
||||
pos = Vec3D(0, 0, 0);
|
||||
|
||||
float ff[3];
|
||||
f.read(&id, 4);
|
||||
f.read(ff, 12);
|
||||
pos = Vec3D(ff[0], ff[1], ff[2]);
|
||||
f.read(ff, 12);
|
||||
rot = Vec3D(ff[0], ff[1], ff[2]);
|
||||
f.read(ff, 12);
|
||||
pos2 = Vec3D(ff[0], ff[1], ff[2]);
|
||||
f.read(ff, 12);
|
||||
pos3 = Vec3D(ff[0], ff[1], ff[2]);
|
||||
f.read(&d2, 4);
|
||||
|
||||
uint16 trash, adtId;
|
||||
f.read(&adtId, 2);
|
||||
f.read(&trash, 2);
|
||||
|
||||
//-----------add_in _dir_file----------------
|
||||
|
||||
char tempname[512];
|
||||
sprintf(tempname, "%s/%s", szWorkDirWmo, WmoInstName);
|
||||
FILE* input;
|
||||
input = fopen(tempname, "r+b");
|
||||
|
||||
if (!input)
|
||||
{
|
||||
printf("WMOInstance::WMOInstance: couldn't open %s\n", tempname);
|
||||
return;
|
||||
}
|
||||
|
||||
fseek(input, 8, SEEK_SET); // get the correct no of vertices
|
||||
int nVertices;
|
||||
fread(&nVertices, sizeof(int), 1, input);
|
||||
fclose(input);
|
||||
|
||||
if (nVertices == 0)
|
||||
return;
|
||||
|
||||
float x, z;
|
||||
x = pos.x;
|
||||
z = pos.z;
|
||||
if (x == 0 && z == 0)
|
||||
{
|
||||
pos.x = 533.33333f * 32;
|
||||
pos.z = 533.33333f * 32;
|
||||
}
|
||||
pos = fixCoords(pos);
|
||||
pos2 = fixCoords(pos2);
|
||||
pos3 = fixCoords(pos3);
|
||||
|
||||
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,
|
||||
WmoInstName,
|
||||
(float) x, (float) pos.y, (float) z,
|
||||
(float) rot.x, (float) rot.y, (float) rot.z,
|
||||
nVertices,
|
||||
realx1, realy1,
|
||||
realx2, realy2
|
||||
); */
|
||||
|
||||
// fclose(dirfile);
|
||||
}
|
||||
142
src/tools/vmap-extractor/vmapextract/wmo.h
Normal file
142
src/tools/vmap-extractor/vmapextract/wmo.h
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
/**
|
||||
* MaNGOS is a full featured server for World of Warcraft, supporting
|
||||
* the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
|
||||
*
|
||||
* Copyright (C) 2005-2015 MaNGOS project <http://getmangos.eu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* World of Warcraft, and all World of Warcraft or Warcraft art, images,
|
||||
* and lore are copyrighted by Blizzard Entertainment, Inc.
|
||||
*/
|
||||
|
||||
#ifndef WMO_H
|
||||
#define WMO_H
|
||||
#define TILESIZE (533.33333f)
|
||||
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include "vec3d.h"
|
||||
#include "mpqfile.h"
|
||||
|
||||
// MOPY flags
|
||||
#define WMO_MATERIAL_NOCAMCOLLIDE 0x01
|
||||
#define WMO_MATERIAL_DETAIL 0x02
|
||||
#define WMO_MATERIAL_NO_COLLISION 0x04
|
||||
#define WMO_MATERIAL_HINT 0x08
|
||||
#define WMO_MATERIAL_RENDER 0x10
|
||||
#define WMO_MATERIAL_COLLIDE_HIT 0x20
|
||||
#define WMO_MATERIAL_WALL_SURFACE 0x40
|
||||
|
||||
class WMOInstance;
|
||||
class WMOManager;
|
||||
class MPQFile;
|
||||
|
||||
/* for whatever reason a certain company just can't stick to one coordinate system... */
|
||||
static inline Vec3D fixCoords(const Vec3D& v) { return Vec3D(v.z, v.x, v.y); }
|
||||
|
||||
class WMORoot
|
||||
{
|
||||
public:
|
||||
uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
|
||||
unsigned int col;
|
||||
float bbcorn1[3];
|
||||
float bbcorn2[3];
|
||||
|
||||
WMORoot(std::string& filename);
|
||||
~WMORoot();
|
||||
|
||||
bool open();
|
||||
bool ConvertToVMAPRootWmo(FILE* output);
|
||||
private:
|
||||
std::string filename;
|
||||
char outfilename;
|
||||
};
|
||||
|
||||
struct WMOLiquidHeader
|
||||
{
|
||||
int xverts, yverts, xtiles, ytiles;
|
||||
float pos_x;
|
||||
float pos_y;
|
||||
float pos_z;
|
||||
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
|
||||
{
|
||||
static std::set<int> ids;
|
||||
public:
|
||||
std::string MapName;
|
||||
int currx;
|
||||
int curry;
|
||||
WMOGroup* wmo;
|
||||
Vec3D pos;
|
||||
Vec3D pos2, pos3, rot;
|
||||
uint32 indx, id, d2, d3;
|
||||
int doodadset;
|
||||
|
||||
WMOInstance(MPQFile& f, const char* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);
|
||||
|
||||
static void reset();
|
||||
};
|
||||
|
||||
#endif
|
||||
111
src/tools/vmap-extractor/win/VC100/vmapExtractor.vcxproj
Normal file
111
src/tools/vmap-extractor/win/VC100/vmapExtractor.vcxproj
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?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>vmapExtractor</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\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AD;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibRAD.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AD;%(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\gameobject_extract.cpp" />
|
||||
<ClCompile Include="..\..\vmapextract\model.cpp" />
|
||||
<ClCompile Include="..\..\vmapextract\mpqfile.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\mpqfile.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>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\vmapextract\adtfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\dbcfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\model.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\mpqfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\vmapexport.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\wdtfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\wmo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\vmapextract\dbcfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\adtfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\loadlib\loadlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\model.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\mpqfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\modelheaders.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\vmapexport.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\vec3d.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\wdtfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\wmo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{77920bff-80f2-4d57-8efb-d36d461d04a4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{093fdfc3-8861-4d64-9c5e-4a58337b9c7e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
113
src/tools/vmap-extractor/win/VC110/vmapExtractor.vcxproj
Normal file
113
src/tools/vmap-extractor/win/VC110/vmapExtractor.vcxproj
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
<?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>vmapExtractor</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>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</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\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AD;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibRAD.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AD;%(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\gameobject_extract.cpp" />
|
||||
<ClCompile Include="..\..\vmapextract\model.cpp" />
|
||||
<ClCompile Include="..\..\vmapextract\mpqfile.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\mpqfile.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>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\vmapextract\adtfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\dbcfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\model.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\mpqfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\vmapexport.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\wdtfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\wmo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\gameobject_extract.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\vmapextract\dbcfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\adtfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\loadlib\loadlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\model.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\mpqfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\modelheaders.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\vmapexport.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\vec3d.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\wdtfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\wmo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{77920bff-80f2-4d57-8efb-d36d461d04a4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{093fdfc3-8861-4d64-9c5e-4a58337b9c7e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
113
src/tools/vmap-extractor/win/VC120/vmapExtractor.vcxproj
Normal file
113
src/tools/vmap-extractor/win/VC120/vmapExtractor.vcxproj
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.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>vmapExtractor</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>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
</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\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AD;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\..\dep\StormLib\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>StormLibRAD.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\..\dep\StormLib\bin\StormLib\$(Platform)\$(Configuration)AD;%(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\gameobject_extract.cpp" />
|
||||
<ClCompile Include="..\..\vmapextract\model.cpp" />
|
||||
<ClCompile Include="..\..\vmapextract\mpqfile.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\mpqfile.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>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\vmapextract\adtfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\dbcfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\model.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\mpqfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\vmapexport.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\wdtfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\wmo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\vmapextract\gameobject_extract.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\vmapextract\dbcfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\adtfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\loadlib\loadlib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\model.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\mpqfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\modelheaders.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\vmapexport.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\vec3d.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\wdtfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\vmapextract\wmo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{77920bff-80f2-4d57-8efb-d36d461d04a4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{093fdfc3-8861-4d64-9c5e-4a58337b9c7e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue