From: Holger Schemel Date: Wed, 25 Oct 2000 21:43:51 +0000 (+0200) Subject: rnd-20001025-1-src X-Git-Tag: 2.0.0^2~39 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=386a99d41a627e9d96aac8247a6ef7754817de9c;p=rocksndiamonds.git rnd-20001025-1-src --- diff --git a/src/game.c b/src/game.c index 0b731c32..63bf4b00 100644 --- a/src/game.c +++ b/src/game.c @@ -513,7 +513,6 @@ void InitGame() ZX = ZY = -1; - game.yam_content_nr = 0; FrameCounter = 0; TimeFrames = 0; TimePlayed = 0; @@ -526,6 +525,8 @@ void InitGame() ScrollStepSize = 0; /* will be correctly initialized by ScrollScreen() */ AllPlayersGone = FALSE; + + game.yam_content_nr = 0; game.magic_wall_active = FALSE; game.magic_wall_time_left = 0; game.light_time_left = 0; diff --git a/src/sdl.c b/src/sdl.c index e573d363..941904e7 100644 --- a/src/sdl.c +++ b/src/sdl.c @@ -44,9 +44,9 @@ inline void SDLFillRectangle(SDL_Surface *surface, int x, int y, int width, int height, unsigned int color) { SDL_Rect rect; - unsigned int color_r = (color >> 2) && 0xff; - unsigned int color_g = (color >> 1) && 0xff; - unsigned int color_b = (color >> 0) && 0xff; + unsigned int color_r = (color >> 16) && 0xff; + unsigned int color_g = (color >> 8) && 0xff; + unsigned int color_b = (color >> 0) && 0xff; rect.x = x; rect.y = y; @@ -62,9 +62,9 @@ inline void SDLDrawSimpleLine(SDL_Surface *surface, int from_x, int from_y, int to_x, int to_y, unsigned int color) { SDL_Rect rect; - unsigned int color_r = (color >> 2) & 0xff; - unsigned int color_g = (color >> 1) & 0xff; - unsigned int color_b = (color >> 0) & 0xff; + unsigned int color_r = (color >> 16) & 0xff; + unsigned int color_g = (color >> 8) & 0xff; + unsigned int color_b = (color >> 0) & 0xff; if (from_x > to_x) swap_numbers(&from_x, &to_x);