diff --git a/src/main.c b/src/main.c index 5f5e7a4ac..7f49d9b0a 100644 --- a/src/main.c +++ b/src/main.c @@ -1810,7 +1810,7 @@ int main(int argc, char *argv[]) } else if (sdl_key=='r'&&(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL))) { - transform = m2d_new(0,-1,1,0); //rotate anticlockwise 90 degrees + transform = m2d_new(0,1,-1,0); //rotate anticlockwise 90 degrees doTransform = 1; } else if (sdl_mod & (KMOD_CTRL)) @@ -2227,22 +2227,6 @@ int main(int argc, char *argv[]) copy_mode = 0; clear_area(save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); } - else if (copy_mode==3)//rotation - { - if (save_h>save_w) - save_w = save_h; - rotate_area(save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL,0);//just do squares for now - save_mode = 0; - copy_mode = 0; - } - else if (copy_mode==4)//invertion - { - if (save_h>save_w) - save_w = save_h; - rotate_area(save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL,1);//just do squares for now - save_mode = 0; - copy_mode = 0; - } else { stamp_save(save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); @@ -2564,14 +2548,7 @@ int main(int argc, char *argv[]) if (save_mode) { - if (copy_mode==3||copy_mode==4)//special drawing for rotate, can remove once it can do rectangles - { - if (save_h>save_w) - save_w = save_h; - xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL); - } - else - xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); + xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); da = 51; db = 269; } diff --git a/src/powder.c b/src/powder.c index fc73276f4..7e26422d3 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2590,90 +2590,6 @@ void update_particles(pixel *vid) } -void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert) -{ - //TODO: MSCC doesn't like arrays who's size is determined at runtime. -#if !(defined(WIN32) && !defined(__GNUC__)) - int cx = 0; - int cy = 0; - unsigned tpmap[area_h][area_w]; - unsigned rtpmap[area_w][area_h]; - unsigned char tbmap[area_h/CELL][area_w/CELL]; - unsigned char rtbmap[area_w/CELL][area_h/CELL]; - float tfvy[area_h/CELL][area_w/CELL]; - float tfvx[area_h/CELL][area_w/CELL]; - for (cy=0; cy>8)<=NPART&&rtpmap[cy][cx]) - { - parts[rtpmap[(int)(cy+0.5f)][(int)(cx+0.5f)]>>8].x = area_x +cx; - parts[rtpmap[(int)(cy+0.5f)][(int)(cx+0.5f)]>>8].y = area_y +cy; - } - bmap[(area_y+cy)/CELL][(area_x+cx)/CELL] = rtbmap[cy/CELL][cx/CELL]; - fvy[(area_y+cy)/CELL][(area_x+cx)/CELL] = tfvy[cy/CELL][cx/CELL]; - fvx[(area_y+cy)/CELL][(area_x+cx)/CELL] = tfvx[cy/CELL][cx/CELL]; - } - } - } -#endif -} - void clear_area(int area_x, int area_y, int area_w, int area_h) { int cx = 0;