mirror of
https://github.com/echojc/osu-ds.git
synced 2025-06-20 09:55:42 -04:00

Removed the arm7 section Changed the makefile to only use the arm9 stuff Epicpkmn: Fix source/Graphics/GraphicsManager.cpp Co-Authored-By: Pk11 <epicpkmn11@outlook.com> Co-Authored-By: Kaisaan <34224128+Kaisaan@users.noreply.github.com>
54 lines
943 B
C++
54 lines
943 B
C++
#include "Mode.h"
|
|
#include "Player.h"
|
|
#include "SongSelect.h"
|
|
#include "System/GameClock.h"
|
|
#include "System/TextManager.h"
|
|
|
|
void ChangeMode(ModeType mode)
|
|
{
|
|
//dim screen
|
|
if (Mode::sCurrentMode != NULL)
|
|
{
|
|
for (s32 b = 0; b >= -16; --b)
|
|
{
|
|
setBrightness(1, b);
|
|
swiWaitForVBlank();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
setBrightness(1, -16);
|
|
}
|
|
|
|
TextManager::Bottom().Clear();
|
|
TextManager::Top().Clear();
|
|
|
|
//must reset clock before calling constructors
|
|
//otherwise bad things happen with sprites
|
|
GameClock::Clock().Reset();
|
|
|
|
if (Mode::sCurrentMode != NULL)
|
|
delete Mode::sCurrentMode;
|
|
|
|
switch (mode)
|
|
{
|
|
case MODE_PLAYER:
|
|
Mode::sCurrentMode = new Player();
|
|
break;
|
|
case MODE_SONGSELECT:
|
|
Mode::sCurrentMode = new SongSelect();
|
|
break;
|
|
}
|
|
|
|
swiWaitForVBlank();
|
|
Mode::CurrentMode().Update();
|
|
glFlush(1);
|
|
|
|
//return screen to full brightness
|
|
for (s32 b = -16; b <= 0; ++b)
|
|
{
|
|
setBrightness(1, b);
|
|
swiWaitForVBlank();
|
|
}
|
|
}
|