mirror of
https://github.com/wiiu-env/launchiine.git
synced 2025-02-18 00:56:19 +01:00
Update integer conversion
This commit is contained in:
parent
fd22a86dfa
commit
dba542d6b0
@ -1,5 +1,5 @@
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20240704
|
||||
|
||||
COPY --from=wiiuenv/libgui:20220109 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libgui:2022020513505562e265 /artifacts $DEVKITPRO
|
||||
|
||||
WORKDIR project
|
||||
|
@ -158,7 +158,8 @@ Application * Application::applicationInstance = nullptr;
|
||||
bool Application::exitApplication = false;
|
||||
bool Application::quitRequest = false;
|
||||
|
||||
Application::Application(): CThread(CThread::eAttributeAffCore1 | CThread::eAttributePinnedAff, 0, 0x800000), bgMusic(nullptr), video(nullptr), mainWindow(nullptr), fontSystem(nullptr), exitCode(0) {
|
||||
Application::Application()
|
||||
: CThread(CThread::eAttributeAffCore1 | CThread::eAttributePinnedAff, 0, 0x800000), bgMusic(nullptr), video(nullptr), mainWindow(nullptr), fontSystem(nullptr), exitCode(0) {
|
||||
controller[0] = new VPadController(GuiTrigger::CHANNEL_1);
|
||||
controller[1] = new WPadController(GuiTrigger::CHANNEL_2);
|
||||
controller[2] = new WPadController(GuiTrigger::CHANNEL_3);
|
||||
@ -171,9 +172,7 @@ Application::Application(): CThread(CThread::eAttributeAffCore1 | CThread::eAttr
|
||||
bgMusic->Play();
|
||||
bgMusic->SetVolume(50);
|
||||
|
||||
AsyncExecutor::execute([] {
|
||||
DEBUG_FUNCTION_LINE("Hello");
|
||||
});
|
||||
AsyncExecutor::execute([] { DEBUG_FUNCTION_LINE("Hello"); });
|
||||
|
||||
exitApplication = false;
|
||||
|
||||
@ -218,14 +217,7 @@ void Application::quit(int32_t code) {
|
||||
}
|
||||
|
||||
void Application::fadeOut() {
|
||||
GuiImage fadeOut(video->getTvWidth(), video->getTvHeight(), (GX2Color) {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
255
|
||||
});
|
||||
|
||||
glm::mat4 identityMatrix(1.0f);
|
||||
GuiImage fadeOut(video->getTvWidth(), video->getTvHeight(), (GX2Color){0, 0, 0, 255});
|
||||
|
||||
for (int32_t i = 0; i < 255; i += 10) {
|
||||
if (i > 255)
|
||||
@ -238,7 +230,7 @@ glm::mat4 identityMatrix(1.0f);
|
||||
mainWindow->drawDrc(video);
|
||||
|
||||
GX2SetDepthOnlyControl(GX2_DISABLE, GX2_DISABLE, GX2_COMPARE_FUNC_ALWAYS);
|
||||
fadeOut.draw(video, identityMatrix);
|
||||
fadeOut.draw(video);
|
||||
GX2SetDepthOnlyControl(GX2_ENABLE, GX2_ENABLE, GX2_COMPARE_FUNC_LEQUAL);
|
||||
|
||||
video->drcDrawDone();
|
||||
@ -249,7 +241,7 @@ glm::mat4 identityMatrix(1.0f);
|
||||
mainWindow->drawTv(video);
|
||||
|
||||
GX2SetDepthOnlyControl(GX2_DISABLE, GX2_DISABLE, GX2_COMPARE_FUNC_ALWAYS);
|
||||
fadeOut.draw(video, identityMatrix);
|
||||
fadeOut.draw(video);
|
||||
GX2SetDepthOnlyControl(GX2_ENABLE, GX2_ENABLE, GX2_COMPARE_FUNC_LEQUAL);
|
||||
|
||||
video->tvDrawDone();
|
||||
@ -389,5 +381,4 @@ void Application::executeThread() {
|
||||
|
||||
DEBUG_FUNCTION_LINE("deinitialize memory");
|
||||
libgui_memoryRelease();
|
||||
|
||||
}
|
@ -1,31 +1,23 @@
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2015 Dimok
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#ifndef _APPLICATION_H
|
||||
#define _APPLICATION_H
|
||||
|
||||
#include "menu/MainWindow.h"
|
||||
#include "system/CThread.h"
|
||||
#include <gui/video/CVideo.h>
|
||||
#include "gui/video/CVideo.h"
|
||||
|
||||
// forward declaration
|
||||
class FreeTypeGX;
|
||||
|
||||
class Application : public CThread {
|
||||
public:
|
||||
Application();
|
||||
|
||||
virtual ~Application();
|
||||
|
||||
static Application *applicationInstance;
|
||||
static bool exitApplication;
|
||||
static bool quitRequest;
|
||||
|
||||
static Application *instance() {
|
||||
if (!applicationInstance)
|
||||
applicationInstance = new Application();
|
||||
@ -58,16 +50,9 @@ public:
|
||||
void quit(int code);
|
||||
|
||||
private:
|
||||
Application();
|
||||
|
||||
virtual ~Application();
|
||||
|
||||
bool procUI(void);
|
||||
|
||||
static Application *applicationInstance;
|
||||
static bool exitApplication;
|
||||
static bool quitRequest;
|
||||
|
||||
void executeThread(void);
|
||||
|
||||
GuiSound *bgMusic;
|
||||
|
@ -1,24 +1,7 @@
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2015 Dimok
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "MainWindow.h"
|
||||
#include "Application.h"
|
||||
#include "utils/StringTools.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
#include "GameSplashScreen.h"
|
||||
#include "gui/GuiIconGrid.h"
|
||||
#include "gui/GuiTitleBrowser.h"
|
||||
@ -27,7 +10,9 @@
|
||||
#include <coreinit/title.h>
|
||||
#include <future>
|
||||
#include <nn/acp/title.h>
|
||||
#include <sysapp/args.h>
|
||||
#include <sysapp/launch.h>
|
||||
#include <sysapp/switch.h>
|
||||
|
||||
MainWindow::MainWindow(int32_t w, int32_t h)
|
||||
: width(w), height(h), gameClickSound(Resources::GetSound("game_click.mp3")), mainSwitchButtonFrame(nullptr), currentTvFrame(nullptr), currentDrcFrame(nullptr) {
|
||||
@ -401,9 +386,6 @@ void MainWindow::OnGameLaunchSplashScreenFinished(GuiElement *element, gameInfo
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" int32_t SYSSwitchToBrowser(void *);
|
||||
extern "C" int32_t SYSSwitchToEShop(void *);
|
||||
extern "C" int32_t _SYSSwitchTo(uint32_t pfid);
|
||||
|
||||
void MainWindow::OnGameLaunch(uint64_t titleId) {
|
||||
DEBUG_FUNCTION_LINE("Launch GAME!!");
|
||||
@ -434,28 +416,28 @@ void MainWindow::OnGameLaunch(uint64_t titleId) {
|
||||
titleId == 0x000500301001810AL ||
|
||||
titleId == 0x000500301001820AL) {
|
||||
DEBUG_FUNCTION_LINE("Launching the Download Management");
|
||||
_SYSSwitchTo(12);
|
||||
_SYSSwitchTo(SYSAPP_PFID_DOWNLOAD_MANAGEMENT);
|
||||
return;
|
||||
}
|
||||
if (titleId == 0x000500301001600AL ||
|
||||
titleId == 0x000500301001610AL ||
|
||||
titleId == 0x000500301001620AL) {
|
||||
DEBUG_FUNCTION_LINE("Launching Miiverse");
|
||||
_SYSSwitchTo(9);
|
||||
_SYSSwitchTo(SYSAPP_PFID_MIIVERSE);
|
||||
return;
|
||||
}
|
||||
if (titleId == 0x000500301001500AL ||
|
||||
titleId == 0x000500301001510AL ||
|
||||
titleId == 0x000500301001520AL) {
|
||||
DEBUG_FUNCTION_LINE("Launching Friendlist");
|
||||
_SYSSwitchTo(11);
|
||||
_SYSSwitchTo(SYSAPP_PFID_FRIENDLIST);
|
||||
return;
|
||||
}
|
||||
if (titleId == 0x000500301001300AL ||
|
||||
titleId == 0x000500301001310AL ||
|
||||
titleId == 0x000500301001320AL) {
|
||||
DEBUG_FUNCTION_LINE("Launching TVii");
|
||||
_SYSSwitchTo(3);
|
||||
_SYSSwitchTo(SYSAPP_PFID_TVII);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "MainDrcButtonsFrame.h"
|
||||
#include "game/GameList.h"
|
||||
#include "gui/GuiTitleBrowser.h"
|
||||
#include <gui/Gui.h>
|
||||
#include "gui/Gui.h"
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user