diff --git a/main.cpp b/main.cpp index fdd3db9..2c5b03a 100644 --- a/main.cpp +++ b/main.cpp @@ -5,9 +5,10 @@ int main() { Menu menu; - std::thread t1([=, &menu] { menu.start(); }); t1.join(); + menu.start(); + return 0; } diff --git a/src/arch/arch.cpp b/src/arch/arch.cpp index 819afbc..c926feb 100644 --- a/src/arch/arch.cpp +++ b/src/arch/arch.cpp @@ -1,5 +1,4 @@ #include "arch.h" -#include bool Arch::x64 = false; @@ -39,7 +38,7 @@ bool Arch::checkArrayForDoubles(std::string name) void Arch::filterAllies() { filteredAllies_.clear(); - filteredAllies_.reserve(8); + //filteredAllies_.reserve(8); filteredAllies_.push_back(allies_[0]); for (auto &p : allies_) { diff --git a/src/arch/x64.cpp b/src/arch/x64.cpp index 09fc34f..8fece15 100644 --- a/src/arch/x64.cpp +++ b/src/arch/x64.cpp @@ -29,7 +29,6 @@ x64::~x64() void x64::createAllies() { - allies_.reserve(8); // dx11 64-bit offsets allies_.push_back(new YOU(0x1828AE1)); allies_.push_back(new Ally(0x184A170)); diff --git a/src/menu.cpp b/src/menu.cpp index 307b7e4..7f0c4ac 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -20,7 +20,7 @@ Menu::~Menu() void Menu::displayAllies() { // update play characters names - //fflogs_->arch_->updateNames(fflogs_->ffxiv_, fflogs_->partyMembers_); + fflogs_->arch_->updateNames(fflogs_->ffxiv_, fflogs_->partyMembers_); SetConsoleTextAttribute(hConsole_, 7); @@ -28,7 +28,6 @@ void Menu::displayAllies() std::cout << "FFXIV Party Logs\n"; std::cout << "--------------------\n"; - /* * NOTE: It's impossible to determine people no longer in the party without parsing the chat log * TODO: Maybe in the future @@ -41,6 +40,7 @@ void Menu::displayAllies() { SetConsoleTextAttribute(hConsole_, 23); } + //fflogs_->arch_->getFilteredAllies()[i]->display(); fflogs_->arch_->getFilteredAllies()[i]->display(); } // this prevents the colors from breaking @@ -50,14 +50,14 @@ void Menu::displayAllies() void Menu::redraw() { - std::cout.flush(); + //std::cout.flush(); system("CLS"); displayAllies(); } void Menu::alliesMenu(DWORD &mode, INPUT_RECORD &event, HANDLE &hstdin) { - std::cout.flush(); + //std::cout.flush(); system("CLS"); displayAllies(); prevPartySize_ = fflogs_->partyMembers_; @@ -117,17 +117,5 @@ void Menu::start() std::thread t1([=, &mode, &event, &hstdin] { alliesMenu(mode, event, hstdin); }); - std::thread t2([=] { - while (live_) - { - fflogs_->arch_->updateNames(fflogs_->ffxiv_, fflogs_->partyMembers_); - Sleep(1); - } - }); - - // these threads will run in parallel. - // one thread will power the menu - // the other thread will updatenames t1.join(); - t2.join(); } diff --git a/src/process/module.cpp b/src/process/module.cpp index 48f9760..f0ad600 100644 --- a/src/process/module.cpp +++ b/src/process/module.cpp @@ -1,5 +1,4 @@ #include "module.h" -#include // constructor Module::Module(TCHAR moduleName[])