ObsidianX / 3dstools

Tools for extracting and packing resources found in 3DS games
53 stars 16 forks source link

Fix sheet offset and integer division #19

Closed pleonex closed 6 years ago

pleonex commented 6 years ago

The sheetOffset was ignored since the position variable was 0 always. In some games this was adding garbage to the beginning of the fonts.

The second fix is for generating fonts with format A4. In that case, the division of data_pos by 2 may get a float instead of an integer so you couldn't use that variable in data[data_pos]. I replace the division operator with a integer division.

ObsidianX commented 6 years ago

Thanks for the patch!