Wing Commander Toolbox

Here's an update that adds support for reference points.

Each image has a reference point. The reference point is used by the game to determine the logical center point for image transformations (rotation, scaling, etc). The previous version of the image tool just used (0, 0). This new version allows you to specify a different reference point for each image.

I've also added a line of help text to the resource tool that reveals the -extract-all option. (The option was already there, but I forgot to include it in the help text.)
Cool, Thanks! :D
 
Here's an update that adds support for reference points.

Each image has a reference point. The reference point is used by the game to determine the logical center point for image transformations (rotation, scaling, etc). The previous version of the image tool just used (0, 0). This new version allows you to specify a different reference point for each image.

I've also added a line of help text to the resource tool that reveals the -extract-all option. (The option was already there, but I forgot to include it in the help text.)
I must not be awake.
I've unziped this in my gamedat directory, and in command prompt I typed [image.exe -extract-all briefing.vga] in many different ways and no joy. What am I doing wrong?

Thanks for anyone's help.
 
What's the console output? Can't try myself right now, though
I've tried it may different ways and had many different errors: Multiple input files specified, bad image offset, no output file specified for -o, no such file or directory.
 

Stinger

Vice Admiral
I've tried it may different ways and had many different errors: Multiple input files specified, bad image offset, no output file specified for -o, no such file or directory.
That's my bad for not being clear.

The image executable works on image sets that have already been extracted from the resource archives. The briefing.vga file is a resource archive, not an image set. Before you can extract any images, you'll need to extract the resources from the archive. That's where the resource executable comes in.

Do this:
resource -extract-all briefing.vga -o briefing

This will create a new directory called briefing; inside, you'll see a bunch of numbered files without any extensions. Those are the individual resources from briefing.vga. It happens that all of those are image sets. For each one, you can do this:
image -extract-all 0 -prefix 0_

That will pull all of the images out of the file named 0; each image will be named 0_0.png, 0_1.png, etc.
 
Last edited:
That's my bad for not being clear.

The image executable works on image sets that have already been extracted from the resource archives. The briefing.vga file is a resource archive, not an image set. Before you can extract any images, you'll need to extract the resources from the archive. That's where the resource executable comes in.

Do this:
resource -extract-all briefing.vga -o briefing

This will create a new directory called briefing; inside, you'll see a bunch of numbered files without any extensions. Those are the individual resources from briefing.vga. It happens that all of those are image sets. For each one, you can do this:
image -extract-all 0 -prefix 0_

That will pull all of the images out of the file named 0; each image will be named 0_0.png, 0_1.png, etc.
Thanks, I'll try again next weekend when I have some free time.
 
That's my bad for not being clear.

The image executable works on image sets that have already been extracted from the resource archives. The briefing.vga file is a resource archive, not an image set. Before you can extract any images, you'll need to extract the resources from the archive. That's where the resource executable comes in.

Do this:
resource -extract-all briefing.vga -o briefing

This will create a new directory called briefing; inside, you'll see a bunch of numbered files without any extensions. Those are the individual resources from briefing.vga. It happens that all of those are image sets. For each one, you can do this:
image -extract-all 0 -prefix 0_

That will pull all of the images out of the file named 0; each image will be named 0_0.png, 0_1.png, etc.
@Stinger I was able to get the resource to extract but it did not create a directory I had to create it myself.
The image, however, keeps giving me "Error: Class not registered"
What am I doing wrong?
 

Stinger

Vice Admiral
What operating system are you using?

Edit: Never mind, I found the issue; I was unwittingly using CLSID_WICImagingFactory2, which was introduced Windows 8. I only needed CLSID_WICImagingFactory1, which is available in XP SP2. I've rebuilt the image program and attached it to this post.
 

Attachments

  • wctools.zip
    330.6 KB · Views: 98
Last edited:
What operating system are you using?

Edit: Never mind, I found the issue; I was unwittingly using CLSID_WICImagingFactory2, which was introduced Windows 8. I only needed CLSID_WICImagingFactory1, which is available in XP SP2. I've rebuilt the image program and attached it to this post.
Thanks! :D
Just to note I was using the Command Prompt in Win7-64bit.
Image.exe doesn't put the pictures in the directory specified but it does place the images in the user directory.
 
It has been a while since an update, but work on the library has continued. This update includes support for more files: COCKPIT and MID. It also adds writing support for the following files: PAL (GAME), PCSHIP, and SHIPTYPE.

See first post for the complete list new features and file attachment.
 
The latest update includes partial support for EGA and TGA image files; just for fun as there is no value in supporting these files. For the curious, here are examples comparing EGA and VGA; I did not include TGA because, visually, EGA and TGA are identical.


BRIEFING.xGA-Block000-Image000.png


BRIEFING.xGA-Block002-Image000.png
SHIP.x08-Block025-Image000.png
 
Top