Index: comconfig.doc ================================================================== --- comconfig.doc +++ comconfig.doc @@ -17,10 +17,19 @@ CONFIG_EXTRA_SCREEN_INIT Can be a C code to be executed after the video mode is set, but before any other screen initialization is done. +CONFIG_FUNCTION_ASK_TEXT + Should be a function or macro taking four arguments, which will ask for + and accept a single line of text. The first argument is the SDL screen + object, the second is the prompt text, the third is the code page number + for the prompt text, and the fourth is the code page number for the + input. The result is a pointer to a buffer (which the caller need not + free, and will not write to) containing the null-terminated text, or a + null pointer if the prompt has been cancelled by the user. + CONFIG_GLOBAL_HASH_SIZE Size of global hash table when reading class definition file. This must be less than 65535. CONFIG_LOCAL_HASH_SIZE @@ -66,19 +75,10 @@ CONFIG_ERROR_CHECKING Define error checking level, where 9 is maximum. Lower numbers might improve speed but may make the program crash in some cases and may also cause security vulnerabilities. -CONFIG_FUNCTION_ASK_TEXT - Should be a function or macro taking four arguments, which will ask for - and accept a single line of text. The first argument is the SDL screen - object, the second is the prompt text, the third is the code page number - for the prompt text, and the fourth is the code page number for the - input. The result is a pointer to a buffer (which the caller need not - free, and will not write to) containing the null-terminated text, or a - null pointer if the prompt has been cancelled by the user. - CONFIG_LAUNCHER_PATH If defined, then it is the full path to a file to execute if Free Hero Mesh has been invoked with no command-line arguments, or if it is given the flag to run the launcher program instead. (Maybe this should not be implemented; you can run the separate launcher program directly instead. Index: picture.c ================================================================== --- picture.c +++ picture.c @@ -252,10 +252,13 @@ ++f; } } const char*screen_prompt(const char*txt) { +#ifdef CONFIG_FUNCTION_ASK_TEXT + return CONFIG_FUNCTION_ASK_TEXT(screen,txt,367,0); +#else static char*t=0; int n=0; SDL_Rect r={0,0,screen->w,16}; int m=r.w>>3; SDL_Event ev; @@ -340,10 +343,11 @@ if(ev.button.button==2) goto paste; break; } } return 0; +#endif } int screen_message(const char*txt) { int n=0; SDL_Rect r={0,0,0,16};