small fix to display
This commit is contained in:
parent
6383d92730
commit
b1b77a6895
BIN
bin/mamaker
BIN
bin/mamaker
Binary file not shown.
|
@ -144,7 +144,7 @@ long cell_colors(cell* cl) {
|
|||
}
|
||||
|
||||
void draw_cell(SDL_Renderer* renderer, int xmin, int xmax, int ymin, int ymax, cell* cl, int draw_id) {
|
||||
if(cl != NULL && cl->id != draw_id && cl->coord_x - tile_size > xmin && cl->coord_x - tile_size < xmax && cl->coord_y > ymin && cl->coord_y < ymax) {
|
||||
if(cl != NULL && cl->id != draw_id && (cl->coord_x - tile_size > xmin || cl->coord_x - tile_size < xmax || cl->coord_y > ymin || cl->coord_y < ymax)) {
|
||||
// draw lines
|
||||
cl->id = draw_id;
|
||||
int nxmin = to_int((to_double(cl->coord_x) - to_double(xmin)) * to_double(__width__)) / (to_double(xmax) - to_double(xmin)) ;
|
||||
|
|
Loading…
Reference in New Issue