Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e750411032 | |||
| 714bbf14c4 | |||
| 4b902f1927 | |||
| cc74cb08e4 | |||
| 102e559f2a | |||
| 5a29902bd3 | |||
| f24f101f25 | |||
| 46aadc36d0 | |||
| eba72e5cb3 | |||
| fa3ce2acc8 | |||
| e88b82bf05 | |||
| 789891cbc8 | |||
| eccb22fe92 | |||
| 8f8b22d8ba | |||
| 98f51c7b77 | |||
| d92e8ba648 | |||
| c1e86c9d82 | |||
| cec3330443 |
@@ -1,139 +0,0 @@
|
|||||||
name: Build DarkStore
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore: [translation]
|
|
||||||
paths-ignore:
|
|
||||||
- 'README.md'
|
|
||||||
pull_request:
|
|
||||||
branches: ["*"]
|
|
||||||
paths-ignore:
|
|
||||||
- 'README.md'
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: devkitpro/devkitarm
|
|
||||||
name: Build with Docker using devkitARM
|
|
||||||
outputs:
|
|
||||||
commit_tag: ${{ steps.build.outputs.commit_tag }}
|
|
||||||
commit_hash: ${{ steps.build.outputs.commit_hash }}
|
|
||||||
author_name: ${{ steps.build.outputs.author_name }}
|
|
||||||
committer_name: ${{ steps.build.outputs.committer_name }}
|
|
||||||
commit_subject: ${{ steps.build.outputs.commit_subject }}
|
|
||||||
commit_message: ${{ steps.build.outputs.commit_message }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Install tools
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install p7zip-full -y
|
|
||||||
|
|
||||||
curl -L https://github.com/Steveice10/bannertool/releases/download/1.2.0/bannertool.zip -o bannertool.zip
|
|
||||||
sudo 7z e bannertool.zip linux-x86_64/bannertool
|
|
||||||
sudo chmod +x bannertool
|
|
||||||
mv bannertool /usr/local/bin
|
|
||||||
rm bannertool.zip
|
|
||||||
curl -L https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.17/makerom-v0.17-ubuntu_x86_64.zip -o makerom-v0.17-ubuntu_x86_64.zip
|
|
||||||
sudo 7z e makerom-v0.17-ubuntu_x86_64.zip
|
|
||||||
sudo chmod +x makerom
|
|
||||||
mv makerom /usr/local/bin
|
|
||||||
rm makerom-v0.17-ubuntu_x86_64.zip
|
|
||||||
- name: Build
|
|
||||||
id: build
|
|
||||||
run: |
|
|
||||||
make clean
|
|
||||||
make -j$(nproc --all)
|
|
||||||
mkdir -p ~/artifacts
|
|
||||||
cp DarkStore.3dsx ~/artifacts
|
|
||||||
cp DarkStore.cia ~/artifacts
|
|
||||||
make clean
|
|
||||||
make -j$(nproc --all) citra
|
|
||||||
cp DarkStore.3dsx ~/artifacts/DarkStore-Citra.3dsx
|
|
||||||
cp DarkStore.cia ~/artifacts/DarkStore-Citra.cia
|
|
||||||
echo ::set-output name=commit_tag::$(git describe --abbrev=0 --tags)
|
|
||||||
echo ::set-output name=commit_hash::$(git log --format=%h -1)
|
|
||||||
|
|
||||||
# Webhook info
|
|
||||||
echo "::set-output name=author_name::$(git log -1 $GITHUB_SHA --pretty=%aN)"
|
|
||||||
echo "::set-output name=committer_name::$(git log -1 $GITHUB_SHA --pretty=%cN)"
|
|
||||||
echo "::set-output name=commit_subject::$(git log -1 $GITHUB_SHA --pretty=%s)"
|
|
||||||
echo "::set-output name=commit_message::$(git log -1 $GITHUB_SHA --pretty=%b)"
|
|
||||||
- name: Publish build to GH Actions
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
path: ~/artifacts/*
|
|
||||||
name: build
|
|
||||||
|
|
||||||
# Only run this for non-PR jobs.
|
|
||||||
publish_build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Publish build to DarkStore/extras
|
|
||||||
if: ${{ success() && !startsWith(github.ref, 'refs/pull') }}
|
|
||||||
needs: build
|
|
||||||
env:
|
|
||||||
COMMIT_TAG: ${{ needs.build.outputs.commit_tag }}
|
|
||||||
COMMIT_HASH: ${{ needs.build.outputs.commit_hash }}
|
|
||||||
AUTHOR_NAME: ${{ needs.build.outputs.author_name }}
|
|
||||||
COMMIT_SUBJECT: ${{ needs.build.outputs.commit_subject }}
|
|
||||||
COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }}
|
|
||||||
outputs:
|
|
||||||
current_date: ${{ steps.commit.outputs.current_date }}
|
|
||||||
steps:
|
|
||||||
- name: Install tools
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install qrencode -y
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: build
|
|
||||||
path: build
|
|
||||||
- name: Upload to ${{ github.repository }} release
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags') }}
|
|
||||||
run: |
|
|
||||||
ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
|
|
||||||
for file in ${{ github.workspace }}/build/*; do
|
|
||||||
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
CONTENT_LENGTH="Content-Length: $(stat -c%s $file)"
|
|
||||||
CONTENT_TYPE="Content-Type: application/7z-x-compressed"
|
|
||||||
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=$(basename $file)"
|
|
||||||
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL"
|
|
||||||
done
|
|
||||||
- name: Commit and push to DarkStore-3DS/extras
|
|
||||||
id: commit
|
|
||||||
run: |
|
|
||||||
CURRENT_DATE=$(date +"%Y%m%d-%H%M%S")
|
|
||||||
echo ::set-output name=current_date::$CURRENT_DATE
|
|
||||||
git config --global user.email "bot@darkstore.com"
|
|
||||||
git config --global user.name "DarkStoreBot"
|
|
||||||
git clone --depth 1 https://${{ secrets.DSBOT_TOKEN }}@github.com/DarkStore-3DS/extras.git
|
|
||||||
mkdir -p extras/builds/DarkStore/
|
|
||||||
cd extras/builds/DarkStore/
|
|
||||||
qrencode -o DarkStore.png https://github.com/DarkStore-3DS/extras/raw/v$CURRENT_DATE/builds/DarkStore/DarkStore.cia
|
|
||||||
qrencode -o DarkStore-release.png https://github.com/DarkStore-3DS/DarkStore/releases/download/$COMMIT_TAG/DarkStore.cia
|
|
||||||
cp ${{ github.workspace }}/build/* .
|
|
||||||
git stage .
|
|
||||||
git commit -m "DarkStore | $COMMIT_HASH"
|
|
||||||
git tag v$CURRENT_DATE
|
|
||||||
git push origin master v$CURRENT_DATE
|
|
||||||
- name: Release to DarkStore-3DS/extras
|
|
||||||
run: |
|
|
||||||
AUTH_HEADER="Authorization: token ${{ secrets.DSBOT_TOKEN }}"
|
|
||||||
CONTENT_TYPE="Content-Type: application/json"
|
|
||||||
API_URL="https://api.github.com/repos/DarkStore-3DS/extras/releases"
|
|
||||||
RELEASE_INFO="{\"tag_name\": \"v${{ steps.commit.outputs.current_date }}\", \"name\": \"DarkStore | $COMMIT_HASH\", \"body\": \"$AUTHOR_NAME - $COMMIT_SUBJECT\n\n$COMMIT_MESSAGE\", \"prerelease\": true}"
|
|
||||||
RESPONSE=$(curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_TYPE" "$API_URL" -d "$RELEASE_INFO")
|
|
||||||
ID=$(echo $RESPONSE | jq --raw-output '.id')
|
|
||||||
for file in ${{ github.workspace }}/build/*; do
|
|
||||||
AUTH_HEADER="Authorization: token ${{ secrets.DSBOT_TOKEN }}"
|
|
||||||
CONTENT_LENGTH="Content-Length: $(stat -c%s $file)"
|
|
||||||
CONTENT_TYPE="Content-Type: application/7z-x-compressed"
|
|
||||||
UPLOAD_URL="https://uploads.github.com/repos/DarkStore-3DS/extras/releases/$ID/assets?name=$(basename $file)"
|
|
||||||
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL"
|
|
||||||
done
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
*.bin
|
*.bin
|
||||||
*.d
|
*.d
|
||||||
*.o
|
*.o
|
||||||
@@ -6,17 +5,7 @@
|
|||||||
*.elf
|
*.elf
|
||||||
*.cia
|
*.cia
|
||||||
*.3dsx
|
*.3dsx
|
||||||
*build
|
*/build
|
||||||
|
build/sprites.h
|
||||||
*.map
|
*.map
|
||||||
*.lst
|
*.lst
|
||||||
.vscode
|
|
||||||
*.DS_Store
|
|
||||||
romfs/gfx/*.t3x
|
|
||||||
include/version.hpp
|
|
||||||
cppcheck.log
|
|
||||||
|
|
||||||
bannertool*
|
|
||||||
makerom*
|
|
||||||
*.pfs0
|
|
||||||
*.nso
|
|
||||||
*.nacp
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[submodule "Universal-Core"]
|
|
||||||
path = Universal-Core
|
|
||||||
url = https://github.com/DarkStore-3DS/Universal-Core.git
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"cctype": "cpp",
|
||||||
|
"clocale": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"iostream": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"typeinfo": "cpp",
|
||||||
|
"valarray": "cpp",
|
||||||
|
"array": "cpp",
|
||||||
|
"atomic": "cpp",
|
||||||
|
"bit": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"forward_list": "cpp",
|
||||||
|
"map": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"vector": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"iterator": "cpp",
|
||||||
|
"memory_resource": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"optional": "cpp",
|
||||||
|
"random": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"system_error": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"type_traits": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"bitset": "cpp",
|
||||||
|
"chrono": "cpp",
|
||||||
|
"condition_variable": "cpp",
|
||||||
|
"ratio": "cpp",
|
||||||
|
"regex": "cpp",
|
||||||
|
"shared_mutex": "cpp"
|
||||||
|
},
|
||||||
|
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||||
|
"terminal.integrated.env.windows":
|
||||||
|
{
|
||||||
|
"MSYSTEM": "MINGW64",
|
||||||
|
//"MSYS2_PATH_TYPE": "inherit",
|
||||||
|
"MSVSCODE": "1"
|
||||||
|
},
|
||||||
|
|
||||||
|
"terminal.integrated.profiles.windows": {
|
||||||
|
|
||||||
|
"PowerShell": {
|
||||||
|
"source": "PowerShell",
|
||||||
|
"icon": "terminal-powershell"
|
||||||
|
},
|
||||||
|
"Test": {
|
||||||
|
"path": [
|
||||||
|
"C:\\sys64\\sys2_shell.exe"
|
||||||
|
],
|
||||||
|
"args": [],
|
||||||
|
"icon": "terminal-cmd"
|
||||||
|
},
|
||||||
|
"Command Prompt": {
|
||||||
|
"path": [
|
||||||
|
"${env:windir}\\Sysnative\\cmd.exe",
|
||||||
|
"${env:windir}\\System32\\cmd.exe"
|
||||||
|
],
|
||||||
|
"args": [],
|
||||||
|
"icon": "terminal-cmd"
|
||||||
|
},
|
||||||
|
"Git Bash": {
|
||||||
|
"source": "Git Bash"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
|
|||||||
state the exclusion of warranty; and each file should have at least
|
state the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
{one line to give the program's name and a brief idea of what it does.}
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) {year} {name of author}
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
If the program does terminal interaction, make it output a short
|
||||||
notice like this when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
{project} Copyright (C) {year} {fullname}
|
<program> Copyright (C) <year> <name of author>
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
|||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
<http://www.gnu.org/licenses/>.
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
The GNU General Public License does not permit incorporating your program
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
may consider it more useful to permit linking proprietary applications with
|
may consider it more useful to permit linking proprietary applications with
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License. But first, please read
|
Public License instead of this License. But first, please read
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
|
|||||||
@@ -2,41 +2,44 @@
|
|||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
DEVKITPRO=/opt/devkitpro
|
||||||
|
DEVKITARM=/opt/devkitpro/devkitARM
|
||||||
|
|
||||||
ifeq ($(strip $(DEVKITARM)),)
|
ifeq ($(strip $(DEVKITARM)),)
|
||||||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
|
$(error "Veuillez régler DEVKITARM dans votre environnement. export DEVKITARM = <chemin vers> devkitARM")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TOPDIR ?= $(CURDIR)
|
TOPDIR ?= $(CURDIR)
|
||||||
include $(DEVKITARM)/3ds_rules
|
include $(DEVKITARM)/3ds_rules
|
||||||
|
|
||||||
# ------------------------------------------------- --------------------------------
|
# ------------------------------------------------- --------------------------------
|
||||||
# TARGET is the name of the output
|
# TARGET est le nom de la sortie
|
||||||
# BUILD is the directory where object files & intermediate files will be placed
|
# BUILD est le répertoire dans lequel les fichiers objets et les fichiers intermédiaires seront placés
|
||||||
# SOURCES is a list of directories containing source code
|
# SOURCES est une liste de répertoires contenant le code source
|
||||||
# DATA is a list of directories containing data files
|
# DATA est une liste de répertoires contenant des fichiers de données
|
||||||
# INCLUDES is a list of directories containing header files
|
# INCLUDES est une liste de répertoires contenant des fichiers d'en-tête
|
||||||
# GRAPHICS is a list of directories containing graphics files
|
# GRAPHICS est une liste de répertoires contenant des fichiers graphiques
|
||||||
# GFXBUILD is the directory where converted graphics files will be placed
|
# GFXBUILD est le répertoire dans lequel les fichiers graphiques convertis seront placés
|
||||||
# If set to $(BUILD), it will statically link in the converted
|
# S'il est défini sur $ (BUILD), il sera lié statiquement dans le fichier converti
|
||||||
# files as if they were data files.
|
# fichiers comme s'il s'agissait de fichiers de données.
|
||||||
#
|
#
|
||||||
# NO_SMDH: if set to anything, no SMDH file is generated.
|
# NO_SMDH: s'il est défini sur quelque chose, aucun fichier SMDH n'est généré.
|
||||||
# ROMFS is the directory which contains the RomFS, relative to the Makefile (Optional)
|
# ROMFS est le répertoire qui contient le RomFS, relatif au Makefile (facultatif)
|
||||||
# APP_TITLE is the name of the app stored in the SMDH file (Optional)
|
# APP_TITLE est le nom de l'application stockée dans le fichier SMDH (facultatif)
|
||||||
# APP_DESCRIPTION is the description of the app stored in the SMDH file (Optional)
|
# APP_DESCRIPTION est la description de l'application stockée dans le fichier SMDH (facultatif)
|
||||||
# APP_AUTHOR is the author of the app stored in the SMDH file (Optional)
|
# APP_AUTHOR est l'auteur de l'application stockée dans le fichier SMDH (facultatif)
|
||||||
# ICON is the filename of the icon (.png), relative to the project folder.
|
# ICON est le nom de fichier de l'icône (.png), relatif au dossier du projet.
|
||||||
# If not set, it attempts to use one of the following (in this order):
|
# S'il n'est pas défini, il tente d'utiliser l'un des éléments suivants (dans cet ordre):
|
||||||
# - <Project name>.png
|
# - <Nom du projet> .png
|
||||||
# - icon.png
|
# - icon.png
|
||||||
# - <libctru folder>/default_icon.png
|
# - <dossier libctru> /default_icon.png
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# External tools
|
# Outils externes
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
MAKEROM ?= makerom.exe
|
MAKEROM ?= ../makerom.exe
|
||||||
BANNERTOOL ?= bannertool.exe
|
BANNERTOOL ?= ../bannertool.exe
|
||||||
|
|
||||||
else
|
else
|
||||||
MAKEROM ?= makerom
|
MAKEROM ?= makerom
|
||||||
@@ -46,25 +49,11 @@ endif
|
|||||||
|
|
||||||
CURRENT_VERSION := $(shell git describe --abbrev=0 --tags)
|
CURRENT_VERSION := $(shell git describe --abbrev=0 --tags)
|
||||||
|
|
||||||
GIT_TAG := $(shell git describe --abbrev=0 --tags)
|
# Si sur un commit taggé, utilisez le tag au lieu du commit
|
||||||
GIT_SHA := $(shell git rev-parse --short=7 HEAD)
|
|
||||||
|
|
||||||
# If on a tagged commit, use just the tag
|
|
||||||
ifneq ($(shell echo $(shell git tag -l --points-at HEAD) | head -c 1),)
|
ifneq ($(shell echo $(shell git tag -l --points-at HEAD) | head -c 1),)
|
||||||
GIT_VER := $(GIT_TAG)
|
GIT_VER := $(shell git tag -l --points-at HEAD)
|
||||||
else
|
else
|
||||||
GIT_VER := $(GIT_TAG)-$(GIT_SHA)
|
GIT_VER := $(shell git describe --abbrev=0 --tags)-$(shell git rev-parse --short HEAD)
|
||||||
endif
|
|
||||||
|
|
||||||
# Ensure version.hpp exists
|
|
||||||
ifeq (,$(wildcard include/version.hpp))
|
|
||||||
$(shell mkdir -p include)
|
|
||||||
$(shell touch include/version.hpp)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Print new version if changed
|
|
||||||
ifeq (,$(findstring $(GIT_VER), $(shell cat include/version.hpp)))
|
|
||||||
$(shell printf "#ifndef VERSION_HPP\n#define VERSION_HPP\n\n#define VER_NUMBER \"$(GIT_VER)\"\n#define GIT_SHA \"$(GIT_SHA)\"\n\n#endif\n" > include/version.hpp)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -100,42 +89,43 @@ INCLUDES := $(UNIVCORE) include include/download include/gui include/lang includ
|
|||||||
GRAPHICS := assets/gfx
|
GRAPHICS := assets/gfx
|
||||||
ROMFS := romfs
|
ROMFS := romfs
|
||||||
GFXBUILD := $(ROMFS)/gfx
|
GFXBUILD := $(ROMFS)/gfx
|
||||||
APP_AUTHOR := Dark98
|
APP_AUTHOR := Dark98, Universal Team
|
||||||
APP_DESCRIPTION := A simple 3DS software downloader
|
APP_DESCRIPTION := An Alternative eShop for Nintendo 3DS
|
||||||
ICON := app/icon.png
|
ICON := app/icon.png
|
||||||
BNR_IMAGE := app/banner.png
|
BNR_IMAGE := app/banner.png
|
||||||
BNR_AUDIO := app/BannerAudio.wav
|
BNR_AUDIO := app/BannerAudio.wav
|
||||||
RSF_FILE := app/build-cia.rsf
|
RSF_FILE := app/build-cia.rsf
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options de génération de code
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
|
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
|
||||||
|
|
||||||
CFLAGS := -g -Wall -Wno-psabi -O2 -mword-relocations \
|
CFLAGS := -g -Wall -Wno-psabi -O2 -mword-relocations \
|
||||||
|
-DV_STRING=\"$(GIT_VER)\" \
|
||||||
-DC_V=\"$(CURRENT_VERSION)\" \
|
-DC_V=\"$(CURRENT_VERSION)\" \
|
||||||
-fomit-frame-pointer -ffunction-sections \
|
-fomit-frame-pointer -ffunction-sections \
|
||||||
$(ARCH)
|
$(ARCH)
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE) -D__3DS__ -D_GNU_SOURCE=1
|
CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE=1
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17 $(CITRA)
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH)
|
||||||
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||||
|
|
||||||
LIBS := -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -larchive -lbz2 -llzma -lz -lcitro2d -lcitro3d -lctru -lstdc++
|
LIBS := -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -larchive -lbz2 -llzma -lm -lz -lcitro2d -lcitro3d -lctru -lstdc++
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# liste de répertoires contenant des bibliothèques, ce doit être le niveau supérieur contenant
|
||||||
# include and lib
|
# include et lib
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBDIRS := $(CURDIR)/libs $(PORTLIBS) $(CTRULIB)
|
LIBDIRS := $(PORTLIBS) $(CTRULIB)
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# no real need to edit anything past this point unless you need to add additional
|
# pas vraiment besoin de modifier quoi que ce soit au-delà de ce point, sauf si vous devez ajouter des
|
||||||
# rules for different file extensions
|
# règles pour différentes extensions de fichiers
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -158,7 +148,7 @@ GFXFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.t3s)))
|
|||||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# use CXX for linking C++ projects, CC for standard C
|
# utiliser CXX pour lier des projets C ++, CC pour le C standard
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ifeq ($(strip $(CPPFILES)),)
|
ifeq ($(strip $(CPPFILES)),)
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -223,25 +213,21 @@ ifneq ($(ROMFS),)
|
|||||||
export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
|
export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all citra clean cppcheck
|
.PHONY: all clean
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
|
all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
|
||||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
citra: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
|
|
||||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile CITRA=-DCITRA
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
@rm -fr $(BUILD) $(TARGET).3dsx
|
@rm -fr DarkStore.elf
|
||||||
@rm -fr $(BUILD) $(TARGET).cia
|
@rm -fr DarkStore.cia
|
||||||
@rm -fr $(BUILD) $(TARGET).elf
|
@rm -fr DarkStore.3dsx
|
||||||
@rm -fr $(BUILD) $(TARGET).smdh
|
@rm -fr DarkStore.smdh
|
||||||
@mkdir -p build
|
@rm -fr $(OUTDIR)
|
||||||
|
@rm -fr $(BUILD)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
cia: $(BUILD)
|
cia: $(BUILD)
|
||||||
@@ -265,21 +251,21 @@ $(BUILD):
|
|||||||
else
|
else
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# main targets
|
# cibles principales
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
all: $(OUTPUT).cia $(OUTPUT).elf $(OUTPUT).3dsx
|
all: $(OUTPUT).cia $(OUTPUT).elf $(OUTPUT).3dsx
|
||||||
|
|
||||||
$(OUTPUT).elf : $(OFILES)
|
$(OUTPUT).elf : $(OFILES)
|
||||||
|
|
||||||
$(OUTPUT).cia : $(OUTPUT).elf $(OUTPUT).smdh
|
$(OUTPUT).cia : $(OUTPUT).elf $(OUTPUT).smdh
|
||||||
@$(BANNERTOOL) makebanner -i "../app/banner.png" -a "../app/BannerAudio.wav" -o "../app/banner.bin"
|
$(BANNERTOOL) makebanner -i "../app/banner.png" -a "../app/BannerAudio.wav" -o "../app/banner.bin"
|
||||||
|
|
||||||
@$(BANNERTOOL) makesmdh -i "../app/icon.png" -s "$(TARGET)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -o "../app/icon.bin" \
|
$(BANNERTOOL) makesmdh -i "../app/icon.png" -s "$(TARGET)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -o "../app/icon.bin" \
|
||||||
--flags visible,ratingrequired,recordusage --cero 153 --esrb 153 --usk 153 --pegigen 153 --pegiptr 153 --pegibbfc 153 --cob 153 --grb 153 --cgsrr 153
|
--flags visible,ratingrequired,recordusage --cero 153 --esrb 153 --usk 153 --pegigen 153 --pegiptr 153 --pegibbfc 153 --cob 153 --grb 153 --cgsrr 153
|
||||||
|
|
||||||
@$(MAKEROM) -f cia -target t -exefslogo -o "../$(TARGET).cia" -elf "../$(TARGET).elf" -rsf "../app/build-cia.rsf" -banner "../app/banner.bin" -icon "../app/icon.bin" -logo "../app/logo.bcma.lz" -DAPP_ROMFS="$(TOPDIR)/$(ROMFS)" -major $(VERSION_MAJOR) -minor $(VERSION_MINOR) -micro $(VERSION_MICRO) -DAPP_VERSION_MAJOR="$(VERSION_MAJOR)"
|
$(MAKEROM) -f cia -target t -exefslogo -o "../$(TARGET).cia" -elf "../$(TARGET).elf" -rsf "../app/build-cia.rsf" -banner "../app/banner.bin" -icon "../app/icon.bin" -logo "../app/logo.bcma.lz" -DAPP_ROMFS="$(TOPDIR)/$(ROMFS)" -major $(VERSION_MAJOR) -minor $(VERSION_MINOR) -DAPP_VERSION_MAJOR="$(VERSION_MAJOR)"
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# you need a rule like this for each extension you use as binary data
|
# vous avez besoin d'une règle comme celle-ci pour chaque extension que vous utilisez comme données binaires
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
%.bin.o %_bin.h : %.bin
|
%.bin.o %_bin.h : %.bin
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -295,7 +281,7 @@ $(OUTPUT).cia : $(OUTPUT).elf $(OUTPUT).smdh
|
|||||||
@$(bin2o)
|
@$(bin2o)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# rules for assembling GPU shaders
|
# règles d'assemblage de shaders GPU
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
define shader-as
|
define shader-as
|
||||||
$(eval CURBIN := $*.shbin)
|
$(eval CURBIN := $*.shbin)
|
||||||
@@ -331,8 +317,3 @@ endef
|
|||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
endif
|
endif
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
cppcheck:
|
|
||||||
@rm -f cppcheck.log
|
|
||||||
@cppcheck . --enable=all $(INCLUDE) -UJSON_CATCH_USER -U_Check_return_ -U_MSC_VER -U_Ret_notnull_ -U__INTEL_COMPILER -U__PGI -U__SUNPRO_CC -UJSON_INTERNAL_CATCH_USER -UJSON_THROW_USER -UJSON_TRY_USER -U__IBMCPP__ -U__SUNPRO_CC -D__GNUC__=9 -D__GNUC_MINOR__=1 -DNULL=nullptr --force 2> cppcheck.log
|
|
||||||
@echo cppcheck.log file created...
|
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<a href="https://ds.dark98.co.uk"><img src="https://ds.dark98.co.uk/images/banner.png"></a><br>
|
|
||||||
<b>An easy to use app for downloading game backups</b><br>
|
|
||||||
<a href="https://github.com/DarkStore-3DS/DarkStore/actions?query=workflow%3A%22Build+DarkStore%22" style="padding-left: 5px; padding-right: 5px;">
|
|
||||||
<img src="https://github.com/DarkStore-3DS/DarkStore/workflows/Build%20DarkStore/badge.svg" height="20" alt="Build status on GitHub Actions">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
WE DO NOT SUPPORT PIRACY! This Homebrew is for people who dont have access to the tools needed to dump their copy of the game.
|
|
||||||
|
|
||||||
|
|
||||||
DarkStore is a homebrew application for the Nintendo 3DS with the intention to make downloading game backups easy. No need to manually copy files or go through installation processes, as it does that all for you.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- A store format with a concept similar to the Cydia Repositories
|
|
||||||
- The default is [DarkStore-Homebrew](https://ds.dark98.co.uk/store_content.php?store=homebrew)
|
|
||||||
- Want to add more? Go to settings, choose "Select Store", click the + icon and select one from the list, enter a URL, or scan a QR code
|
|
||||||
- Customization in sorting and display
|
|
||||||
- Several sorting keys: "Title", "Author", and "Last Updated"
|
|
||||||
- Direction can be Ascending or Descending
|
|
||||||
- App display can be shown in either a grid or rows
|
|
||||||
- Background downloads so you can keep using the rest of the app while downloading
|
|
||||||
- Searching and markings to make finding games easy
|
|
||||||
- Viewing screenshots and release notes for games
|
|
||||||
- Translations planned(Currently Only Supports English!)
|
|
||||||
- To request a new language, join our [Discord Server](https://discord.com/invite/eFE6ZqpczY) or contact a project manager on Crowdin
|
|
||||||
|
|
||||||
|
|
||||||
## Compilation
|
|
||||||
|
|
||||||
### Setting up your environment
|
|
||||||
|
|
||||||
To build DarkStore from source, you will need to install devkitARM and some libraries. Follow devkitPro's [Getting Started](https://devkitpro.org/wiki/Getting_Started) page to install pacman, then run the following command to install everything you need:
|
|
||||||
```
|
|
||||||
(sudo dkp-)pacman -S 3ds-dev 3ds-curl 3ds-bzip2 3ds-liblzma
|
|
||||||
```
|
|
||||||
(The `sudo dkp-` may not be needed depending on your OS)
|
|
||||||
|
|
||||||
You will also need [bannertool](https://github.com/Steveice10/bannertool/releases/latest) and [makerom](https://github.com/profi200/Project_CTR/releases/latest) in your PATH.
|
|
||||||
|
|
||||||
### Cloning the repository
|
|
||||||
|
|
||||||
To download the source you will need to clone the repository with submodules, this can be done by running:
|
|
||||||
```
|
|
||||||
git clone --recursive https://github.com/DarkStore-3DS/DarkStore.git
|
|
||||||
```
|
|
||||||
|
|
||||||
If you've already cloned it, you can use the following command to update all of the submodules:
|
|
||||||
```
|
|
||||||
git submodule update --init --recursive
|
|
||||||
```
|
|
||||||
|
|
||||||
### Building
|
|
||||||
|
|
||||||
Once you've cloned the repository (with submodules), simply run `make` in the root of the repository.
|
|
||||||
|
|
||||||
If you're testing in Citra, run `make citra` instead of just `make` to disable the Wi-Fi check. (Note: `source/utils/download.cpp` must be rebuilt for this to take affect, save the file if it's already been built)
|
|
||||||
|
|
||||||
## DarkStore Credits
|
|
||||||
- [Dark98](https://github.com/Dark98) - Lead developer
|
|
||||||
|
|
||||||
## Universal-Updater Credits
|
|
||||||
|
|
||||||
- [SuperSaiyajinStackZ](https://github.com/SuperSaiyajinStackZ) - Lead developer, reworked quirc to C++
|
|
||||||
- [Pk11](https://github.com/Epicpkmn11) - Mockup Designer, Website Maintainer
|
|
||||||
- [NightScript](https://github.com/NightYoshi370) - Concept Creator & Planner
|
|
||||||
- [dlbeer](https://github.com/dlbeer) - Original developer of [quirc](https://github.com/dlbeer/quirc)
|
|
||||||
- [FlagBrew](https://github.com/FlagBrew): Original QR Code Scanner code
|
|
||||||
- [Icons8](https://icons8.com/): Icon Designer
|
|
||||||
- [lvandeve](https://github.com/lvandeve): For [LodePNG](https://github.com/lvandeve/lodepng)
|
|
||||||
- [PabloMK7](https://github.com/mariohackandglitch): Download Code Improvements
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"string": "cpp"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) 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; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Universal-Core by Universal-Team
|
||||||
|
This contains the GUI & Core part for our 3DS Applications.
|
||||||
|
|
||||||
|
Logo created by: [TotallyNotGuy](https://github.com/TotallyNotGuy).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Licensing:
|
||||||
|
This software is licensed under the terms of the GPLv3. You can find a copy of the license in the LICENSE file.
|
||||||
@@ -0,0 +1,501 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Core
|
||||||
|
* Copyright (C) 2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "gui.hpp"
|
||||||
|
#include "screenCommon.hpp"
|
||||||
|
|
||||||
|
#include <3ds.h>
|
||||||
|
#include <stack>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
C3D_RenderTarget *Top, *TopRight, *Bottom;
|
||||||
|
|
||||||
|
C2D_TextBuf TextBuf;
|
||||||
|
C2D_Font Font;
|
||||||
|
std::unique_ptr<Screen> usedScreen, tempScreen; // tempScreen used for "fade" effects.
|
||||||
|
std::stack<std::unique_ptr<Screen>> screens;
|
||||||
|
bool currentScreen = false;
|
||||||
|
bool fadeout = false, fadein = false, fadeout2 = false, fadein2 = false;
|
||||||
|
int fadealpha = 0;
|
||||||
|
int fadecolor = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Clear the Text Buffer.
|
||||||
|
*/
|
||||||
|
void Gui::clearTextBufs(void) { C2D_TextBufClear(TextBuf); };
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a sprite from the sheet.
|
||||||
|
|
||||||
|
C2D_SpriteSheet sheet: The SpriteSheet.
|
||||||
|
size_t imgindex: The image index.
|
||||||
|
int x: The X-Position where to draw the sprite.
|
||||||
|
int y: The Y-Position where to draw the sprite.
|
||||||
|
float ScaleX: The X-Scale of the sprite.
|
||||||
|
float ScaleY: The Y-Scale of the sprite.
|
||||||
|
|
||||||
|
If the spritesheet is nullptr or image index goes out of scope, this doesn't do anything.
|
||||||
|
*/
|
||||||
|
void Gui::DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX, float ScaleY) {
|
||||||
|
if (sheet) {
|
||||||
|
if (C2D_SpriteSheetCount(sheet) >= imgindex) {
|
||||||
|
C2D_DrawImageAt(C2D_SpriteSheetGetImage(sheet, imgindex), x, y, 0.5f, nullptr, ScaleX, ScaleY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Initialize the GUI.
|
||||||
|
|
||||||
|
Contains initializing Citro2D, Citro3D and the screen targets.
|
||||||
|
Call this when initing the app.
|
||||||
|
*/
|
||||||
|
Result Gui::init(void) {
|
||||||
|
C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
|
||||||
|
C2D_Init(C2D_DEFAULT_MAX_OBJECTS);
|
||||||
|
C2D_Prepare();
|
||||||
|
|
||||||
|
/* Create Screen Targets. */
|
||||||
|
Top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
|
||||||
|
TopRight = C2D_CreateScreenTarget(GFX_TOP, GFX_RIGHT);
|
||||||
|
Bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT);
|
||||||
|
|
||||||
|
/* Load Textbuffer. */
|
||||||
|
TextBuf = C2D_TextBufNew(4096);
|
||||||
|
Font = C2D_FontLoadSystem(CFG_REGION_USA); // Load System font.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Load a bcfnt font.
|
||||||
|
|
||||||
|
C2D_Font &fnt: The reference to the C2D_Font variable.
|
||||||
|
const char *Path: The path to the file.
|
||||||
|
*/
|
||||||
|
Result Gui::loadFont(C2D_Font &fnt, const char *Path) {
|
||||||
|
if (access(Path, F_OK) == 0) fnt = C2D_FontLoad(Path); // Only load if found.
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Unload a Font.
|
||||||
|
|
||||||
|
C2D_Font &fnt: The reference to the C2D_Font variable.
|
||||||
|
*/
|
||||||
|
Result Gui::unloadFont(C2D_Font &fnt) {
|
||||||
|
if (fnt) C2D_FontFree(fnt); // Make sure to only unload if not nullptr.
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Load a t3x SpriteSheet.
|
||||||
|
|
||||||
|
const char *Path: The path to the file.
|
||||||
|
C2D_SpriteSheet &sheet: The reference to the C2D_SpriteSheet variable.
|
||||||
|
*/
|
||||||
|
Result Gui::loadSheet(const char *Path, C2D_SpriteSheet &sheet) {
|
||||||
|
if (access(Path, F_OK) == 0) sheet = C2D_SpriteSheetLoad(Path); // Only load if found.
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Unload a SpriteSheet.
|
||||||
|
|
||||||
|
C2D_SpriteSheet &sheet: The reference to the C2D_SpriteSheet variable.
|
||||||
|
*/
|
||||||
|
Result Gui::unloadSheet(C2D_SpriteSheet &sheet) {
|
||||||
|
if (sheet) C2D_SpriteSheetFree(sheet); // Make sure to only unload if not nullptr.
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Exit the GUI.
|
||||||
|
|
||||||
|
Contains deinitializing Citro2D, Citro3D and clearing the textbuffer.
|
||||||
|
Call this when exiting the app.
|
||||||
|
*/
|
||||||
|
void Gui::exit(void) {
|
||||||
|
C2D_TextBufDelete(TextBuf);
|
||||||
|
C2D_Fini();
|
||||||
|
C3D_Fini();
|
||||||
|
if (usedScreen) usedScreen = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Reinitialize the GUI.
|
||||||
|
*/
|
||||||
|
Result Gui::reinit(void) {
|
||||||
|
C2D_TextBufDelete(TextBuf);
|
||||||
|
C2D_Fini();
|
||||||
|
C3D_Fini();
|
||||||
|
|
||||||
|
return Gui::init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a Centered String.
|
||||||
|
|
||||||
|
float x: The X-Addition offset for the position from 200 (top) or 160 (bottom).
|
||||||
|
float y: The Y-Position where to draw.
|
||||||
|
float size: The size for the Font.
|
||||||
|
u32 color: The Text Color.
|
||||||
|
std::string Text: The Text which should be drawn.
|
||||||
|
int maxWidth: (Optional) The max width of the Text.
|
||||||
|
int maxHeight: (Optional) The max height of the Text.
|
||||||
|
C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
|
||||||
|
int flags: (Optional) C2D text flags to use.
|
||||||
|
*/
|
||||||
|
void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt, int flags) {
|
||||||
|
Gui::DrawString(x +(currentScreen ? 200 : 160), y, size, color, Text, maxWidth, maxHeight, fnt, flags | C2D_AlignCenter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a String.
|
||||||
|
|
||||||
|
float x: The X-Position where to draw.
|
||||||
|
float y: The Y-Position where to draw.
|
||||||
|
float size: The size for the Font.
|
||||||
|
u32 color: The Text Color.
|
||||||
|
std::string Text: The Text which should be drawn.
|
||||||
|
int maxWidth: (Optional) The max width of the Text.
|
||||||
|
int maxHeight: (Optional) The max height of the Text.
|
||||||
|
C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
|
||||||
|
int flags: (Optional) C2D text flags to use.
|
||||||
|
*/
|
||||||
|
void Gui::DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt, int flags) {
|
||||||
|
C2D_Text c2d_text;
|
||||||
|
|
||||||
|
if (fnt) C2D_TextFontParse(&c2d_text, fnt, TextBuf, Text.c_str());
|
||||||
|
else C2D_TextFontParse(&c2d_text, Font, TextBuf, Text.c_str());
|
||||||
|
|
||||||
|
C2D_TextOptimize(&c2d_text);
|
||||||
|
|
||||||
|
float heightScale;
|
||||||
|
|
||||||
|
if (maxHeight == 0) {
|
||||||
|
heightScale = size;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (fnt) heightScale = std::min(size, size*(maxHeight/Gui::GetStringHeight(size, Text, fnt)));
|
||||||
|
else heightScale = std::min(size, size*(maxHeight/Gui::GetStringHeight(size, Text)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxWidth == 0) {
|
||||||
|
C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, size, heightScale, color);
|
||||||
|
} else if (flags & C2D_WordWrap) {
|
||||||
|
C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, size, heightScale, color, (float)maxWidth);
|
||||||
|
} else {
|
||||||
|
if (fnt) C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text, fnt))), heightScale, color);
|
||||||
|
else C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text))), heightScale, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get String or Text Width.
|
||||||
|
|
||||||
|
float size: The Textsize.
|
||||||
|
std::string Text: The Text.
|
||||||
|
C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
|
||||||
|
*/
|
||||||
|
float Gui::GetStringWidth(float size, std::string Text, C2D_Font fnt) {
|
||||||
|
float width = 0;
|
||||||
|
|
||||||
|
if (fnt) GetStringSize(size, &width, NULL, Text, fnt);
|
||||||
|
else GetStringSize(size, &width, NULL, Text);
|
||||||
|
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get String or Text Size.
|
||||||
|
|
||||||
|
float size: The Textsize.
|
||||||
|
float *width: Pointer where to store the width.
|
||||||
|
float *height: Pointer where to store the height.
|
||||||
|
std::string Text: The Text.
|
||||||
|
C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
|
||||||
|
*/
|
||||||
|
void Gui::GetStringSize(float size, float *width, float *height, std::string Text, C2D_Font fnt) {
|
||||||
|
C2D_Text c2d_text;
|
||||||
|
|
||||||
|
if (fnt) C2D_TextFontParse(&c2d_text, fnt, TextBuf, Text.c_str());
|
||||||
|
else C2D_TextFontParse(&c2d_text, Font, TextBuf, Text.c_str());
|
||||||
|
|
||||||
|
C2D_TextGetDimensions(&c2d_text, size, size, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get String or Text Height.
|
||||||
|
|
||||||
|
float size: The Textsize.
|
||||||
|
std::string Text: The Text.
|
||||||
|
C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
|
||||||
|
*/
|
||||||
|
float Gui::GetStringHeight(float size, std::string Text, C2D_Font fnt) {
|
||||||
|
float height = 0;
|
||||||
|
|
||||||
|
if (fnt) GetStringSize(size, NULL, &height, Text.c_str(), fnt);
|
||||||
|
else GetStringSize(size, NULL, &height, Text.c_str());
|
||||||
|
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a Rectangle.
|
||||||
|
|
||||||
|
float x: The X-Position where to draw.
|
||||||
|
float y: The Y-Position where to draw.
|
||||||
|
float w: The width of the rectangle.
|
||||||
|
float h: The height of the rectangle.
|
||||||
|
u32 color: The color.
|
||||||
|
*/
|
||||||
|
bool Gui::Draw_Rect(float x, float y, float w, float h, u32 color) {
|
||||||
|
return C2D_DrawRectSolid(x, y, 0.5f, w, h, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw's the current screen's draw.
|
||||||
|
|
||||||
|
bool stack: If using the stack-screens or not.
|
||||||
|
*/
|
||||||
|
void Gui::DrawScreen(bool stack) {
|
||||||
|
if (!stack) {
|
||||||
|
if (usedScreen) usedScreen->Draw();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!screens.empty()) screens.top()->Draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Do the current screen's logic.
|
||||||
|
|
||||||
|
u32 hDown: The hidKeysDown() variable.
|
||||||
|
u32 hHeld: The hidKeysHeld() variable.
|
||||||
|
touchPosition touch: The touchPosition variable.
|
||||||
|
bool waitFade: If waiting for the fade until control of the screen or not.
|
||||||
|
bool stack: If using the stack-screens.
|
||||||
|
*/
|
||||||
|
void Gui::ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade, bool stack) {
|
||||||
|
if (waitFade) {
|
||||||
|
if (!fadein && !fadeout && !fadein2 && !fadeout2) {
|
||||||
|
if (!stack) if (usedScreen) usedScreen->Logic(hDown, hHeld, touch);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!screens.empty()) screens.top()->Logic(hDown, hHeld, touch);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!stack) {
|
||||||
|
if (usedScreen) usedScreen->Logic(hDown, hHeld, touch);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!screens.empty()) screens.top()->Logic(hDown, hHeld, touch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Move's the tempScreen to the used one.
|
||||||
|
|
||||||
|
bool stack: If using the stack-screens or not.
|
||||||
|
*/
|
||||||
|
void Gui::transferScreen(bool stack) {
|
||||||
|
if (!stack) {
|
||||||
|
if (tempScreen) usedScreen = std::move(tempScreen);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (tempScreen) screens.push(std::move(tempScreen));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Set the current Screen.
|
||||||
|
|
||||||
|
std::unique_ptr<Screen> screen: The screen class.
|
||||||
|
bool fade: If doing a fade effect or not.
|
||||||
|
bool stack: If using the stack-screens or not.
|
||||||
|
*/
|
||||||
|
void Gui::setScreen(std::unique_ptr<Screen> screen, bool fade, bool stack) {
|
||||||
|
tempScreen = std::move(screen);
|
||||||
|
|
||||||
|
/* Switch screen without fade. */
|
||||||
|
if (!fade) {
|
||||||
|
Gui::transferScreen(stack);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/* Fade, then switch. */
|
||||||
|
fadeout = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Fade's the screen in and out and transfer the screen.
|
||||||
|
Credits goes to RocketRobz & SavvyManager.
|
||||||
|
|
||||||
|
int fadeoutFrames: The fadeout frames.
|
||||||
|
int fadeinFrames: The fadein frames.
|
||||||
|
bool stack: If using the stack-screens or not. (Used to properly transfer screens).
|
||||||
|
*/
|
||||||
|
void Gui::fadeEffects(int fadeoutFrames, int fadeinFrames, bool stack) {
|
||||||
|
if (fadein) {
|
||||||
|
fadealpha -= fadeinFrames;
|
||||||
|
|
||||||
|
if (fadealpha < 0) {
|
||||||
|
fadealpha = 0;
|
||||||
|
fadecolor = 255;
|
||||||
|
fadein = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stack) {
|
||||||
|
if (fadein2) {
|
||||||
|
fadealpha -= fadeinFrames;
|
||||||
|
|
||||||
|
if (fadealpha < 0) {
|
||||||
|
fadealpha = 0;
|
||||||
|
fadecolor = 255;
|
||||||
|
fadein2 = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fadeout) {
|
||||||
|
fadealpha += fadeoutFrames;
|
||||||
|
|
||||||
|
if (fadealpha > 255) {
|
||||||
|
fadealpha = 255;
|
||||||
|
Gui::transferScreen(stack); // Transfer Temp screen to the stack / used one.
|
||||||
|
fadein = true;
|
||||||
|
fadeout = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stack) {
|
||||||
|
if (fadeout2) {
|
||||||
|
fadealpha += fadeoutFrames;
|
||||||
|
|
||||||
|
if (fadealpha > 255) {
|
||||||
|
fadealpha = 255;
|
||||||
|
Gui::screenBack2(); // Go screen back.
|
||||||
|
fadein2 = true;
|
||||||
|
fadeout2 = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Go a screen back. (Stack only!)
|
||||||
|
|
||||||
|
bool fade: If doing a fade or not.
|
||||||
|
*/
|
||||||
|
void Gui::screenBack(bool fade) {
|
||||||
|
if (!fade) {
|
||||||
|
if (screens.size() > 0) screens.pop();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (screens.size() > 0) fadeout2 = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Gui::screenBack2() { if (screens.size() > 0) screens.pop(); };
|
||||||
|
|
||||||
|
/*
|
||||||
|
Select, on which Screen should be drawn.
|
||||||
|
|
||||||
|
C3D_RenderTarget *screen: The render target.
|
||||||
|
*/
|
||||||
|
void Gui::ScreenDraw(C3D_RenderTarget *screen) {
|
||||||
|
C2D_SceneBegin(screen);
|
||||||
|
currentScreen = (screen == Top || screen == TopRight) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a grid.
|
||||||
|
|
||||||
|
float xPos: The X-Position of the grid.
|
||||||
|
float yPos: The Y-Position of the grid.
|
||||||
|
float Width: The width of the grid.
|
||||||
|
float Height: The height of the grid.
|
||||||
|
u32 color: The color of the grid.
|
||||||
|
u32 bgColor: The BG Color of the grid.
|
||||||
|
*/
|
||||||
|
void Gui::drawGrid(float xPos, float yPos, float Width, float Height, u32 color, u32 bgColor) {
|
||||||
|
static constexpr int w = 1;
|
||||||
|
|
||||||
|
/* BG Color for the Grid. (Transparent by default.) */
|
||||||
|
Gui::Draw_Rect(xPos, yPos, Width, Height, bgColor);
|
||||||
|
|
||||||
|
/* Grid part, Top. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos, Width, w, color);
|
||||||
|
/* Left. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos + w, w, Height - 2 * w, color);
|
||||||
|
/* Right. */
|
||||||
|
Gui::Draw_Rect(xPos + Width - w, yPos + w, w, Height - 2 * w, color);
|
||||||
|
/* Bottom. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos + Height - w, Width, w, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw an animated selector.
|
||||||
|
|
||||||
|
float xPos: The X-Position of the selector.
|
||||||
|
float yPos: The Y-Position of the selector.
|
||||||
|
float Width: The width of the selector.
|
||||||
|
float Height: The height of the selector.
|
||||||
|
float speed: The selector animation speed. Use .030f or so.
|
||||||
|
u32 SelectorColor: The selector fade color.
|
||||||
|
u32 bgColor: The selector BG color.
|
||||||
|
*/
|
||||||
|
void Gui::drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 SelectorColor, u32 bgColor) {
|
||||||
|
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 = SelectorColor & 0xFF;
|
||||||
|
u8 g = (SelectorColor >> 8) & 0xFF;
|
||||||
|
u8 b = (SelectorColor >> 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. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos, Width, Height, bgColor);
|
||||||
|
|
||||||
|
/* Selector part, Top. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos, Width, w, color);
|
||||||
|
/* Left. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos + w, w, Height - 2 * w, color);
|
||||||
|
/* Right. */
|
||||||
|
Gui::Draw_Rect(xPos + Width - w, yPos + w, w, Height - 2 * w, color);
|
||||||
|
/* Bottom. */
|
||||||
|
Gui::Draw_Rect(xPos, yPos + Height - w, Width, w, color);
|
||||||
|
|
||||||
|
timer += speed;
|
||||||
|
}
|
||||||
@@ -0,0 +1,246 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Core
|
||||||
|
* Copyright (C) 2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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 _UNIVERSAL_CORE_GUI_HPP
|
||||||
|
#define _UNIVERSAL_CORE_GUI_HPP
|
||||||
|
|
||||||
|
#include "screen.hpp"
|
||||||
|
|
||||||
|
#include <3ds.h>
|
||||||
|
#include <citro2d.h>
|
||||||
|
#include <citro3d.h>
|
||||||
|
|
||||||
|
namespace Gui {
|
||||||
|
/*
|
||||||
|
Clear the Text Buffer.
|
||||||
|
*/
|
||||||
|
void clearTextBufs(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a sprite from a SpriteSheet.
|
||||||
|
sheet: The SpriteSheet which should be used.
|
||||||
|
imgIndex: The index of the sprite from the sheet which should be drawn.
|
||||||
|
x: The X Position where the sprite should be drawn.
|
||||||
|
y: The Y Position where the sprite should be drawn.
|
||||||
|
ScaleX: The X-Scale for the sprite. (Optional!)
|
||||||
|
ScaleY: The Y-Scale for the sprite. (Optional!)
|
||||||
|
*/
|
||||||
|
void DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Initialize the GUI with Citro2D & Citro3D and initialize the Textbuffer.
|
||||||
|
call this when initializing.
|
||||||
|
*/
|
||||||
|
Result init(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Load a Font. (BCFNT)
|
||||||
|
|
||||||
|
fnt: The C2D_Font variable which should be initialized.
|
||||||
|
Path: Path to the BCFNT file.
|
||||||
|
if you're unsure, just call 'Gui::init();' and it will load the system font.
|
||||||
|
*/
|
||||||
|
Result loadFont(C2D_Font &fnt, const char *Path = "");
|
||||||
|
|
||||||
|
/*
|
||||||
|
Unload a Font. (BCFNT)
|
||||||
|
|
||||||
|
fnt: The C2D_Font variable which should be unloaded.
|
||||||
|
*/
|
||||||
|
Result unloadFont(C2D_Font &fnt);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Load a spritesheet.
|
||||||
|
|
||||||
|
Path: Path to the SpriteSheet file. (T3X)
|
||||||
|
sheet: Reference to the C2D_SpriteSheet declaration.
|
||||||
|
*/
|
||||||
|
Result loadSheet(const char *Path, C2D_SpriteSheet &sheet);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Unload a spritesheet.
|
||||||
|
|
||||||
|
sheet: Reference to the C2D_SpriteSheet which should be free'd.
|
||||||
|
*/
|
||||||
|
Result unloadSheet(C2D_SpriteSheet &sheet);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Exit the GUI.
|
||||||
|
Call this at exit.
|
||||||
|
*/
|
||||||
|
void exit(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Reinit the GUI.
|
||||||
|
*/
|
||||||
|
Result reinit(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draws a centered String.
|
||||||
|
x: The X Offset from center. (Center: 200 px on top, 160 px on Bottom.)
|
||||||
|
y: The Y Position of the Text.
|
||||||
|
size: The size of the Text.
|
||||||
|
color: The Color of the Text.
|
||||||
|
Text: The Text which should be displayed.
|
||||||
|
maxWidth: The maxWidth for the Text. (Optional!)
|
||||||
|
maxHeight: The maxHeight of the Text. (Optional!)
|
||||||
|
fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
|
||||||
|
int flags: C2D text flags to use. (Optional!)
|
||||||
|
*/
|
||||||
|
void DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0, int maxHeight = 0, C2D_Font fnt = nullptr, int flags = 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draws a String.
|
||||||
|
|
||||||
|
x: The X Position where the Text should be drawn.
|
||||||
|
y: The Y Position where the Text should be drawn.
|
||||||
|
size: The size of the Text.
|
||||||
|
color: The Color of the Text.
|
||||||
|
Text: The Text which should be displayed.
|
||||||
|
maxWidth: The maxWidth for the Text. (Optional!)
|
||||||
|
maxHeight: The maxHeight of the Text. (Optional!)
|
||||||
|
fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
|
||||||
|
flags: C2D text flags to use.
|
||||||
|
*/
|
||||||
|
void DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0, int maxHeight = 0, C2D_Font fnt = nullptr, int flags = 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get the width of a String.
|
||||||
|
|
||||||
|
size: The size of the Text.
|
||||||
|
Text: The Text where the width should be getted from.
|
||||||
|
fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
|
||||||
|
*/
|
||||||
|
float GetStringWidth(float size, std::string Text, C2D_Font fnt = nullptr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get the size of a String.
|
||||||
|
|
||||||
|
size: The size of the Text.
|
||||||
|
width: The width of the Text.
|
||||||
|
height: The height of the Text.
|
||||||
|
Text: The Text where the size should be getted from.
|
||||||
|
fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
|
||||||
|
*/
|
||||||
|
void GetStringSize(float size, float *width, float *height, std::string Text, C2D_Font fnt = nullptr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get the height of a String.
|
||||||
|
|
||||||
|
size: The size of the Text.
|
||||||
|
Text: The Text where the height should be getted from.
|
||||||
|
fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
|
||||||
|
*/
|
||||||
|
float GetStringHeight(float size, std::string Text, C2D_Font fnt = nullptr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draw a Rectangle.
|
||||||
|
|
||||||
|
x: X Position of the Rectangle.
|
||||||
|
y: Y Position of the Rectangle.
|
||||||
|
w: The width of the rectangle.
|
||||||
|
h: The height of the rectangle.
|
||||||
|
color: The color of the rectangle.
|
||||||
|
*/
|
||||||
|
bool Draw_Rect(float x, float y, float w, float h, u32 color);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Used for the current Screen's Draw. (Optional!)
|
||||||
|
stack: Is it the stack variant?
|
||||||
|
*/
|
||||||
|
void DrawScreen(bool stack = false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Used for the current Screen's Logic. (Optional!)
|
||||||
|
|
||||||
|
hDown: the hidKeysDown() variable.
|
||||||
|
hHeld: the HidKeysHeld() variable.
|
||||||
|
touch: The TouchPosition variable.
|
||||||
|
waitFade: Wheter to wait until the fade ends.
|
||||||
|
stack: Is it the stack variant?
|
||||||
|
*/
|
||||||
|
void ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade = true, bool stack = false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Transfer the Temp Screen to the used one. (Optional!)
|
||||||
|
|
||||||
|
stack: Is it the stack variant?
|
||||||
|
It will check, if the tempScreen variable is not nullptr, so don't worry.
|
||||||
|
*/
|
||||||
|
void transferScreen(bool stack = false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Set a specific Screen with switch function. (Optional!)
|
||||||
|
|
||||||
|
screen: unique_ptr of the screen. (Optional by using the screen class.)
|
||||||
|
screenSwitch: Wheter to switch to the current screen.
|
||||||
|
stack: Is it the stack variant?
|
||||||
|
*/
|
||||||
|
void setScreen(std::unique_ptr<Screen> screen, bool fade = false, bool stack = false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Fades into screens and calls the constructor after it. (Optional!)
|
||||||
|
fadeoutFrames: Amount of frames for fadeout.
|
||||||
|
fadeinFrames: Amount of frames for fadein.
|
||||||
|
stack: Is it the stack variant?
|
||||||
|
*/
|
||||||
|
void fadeEffects(int fadeoutFrames = 6, int fadeinFrames = 6, bool stack = false);
|
||||||
|
|
||||||
|
void screenBack(bool fade = false); // Goes a screen back. (Set!) (Stack only!)
|
||||||
|
void screenBack2(); // Goes a screen back.(Action!) (Stack only!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
Set on which screen to draw.
|
||||||
|
|
||||||
|
screen: The render target. (Targets are inside the screenCommon.hpp file.)
|
||||||
|
*/
|
||||||
|
void ScreenDraw(C3D_RenderTarget * screen);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draws a grid.
|
||||||
|
xPos: X Position of the grid.
|
||||||
|
yPos: Y Position of the grid.
|
||||||
|
Width: Width of the grid.
|
||||||
|
Height: Height of the grid.
|
||||||
|
color: Color of the grid.
|
||||||
|
bgColor: The BG Color from the grid. (Optional! It's transparent by default.)
|
||||||
|
*/
|
||||||
|
void drawGrid(float xPos, float yPos, float Width, float Height, u32 color, u32 bgColor = C2D_Color32(0, 0, 0, 0));
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draws an animated selector.
|
||||||
|
xPos: X Position of the selector.
|
||||||
|
yPos: Y Position of the Selector.
|
||||||
|
Width: Width of the Selector.
|
||||||
|
Height: Height of the Selector.
|
||||||
|
speed: The speed of the animation. (Use .030f or something by default.)
|
||||||
|
SelectorColor: The Color of the Selector outline.
|
||||||
|
bgColor: The BG Color from the selector. (Optional! It's transparent by default.)
|
||||||
|
*/
|
||||||
|
void drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 SelectorColor, u32 bgColor = C2D_Color32(0, 0, 0, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Core
|
||||||
|
* Copyright (C) 2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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 _UNIVERSAL_CORE_SCREEN_HPP
|
||||||
|
#define _UNIVERSAL_CORE_SCREEN_HPP
|
||||||
|
|
||||||
|
#include <3ds.h>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
class Screen {
|
||||||
|
public:
|
||||||
|
virtual ~Screen() {}
|
||||||
|
virtual void Logic(u32 hDown, u32 hHeld, touchPosition touch) = 0;
|
||||||
|
virtual void Draw() const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Core
|
||||||
|
* Copyright (C) 2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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 _UNIVERSAL_CORE_SCREENCOMMON_HPP
|
||||||
|
#define _UNIVERSAL_CORE_SCREENCOMMON_HPP
|
||||||
|
|
||||||
|
#include "gui.hpp"
|
||||||
|
#include "structs.hpp"
|
||||||
|
|
||||||
|
extern C3D_RenderTarget *Top, *TopRight, *Bottom;
|
||||||
|
extern bool fadeout, fadein, fadeout2, fadein2;
|
||||||
|
extern int fadealpha, fadecolor;
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Core
|
||||||
|
* Copyright (C) 2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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 _UNIVERSAL_CORE_STRUCTS_HPP
|
||||||
|
#define _UNIVERSAL_CORE_STRUCTS_HPP
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class Structs {
|
||||||
|
public:
|
||||||
|
struct ButtonPos {
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int w;
|
||||||
|
int h;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Key {
|
||||||
|
std::string character;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int w;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
After Width: | Height: | Size: 156 KiB |
@@ -11,28 +11,28 @@ TitleInfo:
|
|||||||
UniqueId : 0x42042
|
UniqueId : 0x42042
|
||||||
|
|
||||||
Option:
|
Option:
|
||||||
UseOnSD : true # true if App is to be installed to SD
|
UseOnSD : true # true si l'application doit être installée sur SD
|
||||||
FreeProductCode : true # Removes limitations on ProductCode
|
FreeProductCode : true # Supprime les limitations sur ProductCode
|
||||||
MediaFootPadding : false # If true CCI files are created with padding
|
MediaFootPadding : false # Si de vrais fichiers CCI sont créés avec un remplissage
|
||||||
EnableCrypt : false # Enables encryption for NCCH and CIA
|
EnableCrypt : false # Active le cryptage pour NCCH et CIA
|
||||||
EnableCompress : true # Compresses where applicable (currently only exefs:/.code)
|
EnableCompress : true # Compresse le cas échéant (actuellement uniquement exefs: /. Code)
|
||||||
|
|
||||||
AccessControlInfo:
|
AccessControlInfo:
|
||||||
CoreVersion : 2
|
CoreVersion : 2
|
||||||
|
|
||||||
# Exheader Format Version
|
# Version du format Exheader
|
||||||
DescVersion : 2
|
DescVersion : 2
|
||||||
|
|
||||||
# Minimum Required Kernel Version (below is for 4.5.0)
|
# Version minimale requise du noyau (ci-dessous est pour 4.5.0)
|
||||||
ReleaseKernelMajor : "02"
|
ReleaseKernelMajor : "02"
|
||||||
ReleaseKernelMinor : "33"
|
ReleaseKernelMinor : "33"
|
||||||
|
|
||||||
# ExtData
|
# ExtData
|
||||||
UseExtSaveData : false # enables ExtData
|
UseExtSaveData : false # active ExtData
|
||||||
#ExtSaveDataId : 0x300 # only set this when the ID is different to the UniqueId
|
#ExtSaveDataId : 0x300 # définissez ceci uniquement lorsque l'ID est différent de UniqueId
|
||||||
|
|
||||||
# FS:USER Archive Access Permissions
|
# FS: autorisations d'accès aux archives USER
|
||||||
# Uncomment as required
|
# Décommenter si nécessaire
|
||||||
FileSystemAccess:
|
FileSystemAccess:
|
||||||
- CategorySystemApplication
|
- CategorySystemApplication
|
||||||
- CategoryHardwareCheck
|
- CategoryHardwareCheck
|
||||||
@@ -66,13 +66,13 @@ AccessControlInfo:
|
|||||||
#- CreateSeed
|
#- CreateSeed
|
||||||
- UseCardSpi
|
- UseCardSpi
|
||||||
|
|
||||||
# Process Settings
|
# Paramètres de processus
|
||||||
MemoryType : Application # Application/System/Base
|
MemoryType : Application # Application/System/Base
|
||||||
SystemMode : 64MB # 64MB(Default)/96MB/80MB/72MB/32MB
|
SystemMode : 64MB # 64MB(Defaut)/96MB/80MB/72MB/32MB
|
||||||
IdealProcessor : 0
|
IdealProcessor : 0
|
||||||
AffinityMask : 1
|
AffinityMask : 1
|
||||||
Priority : 16
|
Priority : 16
|
||||||
MaxCpu : 0x9E # Default
|
MaxCpu : 0x9E # Defaut
|
||||||
HandleTableSize : 0x200
|
HandleTableSize : 0x200
|
||||||
DisableDebug : false
|
DisableDebug : false
|
||||||
EnableForceDebug : false
|
EnableForceDebug : false
|
||||||
@@ -84,19 +84,19 @@ AccessControlInfo:
|
|||||||
RunnableOnSleep : false
|
RunnableOnSleep : false
|
||||||
SpecialMemoryArrange : true
|
SpecialMemoryArrange : true
|
||||||
|
|
||||||
# New3DS Exclusive Process Settings
|
# Paramètres de processus exclusifs New3DS
|
||||||
SystemModeExt : Legacy # Legacy(Default)/124MB/178MB Legacy:Use Old3DS SystemMode
|
SystemModeExt : Legacy # Legacy (par défaut) / 124 Mo / 178 Mo Legacy: utilisez le mode système Old3DS
|
||||||
CpuSpeed : 804MHz # 268MHz(Default)/804MHz
|
CpuSpeed : 804MHz # 268MHz(Defaut)/804MHz
|
||||||
EnableL2Cache : true # false(default)/true
|
EnableL2Cache : true # false (par défaut) / true
|
||||||
CanAccessCore2 : true
|
CanAccessCore2 : true
|
||||||
|
|
||||||
# Virtual Address Mappings
|
# Correspondances d’adresses virtuelles
|
||||||
IORegisterMapping:
|
IORegisterMapping:
|
||||||
- 1ff00000-1ff7ffff # DSP memory
|
- 1ff00000-1ff7ffff # DSP memory
|
||||||
MemoryMapping:
|
MemoryMapping:
|
||||||
- 1f000000-1f5fffff:r # VRAM
|
- 1f000000-1f5fffff:r # VRAM
|
||||||
|
|
||||||
# Accessible SVCs, <Name>:<ID>
|
# SVC accessibles, <Name>:<ID>
|
||||||
SystemCallAccess:
|
SystemCallAccess:
|
||||||
ControlMemory: 1
|
ControlMemory: 1
|
||||||
QueryMemory: 2
|
QueryMemory: 2
|
||||||
@@ -206,8 +206,8 @@ AccessControlInfo:
|
|||||||
KernelSetState: 124
|
KernelSetState: 124
|
||||||
QueryProcessMemory: 125
|
QueryProcessMemory: 125
|
||||||
|
|
||||||
# Service List
|
# Liste des services
|
||||||
# Maximum 34 services (32 if firmware is prior to 9.6.0)
|
# 34 services maximum (32 si le micrologiciel est antérieur à la version 9.6.0)
|
||||||
ServiceAccessControl:
|
ServiceAccessControl:
|
||||||
- APT:U
|
- APT:U
|
||||||
- ac:u
|
- ac:u
|
||||||
@@ -246,8 +246,8 @@ SystemControlInfo:
|
|||||||
RemasterVersion: $(APP_VERSION_MAJOR)
|
RemasterVersion: $(APP_VERSION_MAJOR)
|
||||||
StackSize: 0x40000
|
StackSize: 0x40000
|
||||||
|
|
||||||
# Modules that run services listed above should be included below
|
# Les modules qui exécutent les services énumérés ci-dessus doivent être inclus sous
|
||||||
# Maximum 48 dependencies
|
# 48 dépendances maximum
|
||||||
# <module name>:<module titleid>
|
# <module name>:<module titleid>
|
||||||
Dependency:
|
Dependency:
|
||||||
ac: 0x0004013000002402
|
ac: 0x0004013000002402
|
||||||
|
|||||||
@@ -3,25 +3,11 @@
|
|||||||
sprites/add.png
|
sprites/add.png
|
||||||
sprites/add_font.png
|
sprites/add_font.png
|
||||||
sprites/arrow.png
|
sprites/arrow.png
|
||||||
sprites/battery/battery_0.png
|
|
||||||
sprites/battery/battery_1.png
|
|
||||||
sprites/battery/battery_2.png
|
|
||||||
sprites/battery/battery_3.png
|
|
||||||
sprites/battery/battery_4.png
|
|
||||||
sprites/battery/battery_blink.png
|
|
||||||
sprites/battery/battery_charge.png
|
|
||||||
sprites/battery/battery_charge_full.png
|
|
||||||
sprites/cancel.png
|
|
||||||
sprites/checked.png
|
sprites/checked.png
|
||||||
sprites/delete.png
|
sprites/delete.png
|
||||||
sprites/download.png
|
sprites/download.png
|
||||||
sprites/info.png
|
sprites/info.png
|
||||||
sprites/installed.png
|
|
||||||
sprites/keyboard.png
|
sprites/keyboard.png
|
||||||
sprites/langs/jp.png
|
|
||||||
sprites/langs/ko.png
|
|
||||||
sprites/langs/zh-CN.png
|
|
||||||
sprites/langs/zh-TW.png
|
|
||||||
sprites/list.png
|
sprites/list.png
|
||||||
sprites/noIcon.png
|
sprites/noIcon.png
|
||||||
sprites/notes.png
|
sprites/notes.png
|
||||||
@@ -44,7 +30,8 @@ sprites/sort_unchecked.png
|
|||||||
sprites/toggle_off.png
|
sprites/toggle_off.png
|
||||||
sprites/toggle_on.png
|
sprites/toggle_on.png
|
||||||
sprites/unchecked.png
|
sprites/unchecked.png
|
||||||
sprites/darkstore_banner.png
|
sprites/DarkStore.png
|
||||||
|
sprites/DarkStore-core.png
|
||||||
sprites/update.png
|
sprites/update.png
|
||||||
sprites/update_app.png
|
sprites/update_app.png
|
||||||
sprites/update_filter.png
|
sprites/update_filter.png
|
||||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 257 B |
|
Before Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 257 B |
|
Before Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 951 B |
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 894 B |
|
Before Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 761 B |
|
Before Width: | Height: | Size: 960 B |
|
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 978 B |
@@ -1,7 +1,3 @@
|
|||||||
"project_id_env": "UU_CROWDIN_ID"
|
|
||||||
"api_token_env": "CROWDIN_TOKEN"
|
|
||||||
preserve_hierarchy: true
|
|
||||||
|
|
||||||
files:
|
files:
|
||||||
- source: /romfs/lang/en/app.json
|
- source: /romfs/lang/en/app.json
|
||||||
translation: /romfs/lang/%two_letters_code%/app.json
|
translation: /romfs/lang/%two_letters_code%/app.json
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,18 +27,16 @@
|
|||||||
#ifndef _DARKSTORE_COMMON_HPP
|
#ifndef _DARKSTORE_COMMON_HPP
|
||||||
#define _DARKSTORE_COMMON_HPP
|
#define _DARKSTORE_COMMON_HPP
|
||||||
|
|
||||||
|
#include <3ds.h>
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
#include "gfx.hpp"
|
#include "gfx.hpp"
|
||||||
#include "lang.hpp"
|
#include "lang.hpp"
|
||||||
#include "msg.hpp"
|
#include "msg.hpp"
|
||||||
#include "screenCommon.hpp"
|
#include "screenCommon.hpp"
|
||||||
#include <3ds.h>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define _STORE_PATH "sdmc:/3ds/DarkStore/stores/"
|
#define _STORE_PATH "sdmc:/3ds/DarkStore/stores/"
|
||||||
#define _META_PATH "sdmc:/3ds/DarkStore/MetaData.json"
|
#define _META_PATH "sdmc:/3ds/DarkStore/MetaData.json"
|
||||||
#define _THEME_AMOUNT 2
|
#define _ESHOP_VERSION 4
|
||||||
#define _STORE_VERSION 4
|
|
||||||
|
|
||||||
inline std::unique_ptr<Config> config;
|
inline std::unique_ptr<Config> config;
|
||||||
inline uint32_t hRepeat, hDown, hHeld;
|
inline uint32_t hRepeat, hDown, hHeld;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,29 +29,53 @@
|
|||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "sprites.h"
|
#include "sprites.h"
|
||||||
#include "theme.hpp"
|
|
||||||
#include <citro2d.h>
|
#include <citro2d.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
extern std::unique_ptr<Theme> UIThemes;
|
/*
|
||||||
|
Définissez toutes les couleurs utilisées, pour des changements plus faciles.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Standard Colors. */
|
/* Couleurs Standard. */
|
||||||
#define WHITE C2D_Color32(255, 255, 255, 255)
|
#define WHITE C2D_Color32(255, 255, 255, 255)
|
||||||
#define BLACK C2D_Color32(0, 0, 0, 255)
|
#define BLACK C2D_Color32(0, 0, 0, 255)
|
||||||
#define TRANSPARENT C2D_Color32(0, 0, 0, 0)
|
#define TRANSPARENT C2D_Color32(0, 0, 0, 0)
|
||||||
#define DIM_COLOR C2D_Color32(0, 0, 0, 190)
|
#define DIM_COLOR C2D_Color32(0, 0, 0, 190)
|
||||||
|
|
||||||
|
/* Barres, Textes, BG Couleurs. */
|
||||||
|
#define TEXT_COLOR WHITE
|
||||||
|
#define BAR_COLOR C2D_Color32(50, 73, 98, 255)
|
||||||
|
#define BAR_OUTL_COLOR C2D_Color32(25, 30, 53, 255)
|
||||||
|
#define BG_COLOR C2D_Color32(255, 125, 0, 255)
|
||||||
|
|
||||||
|
/* Entrée Des Couleurs. */
|
||||||
|
#define ENTRY_BAR_COLOR BAR_COLOR
|
||||||
|
#define ENTRY_BAR_OUTL_COLOR BAR_OUTL_COLOR
|
||||||
|
|
||||||
|
/* Entrée Des Couleurs De La Boîte. */
|
||||||
|
#define BOX_INSIDE_COLOR C2D_Color32(28, 33, 58, 255)
|
||||||
|
#define BOX_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
|
||||||
|
#define BOX_UNSELECTED_COLOR BLACK
|
||||||
|
|
||||||
|
/* Couleurs De La Barre De Progression. */
|
||||||
|
#define PROGRESSBAR_OUT_COLOR BOX_INSIDE_COLOR
|
||||||
|
#define PROGRESSBAR_IN_COLOR SIDEBAR_UNSELECTED_COLOR
|
||||||
|
|
||||||
|
/* Couleurs du menu de recherche. */
|
||||||
|
#define SEARCH_BAR_COLOR C2D_Color32(51, 75, 102, 255)
|
||||||
|
#define SEARCH_BAR_OUTL_COLOR BAR_OUTL_COLOR
|
||||||
|
|
||||||
|
/* Sidebar Couleurs. */
|
||||||
|
#define SIDEBAR_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
|
||||||
|
#define SIDEBAR_UNSELECTED_COLOR C2D_Color32(77, 101, 128, 255)
|
||||||
|
|
||||||
namespace GFX {
|
namespace GFX {
|
||||||
void DrawTop(void);
|
void DrawTop(void);
|
||||||
void DrawBottom();
|
void DrawBottom();
|
||||||
void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||||
void DrawBox(float xPos, float yPos, float width = 50, float height = 50, bool selected = false, uint32_t clr = UIThemes->BoxInside());
|
void DrawBox(float xPos, float yPos, float width = 50, float height = 50, bool selected = false, uint32_t clr = BOX_INSIDE_COLOR);
|
||||||
void DrawCheckbox(float xPos, float yPos, bool selected);
|
void DrawCheckbox(float xPos, float yPos, bool selected);
|
||||||
void DrawToggle(float xPos, float yPos, bool toggled);
|
void DrawToggle(float xPos, float yPos, bool toggled);
|
||||||
void DrawTime();
|
|
||||||
void DrawBattery();
|
|
||||||
void HandleBattery();
|
|
||||||
void DrawIcon(const int Idx, int X, int Y, uint32_t Color = UIThemes->SideBarIconColor(), float BlendPower = 1.0f, float ScaleX = 1, float ScaleY = 1);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,14 +28,15 @@
|
|||||||
#define _DARKSTORE_OVERLAY_HPP
|
#define _DARKSTORE_OVERLAY_HPP
|
||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
#include "store.hpp"
|
||||||
|
#include "storeEntry.hpp"
|
||||||
#include <3ds.h>
|
#include <3ds.h>
|
||||||
|
|
||||||
namespace Overlays {
|
namespace Overlays {
|
||||||
void SelectStore();
|
void SelectStore(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::unique_ptr<Meta> &meta);
|
||||||
void SelectLanguage();
|
void SelectLanguage(const std::unique_ptr<Store> &store);
|
||||||
void ShowCredits();
|
void ShowCredits();
|
||||||
std::string SelectDir(const std::string &oldDir, const std::string &msg);
|
std::string SelectDir(const std::string &oldDir, const std::string &msg, const std::unique_ptr<Store> &store);
|
||||||
void SelectTheme();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,6 +1,32 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Universal-Updater
|
||||||
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,3 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Updater
|
||||||
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
/* quirc -- QR-code recognition library
|
/* quirc -- QR-code recognition library
|
||||||
* Copyright (C) 2010-2012 Daniel Beer <dlbeer@gmail.com>
|
* Copyright (C) 2010-2012 Daniel Beer <dlbeer@gmail.com>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,3 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Updater
|
||||||
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
/* quirc -- QR-code recognition library
|
/* quirc -- QR-code recognition library
|
||||||
* Copyright (C) 2010-2012 Daniel Beer <dlbeer@gmail.com>
|
* Copyright (C) 2010-2012 Daniel Beer <dlbeer@gmail.com>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -51,18 +51,21 @@ public:
|
|||||||
void Draw(void) const override;
|
void Draw(void) const override;
|
||||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||||
private:
|
private:
|
||||||
std::vector<std::string> dwnldList, dwnldSizes, dwnldTypes;
|
std::unique_ptr<Store> store = nullptr;
|
||||||
|
std::unique_ptr<Meta> meta = nullptr;
|
||||||
|
std::vector<std::unique_ptr<StoreEntry>> entries;
|
||||||
|
std::vector<std::string> dwnldList, dwnldSizes;
|
||||||
|
|
||||||
bool initialized = false, fetchDown = false, showMarks = false, showSettings = false,
|
bool initialized = false, fetchDown = false, showMarks = false, showSettings = false,
|
||||||
ascending = false, updateFilter = false, screenshotFetch = false, canDisplay = false, isAND = true;
|
ascending = false, updateFilter = false, screenshotFetch = false, canDisplay = false;
|
||||||
|
|
||||||
int storeMode = 0, marks = 0, markIndex = 0, sPage = 0, lMode = 0, sSelection = 0,
|
int storeMode = 0, marks = 0, markIndex = 0, sPage = 0, lMode = 0, sSelection = 0,
|
||||||
lastMode = 0, smallDelay = 0, sPos = 0, screenshotIndex = 0, sSize = 0, zoom = 0, scrollIndex = 0, queueIndex = 0;
|
lastMode = 0, smallDelay = 0, sPos = 0, screenshotIndex = 0, sSize = 0, zoom = 0, scrollIndex = 0, queueIndex = 0;
|
||||||
|
|
||||||
SortType sorttype = SortType::LAST_UPDATED;
|
SortType sorttype = SortType::LAST_UPDATED;
|
||||||
|
|
||||||
/* Title, Author, Category, Console. */
|
/* Titre, Auteur, Catégorie, Console. */
|
||||||
std::vector<bool> searchIncludes = { true, false, false, false }, installs = { };
|
std::vector<bool> searchIncludes = { false, false, false, false };
|
||||||
std::string searchResult = "", screenshotName = "";
|
std::string searchResult = "", screenshotName = "";
|
||||||
|
|
||||||
C2D_Image Screenshot = { nullptr, nullptr };
|
C2D_Image Screenshot = { nullptr, nullptr };
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
#include "json.hpp"
|
#include "json.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
enum favoriteMarks {
|
enum favoriteMarks {
|
||||||
STAR = 1 << 0,
|
STAR = 1 << 0,
|
||||||
@@ -44,53 +43,18 @@ public:
|
|||||||
Meta();
|
Meta();
|
||||||
~Meta() { this->SaveCall(); };
|
~Meta() { this->SaveCall(); };
|
||||||
|
|
||||||
std::string GetUpdated(const std::string &storeName, const std::string &entry) const;
|
std::string GetUpdated(const std::string &EshopName, const std::string &entry) const;
|
||||||
int GetMarks(const std::string &storeName, const std::string &entry) const;
|
int GetMarks(const std::string &EshopName, const std::string &entry) const;
|
||||||
bool UpdateAvailable(const std::string &storeName, const std::string &entry, const std::string &updated) const;
|
bool UpdateAvailable(const std::string &EshopName, const std::string &entry, const std::string &updated) const;
|
||||||
std::vector<std::string> GetInstalled(const std::string &storeName, const std::string &entry) const;
|
|
||||||
|
|
||||||
void SetUpdated(const std::string &storeName, const std::string &entry, const std::string &updated) {
|
void SetUpdated(const std::string &EshopName, const std::string &entry, const std::string &updated) {
|
||||||
this->metadataJson[storeName][entry]["updated"] = updated;
|
this->metadataJson[EshopName][entry]["updated"] = updated;
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetMarks(const std::string &storeName, const std::string &entry, int marks) {
|
void SetMarks(const std::string &EshopName, const std::string &entry, int marks) {
|
||||||
this->metadataJson[storeName][entry]["marks"] = marks;
|
this->metadataJson[EshopName][entry]["marks"] = marks;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* TODO: Handle this better. */
|
|
||||||
void SetInstalled(const std::string &storeName, const std::string &entry, const std::string &name) {
|
|
||||||
const std::vector<std::string> installs = this->GetInstalled(storeName, entry);
|
|
||||||
bool write = true;
|
|
||||||
|
|
||||||
if (!installs.empty()) {
|
|
||||||
write = !installs.empty();
|
|
||||||
|
|
||||||
for (int i = 0; i < (int)installs.size(); i++) {
|
|
||||||
if (installs[i] == name) {
|
|
||||||
write = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (write) this->metadataJson[storeName][entry]["installed"] += name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove installed state from a download list entry. */
|
|
||||||
void RemoveInstalled(const std::string &storeName, const std::string &entry, const std::string &name) {
|
|
||||||
const std::vector<std::string> installs = this->GetInstalled(storeName, entry);
|
|
||||||
if (installs.empty()) return;
|
|
||||||
|
|
||||||
for (int i = 0; i < (int)installs.size(); i++) {
|
|
||||||
if (installs[i] == name) {
|
|
||||||
this->metadataJson[storeName][entry]["installed"].erase(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->metadataJson[storeName][entry]["installed"].empty() && this->metadataJson[storeName][entry].contains("updated")) this->metadataJson[storeName][entry].erase("updated");
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImportMetadata();
|
void ImportMetadata();
|
||||||
void SaveCall();
|
void SaveCall();
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -40,11 +40,11 @@ public:
|
|||||||
void unloadSheets();
|
void unloadSheets();
|
||||||
void update(const std::string &file);
|
void update(const std::string &file);
|
||||||
|
|
||||||
/* Get Information of the Store itself. */
|
/* Obtenir des informations sur l’eShop lui-même. */
|
||||||
std::string GetStoreTitle() const;
|
std::string GetEshopTitle() const;
|
||||||
std::string GetStoreAuthor() const;
|
std::string GetEshopAuthor() const;
|
||||||
|
|
||||||
/* Get Information of the SStore entries. */
|
/* Obtenir des informations sur les entrées eShop. */
|
||||||
std::string GetTitleEntry(int index) const;
|
std::string GetTitleEntry(int index) const;
|
||||||
std::string GetAuthorEntry(int index) const;
|
std::string GetAuthorEntry(int index) const;
|
||||||
std::string GetDescriptionEntry(int index) const;
|
std::string GetDescriptionEntry(int index) const;
|
||||||
@@ -52,10 +52,10 @@ public:
|
|||||||
std::string GetVersionEntry(int index) const;
|
std::string GetVersionEntry(int index) const;
|
||||||
std::vector<std::string> GetConsoleEntry(int index) const;
|
std::vector<std::string> GetConsoleEntry(int index) const;
|
||||||
std::string GetLastUpdatedEntry(int index) const;
|
std::string GetLastUpdatedEntry(int index) const;
|
||||||
std::string GetLicenseEntry(int index) const;
|
std::string GetSizeEntry(int index) const;
|
||||||
|
std::string GetAdditionalcontentEntry(int index) const;
|
||||||
C2D_Image GetIconEntry(int index) const;
|
C2D_Image GetIconEntry(int index) const;
|
||||||
std::string GetFileSizes(int index, const std::string &entry) const;
|
std::string GetFileSizes(int index, const std::string &entry) const;
|
||||||
std::string GetFileTypes(int index, const std::string &entry) const;
|
|
||||||
std::vector<std::string> GetScreenshotList(int index) const;
|
std::vector<std::string> GetScreenshotList(int index) const;
|
||||||
std::vector<std::string> GetScreenshotNames(int index) const;
|
std::vector<std::string> GetScreenshotNames(int index) const;
|
||||||
std::string GetReleaseNotes(int index) const;
|
std::string GetReleaseNotes(int index) const;
|
||||||
@@ -82,11 +82,11 @@ public:
|
|||||||
nlohmann::json &GetJson() { return this->storeJson; };
|
nlohmann::json &GetJson() { return this->storeJson; };
|
||||||
bool GetValid() const { return this->valid; };
|
bool GetValid() const { return this->valid; };
|
||||||
|
|
||||||
/* Both of these things are used for custom BG support. */
|
/* Ces deux choses sont utilisées pour le support BG personnalisé. */
|
||||||
C2D_Image GetStoreImg() const { return this->storeBG; };
|
C2D_Image GetStoreImg() const { return this->storeBG; };
|
||||||
bool customBG() const { return this->hasCustomBG; };
|
bool customBG() const { return this->hasCustomBG; };
|
||||||
|
|
||||||
/* Return filename of the Store. */
|
/* Renvoie le nom du fichier eShop. */
|
||||||
std::string GetFileName() const { return this->fileName; };
|
std::string GetFileName() const { return this->fileName; };
|
||||||
private:
|
private:
|
||||||
void SetC2DBGImage();
|
void SetC2DBGImage();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -42,7 +42,8 @@ public:
|
|||||||
std::string GetVersion() const { return this->Version; };
|
std::string GetVersion() const { return this->Version; };
|
||||||
std::string GetConsole() const { return this->Console; };
|
std::string GetConsole() const { return this->Console; };
|
||||||
std::string GetLastUpdated() const { return this->LastUpdated; };
|
std::string GetLastUpdated() const { return this->LastUpdated; };
|
||||||
std::string GetLicense() const { return this->License; };
|
std::string GetSize() const { return this->Size; };
|
||||||
|
std::string GetAdditionalcontent() const { return this->Additional; };
|
||||||
int GetMarks() const { return this->Marks; };
|
int GetMarks() const { return this->Marks; };
|
||||||
|
|
||||||
C2D_Image GetIcon() const { return this->Icon; };
|
C2D_Image GetIcon() const { return this->Icon; };
|
||||||
@@ -53,7 +54,6 @@ public:
|
|||||||
std::vector<std::string> GetCategoryFull() const { return this->FullCategory; };
|
std::vector<std::string> GetCategoryFull() const { return this->FullCategory; };
|
||||||
std::vector<std::string> GetConsoleFull() const { return this->FullConsole; };
|
std::vector<std::string> GetConsoleFull() const { return this->FullConsole; };
|
||||||
std::vector<std::string> GetSizes() const { return this->Sizes; };
|
std::vector<std::string> GetSizes() const { return this->Sizes; };
|
||||||
std::vector<std::string> GetTypes() const { return this->Types; };
|
|
||||||
std::vector<std::string> GetScreenshots() const { return this->Screenshots; };
|
std::vector<std::string> GetScreenshots() const { return this->Screenshots; };
|
||||||
std::vector<std::string> GetScreenshotNames() const { return this->ScreenshotNames; };
|
std::vector<std::string> GetScreenshotNames() const { return this->ScreenshotNames; };
|
||||||
std::string GetReleaseNotes() const { return this->ReleaseNotes; };
|
std::string GetReleaseNotes() const { return this->ReleaseNotes; };
|
||||||
@@ -67,10 +67,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string Title, Author, Description, Category, Version, Console, LastUpdated, License, MarkString, ReleaseNotes;
|
std::string Title, Author, Description, Category, Version, Console, LastUpdated, Size, MarkString, Additional, ReleaseNotes;
|
||||||
C2D_Image Icon;
|
C2D_Image Icon;
|
||||||
int SheetIndex, EntryIndex, Marks;
|
int SheetIndex, EntryIndex, Marks;
|
||||||
std::vector<std::string> FullCategory, FullConsole, Sizes, Types, Screenshots, ScreenshotNames;
|
std::vector<std::string> FullCategory, FullConsole, Sizes, Screenshots, ScreenshotNames;
|
||||||
bool UpdateAvailable;
|
bool UpdateAvailable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
#ifndef _DARKSTORE_STORE_UTILS_HPP
|
#ifndef _DARKSTORE_STORE_UTILS_HPP
|
||||||
#define _DARKSTORE_STORE_UTILS_HPP
|
#define _DARKSTORE_STORE_UTILS_HPP
|
||||||
|
|
||||||
#include "meta.hpp"
|
#include "common.hpp"
|
||||||
#include "store.hpp"
|
#include "store.hpp"
|
||||||
#include "storeEntry.hpp"
|
#include "storeEntry.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -39,62 +39,55 @@ enum class SortType : uint8_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
namespace StoreUtils {
|
namespace StoreUtils {
|
||||||
extern std::unique_ptr<Meta> meta;
|
/* Grille. */
|
||||||
extern std::unique_ptr<Store> store;
|
void DrawGrid(const std::unique_ptr<Store> &store, const std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||||
extern std::vector<std::unique_ptr<StoreEntry>> entries;
|
void GridLogic(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
||||||
|
|
||||||
/* Grid. */
|
/* Top Liste. */
|
||||||
void DrawGrid();
|
void DrawList(const std::unique_ptr<Store> &store, const std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||||
void GridLogic(int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
void ListLogic(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
||||||
|
|
||||||
/* Top List. */
|
/* Infos Sur L'Entrée. */
|
||||||
void DrawList();
|
void DrawEntryInfo(const std::unique_ptr<Store> &store, const std::unique_ptr<StoreEntry> &entry);
|
||||||
void ListLogic(int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
|
|
||||||
|
|
||||||
/* Entry Info. */
|
|
||||||
void DrawEntryInfo(const std::unique_ptr<StoreEntry> &entry);
|
|
||||||
void EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr<StoreEntry> &entry);
|
void EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr<StoreEntry> &entry);
|
||||||
|
|
||||||
/* Side Menu. */
|
/* Menu Latéral. */
|
||||||
void DrawSideMenu(int currentMenu);
|
void DrawSideMenu(int currentMenu);
|
||||||
void SideMenuHandle(int ¤tMenu, bool &fetch, int &lastMenu);
|
void SideMenuHandle(int ¤tMenu, bool &fetch, int &lastMenu);
|
||||||
|
|
||||||
/* Download entries. */
|
/* Entrées Des Téléchargements. */
|
||||||
void DrawDownList(const std::vector<std::string> &entries, bool fetch, const std::unique_ptr<StoreEntry> &entry, const std::vector<std::string> &sizes, const std::vector<bool> &installs);
|
void DrawDownList(const std::unique_ptr<Store> &store, const std::vector<std::string> &entries, bool fetch, const std::unique_ptr<StoreEntry> &entry, const std::vector<std::string> &sizes);
|
||||||
void DownloadHandle(const std::unique_ptr<StoreEntry> &entry, const std::vector<std::string> &entries, int ¤tMenu, const int &lastMode, int &smallDelay, std::vector<bool> &installs, const std::vector<std::string> &types);
|
void DownloadHandle(const std::unique_ptr<Store> &store, const std::unique_ptr<StoreEntry> &entry, const std::vector<std::string> &entries, int ¤tMenu, std::unique_ptr<Meta> &meta, const int &lastMode, int &smallDelay);
|
||||||
|
|
||||||
/* Queue System. */
|
/* Queue System. */
|
||||||
void DrawQueueMenu(const int queueIndex);
|
void DrawQueueMenu(const int queueIndex);
|
||||||
void QueueMenuHandle(int &queueIndex, int &storeMode);
|
void QueueMenuHandle(int &queueIndex);
|
||||||
|
|
||||||
/* Search + Favorite Menu. */
|
/* Recherche + Menu Favoris. */
|
||||||
void DrawSearchMenu(const std::vector<bool> &searchIncludes, const std::string &searchResult, int marks, bool updateFilter, bool isAND);
|
void DrawSearchMenu(const std::vector<bool> &searchIncludes, const std::string &searchResult, int marks, bool updateFilter);
|
||||||
void SearchHandle(std::vector<bool> &searchIncludes, std::string &searchResult, int &marks, bool &updateFilter, bool ascending, SortType sorttype, bool &isAND);
|
void SearchHandle(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::vector<bool> &searchIncludes, std::unique_ptr<Meta> &meta, std::string &searchResult, int &marks, bool &updateFilter, bool ascending, SortType sorttype);
|
||||||
|
|
||||||
/* Mark Menu. */
|
/* Menu Marquer. */
|
||||||
void DisplayMarkBox(int marks);
|
void DisplayMarkBox(int marks);
|
||||||
void MarkHandle(std::unique_ptr<StoreEntry> &entry, bool &showMark);
|
void MarkHandle(std::unique_ptr<StoreEntry> &entry, const std::unique_ptr<Store> &store, bool &showMark, std::unique_ptr<Meta> &meta);
|
||||||
|
|
||||||
/* Credits. */
|
/* Crédits. */
|
||||||
void DrawCredits();
|
void DrawCredits();
|
||||||
|
|
||||||
/* Screenshot menu. */
|
/* Screenshot menu. */
|
||||||
void DrawScreenshotMenu(const C2D_Image &img, const int sIndex, const bool sFetch, const int screenshotSize, const std::string &name, const int zoom, const bool canDisplay);
|
void DrawScreenshotMenu(const C2D_Image &img, const int sIndex, const bool sFetch, const int screenshotSize, const std::string &name, const int zoom, const bool canDisplay);
|
||||||
void ScreenshotMenu(C2D_Image &img, int &sIndex, bool &sFetch, int &storeMode, const int screenshotSize, int &zoom, bool &canDisplay);
|
void ScreenshotMenu(C2D_Image &img, int &sIndex, bool &sFetch, int &storeMode, const int screenshotSize, int &zoom, bool &canDisplay);
|
||||||
|
|
||||||
/* Settings. */
|
/* Paramètres. */
|
||||||
void DrawSettings(int page, int selection, int sPos);
|
void DrawSettings(int page, int selection, int sPos);
|
||||||
void SettingsHandle(int &page, bool &dspSettings, int &storeMode, int &selection, int &sPos);
|
void SettingsHandle(int &page, bool &dspSettings, int &storeMode, int &selection, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, std::unique_ptr<Meta> &meta, int &sPos);
|
||||||
|
|
||||||
/* Sorting. */
|
/* Trie. */
|
||||||
void DrawSorting(bool asc, SortType st);
|
void DrawSorting(bool asc, SortType st);
|
||||||
void SortHandle(bool &asc, SortType &st);
|
void SortHandle(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, bool &asc, SortType &st);
|
||||||
|
|
||||||
/* Release Notes. */
|
/* Release Notes. */
|
||||||
size_t FindSplitPoint(const std::string &str, const std::vector<std::string> splitters);
|
void DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr<StoreEntry> &entry, const std::unique_ptr<Store> &store);
|
||||||
void ProcessReleaseNotes(std::string ReleaseNotes);
|
|
||||||
|
|
||||||
void DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr<StoreEntry> &entry);
|
|
||||||
void ReleaseNotesLogic(int &scrollIndex, int &storeMode);
|
void ReleaseNotesLogic(int &scrollIndex, int &storeMode);
|
||||||
|
|
||||||
bool compareTitleDescending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
bool compareTitleDescending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||||
@@ -106,16 +99,13 @@ namespace StoreUtils {
|
|||||||
bool compareUpdateDescending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
bool compareUpdateDescending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||||
bool compareUpdateAscending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
bool compareUpdateAscending(const std::unique_ptr<StoreEntry> &a, const std::unique_ptr<StoreEntry> &b);
|
||||||
|
|
||||||
void SortEntries(bool Ascending, SortType sorttype);
|
void SortEntries(bool Ascending, SortType sorttype, std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||||
|
|
||||||
void search(const std::string &query, bool title, bool author, bool category, bool console, int selectedMarks, bool updateAvl, bool isAND);
|
void search(std::vector<std::unique_ptr<StoreEntry>> &entries, const std::string &query, bool title, bool author, bool category, bool console, int selectedMarks, bool updateAvl);
|
||||||
|
|
||||||
void ResetAll();
|
void FilterUpdateAvailable(std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||||
|
|
||||||
void RefreshUpdateAVL();
|
void ResetAll(const std::unique_ptr<Store> &store, const std::unique_ptr<Meta> &meta, std::vector<std::unique_ptr<StoreEntry>> &entries);
|
||||||
|
|
||||||
void AddToQueue(int index, const std::string &entry, const std::string &entryName, const std::string &lUpdated);
|
|
||||||
void AddAllToQueue();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -38,17 +38,11 @@ enum class ProgressBar {
|
|||||||
};
|
};
|
||||||
|
|
||||||
namespace Animation {
|
namespace Animation {
|
||||||
extern int DisplayY, DisplayDelay;
|
|
||||||
extern bool MoveUp, DoDelay;
|
|
||||||
|
|
||||||
void DrawProgressBar(u64 currentProgress, u64 totalProgress);
|
void DrawProgressBar(u64 currentProgress, u64 totalProgress);
|
||||||
void displayProgressBar();
|
void displayProgressBar();
|
||||||
|
|
||||||
void DrawQueue(int x, int y);
|
void DrawQueue(int x, int y);
|
||||||
void QueueAnimHandle();
|
void QueueAnimHandle();
|
||||||
|
|
||||||
void QueueEntryDone();
|
|
||||||
void HandleQueueEntryDone();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -43,70 +43,55 @@ public:
|
|||||||
std::string language() const { return this->v_language; };
|
std::string language() const { return this->v_language; };
|
||||||
void language(const std::string &v) { this->v_language = v; if (!this->changesMade) this->changesMade = true; };
|
void language(const std::string &v) { this->v_language = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* Last Store. */
|
/* Dernier Magasin. */
|
||||||
std::string lastStore() const { return this->v_lastStore; };
|
std::string lastStore() const { return this->v_lastStore; };
|
||||||
void lastStore(const std::string &v) { this->v_lastStore = v; if (!this->changesMade) this->changesMade = true; };
|
void lastStore(const std::string &v) { this->v_lastStore = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* Using Top List. */
|
/* Utilisation De La Liste Supérieure. */
|
||||||
bool list() const { return this->v_list; };
|
bool list() const { return this->v_list; };
|
||||||
void list(bool v) { this->v_list = v; if (!this->changesMade) this->changesMade = true; };
|
void list(bool v) { this->v_list = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* Auto update on boot. */
|
/* Mise à Jour Automatique Au Démarrage. */
|
||||||
bool autoupdate() const { return this->v_autoUpdate; };
|
bool autoupdate() const { return this->v_autoUpdate; };
|
||||||
void autoupdate(bool v) { this->v_autoUpdate = v; if (!this->changesMade) this->changesMade = true; };
|
void autoupdate(bool v) { this->v_autoUpdate = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
bool _3dsxInFolder() const { return this->v_3dsxInFolder; };
|
|
||||||
void _3dsxInFolder(bool v) { this->v_3dsxInFolder = v; if (!this->changesMade) this->changesMade = true; };
|
|
||||||
|
|
||||||
std::string _3dsxPath() const { return this->v_3dsxPath; };
|
std::string _3dsxPath() const { return this->v_3dsxPath; };
|
||||||
void _3dsxPath(const std::string &v) { this->v_3dsxPath = v; if (!this->changesMade) this->changesMade = true; };
|
void _3dsxPath(const std::string &v) { this->v_3dsxPath = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
std::string romsPath() const { return this->v_romsPath; };
|
std::string ndsPath() const { return this->v_ndsPath; };
|
||||||
void romsPath(const std::string &v) { this->v_romsPath = v; if (!this->changesMade) this->changesMade = true; };
|
void ndsPath(const std::string &v) { this->v_ndsPath = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
|
std::string gbaPath() const { return this->v_gbaPath; };
|
||||||
|
void gbaPath(const std::string &v) { this->v_gbaPath = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
std::string archPath() const { return this->v_archivePath; };
|
std::string archPath() const { return this->v_archivePath; };
|
||||||
void archPath(const std::string &v) { this->v_archivePath = v; if (!this->changesMade) this->changesMade = true; };
|
void archPath(const std::string &v) { this->v_archivePath = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
std::string firmPath() const { return this->v_firmPath; };
|
/* Récupération d'anciennes métadonnées. */
|
||||||
void firmPath(const std::string &v) { this->v_firmPath = v; if (!this->changesMade) this->changesMade = true; };
|
|
||||||
|
|
||||||
/* Fetching old metadata. */
|
|
||||||
bool metadata() const { return this->v_metadata; };
|
bool metadata() const { return this->v_metadata; };
|
||||||
void metadata(bool v) { this->v_metadata = v; if (!this->changesMade) this->changesMade = true; };
|
void metadata(bool v) { this->v_metadata = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* DarkStore Update check on startup. */
|
/* Vérification des Mises à Jour de DarkStore au Démarrage. */
|
||||||
bool updatecheck() const { return this->v_updateCheck; };
|
bool updatecheck() const { return this->v_updateCheck; };
|
||||||
void updatecheck(bool v) { this->v_updateCheck = v; if (!this->changesMade) this->changesMade = true; };
|
void updatecheck(bool v) { this->v_updateCheck = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* Check for nightly/release on startup. */
|
/* Vérification des Mises à Jour de DarkStore au Démarrage. */
|
||||||
bool updatenightly() const { return this->v_updateNightly; };
|
|
||||||
void updatenightly(bool v) { this->v_updateNightly = v; if (!this->changesMade) this->changesMade = true; };
|
|
||||||
|
|
||||||
/* DarkStore Update check on startup. */
|
|
||||||
bool usebg() const { return this->v_showBg; };
|
bool usebg() const { return this->v_showBg; };
|
||||||
void usebg(bool v) { this->v_showBg = v; if (!this->changesMade) this->changesMade = true; };
|
void usebg(bool v) { this->v_showBg = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* If using custom Font. */
|
/* Si vous utilisez une police personnalisée. */
|
||||||
bool customfont() const { return this->v_customFont; };
|
bool customfont() const { return this->v_customFont; };
|
||||||
void customfont(bool v) { this->v_customFont = v; if (!this->changesMade) this->changesMade = true; };
|
void customfont(bool v) { this->v_customFont = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* The shortcut path. */
|
/* Le chemin du raccourci. */
|
||||||
std::string shortcut() const { return this->v_shortcutPath; };
|
std::string shortcut() const { return this->v_shortcutPath; };
|
||||||
void shortcut(const std::string &v) { this->v_shortcutPath = v; if (!this->changesMade) this->changesMade = true; };
|
void shortcut(const std::string &v) { this->v_shortcutPath = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* If displaying changelog. */
|
/* If displaying changelog. */
|
||||||
bool changelog() const { return this->v_changelog; };
|
bool changelog() const { return this->v_changelog; };
|
||||||
void changelog(bool v) { this->v_changelog = v; if (!this->changesMade) this->changesMade = true; };
|
void changelog(bool v) { this->v_changelog = v; if (!this->changesMade) this->changesMade = true; };
|
||||||
|
|
||||||
/* The active Theme. */
|
|
||||||
std::string theme() const { return this->v_theme; };
|
|
||||||
void theme(const std::string &v) { this->v_theme = v; if (!this->changesMade) this->changesMade = true; };
|
|
||||||
|
|
||||||
/* If showing prompt if action failed / succeeded. */
|
|
||||||
bool prompt() const { return this->v_prompt; };
|
|
||||||
void prompt(bool v) { this->v_prompt = v; if (!this->changesMade) this->changesMade = true; };
|
|
||||||
private:
|
private:
|
||||||
/* Mainly helper. */
|
/* Principalement aide. */
|
||||||
bool getBool(const std::string &key);
|
bool getBool(const std::string &key);
|
||||||
void setBool(const std::string &key, bool v);
|
void setBool(const std::string &key, bool v);
|
||||||
int getInt(const std::string &key);
|
int getInt(const std::string &key);
|
||||||
@@ -117,12 +102,12 @@ private:
|
|||||||
nlohmann::json json;
|
nlohmann::json json;
|
||||||
bool changesMade = false;
|
bool changesMade = false;
|
||||||
|
|
||||||
std::string v_language = "en", v_lastStore = "darkstore-homebrew.store",
|
std::string v_language = "en", v_lastStore = "darkstore-homebrew.eshop",
|
||||||
v_3dsxPath = "sdmc:/3ds", v_romsPath = "sdmc:/roms", v_archivePath = "sdmc:",
|
v_3dsxPath = "sdmc:/3ds", v_ndsPath = "sdmc:/roms/nds", v_gbaPath = "sdmc:/roms/gba", v_archivePath = "sdmc:",
|
||||||
v_shortcutPath = "sdmc:/3ds/DarkStore/shortcuts", v_firmPath = "sdmc:/luma/payloads", v_theme = "Default";
|
v_shortcutPath = "sdmc:/3ds/DarkStore/shortcuts";
|
||||||
|
|
||||||
bool v_list = false, v_autoUpdate = true, v_metadata = true, v_updateCheck = true, v_updateNightly = false,
|
bool v_list = false, v_autoUpdate = true, v_metadata = true, v_updateCheck = true,
|
||||||
v_showBg = false, v_customFont = false, v_changelog = true, v_prompt = true, v_3dsxInFolder = false;
|
v_showBg = false, v_customFont = false, v_changelog = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
#define APP_TITLE "DarkStore"
|
#define APP_TITLE "DarkStore"
|
||||||
|
#define VERSION_STRING "12.0"
|
||||||
|
|
||||||
enum DownloadError {
|
enum DownloadError {
|
||||||
DL_ERROR_NONE = 0,
|
DL_ERROR_NONE = 0,
|
||||||
@@ -37,7 +38,7 @@ enum DownloadError {
|
|||||||
DL_ERROR_ALLOC,
|
DL_ERROR_ALLOC,
|
||||||
DL_ERROR_STATUSCODE,
|
DL_ERROR_STATUSCODE,
|
||||||
DL_ERROR_GIT,
|
DL_ERROR_GIT,
|
||||||
DL_CANCEL, // No clue if that's needed tho.
|
DL_CANCEL, // Aucune idée si c’est nécessaire.
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StoreList {
|
struct StoreList {
|
||||||
@@ -57,28 +58,28 @@ Result downloadToFile(const std::string &url, const std::string &path);
|
|||||||
Result downloadFromRelease(const std::string &url, const std::string &asset, const std::string &path, bool includePrereleases);
|
Result downloadFromRelease(const std::string &url, const std::string &asset, const std::string &path, bool includePrereleases);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check Wi-Fi status.
|
Vérifiez l’état du Wi-Fi.
|
||||||
@return True if Wi-Fi is connected; false if not.
|
@return True si le Wi-Fi est connecté ; false si non.
|
||||||
*/
|
*/
|
||||||
bool checkWifiStatus(void);
|
bool checkWifiStatus(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Display "Please connect to Wi-Fi" for 2s.
|
Afficher "Veuillez vous connecter au Wi-Fi" pour 2s.
|
||||||
*/
|
*/
|
||||||
void notConnectedMsg(void);
|
void notConnectedMsg(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Display "Not Implemented Yet" for 2s.
|
Affiche "Not Implemented Yet" pour 2s.
|
||||||
*/
|
*/
|
||||||
void notImplemented(void);
|
void notImplemented(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Display the done msg.
|
Afficher le msg done.
|
||||||
*/
|
*/
|
||||||
void doneMsg(void);
|
void doneMsg(void);
|
||||||
|
|
||||||
bool IsUpdateAvailable(const std::string &URL, int revCurrent);
|
bool IsUpdateAvailable(const std::string &URL, int revCurrent);
|
||||||
bool DownloadStore(const std::string &URL, int currentRev, std::string &fl, bool isDownload = false, bool isDS = false);
|
bool DownloadEshop(const std::string &URL, int currentRev, std::string &fl, bool isDownload = false, bool isUDB = false);
|
||||||
bool DownloadSpriteSheet(const std::string &URL, const std::string &file);
|
bool DownloadSpriteSheet(const std::string &URL, const std::string &file);
|
||||||
DSUpdate IsDSUpdateAvailable();
|
DSUpdate IsDSUpdateAvailable();
|
||||||
void UpdateAction();
|
void UpdateAction();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -39,13 +39,13 @@ struct DirEntry {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Store Info struct.
|
Information de la structure de l'eShop
|
||||||
*/
|
*/
|
||||||
struct StoreInfo {
|
struct EshopInfo {
|
||||||
std::string Title;
|
std::string Title;
|
||||||
std::string Author;
|
std::string Author;
|
||||||
std::string URL;
|
std::string URL;
|
||||||
std::string File; // Used to check, if File does NOT contain a slash or so.
|
std::string File; // Permet de vérifier si le fichier ne contient PAS de barre oblique.
|
||||||
std::string FileName;
|
std::string FileName;
|
||||||
std::string Description;
|
std::string Description;
|
||||||
int Version;
|
int Version;
|
||||||
@@ -56,8 +56,9 @@ struct StoreInfo {
|
|||||||
bool nameEndsWith(const std::string &name, const std::vector<std::string> &extensionList);
|
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, const std::vector<std::string> &extensionList);
|
||||||
void getDirectoryContents(std::vector<DirEntry> &dirContents);
|
void getDirectoryContents(std::vector<DirEntry> &dirContents);
|
||||||
|
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList);
|
||||||
|
|
||||||
std::vector<StoreInfo> GetStoreInfo(const std::string &path);
|
std::vector<EshopInfo> GetEshopInfo(const std::string &path);
|
||||||
|
|
||||||
void dirCopy(DirEntry *entry, const char *destinationPath, const char *sourcePath);
|
void dirCopy(DirEntry *entry, const char *destinationPath, const char *sourcePath);
|
||||||
int fcopy(const char *sourcePath, const char *destinationPath);
|
int fcopy(const char *sourcePath, const char *destinationPath);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,6 +34,5 @@ Result openFile(Handle *fileHandle, const char *path, bool write);
|
|||||||
Result deleteFile(const char *path);
|
Result deleteFile(const char *path);
|
||||||
Result removeDir(const char *path);
|
Result removeDir(const char *path);
|
||||||
Result removeDirRecursive(const char *path);
|
Result removeDirRecursive(const char *path);
|
||||||
u64 getAvailableSpace();
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,3 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Updater
|
||||||
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
__ _____ _____ _____
|
__ _____ _____ _____
|
||||||
__| | __| | | | JSON for Modern C++
|
__| | __| | | | JSON for Modern C++
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,3 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Universal-Updater
|
||||||
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
LodePNG version 20201017
|
LodePNG version 20201017
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,51 +32,37 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
/* Extend this, if more statuses are neccessary. */
|
/*
|
||||||
|
Extend this, if more statuses are neccessary.
|
||||||
|
*/
|
||||||
enum class QueueStatus {
|
enum class QueueStatus {
|
||||||
None,
|
None,
|
||||||
Copying,
|
|
||||||
Deleting,
|
|
||||||
Downloading,
|
Downloading,
|
||||||
Extracting,
|
Extracting,
|
||||||
Installing,
|
Installing,
|
||||||
Moving,
|
|
||||||
Request, // For User needed Requests.
|
|
||||||
Failed,
|
Failed,
|
||||||
Done
|
Done
|
||||||
};
|
};
|
||||||
|
|
||||||
enum RequestType {
|
|
||||||
PROMPT_RET = -3,
|
|
||||||
NO_REQUEST = -1,
|
|
||||||
RMDIR_REQUEST = 1, // remove dir prompt request.
|
|
||||||
PROMPT_REQUEST = 2, // skip prompt request.
|
|
||||||
PROMPT_ERROR = 3 // Error message prompt. Unused right now.
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Of course also a namespace to that part, so we can do that in a Thread. */
|
|
||||||
namespace QueueSystem {
|
|
||||||
extern int RequestNeeded, RequestAnswer;
|
|
||||||
extern std::string RequestMsg, EndMsg;
|
|
||||||
extern int LastElement;
|
|
||||||
extern bool Wait, Popup, CancelCallback;
|
|
||||||
|
|
||||||
void QueueHandle(); // Handles the Queue.
|
|
||||||
void AddToQueue(nlohmann::json obj, const C2D_Image &icn, const std::string &name, const std::string &uName, const std::string &eName, const std::string &lUpdated); // Adds to Queue.
|
|
||||||
void ClearQueue(); // Clears the Queue.
|
|
||||||
void Resume();
|
|
||||||
};
|
|
||||||
|
|
||||||
class Queue {
|
class Queue {
|
||||||
public:
|
public:
|
||||||
Queue(nlohmann::json object, const C2D_Image &img, const std::string &name, const std::string &uName, const std::string &eName, const std::string &lUpdated) :
|
Queue(nlohmann::json object, C2D_Image img, std::string name) : obj(object), icn(img), name(name) { };
|
||||||
obj(object), icn(img), total(object.size()), current(QueueSystem::LastElement), name(name), storeName(uName), entryName(eName), lastUpdated(lUpdated) { };
|
|
||||||
|
|
||||||
QueueStatus status = QueueStatus::None;
|
QueueStatus status = QueueStatus::None;
|
||||||
nlohmann::json obj;
|
nlohmann::json obj;
|
||||||
C2D_Image icn;
|
C2D_Image icn;
|
||||||
int total, current;
|
int total, current;
|
||||||
std::string name = "", storeName = "", entryName = "", lastUpdated = "";
|
std::string name = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Of course also a namespace to that part, so we can do that in a Thread.
|
||||||
|
*/
|
||||||
|
namespace QueueSystem {
|
||||||
|
void QueueHandle(); // Handles the Queue.
|
||||||
|
void AddToQueue(nlohmann::json obj, C2D_Image icn, std::string name); // Adds to Queue.
|
||||||
|
void ClearQueue(); // Clears the Queue.
|
||||||
|
|
||||||
|
extern LightLock lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -38,22 +38,21 @@ enum ScriptState {
|
|||||||
SYNTAX_ERROR,
|
SYNTAX_ERROR,
|
||||||
COPY_ERROR,
|
COPY_ERROR,
|
||||||
MOVE_ERROR,
|
MOVE_ERROR,
|
||||||
DELETE_ERROR,
|
DELETE_ERROR
|
||||||
EXTRACT_ERROR
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace ScriptUtils {
|
namespace ScriptUtils {
|
||||||
bool matchPattern(const std::string &pattern, const std::string &tested);
|
bool matchPattern(const std::string &pattern, const std::string &tested);
|
||||||
|
|
||||||
Result removeFile(const std::string &file, bool isARG = false);
|
Result removeFile(const std::string &file, const std::string &message);
|
||||||
void bootTitle(const std::string &TitleID, bool isNAND, bool isARG = false);
|
void bootTitle(const std::string &TitleID, bool isNAND, const std::string &message);
|
||||||
Result prompt(const std::string &message);
|
Result prompt(const std::string &message);
|
||||||
Result copyFile(const std::string &source, const std::string &destination, const std::string &message, bool isARG = false);
|
Result copyFile(const std::string &source, const std::string &destination, const std::string &message, bool isARG = false);
|
||||||
Result renameFile(const std::string &oldName, const std::string &newName, bool isARG = false);
|
Result renameFile(const std::string &oldName, const std::string &newName, const std::string &message);
|
||||||
Result downloadRelease(const std::string &repo, const std::string &file, const std::string &output, bool includePrereleases, const std::string &message, bool isARG = false);
|
Result downloadRelease(const std::string &repo, const std::string &file, const std::string &output, bool includePrereleases, const std::string &message, bool isARG = false);
|
||||||
Result downloadFile(const std::string &file, const std::string &output, const std::string &message, bool isARG = false);
|
Result downloadFile(const std::string &file, const std::string &output, const std::string &message, bool isARG = false);
|
||||||
void installFile(const std::string &file, bool updatingSelf, const std::string &message, bool isARG = false);
|
void installFile(const std::string &file, bool updatingSelf, const std::string &message, bool isARG = false);
|
||||||
Result extractFile(const std::string &file, const std::string &input, const std::string &output, const std::string &message, bool isARG = false);
|
void extractFile(const std::string &file, const std::string &input, const std::string &output, const std::string &message, bool isARG = false);
|
||||||
|
|
||||||
Result runFunctions(nlohmann::json storeJson, int selection, const std::string &entry);
|
Result runFunctions(nlohmann::json storeJson, int selection, const std::string &entry);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of DarkStore
|
* This file is part of Universal-Updater
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
* Copyright (C) 2019-2020 Universal-Team
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,10 +34,9 @@
|
|||||||
namespace StringUtils {
|
namespace StringUtils {
|
||||||
std::string lower_case(const std::string &str);
|
std::string lower_case(const std::string &str);
|
||||||
std::string FetchStringsFromVector(const std::vector<std::string> &fetch);
|
std::string FetchStringsFromVector(const std::vector<std::string> &fetch);
|
||||||
std::string formatBytes(u64 bytes);
|
std::string formatBytes(int bytes);
|
||||||
std::string GetMarkString(int marks);
|
std::string GetMarkString(int marks);
|
||||||
std::vector<std::string> GetMarks(int marks);
|
std::vector<std::string> GetMarks(int marks);
|
||||||
std::string format(const char *fmt_str, ...);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of DarkStore
|
|
||||||
* Copyright (C) 2019-2021 Universal-Team
|
|
||||||
*
|
|
||||||
* 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 _DARKSTORE_THEME_HPP
|
|
||||||
#define _DARKSTORE_THEME_HPP
|
|
||||||
|
|
||||||
#include "json.hpp"
|
|
||||||
#include <citro2d.h>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class Theme {
|
|
||||||
public:
|
|
||||||
Theme(const std::string &ThemeJSON = "sdmc:/3ds/DarkStore/Themes.json");
|
|
||||||
nlohmann::json InitWithDefaultColors(const std::string &ThemePath = "sdmc:/3ds/DarkStore/Themes.json");
|
|
||||||
void LoadTheme(const std::string &ThemeName);
|
|
||||||
std::vector<std::pair<std::string, std::string>> ThemeNames();
|
|
||||||
uint32_t GetThemeColor(const std::string &ThemeName, const std::string &Key, const uint32_t DefaultColor);
|
|
||||||
|
|
||||||
uint32_t BarColor() const { return this->vBarColor; };
|
|
||||||
uint32_t BGColor() const { return this->vBGColor; };
|
|
||||||
uint32_t BarOutline() const { return this->vBarOutline; };
|
|
||||||
uint32_t TextColor() const { return this->vTextColor; };
|
|
||||||
uint32_t EntryBar() const { return this->vEntryBar; };
|
|
||||||
uint32_t EntryOutline() const { return this->vEntryOutline; };
|
|
||||||
uint32_t BoxInside() const { return this->vBoxInside; };
|
|
||||||
uint32_t BoxSelected() const { return this->vBoxSelected; };
|
|
||||||
uint32_t BoxUnselected() const { return this->vBoxUnselected; };
|
|
||||||
uint32_t ProgressbarOut() const { return this->vProgressbarOut; };
|
|
||||||
uint32_t ProgressbarIn() const { return this->vProgressbarIn; };
|
|
||||||
uint32_t SearchBar() const { return this->vSearchBar; };
|
|
||||||
uint32_t SearchBarOutline() const { return this->vSearchBarOutline; };
|
|
||||||
uint32_t SideBarSelected() const { return this->vSideBarSelected; };
|
|
||||||
uint32_t SideBarUnselected() const { return this->vSideBarUnselected; };
|
|
||||||
uint32_t MarkSelected() const { return this->vMarkSelected; };
|
|
||||||
uint32_t MarkUnselected() const { return this->vMarkUnselected; };
|
|
||||||
uint32_t DownListPrev() const { return this->vDownListPrev; };
|
|
||||||
uint32_t SideBarIconColor() const { return this->vSideBarIconColor; };
|
|
||||||
private:
|
|
||||||
uint32_t vBarColor = 0, vBGColor = 0, vBarOutline = 0, vTextColor = 0, vEntryBar = 0, vEntryOutline = 0,
|
|
||||||
vBoxInside = 0, vBoxSelected = 0, vBoxUnselected = 0, vProgressbarOut = 0, vProgressbarIn = 0,
|
|
||||||
vSearchBar = 0, vSearchBarOutline = 0, vSideBarSelected = 0, vSideBarUnselected = 0,
|
|
||||||
vMarkSelected = 0, vMarkUnselected = 0, vDownListPrev = 0, vSideBarIconColor = 0;
|
|
||||||
|
|
||||||
int SelectedTheme = 0;
|
|
||||||
bool Loaded = false;
|
|
||||||
nlohmann::json json = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"DarkStore Homebrew": {
|
|
||||||
"title": "DarkStore Homebrew",
|
|
||||||
"author": "Dark98",
|
|
||||||
"url": "https://ds.dark98.co.uk/app/darkstore-homebrew.store",
|
|
||||||
"description": "DarkStore 3DS Homebrew"
|
|
||||||
},
|
|
||||||
"DarkStore-NDS":{
|
|
||||||
"title":"DarkStore-NDS",
|
|
||||||
"author":"Dark98",
|
|
||||||
"url":"https://ds.dark98.co.uk/app/darkstore-nds.store",
|
|
||||||
"description":"NDS Stuff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"Default": {
|
|
||||||
"BGColor": "#262C4D",
|
|
||||||
"BarColor": "#324962",
|
|
||||||
"BarOutline": "#191E35",
|
|
||||||
"BoxInside": "#1C213A",
|
|
||||||
"BoxSelected": "#6C829B",
|
|
||||||
"BoxUnselected": "#000000",
|
|
||||||
"Description": "DarkStore's default Theme.\n\nBy: Universal-Team",
|
|
||||||
"DownListPrev": "#1C213A",
|
|
||||||
"EntryBar": "#324962",
|
|
||||||
"EntryOutline": "#191E35",
|
|
||||||
"MarkSelected": "#4D6580",
|
|
||||||
"MarkUnselected": "#1C213A",
|
|
||||||
"ProgressbarIn": "#4D6580",
|
|
||||||
"ProgressbarOut": "#1C213A",
|
|
||||||
"SearchBar": "#334B66",
|
|
||||||
"SearchBarOutline": "#191E35",
|
|
||||||
"SideBarIconColor": "#ADCCEF",
|
|
||||||
"SideBarSelected": "#6C829B",
|
|
||||||
"SideBarUnselected": "#4D6580",
|
|
||||||
"TextColor": "#FFFFFF"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 218 KiB |
|
After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 191 KiB |
|
After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 200 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 218 KiB |
|
After Width: | Height: | Size: 214 KiB |