Skip to content

Commit

Permalink
Merge pull request #1 from RocketRobz/master
Browse files Browse the repository at this point in the history
Add upstream changes
  • Loading branch information
KirovAir authored Feb 12, 2020
2 parents ed8fb54 + 8ca58b5 commit 74a1e0e
Show file tree
Hide file tree
Showing 21 changed files with 698 additions and 873 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Universal-Core"]
path = Universal-Core
url = https://github.com/Universal-Team/Universal-Core.git
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ endif
#---------------------------------------------------------------------------------
TARGET := TWiLight_Menu++_Updater
BUILD := build
SOURCES := source source/utils source/utils/json
UNIVCORE := Universal-Core
SOURCES := $(UNIVCORE) source source/screens source/utils
DATA := data
INCLUDES := include include/utils source source/utils
INCLUDES := $(UNIVCORE) include include/screens include/utils
GRAPHICS := assets/gfx
#GFXBUILD := $(BUILD)
ROMFS := romfs
Expand All @@ -97,7 +98,7 @@ CFLAGS := -g -Wall -O2 -mword-relocations \

CFLAGS += $(INCLUDE) -DARM11 -D_3DS

CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fpermissive -std=c++11 -std=gnu++11
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fpermissive -std=gnu++17

ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
Expand Down
1 change: 1 addition & 0 deletions Universal-Core
Submodule Universal-Core added at c82ad8
5 changes: 2 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ steps:
sudo apt install p7zip-full haveged
sudo dpkg -i pacman.deb
sudo dkp-pacman -Sy
sudo dkp-pacman -S 3ds-dev --noconfirm
sudo dkp-pacman -S 3ds-curl 3ds-libarchive 3ds-liblzma 3ds-mbedtls 3ds-bzip2 3ds-zlib --noconfirm
sudo 7z x libctru.7z -o/opt/devkitpro/ -y
sudo dkp-pacman -S 3ds-dev 3ds-curl 3ds-libarchive 3ds-liblzma 3ds-mbedtls 3ds-bzip2 3ds-zlib --noconfirm
curl -L https://github.com/Steveice10/bannertool/releases/download/1.1.0/bannertool.zip -o bannertool.zip
sudo 7z e bannertool.zip linux-x86_64/bannertool
sudo chmod +x bannertool
Expand All @@ -32,6 +30,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: |
Expand Down
7 changes: 3 additions & 4 deletions include/fileBrowse.h → include/fileBrowse.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef FILE_BROWSE_H
#define FILE_BROWSE_H
#ifndef FILE_BROWSE_HPP
#define FILE_BROWSE_HPP

#include "download.hpp"
#include <sys/stat.h>
#include <dirent.h>
#include <vector>
Expand All @@ -24,4 +23,4 @@ void findNdsFiles(vector<DirEntry>& dirContents);

void getDirectoryContents (vector<DirEntry>& dirContents);

#endif //FILE_BROWSE_H
#endif //FILE_BROWSE_HPP
28 changes: 28 additions & 0 deletions include/gfx.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef GFX_HPP
#define GFX_HPP

#include "sprites.h"

#include <3ds.h>
#include <citro2d.h>

// Colors.
#define TRANSPARENT C2D_Color32(0, 0, 0, 0)
#define BLACK C2D_Color32(0, 0, 0, 255)
#define WHITE C2D_Color32(255, 255, 255, 255)
#define GRAY C2D_Color32(127, 127, 127, 255)
#define BLUE C2D_Color32(0, 0, 255, 255)
#define GREEN C2D_Color32(0, 255, 0, 255)
#define RED C2D_Color32(255, 0, 0, 255)
#define TIME C2D_Color32(16, 0, 0, 223)

typedef u32 Color;

namespace GFX
{
void DrawTop();
void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
void DrawSpriteBlend(int img, int x, int y, u32 color, float ScaleX = 1, float ScaleY = 1);
}

#endif
82 changes: 0 additions & 82 deletions include/gui.hpp

This file was deleted.

13 changes: 13 additions & 0 deletions include/init.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef INIT_HPP
#define INIT_HPP

#include <3ds.h>

namespace Init {
// Init, Mainloop & Exit.
Result Initialize();
Result MainLoop();
Result Exit();
}

#endif
12 changes: 12 additions & 0 deletions include/msg.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef MSG_HPP
#define MSG_HPP

#include <string>

namespace Msg
{
void DisplayMsg(std::string text);
bool promptMsg(std::string promptMsg);
}

#endif
23 changes: 23 additions & 0 deletions include/screens/updaterScreen.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef UPDATERSCREEN_HPP
#define UPDATERSCREEN_HPP

#include "common.hpp"
#include "structs.hpp"

#include <vector>

class UpdaterScreen : public Screen
{
public:
void Draw(void) const override;
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
UpdaterScreen();

private:
bool buttonShading = false;
bool setOption = false;
bool showMessage = false;
int menuSelection = 0;
};

#endif
78 changes: 0 additions & 78 deletions include/utils/colors.hpp

This file was deleted.

16 changes: 6 additions & 10 deletions include/utils/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ extern "C" {
#include <regex>
#include <curl/curl.h>

#include "stringutils.hpp"
#include "gfx.hpp"
#include "gui.hpp"
#include "json.hpp"
#include "msg.hpp"
#include "screenCommon.hpp"
#include "stringutils.hpp"

using json = nlohmann::json;

#endif

extern char * arg0;

#define WORKING_DIR "/3ds/"

#define HBL_FILE_NAME APP_TITLE ".3dsx"
#define HBL_FILE_PATH WORKING_DIR "/" HBL_FILE_NAME

#define CONFIG_FILE_NAME "config.json"
#define CONFIG_FILE_PATH WORKING_DIR "/" CONFIG_FILE_NAME

#define CONFIG_FILE_URL "https://raw.githubusercontent.com/LiquidFenrir/MultiUpdater/rewrite/config.json"
#define WORKING_DIR "/3ds/"
Binary file removed libctru.7z
Binary file not shown.
Loading

0 comments on commit 74a1e0e

Please sign in to comment.