From 52b58dde26d1d7b69d1c97ca6bc19295ca62ce0f Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 14 Dec 2014 14:31:34 +0000 Subject: [PATCH] Lunatic: show on-screen errors even in passive menu; fix '(display)rand*' for large values. Also, some minor style cleanup in game.c. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4815 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/demo.c | 3 +++ polymer/eduke32/source/game.c | 27 ++++++++++++---------- polymer/eduke32/source/lunatic/control.lua | 4 ++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/polymer/eduke32/source/demo.c b/polymer/eduke32/source/demo.c index c2f564c46..dbd336238 100644 --- a/polymer/eduke32/source/demo.c +++ b/polymer/eduke32/source/demo.c @@ -787,6 +787,9 @@ nextdemo_nomenu: if (foundemo == 0) { G_DrawBackground(); +#ifdef LUNATIC + El_DisplayErrors(); +#endif } else { diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 8f08814b8..f16b5e413 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -3963,18 +3963,20 @@ static int32_t G_DoThirdPerson(const DukePlayer_t *pp, vec3_t *vect, int16_t *vs void G_DrawBackground(void) { const int32_t dapicnum = BIGHOLE; - int32_t x,y,x1,y1,x2,y2,rx; + int32_t x,y,x1,x2; flushperms(); + // XXX: if dapicnum is not available, this might leave the menu background + // not drawn, leading to "HOM". if (tilesiz[dapicnum].x == 0 || tilesiz[dapicnum].y == 0) { pus = pub = NUMPAGES; return; } - y1 = 0; - y2 = ydim; + int32_t y1=0, y2=ydim; + if ((g_player[myconnectindex].ps->gm&MODE_GAME) || ud.recstat == 2) { if (GametypeFlags[ud.coop] & GAMETYPE_FRAGBAR) @@ -3998,15 +4000,16 @@ void G_DrawBackground(void) #if !defined LUNATIC if (Gv_GetVarByLabel("MENU_TILE", !fstilep, -1, -1)) #else - if (!fstilep) + if (!fstilep) #endif - { - if ((unsigned)bgtile < MAXTILES) - for (y=y1; y