| 710 | } |
| 711 | |
| 712 | void CGame::CheckStaticTileFilterFiles() |
| 713 | { |
| 714 | memset(&m_StaticTilesFilterFlags[0], 0, sizeof(m_StaticTilesFilterFlags)); |
| 715 | |
| 716 | auto path = g_App.FilePath("data"); |
| 717 | fs_path_create(path); |
| 718 | |
| 719 | auto filePath = fs_path_join(path, "cave.txt"); |
| 720 | if (!fs_path_exists(filePath)) |
| 721 | { |
| 722 | CFileWriter file; |
| 723 | file.Init(filePath); |
| 724 | file.Print("#Format: graphic\n"); |
| 725 | for (int i = 0x053B; i < 0x0553 + 1; i++) |
| 726 | { |
| 727 | if (i != 0x0550) |
| 728 | { |
| 729 | file.Print("0x%04X\n", i); |
| 730 | } |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | filePath = fs_path_join(path, "vegetation.txt"); |
| 735 | CFileWriter vegetationFile; |
| 736 | if (!fs_path_exists(filePath)) |
| 737 | { |
| 738 | vegetationFile.Init(filePath); |
| 739 | vegetationFile.Print("#Format: graphic\n"); |
| 740 | static const int vegetationTilesCount = 178; |
| 741 | static const uint16_t vegetationTiles[vegetationTilesCount] = { |
| 742 | 0x0D45, 0x0D46, 0x0D47, 0x0D48, 0x0D49, 0x0D4A, 0x0D4B, 0x0D4C, 0x0D4D, 0x0D4E, 0x0D4F, |
| 743 | 0x0D50, 0x0D51, 0x0D52, 0x0D53, 0x0D54, 0x0D5C, 0x0D5D, 0x0D5E, 0x0D5F, 0x0D60, 0x0D61, |
| 744 | 0x0D62, 0x0D63, 0x0D64, 0x0D65, 0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6D, 0x0D73, 0x0D74, |
| 745 | 0x0D75, 0x0D76, 0x0D77, 0x0D78, 0x0D79, 0x0D7A, 0x0D7B, 0x0D7C, 0x0D7D, 0x0D7E, 0x0D7F, |
| 746 | 0x0D80, 0x0D83, 0x0D87, 0x0D88, 0x0D89, 0x0D8A, 0x0D8B, 0x0D8C, 0x0D8D, 0x0D8E, 0x0D8F, |
| 747 |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 761 | for (int i = 0; i < vegetationTilesCount; i++) |
| 762 | { |
| 763 | const int64_t flags = g_Game.GetStaticFlags(vegetationTiles[i]); |
| 764 | if ((flags & 0x00000040) != 0) |
| 765 | { |
| 766 | continue; |
| 767 | } |
| 768 | vegetationFile.Print("0x%04X\n", vegetationTiles[i]); |
| 769 | } |
nothing calls this directly
no test coverage detected