Index: TODO ================================================================== --- TODO +++ TODO @@ -14,10 +14,11 @@ * Returning a class from COLLIDE/COLLIDEBY to transform * Editor * Mouse dragging * Level index editor * Bizarro world + * Selection rectangles * Table of contents for levels * Can define your own columns * User can write SQL queries on them * Deal better with allowing to skip past corrupted levels * Picture editor/loading @@ -35,5 +36,6 @@ * Maybe not needed? You can override the HOME environment variable * An alternative is to check argv[0]; if it contains / then don't use HOME * Command-line switch for batch import/export levels * SQL * Implement the GROUP column in the CLASSES table + * Allow multiple SQL statements in one binding Index: function.c ================================================================== --- function.c +++ function.c @@ -48,11 +48,11 @@ return; found: sqlite3_result_int(cxt,a); } static void fn_class_data(sqlite3_context*cxt,int argc,sqlite3_value**argv) { - int id=sqlite3_value_int(argv[0]); + int id=sqlite3_value_int(argv[0])&0xFFFF; Class*cl; if(id<0 || id>=0x4000 || !classes[id]) return; cl=classes[id]; switch(sqlite3_value_int(argv[1])&255) { case 0: sqlite3_result_int(cxt,id); break; Index: sql.doc ================================================================== --- sql.doc +++ sql.doc @@ -16,10 +16,34 @@ class, then the result is null. (This may be useful as a shortcut when used with the "OBJECTS" or "CLASSES" table.) CLASS_DATA(id,info) Returns data about a class. + 0 = ID + 1 = Temperature + 2 = Shape + 7 = First usable image + 12 = Misc4 + 13 = Misc5 + 14 = Misc6 + 15 = Misc7 + 18 = Arrivals + 19 = Departures + 33 = Invisible + 35 = UserState + 37 = Player + 39 = Stealthy + 40 = VisualOnly + 64 = Density + 65 = Volume + 66 = Strength + 67 = Weight + 69 = Height + 70 = Climb + 128 = Volume fraction + 130 = CollisionLayers + 132 = Compatible CVALUE(number) Makes a game value of type 'class', given the class number. You can also specify the class name instead of the number.