From 540fa18cb9154614fa29934e5a1d75f9d2d6a953 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Mon, 14 May 2007 19:29:22 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@998 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/docs.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/src/docs.cpp b/source/src/docs.cpp index 30991018..73b00a1c 100644 --- a/source/src/docs.cpp +++ b/source/src/docs.cpp @@ -186,7 +186,7 @@ void docfind(char *search) char *r; int rline; - if(r = cvecstr(srch, search, &rline)) + if((r = cvecstr(srch, search, &rline))) { const int matchchars = 200; string match; @@ -265,7 +265,7 @@ void docwritebaseref(char *ref, char *schemalocation, char *transformation) { ident &id = idents->enumc->data; if(id.type != ID_VAR) continue; - fprintf(f, "\t\t\t\t<%variable name=\"%s\">\n", xmlstringenc(name, id.name, _MAXDEFSTR)); + fprintf(f, "\t\t\t\t\n", xmlstringenc(name, id.name, _MAXDEFSTR)); fprintf(f, "\t\t\t\t\tTODO\n"); fprintf(f, "\t\t\t\t\t\n", id.min>id.max ? "" : "token=\"N\"", id.min, id.max, *id.storage, id.min>id.max ? "readOnly=\"true\"" : ""); fprintf(f, "\t\t\t\t\n"); @@ -446,10 +446,11 @@ void renderdoc(int x, int y) int screenlines = (VIRTH*2/3/FONTH)-1; if(docskip) docskip = min(docskip, doclines.length() - screenlines); // normalize bool more = docskip < doclines.length() - screenlines; - - for(int j = docskip; j > 0; j--) doclines.remove(0); // cut top for scrolling - for(int j = doclines.length(); j > screenlines; j--) doclines.pop(); // fit on screen - loopvj(doclines) if(doclines[j]) draw_textf("%s", x, y+j*FONTH, doclines[j]); + + for(int j = docskip; j < min(doclines.length(), docskip+screenlines); j++) + { + if(doclines[j]) draw_textf("%s", x, y+j*FONTH, doclines[j]); + } doclines.deletecontentsa(); if(more) draw_textf("\f4more (F3)", x, y+screenlines*FONTH); // footer @@ -504,4 +505,4 @@ void renderdocmenu(void *menu, bool init) s_sprintf(a.cmd)("showmenu [%s]", sections[i].name); menumanual(menu, i, sections[i].name, a.cmd); } -} \ No newline at end of file +}