Index: class.c ================================================================== --- class.c +++ class.c @@ -1320,13 +1320,21 @@ static char*class_def_help(void) { char*txt=malloc(0x3000); int n=0; int i; + if(!txt) fatal("Allocation failed\n"); for(;;) { nxttok(); if(tokent==TF_CLOSE) break; + if(Tokenf(TF_NAME) && tokenv==OP_MISC1 && !n) { + txt[0]=16; + n=1; + nxttok(); + if(tokent==TF_CLOSE) break; + ParseError("Close parenthesis expected\n"); + } if(!Tokenf(TF_NAME) || tokenv!=OP_STRING) ParseError("String expected\n"); i=strlen(tokenstr); if(i+n>=0x2FFA) ParseError("Help text is too long\n"); strcpy(txt+n,tokenstr); n+=i; Index: class.doc ================================================================== --- class.doc +++ class.doc @@ -313,10 +313,14 @@ (Help ) A help message for the game player, which would normally explain what this object does. Each string is one line of text. +(Help Misc1) + Similar to (Help) but tells it to display a level string referenced + by the Misc1 of this object. + (Image ) Specify strings with the names of images. The first string is the name of the image numbered 0, next for the image numbered 1, etc. Input Index: game.c ================================================================== --- game.c +++ game.c @@ -572,10 +572,15 @@ if(xy<0 || xy>=64*64) return; n=playfield[xy]; if(n==VOIDLINK) return; while(n!=VOIDLINK && objects[n]->up!=VOIDLINK) n=objects[n]->up; if(!classes[objects[n]->class]->gamehelp) return; + if(classes[objects[n]->class]->gamehelp[0]==16 && !classes[objects[n]->class]->gamehelp[1]) { + if(objects[n]->misc1.t!=TY_LEVELSTRING || objects[n]->misc1.u>=nlevelstrings) return; + modal_draw_popup(levelstrings[objects[n]->misc1.u]); + return; + } s=sqlite3_mprintf("\x0C\x0E%s:%d\\ %s\x0B\x0F%s",classes[objects[n]->class]->name,objects[n]->image,classes[objects[n]->class]->name,classes[objects[n]->class]->gamehelp); if(!s) fatal("Allocation failed\n"); modal_draw_popup(s); sqlite3_free(s); }