[wpdev-commits] wolfpack mapobjects.cpp,1.21,1.22
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-11-04 12:03:27
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9700 Modified Files: mapobjects.cpp Log Message: Index: mapobjects.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/mapobjects.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mapobjects.cpp 3 Nov 2004 16:48:23 -0000 1.21 --- mapobjects.cpp 4 Nov 2004 12:03:12 -0000 1.22 *************** *** 837,842 **** RectangleIteratorState &state = is->state.rect; ! state.cellX = ( state.x1 / map->cellSize() ); ! state.cellY = ( state.y1 / map->cellSize() ); state.lastCellX = wpMin<UI16>( map->gridWidth() - 1, state.x2 / map->cellSize() ); state.lastCellY = wpMin<UI16>( map->gridHeight() - 1, state.y2 / map->cellSize() ); --- 837,842 ---- RectangleIteratorState &state = is->state.rect; ! state.cellX = wpMax<int>(0, ( state.x1 / map->cellSize() )); ! state.cellY = wpMax<int>(0, ( state.y1 / map->cellSize() )); state.lastCellX = wpMin<UI16>( map->gridWidth() - 1, state.x2 / map->cellSize() ); state.lastCellY = wpMin<UI16>( map->gridHeight() - 1, state.y2 / map->cellSize() ); *************** *** 854,859 **** CircleIteratorState &state = is->state.circle; ! state.cellX = ( ( state.x - state.radius ) / map->cellSize() ); ! state.cellY = ( ( state.y - state.radius ) / map->cellSize() ); state.lastCellX = wpMin<UI16>( map->gridWidth() - 1, ( state.x + state.radius ) / map->cellSize() ); state.lastCellY = wpMin<UI16>( map->gridHeight() - 1, ( state.y + state.radius ) / map->cellSize() ); --- 854,859 ---- CircleIteratorState &state = is->state.circle; ! state.cellX = wpMax<int>(0, ( ( state.x - state.radius ) / map->cellSize() )); ! state.cellY = wpMax<int>(0, ( ( state.y - state.radius ) / map->cellSize() )); state.lastCellX = wpMin<UI16>( map->gridWidth() - 1, ( state.x + state.radius ) / map->cellSize() ); state.lastCellY = wpMin<UI16>( map->gridHeight() - 1, ( state.y + state.radius ) / map->cellSize() ); |