Page 1 of 1

howto fix "Error AtlasSystem.cpp:1499"

Posted: Wed Jan 22, 2020 9:55 am
by ixu
A Mod gives the following error message:

Code: Select all

Error AtlasSystem.cpp:1499: The given sprite rectangle (left_top=0x0, right_bottom=64x64) is outside the actual sprite size (left_top=0x0, right_bottom=32x32).
If this is being used as an icon you may need to define the icon_size property.: __hardCrafting__/graphics/icons/big-processing-machine.png; mods: hardCrafting
How can I fix this?

Re: howto fix "Error AtlasSystem.cpp:1499"

Posted: Wed Jan 22, 2020 11:08 am
by Optera
That's what you get when you deepcopy a prototype, change icon and don't bother setting icon_size.
It only worked in 0.17 since icon_size was 32 for all base icons.
0.18 changed all base icons to a mipmap of 64, 32, 16 and 8.

To prevent such errors always set icon_size to match the file referenced in icon.
With 0.18 also set icon_mipmaps to match or it'll spam warnings during loading.