2018-10-05 09:20:30 +00:00
|
|
|
#include "mapitems_ex.h"
|
|
|
|
|
2022-08-10 01:51:03 +00:00
|
|
|
#include <base/math.h>
|
2018-10-05 09:20:30 +00:00
|
|
|
#include <engine/shared/uuid_manager.h>
|
|
|
|
|
2022-08-10 01:51:03 +00:00
|
|
|
int GetParallaxZoom(const CMapItemGroup *pGroup, const CMapItemGroupEx *pGroupEx)
|
|
|
|
{
|
|
|
|
if(pGroupEx)
|
|
|
|
return pGroupEx->m_ParallaxZoom;
|
|
|
|
|
|
|
|
return GetParallaxZoomDefault(pGroup->m_ParallaxX, pGroup->m_ParallaxY);
|
|
|
|
}
|
|
|
|
|
|
|
|
int GetParallaxZoomDefault(int ParallaxX, int ParallaxY)
|
|
|
|
{
|
|
|
|
return clamp(maximum(ParallaxX, ParallaxY), 0, 100);
|
|
|
|
}
|
|
|
|
|
2018-10-05 09:20:30 +00:00
|
|
|
void RegisterMapItemTypeUuids(CUuidManager *pManager)
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
#define UUID(id, name) pManager->RegisterName(id, name);
|
|
|
|
#include "mapitems_ex_types.h"
|
|
|
|
#undef UUID
|
2018-10-05 09:20:30 +00:00
|
|
|
}
|