More work on local features - hell temple

develop
Petr Mrázek 2010-04-27 23:48:25 +02:00
parent df3efe23fb
commit c37f164c39
3 changed files with 33 additions and 28 deletions

@ -14,10 +14,17 @@ namespace DFHack
enum e_feature
{
feature_Other,
feature_Adamantine_Tube,
feature_Underworld,
// add stuff here, don't reorder or delete
feature_Other = 10000,
feature_Hell_Temple,
};
static char * sa_feature[]=
{
"Other",
"Adamantine Tube",
"Underworld",
"Hell Temple"
};
union planecoord
{

@ -767,6 +767,12 @@ bool Maps::ReadLocalFeatures( std::map <planecoord, std::vector<t_feature *> > &
tftemp.sub_material = p->readDWord( cur_ptr + sub_mat_offset );
tftemp.type = feature_Adamantine_Tube;
}
else if(name == "feature_init_deep_surface_portalst")
{
tftemp.main_material = p->readWord( cur_ptr + main_mat_offset );
tftemp.sub_material = p->readDWord( cur_ptr + sub_mat_offset );
tftemp.type = feature_Hell_Temple;
}
else
{
tftemp.main_material = -1;

@ -439,8 +439,7 @@ void do_features(API& DF, mapblock40d * block, uint32_t blockX, uint32_t blockY,
gotoxy(printX,printY+1);
cprintf("You've discovered it already!");
}
if(ftr.type == feature_Underworld)
{
char * matname = "unknown";
// is stone?
if(ftr.main_material == 0)
@ -448,11 +447,9 @@ void do_features(API& DF, mapblock40d * block, uint32_t blockX, uint32_t blockY,
matname = stonetypes[ftr.sub_material].id;
}
gotoxy(printX,printY+2);
cprintf("Underworld, material %d/%d : %s", ftr.main_material, ftr.sub_material, matname);
}
else
cprintf("%d:%s, material %d/%d : %s", ftr.type, sa_feature[ftr.type], ftr.main_material, ftr.sub_material, matname);
{
gotoxy(printX,printY+2);
gotoxy(printX,printY+3);
string name = p->readClassName(p->readDWord( ftr.origin ));
cprintf("%s", name.c_str());
}
@ -471,8 +468,6 @@ void do_features(API& DF, mapblock40d * block, uint32_t blockX, uint32_t blockY,
gotoxy(printX,printY+ 5);
cprintf("You've discovered it already!");
}
if(ftr.type == feature_Adamantine_Tube)
{
char * matname = "unknown";
// is stone?
if(ftr.main_material == 0)
@ -480,15 +475,12 @@ void do_features(API& DF, mapblock40d * block, uint32_t blockX, uint32_t blockY,
matname = stonetypes[ftr.sub_material].id;
}
gotoxy(printX,printY+6);
cprintf("Underworld, material %d/%d : %s", ftr.main_material, ftr.sub_material, matname);
}
else
{
gotoxy(printX,printY+6);
cprintf("%d:%s, material %d/%d : %s", ftr.type, sa_feature[ftr.type], ftr.main_material, ftr.sub_material, matname);
gotoxy(printX,printY+7);
string name = p->readClassName(p->readDWord( ftr.origin ));
cprintf("%s", name.c_str());
}
}
else
{
gotoxy(printX,printY + 4);