Skip to content

Commit

Permalink
show save for last title used only
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Sep 2, 2020
1 parent 3282efd commit ff25455
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"DEBUG",
"SWITCH",
"__SWITCH__",
"VERSION_STRING=\"3.1.0\""
"VERSION_STRING=\"3.7.3\""
],
"compilerPath": "F:/devkitPro/devkitA64/bin/aarch64-none-elf-g++",
"cStandard": "c11",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
VERSION_MAJOR := 3
VERSION_MINOR := 7
VERSION_MICRO := 2
VERSION_MICRO := 3
NIGHTLY :=

APP_TITLE := EdiZon SE
Expand Down
2 changes: 1 addition & 1 deletion include/guis/gui_guide.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <unordered_map>
#include <stdbool.h>

#define GUIDE_PAGE_CNT 10
#define GUIDE_PAGE_CNT 1

class GuiGuide : public Gui {
public:
Expand Down
1 change: 1 addition & 0 deletions include/helpers/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Config {
char magic[8];
bool hideSX;
char latestCommit[40];
u64 lasttitle = 0;
} config_data_t;

void readConfig();
Expand Down
13 changes: 3 additions & 10 deletions romfs/guide/1/1/config.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"images" : [
{
"title" : "",
"path" : "banner.bin",
"x" : 0,
"y" : 50,
"w" : 1280,
"h" : 348
}

],
"text" : [
{
"title" : "Introduction",
"title" : "Introduction to EdiZon SE",
"path" : "text.txt",
"x" : 50,
"y" : 410
"y" : 100
}
]
}
26 changes: 19 additions & 7 deletions romfs/guide/1/1/text.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
EdiZon is a all-in-one Homebrew for save file management, save file editing,
memory manipulation and cheat management. This quick start guide will guide you
through all of the features EdiZon has to offer.

If you have any questions about a topic that isn't covered in this guide (like for example
how to create your own save file editors or cheats) please visit EdiZon's GitHub
Readme and Wiki or join our Discord server.
This fork is based on the foundation of EdiZon 3.1 nightly. The changes made are on the game memory hack aspect.

Here are the added features:
Range search.
Compare with previous value search.
Bookmark memory location found.
Speed enhancement to make small integer value in first search practicle.
Bookmark adjust to changing main and heap start address on subsequent launch of the game.
Bookmark with pointer chain attached updates memory address dynamically when the chain is able to resolve into a valid memory address.
Extract memory address from dmnt cheat code and add it to bookmark for exploration of the memory location.
Rebase feature to extract potential pointer chain form dmnt cheat code made for previous version of the game.
In app pointer chain search for address on bookmark.
Export dump to PC app (forked from pointersearcher 0.4) for more powerful pointer chain search.
Import PC app search result for validation and testing.
Create dmnt cheat code from pointer chain found.
Ability to detach dmnt from game process.
Adding/Removing conditional button to cheat code.

Please refer to https://github.com/tomvita/EdiZon-SE/wiki for instructions on how to use the app.
26 changes: 13 additions & 13 deletions source/guis/gui_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@ void GuiAbout::draw() {
else
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT);

Gui::drawTextAligned(fontHuge, 100, 180, Gui::makeColor(0xFB, 0xA6, 0x15, 0xFF), "EdiZon v" VERSION_STRING, ALIGNED_LEFT);
Gui::drawTextAligned(font20, 130, 190, currTheme.separatorColor, "by WerWolv", ALIGNED_LEFT);
Gui::drawTextAligned(fontHuge, 100, 180, Gui::makeColor(0xFB, 0xA6, 0x15, 0xFF), "EdiZon SE v" VERSION_STRING, ALIGNED_LEFT);
Gui::drawTextAligned(font20, 130, 190, currTheme.separatorColor, "by Tomvita", ALIGNED_LEFT);

Gui::drawTextAligned(font14, 120, 250, currTheme.textColor, "Special thank to anybody who got involved into this project.", ALIGNED_LEFT);
Gui::drawTextAligned(font14, 120, 270, currTheme.textColor, "Especially to all the config/cheat developers that brought this project to life!", ALIGNED_LEFT);
Gui::drawTextAligned(font14, 120, 250, currTheme.textColor, "Special thank to WerWolv who made the original EdiZon and the help and advise he gave.", ALIGNED_LEFT);
// Gui::drawTextAligned(font14, 120, 270, currTheme.textColor, "Especially to all the config/cheat developers that brought this project to life!", ALIGNED_LEFT);

Gui::drawTextAligned(font14, 900, 250, Gui::makeColor(0x51, 0x97, 0xF0, 0xFF), "Twitter: https://twitter.com/WerWolv", ALIGNED_LEFT);
Gui::drawTextAligned(font14, 900, 275, Gui::makeColor(0x1A, 0x5E, 0xA7, 0xFF), "PayPal: https://werwolv.net/donate", ALIGNED_LEFT);
// Gui::drawTextAligned(font14, 900, 250, Gui::makeColor(0x51, 0x97, 0xF0, 0xFF), "Twitter: https://twitter.com/WerWolv", ALIGNED_LEFT);
// Gui::drawTextAligned(font14, 900, 275, Gui::makeColor(0x1A, 0x5E, 0xA7, 0xFF), "PayPal: https://werwolv.net/donate", ALIGNED_LEFT);


Gui::drawRectangled(50, 350, Gui::g_framebuffer_width - 100, 250, currTheme.textColor);
Gui::drawRectangled(51, 351, Gui::g_framebuffer_width - 102, updateAvailable ? 190 : 248, currTheme.backgroundColor);
Gui::drawShadow(52, 352, Gui::g_framebuffer_width - 104, 248);

if (updateAvailable)
Gui::drawTextAligned(font20, Gui::g_framebuffer_width / 2, 555, currTheme.backgroundColor, "A update for EdiZon, save editor or cheat is available!", ALIGNED_CENTER);
// if (updateAvailable)
// Gui::drawTextAligned(font20, Gui::g_framebuffer_width / 2, 555, currTheme.backgroundColor, "A update for EdiZon SE is available!", ALIGNED_CENTER);

Gui::drawTextAligned(font20, 60, 360, currTheme.selectedColor, "EdiZon Update", ALIGNED_LEFT);
// Gui::drawTextAligned(font20, 60, 360, currTheme.selectedColor, "EdiZon SE Update", ALIGNED_LEFT);

Gui::drawTextAligned(font14, 80, 400, currTheme.textColor, std::string("Latest EdiZon version: " + (remoteVersion == "" ? "..." : remoteVersion)).c_str(), ALIGNED_LEFT);
Gui::drawTextAligned(font14, 80, 425, currTheme.textColor, std::string("Latest database commit: [ " + (remoteCommitSha == "" ? "..." : remoteCommitSha) + " ] ").c_str(), ALIGNED_LEFT);
Gui::drawTextAligned(font14, 90, 450, currTheme.separatorColor, (remoteCommitMessage == "" ? "..." : remoteCommitMessage.c_str()), ALIGNED_LEFT);
// Gui::drawTextAligned(font14, 80, 400, currTheme.textColor, std::string("Latest EdiZon SE version: " + (remoteVersion == "" ? "..." : remoteVersion)).c_str(), ALIGNED_LEFT);
// Gui::drawTextAligned(font14, 80, 425, currTheme.textColor, std::string("Latest database commit: [ " + (remoteCommitSha == "" ? "..." : remoteCommitSha) + " ] ").c_str(), ALIGNED_LEFT);
// Gui::drawTextAligned(font14, 90, 450, currTheme.separatorColor, (remoteCommitMessage == "" ? "..." : remoteCommitMessage.c_str()), ALIGNED_LEFT);

Gui::endDraw();
}
Expand Down Expand Up @@ -164,5 +164,5 @@ static void getVersionInfoAsync(void* args) {

curl_easy_cleanup(curl);

updateAvailable = (strcmp(remoteCommitSha.c_str(), Config::getConfig()->latestCommit) != 0 && strcmp(remoteCommitSha.c_str(), "???") != 0);
// updateAvailable = (strcmp(remoteCommitSha.c_str(), Config::getConfig()->latestCommit) != 0 && strcmp(remoteCommitSha.c_str(), "???") != 0);
}
6 changes: 4 additions & 2 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <thread>

#include "helpers/util.h"

#include "helpers/config.hpp"
#include "edizon_logo_bin.h"
// #define checkheap
// #define printpointerchain
Expand Down Expand Up @@ -127,6 +127,8 @@ GuiCheats::GuiCheats() : Gui()
// reloadcheatsfromfile(m_buildID, m_debugger->getRunningApplicationTID());
// dumpcodetofile();
iconloadcheck();
Config::getConfig()->lasttitle = m_debugger->getRunningApplicationTID();
Config::writeConfig();

dmntchtGetCheatCount(&m_cheatCnt);

Expand Down Expand Up @@ -594,7 +596,7 @@ void GuiCheats::draw()
Gui::drawTextAligned(font14, 700, 142, currTheme.textColor, "Others", ALIGNED_LEFT);

ss.str("");
ss << "EdiZon SE : 3.7.2";
ss << "EdiZon SE : 3.7.3";
if (m_32bitmode)
ss << " 32 bit pointer mode";
Gui::drawTextAligned(font14, 900, 62, currTheme.textColor, ss.str().c_str(), ALIGNED_LEFT);
Expand Down
2 changes: 1 addition & 1 deletion source/guis/gui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void GuiMain::draw() {

Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 8, 3, currTheme.separatorColor, timeBuffer, ALIGNED_RIGHT);
Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 80, 3, currTheme.separatorColor, batteryBuffer, ALIGNED_RIGHT);
Gui::drawTextAligned(font14, 8, 3, currTheme.separatorColor, "EdiZon v" VERSION_STRING, ALIGNED_LEFT);
Gui::drawTextAligned(font14, 8, 3, currTheme.separatorColor, "EdiZon SE v" VERSION_STRING, ALIGNED_LEFT);

Gui::drawRectangled(Gui::g_framebuffer_width - 72, 5, 7, 18, currTheme.separatorColor);
Gui::drawRectangled(Gui::g_framebuffer_width - 75, 8, 13, 18, currTheme.separatorColor);
Expand Down
11 changes: 10 additions & 1 deletion source/helpers/save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "helpers/account.hpp"
#include "helpers/title.hpp"
#include "helpers/debugger.hpp"
#include "helpers/config.hpp"
using json = nlohmann::json;

s32 deleteDirRecursively(const char *path, bool isSave)
Expand Down Expand Up @@ -182,10 +183,18 @@ Result _getSaveList(std::vector<FsSaveDataInfo> &saveInfoList)
saveInfoList.push_back(info);
break;
}
else if ((info.save_data_type == FsSaveDataType_Account) && (Config::getConfig()->lasttitle) != 0 )
{
if (info.application_id == Config::getConfig()->lasttitle)
{
saveInfoList.push_back(info);
break;
}
}
else if ((info.save_data_type == FsSaveDataType_Account) && (l_debugger->getRunningApplicationTID() == 0)) // hacked to get only the running title
{
saveInfoList.push_back(info);
}
}
}

fsSaveDataInfoReaderClose(&iterator);
Expand Down
2 changes: 1 addition & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ int main(int argc, char **argv)
currGui->draw();
}

Config::readConfig();
initTitles();

printf("%s\n", EDIZON_DIR);

createFolders();

Config::readConfig();


if (isServiceRunning("tx") && !isServiceRunning("rnx") && !Config::getConfig()->hideSX)
Expand Down

0 comments on commit ff25455

Please sign in to comment.