diff options
| author | Jonas Ask | 2009-10-26 01:10:00 +0000 |
|---|---|---|
| committer | Jonas Ask | 2009-10-26 01:10:00 +0000 |
| commit | 210597fe0010f98364548e5e3e43aee68e695137 (patch) | |
| tree | 2ee513ccba119bf881501b82039ad7430570e4c5 /BlockCondition.cpp | |
| parent | 4e31fb25cf795e21dfb7779bca207f68fcd6ef1d (diff) | |
| download | stonesense-210597fe0010f98364548e5e3e43aee68e695137.tar.gz stonesense-210597fe0010f98364548e5e3e43aee68e695137.tar.bz2 stonesense-210597fe0010f98364548e5e3e43aee68e695137.tar.xz | |
Major rework of how buildings are loaded, displayed and configured.
Added a whole bunch of spritework by kaypy, configs need some more work.
MapLoading.cpp: boundary check on cell loading.
Introduced a separate header file for types, commonTypes.h.
Diffstat (limited to 'BlockCondition.cpp')
| -rw-r--r-- | BlockCondition.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/BlockCondition.cpp b/BlockCondition.cpp index 0a9b59d..efae593 100644 --- a/BlockCondition.cpp +++ b/BlockCondition.cpp @@ -12,16 +12,16 @@ BlockCondition::BlockCondition(BlockConditionTypes type) bool BlockCondition::Matches(Block* b){
if(type == Cond_PositionIndex){
- int x = b->x - b->building.x1;
- int y = b->y - b->building.y1;
- int w = b->building.x2 - b->building.x1 + 1 ;
+ int x = b->x - b->building.info.x1;
+ int y = b->y - b->building.info.y1;
+ int w = b->building.info.x2 - b->building.info.x1 + 1 ;
int pos = y * w + x;
return pos == this->value;
}
if(type == Cond_MaterialType){
- return b->building.material.type == this->value;
+ return b->building.info.material.type == this->value;
}
if(type == Cond_NeighbourWall){
|
