JackCarterSmith 94d2cb6e56
All checks were successful
JCS-Prod/RSE-Texture/pipeline/head This commit looks good
Finalize package export
2024-09-22 13:01:07 +02:00
2022-08-25 18:27:39 +02:00
2022-09-18 16:01:18 +02:00
2024-05-19 10:08:10 +02:00
2024-09-22 13:01:07 +02:00
2022-08-25 18:27:39 +02:00
2024-09-22 12:35:28 +02:00
2019-07-02 20:00:43 +02:00
2022-07-14 20:13:16 +02:00
2024-09-22 11:41:42 +02:00

RogueSquadron Extractor - TEXTURE module

Inspired by the work of dpethes (https://github.com/dpethes/rerogue) 👏

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

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.

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.

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 (I've abandonned the support for conan v1 as it's now considered as deprecated).

conan install . -of build -b missing -s build_type=Release -o tools=True -pr:b=default -pr:h=default
cmake --preset conan-release -G "Unix Makefiles"
cmake --build --preset conan-release

If your CMake<3.23, you should use this command for generation instead of preset one:

cmake . -S build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DRSPTEXTURE_SHARED=ON -DRSPTEXTURE_STATIC=OFF -DBUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"

Beware to use the same release/debug configuration with CMake using Conan! Adjust CMake preset or Conan configuration if necessary.

On Windows environment, you can use MinGW -G "MinGW Makefiles" or Ninja -G "Ninja" as CMake generator.

Compiling (options)

There are a few configurable build options:

  • RSPTEXTURE_SHARED Enable the build of shared version of the library ("shared" conan option)
  • RSPTEXTURE_STATIC Enable the build of static version of the library ("shared" conan option)
  • BUILD_TOOLS Enable the build of the standalone tools (necessary to use the lib directly) ("tools" conan option)

Compiling (old-way)

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.3.1/include" -D"ZLIB_LIBRARY=zlib/1.3.1/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.43/include" -D"PNG_LIBRARY=libpng/1.6.43/lib/libpng.dll.a" -DRSPTEXTURE_SHARED=ON -DRSPTEXTURE_STATIC=OFF -DBUILD_TOOLS=ON . -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.

Description
Rogue Squadron 3D (PC) game textures files (HMT) extractor
Readme 216 KiB
2022-09-18 16:01:18 +02:00
Languages
C 71.5%
CMake 19.7%
Python 8.8%