From 198a3a556c67bcb76019877fd845d68015df8c5b Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 1 May 2013 17:42:05 +0000 Subject: [PATCH] Classic: optimize background 'rainbow' drawing in use for editor/debug. Also, draw it at shade 18 and don't use fullbright colors. git-svn-id: https://svn.eduke32.com/eduke32@3721 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 600a97ff9..566843c3a 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -1180,23 +1180,24 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t), // must have writable frame buffer, i.e. done begindrawing() static void draw_rainbow_background(void) { - int32_t i, j; - const int32_t dimenprod = bytesperline*ydimen; - char *const p = (char *)frameplace; + int32_t y, i; + const int32_t N = 240; // don't use fullbright colors + const int32_t numfull=bytesperline/N, numrest=bytesperline%N; - j = 0; - for (i=0; i= xdimen) - { - while (j < bytesperline) - i++, j++; - j = 0; - } + for (i=0; i 0) + Bmemcpy(&dst[N*i], src, numrest); + + dst += bytesperline; } } + // // setslope //