RSE-Texture/README.md
JackCarterSmith 2b7bc30bcc
All checks were successful
JCS-Prod/RSE-Texture/pipeline/head This commit looks good
Update 'README.md'
2022-04-10 14:40:23 +02:00

84 lines
2.8 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.
:exclamation: **Master branch is ugly for now and should not be used, please take only released versions.** :exclamation:
## 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.
### Using
`RSE-Texture_"version" [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 Activate verbose output
- -no-subdir Extract textures directly inside current folder
### Dependencies
Necessary libs (provided only in windows release) for running and for compiling.
- zlib (1.2.11)
- libpng (1.6.37)
### Compiling
You can compile on both Windows (MinGW) or native Linux system thanks to CMake, you only need to adjust your dependencies on Windows or use Conan packages manager (https://conan.io).
zlib-dev (zlib1g-dev) and libpng16-dev distrib packages can be used on debian/ubuntu.
To compile, just clone and launch cmake:
```shell
cmake .
make
make install
```
On Windows system, I can suggest you to use Conan support to help you with dependencies:
```shell
mkdir build
cd build
conan install .. --build=libpng --build=zlib
cmake .. -G "MinGW Makefiles"
make
```
If you want to do it manually without Conan support, you will probably need to specify the dependency flags for CMake. Ex:
`cmake.exe -D"ZLIB_INCLUDE_DIR=zlib/1.2.11/include" -D"ZLIB_LIBRARY=zlib/1.2.11/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" -D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" . -G "MinGW Makefiles"`
We can also use cross-compilation (after installing `mingw64` and `cmake` packages on your distrib):
```shell
mkdir build && cd build
cmake -DGNU_HOST=x86_64-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake \
-D"ZLIB_INCLUDE_DIR=zlib/1.2.11/include" \
-D"ZLIB_LIBRARY=zlib/1.2.11/lib/libzlib.dll.a" \
-D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" \
-D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" \
..
cmake --build .
```