Index: bindings.c ================================================================== --- bindings.c +++ bindings.c @@ -6,10 +6,11 @@ /* This program is part of Free Hero Mesh and is public domain. */ #define HEROMESH_BINDINGS +#include #include #include #include #include "SDL.h" #include "sqlite3.h" @@ -271,10 +272,11 @@ switch(name[1]) { case '!': if(i>1) i=system(sqlite3_column_text(cmd->stmt,1)?:(const unsigned char*)"# "); break; case ';': i=SQLITE_DONE; goto done; case '?': if(i>1) puts(sqlite3_column_text(cmd->stmt,1)?:(const unsigned char*)"(null)"); break; case 'm': if(i>1) screen_message(sqlite3_column_text(cmd->stmt,1)?:(const unsigned char*)"(null)"); break; + case 's': malloc_stats(); fprintf(stderr,"SQLite memory use: %lld %lld\n",(long long)sqlite3_memory_used(),(long long)sqlite3_memory_highwater(1)); break; case 'x': sql_interactive(); break; } } else { k=name[0]*'\1\0'+name[1]*'\0\1'; while(i && sqlite3_column_type(cmd->stmt,i-1)==SQLITE_NULL) i--; Index: bindings.doc ================================================================== --- bindings.doc +++ bindings.doc @@ -61,21 +61,37 @@ '^T' Display the level title popup. '^d' - Display the help text of the object at the location. + Display the pop-up help text of the object at the location. '^o' - List objects at the specified coordinates. + List objects at the specified coordinates, to examine their values. === Editor commands === '^c' Display the class selection menu. + +=== Commands available in game and editor === + +'^E' + Switch to the editor. + +'^P' + Switch to the game play. + +'^Q' + Quit. + +'go' + Go to the specified level. If the level number is negative, then it is + a level order number, otherwise it is a level ID number. + === Mode-independent commands === ':!' Execute a system command. @@ -87,21 +103,11 @@ Write text to stdout. ':m' Display text on the screen, wait to push enter to continue. +':s' + Write memory allocation status to stderr. + ':x' Ask for a SQL statement, execute it, and display the results. -'^E' - Switch to the editor. - -'^P' - Switch to the game play. - -'^Q' - Quit. - -'go' - Go to the specified level. If the level number is negative, then it is - a level order number, otherwise it is a level ID number. -