Fix Visual Studio build

This commit is contained in:
2016-09-13 22:54:53 -04:00
parent 67dc5b3511
commit d39da71778
10 changed files with 17 additions and 30 deletions

View File

@@ -20,7 +20,6 @@
<ClInclude Include="..\..\classes\outdoors.hpp" />
<ClInclude Include="..\..\classes\party.hpp" />
<ClInclude Include="..\..\classes\pc.hpp" />
<ClInclude Include="..\..\classes\regtown.hpp" />
<ClInclude Include="..\..\classes\scenario.hpp" />
<ClInclude Include="..\..\classes\shop.hpp" />
<ClInclude Include="..\..\classes\simpletypes.hpp" />
@@ -28,7 +27,6 @@
<ClInclude Include="..\..\classes\spell.hpp" />
<ClInclude Include="..\..\classes\talking.hpp" />
<ClInclude Include="..\..\classes\terrain.hpp" />
<ClInclude Include="..\..\classes\tmpltown.hpp" />
<ClInclude Include="..\..\classes\town.hpp" />
<ClInclude Include="..\..\classes\universe.hpp" />
<ClInclude Include="..\..\classes\vehicle.hpp" />
@@ -83,14 +81,12 @@
<ClCompile Include="..\..\classes\outdoors.cpp" />
<ClCompile Include="..\..\classes\party.cpp" />
<ClCompile Include="..\..\classes\pc.cpp" />
<ClCompile Include="..\..\classes\regtown.cpp" />
<ClCompile Include="..\..\classes\scenario.cpp" />
<ClCompile Include="..\..\classes\shop.cpp" />
<ClCompile Include="..\..\classes\special.cpp" />
<ClCompile Include="..\..\classes\spell.cpp" />
<ClCompile Include="..\..\classes\talking.cpp" />
<ClCompile Include="..\..\classes\terrain.cpp" />
<ClCompile Include="..\..\classes\tmpltown.cpp" />
<ClCompile Include="..\..\classes\town.cpp" />
<ClCompile Include="..\..\classes\universe.cpp" />
<ClCompile Include="..\..\classes\vehicle.cpp" />

View File

@@ -67,9 +67,6 @@
<ClInclude Include="..\..\classes\pc.hpp">
<Filter>Classes\Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\classes\regtown.hpp">
<Filter>Classes\Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\classes\scenario.hpp">
<Filter>Classes\Header Files</Filter>
</ClInclude>
@@ -91,9 +88,6 @@
<ClInclude Include="..\..\classes\terrain.hpp">
<Filter>Classes\Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\classes\tmpltown.hpp">
<Filter>Classes\Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\classes\town.hpp">
<Filter>Classes\Header Files</Filter>
</ClInclude>
@@ -252,9 +246,6 @@
<ClCompile Include="..\..\classes\pc.cpp">
<Filter>Classes\Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\classes\regtown.cpp">
<Filter>Classes\Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\classes\scenario.cpp">
<Filter>Classes\Source Files</Filter>
</ClCompile>
@@ -273,9 +264,6 @@
<ClCompile Include="..\..\classes\terrain.cpp">
<Filter>Classes\Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\classes\tmpltown.cpp">
<Filter>Classes\Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\classes\town.cpp">
<Filter>Classes\Source Files</Filter>
</ClCompile>

View File

@@ -59,7 +59,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;sfml-audio-d.lib;libboost_filesystem-vc120-mt-gd-1_55.lib;libboost_system-vc120-mt-gd-1_55.lib;libboost_thread-vc120-mt-gd-1_55.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;sfml-audio-d.lib;libboost_filesystem-vc120-mt-gd-*.lib;libboost_system-vc120-mt-gd-*.lib;libboost_thread-vc120-mt-gd-*.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
<ResourceCompile>

View File

@@ -63,7 +63,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;sfml-audio-d.lib;libboost_filesystem-vc120-mt-gd-1_55.lib;libboost_system-vc120-mt-gd-1_55.lib;libboost_thread-vc120-mt-gd-1_55.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;sfml-audio-d.lib;libboost_filesystem-vc120-mt-gd-*.lib;libboost_system-vc120-mt-gd-*.lib;libboost_thread-vc120-mt-gd-*.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
<ResourceCompile>
@@ -88,7 +88,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>opengl32.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-audio.lib;libboost_filesystem-vc120-mt-1_55.lib;libboost_system-vc120-mt-1_55.lib;libboost_thread-vc120-mt-1_55.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-audio.lib;libboost_filesystem-vc120-mt-*.lib;libboost_system-vc120-mt-*.lib;libboost_thread-vc120-mt-*.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>

View File

@@ -63,7 +63,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;sfml-audio-d.lib;libboost_filesystem-vc120-mt-gd-1_55.lib;libboost_system-vc120-mt-gd-1_55.lib;libboost_thread-vc120-mt-gd-1_55.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;sfml-system-d.lib;sfml-window-d.lib;sfml-graphics-d.lib;sfml-audio-d.lib;libboost_filesystem-vc120-mt-gd-*.lib;libboost_system-vc120-mt-gd-*.lib;libboost_thread-vc120-mt-gd-*.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
<ResourceCompile>
@@ -88,7 +88,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>opengl32.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-audio.lib;libboost_filesystem-vc120-mt-1_55.lib;libboost_system-vc120-mt-1_55.lib;libboost_thread-vc120-mt-1_55.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-audio.lib;libboost_filesystem-vc120-mt-*.lib;libboost_system-vc120-mt-*.lib;libboost_thread-vc120-mt-*.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>

View File

@@ -33,7 +33,6 @@ enum {
extern short on_spell_menu[2][62];
extern short on_monst_menu[256];
extern bool party_in_memory;
extern short current_pc;
extern cUniverse univ;
extern eGameMode overall_mode;
extern sf::RenderWindow mainPtr;
@@ -179,7 +178,7 @@ void adjust_spell_menus() {
short old_on_spell_menu[2][62];
bool need_menu_change = false;
if(overall_mode == MODE_STARTUP || current_pc == 6)
if(overall_mode == MODE_STARTUP || univ.cur_pc == 6)
return;
for(i = 0; i < 2; i++)
@@ -192,7 +191,7 @@ void adjust_spell_menus() {
on_spell_menu[0][i] = -1;
}
for(i = 0; i < 62; i++)
if(pc_can_cast_spell(current_pc, cSpell::fromNum(eSkill::MAGE_SPELLS, i))) {
if(pc_can_cast_spell(univ.current_pc(), cSpell::fromNum(eSkill::MAGE_SPELLS, i))) {
on_spell_menu[0][spell_pos] = i;
spell_pos++;
}
@@ -222,7 +221,7 @@ void adjust_spell_menus() {
on_spell_menu[1][i] = -1;
}
for(i = 0; i < 62; i++)
if(pc_can_cast_spell(current_pc, cSpell::fromNum(eSkill::PRIEST_SPELLS, i))) {
if(pc_can_cast_spell(univ.current_pc(), cSpell::fromNum(eSkill::PRIEST_SPELLS, i))) {
on_spell_menu[1][spell_pos] = i;
spell_pos++;
}

View File

@@ -1190,7 +1190,6 @@ bool cParty::pc_present(short i) const {
return !isSplit(adven[i]->main_status);
}
extern cUniverse univ;
bool cParty::start_split(short x,short y,snd_num_t noise,short who) {
if(who >= 6 || who < 0) return false;
if(is_split())
@@ -1213,8 +1212,8 @@ bool cParty::end_split(snd_num_t noise) {
if(!is_split())
return false;
for(short i = 0; i < 6; i++){
if(isSplit(univ.party[i].main_status))
univ.party[i].main_status -= eMainStatus::SPLIT;
if(isSplit(adven[i]->main_status))
adven[i]->main_status -= eMainStatus::SPLIT;
}
play_sound(noise);
return true;

View File

@@ -13,6 +13,7 @@
#include <map>
#include <iosfwd>
#include <array>
#include <bitset>
#include "simpletypes.hpp"
#include "item.hpp"

View File

@@ -118,8 +118,6 @@ cScenario::cScenario(const cScenario& other)
, campaign_id(other.campaign_id)
, scen_items(other.scen_items)
, scen_name(other.scen_name)
, who_wrote{other.who_wrote[0], other.who_wrote[1]}
, contact_info{other.contact_info[0], other.contact_info[1]}
, intro_strs(other.intro_strs)
, journal_strs(other.journal_strs)
, spec_strs(other.spec_strs)
@@ -130,6 +128,11 @@ cScenario::cScenario(const cScenario& other)
, towns(other.towns.size())
, outdoors(other.outdoors.width(), other.outdoors.height())
{
// MSVC 12 doesn't like arrays in the initializer list. :(
who_wrote[0] = other.who_wrote[0];
who_wrote[1] = other.who_wrote[1];
contact_info[0] = other.contact_info[0];
contact_info[1] = other.contact_info[1];
// Copy towns and sectors
for(size_t i = 0; i < towns.size(); i++)
towns[i] = new cTown(*other.towns[i]);

View File

@@ -12,6 +12,7 @@
#include <vector>
#include <iosfwd>
#include <array>
#include <bitset>
#include "simpletypes.hpp"
#include "location.hpp"
#include "special.hpp"