Delikatne zmiany w strukturze PAK. signed char zamiast short

This commit is contained in:
yanczi 2025-12-12 10:12:22 +01:00
parent b4f6d3a85a
commit a84a69cbd6
12 changed files with 330 additions and 73 deletions

View file

@ -70,7 +70,7 @@ bool ViewCargo::View(const std::string& path)
bool ViewCargo::CheckCargoFile(const std::string& path)
{
std::vector<char> magic(signature.length());
short cargoVer = 0;
int8_t cargoVer = 0;
std::ifstream cargo(path, std::ios::binary);
@ -146,7 +146,7 @@ void ViewCargo::GetFileList(const std::string& path)
//-----------------------------------------------------------------------------
// Generowanie wierszy do tabeli
//-----------------------------------------------------------------------------
void ViewCargo::CreateTableRow(const std::string& file, const uint8_t& zip, const uint64_t& hash)
void ViewCargo::CreateTableRow(const std::string& file, const uint8_t& flag, const uint64_t& hash)
{
//Zamiania crc liczbowej na hex string
std::stringstream ss;
@ -161,19 +161,19 @@ void ViewCargo::CreateTableRow(const std::string& file, const uint8_t& zip, cons
ftxui::Element eEnc;
// Ustawianie checkboxów
switch (zip)
switch (flag)
{
case 1:
case FILE_FLAG_COMPRESS:
//eZip = ftxui::text(" [x] ") | ftxui::color(ftxui::Color::Cyan);
//eEnc = ftxui::text(" [ ] ") | ftxui::color(ftxui::Color::White);
tmpList[0] = "[x]";
break;
case 2:
case FILE_FLAG_ENCRYPT:
tmpList[1] = "[x]";
break;
case 3:
case FILE_FLAG_ZIPENC:
tmpList[0] = "[x]";
tmpList[1] = "[x]";
break;