Index: bindings.doc ================================================================== --- bindings.doc +++ bindings.doc @@ -266,10 +266,14 @@ Quit. '^Y' Sound test. (Does nothing if sound is not configured.) +'^l' + Draw lines horizontal, vertical, and diagonal, from the clicked location, + until the mouse button is released. + 'go' Go to the specified level. If the level number is negative, then it is a level order number, otherwise it is a level ID number. Index: default.heromeshrc ================================================================== --- default.heromeshrc +++ default.heromeshrc @@ -222,9 +222,10 @@ ?.?.ctrl.S: ^S ?.?.ctrl.T: ^T ?.?.ctrl.Y: ^Y ?.?.shift.ctrl.M: select ':s'; ?.?.f10: select ':x'; +?.?.ctrl.middle: ^l ! Picture editor macros ?.picedit.macro.M: insert into graph(x,y,c) select s-x-1,y,c from graph where x0 && yy>0 && xxw && yyh) { + SDL_LockSurface(screen); + pix=screen->pixels; + pitch=screen->pitch; + // Diagonal + for(y=0;yh;y++) { + x=xx-yy+y; + if(x>1 && xw-2) memcpy(pix+y*pitch+x-2,"\xF0\xF8\xF7\xF8\xF0",5); + x=xx+yy-y; + if(x>1 && xw-2) memcpy(pix+y*pitch+x-2,"\xF0\xF8\xF7\xF8\xF0",5); + } + // Vertical + if(xx+2w) for(y=0;yh;y++) pix[y*pitch+xx+2]=0xF0; + if(xx+1w) for(y=0;yh;y++) pix[y*pitch+xx+1]=0xF8; + for(y=0;yh;y++) pix[y*pitch+xx]=0xF7; + if(xx-1>0) for(y=0;yh;y++) pix[y*pitch+xx-1]=0xF8; + if(xx-2>0) for(y=0;yh;y++) pix[y*pitch+xx-2]=0xF0; + // Horizontal + if(yy+2h) memset(pix+(yy+2)*pitch,0xF0,screen->w); + if(yy+1h) memset(pix+(yy+1)*pitch,0xF8,screen->w); + memset(pix+yy*pitch,0xF7,screen->w); + if(yy-1>0) memset(pix+(yy-1)*pitch,0xF8,screen->w); + if(yy-2>0) memset(pix+(yy-2)*pitch,0xF0,screen->w); + SDL_UnlockSurface(screen); + } + SDL_Flip(screen); + while(SDL_WaitEvent(&ev)) switch(ev.type) { + case SDL_KEYDOWN: case SDL_MOUSEBUTTONDOWN: + case SDL_KEYUP: case SDL_MOUSEBUTTONUP: + return; + case SDL_QUIT: + SDL_PushEvent(&ev); + return; + } +} static Uint16 decide_picture_size(int nwantsize,const Uint8*wantsize,const Uint16*havesize,int n) { int i,j; if(!nwantsize) fatal("Unable to determine what picture size is wanted\n"); for(i=0;i