diff options
| -rw-r--r-- | Block.cpp | 6 | ||||
| -rw-r--r-- | Creatures.cpp | 5 | ||||
| -rw-r--r-- | ItemConfiguration.cpp | 9 | ||||
| -rw-r--r-- | ItemConfiguration.h | 2 | ||||
| -rw-r--r-- | MapLoading.cpp | 11 | ||||
| -rw-r--r-- | ON COMPILING.txt | 82 | ||||
| -rw-r--r-- | Occlusion_Test.cpp | 12 | ||||
| -rw-r--r-- | README.txt | 5 | ||||
| -rw-r--r-- | resources/creatures/large_256/.gitignore | 1 | ||||
| -rw-r--r-- | resources/items/greiger items.zip | bin | 0 -> 962 bytes | |||
| -rw-r--r-- | resources/items/greiger items/Grei_items.png | bin | 0 -> 592 bytes | |||
| -rw-r--r-- | resources/items/greiger items/Grei_items.xml | 5 | ||||
| -rw-r--r-- | resources/items/index.txt | 1 |
13 files changed, 36 insertions, 103 deletions
@@ -294,10 +294,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 cf89578..a14f148 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<t_matgloss> v_creatureNames;
//vector<CreatureConfiguration> creatureTypes;
@@ -235,7 +238,7 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){ vector<int> 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/MapLoading.cpp b/MapLoading.cpp index d1ea9ec..228c05e 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<Buildings::t_building>* allBuildings,
vector<df::construction>* allConstructions,
- vector< vector <uint16_t> >* allLayers)
+ vector< vector <int16_t> >* allLayers)
{
if(config.skipMaps)
return;
@@ -239,9 +239,7 @@ void ReadCellToSegment(DFHack::Core& DF, WorldSegment& segment, int CellX, int C vector <df::block_square_event_grassst * > grass;
vector <df::block_square_event_world_constructionst * > worldconstructions;
Maps::SortBlockEvents(
- CellX,
- CellY,
- CellZ,
+ trueBlock,
&veins,
&ices,
&splatter,
@@ -742,8 +740,9 @@ WorldSegment* ReadMapSegment(int x, int y, int z, int sizex, int sizey, int size TranslateGroundMaterialNames();*/
// get region geology
- vector< vector <uint16_t> > layers;
- if(!Maps::ReadGeology( layers ))
+ vector< vector <int16_t> > layers;
+ vector<df::coord2d> geoidx;
+ if(!Maps::ReadGeology( &layers, &geoidx ))
{
LogError("Can't get region geology.\n");
}
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.
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)
{
@@ -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.
@@ -44,6 +45,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)
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/items/greiger items.zip b/resources/items/greiger items.zip Binary files differnew file mode 100644 index 0000000..dd5486d --- /dev/null +++ b/resources/items/greiger items.zip diff --git a/resources/items/greiger items/Grei_items.png b/resources/items/greiger items/Grei_items.png Binary files differnew file mode 100644 index 0000000..454f8b2 --- /dev/null +++ b/resources/items/greiger items/Grei_items.png 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 @@ +<?xml version="1.0"?> +<items file="Grei_items.png"> + <item game_type="BIN" sheetIndex="0" color="item" /> + <item game_type="TOOL" game_subtype="ITEM_TOOL_LARGE_POT" sheetIndex="1" color="item" /> +</items> 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 |
