diff options
Diffstat (limited to 'src/graphic.c')
-rw-r--r-- | src/graphic.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/graphic.c b/src/graphic.c index 802fd5d..a444819 100644 --- a/src/graphic.c +++ b/src/graphic.c @@ -265,3 +265,14 @@ int paintObject(struct gameObjectState *obj, SDL_Rect *srcRect, SDL_Surface *dst return 0; } +int refresh(SDL_Surface *tmpSurf, SDL_Rect *srcRect, SDL_Surface *screen, SDL_Rect dstRect) { + int res; + + res=SDL_BlitSurface(tmpSurf, srcRect, screen, &dstRect); + if ( res!=0 ) { + logs2(LOG_DEBUG, "refresh(), SDL_BlitSurface()", SDL_GetError()); + } + + SDL_UpdateRect(screen, dstRect.x, dstRect.y, dstRect.w, dstRect.h); + return res; +} |