Switch over to Universal-Core. (#18)

* Don't build here.

* WIP: Switch to Universal-Core.

* Update Submodule repo & azure-pipelines.
This commit is contained in:
StackZ
2020-02-08 06:20:50 +01:00
committed by GitHub
parent 0ef5d2c5ab
commit 09be8e0b94
55 changed files with 1064 additions and 1327 deletions
+5 -7
View File
@@ -27,14 +27,12 @@
#ifndef CREDITS_HPP
#define CREDITS_HPP
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "utils/structs.hpp"
#include "common.hpp"
#include "structs.hpp"
#include <vector>
class Credits : public screen
class Credits : public Screen
{
public:
void Draw(void) const override;
@@ -43,8 +41,8 @@ private:
int creditsPage = 1;
std::vector<Structs::ButtonPos> arrowPos = {
{0, 215, 25, 25, -1}, // Back Arrow.
{295, 215, 25, 25, -1}, // Next Page.
{0, 215, 25, 25}, // Back Arrow.
{295, 215, 25, 25}, // Next Page.
};
};
+4 -5
View File
@@ -24,13 +24,12 @@
* reasonable ways as different from the original version.
*/
#include "screens/screen.hpp"
#include "utils/structs.hpp"
#include "common.hpp"
#include "structs.hpp"
#include <vector>
class FTPScreen : public screen
class FTPScreen : public Screen
{
public:
void Draw(void) const override;
@@ -39,6 +38,6 @@ public:
private:
int ftpEnabled = 1;
std::vector<Structs::ButtonPos> arrowPos = {
{0, 215, 25, 25, -1}, // Back Arrow.
{0, 215, 25, 25}, // Back Arrow.
};
};
+8 -9
View File
@@ -27,13 +27,12 @@
#ifndef MAINMENU_HPP
#define MAINMENU_HPP
#include "screens/screen.hpp"
#include "utils/structs.hpp"
#include "common.hpp"
#include "structs.hpp"
#include <vector>
class MainMenu : public screen
class MainMenu : public Screen
{
public:
void Draw(void) const override;
@@ -42,11 +41,11 @@ private:
int Selection = 0;
std::vector<Structs::ButtonPos> mainButtons = {
{10, 70, 140, 40, -1}, // Scripts.
{170, 70, 140, 40, -1}, // UniStore.
{10, 145, 140, 40, -1}, // Settings.
{170, 145, 140, 40, -1}, // FTP.
{0, 215, 25, 25, -1}, // Back Arrow.
{10, 70, 140, 40}, // Scripts.
{170, 70, 140, 40}, // UniStore.
{10, 145, 140, 40}, // Settings.
{170, 145, 140, 40}, // FTP.
{0, 215, 25, 25}, // Back Arrow.
};
};
-49
View File
@@ -1,49 +0,0 @@
/*
* This file is part of Universal-Updater
* Copyright (C) 2019-2020 DeadPhoenix8091, Epicpkmn11, Flame, RocketRobz, StackZ, TotallyNotGuy
*
* 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/>.
*
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
* * Requiring preservation of specified reasonable legal notices or
* author attributions in that material or in the Appropriate Legal
* Notices displayed by works containing it.
* * Prohibiting misrepresentation of the origin of that material,
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#ifndef SCREEN_HPP
#define SCREEN_HPP
#include <3ds.h>
#include <memory>
class screen
{
public:
virtual ~screen() {}
virtual void Logic(u32 hDown, u32 hHeld, touchPosition touch) = 0;
virtual void Draw() const = 0;
private:
};
namespace Screen {
void set(std::unique_ptr<screen> screen2);
void fade(std::unique_ptr<screen> screen2, bool fadeout = true);
void back(void);
void loop(u32 hDown, u32 hHeld, touchPosition touch);
}
#endif
-37
View File
@@ -1,37 +0,0 @@
/*
* This file is part of Universal-Updater
* Copyright (C) 2019-2020 DeadPhoenix8091, Epicpkmn11, Flame, RocketRobz, StackZ, TotallyNotGuy
*
* 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/>.
*
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
* * Requiring preservation of specified reasonable legal notices or
* author attributions in that material or in the Appropriate Legal
* Notices displayed by works containing it.
* * Prohibiting misrepresentation of the origin of that material,
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#ifndef SCREENCOMMON_HPP
#define SCREENCOMMON_HPP
#include "gui.hpp"
#include "lang/lang.hpp"
extern C3D_RenderTarget* top;
extern C3D_RenderTarget* bottom;
#endif
+11 -12
View File
@@ -27,14 +27,13 @@
#ifndef SCRIPTBROWSE_HPP
#define SCRIPTBROWSE_HPP
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "common.hpp"
#include "fileBrowse.hpp"
#include "structs.hpp"
#include "utils/config.hpp"
#include "utils/fileBrowse.h"
#include "utils/structs.hpp"
#include <vector>
class ScriptBrowse : public screen
class ScriptBrowse : public Screen
{
public:
void Draw(void) const override;
@@ -49,12 +48,12 @@ private:
int keyRepeatDelay = 0;
int fastMode = false;
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
{0, 215, 25, 25, -1}, // Back Arrow.
{5, 0, 25, 25, -1}, // Download All.
{45, 0, 25, 25, -1}, // ViewMode Change.
{80, 0, 25, 25, -1}, // Search.
{295, 0, 25, 25}, // Arrow Up.
{295, 215, 25, 25}, // Arrow Down.
{0, 215, 25, 25}, // Back Arrow.
{5, 0, 25, 25}, // Download All.
{45, 0, 25, 25}, // ViewMode Change.
{80, 0, 25, 25}, // Search.
};
};
+11 -14
View File
@@ -27,15 +27,12 @@
#ifndef SCRIPTCREATOR_HPP
#define SCRIPTCREATOR_HPP
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "utils/json.hpp"
#include "utils/structs.hpp"
#include "common.hpp"
#include "structs.hpp"
#include <vector>
class ScriptCreator : public screen
class ScriptCreator : public Screen
{
public:
void Draw(void) const override;
@@ -88,18 +85,18 @@ private:
std::string jsonFileName;
// Main Pos.
std::vector<Structs::ButtonPos> mainButtons = {
{90, 40, 140, 35, -1}, // New Script.
{90, 100, 140, 35, -1}, // Existing Script.
{90, 40, 140, 35}, // New Script.
{90, 100, 140, 35}, // Existing Script.
};
// Creator Button Pos.
std::vector<Structs::ButtonPos> creatorButtons = {
{10, 40, 140, 35, -1},
{170, 40, 140, 35, -1},
{10, 100, 140, 35, -1},
{170, 100, 140, 35, -1},
{10, 160, 140, 35, -1},
{170, 160, 140, 35, -1},
{10, 40, 140, 35},
{170, 40, 140, 35},
{10, 100, 140, 35},
{170, 100, 140, 35},
{10, 160, 140, 35},
{170, 160, 140, 35},
};
};
+14 -14
View File
@@ -27,13 +27,13 @@
#ifndef SCRIPTLIST_HPP
#define SCRIPTLIST_HPP
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "common.hpp"
#include "fileBrowse.hpp"
#include "structs.hpp"
#include "utils/fileBrowse.h"
#include "utils/structs.hpp"
#include <vector>
class ScriptList : public screen
class ScriptList : public Screen
{
public:
void Draw(void) const override;
@@ -61,18 +61,18 @@ private:
int fastMode = false;
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
{0, 215, 25, 25, -1}, // Back Arrow.
{5, 0, 25, 25, -1}, // viewMode Change
{45, 0, 25, 25, -1}, // Search.
{295, 0, 25, 25}, // Arrow Up.
{295, 215, 25, 25}, // Arrow Down.
{0, 215, 25, 25}, // Back Arrow.
{5, 0, 25, 25}, // viewMode Change
{45, 0, 25, 25}, // Search.
};
std::vector<Structs::ButtonPos> subPos = {
{10, 70, 140, 40, -1}, // Script list.
{170, 70, 140, 40, -1}, // Get Scripts.
{10, 145, 140, 40, -1}, // Script Creator.
{170, 145, 140, 40, -1}, // Script path change.
{10, 70, 140, 40}, // Script list.
{170, 70, 140, 40}, // Get Scripts.
{10, 145, 140, 40}, // Script Creator.
{170, 145, 140, 40}, // Script path change.
};
};
+25 -27
View File
@@ -27,15 +27,13 @@
#ifndef SETTINGS_HPP
#define SETTINGS_HPP
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "utils/fileBrowse.h"
#include "utils/structs.hpp"
#include "common.hpp"
#include "fileBrowse.hpp"
#include "structs.hpp"
#include <vector>
class Settings : public screen
class Settings : public Screen
{
public:
void Draw(void) const override;
@@ -58,36 +56,36 @@ private:
void MiscSettingsLogic(u32 hDown, u32 hHeld, touchPosition touch);
std::vector<Structs::ButtonPos> mainButtons = {
{90, 40, 140, 35, -1}, // Language.
{90, 100, 140, 35, -1}, // Colors.
{90, 160, 140, 35, -1}, // Misc.
{90, 40, 140, 35}, // Language.
{90, 100, 140, 35}, // Colors.
{90, 160, 140, 35}, // Misc.
};
std::vector<Structs::ButtonPos> langBlocks = {
{37, 32, 20, 20, -1},
{37, 72, 20, 20, -1},
{37, 112, 20, 20, -1},
{37, 152, 20, 20, -1},
{37, 188, 20, 20, -1},
{177, 32, 20, 20, -1},
{177, 72, 20, 20, -1},
{177, 112, 20, 20, -1},
{177, 152, 20, 20, -1},
{177, 188, 20, 20, -1},
{37, 32, 20, 20},
{37, 72, 20, 20},
{37, 112, 20, 20},
{37, 152, 20, 20},
{37, 188, 20, 20},
{177, 32, 20, 20},
{177, 72, 20, 20},
{177, 112, 20, 20},
{177, 152, 20, 20},
{177, 188, 20, 20},
};
std::vector<Structs::ButtonPos> buttons = {
{10, 85, 95, 41, -1},
{115, 85, 95, 41, -1},
{220, 85, 95, 41, -1},
{10, 85, 95, 41},
{115, 85, 95, 41},
{220, 85, 95, 41},
};
std::vector<Structs::ButtonPos> arrowPos = {
{0, 0, 25, 25, -1}, // Previous Arrow.
{295, 0, 25, 25, -1}, // Next Arrow.
{0, 215, 25, 25, -1}, // Back Arrow.
{0, 0, 25, 25, -1}, // Back Arrow top left.
{295, 215, 25, 25, -1}, // Next Page / Misc Arrow.
{0, 0, 25, 25}, // Previous Arrow.
{295, 0, 25, 25}, // Next Arrow.
{0, 215, 25, 25}, // Back Arrow.
{0, 0, 25, 25}, // Back Arrow top left.
{295, 215, 25, 25}, // Next Page / Misc Arrow.
};
};
+21 -21
View File
@@ -27,13 +27,13 @@
#ifndef UNISTORE_HPP
#define UNISTORE_HPP
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "common.hpp"
#include "fileBrowse.hpp"
#include "structs.hpp"
#include "utils/fileBrowse.h"
#include "utils/structs.hpp"
#include <vector>
class UniStore : public screen
class UniStore : public Screen
{
public:
void Draw(void) const override;
@@ -83,31 +83,31 @@ private:
std::vector<DirEntry> dirContents;
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
{0, 215, 25, 25, -1}, // Back Arrow.
{5, 0, 25, 25, -1}, // ViewMode Change.
{45, 0, 25, 25, -1}, // Search.
{85, 0, 25, 25, -1}, // Update.
{295, 0, 25, 25}, // Arrow Up.
{295, 215, 25, 25}, // Arrow Down.
{0, 215, 25, 25}, // Back Arrow.
{5, 0, 25, 25}, // ViewMode Change.
{45, 0, 25, 25}, // Search.
{85, 0, 25, 25}, // Update.
};
std::vector<Structs::ButtonPos> URLBtn = {
{10, 70, 140, 40, -1}, // FULL URL.
{170, 70, 140, 40, -1}, // Github.
{10, 145, 140, 40, -1}, // TinyDB.
{170, 145, 140, 40, -1}, // QR Code?
{10, 70, 140, 40}, // FULL URL.
{170, 70, 140, 40}, // Github.
{10, 145, 140, 40}, // TinyDB.
{170, 145, 140, 40}, // QR Code?
};
std::vector<Structs::ButtonPos> GitHubPos = {
{30, 50, 260, 30, -1}, // Owner & Repo.
{30, 130, 260, 30, -1}, // Filename.
{135, 180, 50, 30, -1}, // OK.
{30, 50, 260, 30}, // Owner & Repo.
{30, 130, 260, 30}, // Filename.
{135, 180, 50, 30}, // OK.
};
std::vector<Structs::ButtonPos> subPos = {
{90, 40, 140, 35, -1}, // StoreList.
{90, 100, 140, 35, -1}, // storeSearch.
{90, 160, 140, 35, -1}, // storePathChange.
{90, 40, 140, 35}, // StoreList.
{90, 100, 140, 35}, // storeSearch.
{90, 160, 140, 35}, // storePathChange.
};
};