1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-05 02:39:41 +01:00

Merge pull request #554 from InfoTeddy/general-improvements

Allow pressing ACTION to skip the fake loading screen
This commit is contained in:
Terry Cavanagh 2020-12-22 00:01:42 +10:30 committed by GitHub
commit 98effeee58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View file

@ -527,6 +527,7 @@ void inline fixedloop()
switch(game.gamestate)
{
case PRELOADER:
preloaderinput();
preloaderrenderfixed();
break;
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)

View file

@ -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--;

View file

@ -1,6 +1,8 @@
#ifndef PRELOADER_H
#define PRELOADER_H
void preloaderinput();
void preloaderrender();
void preloaderrenderfixed();