diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index ee31d0cc..664d9abe 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -527,6 +527,7 @@ void inline fixedloop() switch(game.gamestate) { case PRELOADER: + preloaderinput(); preloaderrenderfixed(); break; #if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR) diff --git a/desktop_version/src/preloader.cpp b/desktop_version/src/preloader.cpp index 840808f5..5f4e22d0 100644 --- a/desktop_version/src/preloader.cpp +++ b/desktop_version/src/preloader.cpp @@ -1,6 +1,7 @@ #include "Enums.h" #include "Game.h" #include "Graphics.h" +#include "KeyPoll.h" #include "UtilityClass.h" int pre_fakepercent=0, pre_transition=30; @@ -10,6 +11,21 @@ int pre_darkcol=0, pre_lightcol=0, pre_curcol=0, pre_coltimer=0, pre_offset=0; int pre_frontrectx=30, pre_frontrecty=20, pre_frontrectw=260, pre_frontrecth=200; int pre_temprectx=0, pre_temprecty=0, pre_temprectw=320, pre_temprecth=240; +void preloaderinput() +{ + game.press_action = false; + + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) { + game.press_action = true; + } + + if (game.press_action) { + //Skip to TITLEMODE immediately + game.gamestate = TITLEMODE; + game.jumpheld = true; + } +} + void preloaderrenderfixed() { if (pre_transition < 30) pre_transition--; diff --git a/desktop_version/src/preloader.h b/desktop_version/src/preloader.h index 5f273b1f..138ec174 100644 --- a/desktop_version/src/preloader.h +++ b/desktop_version/src/preloader.h @@ -1,6 +1,8 @@ #ifndef PRELOADER_H #define PRELOADER_H +void preloaderinput(); + void preloaderrender(); void preloaderrenderfixed();