Free Hero Mesh

Check-in [16400482c5]
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:Add 'am' editor command to make MRU item by SQL results
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 16400482c52fb5f1f604ffef3eb66775d4132cec
User & Date: user on 2021-09-18 22:37:48
Other Links: manifest | tags
Context
2021-09-19
01:48
Add function calls in pattern matching. check-in: c43bc33f91 user: user tags: trunk
2021-09-18
22:37
Add 'am' editor command to make MRU item by SQL results check-in: 16400482c5 user: user tags: trunk
00:23
Implement some mouse-based controls in level strings editor. check-in: 0cad524186 user: user tags: trunk
Changes

Modified bindings.doc from [a316f7d56f] to [8ef2bcacd1].

144
145
146
147
148
149
150



151
152
153
154
155
156
157

'^u' <location>
  Add an object with the current MRU values to that location, even if
  there is already another object of the same class at that location.

'^w'
  Swap the normal world with the bizarro world.




'em' <object>
  Edit the Misc/Dir of an existing object.

'ex' <command>
  Export a level (given the operating system command to receive the
  exported data). See export.doc for details.







>
>
>







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

'^u' <location>
  Add an object with the current MRU values to that location, even if
  there is already another object of the same class at that location.

'^w'
  Swap the normal world with the bizarro world.

'am' <class> <image> <misc1> <misc2> <misc3> <dir>
  Add a MRU and select the added MRU.

'em' <object>
  Edit the Misc/Dir of an existing object.

'ex' <command>
  Export a level (given the operating system command to receive the
  exported data). See export.doc for details.

Modified default.heromeshrc from [b7279ec6a0] to [030ec22b1d].

156
157
158
159
160
161
162

163
164
165
166
167
168
169
?.editKey.return: ^e
?.editKey.f1: select 'im',:Import_Level;
?.editKey.f2: select 'ex',:Export_Level;
?.editClick.left: ^a
?.editClick.ctrl.left: select 'em',id from objects where x=$X and y=$Y and up is null;
?.editClick.alt.left: ^u
?.editClick.right: delete from objects where x=$X and y=$Y and up is null;


! Global key bindings
?.?.kp_minus: select 'go',-(level()-1) where level()>1;
?.?.kp_plus: select 'go',-(level()+1) where level()<max_level();
?.?.ctrl.G: select 'go',-:Go_To_Level where :Go_To_Level=cast(:Go_To_Level as int) and cast(:Go_To_Level as int)>0;
?.?.ctrl.Q: ^Q
?.?.ctrl.S: ^S







>







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
?.editKey.return: ^e
?.editKey.f1: select 'im',:Import_Level;
?.editKey.f2: select 'ex',:Export_Level;
?.editClick.left: ^a
?.editClick.ctrl.left: select 'em',id from objects where x=$X and y=$Y and up is null;
?.editClick.alt.left: ^u
?.editClick.right: delete from objects where x=$X and y=$Y and up is null;
?.editClick.ctrl.right: select 'am',class,image,misc1,misc2,misc3,dir from objects where x=$X and y=$Y and up is null;

! Global key bindings
?.?.kp_minus: select 'go',-(level()-1) where level()>1;
?.?.kp_plus: select 'go',-(level()+1) where level()<max_level();
?.?.ctrl.G: select 'go',-:Go_To_Level where :Go_To_Level=cast(:Go_To_Level as int) and cast(:Go_To_Level as int)>0;
?.?.ctrl.Q: ^Q
?.?.ctrl.S: ^S

Modified edit.c from [3dcbbc08e2] to [60ceeab4c3].

1509
1510
1511
1512
1513
1514
1515












1516
1517
1518
1519
1520
1521
1522
      return -1;
    case '^S': // Save level
      save_level();
      return 1;
    case '^T': // Level title
      edit_string(&level_title);
      return 0;












    case 'em': // Edit Misc/Dir of object
      if(argc>1 && sqlite3_column_type(args,1)!=SQLITE_NULL) mru_edit_obj(sqlite3_column_int64(args,1));
      return 0;
    case 'ex': // Export level
      if(argc<2) return prev;
      export_level(sqlite3_column_text(args,1));
      return prev;







>
>
>
>
>
>
>
>
>
>
>
>







1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
      return -1;
    case '^S': // Save level
      save_level();
      return 1;
    case '^T': // Level title
      edit_string(&level_title);
      return 0;
    case 'am': // Add MRU
      if(argc<7) return prev;
      for(x=1;x<7;x++) if(sqlite3_column_type(args,x)==SQLITE_NULL) return prev;
      x=sqlite3_column_int(args,1)&0x3FFF;
      if(!x) return prev;
      y=sqlite3_column_int(args,2)&0xFF;
      add_mru(x,y);
      mru->misc1=UVALUE(sqlite3_column_int64(args,3),sqlite3_column_int64(args,3)>>32);
      mru->misc2=UVALUE(sqlite3_column_int64(args,4),sqlite3_column_int64(args,4)>>32);
      mru->misc3=UVALUE(sqlite3_column_int64(args,5),sqlite3_column_int64(args,5)>>32);
      mru->dir=sqlite3_column_int(args,6)&7;
      return prev;
    case 'em': // Edit Misc/Dir of object
      if(argc>1 && sqlite3_column_type(args,1)!=SQLITE_NULL) mru_edit_obj(sqlite3_column_int64(args,1));
      return 0;
    case 'ex': // Export level
      if(argc<2) return prev;
      export_level(sqlite3_column_text(args,1));
      return prev;