diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index fcfecaa5..1d0ea324 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1813,14 +1813,6 @@ void Graphics::drawbackground( int t ) { FillRect(backBuffer,stars[i], getRGB(0x55,0x55,0x55)); } - stars[i].x -= Sint16(starsspeed[i]); - if (stars[i].x < -10) - { - stars[i].x += 340; - stars[i].y = int(fRandom() * 240); - stars[i].w = 2; - starsspeed[i] = 4+int(fRandom()*4); - } } break; case 2: @@ -2187,6 +2179,28 @@ void Graphics::drawbackground( int t ) } } +void Graphics::updatebackground(int t) +{ + switch (t) + { + case 1: + //Starfield + for (int i = 0; i < 50; i++) + { + stars[i].w = 2; + stars[i].h = 2; + stars[i].x -= Sint16(starsspeed[i]); + if (stars[i].x < -10) + { + stars[i].x += 340; + stars[i].y = int(fRandom() * 240); + stars[i].w = 2; + starsspeed[i] = 4+int(fRandom()*4); + } + } + } +} + void Graphics::drawmap() { if (!foregrounddrawn) diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 62af7b22..5ab717ef 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -164,6 +164,7 @@ public: void setcolreal(Uint32 t); void drawbackground(int t); + void updatebackground(int t); void drawtile3( int x, int y, int t, int off ); void drawentcolours( int x, int y, int t); void drawtile2( int x, int y, int t ); diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 8163ba26..9ece511d 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1503,4 +1503,9 @@ void gamelogic() } graphics.updatetextboxes(); + + if (!game.colourblindmode) + { + graphics.updatebackground(map.background); + } }