RSE-Texture/README.md
JackCarterSmith 0c8282ab5d
All checks were successful
JCS-Prod/RSE-Texture/pipeline/pr-master This commit looks good
JCS-Prod/RSE-Texture/pipeline/head This commit looks good
Validated conan v2 migration
2024-05-19 10:08:10 +02:00

70 lines
2.7 KiB
Markdown

# RogueSquadron Extractor - TEXTURE module
Inspired by the work of **dpethes** (https://github.com/dpethes/rerogue) :clap:
This set of git repos are a compilation of tools coded in C to make RS modding far more than a dream!
The collection consist of few independants modules, each of them deals with specific data like sound, textures, heightmaps, etc...
All modules are independants. This is the **'TEXTURE'** module.
[![Build Status](https://ci.jcsmith.fr/job/JCS-Prod/job/RSE-Texture/job/master/badge/icon)](https://ci.jcsmith.fr/job/JCS-Prod/job/RSE-Texture/job/master/)
## TEXTURE MODULE
It's extract texture datas from Rogue Squadron 3D (PC) game textures files (HMT).
This module can do:
- Extract textures inside HMT files to PNG format,
- Extract automatically inside subfolder (usefull when you have a lot of pictures to extract),
- Multiple inputs files,
- Manage transparent textures,
- Fixed some errored RGB color encoding.
## TODO
- Discover all last unknowns fields, etc.
- Parse TEXT format for terrain module
### Using
`RSETexture [options] <hmt files...>` or you can simply drag&drop hmt files on it.
A futur main program can extract all HMT files directly from DAT file.
Due to issue with copyrights, I can't provide samples... You need to extract HMT files yourself.
<img src="https://repo.jcsmith.fr/pictures/rse-texture.gif" width="620" height="400" />
### Options
- -h Print this message
- -v,-vv Activate verbose/debug output mode respectively
- -no-subdir Extract textures directly inside current folder
### Dependencies
Necessary libs (provided only in windows release) for running and for compiling.
- [zlib](https://www.zlib.net/) (1.2.13)
- [libpng](http://www.libpng.org/pub/png/libpng.html) (1.6.40)
### Compiling
I've a preference for compiling libraries by hand, mainly for backward compatibility, but I recommend using Conan packages manager (https://conan.io) for simplicity.
```shell
conan install -of build . --build=missing -pr:b=default -pr:h=default
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
cmake --build .
```
On Windows environment, you can use MinGW `-G "MinGW Makefiles"` or Ninja `-G "Ninja"` as CMake generator.
### Compiling (HARDCORE)
If you want to do it manually without Conan, you will probably need to specify the dependency flags for CMake. Ex:
`cmake.exe -D"ZLIB_INCLUDE_DIR=zlib/1.2.13/include" -D"ZLIB_LIBRARY=zlib/1.2.13/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.40/include" -D"PNG_LIBRARY=libpng/1.6.40/lib/libpng.dll.a" . -G "MinGW Makefiles"`
I've tested cross-compilation too, but since I want to check that Conan is working properly at each release, I've integrated it into the Jenkins flow using Conan for the cross-abstraction.