Palette mover utility

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

Palette mover utility

#1

Post by Dusk » Sun Oct 21, 2012 10:58 pm

I've been doing a bunch of palette work recently and ended up needing to move palette ranges here and there so I made a little utility to help with that.

So what this thing does is that it operates on Doom playpal lumps and moves color ranges. Palettes in the same format from other games should also work, e.g. Heretic, Hexen, Strife, Duke, etc...

Usage guide
It's a command line tool that takes a plethora of arguments:

Code: Select all

usage: palmove <mode> <input> <output> <transplant> <start> <end> <destination>
The palette is read from <input> and written to <output>. <mode> is a bunch of letters that determine what this tool actually does.
  • m: move, moves the palette range <start>:<end> to <destination> and writes resulting palette to <output>.
  • s: swap, use with move (<mode> being 'ms' for instance). The range being overwritten by the move is moved back to the starting range. This creates a two-way move.
  • t: transplant. The palette is handled in <input> and written to <output> but the color data is actually read from <transplant>. For instance, if <input> points to Doom PLAYPAL, and <transplant> for instance to Demon Eclipse's, you can transplant the green range from Demon Eclipse to the Doom one with: t doom.pal output.pal demoneclipse.pal 112 127 112. This is the only mode which uses <transplant>, it is ignored otherwise. 'm' and 's' have no effect with this.
  • r: reverse. If used on its own, the range <start>:<end> is reversed to <end>:<start>. If used in conjuction with 'm' or 't', the palette ranges being moved are reversed in the process. If used with 's', both affected ranges get reversed.
It does work with palette files with multiple palettes (e.g. Doom IWAD uses 14), but if transplanting is done, both input files must have an equal amount of palettes.

Downloads here
Includes win32 and win64 binaries and source code.
Last edited by Dusk on Sun Oct 21, 2012 11:06 pm, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Palette mover utility

#2

Post by Ænima » Sun Oct 21, 2012 11:19 pm

You know, when I saw the thread title, the first thing I thought of was this:
[spoiler]Image[/spoiler]

Although I'm downloading this anyways because I think I can make some use out of it! Thanks!
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Post Reply