Hats.wiki
changeset 1126 756712384ff3
parent 1125 2e4c07468366
child 1127 87e8bb1e7a29
equal deleted inserted replaced
1125:2e4c07468366 1126:756712384ff3
     9 There are two types of hats: normal hats and team hats.
     9 There are two types of hats: normal hats and team hats.
    10 Normal hats look always the same.
    10 Normal hats look always the same.
    11 Team hats are hats which will be colored accordingly to the team color.
    11 Team hats are hats which will be colored accordingly to the team color.
    12 I.e. if a hedgehog plays in a red team, its hat will we red.
    12 I.e. if a hedgehog plays in a red team, its hat will we red.
    13 
    13 
    14 Additionally, all hats can be animated.
    14 Additionally, hats can be either static or animated.
    15 
    15 
    16 In the default Hedgewars installation, most hats are normal hats, and many hats have animations.
    16 In the default Hedgewars installation, most hats are normal hats, and many hats are animated.
    17 Examples for team hats in the default Hedgewars installation are `cap_team` and `hair_team`. Please note that those hats currently have no proper preview images.
    17 Examples for team hats in the default Hedgewars installation are `cap_team` and `hair_team`. Please note that those hats currently have no proper preview images.
    18 
    18 
    19 == Data structure ==
    19 == Data structure ==
    20 Hats are specified as PNG files with alpha channel.
    20 Hats are specified as PNG files with alpha channel.
    21 They consist of a set of sub-images of a size 32px×32px each.
    21 They consist of a set of sub-images of a size 32px×32px each.
    22 Hedgewars counts the sub-images, or animation frames, from top-left to
    22 Hedgewars counts the sub-images, or animation frames, from top-left to
    23 bottom-left, then it goes on with the next column, etc.
    23 bottom-left, then it goes on with the next column, etc.
    24 
    24 
    25 === Static normal hats ===
    25 === Static normal hats ===
    26 The simplest hat is a static normal hat. It's not animated. It's just a single 32×32 image containing the hat. This image will be put on the hedgehog's head with a vertical offset of 5 pixels.
    26 These are the simplest hats. It's just a single 32×32 image containing the hat. This image will be put on the hedgehog's head with a vertical offset of 5 pixels.
    27 
    27 
    28 That's it!
    28 That's it!
    29 
    29 
    30 === Static team hats ===
    30 === Static team hats ===
    31 This is a 64px×32px image with 2 frames. The left half is the base coloring of the helmet, the right half should _only_ use grayscale colors. The left part may be completely blank. The same offset of 5 pixels applies here.
    31 This is a 64px×32px image with 2 frames. The left half is the base coloring of the helmet, the right half should _only_ use grayscale colors. The left part may be completely blank. The same offset of 5 pixels applies here.