Index: config.doc ================================================================== --- config.doc +++ config.doc @@ -66,10 +66,14 @@ .palette If defined, the file name of the palette to use (if not set, then the internal palette is used instead). The file format is hex rrggbb format separated by any kind of whitespaces. +.pasteCommand + The command to use for pasting text from the clipboard. When it asks for + a single line of text, you can push SHIFT+INSERT to paste. + .progress If positive, how many steps between dots in the progress report for the auto testing most. If negative, number of milliseconds to sleep before each level is executed. Index: default.heromeshrc ================================================================== --- default.heromeshrc +++ default.heromeshrc @@ -3,10 +3,11 @@ ?.screenHeight: 600 ?.imageSize: 24 ?.traceAll: true ?.showInventory: 0 ?.maxTrigger: 32767 +?.pasteCommand: xclip -o ! Game inputs ?.gameKey.A: 'A ?.gameKey.B: 'B ?.gameKey.C: 'C Index: edit.c ================================================================== --- edit.c +++ edit.c @@ -941,10 +941,12 @@ v.u=objalloc(v.u); if(v.u==VOIDLINK) goto bad; o=objects[v.u]; o->x=x; o->y=y; + p=import_numbers(p,&x,0); + o->image=x; p=import_value(p,&o->misc1); p=import_value(p,&o->misc2); p=import_value(p,&o->misc3); p=import_numbers(p,&x,0); o->dir=x; Index: picture.c ================================================================== --- picture.c +++ picture.c @@ -242,10 +242,28 @@ case SDLK_BACKSPACE: case SDLK_DELETE: if(n) t[n--]=0; break; case SDLK_CLEAR: t[n=0]=0; + break; + case SDLK_INSERT: + if(ev.key.keysym.mod&KMOD_SHIFT) { + const char*s; + FILE*fp; + int c; + optionquery[1]=Q_pasteCommand; + if((s=xrm_get_resource(resourcedb,optionquery,optionquery,2)) && (fp=popen(s,"r"))) { + for(;;) { + c=fgetc(fp); + if(c=='\t') c=' '; + if(c>=32 && n=m) break; + } + t[n]=0; + pclose(fp); + } + } break; default: if(ev.key.keysym.sym==SDLK_u && (ev.key.keysym.mod&KMOD_CTRL)) { t[n=0]=0; } else if(ev.key.keysym.sym==SDLK_c && (ev.key.keysym.mod&KMOD_CTRL)) { Index: quarks ================================================================== --- quarks +++ quarks @@ -217,6 +217,7 @@ traceObject showInventory progress autoSave maxTrigger +pasteCommand Index: quarks.h ================================================================== --- quarks.h +++ quarks.h @@ -182,10 +182,11 @@ #define Q_traceObject 183 #define Q_showInventory 184 #define Q_progress 185 #define Q_autoSave 186 #define Q_maxTrigger 187 +#define Q_pasteCommand 188 static const char*const global_quarks[]={ "screenWidth", "screenHeight", "margin", "palette", @@ -369,10 +370,11 @@ "traceObject", "showInventory", "progress", "autoSave", "maxTrigger", + "pasteCommand", 0}; #ifdef HEROMESH_BINDINGS static const SDLKey quark_to_key[Q_undo+1-Q_backspace]={ SDLK_BACKSPACE, SDLK_TAB,