Skip to content

Commit

Permalink
Use TOML for reading/writing TC settings
Browse files Browse the repository at this point in the history
  • Loading branch information
gliptic committed Aug 23, 2014
1 parent 56a33a3 commit 4b425f6
Show file tree
Hide file tree
Showing 34 changed files with 2,247 additions and 1,904 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tl"]
path = tl
url = https://github.com/gliptic/tl.git
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(CMAKE_CXX_FLAGS "-std=c++11")
set(SOURCES
bobject.cpp
bonus.cpp
common_exereader.cpp
common.cpp
console.cpp
constants.cpp
Expand Down
8 changes: 5 additions & 3 deletions _build/liero.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\common_exereader.cpp" />
<ClCompile Include="..\gfx\blit.cpp" />
<ClCompile Include="..\gfx\font.cpp" />
<ClCompile Include="..\gfx\palette.cpp" />
<ClCompile Include="..\gfx\renderer.cpp" />
<ClCompile Include="..\gfx\sprite.cpp" />
<ClCompile Include="..\gvl\containers\list.cpp" />
<ClCompile Include="..\gvl\io2\convert.cpp" />
<ClCompile Include="..\gvl\io2\stream.cpp" />
<ClCompile Include="..\gvl\io\convert.cpp" />
<ClCompile Include="..\gvl\support\bits.c" />
<ClCompile Include="..\gvl\support\debug.cpp" />
<ClCompile Include="..\gvl\support\platform.cpp" />
Expand All @@ -235,7 +236,6 @@
<ClCompile Include="..\bonus.cpp" />
<ClCompile Include="..\common.cpp" />
<ClCompile Include="..\console.cpp" />
<ClCompile Include="..\constants.cpp" />
<ClCompile Include="..\filesystem.cpp" />
<ClCompile Include="..\game.cpp" />
<ClCompile Include="..\level.cpp" />
Expand All @@ -257,6 +257,7 @@
<ClCompile Include="..\worm.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common_exereader.hpp" />
<ClInclude Include="..\gfx\bitmap.hpp" />
<ClInclude Include="..\gfx\blit.hpp" />
<ClInclude Include="..\gfx\color.hpp" />
Expand All @@ -270,10 +271,10 @@
<ClInclude Include="..\gvl\containers\pairing_heap.hpp" />
<ClInclude Include="..\gvl\crypt\gash.hpp" />
<ClInclude Include="..\gvl\cstdint.hpp" />
<ClInclude Include="..\gvl\io2\convert.hpp" />
<ClInclude Include="..\gvl\io2\deflate_filter.hpp" />
<ClInclude Include="..\gvl\io2\fstream.hpp" />
<ClInclude Include="..\gvl\io2\stream.hpp" />
<ClInclude Include="..\gvl\io\convert.hpp" />
<ClInclude Include="..\gvl\math\cmwc.hpp" />
<ClInclude Include="..\gvl\math\random.hpp" />
<ClInclude Include="..\gvl\math\rect.hpp" />
Expand All @@ -285,6 +286,7 @@
<ClInclude Include="..\gvl\serialization\coding.hpp" />
<ClInclude Include="..\gvl\serialization\context.hpp" />
<ClInclude Include="..\gvl\serialization\except.hpp" />
<ClInclude Include="..\gvl\serialization\toml.hpp" />
<ClInclude Include="..\gvl\support\bits.hpp" />
<ClInclude Include="..\gvl\support\config.h" />
<ClInclude Include="..\gvl\support\cstdint.hpp" />
Expand Down
18 changes: 11 additions & 7 deletions _build/liero.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
<ClCompile Include="..\bonus.cpp" />
<ClCompile Include="..\common.cpp" />
<ClCompile Include="..\console.cpp" />
<ClCompile Include="..\constants.cpp" />
<ClCompile Include="..\filesystem.cpp" />
<ClCompile Include="..\game.cpp" />
<ClCompile Include="..\level.cpp" />
Expand All @@ -85,9 +84,6 @@
<Filter>mixer</Filter>
</ClCompile>
<ClCompile Include="..\stats_recorder.cpp" />
<ClCompile Include="..\gvl\io\convert.cpp">
<Filter>gvl\io</Filter>
</ClCompile>
<ClCompile Include="..\gvl\system\system.c">
<Filter>gvl\system</Filter>
</ClCompile>
Expand Down Expand Up @@ -118,6 +114,10 @@
<ClCompile Include="..\gvl\io2\stream.cpp">
<Filter>gvl\io2</Filter>
</ClCompile>
<ClCompile Include="..\gvl\io2\convert.cpp">
<Filter>gvl\io2</Filter>
</ClCompile>
<ClCompile Include="..\common_exereader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\gfx\blit.hpp">
Expand Down Expand Up @@ -170,9 +170,6 @@
<ClInclude Include="..\gfx\bitmap.hpp">
<Filter>gfx</Filter>
</ClInclude>
<ClInclude Include="..\gvl\io\convert.hpp">
<Filter>gvl\io</Filter>
</ClInclude>
<ClInclude Include="..\gvl\math\cmwc.hpp">
<Filter>gvl\math</Filter>
</ClInclude>
Expand Down Expand Up @@ -295,6 +292,13 @@
<ClInclude Include="..\gvl\zlib\zlib2.h">
<Filter>gvl\zlib</Filter>
</ClInclude>
<ClInclude Include="..\gvl\io2\convert.hpp">
<Filter>gvl\io2</Filter>
</ClInclude>
<ClInclude Include="..\gvl\serialization\toml.hpp">
<Filter>gvl\serialization</Filter>
</ClInclude>
<ClInclude Include="..\common_exereader.hpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\Jamfile" />
Expand Down
2 changes: 1 addition & 1 deletion ai/predictive_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ double totalAmmoWorth(Game& game, Worm* w)
for (int i = 0; i < 5; ++i)
{
WormWeapon& weap = w->weapons[i];
Weapon& winfo = game.common->weapons[weap.id];
Weapon const& winfo = *weap.type;

if (weap.loadingLeft > 0)
ammoWorth += 3.0 - (weap.loadingLeft * 3.0) / winfo.loadingTime;
Expand Down
Loading

0 comments on commit 4b425f6

Please sign in to comment.