From 09be8e0b941b6db28926aeca4420fd59c373a654 Mon Sep 17 00:00:00 2001 From: StackZ <47382115+SuperSaiyajinStackZ@users.noreply.github.com> Date: Sat, 8 Feb 2020 06:20:50 +0100 Subject: [PATCH] Switch over to Universal-Core. (#18) * Don't build here. * WIP: Switch to Universal-Core. * Update Submodule repo & azure-pipelines. --- .gitmodules | 3 + Makefile | 5 +- Universal-Core | 1 + assets/gfx/sprites/credits/stackZ.png | Bin 22574 -> 17465 bytes azure-pipelines.yml | 3 +- include/{colors.hpp => colorHelper.hpp} | 117 +++---- include/download/download.hpp | 11 +- include/{screens/screen.hpp => gfx.hpp} | 93 +++-- include/gui.hpp | 73 ---- include/{utils/structs.hpp => init.hpp} | 94 +++-- include/lang/lang.hpp | 2 +- include/{screens/screenCommon.hpp => msg.hpp} | 74 ++-- include/screens/credits.hpp | 12 +- include/screens/ftpScreen.hpp | 9 +- include/screens/mainMenu.hpp | 17 +- include/screens/scriptBrowse.hpp | 23 +- include/screens/scriptCreator.hpp | 25 +- include/screens/scriptlist.hpp | 28 +- include/screens/settings.hpp | 52 ++- include/screens/unistore.hpp | 42 +-- include/utils/common.hpp | 12 +- include/utils/extract.hpp | 7 +- .../utils/{fileBrowse.h => fileBrowse.hpp} | 62 ++-- include/utils/formatting.hpp | 9 +- include/utils/stringutils.hpp | 7 +- source/{colors.cpp => colorHelper.cpp} | 96 +++--- source/download/download.cpp | 32 +- source/gfx.cpp | 125 +++++++ source/gui.cpp | 321 ------------------ source/init.cpp | 171 ++++++++++ source/keyboard.cpp | 22 +- source/lang/lang.cpp | 5 +- source/main.cpp | 119 +------ source/msg.cpp | 120 +++++++ source/screens/credits.cpp | 26 +- source/screens/ftpScreen.cpp | 14 +- source/screens/mainMenu.cpp | 39 ++- source/screens/screen.cpp | 73 ---- source/screens/scriptBrowse.cpp | 40 ++- source/screens/scriptCreator.cpp | 17 +- source/screens/scriptlist.cpp | 71 ++-- source/screens/settings.cpp | 51 ++- source/screens/unistore.cpp | 106 +++--- source/utils/cia.c | 2 +- source/utils/config.cpp | 7 +- source/utils/console.c | 2 +- source/utils/extract.cpp | 2 +- source/utils/fileBrowse.cpp | 114 ++----- source/utils/files.c | 2 +- source/utils/formatting.cpp | 4 +- source/utils/ftp.c | 4 +- source/utils/scriptHelper.cpp | 19 +- source/utils/sound.cpp | 2 +- source/utils/stringutils.cpp | 2 +- source/utils/thread.cpp | 2 +- 55 files changed, 1064 insertions(+), 1327 deletions(-) create mode 100644 .gitmodules create mode 160000 Universal-Core rename include/{colors.hpp => colorHelper.hpp} (84%) rename include/{screens/screen.hpp => gfx.hpp} (73%) delete mode 100644 include/gui.hpp rename include/{utils/structs.hpp => init.hpp} (81%) rename include/{screens/screenCommon.hpp => msg.hpp} (86%) rename include/utils/{fileBrowse.h => fileBrowse.hpp} (70%) rename source/{colors.cpp => colorHelper.cpp} (96%) create mode 100644 source/gfx.cpp delete mode 100644 source/gui.cpp create mode 100644 source/init.cpp create mode 100644 source/msg.cpp delete mode 100644 source/screens/screen.cpp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..11d863d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Universal-Core"] + path = Universal-Core + url = https://github.com/Universal-Team/Universal-Core.git diff --git a/Makefile b/Makefile index bce14e4..294980c 100644 --- a/Makefile +++ b/Makefile @@ -75,9 +75,10 @@ endif #--------------------------------------------------------------------------------- TARGET := Universal-Updater BUILD := build -SOURCES := source source/download source/lang source/screens source/utils +UNIVCORE := Universal-Core +SOURCES := $(UNIVCORE) source source/download source/lang source/screens source/utils DATA := data -INCLUDES := include include/download include/lang include/screens include/utils +INCLUDES := $(UNIVCORE) include include/download include/lang include/screens include/utils GRAPHICS := assets/gfx #GFXBUILD := $(BUILD) ROMFS := romfs diff --git a/Universal-Core b/Universal-Core new file mode 160000 index 0000000..c82ad8d --- /dev/null +++ b/Universal-Core @@ -0,0 +1 @@ +Subproject commit c82ad8d6e11e4842c6099b53595aa3692f24910b diff --git a/assets/gfx/sprites/credits/stackZ.png b/assets/gfx/sprites/credits/stackZ.png index d84b16540d92694a936ea264321017cd8ba7652d..0c186b0e954daabf5ab4aff0790bde442517b6a2 100644 GIT binary patch literal 17465 zcmV*ZKvutrP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3&sb{jhmh5vIEy##_JKyo=8&*>fX^7}(caT3RG zNcXdkExA-G6@iO8(Bb^&-#7e=uac~VqP1B!i+q({dKx@w@%8n3lvtkM&)2N)*W~Bp z!Or`I#G%Y%e*O9FxD1Z#_czq?K0bdw9_o5ur@b%qe&O2%vww2p$@{$azEDoD;3E6#qmBP|6Ga??R|oMs?qzn=-0J-D)i$W$+xHJ=NG!g8-M)zp?3G~cJFzu zZWN+{|DZY*)pu}wE8-z!L$M76IJ*)rtHc^;Q6 zZn313Dvv3xl%HcQ*VNN`no;~)ZmPNG9de^5i>`TB(#O5X^SS-`yd{lK-olwlxR^YB z{PZ2ZI{3eQe_ZHZhpvbhlh(_t!O1brZFuMWH)qihx$m0lQ{U%1e6;oZmp3-kL4C^H zSm22Bb&09+9b5V7bLKpaCB)ZgNZs!XP$E8Cxf#iHAev+qlUP%#BGj?bpTV7{T+*Zi zqMEjZOK);En$wbhHt(tOoSQVg4nr+8LbK&cYkD3us}u!4wKOm^G;0Z}YFf2v*J0U; zshL%Cjv6)BQngyGwbfon%dIqR)@p05x6xD2P?&b>HT2edAA=7aTzc^C!5L%BH1jM| zr_DOs>~k#Ov&zzCtFE^C8awU08UJm&hTV4GS?E+alzWnw_Lq;>utB+ z@zJ$+SAXuBeCphvcTL`1^NyA0y!yRs9Io}-CB*4Oy=QbR6`|wRI{=`Q_bfIkC3)w( zXR#-SLK9sR_2z8xj?uw#B&LEA=8US+QyuEEN^{_&MH6bwb8=Kq*))r5@7D7f zxs7?L84TAbZYsMh`oMua+c?&@&C}XuguK{DIdI}(!~wz`8}Ksyr|Y@3vfN!) z-n9v^=%Exl8pr5G8Y|Y5C$II}nk}napt63;nNc+^r7#v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J0lGw9QFRA2jQ zR-Wfb;t0)p4N^L=#736fL4;FOJeBsM-;}gN;S>fRE{Gt|G2slDGVXrUJTzy{L zcz-WH`sItWXbPIJ05PJs)Jwrz>y3u12JMB2F*u$FZ8R9{t2&igmLbb>SOEEDbjB8( z!*Luegc%lAH%4<0jj@QM6s58cF|cogAi(Xn-Htas@FuvfGh&}plT&!tyWWNCue*Mv zFmb_9uKI|hbTlk8S2@<&UA(Xs!f_;|;FnwqqKttu#bMk@lw6LE!ikXQ8gjthtSzc4 zE7gia|(U`KS^dNZG7|bZz9XGK^T!?V`Ck8mhT{w z1vn!_VN%>PN$|vrub>MC$8j%9X(AA;(a4l~Rn$uWRGt-`gvRcpR8f*sZ`4|x(fy3E zM(NEzadCjH>p>em#Th$XE|(lTIE~{QOpGB()9+~3(P%TJ1m^I#$Tn<|e`yq%Cr2NhSw#Fb$lF?YdkwRxJj0J+A#9b*58Ef}gey*wa{{y`C VW0LvRFWmqD002ovPDHLkV1l2qO@IIZ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4cc6006..c527d30 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ trigger: branches: include: ['*'] - exclude: [translation, cleanup] + exclude: [translation, cleanup, full-rewrite] tags: include: ['*'] @@ -39,6 +39,7 @@ steps: sudo 7z e makerom_015_ctrtool.zip Linux_x86_64/makerom sudo chmod +x makerom rm makerom_015_ctrtool.zip + git submodule update --init --recursive displayName: 'Setup devkitPro' - script: | diff --git a/include/colors.hpp b/include/colorHelper.hpp similarity index 84% rename from include/colors.hpp rename to include/colorHelper.hpp index e28e6fc..25f8f32 100644 --- a/include/colors.hpp +++ b/include/colorHelper.hpp @@ -1,59 +1,60 @@ -/* -* 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 . -* -* 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 COLORS_HPP -#define COLORS_HPP - -#include -#include -#include -#include - -/** - * @brief Creates a 8 byte RGBA color - * @param r red component of the color - * @param g green component of the color - * @param b blue component of the color - * @param a alpha component of the color - */ -#define RGBA8(r, g, b, a) ((((r)&0xFF)<<0) | (((g)&0xFF)<<8) | (((b)&0xFF)<<16) | (((a)&0xFF)<<24)) - -#define BarColor C2D_Color32(57, 84, 114, 255) -#define TopBGColor C2D_Color32(96, 168, 192, 255) -#define BottomBGColor C2D_Color32(38, 44, 77, 255) -#define SelectedColordefault C2D_Color32(120, 192, 216, 255) -#define UnselectedColordefault C2D_Color32(77, 118, 132, 255) -#define BLACK C2D_Color32(0, 0, 0, 255) -#define WHITE C2D_Color32(255, 255, 255, 255) - -typedef u32 Color; - -namespace ColorHelper { - int getColorValue(int color, int bgr); - std::string getColorName(int color, int bgr); -} - +/* +* 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 . +* +* 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 COLORHELPER_HPP +#define COLORHELPER_HPP + +#include +#include +#include +#include + +/** + * @brief Creates a 8 byte RGBA color + * @param r red component of the color + * @param g green component of the color + * @param b blue component of the color + * @param a alpha component of the color + */ +#define RGBA8(r, g, b, a) ((((r)&0xFF)<<0) | (((g)&0xFF)<<8) | (((b)&0xFF)<<16) | (((a)&0xFF)<<24)) + +#define BarColor C2D_Color32(57, 84, 114, 255) +#define TopBGColor C2D_Color32(96, 168, 192, 255) +#define BottomBGColor C2D_Color32(38, 44, 77, 255) +#define SelectedColordefault C2D_Color32(120, 192, 216, 255) +#define UnselectedColordefault C2D_Color32(77, 118, 132, 255) +#define BLACK C2D_Color32(0, 0, 0, 255) +#define WHITE C2D_Color32(255, 255, 255, 255) +#define TRANSPARENT C2D_Color32(0, 0, 0, 0) + +typedef u32 Color; + +namespace ColorHelper { + int getColorValue(int color, int bgr); + std::string getColorName(int color, int bgr); +} + #endif \ No newline at end of file diff --git a/include/download/download.hpp b/include/download/download.hpp index 5fed430..11ca685 100644 --- a/include/download/download.hpp +++ b/include/download/download.hpp @@ -24,12 +24,13 @@ * reasonable ways as different from the original version. */ -#pragma once +#ifndef DOWNLOAD_HPP +#define DOWNLOAD_HPP -#include "utils/common.hpp" +#include "common.hpp" #define APP_TITLE "Universal-Updater" -#define VERSION_STRING "2.2.0" +#define VERSION_STRING "2.2.1" enum DownloadError { DL_ERROR_NONE = 0, @@ -86,4 +87,6 @@ std::string getLatestCommit(std::string repo, std::string item); * item is that to get from the API. (Ex. "message") * @return the string from the API. */ -std::string getLatestCommit(std::string repo, std::string array, std::string item); \ No newline at end of file +std::string getLatestCommit(std::string repo, std::string array, std::string item); + +#endif \ No newline at end of file diff --git a/include/screens/screen.hpp b/include/gfx.hpp similarity index 73% rename from include/screens/screen.hpp rename to include/gfx.hpp index 1c61364..b6aa6e1 100644 --- a/include/screens/screen.hpp +++ b/include/gfx.hpp @@ -1,49 +1,46 @@ -/* -* 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 . -* -* 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 - -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 screen2); - void fade(std::unique_ptr screen2, bool fadeout = true); - void back(void); - void loop(u32 hDown, u32 hHeld, touchPosition touch); -} - +/* +* 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 . +* +* 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 GFX_HPP +#define GFX_HPP + +#include "colorHelper.hpp" +#include "gui.hpp" +#include "sprites.h" + +namespace GFX +{ + // Basic GUI. + void DrawTop(void); + void DrawBottom(void); + // Draw arrow. + void DrawArrow(int x, int y, float rotation = 0, int arrowSprite = 0); + // Draw Sprites. + void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1); + void DrawSpriteBlend(int img, int x, int y, float ScaleX = 1, float ScaleY = 1); +} + #endif \ No newline at end of file diff --git a/include/gui.hpp b/include/gui.hpp deleted file mode 100644 index 414f79d..0000000 --- a/include/gui.hpp +++ /dev/null @@ -1,73 +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 . -* -* 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 GUI_HPP -#define GUI_HPP - -#include "colors.hpp" -#include "sprites.h" - -#include "screens/screen.hpp" - -namespace Gui -{ - // Init and Exit of the GUI. - Result init(void); - void exit(void); - - C3D_RenderTarget* target(gfxScreen_t t); - void setDraw(C3D_RenderTarget * screen); - - // Clear Text. - void clearTextBufs(void); - - // Draw a Sprite from the sheet. - void sprite(int key, int x, int y, float ScaleX = 1, float ScaleY = 1); - void spriteBlend(int key, int x, int y, float ScaleX = 1, float ScaleY = 1); - void DrawArrow(int x, int y, float rotation = 0, int arrowSprite = 0); - void drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed = .060, u32 colour = C2D_Color32(0, 0, 0, 0)); - - // Misc. - bool Draw_Rect(float x, float y, float w, float h, u32 color); - - // Text / String Functions. - void DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0); - void DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0); - void GetStringSize(float size, float *width, float *height, std::string Text); - float GetStringWidth(float size, std::string Text); - float GetStringHeight(float size, std::string Text); - - // Basic GUI. - void DrawTop(void); - void DrawBottom(void); - - void DisplayWarnMsg(std::string Text); - bool promptMsg(std::string promptMsg); -} - -void DisplayMsg(std::string text); - -#endif \ No newline at end of file diff --git a/include/utils/structs.hpp b/include/init.hpp similarity index 81% rename from include/utils/structs.hpp rename to include/init.hpp index 497265d..389d70a 100644 --- a/include/utils/structs.hpp +++ b/include/init.hpp @@ -1,52 +1,44 @@ -/* -* 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 . -* -* 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 STRUCTS_HPP -#define STRUCTS_HPP - -#include - -class Structs -{ -public: - struct ButtonPos { - int x; - int y; - int w; - int h; - int link; - }; - - struct Key { - std::string character; - int x; - int y; - int w; - }; -private: -}; - +/* +* 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 . +* +* 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 INIT_HPP +#define INIT_HPP + +#include <3ds.h> + +namespace Init { + // Init, Mainloop & Exit. + Result Initialize(); + Result MainLoop(); + Result Exit(); + + // Sound / Music stuff. + void loadSoundEffects(void); + void playMusic(void); + void stopMusic(void); +} + #endif \ No newline at end of file diff --git a/include/lang/lang.hpp b/include/lang/lang.hpp index e4e7c9a..2f6c705 100644 --- a/include/lang/lang.hpp +++ b/include/lang/lang.hpp @@ -1,7 +1,7 @@ #ifndef LANG_HPP #define LANG_HPP -#include "utils/json.hpp" +#include "json.hpp" #include diff --git a/include/screens/screenCommon.hpp b/include/msg.hpp similarity index 86% rename from include/screens/screenCommon.hpp rename to include/msg.hpp index 3ff6dad..1a0a21c 100644 --- a/include/screens/screenCommon.hpp +++ b/include/msg.hpp @@ -1,37 +1,39 @@ -/* -* 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 . -* -* 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; - +/* +* 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 . +* +* 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 MSG_HPP +#define MSG_HPP + +#include + +namespace Msg +{ + void DisplayMsg(std::string text); + void DisplayWarnMsg(std::string Text); + bool promptMsg(std::string promptMsg); +} + #endif \ No newline at end of file diff --git a/include/screens/credits.hpp b/include/screens/credits.hpp index 498c489..dfa5c58 100644 --- a/include/screens/credits.hpp +++ b/include/screens/credits.hpp @@ -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 -class Credits : public screen +class Credits : public Screen { public: void Draw(void) const override; @@ -43,8 +41,8 @@ private: int creditsPage = 1; std::vector 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. }; }; diff --git a/include/screens/ftpScreen.hpp b/include/screens/ftpScreen.hpp index e3062c7..61a530b 100644 --- a/include/screens/ftpScreen.hpp +++ b/include/screens/ftpScreen.hpp @@ -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 -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 arrowPos = { - {0, 215, 25, 25, -1}, // Back Arrow. + {0, 215, 25, 25}, // Back Arrow. }; }; \ No newline at end of file diff --git a/include/screens/mainMenu.hpp b/include/screens/mainMenu.hpp index 1b7c9ed..ceb4bbc 100644 --- a/include/screens/mainMenu.hpp +++ b/include/screens/mainMenu.hpp @@ -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 -class MainMenu : public screen +class MainMenu : public Screen { public: void Draw(void) const override; @@ -42,11 +41,11 @@ private: int Selection = 0; std::vector 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. }; }; diff --git a/include/screens/scriptBrowse.hpp b/include/screens/scriptBrowse.hpp index 984645a..e6d85e6 100644 --- a/include/screens/scriptBrowse.hpp +++ b/include/screens/scriptBrowse.hpp @@ -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 -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 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. }; }; diff --git a/include/screens/scriptCreator.hpp b/include/screens/scriptCreator.hpp index 44bd9ad..a441b18 100644 --- a/include/screens/scriptCreator.hpp +++ b/include/screens/scriptCreator.hpp @@ -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 -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 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 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}, }; }; diff --git a/include/screens/scriptlist.hpp b/include/screens/scriptlist.hpp index fb59069..560bf3c 100644 --- a/include/screens/scriptlist.hpp +++ b/include/screens/scriptlist.hpp @@ -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 -class ScriptList : public screen +class ScriptList : public Screen { public: void Draw(void) const override; @@ -61,18 +61,18 @@ private: int fastMode = false; std::vector 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 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. }; }; diff --git a/include/screens/settings.hpp b/include/screens/settings.hpp index 80bd0f6..d52d0ec 100644 --- a/include/screens/settings.hpp +++ b/include/screens/settings.hpp @@ -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 -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 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 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 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 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. }; }; diff --git a/include/screens/unistore.hpp b/include/screens/unistore.hpp index e254ced..82c0f39 100644 --- a/include/screens/unistore.hpp +++ b/include/screens/unistore.hpp @@ -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 -class UniStore : public screen +class UniStore : public Screen { public: void Draw(void) const override; @@ -83,31 +83,31 @@ private: std::vector dirContents; std::vector 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 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 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 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. }; }; diff --git a/include/utils/common.hpp b/include/utils/common.hpp index 95406f6..dd76f93 100644 --- a/include/utils/common.hpp +++ b/include/utils/common.hpp @@ -31,7 +31,7 @@ #ifdef __cplusplus extern "C" { #endif -#include "utils/files.h" +#include "files.h" #include #include @@ -42,8 +42,14 @@ extern "C" { #ifdef __cplusplus } -#include "utils/json.hpp" -#include "utils/stringutils.hpp" +#include "config.hpp" +#include "gfx.hpp" +#include "gui.hpp" +#include "json.hpp" +#include "lang.hpp" +#include "msg.hpp" +#include "screenCommon.hpp" +#include "stringutils.hpp" #include #include diff --git a/include/utils/extract.hpp b/include/utils/extract.hpp index 6644a13..ed85f6d 100644 --- a/include/utils/extract.hpp +++ b/include/utils/extract.hpp @@ -24,7 +24,8 @@ * reasonable ways as different from the original version. */ -#pragma once +#ifndef EXTRACT_HPP +#define EXTRACT_HPP #include "common.hpp" @@ -38,4 +39,6 @@ enum ExtractError { EXTRACT_ERROR_WRITEFILE, }; -Result extractArchive(std::string archivePath, std::string wantedFile, std::string outputPath); \ No newline at end of file +Result extractArchive(std::string archivePath, std::string wantedFile, std::string outputPath); + +#endif \ No newline at end of file diff --git a/include/utils/fileBrowse.h b/include/utils/fileBrowse.hpp similarity index 70% rename from include/utils/fileBrowse.h rename to include/utils/fileBrowse.hpp index 3cef0ba..d7c29f5 100644 --- a/include/utils/fileBrowse.h +++ b/include/utils/fileBrowse.hpp @@ -1,35 +1,27 @@ -#ifndef FILE_BROWSE_H -#define FILE_BROWSE_H - -#include -#include -#include -#include - -using namespace std; - -struct DirEntry { - std::string name; - std::string path; - bool isDirectory; - char tid[5]; - off_t size; -}; - -typedef struct { - char gameTitle[12]; //!< 12 characters for the game title. - char gameCode[4]; //!< 4 characters for the game code. -} sNDSHeadertitlecodeonly; - -void findNdsFiles(vector& dirContents); - -bool nameEndsWith(const std::string& name, const std::vector extensionList); -void getDirectoryContents(std::vector& dirContents, const std::vector extensionList); -void getDirectoryContents(std::vector& dirContents); -std::vector getContents(const std::string &name, const std::vector &extensionList); - -bool returnIfExist(const std::string &path, const std::vector &extensionList); - -std::string selectFilePath(std::string selectText, const std::vector &extensionList, int selectionMode = 1); - -#endif //FILE_BROWSE_H \ No newline at end of file +#ifndef FILE_BROWSE_HPP +#define FILE_BROWSE_HPP + +#include +#include +#include +#include + +using namespace std; + +struct DirEntry { + std::string name; + std::string path; + bool isDirectory; + off_t size; +}; + +bool nameEndsWith(const std::string& name, const std::vector extensionList); +void getDirectoryContents(std::vector& dirContents, const std::vector extensionList); +void getDirectoryContents(std::vector& dirContents); +std::vector getContents(const std::string &name, const std::vector &extensionList); + +bool returnIfExist(const std::string &path, const std::vector &extensionList); + +std::string selectFilePath(std::string selectText, const std::vector &extensionList, int selectionMode = 1); + +#endif //FILE_BROWSE_HPP \ No newline at end of file diff --git a/include/utils/formatting.hpp b/include/utils/formatting.hpp index 7078ad7..f1e41cd 100644 --- a/include/utils/formatting.hpp +++ b/include/utils/formatting.hpp @@ -24,6 +24,11 @@ * reasonable ways as different from the original version. */ -#pragma once +#ifndef FORMATTING_HPP +#define FORMATTING_HPP -std::string formatBytes(int bytes); \ No newline at end of file +#include + +std::string formatBytes(int bytes); + +#endif \ No newline at end of file diff --git a/include/utils/stringutils.hpp b/include/utils/stringutils.hpp index c25316d..f08a4b0 100644 --- a/include/utils/stringutils.hpp +++ b/include/utils/stringutils.hpp @@ -1,4 +1,5 @@ -#pragma once +#ifndef STRINGUTILS_HPP +#define STRINGUTILS_HPP #include "common.hpp" @@ -7,4 +8,6 @@ bool matchPattern(std::string pattern, std::string tested); namespace StringUtils { std::string format(const std::string& fmt_str, ...); -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/source/colors.cpp b/source/colorHelper.cpp similarity index 96% rename from source/colors.cpp rename to source/colorHelper.cpp index 6e1a6e7..c311312 100644 --- a/source/colors.cpp +++ b/source/colorHelper.cpp @@ -1,49 +1,49 @@ -/* -* 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 . -* -* 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. -*/ - -#include "colors.hpp" - -int ColorHelper::getColorValue(int color, int bgr) -{ - char colorName[10]; - int i; - std::stringstream ss; - - itoa(color, colorName, 16); - std::string colorNamePart(colorName, 2*bgr+2, 2); - ss << std::hex << colorNamePart.c_str(); - ss >> i; - - return i; -} - -std::string ColorHelper::getColorName(int color, int bgr) -{ - char colorName[10]; - int i = getColorValue(color, bgr); - itoa(i, colorName, 10); - return colorName; +/* +* 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 . +* +* 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. +*/ + +#include "colorHelper.hpp" + +int ColorHelper::getColorValue(int color, int bgr) +{ + char colorName[10]; + int i; + std::stringstream ss; + + itoa(color, colorName, 16); + std::string colorNamePart(colorName, 2*bgr+2, 2); + ss << std::hex << colorNamePart.c_str(); + ss >> i; + + return i; +} + +std::string ColorHelper::getColorName(int color, int bgr) +{ + char colorName[10]; + int i = getColorValue(color, bgr); + itoa(i, colorName, 10); + return colorName; } \ No newline at end of file diff --git a/source/download/download.cpp b/source/download/download.cpp index 03d89b3..ae7f376 100644 --- a/source/download/download.cpp +++ b/source/download/download.cpp @@ -24,19 +24,15 @@ * reasonable ways as different from the original version. */ +#include "config.hpp" +#include "download.hpp" +#include "formatting.hpp" #include "gui.hpp" +#include "lang.hpp" +#include "screenCommon.hpp" -#include "download/download.hpp" - -#include "lang/lang.hpp" - -#include "screens/screenCommon.hpp" - -#include "utils/config.hpp" -#include "utils/formatting.hpp" - -#include #include +#include #define USER_AGENT APP_TITLE "-" VERSION_STRING @@ -410,28 +406,28 @@ bool checkWifiStatus(void) { } void downloadFailed(void) { - DisplayMsg(Lang::get("DOWNLOAD_FAILED")); + Msg::DisplayMsg(Lang::get("DOWNLOAD_FAILED")); for (int i = 0; i < 60*2; i++) { gspWaitForVBlank(); } } void notImplemented(void) { - DisplayMsg(Lang::get("NOT_IMPLEMENTED")); + Msg::DisplayMsg(Lang::get("NOT_IMPLEMENTED")); for (int i = 0; i < 60*2; i++) { gspWaitForVBlank(); } } void doneMsg(void) { - DisplayMsg(Lang::get("DONE")); + Msg::DisplayMsg(Lang::get("DONE")); for (int i = 0; i < 60*2; i++) { gspWaitForVBlank(); } } void notConnectedMsg(void) { - DisplayMsg(Lang::get("CONNECT_WIFI")); + Msg::DisplayMsg(Lang::get("CONNECT_WIFI")); for (int i = 0; i < 60*2; i++) { gspWaitForVBlank(); } @@ -654,9 +650,9 @@ void displayProgressBar() { Gui::clearTextBufs(); C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - C2D_TargetClear(top, BLACK); - C2D_TargetClear(bottom, BLACK); - Gui::DrawTop(); + C2D_TargetClear(Top, BLACK); + C2D_TargetClear(Bottom, BLACK); + GFX::DrawTop(); Gui::DrawStringCentered(0, 1, 0.7f, Config::TxtColor, progressBarMsg, 400); // Display 'Currently Extracting: '. @@ -675,7 +671,7 @@ void displayProgressBar() { Gui::Draw_Rect(31, 121, (int)(((float)downloadNow/(float)downloadTotal) * 338.0f), 28, Config::progressbarColor); } } - Gui::DrawBottom(); + GFX::DrawBottom(); C3D_FrameEnd(0); gspWaitForVBlank(); } diff --git a/source/gfx.cpp b/source/gfx.cpp new file mode 100644 index 0000000..717dcc3 --- /dev/null +++ b/source/gfx.cpp @@ -0,0 +1,125 @@ +/* +* 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 . +* +* 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. +*/ + +#include "common.hpp" + +extern bool isScriptSelected; +extern u32 barColor; +extern u32 bgTopColor; +extern u32 bgBottomColor; +extern u32 TextColor; + +void GFX::DrawTop(void) { + Gui::ScreenDraw(Top); + if (isScriptSelected == false) { + Gui::Draw_Rect(0, 0, 400, 25, Config::Color1); + Gui::Draw_Rect(0, 25, 400, 190, Config::Color2); + Gui::Draw_Rect(0, 215, 400, 25, Config::Color1); + if (Config::UseBars == true) { + DrawSprite(sprites_top_screen_top_idx, 0, 0); + DrawSprite(sprites_top_screen_bot_idx, 0, 215); + } + } else if (isScriptSelected == true) { + Gui::Draw_Rect(0, 0, 400, 30, barColor); + Gui::Draw_Rect(0, 25, 400, 190, bgBottomColor); + Gui::Draw_Rect(0, 215, 400, 25, barColor); + if (Config::UseBars == true) { + DrawSprite(sprites_top_screen_top_idx, 0, 0); + DrawSprite(sprites_top_screen_bot_idx, 0, 215); + } + } +} + +void GFX::DrawBottom(void) { + Gui::ScreenDraw(Bottom); + if (isScriptSelected == false) { + Gui::Draw_Rect(0, 0, 320, 25, Config::Color1); + Gui::Draw_Rect(0, 25, 320, 190, Config::Color3); + Gui::Draw_Rect(0, 215, 320, 25, Config::Color1); + if (Config::UseBars == true) { + DrawSprite(sprites_bottom_screen_top_idx, 0, 0); + DrawSprite(sprites_bottom_screen_bot_idx, 0, 215); + } + } else if (isScriptSelected == true) { + Gui::Draw_Rect(0, 0, 320, 30, barColor); + Gui::Draw_Rect(0, 25, 320, 190, bgBottomColor); + Gui::Draw_Rect(0, 215, 320, 25, barColor); + if (Config::UseBars == true) { + DrawSprite(sprites_bottom_screen_top_idx, 0, 0); + DrawSprite(sprites_bottom_screen_bot_idx, 0, 215); + } + } +} + +extern C2D_SpriteSheet sprites; + +void GFX::DrawSprite(int img, int x, int y, float ScaleX, float ScaleY) +{ + Gui::DrawSprite(sprites, img, x, y, ScaleX, ScaleY); +} + +void GFX::DrawSpriteBlend(int img, int x, int y, float ScaleX, float ScaleY) +{ + C2D_ImageTint tint; + if (isScriptSelected) { + C2D_SetImageTint(&tint, C2D_TopLeft, TextColor, 0.5); + C2D_SetImageTint(&tint, C2D_TopRight, TextColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotLeft, TextColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotRight, TextColor, 0.5); + } else { + C2D_SetImageTint(&tint, C2D_TopLeft, Config::TxtColor, 0.5); + C2D_SetImageTint(&tint, C2D_TopRight, Config::TxtColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotLeft, Config::TxtColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotRight, Config::TxtColor, 0.5); + } + C2D_DrawImageAt(C2D_SpriteSheetGetImage(sprites, img), x, y, 0.5f, &tint, ScaleX, ScaleY); +} + +void GFX::DrawArrow(int x, int y, float rotation, int arrowSprite) { + C2D_Sprite sprite; + C2D_ImageTint tint; + if (isScriptSelected) { + C2D_SetImageTint(&tint, C2D_TopLeft, TextColor, 0.5); + C2D_SetImageTint(&tint, C2D_TopRight, TextColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotLeft, TextColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotRight, TextColor, 0.5); + } else { + C2D_SetImageTint(&tint, C2D_TopLeft, Config::TxtColor, 0.5); + C2D_SetImageTint(&tint, C2D_TopRight, Config::TxtColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotLeft, Config::TxtColor, 0.5); + C2D_SetImageTint(&tint, C2D_BotRight, Config::TxtColor, 0.5); + } + + if (arrowSprite == 0) { + C2D_SpriteFromSheet(&sprite, sprites, sprites_arrow_idx); + } else { + C2D_SpriteFromSheet(&sprite, sprites, sprites_side_arrow_idx); + } + C2D_SpriteRotateDegrees(&sprite, rotation); + C2D_SpriteSetPos(&sprite, x, y); + C2D_SpriteSetDepth(&sprite, 0.5); + C2D_DrawSpriteTinted(&sprite, &tint); +} \ No newline at end of file diff --git a/source/gui.cpp b/source/gui.cpp deleted file mode 100644 index b5de563..0000000 --- a/source/gui.cpp +++ /dev/null @@ -1,321 +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 . -* -* 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. -*/ - -#include "gui.hpp" - -#include "screens/screenCommon.hpp" - -#include "utils/config.hpp" -#include "utils/structs.hpp" - -C3D_RenderTarget* top; -C3D_RenderTarget* bottom; - -C2D_TextBuf sizeBuf; -C2D_SpriteSheet sprites; -bool currentScreen = false; -extern bool isScriptSelected; - -extern u32 barColor; -extern u32 bgTopColor; -extern u32 bgBottomColor; -extern u32 TextColor; - -// Clear Text. -void Gui::clearTextBufs(void) -{ - C2D_TextBufClear(sizeBuf); -} - -// Initialize GUI. -Result Gui::init(void) -{ - C3D_Init(C3D_DEFAULT_CMDBUF_SIZE); - C2D_Init(C2D_DEFAULT_MAX_OBJECTS); - C2D_Prepare(); - top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT); - bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT); - sprites = C2D_SpriteSheetLoad("romfs:/gfx/sprites.t3x"); - sizeBuf = C2D_TextBufNew(4096); - return 0; -} - -// Exit the whole GUI. -void Gui::exit(void) -{ - C2D_TextBufDelete(sizeBuf); - C2D_SpriteSheetFree(sprites); - C2D_Fini(); - C3D_Fini(); -} - -void DisplayMsg(std::string text) { - Gui::clearTextBufs(); - C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - C2D_TargetClear(top, BLACK); - C2D_TargetClear(bottom, BLACK); - Gui::DrawTop(); - if (isScriptSelected == false) { - Gui::DrawString(10, 40, 0.45f, Config::TxtColor, text, 380); - } else if (isScriptSelected == true) { - Gui::DrawString(10, 40, 0.45f, TextColor, text, 380); - } - Gui::DrawBottom(); - C3D_FrameEnd(0); -} - -void Gui::sprite(int key, int x, int y, float ScaleX, float ScaleY) -{ - C2D_DrawImageAt(C2D_SpriteSheetGetImage(sprites, key), x, y, 0.5f, NULL, ScaleX, ScaleY); -} - -void Gui::spriteBlend(int key, int x, int y, float ScaleX, float ScaleY) -{ - C2D_ImageTint tint; - if (isScriptSelected) { - C2D_SetImageTint(&tint, C2D_TopLeft, TextColor, 0.5); - C2D_SetImageTint(&tint, C2D_TopRight, TextColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotLeft, TextColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotRight, TextColor, 0.5); - } else { - C2D_SetImageTint(&tint, C2D_TopLeft, Config::TxtColor, 0.5); - C2D_SetImageTint(&tint, C2D_TopRight, Config::TxtColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotLeft, Config::TxtColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotRight, Config::TxtColor, 0.5); - } - - C2D_DrawImageAt(C2D_SpriteSheetGetImage(sprites, key), x, y, 0.5f, &tint, ScaleX, ScaleY); -} - -void Gui::DrawArrow(int x, int y, float rotation, int arrowSprite) { - C2D_Sprite sprite; - C2D_ImageTint tint; - if (isScriptSelected) { - C2D_SetImageTint(&tint, C2D_TopLeft, TextColor, 0.5); - C2D_SetImageTint(&tint, C2D_TopRight, TextColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotLeft, TextColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotRight, TextColor, 0.5); - } else { - C2D_SetImageTint(&tint, C2D_TopLeft, Config::TxtColor, 0.5); - C2D_SetImageTint(&tint, C2D_TopRight, Config::TxtColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotLeft, Config::TxtColor, 0.5); - C2D_SetImageTint(&tint, C2D_BotRight, Config::TxtColor, 0.5); - } - - if (arrowSprite == 0) { - C2D_SpriteFromSheet(&sprite, sprites, sprites_arrow_idx); - } else { - C2D_SpriteFromSheet(&sprite, sprites, sprites_side_arrow_idx); - } - C2D_SpriteRotateDegrees(&sprite, rotation); - C2D_SpriteSetPos(&sprite, x, y); - C2D_SpriteSetDepth(&sprite, 0.5); - C2D_DrawSpriteTinted(&sprite, &tint); -} - -void Gui::drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 colour) -{ - static constexpr int w = 2; - static float timer = 0.0f; - float highlight_multiplier = fmax(0.0, fabs(fmod(timer, 1.0) - 0.5) / 0.5); - u8 r = Config::SelectedColor & 0xFF; - u8 g = (Config::SelectedColor >> 8) & 0xFF; - u8 b = (Config::SelectedColor >> 16) & 0xFF; - u32 color = C2D_Color32(r + (255 - r) * highlight_multiplier, g + (255 - g) * highlight_multiplier, b + (255 - b) * highlight_multiplier, 255); - - // BG Color for the Selector. - C2D_DrawRectSolid(xPos, yPos, 0.5, Width, Height, colour); // Black. - - // Animated Selector part. - C2D_DrawRectSolid(xPos, yPos, 0.5, Width, w, color); // top - C2D_DrawRectSolid(xPos, yPos + w, 0.5, w, Height - 2 * w, color); // left - C2D_DrawRectSolid(xPos + Width - w, yPos + w, 0.5, w, Height - 2 * w, color); // right - C2D_DrawRectSolid(xPos, yPos + Height - w, 0.5, Width, w, color); // bottom - - timer += speed; // Speed of the animation. Example : .030 / .060 -} - -void Gui::DisplayWarnMsg(std::string Text) -{ - Gui::clearTextBufs(); - C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - C2D_TargetClear(top, BLACK); - C2D_TargetClear(bottom, BLACK); - Gui::DrawTop(); - if (isScriptSelected == false) { - Gui::DrawStringCentered(0, 1, 0.6f, Config::TxtColor, Text, 400); - } else if (isScriptSelected == true) { - Gui::DrawStringCentered(0, 1, 0.6f, TextColor, Text, 400); - } - Gui::DrawBottom(); - C3D_FrameEnd(0); - for (int i = 0; i < 60*3; i++) { - gspWaitForVBlank(); - } -} - -void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth) { - Gui::DrawString((currentScreen ? 200 : 160)+x-((maxWidth == 0 ? (int)Gui::GetStringWidth(size, Text) : std::min(maxWidth, (int)Gui::GetStringWidth(size, Text)))/2), y, size, color, Text, maxWidth); -} - -// Draw String or Text. -void Gui::DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth) { - C2D_Text c2d_text; - C2D_TextParse(&c2d_text, sizeBuf, Text.c_str()); - C2D_TextOptimize(&c2d_text); - if(maxWidth == 0) { - C2D_DrawText(&c2d_text, C2D_WithColor, x, y, 0.5f, size, size, color); - } else { - C2D_DrawText(&c2d_text, C2D_WithColor, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text))), size, color); - } -} - - -// Get String or Text Width. -float Gui::GetStringWidth(float size, std::string Text) { - float width = 0; - GetStringSize(size, &width, NULL, Text); - return width; -} - -// Get String or Text Size. -void Gui::GetStringSize(float size, float *width, float *height, std::string Text) { - C2D_Text c2d_text; - C2D_TextParse(&c2d_text, sizeBuf, Text.c_str()); - C2D_TextGetDimensions(&c2d_text, size, size, width, height); -} - - -// Get String or Text Height. -float Gui::GetStringHeight(float size, std::string Text) { - float height = 0; - GetStringSize(size, NULL, &height, Text.c_str()); - return height; -} - -// Draw a Rectangle. -bool Gui::Draw_Rect(float x, float y, float w, float h, u32 color) { - return C2D_DrawRectSolid(x, y, 0.5f, w, h, color); -} - -// Select, on which Screen should be drawn. -void Gui::setDraw(C3D_RenderTarget * screen) -{ - C2D_SceneBegin(screen); - currentScreen = screen == top ? 1 : 0; -} - -void Gui::DrawTop(void) { - Gui::setDraw(top); - if (isScriptSelected == false) { - Gui::Draw_Rect(0, 0, 400, 25, Config::Color1); - Gui::Draw_Rect(0, 25, 400, 190, Config::Color2); - Gui::Draw_Rect(0, 215, 400, 25, Config::Color1); - if (Config::UseBars == true) { - Gui::sprite(sprites_top_screen_top_idx, 0, 0); - Gui::sprite(sprites_top_screen_bot_idx, 0, 215); - } - } else if (isScriptSelected == true) { - Gui::Draw_Rect(0, 0, 400, 30, barColor); - Gui::Draw_Rect(0, 25, 400, 190, bgBottomColor); - Gui::Draw_Rect(0, 215, 400, 25, barColor); - if (Config::UseBars == true) { - Gui::sprite(sprites_top_screen_top_idx, 0, 0); - Gui::sprite(sprites_top_screen_bot_idx, 0, 215); - } - } -} - -void Gui::DrawBottom(void) { - Gui::setDraw(bottom); - if (isScriptSelected == false) { - Gui::Draw_Rect(0, 0, 320, 25, Config::Color1); - Gui::Draw_Rect(0, 25, 320, 190, Config::Color3); - Gui::Draw_Rect(0, 215, 320, 25, Config::Color1); - if (Config::UseBars == true) { - Gui::sprite(sprites_bottom_screen_top_idx, 0, 0); - Gui::sprite(sprites_bottom_screen_bot_idx, 0, 215); - } - } else if (isScriptSelected == true) { - Gui::Draw_Rect(0, 0, 320, 30, barColor); - Gui::Draw_Rect(0, 25, 320, 190, bgBottomColor); - Gui::Draw_Rect(0, 215, 320, 25, barColor); - if (Config::UseBars == true) { - Gui::sprite(sprites_bottom_screen_top_idx, 0, 0); - Gui::sprite(sprites_bottom_screen_bot_idx, 0, 215); - } - } -} - -std::vector promptBtn = { - {10, 100, 140, 35, -1}, // Yes. - {170, 100, 140, 35, -1}, // No. -}; - -extern touchPosition touch; -extern bool touching(touchPosition touch, Structs::ButtonPos button); - -// Display a Message, which needs to be confirmed with A/B. -bool Gui::promptMsg(std::string promptMsg) -{ - Gui::clearTextBufs(); - C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - C2D_TargetClear(top, BLACK); - C2D_TargetClear(bottom, BLACK); - Gui::DrawTop(); - if (isScriptSelected == false) { - Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, Config::TxtColor, promptMsg.c_str(), 400); - Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, Config::TxtColor, Lang::get("CONFIRM_OR_CANCEL"), 400); - } else if (isScriptSelected == true) { - Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, TextColor, promptMsg.c_str(), 400); - Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, TextColor, Lang::get("CONFIRM_OR_CANCEL"), 400); - } - Gui::DrawBottom(); - if (isScriptSelected == false) { - Gui::Draw_Rect(10, 100, 140, 35, Config::Color1); - Gui::Draw_Rect(170, 100, 140, 35, Config::Color1); - Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("YES")))/2-150+70, 110, 0.6f, Config::TxtColor, Lang::get("YES"), 140); - Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("NO")))/2+150-70, 110, 0.6f, Config::TxtColor, Lang::get("NO"), 140); - } else if (isScriptSelected == true) { - Gui::Draw_Rect(10, 100, 140, 35, barColor); - Gui::Draw_Rect(170, 100, 140, 35, barColor); - Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("YES")))/2-150+70, 110, 0.6f, TextColor, Lang::get("YES"), 140); - Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("NO")))/2+150-70, 110, 0.6f, TextColor, Lang::get("NO"), 140); - } - - C3D_FrameEnd(0); - while(1) - { - gspWaitForVBlank(); - hidScanInput(); - hidTouchRead(&touch); - if ((hidKeysDown() & KEY_A) || (hidKeysDown() & KEY_TOUCH && touching(touch, promptBtn[0]))) { - return true; - } else if ((hidKeysDown() & KEY_B) || (hidKeysDown() & KEY_TOUCH && touching(touch, promptBtn[1]))) { - return false; - } - } -} \ No newline at end of file diff --git a/source/init.cpp b/source/init.cpp new file mode 100644 index 0000000..87ff5d9 --- /dev/null +++ b/source/init.cpp @@ -0,0 +1,171 @@ +/* +* 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 . +* +* 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. +*/ + +#include "config.hpp" +#include "init.hpp" +#include "gfx.hpp" +#include "gui.hpp" +#include "lang.hpp" +#include "logging.hpp" +#include "mainMenu.hpp" +#include "screenCommon.hpp" +#include "sound.h" + +#include <3ds.h> +#include +#include + +// The classic Fade Effect! ;P +int fadealpha = 255; +bool fadein = true; + +bool exiting = false; +bool dspFound = false; +touchPosition touch; +sound *bgm = NULL; +bool songIsFound = false; + +// Include all spritesheet's. +C2D_SpriteSheet sprites; + +// If button Position pressed -> Do something. +bool touching(touchPosition touch, Structs::ButtonPos button) { + if (touch.px >= button.x && touch.px <= (button.x + button.w) && touch.py >= button.y && touch.py <= (button.y + button.h)) + return true; + else + return false; +} + +void Init::loadSoundEffects(void) { + if (dspFound == true) { + if( access( Config::MusicPath.c_str(), F_OK ) != -1 ) { + bgm = new sound(Config::MusicPath, 1, true); + songIsFound = true; + } + } +} + +void Init::playMusic(void) { + if (songIsFound == true) { + bgm->play(); + } +} + +void Init::stopMusic(void) { + if (songIsFound == true) { + bgm->stop(); + } +} + + +Result Init::Initialize() { + gfxInitDefault(); + romfsInit(); + Gui::init(); + Gui::loadSheet("romfs:/gfx/sprites.t3x", sprites); + sdmcInit(); + cfguInit(); + acInit(); + // Create Folder if missing. + mkdir("sdmc:/3ds", 0777); + mkdir("sdmc:/3ds/Universal-Updater", 0777); + mkdir("sdmc:/3ds/Universal-Updater/scripts", 0777); + mkdir("sdmc:/3ds/Universal-Updater/stores", 0777); + + // We need to make sure, the file exist. + if(access("sdmc:/3ds/Universal-Updater/Settings.json", F_OK) == -1 ) { + Config::initializeNewConfig(); + } + Config::load(); + Lang::load(Config::lang); + + if (Config::Logging == true) { + Logging::createLogFile(); + } + + Gui::setScreen(std::make_unique()); + osSetSpeedupEnable(true); // Enable speed-up for New 3DS users + + if( access( "sdmc:/3ds/dspfirm.cdc", F_OK ) != -1 ) { + ndspInit(); + dspFound = true; + loadSoundEffects(); + playMusic(); + } + + return 0; +} + +Result Init::MainLoop() { + // Initialize everything. + Initialize(); + + // Loop as long as the status is not exiting. + while (aptMainLoop() && !exiting) + { + hidScanInput(); + u32 hHeld = hidKeysHeld(); + u32 hDown = hidKeysDown(); + hidTouchRead(&touch); + C3D_FrameBegin(C3D_FRAME_SYNCDRAW); + C2D_TargetClear(Top, BLACK); + C2D_TargetClear(Bottom, BLACK); + Gui::clearTextBufs(); + Gui::mainLoop(hDown, hHeld, touch); + C3D_FrameEnd(0); + gspWaitForVBlank(); + + if (fadein == true) { + fadealpha -= 3; + if (fadealpha < 0) { + fadealpha = 0; + fadein = false; + } + } + } + // Exit all services and exit the app. + Exit(); + return 0; +} + +Result Init::Exit() { + if (songIsFound == true) { + stopMusic(); + } + delete bgm; + if (dspFound == true) { + ndspExit(); + } + Config::save(); + Gui::exit(); + Gui::unloadSheet(sprites); + gfxExit(); + cfguExit(); + acExit(); + romfsExit(); + sdmcExit(); + return 0; +} \ No newline at end of file diff --git a/source/keyboard.cpp b/source/keyboard.cpp index 5855368..d157655 100644 --- a/source/keyboard.cpp +++ b/source/keyboard.cpp @@ -1,15 +1,15 @@ +#include "config.hpp" +#include "gfx.hpp" #include "gui.hpp" #include "keyboard.hpp" - -#include "utils/config.hpp" -#include "utils/structs.hpp" +#include "structs.hpp" #include #include #include -extern C3D_RenderTarget* top; -extern C3D_RenderTarget* bottom; +extern C3D_RenderTarget* Top; +extern C3D_RenderTarget* Bottom; bool caps = false, enter = false; int shift = 0; @@ -128,13 +128,13 @@ std::string Input::Numpad(uint maxLength, std::string Text) C3D_FrameEnd(0); Gui::clearTextBufs(); C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - C2D_TargetClear(top, BLACK); - C2D_TargetClear(bottom, BLACK); - Gui::DrawTop(); + C2D_TargetClear(Top, BLACK); + C2D_TargetClear(Bottom, BLACK); + GFX::DrawTop(); Gui::DrawString((400-Gui::GetStringWidth(0.55f, Text))/2, 2, 0.55f, Config::TxtColor, Text, 400); Gui::DrawString(180, 217, 0.8, Config::TxtColor, (string+(cursorBlink-- > 0 ? "_" : "")).c_str(), 400); if(cursorBlink < -20) cursorBlink = 20; - Gui::setDraw(bottom); + Gui::ScreenDraw(Bottom); Gui::Draw_Rect(0, 0, 320, 240, Config::Color3); DrawNumpad(); scanKeys(); @@ -211,9 +211,9 @@ std::string Input::getString(uint maxLength, std::string Text, float inputTextSi C3D_FrameEnd(0); Gui::clearTextBufs(); C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - Gui::DrawTop(); + GFX::DrawTop(); Gui::DrawString((400-Gui::GetStringWidth(0.55f, Text))/2, 2, 0.55f, Config::TxtColor, Text, 400); - Gui::DrawBottom(); + GFX::DrawBottom(); drawKeyboard(); C2D_DrawRectSolid(0, 81, 0.5f, 320, 20, Config::Color1 & C2D_Color32(200, 200, 200, 200)); Gui::DrawString(2, 82, inputTextSize, Config::TxtColor, (string+(cursorBlink-- > 0 ? "_" : "")).c_str(), 316); diff --git a/source/lang/lang.cpp b/source/lang/lang.cpp index 82b2ef5..bd9b1b9 100644 --- a/source/lang/lang.cpp +++ b/source/lang/lang.cpp @@ -1,6 +1,5 @@ -#include "lang/lang.hpp" - -#include "utils/config.hpp" +#include "config.hpp" +#include "lang.hpp" #include diff --git a/source/main.cpp b/source/main.cpp index af4fa60..8f0849a 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -24,122 +24,9 @@ * reasonable ways as different from the original version. */ -#include "gui.hpp" -#include "logging.hpp" +#include "init.hpp" -#include "lang/lang.hpp" - -#include "screens/mainMenu.hpp" -#include "screens/screenCommon.hpp" - -#include "utils/config.hpp" -#include "utils/sound.h" -#include "utils/structs.hpp" - -#include <3ds.h> -#include -#include - -bool exiting = false; -bool dspFound = false; -touchPosition touch; -sound *bgm = NULL; -bool songIsFound = false; - -// If button Position pressed -> Do something. -bool touching(touchPosition touch, Structs::ButtonPos button) { - if (touch.px >= button.x && touch.px <= (button.x + button.w) && touch.py >= button.y && touch.py <= (button.y + button.h)) - return true; - else - return false; -} - - -void loadSoundEffects(void) { - if (dspFound == true) { - if( access( Config::MusicPath.c_str(), F_OK ) != -1 ) { - bgm = new sound(Config::MusicPath, 1, true); - songIsFound = true; - } - } -} - -void playMusic(void) { - if (songIsFound == true) { - bgm->play(); - } -} - -void stopMusic(void) { - if (songIsFound == true) { - bgm->stop(); - } -} - -int main() -{ - gfxInitDefault(); - romfsInit(); - Gui::init(); - sdmcInit(); - cfguInit(); - acInit(); - // Create Folder if missing. - mkdir("sdmc:/3ds", 0777); - mkdir("sdmc:/3ds/Universal-Updater", 0777); - mkdir("sdmc:/3ds/Universal-Updater/scripts", 0777); - mkdir("sdmc:/3ds/Universal-Updater/stores", 0777); - - // We need to make sure, the file exist. - if(access("sdmc:/3ds/Universal-Updater/Settings.json", F_OK) == -1 ) { - Config::initializeNewConfig(); - } - Config::load(); - Lang::load(Config::lang); - - if (Config::Logging == true) { - Logging::createLogFile(); - } - - Screen::set(std::make_unique()); - osSetSpeedupEnable(true); // Enable speed-up for New 3DS users - - if( access( "sdmc:/3ds/dspfirm.cdc", F_OK ) != -1 ) { - ndspInit(); - dspFound = true; - loadSoundEffects(); - playMusic(); - } - - // Loop as long as the status is not exit - while (aptMainLoop() && !exiting) - { - hidScanInput(); - u32 hHeld = hidKeysHeld(); - u32 hDown = hidKeysDown(); - hidTouchRead(&touch); - C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - C2D_TargetClear(top, BLACK); - C2D_TargetClear(bottom, BLACK); - Gui::clearTextBufs(); - Screen::loop(hDown, hHeld, touch); - C3D_FrameEnd(0); - gspWaitForVBlank(); - } - - if (songIsFound == true) { - stopMusic(); - } - delete bgm; - if (dspFound == true) { - ndspExit(); - } - Config::save(); - Gui::exit(); - gfxExit(); - cfguExit(); - acExit(); - romfsExit(); - sdmcExit(); +int main() { + Init::MainLoop(); // Init::MainLoop() has the whole logic already. ;P return 0; } \ No newline at end of file diff --git a/source/msg.cpp b/source/msg.cpp new file mode 100644 index 0000000..e04661b --- /dev/null +++ b/source/msg.cpp @@ -0,0 +1,120 @@ +/* +* 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 . +* +* 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. +*/ + +#include "common.hpp" +#include "msg.hpp" + +extern bool isScriptSelected; + +extern u32 barColor; +extern u32 bgTopColor; +extern u32 bgBottomColor; +extern u32 TextColor; + +void Msg::DisplayMsg(std::string text) { + Gui::clearTextBufs(); + C3D_FrameBegin(C3D_FRAME_SYNCDRAW); + C2D_TargetClear(Top, BLACK); + C2D_TargetClear(Bottom, BLACK); + GFX::DrawTop(); + if (isScriptSelected == false) { + Gui::DrawString(10, 40, 0.45f, Config::TxtColor, text, 380); + } else if (isScriptSelected == true) { + Gui::DrawString(10, 40, 0.45f, TextColor, text, 380); + } + GFX::DrawBottom(); + C3D_FrameEnd(0); +} + +void Msg::DisplayWarnMsg(std::string Text) +{ + Gui::clearTextBufs(); + C3D_FrameBegin(C3D_FRAME_SYNCDRAW); + C2D_TargetClear(Top, BLACK); + C2D_TargetClear(Bottom, BLACK); + GFX::DrawTop(); + if (isScriptSelected == false) { + Gui::DrawStringCentered(0, 1, 0.6f, Config::TxtColor, Text, 400); + } else if (isScriptSelected == true) { + Gui::DrawStringCentered(0, 1, 0.6f, TextColor, Text, 400); + } + GFX::DrawBottom(); + C3D_FrameEnd(0); + for (int i = 0; i < 60*3; i++) { + gspWaitForVBlank(); + } +} + + +std::vector promptBtn = { + {10, 100, 140, 35}, // Yes. + {170, 100, 140, 35}, // No. +}; + +extern touchPosition touch; +extern bool touching(touchPosition touch, Structs::ButtonPos button); + +// Display a Message, which needs to be confirmed with A/B. +bool Msg::promptMsg(std::string promptMsg) +{ + Gui::clearTextBufs(); + C3D_FrameBegin(C3D_FRAME_SYNCDRAW); + C2D_TargetClear(Top, BLACK); + C2D_TargetClear(Bottom, BLACK); + GFX::DrawTop(); + if (isScriptSelected == false) { + Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, Config::TxtColor, promptMsg.c_str(), 400); + Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, Config::TxtColor, Lang::get("CONFIRM_OR_CANCEL"), 400); + } else if (isScriptSelected == true) { + Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, TextColor, promptMsg.c_str(), 400); + Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, TextColor, Lang::get("CONFIRM_OR_CANCEL"), 400); + } + GFX::DrawBottom(); + if (isScriptSelected == false) { + Gui::Draw_Rect(10, 100, 140, 35, Config::Color1); + Gui::Draw_Rect(170, 100, 140, 35, Config::Color1); + Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("YES")))/2-150+70, 110, 0.6f, Config::TxtColor, Lang::get("YES"), 140); + Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("NO")))/2+150-70, 110, 0.6f, Config::TxtColor, Lang::get("NO"), 140); + } else if (isScriptSelected == true) { + Gui::Draw_Rect(10, 100, 140, 35, barColor); + Gui::Draw_Rect(170, 100, 140, 35, barColor); + Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("YES")))/2-150+70, 110, 0.6f, TextColor, Lang::get("YES"), 140); + Gui::DrawString((320-Gui::GetStringWidth(0.6f, Lang::get("NO")))/2+150-70, 110, 0.6f, TextColor, Lang::get("NO"), 140); + } + + C3D_FrameEnd(0); + while(1) + { + gspWaitForVBlank(); + hidScanInput(); + hidTouchRead(&touch); + if ((hidKeysDown() & KEY_A) || (hidKeysDown() & KEY_TOUCH && touching(touch, promptBtn[0]))) { + return true; + } else if ((hidKeysDown() & KEY_B) || (hidKeysDown() & KEY_TOUCH && touching(touch, promptBtn[1]))) { + return false; + } + } +} \ No newline at end of file diff --git a/source/screens/credits.cpp b/source/screens/credits.cpp index 2772774..708805f 100644 --- a/source/screens/credits.cpp +++ b/source/screens/credits.cpp @@ -24,38 +24,36 @@ * reasonable ways as different from the original version. */ -#include "screens/credits.hpp" - -#include "utils/config.hpp" +#include "credits.hpp" extern bool touching(touchPosition touch, Structs::ButtonPos button); void Credits::Draw(void) const { std::string title = "Universal-Updater - "; title += Lang::get("CREDITS"); - Gui::DrawTop(); + GFX::DrawTop(); if (creditsPage != 4) { if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, title, 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, title, 400); } - Gui::DrawStringCentered(0, 40, 0.8f, Config::TxtColor, Lang::get("DEVELOPED_BY"), 400); - Gui::DrawStringCentered(0, 70, 0.8f, Config::TxtColor, Lang::get("MAIN_DEV"), 400); - Gui::sprite(sprites_stackZ_idx, 150, 95); + Gui::DrawStringCentered(0, 30, 0.7f, Config::TxtColor, Lang::get("DEVELOPED_BY"), 390); + Gui::DrawStringCentered(0, 70, 0.7f, Config::TxtColor, Lang::get("MAIN_DEV"), 390); + GFX::DrawSprite(sprites_stackZ_idx, 120, 105); std::string currentVersion = Lang::get("CURRENT_VERSION"); currentVersion += V_STRING; Gui::DrawString(395-Gui::GetStringWidth(0.70f, currentVersion), 219, 0.70f, Config::TxtColor, currentVersion, 400); } else { Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, 190)); - Gui::sprite(sprites_discord_idx, 115, 35); + GFX::DrawSprite(sprites_discord_idx, 115, 35); } - Gui::DrawBottom(); + GFX::DrawBottom(); if (creditsPage != 4) { - Gui::DrawArrow(0, 218, 0, 1); - Gui::DrawArrow(318, 240, 180.0, 1); + GFX::DrawArrow(0, 218, 0, 1); + GFX::DrawArrow(318, 240, 180.0, 1); } if (creditsPage == 1) { @@ -77,14 +75,14 @@ void Credits::Draw(void) const { } else if (creditsPage == 4) { Gui::Draw_Rect(0, 0, 320, 240, C2D_Color32(0, 0, 0, 190)); Gui::DrawStringCentered(0, -2, 0.55f, Config::TxtColor, Lang::get("LINK"), 320); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawArrow(0, 218, 0, 1); } } void Credits::Logic(u32 hDown, u32 hHeld, touchPosition touch) { if ((hDown & KEY_LEFT || hDown & KEY_L) || (hDown & KEY_TOUCH && touching(touch, arrowPos[0]))) { if (creditsPage == 1) { - Screen::back(); + Gui::screenBack(); return; } else if (creditsPage > 1) { creditsPage--; @@ -96,7 +94,7 @@ void Credits::Logic(u32 hDown, u32 hHeld, touchPosition touch) { } if (hDown & KEY_B) { - Screen::back(); + Gui::screenBack(); return; } } \ No newline at end of file diff --git a/source/screens/ftpScreen.cpp b/source/screens/ftpScreen.cpp index fe3305c..09e28d3 100644 --- a/source/screens/ftpScreen.cpp +++ b/source/screens/ftpScreen.cpp @@ -24,12 +24,8 @@ * reasonable ways as different from the original version. */ -#include "lang/lang.hpp" -#include "screens/ftpScreen.hpp" -#include "screens/screenCommon.hpp" - -#include "utils/config.hpp" +#include "ftpScreen.hpp" #include #include @@ -54,14 +50,14 @@ void FTPScreen::Draw(void) const ftp_loop(); Gui::clearTextBufs(); C3D_FrameBegin(C3D_FRAME_SYNCDRAW); - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawString((400-Gui::GetStringWidth(0.7f, Lang::get("FTP_MODE")))/2, 0, 0.7f, Config::TxtColor, Lang::get("FTP_MODE"), 400); } else { Gui::DrawString((400-Gui::GetStringWidth(0.7f, Lang::get("FTP_MODE")))/2, 2, 0.7f, Config::TxtColor, Lang::get("FTP_MODE"), 400); } - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); ret = ACU_GetWifiStatus(&wifiStatus); if ((wifiStatus != 0) && R_SUCCEEDED(ret)) { @@ -95,7 +91,7 @@ void FTPScreen::Draw(void) const memset(ftp_file_transfer, 0, 50); // Empty transfer status. ftp_exit(); - Screen::back(); + Gui::screenBack(); return; } diff --git a/source/screens/mainMenu.cpp b/source/screens/mainMenu.cpp index 305524c..04b1241 100644 --- a/source/screens/mainMenu.cpp +++ b/source/screens/mainMenu.cpp @@ -24,13 +24,12 @@ * reasonable ways as different from the original version. */ -#include "screens/ftpScreen.hpp" -#include "screens/mainMenu.hpp" -#include "screens/scriptlist.hpp" -#include "screens/settings.hpp" -#include "screens/unistore.hpp" - -#include "utils/config.hpp" +#include "config.hpp" +#include "ftpScreen.hpp" +#include "mainMenu.hpp" +#include "scriptlist.hpp" +#include "settings.hpp" +#include "unistore.hpp" extern bool exiting; extern bool touching(touchPosition touch, Structs::ButtonPos button); @@ -38,7 +37,7 @@ extern int fadealpha; extern bool fadein; void MainMenu::Draw(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400); @@ -49,13 +48,13 @@ void MainMenu::Draw(void) const { } if (fadealpha > 0) Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in out effect - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); for (int i = 0; i < 4; i++) { Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, Config::UnselectedColor); if (Selection == i) { - Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, Config::SelectedColor); + Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, TRANSPARENT, Config::SelectedColor); } } @@ -65,7 +64,7 @@ void MainMenu::Draw(void) const { Gui::DrawStringCentered(80, mainButtons[3].y+12, 0.6f, Config::TxtColor, "FTP", 130); // Draw UniStore Icon. ;P - Gui::sprite(sprites_uniStore_idx, 10, 65); + GFX::DrawSprite(sprites_uniStore_idx, 10, 65); if (fadealpha > 0) Gui::Draw_Rect(0, 0, 320, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in out effect } @@ -88,29 +87,29 @@ void MainMenu::Logic(u32 hDown, u32 hHeld, touchPosition touch) { if (hDown & KEY_A) { switch(Selection) { case 0: - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); break; case 1: - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); break; case 2: - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); break; case 3: - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); break; } } if (hDown & KEY_TOUCH) { if (touching(touch, mainButtons[0])) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } else if (touching(touch, mainButtons[1])) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } else if (touching(touch, mainButtons[2])) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } else if (touching(touch, mainButtons[3])) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } } } \ No newline at end of file diff --git a/source/screens/screen.cpp b/source/screens/screen.cpp deleted file mode 100644 index e6ab77a..0000000 --- a/source/screens/screen.cpp +++ /dev/null @@ -1,73 +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 . -* -* 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. -*/ - -#include "screens/screen.hpp" - -#include - -// Fade stuff. -int fadealpha = 255; -bool fadein = true; - -std::stack> screens; - -// Set a specific Screen. -void Screen::set(std::unique_ptr screen2) -{ - screens.push(std::move(screen2)); -} - -// Fade into another Screen, but first do a fadeout. -void Screen::fade(std::unique_ptr screen2, bool fadeout) { - if (fadeout) { - fadealpha += 6; - if (fadealpha > 255) { - fadealpha = 255; - screens.push(std::move(screen2)); - fadein = true; - fadeout = false; - } - } -} - -// Go a Screen back. -void Screen::back() -{ - screens.pop(); -} - -// For the Mainloop. -void Screen::loop(u32 hDown, u32 hHeld, touchPosition touch) { - screens.top()->Draw(); - screens.top()->Logic(hDown, hHeld, touch); - if (fadein == true) { - fadealpha -= 6; - if (fadealpha < 0) { - fadealpha = 0; - fadein = false; - } - } -} \ No newline at end of file diff --git a/source/screens/scriptBrowse.cpp b/source/screens/scriptBrowse.cpp index f04d76d..07cc3e9 100644 --- a/source/screens/scriptBrowse.cpp +++ b/source/screens/scriptBrowse.cpp @@ -24,12 +24,10 @@ * reasonable ways as different from the original version. */ -#include "download/download.hpp" - -#include "screens/scriptBrowse.hpp" - -#include "utils/fileBrowse.h" -#include "utils/json.hpp" +#include "download.hpp" +#include "fileBrowse.hpp" +#include "json.hpp" +#include "scriptBrowse.hpp" #include @@ -94,7 +92,7 @@ void findExistingFiles(nlohmann::json &json) { } ScriptBrowse::ScriptBrowse() { - DisplayMsg(Lang::get("GETTING_SCRIPT_LIST")); + Msg::DisplayMsg(Lang::get("GETTING_SCRIPT_LIST")); // Get repo info downloadToFile("https://github.com/Universal-Team/extras/raw/scripts/info/scriptInfo.json", metaFile); @@ -107,7 +105,7 @@ ScriptBrowse::ScriptBrowse() { } void ScriptBrowse::Draw(void) const { - Gui::DrawTop(); + GFX::DrawTop(); std::string revision = std::to_string(int64_t(infoJson[selection]["curRevision"])); revision += " / "; revision += std::to_string(int64_t(infoJson[selection]["revision"])); @@ -128,13 +126,13 @@ void ScriptBrowse::Draw(void) const { } else if(infoJson[selection]["curRevision"] > infoJson[selection]["revision"]) { Gui::DrawStringCentered(0, 219, 0.7f, Config::TxtColor, Lang::get("FUTURE_SCRIPT"), 370); } - Gui::DrawBottom(); - Gui::DrawArrow(295, -1); - Gui::DrawArrow(315, 240, 180.0); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(295, -1); + GFX::DrawArrow(315, 240, 180.0); + GFX::DrawArrow(0, 218, 0, 1); - Gui::spriteBlend(sprites_download_all_idx, arrowPos[3].x, arrowPos[3].y); - Gui::spriteBlend(sprites_view_idx, arrowPos[4].x, arrowPos[4].y); + GFX::DrawSpriteBlend(sprites_download_all_idx, arrowPos[3].x, arrowPos[3].y); + GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[4].x, arrowPos[4].y); //Gui::spriteBlend(sprites_search_idx, arrowPos[5].x, arrowPos[5].y); Gui::DrawStringCentered(-23, 1, 0.6f, Config::TxtColor, std::to_string(selection + 1) + " / " + maxScripts); @@ -143,7 +141,7 @@ void ScriptBrowse::Draw(void) const { for(int i=0;i #include @@ -80,14 +77,14 @@ void ScriptCreator::Draw(void) const { } void ScriptCreator::DrawSubMenu(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SCRIPTCREATOR"), 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("SCRIPTCREATOR"), 400); } - Gui::DrawBottom(); + GFX::DrawBottom(); for (int i = 0; i < 2; i++) { if (Selection == i) { @@ -102,14 +99,14 @@ void ScriptCreator::DrawSubMenu(void) const { } void ScriptCreator::DrawScriptScreen(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Selected Entry: " + entryName, 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Selected Entry: " + entryName, 400); } - Gui::DrawBottom(); + GFX::DrawBottom(); // Draw Page. for (int i = 0; i < 2; i++) { @@ -287,7 +284,7 @@ void ScriptCreator::setInfoStuff(void) { void ScriptCreator::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) { if (hDown & KEY_B) { - Screen::back(); + Gui::screenBack(); return; } diff --git a/source/screens/scriptlist.cpp b/source/screens/scriptlist.cpp index 30ca840..cc03ecd 100644 --- a/source/screens/scriptlist.cpp +++ b/source/screens/scriptlist.cpp @@ -24,14 +24,11 @@ * reasonable ways as different from the original version. */ -#include "download/download.hpp" - -#include "screens/scriptBrowse.hpp" -#include "screens/scriptCreator.hpp" -#include "screens/scriptlist.hpp" - -#include "utils/config.hpp" -#include "utils/scriptHelper.hpp" +#include "download.hpp" +#include "scriptBrowse.hpp" +#include "scriptCreator.hpp" +#include "scriptHelper.hpp" +#include "scriptlist.hpp" #include #include @@ -82,7 +79,7 @@ void checkForValidate(void) { fclose(file); int ver = ScriptHelper::getNum(json, "info", "version"); if (ver < SCRIPT_VERSION || ver > SCRIPT_VERSION) { - Gui::DisplayWarnMsg(Lang::get("INCOMPATIBLE_SCRIPT")); + Msg::DisplayWarnMsg(Lang::get("INCOMPATIBLE_SCRIPT")); } } @@ -190,7 +187,7 @@ void runFunctions(nlohmann::json &json) { else missing = true; promptmsg = Lang::get("DELETE_PROMPT") + "\n" + directory; if(!missing) { - if (Gui::promptMsg(promptmsg)) { + if (Msg::promptMsg(promptmsg)) { removeDirRecursive(directory.c_str()); } } @@ -270,20 +267,20 @@ void loadColors(nlohmann::json &json) { } void ScriptList::DrawSubMenu(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SCRIPTS_SUBMENU"), 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("SCRIPTS_SUBMENU"), 400); } - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); for (int i = 0; i < 4; i++) { Gui::Draw_Rect(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, Config::UnselectedColor); if (SubSelection == i) { - Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, Config::SelectedColor); + Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, TRANSPARENT, Config::SelectedColor); } } @@ -298,7 +295,7 @@ void ScriptList::DrawList(void) const { std::string line1; std::string line2; std::string scriptAmount = std::to_string(selection +1) + " / " + std::to_string(fileInfo.size()); - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400); Gui::DrawString(397-Gui::GetStringWidth(0.6f, scriptAmount), 239-Gui::GetStringHeight(0.6f, scriptAmount), 0.6f, Config::TxtColor, scriptAmount); @@ -310,11 +307,11 @@ void ScriptList::DrawList(void) const { Gui::DrawStringCentered(0, 100, 0.7f, Config::TxtColor, Lang::get("AUTHOR") + std::string(fileInfo[selection].author), 400); Gui::DrawStringCentered(0, 120, 0.6f, Config::TxtColor, std::string(fileInfo[selection].shortDesc), 400); - Gui::DrawBottom(); - Gui::DrawArrow(295, -1); - Gui::DrawArrow(315, 240, 180.0); - Gui::DrawArrow(0, 218, 0, 1); - Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y); + GFX::DrawBottom(); + GFX::DrawArrow(295, -1); + GFX::DrawArrow(315, 240, 180.0); + GFX::DrawArrow(0, 218, 0, 1); + GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y); if (Config::viewMode == 0) { for(int i=0;i()); + Gui::setScreen(std::make_unique()); } else { notConnectedMsg(); } break; case 2: if (isTesting == true) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } else { notImplemented(); } @@ -467,17 +464,17 @@ void ScriptList::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) { } mode = 1; } else { - Gui::DisplayWarnMsg(Lang::get("GET_SCRIPTS_FIRST")); + Msg::DisplayWarnMsg(Lang::get("GET_SCRIPTS_FIRST")); } } else if (touching(touch, subPos[1])) { if (checkWifiStatus() == true) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } else { notConnectedMsg(); } } else if (touching(touch, subPos[2])) { if (isTesting == true) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } else { notImplemented(); } diff --git a/source/screens/settings.cpp b/source/screens/settings.cpp index 66a6c70..e977f3b 100644 --- a/source/screens/settings.cpp +++ b/source/screens/settings.cpp @@ -24,12 +24,9 @@ * reasonable ways as different from the original version. */ +#include "credits.hpp" #include "keyboard.hpp" - -#include "screens/credits.hpp" -#include "screens/settings.hpp" - -#include "utils/config.hpp" +#include "settings.hpp" extern bool touching(touchPosition touch, Structs::ButtonPos button); @@ -53,20 +50,20 @@ void Settings::Draw(void) const { void Settings::DrawSubMenu(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Universal-Updater", 400); } - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); - Gui::DrawArrow(318, 240, 180.0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); + GFX::DrawArrow(318, 240, 180.0, 1); for (int i = 0; i < 3; i++) { Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, Config::UnselectedColor); if (Selection == i) { - Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, Config::SelectedColor); + Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, TRANSPARENT, Config::SelectedColor); } } @@ -76,19 +73,19 @@ void Settings::DrawSubMenu(void) const { } void Settings::DrawLanguageSelection(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("SELECT_LANG"), 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("SELECT_LANG"), 400); } - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); for (int language = 0; language < 10; language++) { Gui::Draw_Rect(langBlocks[language].x, langBlocks[language].y, langBlocks[language].w, langBlocks[language].h, Config::UnselectedColor); if (Config::lang == language) { - Gui::drawAnimatedSelector(langBlocks[language].x, langBlocks[language].y, langBlocks[language].w, langBlocks[language].h, .060, Config::SelectedColor); + Gui::drawAnimatedSelector(langBlocks[language].x, langBlocks[language].y, langBlocks[language].w, langBlocks[language].h, .060, TRANSPARENT, Config::SelectedColor); } } @@ -106,7 +103,7 @@ void Settings::DrawLanguageSelection(void) const { } void Settings::DrawColorChanging(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400); } else { @@ -128,15 +125,15 @@ void Settings::DrawColorChanging(void) const { - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); - Gui::DrawArrow(0, 0, 0, 1); - Gui::DrawArrow(318, 22, 180.0, 1); + GFX::DrawArrow(0, 0, 0, 1); + GFX::DrawArrow(318, 22, 180.0, 1); for (int i = 0; i < 7; i++) { if (colorMode == i) { - Gui::drawAnimatedSelector(54 + i * 25, 2, 16, 16, .060, C2D_Color32(140, 140, 140, 255)); + Gui::drawAnimatedSelector(54 + i * 25, 2, 16, 16, .060, TRANSPARENT, C2D_Color32(140, 140, 140, 255)); } } @@ -187,20 +184,20 @@ void Settings::DrawColorChanging(void) const { } void Settings::DrawMiscSettings(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, "Universal-Updater", 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "Universal-Updater", 400); } - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); for (int i = 0; i < 2; i++) { Gui::Draw_Rect(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, Config::UnselectedColor); if (Selection == i) { - Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, Config::SelectedColor); + Gui::drawAnimatedSelector(mainButtons[i].x, mainButtons[i].y, mainButtons[i].w, mainButtons[i].h, .060, TRANSPARENT, Config::SelectedColor); } } @@ -258,7 +255,7 @@ void Settings::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) { } if (hDown & KEY_A) { - if (Selection + 1 == 3) Screen::set(std::make_unique()); + if (Selection + 1 == 3) Gui::setScreen(std::make_unique()); else mode = Selection+1; } @@ -268,12 +265,12 @@ void Settings::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) { } else if (touching(touch, mainButtons[1])) { mode = 2; } else if (touching(touch, mainButtons[2])) { - Screen::set(std::make_unique()); + Gui::setScreen(std::make_unique()); } } if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) { - Screen::back(); + Gui::screenBack(); return; } diff --git a/source/screens/unistore.cpp b/source/screens/unistore.cpp index bc83006..820c258 100644 --- a/source/screens/unistore.cpp +++ b/source/screens/unistore.cpp @@ -24,17 +24,13 @@ * reasonable ways as different from the original version. */ +#include "download.hpp" +#include "fileBrowse.hpp" +#include "formatting.hpp" +#include "json.hpp" #include "keyboard.hpp" - -#include "download/download.hpp" - -#include "screens/unistore.hpp" - -#include "utils/config.hpp" -#include "utils/fileBrowse.h" -#include "utils/formatting.hpp" -#include "utils/json.hpp" -#include "utils/scriptHelper.hpp" +#include "scriptHelper.hpp" +#include "unistore.hpp" #include #include @@ -186,21 +182,21 @@ void loadStoreColors(nlohmann::json &json) { } void UniStore::DrawSubMenu(void) const { - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, Lang::get("UNISTORE_SUBMENU"), 400); } else { Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, Lang::get("UNISTORE_SUBMENU"), 400); } - Gui::sprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2); - Gui::DrawBottom(); - Gui::DrawArrow(0, 218, 0, 1); + GFX::DrawSprite(sprites_uniStore_HD_idx, 140, 50, 0.2, 0.2); + GFX::DrawBottom(); + GFX::DrawArrow(0, 218, 0, 1); for (int i = 0; i < 3; i++) { Gui::Draw_Rect(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, Config::UnselectedColor); if (subSelection == i) { - Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, Config::SelectedColor); + Gui::drawAnimatedSelector(subPos[i].x, subPos[i].y, subPos[i].w, subPos[i].h, .060, TRANSPARENT, Config::SelectedColor); } } @@ -215,7 +211,7 @@ void UniStore::DrawStoreList(void) const { std::string line1; std::string line2; std::string storeAmount = std::to_string(selection +1) + " / " + std::to_string(storeInfo.size()); - Gui::DrawTop(); + GFX::DrawTop(); if (Config::UseBars == true) { Gui::DrawStringCentered(0, 0, 0.7f, Config::TxtColor, storeInfo[selection].title, 400); Gui::DrawString(397-Gui::GetStringWidth(0.6f, storeAmount), 239-Gui::GetStringHeight(0.6f, storeAmount), 0.6f, Config::TxtColor, storeAmount); @@ -227,13 +223,13 @@ void UniStore::DrawStoreList(void) const { Gui::DrawStringCentered(0, 120-((descLines.size()*20)/2)+i*20, 0.6f, Config::TxtColor, descLines[i], 400); } - Gui::DrawBottom(); - Gui::DrawArrow(295, -1); - Gui::DrawArrow(315, 240, 180.0); - Gui::DrawArrow(0, 218, 0, 1); - Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y); - Gui::spriteBlend(sprites_search_idx, arrowPos[4].x, arrowPos[4].y); - Gui::spriteBlend(sprites_update_idx, arrowPos[5].x, arrowPos[5].y); + GFX::DrawBottom(); + GFX::DrawArrow(295, -1); + GFX::DrawArrow(315, 240, 180.0); + GFX::DrawArrow(0, 218, 0, 1); + GFX::DrawSpriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y); + GFX::DrawSpriteBlend(sprites_search_idx, arrowPos[4].x, arrowPos[4].y); + GFX::DrawSpriteBlend(sprites_update_idx, arrowPos[5].x, arrowPos[5].y); if (Config::viewMode == 0) { for(int i=0;i #include diff --git a/source/utils/console.c b/source/utils/console.c index d00e0f2..0c383c1 100644 --- a/source/utils/console.c +++ b/source/utils/console.c @@ -1,4 +1,4 @@ -#include "utils/console.h" +#include "console.h" #include #include diff --git a/source/utils/extract.cpp b/source/utils/extract.cpp index e88cb56..769ab9c 100644 --- a/source/utils/extract.cpp +++ b/source/utils/extract.cpp @@ -24,7 +24,7 @@ * reasonable ways as different from the original version. */ -#include "utils/extract.hpp" +#include "extract.hpp" #include #include diff --git a/source/utils/fileBrowse.cpp b/source/utils/fileBrowse.cpp index 3ddb7aa..14368c5 100644 --- a/source/utils/fileBrowse.cpp +++ b/source/utils/fileBrowse.cpp @@ -1,11 +1,10 @@ +#include "common.hpp" +#include "config.hpp" +#include "fileBrowse.hpp" +#include "gfx.hpp" #include "gui.hpp" - -#include "screens/screenCommon.hpp" - -#include "utils/common.hpp" -#include "utils/config.hpp" -#include "utils/fileBrowse.h" -#include "utils/structs.hpp" +#include "screenCommon.hpp" +#include "structs.hpp" #include <3ds.h> #include @@ -31,82 +30,15 @@ extern bool touching(touchPosition touch, Structs::ButtonPos button); extern touchPosition touch; std::vector buttonPositions = { - {295, 0, 25, 25, -1}, // Arrow Up. - {295, 215, 25, 25, -1}, // Arrow Down. - {15, 220, 50, 15, -1}, // Open. - {80, 220, 50, 15, -1}, // Select. - {145, 220, 50, 15, -1}, // Refresh. - {210, 220, 50, 15, -1}, // Back. - {0, 0, 25, 25, -1}, // ViewMode Change. + {295, 0, 25, 25}, // Arrow Up. + {295, 215, 25, 25}, // Arrow Down. + {15, 220, 50, 15}, // Open. + {80, 220, 50, 15}, // Select. + {145, 220, 50, 15}, // Refresh. + {210, 220, 50, 15}, // Back. + {0, 0, 25, 25}, // ViewMode Change. }; -/** - * Get the title ID. - * @param ndsFile DS ROM image. - * @param buf Output buffer for title ID. (Must be at least 4 characters.) - * @return 0 on success; non-zero on error. - */ -int grabTID(FILE *ndsFile, char *buf) { - fseek(ndsFile, offsetof(sNDSHeadertitlecodeonly, gameCode), SEEK_SET); - size_t read = fread(buf, 1, 4, ndsFile); - return !(read == 4); -} - -void findNdsFiles(vector& dirContents) { - struct stat st; - DIR *pdir = opendir("."); - - if (pdir == NULL) { - DisplayMsg("Unable to open the directory."); - for(int i=0;i<120;i++) - gspWaitForVBlank(); - } else { - while (continueNdsScan) - { - DirEntry dirEntry; - - struct dirent* pent = readdir(pdir); - if (pent == NULL) break; - - stat(pent->d_name, &st); - dirEntry.name = pent->d_name; - char scanningMessage[512]; - snprintf(scanningMessage, sizeof(scanningMessage), "Scanning SD card for DS roms...\n\n(Press B to cancel)\n\n\n\n\n\n\n\n\n%s", dirEntry.name.c_str()); - DisplayMsg(scanningMessage); - dirEntry.isDirectory = (st.st_mode & S_IFDIR) ? true : false; - if(!(dirEntry.isDirectory) && dirEntry.name.length() >= 3) { - if (strcasecmp(dirEntry.name.substr(dirEntry.name.length()-3, 3).c_str(), "nds") == 0) { - // Get game's TID - FILE *f_nds_file = fopen(dirEntry.name.c_str(), "rb"); - // char game_TID[5]; - grabTID(f_nds_file, dirEntry.tid); - dirEntry.tid[4] = 0; - fclose(f_nds_file); - - // dirEntry.tid = game_TID; - - dirContents.push_back(dirEntry); - file_count++; - } - } else if (dirEntry.isDirectory - && dirEntry.name.compare(".") != 0 - && dirEntry.name.compare("_nds") != 0 - && dirEntry.name.compare("3ds") != 0 - && dirEntry.name.compare("DCIM") != 0 - && dirEntry.name.compare("gm9") != 0 - && dirEntry.name.compare("luma") != 0 - && dirEntry.name.compare("Nintendo 3DS") != 0 - && dirEntry.name.compare("private") != 0 - && dirEntry.name.compare("retroarch") != 0) { - chdir(dirEntry.name.c_str()); - findNdsFiles(dirContents); - chdir(".."); - } - } - closedir(pdir); - } -} - off_t getFileSize(const char *fileName) { FILE* fp = fopen(fileName, "rb"); @@ -153,7 +85,7 @@ void getDirectoryContents(std::vector& dirContents, const std::vector< DIR *pdir = opendir("."); if(pdir == NULL) { - DisplayMsg("Unable to open the directory."); + Msg::DisplayMsg("Unable to open the directory."); for(int i=0;i<120;i++) gspWaitForVBlank(); } else { while(true) { @@ -223,9 +155,9 @@ std::string selectFilePath(std::string selectText, const std::vector - -#include "utils/formatting.hpp" +#include "formatting.hpp" // adapted from GM9i's byte parsing. std::string formatBytes(int bytes) { diff --git a/source/utils/ftp.c b/source/utils/ftp.c index 7109759..e5df31c 100644 --- a/source/utils/ftp.c +++ b/source/utils/ftp.c @@ -4,8 +4,8 @@ * from https://cr.yp.to/ftp/filesystem.html */ -#include "utils/console.h" -#include "utils/ftp.h" +#include "console.h" +#include "ftp.h" #include #include diff --git a/source/utils/scriptHelper.cpp b/source/utils/scriptHelper.cpp index 873d64f..ec66f19 100644 --- a/source/utils/scriptHelper.cpp +++ b/source/utils/scriptHelper.cpp @@ -24,18 +24,17 @@ * reasonable ways as different from the original version. */ +#include "download.hpp" +#include "extract.hpp" #include "gui.hpp" - -#include "download/download.hpp" - -#include "utils/extract.hpp" -#include "utils/scriptHelper.hpp" -#include "utils/thread.hpp" +#include "msg.hpp" +#include "scriptHelper.hpp" +#include "thread.hpp" #include extern "C" { - #include "utils/cia.h" + #include "cia.h" } extern bool showProgressBar; @@ -96,13 +95,13 @@ void ScriptHelper::downloadFile(std::string file, std::string output, std::strin // Remove a File. void ScriptHelper::removeFile(std::string file, std::string message) { - DisplayMsg(message); + Msg::DisplayMsg(message); deleteFile(file.c_str()); } // Install a file. void ScriptHelper::installFile(std::string file, std::string message) { - DisplayMsg(message); + Msg::DisplayMsg(message); installCia(file.c_str()); } @@ -127,7 +126,7 @@ Result ScriptHelper::createFile(const char * path) { // Display a Message for a specific amount of time. void ScriptHelper::displayTimeMsg(std::string message, int seconds) { - DisplayMsg(message); + Msg::DisplayMsg(message); for (int i = 0; i < 60*seconds; i++) { gspWaitForVBlank(); } diff --git a/source/utils/sound.cpp b/source/utils/sound.cpp index 3f26ac3..80fbd8d 100644 --- a/source/utils/sound.cpp +++ b/source/utils/sound.cpp @@ -1,4 +1,4 @@ -#include "utils/sound.h" +#include "sound.h" #include #include diff --git a/source/utils/stringutils.cpp b/source/utils/stringutils.cpp index 007c6ee..a3856d6 100644 --- a/source/utils/stringutils.cpp +++ b/source/utils/stringutils.cpp @@ -1,4 +1,4 @@ -#include "utils/stringutils.hpp" +#include "stringutils.hpp" bool matchPattern(std::string pattern, std::string tested) { diff --git a/source/utils/thread.cpp b/source/utils/thread.cpp index ca30d79..019e716 100644 --- a/source/utils/thread.cpp +++ b/source/utils/thread.cpp @@ -1,4 +1,4 @@ -#include "utils/thread.hpp" +#include "thread.hpp" #include <3ds.h> #include