OSDN Git Service

Fix GameSurfaceSDL::Redraw().
authorDeskull <deskull@users.sourceforge.jp>
Mon, 10 Mar 2014 12:41:24 +0000 (21:41 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 10 Mar 2014 12:41:24 +0000 (21:41 +0900)
Deeangband/GameSurfaceSDL.cpp
Deeangband/GameSurfaceSDL.h
img/Title.png

index faae9ed..f4d7e6e 100644 (file)
@@ -91,11 +91,10 @@ void GameSurfaceSDL::initInterfaces(void)
        color.a = 255;
 
        if(!font) exit(1);
-       surface = TTF_RenderUTF8_Blended(font, toUTF8("D'angband\83e\83X\83g").c_str(), color);
 
        rwop = SDL_RWFromFile("img\\Title.png", "rb");
        error = IMG_GetError();
-       surface2 = IMG_LoadPNG_RW(rwop);
+       titleSurface = IMG_LoadPNG_RW(rwop);
 
        renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC);
 }
@@ -112,8 +111,7 @@ void GameSurfaceSDL::Redraw()
 
        SDL_FillRect(windowSurface, &rect, SDL_MapRGBA(windowSurface->format, 50, 20, 10, 255));
 
-       SDL_BlitSurface(surface, &src, windowSurface, &src); 
-       SDL_BlitSurface(surface2, &title, windowSurface, &title); 
+       SDL_BlitSurface(titleSurface, &title, windowSurface, &title); 
 
        if(viewFloorPtr) ViewFloor(viewFloorPtr, 0, 0, 20, 20);
 
index d04f954..830293e 100644 (file)
@@ -33,7 +33,7 @@ private:
        string error;
        SDL_Window *window;
        TTF_Font* font;
-       SDL_Surface *surface, *surface2;
+       SDL_Surface *titleSurface;
        SDL_Color color;
        SDL_Rect src;
        SDL_Rect title;
index cdd04f9..07e11fa 100644 (file)
Binary files a/img/Title.png and b/img/Title.png differ