Overview
Comment: | Add the MOVE_LIST() SQL function |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1c75f94d6bb76fcba9e30f4551282669 |
User & Date: | user on 2021-02-11 05:54:41 |
Other Links: | manifest | tags |
Context
2021-02-11
| ||
22:37 | Check for collision layers when adding objects in the editor check-in: 73439c4682 user: user tags: trunk | |
05:54 | Add the MOVE_LIST() SQL function check-in: 1c75f94d6b user: user tags: trunk | |
2021-02-10
| ||
06:52 | Implement and document key dispatch blocks. check-in: 7e93e77e75 user: user tags: trunk | |
Changes
Modified function.c from [ee9cae7e1c] to [0fdb3a7faa].
︙ | ︙ | |||
237 238 239 240 241 242 243 244 245 246 247 248 249 250 | s=load_level(sqlite3_value_int(*argv)); if(s) sqlite3_result_error(cxt,s,-1); } static void fn_modstate(sqlite3_context*cxt,int argc,sqlite3_value**argv) { sqlite3_result_int(cxt,SDL_GetModState()); } static void fn_movenumber(sqlite3_context*cxt,int argc,sqlite3_value**argv) { sqlite3_result_int(cxt,replay_pos); } static void fn_mvalue(sqlite3_context*cxt,int argc,sqlite3_value**argv) { int a; | > > > > | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | s=load_level(sqlite3_value_int(*argv)); if(s) sqlite3_result_error(cxt,s,-1); } static void fn_modstate(sqlite3_context*cxt,int argc,sqlite3_value**argv) { sqlite3_result_int(cxt,SDL_GetModState()); } static void fn_move_list(sqlite3_context*cxt,int argc,sqlite3_value**argv) { if(replay_count) sqlite3_result_blob(cxt,replay_list,replay_count,SQLITE_TRANSIENT); } static void fn_movenumber(sqlite3_context*cxt,int argc,sqlite3_value**argv) { sqlite3_result_int(cxt,replay_pos); } static void fn_mvalue(sqlite3_context*cxt,int argc,sqlite3_value**argv) { int a; |
︙ | ︙ | |||
937 938 939 940 941 942 943 944 945 946 947 948 949 950 | sqlite3_create_function(userdb,"HEROMESH_UNESCAPE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_heromesh_unescape,0,0); sqlite3_create_function(userdb,"LEVEL",0,SQLITE_UTF8,&level_ord,fn_level,0,0); sqlite3_create_function(userdb,"LEVEL_CACHEID",0,SQLITE_UTF8|SQLITE_DETERMINISTIC,ptr0,fn_cacheid,0,0); sqlite3_create_function(userdb,"LEVEL_ID",0,SQLITE_UTF8,&level_id,fn_level,0,0); sqlite3_create_function(userdb,"LEVEL_TITLE",0,SQLITE_UTF8,0,fn_level_title,0,0); sqlite3_create_function(userdb,"LOAD_LEVEL",1,SQLITE_UTF8,0,fn_load_level,0,0); sqlite3_create_function(userdb,"MODSTATE",0,SQLITE_UTF8,0,fn_modstate,0,0); sqlite3_create_function(userdb,"MOVENUMBER",0,SQLITE_UTF8,0,fn_movenumber,0,0); sqlite3_create_function(userdb,"MVALUE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_mvalue,0,0); sqlite3_create_function(userdb,"NVALUE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_zero_extend,0,0); sqlite3_create_function(userdb,"OVALUE",1,SQLITE_UTF8,0,fn_ovalue,0,0); sqlite3_create_function(userdb,"PFHEIGHT",0,SQLITE_UTF8,&pfheight,fn_pfsize,0,0); sqlite3_create_function(userdb,"PFWIDTH",0,SQLITE_UTF8,&pfwidth,fn_pfsize,0,0); sqlite3_create_function(userdb,"PICTURE_SIZE",0,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_picture_size,0,0); | > | 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | sqlite3_create_function(userdb,"HEROMESH_UNESCAPE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_heromesh_unescape,0,0); sqlite3_create_function(userdb,"LEVEL",0,SQLITE_UTF8,&level_ord,fn_level,0,0); sqlite3_create_function(userdb,"LEVEL_CACHEID",0,SQLITE_UTF8|SQLITE_DETERMINISTIC,ptr0,fn_cacheid,0,0); sqlite3_create_function(userdb,"LEVEL_ID",0,SQLITE_UTF8,&level_id,fn_level,0,0); sqlite3_create_function(userdb,"LEVEL_TITLE",0,SQLITE_UTF8,0,fn_level_title,0,0); sqlite3_create_function(userdb,"LOAD_LEVEL",1,SQLITE_UTF8,0,fn_load_level,0,0); sqlite3_create_function(userdb,"MODSTATE",0,SQLITE_UTF8,0,fn_modstate,0,0); sqlite3_create_function(userdb,"MOVE_LIST",0,SQLITE_UTF8,0,fn_move_list,0,0); sqlite3_create_function(userdb,"MOVENUMBER",0,SQLITE_UTF8,0,fn_movenumber,0,0); sqlite3_create_function(userdb,"MVALUE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_mvalue,0,0); sqlite3_create_function(userdb,"NVALUE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_zero_extend,0,0); sqlite3_create_function(userdb,"OVALUE",1,SQLITE_UTF8,0,fn_ovalue,0,0); sqlite3_create_function(userdb,"PFHEIGHT",0,SQLITE_UTF8,&pfheight,fn_pfsize,0,0); sqlite3_create_function(userdb,"PFWIDTH",0,SQLITE_UTF8,&pfwidth,fn_pfsize,0,0); sqlite3_create_function(userdb,"PICTURE_SIZE",0,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_picture_size,0,0); |
︙ | ︙ |
Modified sql.doc from [8e507e60da] to [e12587dc57].
︙ | ︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 | MVALUE(number) Makes a game value of type 'message'. MODSTATE() The SDL keyboard modifier state. MOVENUMBER() Return the number of moves executed so far since the level restarted. NVALUE(number) Makes a game value of type 'number'. Same as ZERO_EXTEND. OVALUE(number) | > > > | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | MVALUE(number) Makes a game value of type 'message'. MODSTATE() The SDL keyboard modifier state. MOVE_LIST() Return the current move list as a blob. MOVENUMBER() Return the number of moves executed so far since the level restarted. NVALUE(number) Makes a game value of type 'number'. Same as ZERO_EXTEND. OVALUE(number) |
︙ | ︙ |