mirror of
https://github.com/Leahnaya/Sonataria.git
synced 2026-10-02 04:17:15 -05:00
Added A Lot
This commit is contained in:
BIN
Debug/MusicFX/Songs/Curtain_Rise.wav
Normal file
BIN
Debug/MusicFX/Songs/Curtain_Rise.wav
Normal file
Binary file not shown.
BIN
Debug/MusicFX/Songs/Login_bg_m.wav
Normal file
BIN
Debug/MusicFX/Songs/Login_bg_m.wav
Normal file
Binary file not shown.
BIN
Debug/MusicFX/Songs/Results_Score.wav
Normal file
BIN
Debug/MusicFX/Songs/Results_Score.wav
Normal file
Binary file not shown.
BIN
Debug/MusicFX/Songs/The_Great_Parade.wav
Normal file
BIN
Debug/MusicFX/Songs/The_Great_Parade.wav
Normal file
Binary file not shown.
@@ -1 +1 @@
|
||||
WIN-AUDIO|0.5
|
||||
WIN-AUDIO|0.2
|
||||
|
||||
6
Debug/Songs/B/charts/1/L1.txt
Normal file
6
Debug/Songs/B/charts/1/L1.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
15876:0:0:1
|
||||
19809:0:0:1
|
||||
31551:1:5800:40
|
||||
77079:1:5300:40
|
||||
110103:1:1400:20
|
||||
125484:1:7750:60
|
||||
5
Debug/Songs/B/charts/1/L2.txt
Normal file
5
Debug/Songs/B/charts/1/L2.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
12001:0:0:1
|
||||
13909:0:0:1
|
||||
39418:1:1790:5
|
||||
82451:1:1900:10
|
||||
94222:1:3870:15
|
||||
9
Debug/Songs/B/charts/1/L3.txt
Normal file
9
Debug/Songs/B/charts/1/L3.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
8067:0:0:1
|
||||
10005:0:0:1
|
||||
41355:1:1870:10
|
||||
47285:1:1600:10
|
||||
49163:1:1800:10
|
||||
51130:1:4160:20
|
||||
86384:1:3750:20
|
||||
98126:1:10770:20
|
||||
113742:1:1080:10
|
||||
2
Debug/Songs/B/charts/1/L4.txt
Normal file
2
Debug/Songs/B/charts/1/L4.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
43292:1:1790:3
|
||||
90288:1:2900:5
|
||||
2
Debug/Songs/B/charts/1/L5.txt
Normal file
2
Debug/Songs/B/charts/1/L5.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
45288:1:1790:20
|
||||
119613:1:4800:40
|
||||
7
Debug/Songs/B/charts/1/Wheel.txt
Normal file
7
Debug/Songs/B/charts/1/Wheel.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
23478:0:-1:2:1:7800:20
|
||||
62872:0:1:1:2:11860:40
|
||||
74760:0:1:2:5:1800:20
|
||||
109513:0:-1:3:1:590:5
|
||||
111600:0:1:1:3:2100:20
|
||||
114858:0:1:3:5:2780:20
|
||||
124427:0:-1:5:1:1050:10
|
||||
15
Debug/Songs/B/info.json
Normal file
15
Debug/Songs/B/info.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"songId": 7,
|
||||
"title": "B",
|
||||
"author": "t+pazolite",
|
||||
"bpm": 245.25,
|
||||
"diffs": {
|
||||
"easyDiff": 1,
|
||||
"mediumDiff": 0,
|
||||
"hardDiff": 0,
|
||||
"extremeDiff": 0
|
||||
},
|
||||
"jacketArt": "jacket.png",
|
||||
"roundArt": "round.png",
|
||||
"audioFile": "beep.wav"
|
||||
}
|
||||
BIN
Debug/Songs/B/jacket.png
Normal file
BIN
Debug/Songs/B/jacket.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 246 KiB |
@@ -0,0 +1,6 @@
|
||||
15876:0:0:1
|
||||
19809:0:0:1
|
||||
31551:1:5800:40
|
||||
77079:1:5300:40
|
||||
110103:1:1400:20
|
||||
125484:1:7750:60
|
||||
@@ -0,0 +1,5 @@
|
||||
12001:0:0:1
|
||||
13909:0:0:1
|
||||
39418:1:1790:5
|
||||
82451:1:1900:10
|
||||
94222:1:3870:15
|
||||
@@ -0,0 +1,9 @@
|
||||
8067:0:0:1
|
||||
10005:0:0:1
|
||||
41355:1:1870:10
|
||||
47285:1:1600:10
|
||||
49163:1:1800:10
|
||||
51130:1:4160:20
|
||||
86384:1:3750:20
|
||||
98126:1:10770:20
|
||||
113742:1:1080:10
|
||||
@@ -0,0 +1,2 @@
|
||||
43292:1:1790:3
|
||||
90288:1:2900:5
|
||||
@@ -0,0 +1,2 @@
|
||||
45288:1:1790:20
|
||||
119613:1:4800:40
|
||||
@@ -0,0 +1,7 @@
|
||||
23478:0:-1:2:1:7800:20
|
||||
62872:0:1:1:2:11860:40
|
||||
74760:0:1:2:5:1800:20
|
||||
109513:0:-1:3:1:590:5
|
||||
111600:0:1:1:3:2100:20
|
||||
114858:0:1:3:5:2780:20
|
||||
124427:0:-1:5:1:1050:10
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
1998:1:2600:5
|
||||
42664:1:300:3
|
||||
97964:0:0:1
|
||||
108631:0:0:1
|
||||
109298:0:0:1
|
||||
@@ -0,0 +1,5 @@
|
||||
37598:1:200:2
|
||||
98631:0:0:1
|
||||
103931:0:0:1
|
||||
108631:0:0:1
|
||||
109298:0:0:1
|
||||
@@ -0,0 +1,19 @@
|
||||
7298:1:2633:5
|
||||
37464:1:200:2
|
||||
42798:1:300:3
|
||||
47998:1:300:3
|
||||
53298:0:0:1
|
||||
53464:0:0:1
|
||||
53631:0:0:1
|
||||
73664:1:2000:5
|
||||
99298:0:0:1
|
||||
104598:0:0:1
|
||||
106098:0:0:1
|
||||
106631:0:0:1
|
||||
107298:0:0:1
|
||||
107831:0:0:1
|
||||
111431:0:0:1
|
||||
111964:0:0:1
|
||||
112531:0:0:1
|
||||
113098:0:0:1
|
||||
113631:1:5000:5
|
||||
@@ -0,0 +1,6 @@
|
||||
37298:1:200:2
|
||||
48131:1:300:3
|
||||
99764:0:0:1
|
||||
105164:0:0:1
|
||||
109964:0:0:1
|
||||
110498:0:0:1
|
||||
@@ -0,0 +1,14 @@
|
||||
12631:1:150:2
|
||||
13298:1:150:2
|
||||
13964:1:150:2
|
||||
14498:1:150:2
|
||||
14964:1:150:2
|
||||
42964:1:300:3
|
||||
48298:1:300:3
|
||||
100298:0:0:1
|
||||
101298:0:0:1
|
||||
101964:0:0:1
|
||||
102498:0:0:1
|
||||
102998:0:0:1
|
||||
109964:0:0:1
|
||||
110498:0:0:1
|
||||
@@ -0,0 +1,18 @@
|
||||
4631:0:1:1:3:2633:10
|
||||
9964:0:1:3:5:2644:10
|
||||
15298:0:-1:5:1:7600:20
|
||||
33998:0:1:1:5:3200:4
|
||||
39331:0:-1:5:4:200:2
|
||||
44564:0:1:1:2:200:2
|
||||
49998:0:-1:5:4:200:2
|
||||
55298:0:1:1:2:200:2
|
||||
57964:0:-1:5:4:200:2
|
||||
63264:0:1:1:2:200:2
|
||||
65998:0:-1:5:3:200:2
|
||||
68631:0:1:1:3:200:2
|
||||
71298:0:-1:5:2:200:2
|
||||
72031:0:1:1:5:200:2
|
||||
72664:0:-1:5:1:200:2
|
||||
75598:0:1:1:5:2000:20
|
||||
119398:0:-1:5:1:2000:20
|
||||
124831:0:1:1:5:5000:20
|
||||
BIN
Debug/Textures/Playbills/Instructions.png
Normal file
BIN
Debug/Textures/Playbills/Instructions.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
BIN
Debug/Videos/AttractTitleScreen.mp4
Normal file
BIN
Debug/Videos/AttractTitleScreen.mp4
Normal file
Binary file not shown.
Binary file not shown.
@@ -25,6 +25,8 @@ using namespace std;
|
||||
#include "OpenGLText.h"
|
||||
#include "TextureList.h"
|
||||
|
||||
#include "ScreenRenderer.h"
|
||||
|
||||
void parseInNotes(vector<Note>& lane, int LaneNum, string songPath, int diffNumber, int bpm);
|
||||
void parseInWheel(vector<WheelNote>& wheel, string songPath, int diffNumber, int bpm);
|
||||
void tokenize2(std::string const& str, const char delim, std::vector<std::string>& out);
|
||||
@@ -1225,6 +1227,7 @@ void GameRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
}
|
||||
}
|
||||
// End of Song
|
||||
screenRenderer.gameEnded = true;
|
||||
|
||||
// Only save the status of the song when the service button wasn't pressed
|
||||
if (!gameState.checkService() && gameState.getGameState() != GameState::CurrentState::SHUTDOWN) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "GameState.h"
|
||||
#include <iostream>
|
||||
#include "Logger.h"
|
||||
#include "MusicPlayer.h"
|
||||
#include "RFIDCardReader.h"
|
||||
#include "ScreenRenderer.h"
|
||||
#include <thread>
|
||||
@@ -152,13 +153,27 @@ void GameState::onStateUnload(GameState::CurrentState stateUnloaded) {
|
||||
void GameState::onStateLoad(GameState::CurrentState stateLoaded) {
|
||||
// Handle Any Scene Load Items
|
||||
switch (stateLoaded) {
|
||||
default:
|
||||
case GameState::CurrentState::TITLE_SCREEN:
|
||||
resetResults();
|
||||
userData.clearData();
|
||||
musicPlayer.playSong("MusicFX/Songs/The_Great_Parade.wav");
|
||||
break;
|
||||
case GameState::CurrentState::PRELOGIN:
|
||||
RFIDCardReader::getCardReader()->clearLastCardData();
|
||||
musicPlayer.playSong("MusicFX/Songs/Login_bg_m.wav");
|
||||
break;
|
||||
case GameState::CurrentState::SONG_SELECT:
|
||||
musicPlayer.playSong("MusicFX/Songs/Curtain_Rise.wav");
|
||||
break;
|
||||
case GameState::CurrentState::RESULTS:
|
||||
case GameState::CurrentState::FINAL_RESULTS:
|
||||
musicPlayer.playSong("MusicFX/Songs/Results_Score.wav");
|
||||
break;
|
||||
case GameState::CurrentState::GAME:
|
||||
musicPlayer.stopSong();
|
||||
break;
|
||||
case GameState::CurrentState::TEST_MENU_MAIN:
|
||||
musicPlayer.stopSong();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class GameState {
|
||||
enum class CurrentState {
|
||||
STARTUP, SHUTDOWN, ERROR_CODE, TEST_MENU_MAIN, TITLE_SCREEN, UPDATES, TEST_MENU_IOCHECK,
|
||||
TEST_MENU_INPUTCHECK, TEST_MENU_SYSINFO, PRELOGIN, LOGIN_DETAILS, CREATE_PROFILE, SONG_SELECT, GAME, RESULTS, FINAL_RESULTS,
|
||||
TEST_MENU_SOUNDOPTIONS, TEST_MENU_NETWORKING
|
||||
TEST_MENU_SOUNDOPTIONS, TEST_MENU_NETWORKING, THANKS_FOR_PLAYING
|
||||
};
|
||||
enum class OnlineState {
|
||||
OFFLINE, ONLINE, MAINTENENCE
|
||||
@@ -66,7 +66,9 @@ class GameState {
|
||||
vector<CurrentState> serviceStates{
|
||||
CurrentState::STARTUP, CurrentState::SHUTDOWN, CurrentState::ERROR_CODE, CurrentState::TEST_MENU_MAIN,
|
||||
CurrentState::UPDATES, CurrentState::TEST_MENU_IOCHECK, CurrentState::TEST_MENU_INPUTCHECK,
|
||||
CurrentState::TEST_MENU_SYSINFO, CurrentState::TEST_MENU_SOUNDOPTIONS, CurrentState::TEST_MENU_NETWORKING };
|
||||
CurrentState::TEST_MENU_SYSINFO, CurrentState::TEST_MENU_SOUNDOPTIONS, CurrentState::TEST_MENU_NETWORKING,
|
||||
CurrentState::RESULTS, CurrentState::GAME
|
||||
};
|
||||
|
||||
bool isSwitchingStates;
|
||||
};
|
||||
|
||||
37
Sonataria/MusicPlayer.cpp
Normal file
37
Sonataria/MusicPlayer.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "MusicPlayer.h"
|
||||
#include "Logger.h"
|
||||
|
||||
MusicPlayer musicPlayer;
|
||||
|
||||
MusicPlayer::MusicPlayer() {}
|
||||
|
||||
MusicPlayer::~MusicPlayer() {}
|
||||
|
||||
void MusicPlayer::playSong(std::string pathToFile) {
|
||||
// Don't start playing if already playing
|
||||
if (pathToFile == this->currentSong) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop music
|
||||
this->music.stop();
|
||||
|
||||
// Load new song
|
||||
if (!this->music.openFromFile(pathToFile)) {
|
||||
logger.logError("Failed to open music: ", pathToFile);
|
||||
}
|
||||
|
||||
// Set Looping
|
||||
this->music.setLoop(true);
|
||||
|
||||
// Play song
|
||||
this->music.play();
|
||||
|
||||
this->currentSong = pathToFile;
|
||||
}
|
||||
|
||||
void MusicPlayer::stopSong() {
|
||||
// Stop music
|
||||
this->music.stop();
|
||||
this->currentSong = "";
|
||||
}
|
||||
18
Sonataria/MusicPlayer.h
Normal file
18
Sonataria/MusicPlayer.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "SFML/Audio.hpp"
|
||||
#include <string>
|
||||
#pragma once
|
||||
|
||||
class MusicPlayer {
|
||||
|
||||
public:
|
||||
MusicPlayer();
|
||||
~MusicPlayer();
|
||||
void playSong(std::string pathToFile);
|
||||
void stopSong();
|
||||
|
||||
private:
|
||||
sf::Music music;
|
||||
std::string currentSong;
|
||||
};
|
||||
|
||||
extern MusicPlayer musicPlayer;
|
||||
@@ -134,6 +134,7 @@ ScreenRenderer::ScreenRenderer() {
|
||||
CurvySymbol = new QuadSprite(L"Curvy Symbol");
|
||||
LeftBracket = new QuadSprite(L"Left Bracket");
|
||||
RightBracket = new QuadSprite(L"Right Bracket");
|
||||
Thanks = new QuadSprite(L"Thanks for Playing");
|
||||
|
||||
// Login
|
||||
TapLifeLinkPass = new QuadSprite(L"Tap Life Link Pass");
|
||||
@@ -149,6 +150,7 @@ ScreenRenderer::ScreenRenderer() {
|
||||
AttractTitleScreen = new VideoSprite(L"Attract Title Screen Video");
|
||||
SetMorning = new QuadSprite(L"Set Morning");
|
||||
SetAfternoon = new QuadSprite(L"Set Afternoon");
|
||||
SetEvening = new QuadSprite(L"Set Evening");
|
||||
|
||||
// PreLogin Sprites
|
||||
LifeLinkIcon = new QuadSprite(L"Life Link Icon");
|
||||
@@ -160,6 +162,7 @@ ScreenRenderer::ScreenRenderer() {
|
||||
Act2Fin = new QuadSprite(L"Act 2 Fin");
|
||||
Fin = new QuadSprite(L"Fin");
|
||||
PreSelectAllBoxes = new QuadSprite(L"PreSelect All Boxes");
|
||||
Instructions = new QuadSprite(L"Instructions");
|
||||
|
||||
JacketArt1 = new QuadSprite(L"Jacket Art 1");
|
||||
JacketArt2 = new QuadSprite(L"Jacket Art 2");
|
||||
@@ -249,6 +252,7 @@ ScreenRenderer::~ScreenRenderer() {
|
||||
delete CurvySymbol;
|
||||
delete LeftBracket;
|
||||
delete RightBracket;
|
||||
delete Thanks;
|
||||
|
||||
// Login
|
||||
delete TapLifeLinkPass;
|
||||
@@ -264,6 +268,7 @@ ScreenRenderer::~ScreenRenderer() {
|
||||
delete AttractTitleScreen;
|
||||
delete SetMorning;
|
||||
delete SetAfternoon;
|
||||
delete SetEvening;
|
||||
|
||||
// PreLogin Sprites
|
||||
delete LifeLinkIcon;
|
||||
@@ -275,6 +280,7 @@ ScreenRenderer::~ScreenRenderer() {
|
||||
delete Act2Fin;
|
||||
delete Fin;
|
||||
delete PreSelectAllBoxes;
|
||||
delete Instructions;
|
||||
|
||||
delete JacketArt1;
|
||||
delete JacketArt2;
|
||||
@@ -339,6 +345,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
CurvySymbol->initSprite(spriteShader.getProgram());
|
||||
LeftBracket->initSprite(spriteShader.getProgram());
|
||||
RightBracket->initSprite(spriteShader.getProgram());
|
||||
Thanks->initSprite(spriteShader.getProgram());
|
||||
|
||||
// Login
|
||||
TapLifeLinkPass->initSprite(spriteShader.getProgram());
|
||||
@@ -353,6 +360,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
// Backgrounds
|
||||
SetMorning->initSprite(spriteShader.getProgram());
|
||||
SetAfternoon->initSprite(spriteShader.getProgram());
|
||||
SetEvening->initSprite(spriteShader.getProgram());
|
||||
|
||||
// PreLogin Sprites
|
||||
LifeLinkIcon->initSprite(spriteShader.getProgram());
|
||||
@@ -364,6 +372,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
Act2Fin->initSprite(spriteShader.getProgram());
|
||||
Fin->initSprite(spriteShader.getProgram());
|
||||
PreSelectAllBoxes->initSprite(spriteShader.getProgram());
|
||||
Instructions->initSprite(spriteShader.getProgram());
|
||||
|
||||
JacketArt1->initSprite(spriteShader.getProgram());
|
||||
JacketArt2->initSprite(spriteShader.getProgram());
|
||||
@@ -384,6 +393,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
CurvySymbol->setTextureID(TextureList::Inst()->GetTextureID("Textures/General/CurvySymbol.png"));
|
||||
LeftBracket->setTextureID(TextureList::Inst()->GetTextureID("Textures/General/Brackets/LeftBracket.png"));
|
||||
RightBracket->setTextureID(TextureList::Inst()->GetTextureID("Textures/General/Brackets/RightBracket.png"));
|
||||
Thanks->setTextureID(TextureList::Inst()->GetTextureID("Textures/ThanksForPlaying/ThanksForPlaying.png"));
|
||||
|
||||
// Login
|
||||
TapLifeLinkPass->setTextureID(TextureList::Inst()->GetTextureID("Textures/Login/TapLifeLinkPass.png"));
|
||||
@@ -398,6 +408,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
// Backgrounds
|
||||
SetMorning->setTextureID(TextureList::Inst()->GetTextureID("Textures/Backgrounds/Set-Morning.png"));
|
||||
SetAfternoon->setTextureID(TextureList::Inst()->GetTextureID("Textures/Backgrounds/Set-Afternoon.png"));
|
||||
SetEvening->setTextureID(TextureList::Inst()->GetTextureID("Textures/Backgrounds/Set-Evening.png"));
|
||||
|
||||
// PreLogin Sprites
|
||||
LifeLinkIcon->setTextureID(TextureList::Inst()->GetTextureID("Textures/Login/LifeLink.png"));
|
||||
@@ -409,6 +420,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
Act2Fin->setTextureID(TextureList::Inst()->GetTextureID("Textures/Playbills/Base Playbills/Playbill-Act2Fin.png"));
|
||||
Fin->setTextureID(TextureList::Inst()->GetTextureID("Textures/Playbills/Base Playbills/Playbill Fin.png"));
|
||||
PreSelectAllBoxes->setTextureID(TextureList::Inst()->GetTextureID("Textures/Playbills/Song Preselect Boxes/AllBoxes.png"));
|
||||
Instructions->setTextureID(TextureList::Inst()->GetTextureID("Textures/Playbills/Instructions.png"));
|
||||
|
||||
JacketArt6->setTextureID(TextureList::Inst()->GetTextureID(this->currentPageSongs[5].getJacketArtPath()));
|
||||
JacketArt1->setTextureID(TextureList::Inst()->GetTextureID(this->currentPageSongs[0].getJacketArtPath()));
|
||||
@@ -428,6 +440,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
SpotlightRight->scale(2.f * aspect, 2.f, 1.f);
|
||||
CurvySymbol->scale(.4f * aspect, .4f, 1.f);
|
||||
CurvySymbol->translate(0.f, -0.1f, 0.f);
|
||||
Thanks->scale(2.f * aspect, 2.f, 1.f);
|
||||
|
||||
// Login
|
||||
TapLifeLinkPass->scale(.15f * 6.25f, .15f, 1.f);
|
||||
@@ -444,6 +457,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
// Backgrounds
|
||||
SetMorning->scale(2.f * aspect, 2.f, 1.f);
|
||||
SetAfternoon->scale(2.f * aspect, 2.f, 1.f);
|
||||
SetEvening->scale(2.f * aspect, 2.f, 1.f);
|
||||
|
||||
// PreLogin Sprites
|
||||
LifeLinkIcon->scale(.35f * aspect, .35f, 1.f);
|
||||
@@ -462,6 +476,8 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
Fin->translate(0.f, -0.25f, 0.f);
|
||||
PreSelectAllBoxes->scale(1.5f * aspect, 1.5f, 1.f);
|
||||
PreSelectAllBoxes->translate(0.f, -0.25f, 0.f);
|
||||
Instructions->scale(7.68f * 0.18f, 0.18f, 1.f);
|
||||
Instructions->translate(.55f, 0.2f, 0.f);
|
||||
|
||||
JacketArt1->scale(.22f);
|
||||
JacketArt1->translate(-1.1f, -.055f, 0.f);
|
||||
@@ -490,8 +506,8 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
}
|
||||
|
||||
// Initialize Videos
|
||||
/*if (!AttractTitleScreen->loadVideo("Videos/temp_AttractTitleScreen.mp4")) {
|
||||
logger.logError("Failed to load video: Videos/temp_AttractTitleScreen.mp4");
|
||||
/*if (!AttractTitleScreen->loadVideo("Videos/AttractTitleScreen.mp4")) {
|
||||
logger.logError("Failed to load video: Videos/AttractTitleScreen.mp4");
|
||||
exit(1);
|
||||
}*/
|
||||
|
||||
@@ -641,8 +657,15 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
ms currentOffset = std::chrono::duration_cast<ms>(fs);
|
||||
// Use currentOffset.count() to get millisecond value
|
||||
|
||||
if (gameEnded == true && gameState.getGameState() != GameState::CurrentState::GAME) {
|
||||
gameEnded = false;
|
||||
}
|
||||
|
||||
// Check if switching to the GAME game state
|
||||
if (gameState.getGameState() == GameState::CurrentState::GAME) {
|
||||
if (gameEnded == true) {
|
||||
continue;
|
||||
}
|
||||
// Clear the buffers
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
@@ -677,7 +700,7 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
|
||||
// DRAW BACKGROUNDS / STAGE (MAIN SET)
|
||||
{
|
||||
if (gameState.isInServiceGameState()) {
|
||||
if (!(gameState.getGameState() == GameState::CurrentState::RESULTS) && gameState.isInServiceGameState()) {
|
||||
// Don't render anything background related when in a service state
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::TITLE_SCREEN) {
|
||||
@@ -690,6 +713,9 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
// Render that frame
|
||||
//AttractTitleScreen->render(PROJECTION::ORTHOGRAPHIC);
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::THANKS_FOR_PLAYING) {
|
||||
Thanks->render(PROJECTION::ORTHOGRAPHIC);
|
||||
}
|
||||
else {
|
||||
// Render Background
|
||||
if (gameState.getGameState() == GameState::CurrentState::PRELOGIN) {
|
||||
@@ -701,6 +727,12 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
else if (gameState.getGameState() == GameState::CurrentState::SONG_SELECT) {
|
||||
SetAfternoon->render(PROJECTION::ORTHOGRAPHIC);
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::RESULTS) {
|
||||
SetEvening->render(PROJECTION::ORTHOGRAPHIC);
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::FINAL_RESULTS) {
|
||||
SetEvening->render(PROJECTION::ORTHOGRAPHIC);
|
||||
}
|
||||
|
||||
// Render Set
|
||||
Stage->render(PROJECTION::ORTHOGRAPHIC);
|
||||
@@ -820,6 +852,8 @@ void ScreenRenderer::render(sf::RenderWindow* gameWindow) {
|
||||
JacketArt5->render(PROJECTION::ORTHOGRAPHIC);
|
||||
JacketArt6->render(PROJECTION::ORTHOGRAPHIC);
|
||||
|
||||
Instructions->render(PROJECTION::ORTHOGRAPHIC);
|
||||
|
||||
// Draw the brackets to show which hovered over
|
||||
LeftBracket->reset();
|
||||
RightBracket->reset();
|
||||
@@ -1363,42 +1397,42 @@ break;
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 800.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, gameState.results.back().getSong().getTitle(), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, gameState.results.back().getSong().getTitle(), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 700.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, gameState.results.back().getSong().getArtist(), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, gameState.results.back().getSong().getArtist(), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 600.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Difficulty: " + to_wstring(gameState.results.back().getDifficulty()), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Difficulty: " + to_wstring(gameState.results.back().getDifficulty()), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 500.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Score: " + to_wstring(gameState.results.back().getScore()), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Score: " + to_wstring(gameState.results.back().getScore()), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 400.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Perfects: " + to_wstring(gameState.results.back().getPerfectCount()), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Perfects: " + to_wstring(gameState.results.back().getPerfectCount()), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 300.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Nears: " + to_wstring(gameState.results.back().getNearCount()), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Nears: " + to_wstring(gameState.results.back().getNearCount()), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 200.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Miss: " + to_wstring(gameState.results.back().getMissCount()), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Miss: " + to_wstring(gameState.results.back().getMissCount()), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, -400.f, 0.f);
|
||||
testMenuText1->translate(0.f, -220.f, 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Press Start To Continue...", ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, L"Press Start To Continue...", ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::FINAL_RESULTS) {
|
||||
// NOTE: THIS WHOLE SECTION IS JUST PLACEHOLDER UNTIL FINAL ART IS ADDED
|
||||
@@ -1411,12 +1445,12 @@ break;
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 800.f - ((float)i * 400.f), 0.f);
|
||||
testMenuText1->scale(0.4f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, gameState.results[i].getSong().getTitle() + L" - " + gameState.results.back().getSong().getArtist(), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, gameState.results[i].getSong().getTitle() + L" - " + gameState.results.back().getSong().getArtist(), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
|
||||
testMenuText1->reset();
|
||||
testMenuText1->translate(0.f, 600.f - ((float)i * 400.f), 0.f);
|
||||
testMenuText1->scale(0.5f);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, to_wstring(gameState.results[i].getDifficulty()) + L" - " + to_wstring(gameState.results.back().getScore()), ALIGNMENT::CENTERED);
|
||||
testMenuText1->render(PROJECTION::ORTHOGRAPHIC, to_wstring(gameState.results[i].getDifficulty()) + L" - " + to_wstring(gameState.results.back().getScore()), ALIGNMENT::CENTERED, 0.f, 0.f, 0.f);
|
||||
}
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::LOGIN_DETAILS) {
|
||||
@@ -1509,16 +1543,6 @@ break;
|
||||
// Otherwise, proceed as normal and go to the title screen
|
||||
gameState.setGameState(GameState::CurrentState::TITLE_SCREEN);
|
||||
}
|
||||
|
||||
// Clear up all the memory for the text used on the startup screen as it won't be needed anymore
|
||||
delete gameVersion;
|
||||
delete startupText;
|
||||
delete networkText;
|
||||
delete colon1;
|
||||
delete updatesText;
|
||||
delete colon2;
|
||||
delete networkStatusText;
|
||||
delete updatesStatusText;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ class ScreenRenderer {
|
||||
*/
|
||||
int loginComplete;
|
||||
|
||||
bool gameEnded = false;
|
||||
|
||||
private:
|
||||
int testMenuPos;
|
||||
int testMenuTotalOptions;
|
||||
@@ -98,6 +100,7 @@ class ScreenRenderer {
|
||||
QuadSprite* CurvySymbol;
|
||||
QuadSprite* LeftBracket;
|
||||
QuadSprite* RightBracket;
|
||||
QuadSprite* Thanks;
|
||||
|
||||
// Login
|
||||
QuadSprite* TapLifeLinkPass;
|
||||
@@ -113,6 +116,7 @@ class ScreenRenderer {
|
||||
VideoSprite* AttractTitleScreen;
|
||||
QuadSprite* SetMorning;
|
||||
QuadSprite* SetAfternoon;
|
||||
QuadSprite* SetEvening;
|
||||
|
||||
// PreLogin Sprites
|
||||
QuadSprite* LifeLinkIcon;
|
||||
@@ -124,6 +128,7 @@ class ScreenRenderer {
|
||||
QuadSprite* Act2Fin;
|
||||
QuadSprite* Fin;
|
||||
QuadSprite* PreSelectAllBoxes;
|
||||
QuadSprite* Instructions;
|
||||
|
||||
QuadSprite* JacketArt1;
|
||||
QuadSprite* JacketArt2;
|
||||
|
||||
@@ -209,6 +209,7 @@ copy $(SolutionDir)dependencies\ffmpeg-4.5\bin\swresample-4.dll $(OutputPath)</
|
||||
<ClCompile Include="Logger.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Matrices.cpp" />
|
||||
<ClCompile Include="MusicPlayer.cpp" />
|
||||
<ClCompile Include="Networking.cpp" />
|
||||
<ClCompile Include="Note.cpp" />
|
||||
<ClCompile Include="OpenGLFont.cpp" />
|
||||
@@ -248,6 +249,7 @@ copy $(SolutionDir)dependencies\ffmpeg-4.5\bin\swresample-4.dll $(OutputPath)</
|
||||
<ClInclude Include="KeyboardState.h" />
|
||||
<ClInclude Include="Logger.h" />
|
||||
<ClInclude Include="Matrices.h" />
|
||||
<ClInclude Include="MusicPlayer.h" />
|
||||
<ClInclude Include="Networking.h" />
|
||||
<ClInclude Include="Note.h" />
|
||||
<ClInclude Include="OpenGLFont.h" />
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
<ClCompile Include="SoundEffects.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MusicPlayer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GameState.h">
|
||||
@@ -248,6 +251,9 @@
|
||||
<ClInclude Include="SoundEffects.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MusicPlayer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Resource.rc">
|
||||
|
||||
@@ -40,7 +40,7 @@ TextureManager::TextureInfo tempTexList[] = {
|
||||
{ "Textures/Backgrounds/Set-Morning.png", 11, GL_BGRA, GL_RGBA, nullptr },
|
||||
{ "Textures/Backgrounds/Set-Afternoon.png", 12, GL_BGRA, GL_RGBA, nullptr },
|
||||
{ "Textures/Backgrounds/Set-Evening.png", 13, GL_BGRA, GL_RGBA, nullptr },
|
||||
{ "Textures/Backgrounds/Audience.png", 14, GL_BGRA, GL_RGB, nullptr},
|
||||
{ "Textures/Backgrounds/Audience.png", 14, GL_BGRA, GL_RGBA, nullptr},
|
||||
|
||||
// General
|
||||
{ "Textures/General/ClosedCurtainLeft.png", 15, GL_BGRA, GL_RGBA, nullptr },
|
||||
@@ -83,7 +83,7 @@ TextureManager::TextureInfo tempTexList[] = {
|
||||
{ "Textures/Difficulties/Extreme.png", 46, GL_BGRA, GL_RGBA, nullptr },
|
||||
|
||||
// Thanks For Playing
|
||||
{ "Textures/ThanksForPlaying/ThanksForPlaying.png", 47, GL_BGR, GL_RGB, nullptr },
|
||||
{ "Textures/ThanksForPlaying/ThanksForPlaying.png", 47, GL_BGRA, GL_RGBA, nullptr },
|
||||
|
||||
// Game
|
||||
{ "Textures/Game/Grades/S.png", 48, GL_BGRA, GL_RGBA, nullptr },
|
||||
@@ -111,9 +111,11 @@ TextureManager::TextureInfo tempTexList[] = {
|
||||
{ "Songs/Psyched Fevereiro/jacket.png", 70, GL_BGRA, GL_RGBA, nullptr },
|
||||
{ "Songs/The Great Parade/jacket.png", 71, GL_BGRA, GL_RGBA, nullptr },
|
||||
|
||||
{ "Textures/Playbills/Instructions.png", 72, GL_BGRA, GL_RGBA, nullptr },
|
||||
|
||||
// Fonts
|
||||
{ "Fonts/HonyaJi-Re.ttf", 72, 0, 0, nullptr },
|
||||
{ "Fonts/Stayola-Regular.otf", 73, 0, 0, nullptr}
|
||||
{ "Fonts/HonyaJi-Re.ttf", 73, 0, 0, nullptr },
|
||||
{ "Fonts/Stayola-Regular.otf", 74, 0, 0, nullptr}
|
||||
};
|
||||
|
||||
// Declare static members of TextureList
|
||||
|
||||
@@ -331,9 +331,12 @@ int main(int argc, char** argv) {
|
||||
controllerInput.reset();
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::FINAL_RESULTS) {
|
||||
gameState.setGameState(GameState::CurrentState::TITLE_SCREEN);
|
||||
// Clear the saved data at the end of the credit regardless of whether or not they are carded in
|
||||
userData.clearData();
|
||||
gameState.setGameState(GameState::CurrentState::THANKS_FOR_PLAYING);
|
||||
}
|
||||
else if (gameState.getGameState() == GameState::CurrentState::THANKS_FOR_PLAYING) {
|
||||
// Clear the saved data at the end of the credit regardless of whether or not they are carded in
|
||||
userData.clearData();
|
||||
gameState.setGameState(GameState::CurrentState::TITLE_SCREEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user