mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-14 17:33:25 +00:00
Update readme for cppan.
This commit is contained in:
parent
9c3034e7ef
commit
65c6ab3e59
4 changed files with 14 additions and 8 deletions
|
|
@ -10,11 +10,14 @@ This repository contains different tools for A.I.M. games.
|
|||
6. Models converter: AIM1/2 format -> .OBJ + .MTL. Textures are included.
|
||||
7. Script to TXT convertor.
|
||||
8. Texture converter: TM -> TGA.
|
||||
9. MPJ loader (dummy implementation).
|
||||
10. Save loader (dummy implementation).
|
||||
|
||||
# Build instructions
|
||||
1. Download and install latest CMake http://www.cmake.org/download/
|
||||
1. Download and add to PATH latest CPPAN https://cppan.org/client/
|
||||
2. Clone this repository
|
||||
3. Open the source directory
|
||||
4. Execute in console `cmake -H. -Bwin`
|
||||
5. Run win/aim_tools.sln file (Visual Studio solution file)
|
||||
4. Execute in console `cppan --generate .`
|
||||
5. Open generated solution file (Visual Studio solution file)
|
||||
6. Build the project
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ int main(int argc, char *argv[])
|
|||
cl::opt<bool> print_mechanoids("print_mechanoids", cl::desc("print mechanoids"));
|
||||
cl::opt<path> db_path("db", cl::desc("database file"));
|
||||
cl::alias db_pathA("d", cl::aliasopt(db_path));
|
||||
cl::opt<path> p(cl::Positional, cl::desc(".mmo file or directory with .mmo files"), cl::value_desc("file or directory"), cl::Required);
|
||||
cl::opt<path> p(cl::Positional, cl::desc("<.mmo file or directory with .mmo files>"), cl::value_desc("file or directory"), cl::Required);
|
||||
|
||||
cl::ParseCommandLineOptions(argc, argv);
|
||||
|
||||
|
|
|
|||
|
|
@ -363,9 +363,7 @@ void mmp::writeSplitColormap() const
|
|||
int i = 0;
|
||||
for (auto &color : colors)
|
||||
{
|
||||
auto m = colormap;
|
||||
for (auto &pixel : m)
|
||||
pixel = pixel == color ? 0x0000FF00 : 0;
|
||||
++i;
|
||||
auto fn = filename;
|
||||
std::ostringstream ss;
|
||||
ss << "0x";
|
||||
|
|
@ -373,7 +371,12 @@ void mmp::writeSplitColormap() const
|
|||
ss.width(8);
|
||||
ss << std::hex << std::uppercase << color;
|
||||
fn += ".colormap." + ss.str() + ".png";
|
||||
std::cout << "\r[" << ++i << "/" << colors.size() << "] Processing color " << ss.str();
|
||||
if (fs::exists(fn))
|
||||
continue;
|
||||
auto m = colormap;
|
||||
for (auto &pixel : m)
|
||||
pixel = pixel == color ? 0x0000FF00 : 0;
|
||||
std::cout << "\r[" << i << "/" << colors.size() << "] Processing color " << ss.str();
|
||||
cv::imwrite(fn.u8string(), cv::Mat(m));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ using namespace std;
|
|||
// options
|
||||
bool silent = false;
|
||||
bool printMaxPolygonBlock = false;
|
||||
cl::opt<path> p(cl::Positional, cl::desc("MOD_ file or directory with MOD_ files"), cl::value_desc("file or directory"), cl::Required);
|
||||
cl::opt<path> p(cl::Positional, cl::desc("<MOD_ file or directory with MOD_ files>"), cl::value_desc("file or directory"), cl::Required);
|
||||
|
||||
void convert_model(const path &fn)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue