From c9949f53a30040583128c792fc067a3addd0ef7a Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 25 Jul 2015 17:23:20 +0000 Subject: [PATCH] engine: fix unbalanced begindrawing()/enddrawing() pair in printext16(). git-svn-id: https://svn.eduke32.com/eduke32@5310 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 8 +++----- polymer/eduke32/build/src/engine.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 5e8c65de5..988874c7d 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -3504,6 +3504,8 @@ void overheadeditor(void) int32_t cx = halfxdim16+x2; int32_t cy = midydim16+y2; + begindrawing(); //{{{ LOCK_FRAME_1 + if ((cx >= 2 && cx <= xdim-3) && (cy >= 2 && cy <= ydim16-3)) { int16_t angofs = m32_sideview ? m32_sideang : 0; @@ -3511,15 +3513,11 @@ void overheadeditor(void) y1 = mulscale11(sintable[(startang+angofs+2048)&2047],zoom) / 768; i = scalescreeny(x1); j = scalescreeny(y1); - begindrawing(); //{{{ drawline16base(cx,cy, x1,j, -x1,-j, editorcolors[6]); drawline16base(cx,cy, x1,j, +y1,-i, editorcolors[6]); drawline16base(cx,cy, x1,j, -y1,+i, editorcolors[6]); - enddrawing(); //}}} } - begindrawing(); //{{{ - if (keystatus[0x2a] && (pointhighlight&16384) && highlightcnt<=0) // LShift { // draw lines to linking sprites @@ -3949,7 +3947,7 @@ void overheadeditor(void) } } - enddrawing(); //}}} + enddrawing(); //}}} LOCK_FRAME_1 OSD_Draw(); } diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index d017d28d3..bd088c9aa 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -17778,13 +17778,13 @@ int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, con ptr += bytesperline; } } + enddrawing(); //}}} stx += charxsiz; if (stx >= xdim) break; } - enddrawing(); //}}} return stx; }