Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Commit

Permalink
Display tweaks and small fix regarding title id not being properly ex…
Browse files Browse the repository at this point in the history
…tracted when displaying the updated cheats
  • Loading branch information
HamletDuFromage committed May 9, 2020
1 parent 2647ad4 commit f077cce
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 4,019 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ test/
*.nacp
*.nro
*.zip
*.ai
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -45,7 +45,7 @@ INCLUDES := include libs/minizip/include
#ROMFS := romfs
APP_TITLE := Cheats Updater
APP_AUTHOR := HamletDuFromage & Acta
APP_VERSION := 1.1.8
APP_VERSION := 1.2.0

#---------------------------------------------------------------------------------
# options for code generation
Expand Down
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -16,9 +16,12 @@ By default, this homebrew will overwrite the existing cheats. If you have your o
Copy the `switch-cheats-updater/` directory to `/switch/` in your sdcard

## Screenshots
![done](https://user-images.githubusercontent.com/61667930/79614220-643e2980-8100-11ea-83ec-0a6002f1f6b5.jpg)
![Home](https://user-images.githubusercontent.com/61667930/81458764-74e03d80-919c-11ea-87da-0073dad8aebe.jpg)
![Done](https://user-images.githubusercontent.com/61667930/81458769-81649600-919c-11ea-813d-6c34bc4266c7.jpg)

## Thanks
[ITotalJustice](https://github.com/ITotalJustice) for his download functions
- [wilsam239 (Acta)](https://github.com/wilsam239) for his [significant QOL contribtions](https://github.com/HamletDuFromage/switch-cheats-updater/pull/3)

The AtlasNX discord for helping me various with libnx questions in the past few weeks
- [ITotalJustice](https://github.com/ITotalJustice) for his download functions

- The AtlasNX discord for helping me various with libnx questions in the past few weeks
4,009 changes: 0 additions & 4,009 deletions icon.ai

This file was deleted.

Binary file modified icon.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions include/titles.hpp
Expand Up @@ -7,6 +7,7 @@
#include <fstream>
#include <string>
#include <vector>
#include <switch.h>

#include "title.h"

Expand Down
2 changes: 1 addition & 1 deletion source/extract.cpp
Expand Up @@ -243,7 +243,7 @@ int extractCheats(std::string zipPath, std::vector<Title> titles, bool sxos, boo
std::cout << std::setfill(' ') << std::setw(80) << '\r';

name = "No name retrieved.";
id = e.substr(7, 16);
id = e.substr(offset, 16);
std::transform(id.begin(), id.end(), id.begin(), ::toupper);

for(int i = 0; i < (int)titles.size(); i++) {
Expand Down
9 changes: 5 additions & 4 deletions source/main.cpp
Expand Up @@ -11,7 +11,7 @@
#include "download.hpp"
#include "titles.hpp"

#define VERSION "1.1.8"
#define VERSION "1.2.0"
#define RELEASE_URL "https://github.com/HamletDuFromage/switch-cheats-db/releases/tag/v1.0"
#define ARCHIVE_URL "https://github.com/HamletDuFromage/switch-cheats-db/releases/download/v1.0/"

Expand Down Expand Up @@ -151,9 +151,9 @@ void viewTitles() {

int total = titles.size();

std::cout << "\033[0;32m" << "Found " << total << " installed titles" << "\033[0m" << std::endl << std::endl;

printTitles(titles);

std::cout << std::endl << "\033[0;32m" << "Found " << total << " installed titles" << "\033[0m" << std::endl;

std::cout << std::endl;

Expand All @@ -164,11 +164,12 @@ void viewHeader() {
std::cout << "\033[1;31m" << "Cheats Updater v" << VERSION << " by HamletDuFromage & Acta" << "\033[0m" <<std::endl;
std::cout << "\033[31m" << "================================================================================" << "\033[0m" << std::endl;
std::cout << std::endl;
consoleUpdate(NULL);
}
void viewMain() {
viewHeader();

std::cout << "\033[36m" << "Title ids listed in \"/config/cheats-updater/exclude.txt\" won't get cheat updates" << "\033[0m" << std::endl;
std::cout << "\033[36m" << "Title IDs listed in \"/config/cheats-updater/exclude.txt\" won't get cheat updates" << "\033[0m" << std::endl;

std::cout << "Press [A] to download and update cheat files" << std::endl;
std::cout << "Press [B] to view installed titles" << std::endl;
Expand Down
6 changes: 5 additions & 1 deletion source/titles.cpp
@@ -1,5 +1,6 @@
#include "titles.hpp"


/**
* writeTitlesToFile
* Writes the input vector to the updated.dat file in config
Expand Down Expand Up @@ -48,7 +49,9 @@ std::vector<Title> readTitlesFromFile() {
**/
void outputUpdatedTitles() {
std::vector<Title> titles = readTitlesFromFile();
std::cout << "Updated Titles:" << std::endl << std::endl;

std::cout << "Updated Titles:" << std::endl;

printTitles(titles);

std::cout << "\033[7;37m"<< "\nPress [-] to return to main menu" << "\033[0m" <<std::endl;
Expand All @@ -67,5 +70,6 @@ void printTitles(std::vector<Title> titles) {
titles.at(i).name.append("...");
}
std::cout << "\033[1;37m" << "Title ID: " << "\033[0m" << titles.at(i).id << "\033[1;37m" << " Title Name: " << "\033[0m" << titles.at(i).name << std::endl;
consoleUpdate(NULL);
}
}

0 comments on commit f077cce

Please sign in to comment.