#ifndef POKEPLATINUM_CONSTANTS_FIELD_MAP_H
#define POKEPLATINUM_CONSTANTS_FIELD_MAP_H

#include <nitro/fx/fx_const.h>
#include <nitro/types.h>

#define MAP_OBJECT_TILE_SIZE (16 * FX32_ONE)

#define MAP_TILES_COUNT_X 32
#define MAP_TILES_COUNT_Z 32

#define INVALID_LAND_DATA_ID             0xFFFF
#define INVALID_TERRAIN_ATTRIBUTES       -1
#define OUT_OF_BOUNDS_TERRAIN_ATTRIBUTES -2
#define INVALID_MAP_MATRIX_INDEX         -1

#define TERRAIN_ATTRIBUTES_OFFSET 0x10
#define TERRAIN_ATTRIBUTES_SIZE   0x800
#define TERRAIN_ATTRIBUTES_COUNT  (TERRAIN_ATTRIBUTES_SIZE / sizeof(u16))

#define TERRAIN_ATTRIBUTES_COLLISION_SHIFT        15
#define TERRAIN_ATTRIBUTES_COLLISION_MASK         0x8000
#define TERRAIN_ATTRIBUTES_COLLISION_MASK_SHIFTED (TERRAIN_ATTRIBUTES_COLLISION_MASK >> TERRAIN_ATTRIBUTES_COLLISION_SHIFT)

#define TERRAIN_ATTRIBUTES_TILE_BEHAVIOR_MASK 0xFF

#endif // POKEPLATINUM_CONSTANTS_FIELD_MAP_H
