Switch over to Universal-Core. (#18)

* Don't build here.

* WIP: Switch to Universal-Core.

* Update Submodule repo & azure-pipelines.
This commit is contained in:
StackZ
2020-02-08 06:20:50 +01:00
committed by GitHub
parent 0ef5d2c5ab
commit 09be8e0b94
55 changed files with 1064 additions and 1327 deletions
+9 -3
View File
@@ -31,7 +31,7 @@
#ifdef __cplusplus
extern "C" {
#endif
#include "utils/files.h"
#include "files.h"
#include <malloc.h>
#include <stdio.h>
@@ -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 <cstdio>
#include <iostream>
+5 -2
View File
@@ -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);
Result extractArchive(std::string archivePath, std::string wantedFile, std::string outputPath);
#endif
@@ -1,35 +1,27 @@
#ifndef FILE_BROWSE_H
#define FILE_BROWSE_H
#include <dirent.h>
#include <string>
#include <sys/stat.h>
#include <vector>
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<DirEntry>& dirContents);
bool nameEndsWith(const std::string& name, const std::vector<std::string> extensionList);
void getDirectoryContents(std::vector<DirEntry>& dirContents, const std::vector<std::string> extensionList);
void getDirectoryContents(std::vector<DirEntry>& dirContents);
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList);
bool returnIfExist(const std::string &path, const std::vector<std::string> &extensionList);
std::string selectFilePath(std::string selectText, const std::vector<std::string> &extensionList, int selectionMode = 1);
#endif //FILE_BROWSE_H
#ifndef FILE_BROWSE_HPP
#define FILE_BROWSE_HPP
#include <dirent.h>
#include <string>
#include <sys/stat.h>
#include <vector>
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<std::string> extensionList);
void getDirectoryContents(std::vector<DirEntry>& dirContents, const std::vector<std::string> extensionList);
void getDirectoryContents(std::vector<DirEntry>& dirContents);
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList);
bool returnIfExist(const std::string &path, const std::vector<std::string> &extensionList);
std::string selectFilePath(std::string selectText, const std::vector<std::string> &extensionList, int selectionMode = 1);
#endif //FILE_BROWSE_HPP
+7 -2
View File
@@ -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);
#include <string>
std::string formatBytes(int bytes);
#endif
+5 -2
View File
@@ -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, ...);
}
}
#endif
-52
View File
@@ -1,52 +0,0 @@
/*
* This file is part of Universal-Updater
* Copyright (C) 2019-2020 DeadPhoenix8091, Epicpkmn11, Flame, RocketRobz, StackZ, TotallyNotGuy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
* * Requiring preservation of specified reasonable legal notices or
* author attributions in that material or in the Appropriate Legal
* Notices displayed by works containing it.
* * Prohibiting misrepresentation of the origin of that material,
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#ifndef STRUCTS_HPP
#define STRUCTS_HPP
#include <string>
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:
};
#endif