viewport.c
changeset 3281 0f3d836e35b1
parent 3279 7c642c5c501c
child 3421 8ab76c47c72c
equal deleted inserted replaced
3280:524352fbb229 3281:0f3d836e35b1
   632 #ifdef DEBUG_HILIGHT_MARKED_TILES
   632 #ifdef DEBUG_HILIGHT_MARKED_TILES
   633 	DrawHighlighedTile(ti);
   633 	DrawHighlighedTile(ti);
   634 #endif
   634 #endif
   635 
   635 
   636 	// Draw a red error square?
   636 	// Draw a red error square?
   637 	if (_thd.redsq != INVALID_TILE && _thd.redsq == ti->tile) {
   637 	if (_thd.redsq != 0 && _thd.redsq == ti->tile) {
   638 		DrawSelectionSprite(PALETTE_TILE_RED_PULSATING | (SPR_SELECT_TILE + _tileh_to_sprite[ti->tileh]), ti);
   638 		DrawSelectionSprite(PALETTE_TILE_RED_PULSATING | (SPR_SELECT_TILE + _tileh_to_sprite[ti->tileh]), ti);
   639 		return;
   639 		return;
   640 	}
   640 	}
   641 
   641 
   642 	// no selection active?
   642 	// no selection active?
  1810 
  1810 
  1811 	old = _thd.redsq;
  1811 	old = _thd.redsq;
  1812 	_thd.redsq = tile;
  1812 	_thd.redsq = tile;
  1813 
  1813 
  1814 	if (tile != old) {
  1814 	if (tile != old) {
  1815 		if (tile != INVALID_TILE) MarkTileDirtyByTile(tile);
  1815 		if (tile != 0) MarkTileDirtyByTile(tile);
  1816 		if (old  != INVALID_TILE) MarkTileDirtyByTile(old);
  1816 		if (old  != 0) MarkTileDirtyByTile(old);
  1817 	}
  1817 	}
  1818 }
  1818 }
  1819 
  1819 
  1820 void SetTileSelectSize(int w, int h)
  1820 void SetTileSelectSize(int w, int h)
  1821 {
  1821 {