View Single Post
  #4  
Old February 16th, 2014, 12:38 PM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,930
Thanks: 442
Thanked 1,872 Times in 1,220 Posts
Mobhack is on a distinguished road
Default Re: Distorted shp images in MobHack??

Shped is using a zero-based index (normal "C" behaviour). So 87 is 88 i.e. pixels 0..87. SHPED is not our code, it is a third party utility provided for your convenience, with permission.

Mobhack adds 1 to give an end-user friendly result and not what makes sense to C programmers. End users tend to count from 1 up, not zero and up (the offset from the initial pointer index). That's why I report weapon slot 1 to 4, and not the 0 to 3 the game thinks they are, forex.

If replacing an existing SHP inside a SHP file then you have to use the exact same size. The icon sizes are hard-coded in internal game data. Your 89 pixel bitmap will likely have been packed into the space expected of the 88 square, so its going to produce weirdness.

Andy
Reply With Quote