Free Hero Mesh

Check-in [cc72ae321f]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:In the picture editor, ensure the pick function works even if caps lock and/or num lock is activated.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cc72ae321f973e8590fd2c6c99570c2c3c88051e
User & Date: user on 2022-03-09 04:05:27
Other Links: manifest | tags
Context
2022-03-09
04:46
When a level is changed, set the user state to unsolved even if no solution has been recorded. check-in: e93f746d5e user: user tags: trunk
04:05
In the picture editor, ensure the pick function works even if caps lock and/or num lock is activated. check-in: cc72ae321f user: user tags: trunk
2022-03-08
00:47
When using -C switch, also list all user-defined messages, too. check-in: 3ac276fa11 user: user tags: trunk
Changes

Modified picedit.c from [bb85947c15] to [a7247f6f66].

808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
        break;
      case SDL_MOUSEBUTTONDOWN:
        if(ev.button.x>=screen->w-161 && ev.button.x<screen->w-1 && ev.button.y>=40 && ev.button.y<200) {
          x=(ev.button.x+161-screen->w)/10;
          y=(ev.button.y-40)/10;
          i=y*16+x;
          pick:
          y=SDL_GetModState();
          switch(ev.button.button) {
            case 1: cc=i; break;
            case 2:
              for(x=(m.y+1)*pict[sel]->size+m.x;x<pict[sel]->size*(pict[sel]->size+1);x++) {
                if(!y || ((y&(KMOD_CTRL|KMOD_SHIFT)) && (((x-x/pict[sel]->size)^(y&KMOD_CTRL?1:0))&1))) {
                  if(pict[sel]->data[x]==cc) pict[sel]->data[x]=i;
                }







|







808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
        break;
      case SDL_MOUSEBUTTONDOWN:
        if(ev.button.x>=screen->w-161 && ev.button.x<screen->w-1 && ev.button.y>=40 && ev.button.y<200) {
          x=(ev.button.x+161-screen->w)/10;
          y=(ev.button.y-40)/10;
          i=y*16+x;
          pick:
          y=SDL_GetModState()&0xFFF;
          switch(ev.button.button) {
            case 1: cc=i; break;
            case 2:
              for(x=(m.y+1)*pict[sel]->size+m.x;x<pict[sel]->size*(pict[sel]->size+1);x++) {
                if(!y || ((y&(KMOD_CTRL|KMOD_SHIFT)) && (((x-x/pict[sel]->size)^(y&KMOD_CTRL?1:0))&1))) {
                  if(pict[sel]->data[x]==cc) pict[sel]->data[x]=i;
                }