#include <iostream>
#include "collision_grid.hpp"
+#include "msg.hpp"
#include "collision.hpp"
#include "sector.hpp"
#include "collision_grid_iterator.hpp"
int gridy = int(y / cell_height);
if(gridx < 0 || gridy < 0
|| gridx >= int(cells_x) || gridy >= int(cells_y)) {
- std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n";
+ msg_warning("Object out of range: " << gridx << ", " << gridy);
continue;
}
GridEntry* entry = new GridEntry;
assert(wrapper != 0);
#else
if(wrapper == 0) {
- std::cerr << "Tried to remove nonexistant object!\n";
+ msg_warning("Tried to remove nonexistant object");
return;
}
#endif
int gridy = int(y / cell_height);
if(gridx < 0 || gridy < 0
|| gridx >= int(cells_x) || gridy >= int(cells_y)) {
- std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n";
+ msg_warning("Object out of range: " << gridx << ", " << gridy);
continue;
}
remove_object_from_gridcell(gridy*cells_x + gridx, wrapper);
int gridy = int(y / cell_height);
if(gridx < 0 || gridy < 0 ||
gridx >= int(cells_x) || gridy >= int(cells_y)) {
- std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n";
+ msg_warning("Object out of range: " << gridx << ", " << gridy);
continue;
}
remove_object_from_gridcell(gridy*cells_x + gridx, wrapper);
int gridy = int(y / cell_height);
if(gridx < 0 || gridy < 0
|| gridx >= int(cells_x) || gridy >= int(cells_y)) {
- std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n";
+ msg_warning("Object out of range: " << gridx << ", " << gridy);
continue;
}
int gridy = int(y / cell_height);
if(gridx < 0 || gridy < 0
|| gridx >= int(cells_x) || gridy >= int(cells_y)) {
- //std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n";
+ //msg_warning("Object out of range: " << gridx << ", " << gridy);
continue;
}
entry = entry->next;
};
- std::cerr << "Couldn't find object in cell.\n";
+ msg_warning("Couldn't find object in cell");
}