projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20000908-1-src
[rocksndiamonds.git]
/
src
/
sdl.c
diff --git
a/src/sdl.c
b/src/sdl.c
index f782961d2a509f9e43ea67d7f729ad32eca3b89f..e573d3637458592d200bcb56afcf9e1064ce5321 100644
(file)
--- a/
src/sdl.c
+++ b/
src/sdl.c
@@
-35,9
+35,9
@@
inline void SDLCopyArea(SDL_Surface *src_surface, SDL_Surface *dst_surface,
dst_rect.h = height;
SDL_BlitSurface(src_surface, &src_rect, dst_surface, &dst_rect);
dst_rect.h = height;
SDL_BlitSurface(src_surface, &src_rect, dst_surface, &dst_rect);
-#if 1
- SDL_UpdateRect(dst_surface, dst_x, dst_y, width, height);
-#endif
+
+ if (dst_surface == window)
+ SDL_UpdateRect(dst_surface, dst_x, dst_y, width, height);
}
inline void SDLFillRectangle(SDL_Surface *surface, int x, int y,
}
inline void SDLFillRectangle(SDL_Surface *surface, int x, int 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;
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 >> 2) & 0xff;
+ unsigned int color_g = (color >> 1) & 0xff;
+ unsigned int color_b = (color >> 0) & 0xff;
if (from_x > to_x)
swap_numbers(&from_x, &to_x);
if (from_x > to_x)
swap_numbers(&from_x, &to_x);