Use IntsToStr function from gamecore.h

This commit is contained in:
Patiga 2020-10-27 12:15:11 +01:00
parent 090b0942fb
commit cce91746da

View file

@ -7,6 +7,7 @@
#include <engine/shared/datafile.h>
#include <engine/storage.h>
#include <game/mapitems.h>
#include <game/gamecore.h>
#include <pnglite.h>
/*
@ -64,23 +65,6 @@ int LoadPNG(CImageInfo *pImg, const char *pFilename)
return 1;
}
inline void IntsToStr(const int *pInts, int Num, char *pStr)
{
while(Num)
{
pStr[0] = (((*pInts) >> 24) & 0xff) - 128;
pStr[1] = (((*pInts) >> 16) & 0xff) - 128;
pStr[2] = (((*pInts) >> 8) & 0xff) - 128;
pStr[3] = ((*pInts) & 0xff) - 128;
pStr += 4;
pInts++;
Num--;
}
// null terminate
pStr[-1] = 0;
}
bool CheckImageDimensions(void *pItem, int Type, const char *pFilename)
{
if(Type != MAPITEMTYPE_LAYER)