Shadowox
Active Member
Greetings,
The pic format file is simple but i dont see any posts detailing about the structure, so im posting it to help the community if anyone is interested anyway. I made it based on the Tibia 7.70 pic file.
The pic format file is simple but i dont see any posts detailing about the structure, so im posting it to help the community if anyone is interested anyway. I made it based on the Tibia 7.70 pic file.
Code:
byte(s) description
[4] tibia pic versioon
[2] number of images
[1] number of 32x32 sprites that compose the image (horizontal)
[1] number of 32x32 sprites that compose the image (vertical)
[1] transparent red
[1] transparent green
[1] transparent blue
# repeat (number of sprites horizontal * number of sprites vertical) reading the offset and jump to sprite data
[4] offset to 32x32 image
[4] offset to the next 32x32 image
...
[4] last offset for this image
# next image
[1] number of 32x32 sprites that compose the image (horizontal)
[1] number of 32x32 sprites that compose the image (vertical)
[1] transparent red
[1] transparent green
[1] transparent blue
# repeat (number of sprites horizontal * number of sprites vertical) reading the offset and jump to sprite data
[4] offset to 32x32 image
[4] offset to the next 32x32 image
...
[4] last offset for this image
...
# sprite data
[2] number bytes to read
# repeat until number bytes to read or read the whole chunk and process.
[2] number of transparent pixels
[2] number of colored pixels
[1] red value
[1] green value
[1] blue value
...
[2] number of transparent pixels
[2] number of colored pixels
[1] red value
[1] green value
[1] blue value