mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-29 15:04:23 +01:00
Add a background as well
This commit is contained in:
parent
3ff0e351f5
commit
1eff870e62
4
main.cpp
4
main.cpp
@ -24,6 +24,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
SDL_Surface *screen;
|
SDL_Surface *screen;
|
||||||
|
SDL_Surface *g_background;
|
||||||
PrintMenu *g_menu;
|
PrintMenu *g_menu;
|
||||||
|
|
||||||
static void run(void)
|
static void run(void)
|
||||||
@ -43,6 +44,7 @@ static void run(void)
|
|||||||
|
|
||||||
SDL_Flip(screen);
|
SDL_Flip(screen);
|
||||||
SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 0,0,0));
|
SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 0,0,0));
|
||||||
|
SDL_BlitSurface(g_background, NULL, screen, NULL);
|
||||||
SDL_Delay(50);
|
SDL_Delay(50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,6 +82,8 @@ static void init(void)
|
|||||||
|
|
||||||
fnt = read_and_alloc_font("font.ttf", 18);
|
fnt = read_and_alloc_font("font.ttf", 18);
|
||||||
|
|
||||||
|
g_background = IMG_Load("themes/default/background.png");
|
||||||
|
|
||||||
bg_left = IMG_Load("themes/default/bg_left.png");
|
bg_left = IMG_Load("themes/default/bg_left.png");
|
||||||
bg_right = IMG_Load("themes/default/bg_right.png");
|
bg_right = IMG_Load("themes/default/bg_right.png");
|
||||||
bg_middle = IMG_Load("themes/default/bg_middle.png");
|
bg_middle = IMG_Load("themes/default/bg_middle.png");
|
||||||
|
BIN
themes/default/background.png
Normal file
BIN
themes/default/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Reference in New Issue
Block a user