Anonymous

Changes

From Final Fantasy Inside

FF8/Menu sp2

2,247 bytes added, 01:15, 15 July 2019
no edit summary
by MaKi<br/>updated by Sebanisu
This file is a mapping file for atlas textures like icons.tex
==Layout of '''icon.sp1''': = STRUCTURE ==== Header ==='''(4 x (PointerCount + 1))''' bytes
{| class="wikitable"
! Offset
|-
| 0
| uintUInt32| pointerCountPointerCount| count Number of entry pointersentries
|-
| 4
| uintStruct Pointer[PointerCount]| entryPointerPointers| absolute pointer to Seek locations for entrygroups|} === Pointer ==='''4''' bytes{| class="wikitable"! Offset! SizeOf! Name! Description
|-
| 8 + pointerCount0| 16 bytesUInt16| EntryPointer| Entry DataSeek location for entry group|-| 2| UInt16| Count| Number of entries in group
|}
=== ENTRY Entry Group ==='''(8 x Count)''' bytes <br/>At pointer's location there will be '''Struct Entry[Count]'''. Example of an entry group is the direction pad is in eight pieces. Four of them are unpressed and four are pressed versions. It has four entries for the direction pad depending on the directions it is highlighting.
=== Entry ===
'''8''' bytes
{| class="wikitable"
! Offset
! Description
|-
| 0| uintByte| UNK3xPos| UNKNOWNPixel X coordinate in image atlas|-|1|Byte|yPos|Pixel Y coordinate in image atlas
|-
| 42| byteByte[2]| xPosUNK| Pixel X coordinate in image atlasUnknown data
|-
| 54| byteByte| yPosWidth| Pixel Y coordinate Width of entry in image atlaspixels
|-
| 65| ushort (??)Byte| UNKOffset X| Unknown- is that a bottom right pixel?Offset of X coordinate for when drawing
|-
| 86| uint (??)Byte| UNKHeight| Unknown- maybe a width/height?Height of entry in pixels
|-
| 127| uintByte| UNKOffset Y| Unknown- no idea. Maybe CLUT indexer somewhere?Offset of Y coordinate for when drawing
|}
Invalid Entries will have '''X''' and '''Y''' of '''zero'''. The top '''16x16''' pixel area is blank. Everything in '''icon.tex''' is aligned to a '''8x8 grid'''. Some entry groups leave out connecting pieces I think you are expected to fill in the blank. Some things like the menu border and menu background don't appear to be listed in this file.
===End of file===
Everything at and beyond file pointer '''4272 {0x10C0}''' appears to be garbage.
WIP- there== Layout of 's a lot of trash here''face... 80 20 a0 c0 28 (f8) (10) 00 00 00 a0 c0 (08) 00 (08) 00 look- f8 sp2''' and 10 are x and y and 08 and 08 are width x height- this one is fine with what is represented in the image, but it's totally different for face''cardanm.sp2''': ==
== Layout of Both '''face.sp2''' and '''cardanm.sp2''' have the same layout. Main difference is '''face.sp2''': has '''32''' valid and '''64''' total entries. '''cardanm.sp2''' only has '''11''' valid entries and '''1''' invalid, as it has no dims. In each of the card texture files the final slot is the '''Triple Triad''' card back. If the entry had dims they would be X='''192''',Y='''128''', W='''64''', H='''64'''.
=== Header ===
| Number of entries
Count can be more than the actual images in the texture.<br/>
'''face.sp2''': There are 16 8 images per texture in each of the 2 textures, and there are 32/64 valid entries. 1 is blank.<br/>'''cardanm.sp2''': There are 11 images pre texture in 10 textures, and there are 11/12 valid entries. The 12th entry is the card back but it's missing dims.
|-
| UInt32[Count]
| Locations
| Seek location for each Entryentry
|}
=== Entry ===
'''16''' bytes
{| class="wikitable"
|-
| 0
| byte[4]UInt32| UNKCount| UnknownNumber of entries at this locationAlways '''{0x01,0x00,0x00,0x00}1'''
|-
| 4
| yPos
| Pixel Y coordinate in image atlas
'''face.sp2''': Invalid entries seem to have '''yPos>=Texture.Height'''.<br />
Detected switch from '''face1.tex''' to '''face2.tex''' when '''yPos<previous.yPos'''.
|-
| UNK
| Unknown
'''face.sp2''': '''{0x20,0x36}''' on the valid entries. '''{0x60,0x36}''' on invalid entries.<br />'''cardanm.sp2''': '''{0x20,0xB6}''' on the valid entries. '''{0x00,0x00}''' on the invalid entry.
|-
| 8
| Width
| Width of entry in pixels
Possible this is really a '''byte''' with a '''0 x-offset'''.
|-
| 10
| Height
| Height of entry in pixels
Possible this is really a '''byte''' with a '''0 y-offset'''.
|-
| 12
| UNK
| Unknown
'''face.sp2''': '''{0x00,0x00,0x8E,0x00}''' on most. Last one has all '''{0x00}'''<br />'''cardanm.sp2''': '''{0x00,0x00,0xAE,0x00}''' on most. Last one has all '''{0x00}'''
|}
=== End of file ==='''face.sp2'''File ends with '''byte[16] ''' of '''{0x00}'''
=== Content of '''face1.tex''' and '''face2.tex''' ===
{| class="wikitable"
!Name
|48
|}
There is one blank space in '''face1.tex''', I skipped that entry.
=== Content of '''mc00.tex'''-'''mc09.tex''' ===
Each level on the [https://finalfantasy.fandom.com/wiki/Final_Fantasy_VIII_Triple_Triad_cards fandom wiki page]is in the same order of the contents of the tex files. The cardback is always the bottom right of each texture.