-
Notifications
You must be signed in to change notification settings - Fork 55
/
BuildingConfiguration.cpp
52 lines (45 loc) · 1.26 KB
/
BuildingConfiguration.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "SpriteMaps.h"
#include "BuildingConfiguration.h"
#include "GameBuildings.h"
#include "ContentLoader.h"
using namespace std;
using namespace DFHack;
using namespace df::enums;
bool BuildingNamesTranslatedFromGame = false;
BuildingConfiguration::BuildingConfiguration(string name, int game_type, int game_subtype, int32_t custom)
{
this->name = name;
this->game_type = game_type;
this->game_subtype = game_subtype;
this->game_custom = custom;
this->width = this->height = 1;
this->canBeFloating = false;
this->canBeAnySize = false;
this->sprites = nullptr;
}
BuildingConfiguration::BuildingConfiguration()
{
this->name = "";
this->game_type = -1;
this->game_subtype = -1;
this->game_custom = -1;
this->width = this->height = 1;
this->canBeFloating = false;
this->canBeAnySize = false;
this->sprites = nullptr;
}
BuildingConfiguration::~BuildingConfiguration(void)
{
//cant delete bc.sprites here- screws up BCs copy semantics
}
void DumpBuildingNamesToDisk()
{
/*
FILE* fp = fopen("buildingdump.txt", "w");
if(!fp) return;
for(uint32_t j=0; j < contentLoader->classIdStrings.size(); j++){
fprintf(fp, "%i:%s\n",j, contentLoader->classIdStrings[j].c_str());
}
fclose(fp);
*/
}