Overview
Comment: | Implement the .autoSave resource. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
694a67346eb23d6eea4399fedc9ab5c5 |
User & Date: | user on 2021-03-21 03:51:40 |
Other Links: | manifest | tags |
Context
2021-03-21
| ||
06:42 | Implement the "a?" and "ArrayCell" instructions check-in: e0a86ed98a user: user tags: trunk | |
03:51 | Implement the .autoSave resource. check-in: 694a67346e user: user tags: trunk | |
2021-03-20
| ||
04:36 | Make some corrections to the implementation of dead animations check-in: d033ec4bd1 user: user tags: trunk | |
Changes
Modified config.doc from [b2bd2a8076] to [ae08bc54e2].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | === Resources === .altImage If the puzzle set contains multiple pictures with the same name and size then this resource controls which of those pictures is selected. The default setting is zero. .editTitle The window title to use in edit mode. A tilde is replaced by the name of the puzzle set. .gameTitle The window title to use in game mode. A tilde is replaced by the name of the puzzle set. | > > > > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | === Resources === .altImage If the puzzle set contains multiple pictures with the same name and size then this resource controls which of those pictures is selected. The default setting is zero. .autoSave If true, saves changes to the level and solution files when the program terminates. If false (default), they are only saved to the user cache database; to copy the changes to the level and solution files, you must use the .u command in SQL mode (-x). .editTitle The window title to use in edit mode. A tilde is replaced by the name of the puzzle set. .gameTitle The window title to use in game mode. A tilde is replaced by the name of the puzzle set. |
︙ | ︙ |
Modified main.c from [45d9e047ec] to [d4bdc87885].
︙ | ︙ | |||
843 844 845 846 847 848 849 850 851 852 853 854 855 856 | optionquery[1]=Q_traceAll; v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:""; if(boolxrm(v,0)) { memset(message_trace,255,sizeof(message_trace)); for(i=0;i<0x4000;i++) if(classes[i]) classes[i]->cflags|=CF_TRACEIN|CF_TRACEOUT; } } int main(int argc,char**argv) { int optind=1; while(argc>optind && argv[optind][0]=='-') { int i; const char*s=argv[optind++]; if(s[1]=='-' && !s[2]) break; | > > > > > > > | 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 | optionquery[1]=Q_traceAll; v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:""; if(boolxrm(v,0)) { memset(message_trace,255,sizeof(message_trace)); for(i=0;i<0x4000;i++) if(classes[i]) classes[i]->cflags|=CF_TRACEIN|CF_TRACEOUT; } } static inline void set_autosave(void) { const char*v; optionquery[1]=Q_autoSave; v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:""; if(boolxrm(v,0)) atexit(flush_usercache); } int main(int argc,char**argv) { int optind=1; while(argc>optind && argv[optind][0]=='-') { int i; const char*s=argv[optind++]; if(s[1]=='-' && !s[2]) break; |
︙ | ︙ | |||
911 912 913 914 915 916 917 918 919 | if(main_options['a']) run_auto_test(); if(main_options['x']) { fprintf(stderr,"Ready for executing SQL statements.\n"); no_dead_anim=1; do_sql_mode(); return 0; } for(;;) { if(main_options['e']) run_editor(); else run_game(); } } | > | 918 919 920 921 922 923 924 925 926 927 | if(main_options['a']) run_auto_test(); if(main_options['x']) { fprintf(stderr,"Ready for executing SQL statements.\n"); no_dead_anim=1; do_sql_mode(); return 0; } set_autosave(); for(;;) { if(main_options['e']) run_editor(); else run_game(); } } |
Modified quarks from [64ae3938b3] to [b4afbd56b7].
︙ | ︙ | |||
213 214 215 216 217 218 219 220 | tracePrefix stackProtection maxObjects traceAll traceObject showInventory progress | > | 213 214 215 216 217 218 219 220 221 | tracePrefix stackProtection maxObjects traceAll traceObject showInventory progress autoSave |
Modified quarks.h from [600f40dc0a] to [41522ff9b6].
︙ | ︙ | |||
178 179 180 181 182 183 184 185 186 187 188 189 190 191 | #define Q_tracePrefix 179 #define Q_stackProtection 180 #define Q_maxObjects 181 #define Q_traceAll 182 #define Q_traceObject 183 #define Q_showInventory 184 #define Q_progress 185 static const char*const global_quarks[]={ "screenWidth", "screenHeight", "margin", "palette", "popupColors", "imageSize", | > | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | #define Q_tracePrefix 179 #define Q_stackProtection 180 #define Q_maxObjects 181 #define Q_traceAll 182 #define Q_traceObject 183 #define Q_showInventory 184 #define Q_progress 185 #define Q_autoSave 186 static const char*const global_quarks[]={ "screenWidth", "screenHeight", "margin", "palette", "popupColors", "imageSize", |
︙ | ︙ | |||
363 364 365 366 367 368 369 370 371 372 373 374 375 376 | "tracePrefix", "stackProtection", "maxObjects", "traceAll", "traceObject", "showInventory", "progress", 0}; #ifdef HEROMESH_BINDINGS static const SDLKey quark_to_key[Q_undo+1-Q_backspace]={ SDLK_BACKSPACE, SDLK_TAB, SDLK_CLEAR, SDLK_RETURN, | > | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | "tracePrefix", "stackProtection", "maxObjects", "traceAll", "traceObject", "showInventory", "progress", "autoSave", 0}; #ifdef HEROMESH_BINDINGS static const SDLKey quark_to_key[Q_undo+1-Q_backspace]={ SDLK_BACKSPACE, SDLK_TAB, SDLK_CLEAR, SDLK_RETURN, |
︙ | ︙ |