mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Allow pressing ACTION to skip fake loading screen
While there already exists an option to skip the fake loading screen entirely (without requiring an ACTION press), there are several reasons for including this option as well: * So people upgrading from 2.2 won't have to sit through the fake loading screen the first time they open 2.3. * So if people are too lazy to use the existing option, they can use this one instead. * So tool-assisted speedruns (TASes) of this game can skip the fake loading screen without requiring an existing settings.vvv beforehand. This last one is the biggest reason for me, since I'm not sure what TASVideos.org rules are regarding existing save files, but with this change nobody has to worry about their rules and can safely just press ACTION to skip the fake loading screen automatically.
This commit is contained in:
parent
04da8085a3
commit
96d397060c
3 changed files with 19 additions and 0 deletions
|
@ -527,6 +527,7 @@ void inline fixedloop()
|
||||||
switch(game.gamestate)
|
switch(game.gamestate)
|
||||||
{
|
{
|
||||||
case PRELOADER:
|
case PRELOADER:
|
||||||
|
preloaderinput();
|
||||||
preloaderrenderfixed();
|
preloaderrenderfixed();
|
||||||
break;
|
break;
|
||||||
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
|
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "Enums.h"
|
#include "Enums.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
|
#include "KeyPoll.h"
|
||||||
#include "UtilityClass.h"
|
#include "UtilityClass.h"
|
||||||
|
|
||||||
int pre_fakepercent=0, pre_transition=30;
|
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_frontrectx=30, pre_frontrecty=20, pre_frontrectw=260, pre_frontrecth=200;
|
||||||
int pre_temprectx=0, pre_temprecty=0, pre_temprectw=320, pre_temprecth=240;
|
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()
|
void preloaderrenderfixed()
|
||||||
{
|
{
|
||||||
if (pre_transition < 30) pre_transition--;
|
if (pre_transition < 30) pre_transition--;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef PRELOADER_H
|
#ifndef PRELOADER_H
|
||||||
#define PRELOADER_H
|
#define PRELOADER_H
|
||||||
|
|
||||||
|
void preloaderinput();
|
||||||
|
|
||||||
void preloaderrender();
|
void preloaderrender();
|
||||||
|
|
||||||
void preloaderrenderfixed();
|
void preloaderrenderfixed();
|
||||||
|
|
Loading…
Reference in a new issue