Jump to content

Spk Editing


inteck

Recommended Posts

I have been to daishivas site, and the only thing available for download over there was the map editor :P ... Is this the same one that edits all the graphics?? Or is it a different program than xcview??? I am planning on re-doing a lot of the weapons graphics, but all I have is pck_viewer and win pck. Neither program does everthing that I need. The spks and scr for starters....Also, If the editor is good enough for a simpleton like me to use, I would like to go in and correct a minor, but really irritating graphics screw up in the Tftd interception screenshot *the two ufo screenshots that need to be switched around of course* since no one else seems have done it.
Link to comment
Share on other sites

:( Thanks for the let know, Bomb Bloke. After one of my many initial :( "brain pharts" I went back and managed to get the programs :( ......For those interested, but couldn't figure it out, the ufo images in the interception screen have nothing to do with the normal pck, scr, bdy, spk or any other of the image files. Instead they are located under the Geodata folder in the "Interwin.dat" file. I can prove this by simply replacing the Tftd interwin file with the Ufo Enemy unknown interwin (kind of weird seing Ufos instead of subs, also uses a different coloring pallet for really strange looking ufo's).......Unfortunately I have found no program that can correctly decipher the images in the file :P (including the ones from daishiva's site) to correct the sub image reversal of the battleship and the supply ship. If anyone can give me some help on deciphering this file I would appreciate it....
Link to comment
Share on other sites

Well, I haven't worked on that file in particular, but I'll throw in my two cents.

 

I reckon the file is a direct mapping to the pallete, that is, much the same as a SCR file is supposed to be. (Check the file formats on DaiShiva's site (programs section again, I believe) to see how the picture formats work).

 

Erm, I'll take a look and see if I can be more specific, but I'll bet that's it. :P

Link to comment
Share on other sites

Actually daishivas pckview(not xcview) can do something kind of weird with the interwin dat file. If you open pckview and pick the "texture.dat" as the kind of file to open and then open the interwin.dat, it will actually display something like 432 squares of data :P . Normally it will give an error if you try to open something besides the texture file that it was meant for, dat file or not, however it opens it up nonetheless (even though the info displayed is garbage). Probably useless information, but i'll throw it in anyway.
Link to comment
Share on other sites

Direct mapping to the palette indeed. For quite a lot of the images in the game, you simply load the palette from another file, and then you just load in the image file and then draw a pixel of the values that you read in onto the screen. In a 256 colour image, this'll map the pixel directly to the current loaded palette. To draw on a higher resolution drawing surface, you'll have to grab the colour information from the palette before drawing it.

 

The real trick is knowing where to drop down to the next line, and when and where the next image begins.

 

Like the texture.dat file, that's easy. Each texture is 32x32, so you jump down to the next line after every 32 pixels, and each texture wil be every 1024 bytes (32x32 = 1024). For variable sized images... eh, that might take a bit of experimentation.

 

This appears true for a number of the image formats, like the geoscape textures, the background images, the intercept window, and the non-English Geoscape control panels.

 

- NKF

Link to comment
Share on other sites

I betcha all the craft images in that file are of the same size. I reckon if you can work out how many images should be in there, and divide the file size by that number, you'd have the bytes each image took.

 

If the images happen to be sqaure (and that may or may not be the case), then the root of the image size in bytes might just produce the row size.

 

Ya never know.

 

If not, I advise loading the file in notepad. Be creative with the line breaks, and see if you can create something that looks like a picture! Ya never know. I have used that to work out the dimensions of the map files, it may well work here too.

Link to comment
Share on other sites

I'd also recommend using MS-Edit as an alternative, as you can also set the number of rows and check the value that's under the cursor at the same time when opening in binary mode. The MS-Edit that comes with Windows 95, 98 and XP will work fine.

 

The only problem with MS Edit is when trying to line up a file that has a header. My only recommendation for this is to manually delete the header and then save the file under a new name. Then reopen the file with the dimensions that you want. Like most of the map files have a 3 byte header stating the dimensions, and you won't be able to tile it nicely until you've removed the three leading bytes.

 

Bladefirelight:

 

lang1.dat and lang2.dat under geodata\

 

These are image overlays for the German and French sidebars.

 

Just as a follow up from the above, anyone wanting to have a look at either of these files in MS Edit might want to run it by typing:

 

edit /64 path_to_where_you_installed_UFO\geodata\lang1.dat

 

From the run menu or through the command prompt.

 

- NKF

Link to comment
Share on other sites

:blink: O.K. i'm lost, daishiva, how did you extract those images?? and what did you do it with???......This is the type of thing and info I have been looking for to correct the Tftd images. As anyone can plainly see just by giving a quick glance between the two files, the supply ship and battleship images are clearly in the wrong place for tftd as opposed to the supply and terror ship in ufo images.
Link to comment
Share on other sites

Actually I had the sizes wrong. My first clue should have been how things did not look nicely: couldnt read the numbers.

 

How did I make them? I edited my xcview program to decode/export (not import yet) the files. There is no fancy compression for these files, its just an uncompressed bitmap in 160xfilesize/160 size

 

tftd

https://www.daishiva.com/images/interwin-tftd.gif

 

ufo

https://www.daishiva.com/images/interwin-ufo.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...