diff --git a/data/Memory-ng.xml b/data/Memory-ng.xml index f331c10d2..d34825c3e 100644 --- a/data/Memory-ng.xml +++ b/data/Memory-ng.xml @@ -885,7 +885,7 @@
-
+
@@ -1454,7 +1454,32 @@ - + + + + +
+ 0x01482874 - current race + +
+
+
+
+
+
+ + +
+ + +
+ + +
+ + + + 31.13 WEATHER_START 0147E94E .-"""-. ' \ |,. ,-. | _________________________ @@ -1747,6 +1772,67 @@ + + + + +
+ + +
+ + +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ + +
+ + + +
+
+ + + +
+
+
+
+
+
+ + +
+ + +
+ + +
+
+
+ + + diff --git a/library/modules/World.cpp b/library/modules/World.cpp index 009b696ac..3e1a670de 100644 --- a/library/modules/World.cpp +++ b/library/modules/World.cpp @@ -133,12 +133,22 @@ uint32_t World::ReadCurrentDay() uint8_t World::ReadCurrentWeather() { if (d->Inited && d->StartedWeather) - return(d->owner->readByte(d->weather_offset)); + return(d->owner->readByte(d->weather_offset + 12)); return 0; } - +/* void World::SetCurrentWeather(uint8_t weather) { if (d->Inited && d->StartedWeather) d->owner->writeByte(d->weather_offset,weather); } +*/ +void World::SetCurrentWeather(uint8_t weather) +{ + if (d->Inited && d->StartedWeather) + { + uint8_t buf[25]; + memset(&buf,weather, sizeof(buf)); + d->owner->write(d->weather_offset,sizeof(buf),buf); + } +} diff --git a/tools/examples/creaturedump.cpp b/tools/examples/creaturedump.cpp index eb611eefe..dddd6e018 100644 --- a/tools/examples/creaturedump.cpp +++ b/tools/examples/creaturedump.cpp @@ -134,7 +134,7 @@ likeType printLike40d(DFHack::t_like like, const matGlosses & mat,const vector< void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature) { uint32_t dayoflife; - cout << "address: " << hex << creature.origin << dec << " creature type: " << Materials->raceEx[creature.race].rawname + cout << "address: " << hex << creature.origin << dec << ", creature race: " << creature.race << "/" << Materials->raceEx[creature.race].rawname << "[" << Materials->raceEx[creature.race].tile_character << "," << Materials->raceEx[creature.race].tilecolor.fore << "," << Materials->raceEx[creature.race].tilecolor.back @@ -172,7 +172,7 @@ void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature) if(creature.civ) { - cout << "civilization: " << creature.civ; + cout << ", civilization: " << creature.civ; addendl = true; } @@ -191,7 +191,7 @@ void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature) cout << endl; addendl = false; } - cout << "profession: " << mem->getProfession(creature.profession) << "(" << (int) creature.profession << ")"; + cout << ", profession: " << mem->getProfession(creature.profession) << "(" << (int) creature.profession << ")"; if(creature.custom_profession[0]) {