Fix diggingInvaders compilation errors (#1145, GCC 4.8)

develop
lethosor 2017-08-06 21:01:36 -04:00
parent 16fb230ef6
commit a383cc9a30
5 changed files with 11 additions and 4 deletions

@ -108,7 +108,7 @@ if (BUILD_SUPPORTED)
DFHACK_PLUGIN(deramp deramp.cpp) DFHACK_PLUGIN(deramp deramp.cpp)
DFHACK_PLUGIN(dig dig.cpp) DFHACK_PLUGIN(dig dig.cpp)
DFHACK_PLUGIN(digFlood digFlood.cpp) DFHACK_PLUGIN(digFlood digFlood.cpp)
# add_subdirectory(diggingInvaders) add_subdirectory(diggingInvaders)
DFHACK_PLUGIN(dwarfvet dwarfvet.cpp) DFHACK_PLUGIN(dwarfvet dwarfvet.cpp)
DFHACK_PLUGIN(dwarfmonitor dwarfmonitor.cpp LINK_LIBRARIES lua) DFHACK_PLUGIN(dwarfmonitor dwarfmonitor.cpp LINK_LIBRARIES lua)
DFHACK_PLUGIN(embark-tools embark-tools.cpp) DFHACK_PLUGIN(embark-tools embark-tools.cpp)

@ -20,6 +20,7 @@
#include "df/item_type.h" #include "df/item_type.h"
#include "df/item_weaponst.h" #include "df/item_weaponst.h"
#include "df/job.h" #include "df/job.h"
#include "df/job_list_link.h"
#include "df/job_skill.h" #include "df/job_skill.h"
#include "df/job_type.h" #include "df/job_type.h"
#include "df/reaction_product_itemst.h" #include "df/reaction_product_itemst.h"
@ -27,8 +28,11 @@
#include "df/ui.h" #include "df/ui.h"
#include "df/unit.h" #include "df/unit.h"
#include "df/unit_inventory_item.h" #include "df/unit_inventory_item.h"
#include "df/world.h"
#include "df/world_site.h" #include "df/world_site.h"
using namespace DFHack;
void getRidOfOldJob(df::unit* unit) { void getRidOfOldJob(df::unit* unit) {
if ( unit->job.current_job == NULL ) { if ( unit->job.current_job == NULL ) {
return; return;

@ -2,6 +2,7 @@
#include "edgeCost.h" #include "edgeCost.h"
#include "ColorText.h"
#include "modules/MapCache.h" #include "modules/MapCache.h"
#include <unordered_map> #include <unordered_map>
@ -9,5 +10,5 @@
using namespace std; using namespace std;
int32_t assignJob(color_ostream& out, Edge firstImportantEdge, unordered_map<df::coord,df::coord,PointHash> parentMap, unordered_map<df::coord,cost_t,PointHash>& costMap, vector<int32_t>& invaders, unordered_set<df::coord,PointHash>& requiresZNeg, unordered_set<df::coord,PointHash>& requiresZPos, MapExtras::MapCache& cache, DigAbilities& abilities); int32_t assignJob(DFHack::color_ostream& out, Edge firstImportantEdge, unordered_map<df::coord,df::coord,PointHash> parentMap, unordered_map<df::coord,cost_t,PointHash>& costMap, vector<int32_t>& invaders, unordered_set<df::coord,PointHash>& requiresZNeg, unordered_set<df::coord,PointHash>& requiresZPos, MapExtras::MapCache& cache, DigAbilities& abilities);

@ -19,6 +19,8 @@
#include <iostream> #include <iostream>
using namespace DFHack;
/* /*
cost_t costWeight[] = { cost_t costWeight[] = {
//Distance //Distance

@ -93,6 +93,6 @@ struct PointHash {
} }
}; };
cost_t getEdgeCost(color_ostream& out, df::coord pt1, df::coord pt2, DigAbilities& abilities); cost_t getEdgeCost(DFHack::color_ostream& out, df::coord pt1, df::coord pt2, DigAbilities& abilities);
std::vector<Edge>* getEdgeSet(color_ostream &out, df::coord point, MapExtras::MapCache& cache, int32_t xMax, int32_t yMax, int32_t zMax, DigAbilities& abilities); std::vector<Edge>* getEdgeSet(DFHack::color_ostream &out, df::coord point, MapExtras::MapCache& cache, int32_t xMax, int32_t yMax, int32_t zMax, DigAbilities& abilities);