diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-12 16:57:19 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-12 16:57:19 +0200 |
| commit | f194481a520a39a1964348011df8deb108f789b7 (patch) | |
| tree | 3e1cc79ad60c41d3aa945ece7cc8f2bfdcf968be /src/game.c | |
| parent | 6edff0dea52389801a093ac6311dd66d01587605 (diff) | |
splash art
Diffstat (limited to 'src/game.c')
| -rw-r--r-- | src/game.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -372,9 +372,25 @@ static void move_camera(platform_window* window) { _global_camera.y = (int)_camera_buffer.y; } +void draw_splash(platform_window* window) { + image* img = img_splash_art1; + int imgw = img->width * (window->height/(float)img->height); + int imgh = window->height; + + int imgx = (window->width - imgw) / 2 + _global_camera.x; + int imgy = 0 + _global_camera.y; + + renderer->render_image(img, imgx, imgy, imgw, imgh); +} + void update_game(platform_window* window) { clear_bullets(); + if (global_state.state != GAMESTATE_PLAYING) { + draw_splash(window); + return; + } + if (global_state.server) { update_server(window); } |
