equal
deleted
inserted
replaced
244 // direction=false: check for foundation in west and south corner |
244 // direction=false: check for foundation in west and south corner |
245 bool hasFoundation(TileInfo *ti, bool direction) |
245 bool hasFoundation(TileInfo *ti, bool direction) |
246 { |
246 { |
247 bool south, other; // southern corner and east/west corner |
247 bool south, other; // southern corner and east/west corner |
248 uint slope = _tile_type_procs[ti->type]->get_slope_tileh_proc(ti); |
248 uint slope = _tile_type_procs[ti->type]->get_slope_tileh_proc(ti); |
249 south = ((ti->tileh) & 2) != (slope & 2); |
249 uint tileh = ti->tileh; |
|
250 |
|
251 if(slope==0 && slope!=tileh) tileh=15; |
|
252 south = (tileh & 2) != (slope & 2); |
250 |
253 |
251 if(direction) |
254 if(direction) |
252 other = ((ti->tileh) & 4) != (slope & 4); |
255 other = (tileh & 4) != (slope & 4); |
253 else |
256 else |
254 other = ((ti->tileh) & 1) != (slope & 1); |
257 other = (tileh & 1) != (slope & 1); |
255 |
|
256 return south || other; |
258 return south || other; |
|
259 |
257 } |
260 } |
258 |
261 |
259 void DrawFoundation(TileInfo *ti, uint f) |
262 void DrawFoundation(TileInfo *ti, uint f) |
260 { |
263 { |
261 uint32 sprite_base = SPR_SLOPES_BASE-14; |
264 uint32 sprite_base = SPR_SLOPES_BASE-14; |