From ea2e9dc5618ff9fbf2a9bf772f40118e8ab1defd Mon Sep 17 00:00:00 2001 From: Japa Illo Date: Thu, 5 Apr 2012 09:20:23 +0200 Subject: Fixed item subtypes, made creature happiness only show on dwarves. Signed-off-by: Japa Illo --- Block.cpp | 6 +++--- Creatures.cpp | 5 ++++- ItemConfiguration.cpp | 9 +++++---- ItemConfiguration.h | 2 -- resources/items/greiger items.zip | Bin 0 -> 962 bytes resources/items/greiger items/Grei_items.png | Bin 0 -> 592 bytes resources/items/greiger items/Grei_items.xml | 5 +++++ resources/items/index.txt | 1 + 8 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 resources/items/greiger items.zip create mode 100644 resources/items/greiger items/Grei_items.png create mode 100644 resources/items/greiger items/Grei_items.xml diff --git a/Block.cpp b/Block.cpp index dd1f2b7..76a5822 100644 --- a/Block.cpp +++ b/Block.cpp @@ -292,10 +292,10 @@ void Block::Draw() { if( contentLoader->itemConfigs[Item.item.type] && - (Item.item.type < contentLoader->itemConfigs[Item.item.type]->subItems.size()) && - contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.type]) + (Item.item.index < contentLoader->itemConfigs[Item.item.type]->subItems.size()) && + contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.index]) { - contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.type]->sprite.draw_world(x, y, z, this); + contentLoader->itemConfigs[Item.item.type]->subItems[Item.item.index]->sprite.draw_world(x, y, z, this); } else if ( contentLoader->itemConfigs[Item.item.type] && diff --git a/Creatures.cpp b/Creatures.cpp index ba19970..82eb801 100644 --- a/Creatures.cpp +++ b/Creatures.cpp @@ -15,6 +15,9 @@ #include "df/profession.h" +#include "df/creature_raw.h" +#include "df/caste_raw.h" + //vector v_creatureNames; //vector creatureTypes; @@ -235,7 +238,7 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){ vector statusIcons; //if(config.show_creature_happiness) - if(config.show_creature_moods) + if(config.show_creature_moods && df::creature_raw::find(creature->race)->caste[creature->caste]->flags.is_set(caste_raw_flags::CAN_SPEAK)) { if(creature->happiness == 0) statusIcons.push_back(6); diff --git a/ItemConfiguration.cpp b/ItemConfiguration.cpp index ebdeedb..fbab27d 100644 --- a/ItemConfiguration.cpp +++ b/ItemConfiguration.cpp @@ -68,8 +68,9 @@ bool parseItemElement( TiXmlElement* elemRoot, int basefile) { // get subtype string, if available string sub; - if(strGameSub) - sub = strGameSub; + sub += strGameID; + sub += ":"; + sub += strGameSub; //process subtypes ItemTypeInfo itemdef; @@ -101,9 +102,9 @@ bool parseItemElement( TiXmlElement* elemRoot, int basefile) { if(contentLoader->itemConfigs[main_type]->subItems.size() <= subtype) contentLoader->itemConfigs[main_type]->subItems.resize(subtype+1, NULL); - if(!contentLoader->itemConfigs[main_type]->subItems[subtype]->configured) + if(!contentLoader->itemConfigs[main_type]->subItems[subtype]) { - contentLoader->itemConfigs[main_type]->subItems[subtype]->configured = true; + contentLoader->itemConfigs[main_type]->subItems[subtype] = new ItemSubConfiguration; contentLoader->itemConfigs[main_type]->subItems[subtype]->sprite = sprite; } } diff --git a/ItemConfiguration.h b/ItemConfiguration.h index 92ea46b..f66d518 100644 --- a/ItemConfiguration.h +++ b/ItemConfiguration.h @@ -6,8 +6,6 @@ class ItemSubConfiguration { public: c_sprite sprite; - - bool configured; }; class ItemConfiguration diff --git a/resources/items/greiger items.zip b/resources/items/greiger items.zip new file mode 100644 index 0000000..dd5486d Binary files /dev/null and b/resources/items/greiger items.zip differ diff --git a/resources/items/greiger items/Grei_items.png b/resources/items/greiger items/Grei_items.png new file mode 100644 index 0000000..454f8b2 Binary files /dev/null and b/resources/items/greiger items/Grei_items.png differ diff --git a/resources/items/greiger items/Grei_items.xml b/resources/items/greiger items/Grei_items.xml new file mode 100644 index 0000000..b197955 --- /dev/null +++ b/resources/items/greiger items/Grei_items.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/resources/items/index.txt b/resources/items/index.txt index 2d1ed4a..c8e0f13 100644 --- a/resources/items/index.txt +++ b/resources/items/index.txt @@ -1 +1,2 @@ +greiger items/Grei_items.xml items.xml -- cgit v1.2.1 From c870d4ad5f8d98fabbbf1a7a242cf91929059217 Mon Sep 17 00:00:00 2001 From: Japa Illo Date: Thu, 5 Apr 2012 09:24:13 +0200 Subject: Added zoom keys to the readme. Signed-off-by: Japa Illo --- README.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.txt b/README.txt index a092bc7..c07fac6 100644 --- a/README.txt +++ b/README.txt @@ -44,6 +44,8 @@ CTRL + SHIFT + F5: Save a screenshot of the entire fortress from the current top ALT + F5: Save a volumetric thing I'm testing out. Numpad + and -: Increase/Decrease AutoReload Rate CTRL + navigation: Adjusts follow mode offset +,: Zoom out. +.: Zoom in. -- Debug Keys -- (prolly not useful for you guys) -- cgit v1.2.1 From d0de694061be2c2f477035f13e6b57301bdc9089 Mon Sep 17 00:00:00 2001 From: Japa Date: Tue, 10 Apr 2012 01:31:52 +0530 Subject: Update README.txt --- README.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index c07fac6..66b955f 100644 --- a/README.txt +++ b/README.txt @@ -3,7 +3,8 @@ Welcome to Stonesense Felsite(3.1) Thank you for trying out our little visualizer, as always, we appreciate any feedback. -Please note, that for the time being Stonesense Felsite ONLY supports DF 31_25. +Please note that stonesense is tightly bound to DFHack, and so only works for the version that +the accompanying DFHack is built for. To run stonesense, Copy DFHack into the dwarf fortress folder, and run DwarfFortress.exe. When DFHack console appears, type in stonesense and press enter. -- cgit v1.2.1 From 63ee1afe3f447759bfa634591c116b95e9fec564 Mon Sep 17 00:00:00 2001 From: Japa Date: Tue, 10 Apr 2012 01:34:37 +0530 Subject: Update ON COMPILING.txt --- ON COMPILING.txt | 82 ++------------------------------------------------------ 1 file changed, 2 insertions(+), 80 deletions(-) diff --git a/ON COMPILING.txt b/ON COMPILING.txt index 4f654eb..8f2688d 100644 --- a/ON COMPILING.txt +++ b/ON COMPILING.txt @@ -1,81 +1,3 @@ -There are ten thousand things to say here, and I'll get into more details later, -but for now; This project aint all that compiler friendly yet. -I'm just getting the project out there, so the public light will force me to tidy up stuff. - - -1 - I've only tested it with MSVS 2005 - -2 - On linux, You will need Allegro 5.0.0, the graphics library we use. Get it at http://alleg.sourceforge.net/ - Note that this can be tricky to compile, annd you need to verify that you have all the dependencies, as a few missing ones will - result in allegro compiling, but not the required modules. - -3 - You will also need the latest DFhack as of 2011/01/22, get it from http://github.com/peterix/dfhack - -Specific Build Notes -==================== - -*** MinGW *** - -(I am including specific version numbers here so I can give precise file info, as things -update, you may have better luck with newer versions) - -1) Get cmake-2.6.4-win32-x86.exe from -http://www.cmake.org/files/v2.6/cmake-2.6.4-win32-x86.exe -and install - -2) Get MinGW-5.1.6.exe installer from -http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/ - -Install with: -g++ compiler -MinGW make (this didnt want to automatically grab today, you may need to manually install it) - -3) Get subversion checkout of stonesense (PySVN Workbench works nicely) -see http://code.google.com/p/stonesense/source/checkout - -4) Get allegro-mingw-5.0.0.zip from -http://sourceforge.net/projects/alleg/files/ - -Unpack allegro into the stonesense directory -(so you have a stonesense/allegro-mingw-5.0.0 directory) - -* Yes you need the whole lot not just the libs * - -(If you have a newer allegro, change its directory name, or tweak the directories in CMakeList.txt) - -5) add any missing .cpp files to the CMakeList.txt list under - -SET(PROJECT_SRCS - -(or wait till the compiler process winges about them to help figure out what is missing) - -6) *** You will need to either set up paths to MinGW and CMake in your environment or -a dos shell for the following steps *** - -something like - -set path=c:\Program Files\CMake 2.6\bin;c:\MinGW\bin;%path% - -7) Run the build-MinGW32-release.bat batch file - -* If you are running in a dos prompt, you will need to be in the build directory * - - - -*** Linux *** - -1) Get the source - -svn checkout http://stonesense.googlecode.com/svn/trunk stonesense - -2) Get the libraries - -Your distro should have dev packages for allegro, libpng, and zlib -You will also need make, cmake and a g++ - -3) Run the built in make - -cd stonesense/build -cmake .. -DCMAKE_BUILD_TYPE:string=Release -make +Stonesense cannot be compiled on it's own. It MUST be compiled together with DFHack. +Please see the DFHack documentation for instructions on how to compile it. -- cgit v1.2.1 From 513ed472916e49d1929a1c180540eb1070a7a3d9 Mon Sep 17 00:00:00 2001 From: Japa Illo Date: Thu, 12 Apr 2012 00:57:11 +0530 Subject: Fixed compatibility. Signed-off-by: Japa Illo --- MapLoading.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/MapLoading.cpp b/MapLoading.cpp index 19ab329..1f94eb2 100644 --- a/MapLoading.cpp +++ b/MapLoading.cpp @@ -206,7 +206,7 @@ void ReadCellToSegment(DFHack::Core& DF, WorldSegment& segment, int CellX, int C uint16_t Flags/*not in use*/, vector* allBuildings, vector* allConstructions, - vector< vector >* allLayers) + vector< vector >* allLayers) { if(config.skipMaps) return; @@ -239,9 +239,7 @@ void ReadCellToSegment(DFHack::Core& DF, WorldSegment& segment, int CellX, int C vector grass; vector worldconstructions; Maps::SortBlockEvents( - CellX, - CellY, - CellZ, + trueBlock, &veins, &ices, &splatter, @@ -744,8 +742,9 @@ WorldSegment* ReadMapSegment(int x, int y, int z, int sizex, int sizey, int size TranslateGroundMaterialNames();*/ // get region geology - vector< vector > layers; - if(!Maps::ReadGeology( layers )) + vector< vector > layers; + vector geoidx; + if(!Maps::ReadGeology( &layers, &geoidx )) { LogError("Can't get region geology.\n"); } -- cgit v1.2.1 From c50af342c27542c3b2c51ddd9099798339b7aa62 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Wed, 11 Apr 2012 21:32:28 +0200 Subject: Nuke Thumbs.db --- resources/creatures/large_256/.gitignore | 1 + resources/creatures/large_256/Thumbs.db | Bin 156160 -> 0 bytes 2 files changed, 1 insertion(+) create mode 100644 resources/creatures/large_256/.gitignore delete mode 100644 resources/creatures/large_256/Thumbs.db diff --git a/resources/creatures/large_256/.gitignore b/resources/creatures/large_256/.gitignore new file mode 100644 index 0000000..085e8ba --- /dev/null +++ b/resources/creatures/large_256/.gitignore @@ -0,0 +1 @@ +Thumbs.db diff --git a/resources/creatures/large_256/Thumbs.db b/resources/creatures/large_256/Thumbs.db deleted file mode 100644 index dce21fc..0000000 Binary files a/resources/creatures/large_256/Thumbs.db and /dev/null differ -- cgit v1.2.1 From 15e3b726c3e68d2985aecd95d2a33bf4550caaa1 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Wed, 18 Apr 2012 05:08:34 +0200 Subject: Fix enum comparison mismatch in occlusion tests --- Occlusion_Test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Occlusion_Test.cpp b/Occlusion_Test.cpp index 7c8061e..08e26ee 100644 --- a/Occlusion_Test.cpp +++ b/Occlusion_Test.cpp @@ -21,7 +21,7 @@ bitset<2*S_SPRITE_HEIGHT> floor_mask_right; bool is_block_solid(Block * b) { - if(b->tileMaterial == tiletype_shape::RAMP_TOP) + if(b->tileShape == tiletype_shape::RAMP_TOP) return false; if(!config.shade_hidden_blocks && !config.show_hidden_blocks && b->designation.bits.hidden) return false; @@ -32,7 +32,7 @@ bool is_block_solid(Block * b) b->material.type == 5 || b->material.type == 6) return false; - if(b->tileMaterial == tiletype_shape::BROOK_TOP) + if(b->tileShape == tiletype_shape::BROOK_TOP) return false; return true; } @@ -81,7 +81,7 @@ void mask_left(Block * b, int offset) return; if(!is_block_solid(b)) return; - if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED) + if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileShape != tiletype_shape::BROOK_BED) { if(offset >= 0) { @@ -92,7 +92,7 @@ void mask_left(Block * b, int offset) base_mask_left &= ~(wall_mask_right >> -offset*2); } } - else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileMaterial != tiletype_shape::BROOK_BED) + else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileShape != tiletype_shape::BROOK_BED) { if(offset >= 0) { @@ -111,7 +111,7 @@ void mask_right(Block * b, int offset) return; if(!is_block_solid(b)) return; - if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileMaterial != tiletype_shape::BROOK_BED) + if(b->tileShapeBasic==tiletype_shape_basic::Wall && b->tileShape != tiletype_shape::BROOK_BED) { if(offset >= 0) { @@ -122,7 +122,7 @@ void mask_right(Block * b, int offset) base_mask_right &= ~(wall_mask_left >> -offset*2); } } - else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileMaterial != tiletype_shape::BROOK_BED) + else if(b->tileShapeBasic==tiletype_shape_basic::Floor || b->tileShapeBasic==tiletype_shape_basic::Ramp || b->tileShape != tiletype_shape::BROOK_BED) { if(offset >= 0) { -- cgit v1.2.1