summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
index d17e432..c582ac4 100644
--- a/src/game.c
+++ b/src/game.c
@@ -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);
}