diff options
| author | Japa | 2010-04-09 14:24:27 +0000 |
|---|---|---|
| committer | Japa | 2010-04-09 14:24:27 +0000 |
| commit | 114df922d3073bd296b38cf522997f520fb17850 (patch) | |
| tree | c4cf372825118c3663cd77e18c69a6c3b59d070f /Constructions.cpp | |
| parent | 81aefc8e03ff3f647494012e18bcdc8f33f4de42 (diff) | |
| download | stonesense-114df922d3073bd296b38cf522997f520fb17850.tar.gz stonesense-114df922d3073bd296b38cf522997f520fb17850.tar.bz2 stonesense-114df922d3073bd296b38cf522997f520fb17850.tar.xz | |
updated trunk to the new graphics engine, and the latest DFhack
Diffstat (limited to 'Constructions.cpp')
| -rw-r--r-- | Constructions.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Constructions.cpp b/Constructions.cpp new file mode 100644 index 0000000..37be1b2 --- /dev/null +++ b/Constructions.cpp @@ -0,0 +1,56 @@ +#include "common.h"
+#include "SpriteMaps.h"
+#include "Constructions.h"
+#include "WorldSegment.h"
+
+void changeConstructionMaterials(WorldSegment* segment, vector<t_construction>* allConstructions){
+ //find construction
+ int32_t i;
+ Block* b;
+ t_construction* construct = 0;
+ i = (uint32_t) allConstructions->size();
+ if(i <= 0) return;
+ while(--i >= 0){
+ construct = &(*allConstructions)[i];
+ b = segment->getBlock(construct->x, construct->y, construct->z);
+ if( !b ) continue;
+ b->material=construct->material;
+ }
+}
+
+
+bool IDisConstruction(int in){
+ switch(in){
+ case 495: //constructed pillar
+ case 496: //constructed wall rd2
+ case 497: //constructed wall r2d
+ case 498: //constructed wall r2u
+ case 499: //constructed wall ru2
+ case 500: //constructed wall l2u
+ case 501: //constructed wall lu2
+ case 502: //constructed wall l2d
+ case 503: //constructed wall ld2
+ case 504: //constructed wall lrud
+ case 505: //constructed wall rud
+ case 506: //constructed wall lrd
+ case 507: //constructed wall lru
+ case 508: //constructed wall lud
+ case 509: //constructed wall rd
+ case 510: //constructed wall ru
+ case 511: //constructed wall lu
+ case 512: //constructed wall ld
+ case 513: //constructed wall ud
+ case 514: //constructed wall lr
+
+ case 493: //constructed floor detailed
+
+ case 494: //constructed fortification
+
+ case ID_CNSTR_STAIR_UPDOWN:
+ case ID_CNSTR_STAIR_DOWN:
+ case ID_CNSTR_STAIR_UP:
+ return true;
+ break;
+ }
+ return 0;
+}
\ No newline at end of file |
