Fix preset creatures not showing up on Windows
This commit is contained in:
@@ -292,12 +292,6 @@ void start_town_mode(short which_town, short entry_dir) {
|
||||
// First set up the values.
|
||||
cCreature& preset = univ.town->creatures(i);
|
||||
univ.town.monst.assign(i, preset, univ.scenario.scen_monsters[preset.number], PSD[SDF_EASY_MODE], univ.difficulty_adjust());
|
||||
univ.town.monst[i].target = 6;
|
||||
univ.town.monst[i].active = 1; // TODO: Can those two \/ be commented out?
|
||||
//univ.town.monst[i].attitude = univ.town->creatures(i).start_attitude;
|
||||
//univ.town.monst[i].cur_loc = univ.town->creatures(i).start_loc;
|
||||
//univ.town.monst[i].mobility = univ.town->creatures(i).mobility;
|
||||
univ.town.monst[i].summoned = 0;
|
||||
|
||||
if(univ.town.monst[i].spec_enc_code > 0)
|
||||
univ.town.monst[i].active = 0;
|
||||
|
@@ -56,4 +56,5 @@ void cPopulation::assign(size_t n, const cCreature& other, const cMonster& base,
|
||||
dudes[n].attitude = dudes[n].start_attitude; // TODO: Is this right?
|
||||
dudes[n].cur_loc = dudes[n].start_loc;
|
||||
dudes[n].target = 6; // No target
|
||||
dudes[n].summoned = 0;
|
||||
}
|
||||
|
@@ -151,7 +151,6 @@ public:
|
||||
|
||||
class cCreature : public cMonster {
|
||||
public:
|
||||
using cMonster::operator=;
|
||||
unsigned long id;
|
||||
m_num_t number;
|
||||
short active, attitude;
|
||||
|
@@ -812,7 +812,7 @@ void cDialog::loadFromFile(std::string path){
|
||||
fname = path;
|
||||
fs::path cPath = progDir/"data"/"dialogs"/path;
|
||||
try{
|
||||
printf("Loading dialog from: %s\n", cPath.c_str());
|
||||
printf("Loading dialog from: %s\n", cPath.string().c_str());
|
||||
TiXmlBase::SetCondenseWhiteSpace(false);
|
||||
Document xml(cPath.string().c_str());
|
||||
xml.LoadFile();
|
||||
|
@@ -467,7 +467,7 @@ void load_spec_graphics(fs::path scen_file) {
|
||||
static const char*const noGraphics = "The game will still work without the custom graphics, but some things will not look right.";
|
||||
short i;
|
||||
fs::path path(scen_file);
|
||||
printf("Loading scenario graphics... (%s)\n",path.c_str());
|
||||
printf("Loading scenario graphics... (%s)\n",path.string().c_str());
|
||||
// Tried path.replace_extension, but that only deleted the extension, so I have to do it manually
|
||||
std::string filename = path.stem().string();
|
||||
path = path.parent_path();
|
||||
|
@@ -231,7 +231,7 @@ ModalSession::ModalSession(sf::Window& win, sf::Window& p) : parent(&p) {
|
||||
ModalSession::~ModalSession() {
|
||||
HWND win_handle = (HWND)session;
|
||||
EnableWindow(parent->getSystemHandle(), true);
|
||||
makeFrontWindow(parent);
|
||||
makeFrontWindow(*parent);
|
||||
RedrawWindow(parent->getSystemHandle(), NULL, NULL, RDW_NOCHILDREN | RDW_UPDATENOW);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user