Fade in logoscreen from black, make it slightly faster.

This commit is contained in:
Henrik Rydgård 2017-03-06 11:03:56 +01:00
parent a1941d8a81
commit 50b722152a
2 changed files with 7 additions and 3 deletions

View file

@ -91,7 +91,8 @@ void DrawBackground(UIContext &dc, float alpha = 1.0f) {
int img = I_BG;
#endif
ui_draw2d.DrawImageStretch(img, dc.GetBounds());
uint32_t bgColor = whiteAlpha(alpha);
ui_draw2d.DrawImageStretch(img, dc.GetBounds(), bgColor);
float t = time_now();
for (int i = 0; i < 100; i++) {
float x = xbase[i] + dc.GetBounds().x;
@ -409,10 +410,12 @@ void LogoScreen::Next() {
}
}
const float logoScreenSeconds = 2.5f;
void LogoScreen::update(InputState &input_state) {
UIScreen::update(input_state);
frames_++;
if (frames_ > 180 || input_state.pointer_down[0]) {
if (frames_ > 60 * logoScreenSeconds || input_state.pointer_down[0]) {
Next();
}
}
@ -443,7 +446,7 @@ void LogoScreen::render() {
float yres = dc.GetBounds().h;
dc.Begin();
float t = (float)frames_ / 60.0f;
float t = (float)frames_ / (60.0f * logoScreenSeconds / 3.0f);
float alpha = t;
if (t > 1.0f)

View file

@ -373,6 +373,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
LogManager *logman = LogManager::GetInstance();
#ifdef __ANDROID__
// TODO: This is also done elsewhere. Remove?
// On Android, create a PSP directory tree in the external_dir,
// to hopefully reduce confusion a bit.
ILOG("Creating %s", (g_Config.memStickDirectory + "PSP").c_str());