237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
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
|
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);
|