Giter Site home page Giter Site logo

wal-tools's Introduction

wal-tools

This repository contains command-line tools to work with .WAL texture files (found in games based on Quake 2 engine). Supports both vanilla Quake 2 textures and Daikatana variations.

To compile, run make in the repository's root. If compiling on Windows, use MSYS2/MinGW.

wal-term

Displays specified texture right in your terminal with some ANSI escape code trickery.

Usage:

wal-term FILENAME [-p PALETTE_PCX_FILE]

Displays a WAL texture in a terminal using 24-bit color escape codes.
Options:
-p FILE - use specified PCX file as the palette

Screenshot:

Screenshot

wal-info

Prints out information about a WAL file.

Usage:

$ wal-info texture.wal

Example output:

$ wal-info tests/clip.wal 
Type: Quake 2
Name: e1u1/clip
Width: 32
Height: 32
MIP 0 offset: 0x00000064
MIP 1 offset: 0x00000464
MIP 2 offset: 0x00000564
MIP 3 offset: 0x000005a4
Next frame name: 
Flags: 0x00000080
Contents: 0x00030000
Value: 0000000000

wal-edit

Allows editing values embedded in WAL header.

Usage:

wal-edit FILENAME [-key value]

wal-edit - edit the WAL texture header data
Options:
-name SAMPLE - sets the name to 'SAMPLE' (max 32 chars)
-animname SAMPLE2 - sets the next animation frame name to 'SAMPLE2' (max 32 chars)
-flags 0x1337 - sets the flags field to 0x1337 (32-bit number)
-contents 100 - sets the contents field to 100 (32-bit number)
-value 100 - sets the value field to 100 (32-bit number)

wal-export

Exports specified WAL texture to TGAs.

Usage:

wal-export FILENAME [-mip N] [-o FILENAME_WITHOUT_EXT]

wal-export - exports WAL textures to the specified format.
Supported formats: TGA (default)
Options:
	-mip N: export mip N only (Quake 2 - [0..3], Daikatana - [0..8]
	-o FILE: export to specified filename (extension and mip N is added)
Output filename is constructed as follows (for example):
source.wal -> source-mip-0.tga
If -mip is specified, it's omitted from output filename:
source.wal -> source.tga

wal-convert

Creates a WAL texture from specified TGA file. Mipmaps are generated automatically.

Usage:

wal-convert FILENAME [-o FILENAME_WITHOUT_EXT]

wal-convert - converts image file to a WAL texture.
Supported formats: TGA with 256-color 24bpp RGB palette (default)
Options:
	-o FILE: export to specified filename (.wal is added automatically)
	-f FORMAT: 'Q2' or 'DK' (defaults to 'Q2')

Further changes like setting names, flags and other stuff should be done through the wal-edit tool.

wal-tools's People

Contributors

razer-rbi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

wal-tools's Issues

[Feature] M8 and M32 support

M8 and M32 are variations of the WAL format created by Raven Software for Heretic II and Soldier of Fortune. M8 is the same as WAL, but with the addition of its own embedded palette (instead of using the colormap.pcx palette). M32 is a 32-bit version of WAL. Most modern Quake II source ports support these formats, as do some compilers, so I think it makes sense for this tool to support the formats as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.