20-05-2009, 03:35 AM | #21 | ||
Join Date: May 2009
Location: Bullhead City, United States
Posts: 38
|
Ohh... I was looking at HUNTERCP.ACT That might just be a muzzle flash.
The HUNTER.ACT file has far more complexity. I'm guessing the .'s are the dark areas of the image, while the blocks of symbols are where the different colored pixels would be. What makes up a single letter on the hex editor, like 6C, might accually be many pixels. Any way to take a file, and using different offsets, 4bit, 8bit, try and build an image out of it? |
||
|
|
20-05-2009, 09:50 AM | #22 | ||
Join Date: Jan 2008
Location: Christchurch, New Zealand
Posts: 1,044
|
Unless it's a compressed format, then it isn't. After all, two hex letters make up 256 total possibilities, and if it's a 256 colour image...
|
||
|
|
20-05-2009, 10:49 AM | #23 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
Quote:
Quote:
Then prod around the offsets responsible for image width/height and see if the results make sense. That's basicaly what I did with Space Hulk's CPH format earlier this year. |
||
|
|
21-05-2009, 10:46 PM | #24 | ||
Join Date: May 2009
Location: Bullhead City, United States
Posts: 38
|
Usually the RGB color would be a 6 digit hex code.
RRGGBB each hex pair could only do the 256 for each color, red green or blue. Is this correct? Or do you think they used an even more compressed method, such as having every 8 bits act as an index for a pre-defined pallet, rather than 8 bits for red green and blue? Do you know of any programs that can open raw data as an image? Audacity can take anything, and import it as a raw data format. Is there a graphical version of something like this? Something with various settings, bit depth, height and width, "sliding" across the read data to possibly slip into the right alignment, the correct way the data should be read. Perhaps a dialog that offers options on how each bit of data should be read. Last edited by weylin; 21-05-2009 at 11:02 PM. |
||
|
|
21-05-2009, 11:37 PM | #25 | ||
Join Date: Jan 2008
Location: Christchurch, New Zealand
Posts: 1,044
|
Quote:
|
||
|
|
22-05-2009, 08:31 AM | #26 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
Quote:
When using a 256-color palette, you only need one byte per pixel, referring to a color in the palette. This reduces the amount of bytes needed to store the image data a threefold. In addition, VGA graphic cards commonly used at the time the game was published just simply couldn't simultaneously display more than 256 colors. In addition, you can do a lot of things with palettized images that would be more complicated (or just too CPU-intensive to do in realtime) with RGB ones - like instantly change a sprite's colors, use same image to create three differently colored sprites simply by switching around references to certain palette colors index, colorize the game graphics by swapping palette colors for different ones and so on. UFO: Enemy Unknown is a prime example - using a palette of sixteen shades of sixteen colors, the game is able to create lighted enviroment simply by increasing or decreasing the references to pallete color numbers depending on the area's level of lighting. This way, a single sprite can be drawn with sixteen different levels of lighting. Quote:
The quickest way for similar results would be to use a hex editor to insert the suspected data into a PCX file and mess around with width and height values. You'd need a palette for that, though.
__________________
"God. Can't you people see I'm trying to commit a crime against science and nature here?" -- Reed Richards Last edited by The Fifth Horseman; 22-05-2009 at 08:37 AM. |
||
|
|
22-05-2009, 10:01 AM | #27 | ||
Join Date: May 2009
Location: Bullhead City, United States
Posts: 38
|
Could you tell me how to make a PCX?
I tried making -careful- edits to a blank 32x32 white PCX image, and it got a corrupted data error, and opened it anyways but with wierd results, discoloration at the bottom. Maybe because it was all one color, I was screwing up the compression it uses... because the whole line turned yellow |
||
|
|
22-05-2009, 10:12 AM | #28 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
The PCX is composed of three parts: the header, the image data and the palette. If anything's missing, then you'll get weird results.
I'll give you some details on the format later, my notes are on the home PC. |
||
|
|
22-05-2009, 08:02 PM | #29 | ||
Join Date: May 2009
Location: Bullhead City, United States
Posts: 38
|
The pallet can come before or after as long as it has a proper tag, can't it?
I looked at the wiki article but im still confused as to how to structure one from scratch. BTW, the game lion, I believe it uses a gradually changing color pallet for the day/night cycle. Not sure how many stages the pallet transition is, but it changes from full color to redish orange, then to to a grey and blue scheme from dusk till night. It does this transition very gradually so I'm uncertain if the pallet undergoes some sort of scripted change over time, or if the pallets are framed, changing pallets every few seconds. |
||
|
|
22-05-2009, 10:07 PM | #30 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
Believe me, you'd notice the palette. A 256-color palette with 3 bytes per color needs 768 bytes, assuming the records are stored directly one after another.
In a PCX, the palette is placed at the end of file. I'm pretty sure the palettes are not stored in the ACT files - and given what you just told me, they might be hard-coded into the game itself. I'm attaching a RAR with three useful things. The first is a header from a PCX file, remaining two are palettes fror use with it. Copy the part of the ACT you think is the image data and open the header, Paste the data at the end of the header and adjust the width/height offsets as follows: * offset 08h : hexadecimal value of image width decreased by 1 * offset 42h : hexadecimal value of image width * offset 0Ah :hexadecimal value of image height decreased by 1 Then copy any pre-made palette and paste it on the end of the file. Save with extension PCX. And... yep, that's one working PCX |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dos Box File Extracting Problems | discotillyoudie | Troubleshooting | 6 | 17-03-2007 04:15 AM |
Something Went Wrong In The Extracting Process | Brian | Troubleshooting | 3 | 13-09-2006 03:08 PM |
Self-extracting Archives | The Fifth Horseman | Old Suggestions | 23 | 03-08-2005 08:54 AM |
Opening Or Extracting Bin Files | troop18546 | Tech Corner | 13 | 29-04-2005 10:02 PM |
|
|
||
  |