Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

16x8 pixel tiled graphics (.tpl)

Get your graphics formats figures out here! Got details for others? Post here!
User avatar
mugi
beginner
Posts: 32
Joined: Wed Mar 23, 2011 8:02 pm
Has thanked: 3 times
Been thanked: 9 times

Re: 16x8 pixel tiled graphics (.tpl)

Post by mugi » Sat Nov 16, 2013 11:10 am

Not yet, i've been pretty busy with work all week.
Havent had much time to sit at my pc.
I'll get back home later oday and hoping to get to work on this more again.

Also been looking into the scripts of the game too.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2819
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 702 times
Been thanked: 1452 times

Re: 16x8 pixel tiled graphics (.tpl)

Post by shakotay2 » Sat Nov 16, 2013 1:42 pm

So here's the changed files:
PaulGuy.zip

There are three additional params:
PaulGuy_cons d egbg00 80 480 360 172880 256 0
Decoding was o.k.
PaulGuy_cons e egbg00.tga 1042 480 360 18 256 0
Encoding too. So it's one app now with 'd' for decoding and 'e' for encoding.

Didn't test other than 256 palEntries. Last param='1' (for BGRA-RGBA change) also untested.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
mugi
beginner
Posts: 32
Joined: Wed Mar 23, 2011 8:02 pm
Has thanked: 3 times
Been thanked: 9 times

Re: 16x8 pixel tiled graphics (.tpl)

Post by mugi » Sat Nov 16, 2013 7:49 pm

i tested it out and the BGRA<->RGBA works perfectly <3
didnt test the palette size yet, but im pretty sure it works just fine too anyway :P

here's a decoded file against an in-game screenshot:

Image Image

this'll be hopefully all i need regarding the basic image format.
now all my issues are with those alpha channeled images that make no sense whatsoever.

im gonna start doing testing with them starting tomorrow. (been having a rough week so im just gonna get to bed :P)
can't thank you enough though, the graphics were pretty much the go or no-go of my project, whatever else i can pretty much go around or through with :P

i'll keep you updated regarding what else i find, but im not quite sure the format itself holds any more secrets on itself.
the tile layout data for the renders and whatnot is propably just located elsewhere.

edit: oh great, my site is down (again)
it's been shit for a while now so if images dont display, they'll come back eventually. :P

edit2: well, decoding the picture with a palette size of 16 works great too (it imports it correctly) but another issue came up with it.

a picture using 16 color palette seems to have a different imagestructure alltogether.
i did some calculations and an image with resolution of 512x512 would take 2048 tiles (32x64 16x8pixel tiles) which in data would be 0x40000. but the image i have at hand is only 0x20000 in size.
i got it to somewhat display, but it's not exactly correct. The decoder aligns it right but it becomes a mess since trying to use 512x512 as resolution is not possible since it goes way over the filesize.

also, the TGA header needs to be modified for the 16-color images.

256-color header:
0001 0100 0000 0120 0000 0000 8001 8001
0800

16-color header:
0001 0100 0010 0020 0000 0000 0001 0001
0800

edit3: disregard. Problem solved. TPLencdec updated. (no 16-color encode support yet.)

started versioning the code to keep track of it now, i have like 20 different versions and no clue what is what :P

output:
Image

Post Reply