Use enums for most of the rest of the game constants.

This adds an "enum map" type that allows safe usage of an enum to index an array.
(That is, it enforces that the index is of the enum type.)
This commit is contained in:
2019-11-23 21:12:47 -05:00
parent 0001f754ac
commit 4f785e2650
19 changed files with 287 additions and 209 deletions

View File

@@ -326,6 +326,7 @@
<ClInclude Include="..\..\..\src\sounds.hpp" />
<ClInclude Include="..\..\..\src\spell.hpp" />
<ClInclude Include="..\..\..\src\tools\cursors.hpp" />
<ClInclude Include="..\..\..\src\tools\enum_map.hpp" />
<ClInclude Include="..\..\..\src\tools\gitrev.hpp" />
<ClInclude Include="..\..\..\src\tools\menu_accel.win.hpp" />
<ClInclude Include="..\..\..\src\tools\prefs.hpp" />

View File

@@ -978,6 +978,9 @@
<ClInclude Include="..\..\..\src\dialogxml\dialogs\3choice.hpp">
<Filter>DialogXML\Dialogs</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\tools\enum_map.hpp">
<Filter>Tools</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\src\scenario\town_import.tpp">