Day 45 is complete.
This commit is contained in:
+19
-1
@@ -56,6 +56,12 @@ static U32 GetTileValue(tile_map *TileMap, U32 AbsTileX, U32 AbsTileY, U32 AbsTi
|
||||
return TileChunkValue;
|
||||
}
|
||||
|
||||
static B32 IsTileValueEmpty(U32 TileValue)
|
||||
{
|
||||
B32 Empty = ((TileValue == 1) || (TileValue == 3) || (TileValue == 4));
|
||||
return Empty;
|
||||
}
|
||||
|
||||
static U32 GetTileValueByPos(tile_map *TileMap, tile_map_position Pos)
|
||||
{
|
||||
U32 TileChunkValue = GetTileValue(TileMap, Pos.AbsTileX, Pos.AbsTileY, Pos.AbsTileZ);
|
||||
@@ -81,7 +87,7 @@ static void SetTileChunkValue(tile_map *TileMap, tile_chunk *TileChunk, U32 Test
|
||||
static B32 IsTileMapPointEmpty(tile_map *TileMap, tile_map_position Pos)
|
||||
{
|
||||
U32 TileChunkValue = GetTileValueByPos(TileMap, Pos);
|
||||
B32 Empty = ((TileChunkValue == 1) || (TileChunkValue == 3) || (TileChunkValue == 4));
|
||||
B32 Empty = IsTileValueEmpty(TileChunkValue);
|
||||
return Empty;
|
||||
}
|
||||
|
||||
@@ -150,3 +156,15 @@ static tile_map_difference SubtractInF32(tile_map *TileMap, tile_map_position *A
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
static tile_map_position CenteredTilePoint(U32 AbsTileX, U32 AbsTileY, U32 AbsTileZ)
|
||||
{
|
||||
tile_map_position Result;
|
||||
memset(&Result, 0, sizeof(Result));
|
||||
|
||||
Result.AbsTileX = AbsTileX;
|
||||
Result.AbsTileY = AbsTileY;
|
||||
Result.AbsTileZ = AbsTileZ;
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user