Adds a custom sized type for the world tile rectagle.
This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
EXPECT_EQ(region[4][4],1)<<"Reverse iterators are required";
EXPECT_EQ(region[4][2],3)<<"Reverse iterators are required";
@ -75,14 +76,14 @@ TEST(DrlgTest, ThemeRoomSize)
{
memset(dungeon,0,sizeof(dungeon));
EXPECT_EQ(GetSizeForThemeRoom(),Size(8,8))<<"All floor theme area should be 8x8";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(8,8))<<"All floor theme area should be 8x8";
dungeon[9][9]=1;
EXPECT_EQ(GetSizeForThemeRoom(),Size(7,7))<<"Corners shrink the chosen dimensions";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(7,7))<<"Corners shrink the chosen dimensions";
dungeon[9][5]=1;
EXPECT_EQ(GetSizeForThemeRoom(),Size(7,3))<<"Minimum dimensions are determined by corners outside the min area";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(7,3))<<"Minimum dimensions are determined by corners outside the min area";
dungeon[9][4]=1;
EXPECT_EQ(GetSizeForThemeRoom(),Size(7,8))<<"Walls below the min size let larger opposing dimensions get picked";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(7,8))<<"Walls below the min size let larger opposing dimensions get picked";
dungeon[9][5]=0;
dungeon[9][4]=0;
dungeon[9][9]=0;
@ -90,10 +91,10 @@ TEST(DrlgTest, ThemeRoomSize)
// Time for some unusual cases
dungeon[7][2]=1;
dungeon[5][9]=1;
EXPECT_EQ(GetSizeForThemeRoom(),Size(5,7))<<"Search space terminates at width 8 due to the wall being in the first three rows";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(5,7))<<"Search space terminates at width 8 due to the wall being in the first three rows";
dungeon[6][4]=1;
EXPECT_EQ(GetSizeForThemeRoom(),Size(4,7))<<"Smallest width now defined by row 5, height still extends due to minSize";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(4,7))<<"Smallest width now defined by row 5, height still extends due to minSize";
dungeon[6][4]=0;
dungeon[5][9]=0;
@ -102,7 +103,7 @@ TEST(DrlgTest, ThemeRoomSize)
dungeon[7][0]=1;
dungeon[6][6]=1;
dungeon[8][5]=1;
EXPECT_EQ(GetSizeForThemeRoom(),Size(4,4))<<"Search is terminated by the 0 width row 7, inset corner gives a larger height than otherwise expected";
EXPECT_EQ(GetSizeForThemeRoom(),WorldTileSize(4,4))<<"Search is terminated by the 0 width row 7, inset corner gives a larger height than otherwise expected";