Skip to content

Commit

Permalink
Huge update with many bugfixes and improvements
Browse files Browse the repository at this point in the history
- Updated Feldarian Base Library (previously directly used UTF and PCMS16 modules were moved to more proper sub-folder)
  - Added some options also to the library to compile parts conditionally, defaults should not be changed for this project though!
  - Added ADPCM-XQ as additional dependency (preferred ADPCM encoder/decoder)
  - Got rid of some dependencies in main project and moved them here
  - Package is still WIP and is pretty-much single-purpose, it is a slight modified copy of parts from another project as mentioned few times so it looks like it...
  - Better support for more files (anything libsndfile can open should be importable as PCM S16 WAV at least)
- Better xmake project organization
- Completely new look and basic application managment, utilizing parts of cpp-gui-template-sdl2 template by @MartinHelmut (also added to third party license list, just in case)
- Cleaned-up readme a bit
- Cleaned-up license a bit
- Removed no longer valid options and added new ones
- Removed no longer valid localization and added new ones
- Fixed some more multithreading issues (hopefully last from older code...)
- Fixed progress not showing correct total sometimes
- Added ability to transcode IMA ADPCM (and optionally OGG, default is OFF) files to PCM on export with more conventional sample rate for easier playback (default is ON)
- A bit better system for storing and loading original records
  - When some error is detected, displays error and recreates cache for given archive
  - System is still far from perfect, it is basically duck-taped on top of existing solution and is inefficient in the way it calculates hashes... it should be better with use of std::spans that is planned...
- Allow Blood Money exports in release finally
- Autosave settings on change
- Some other misc changes
  • Loading branch information
WSSDude committed Jul 17, 2023
1 parent 3d41133 commit 2f7a1d5
Show file tree
Hide file tree
Showing 119 changed files with 11,298 additions and 6,016 deletions.
625 changes: 338 additions & 287 deletions LICENSE_ThirdParty.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Format | Open | Save | Export | Import
* Ability to show modified entries in archives thanks to original records caching.
* Automatically ignore unchanged original files from original archives when trying to import.
* Records caching feature can be disabled, same as the option which ignores unchanged files on import. Beware that disabling records caching also causes unchanged files to get imported.
* Currently pre-packaged with __Steam__ data and default __English__ language.
* When you have different version, just remove `data/records` folder and let it regenerate records on first archive reload.
* Cache gets initialized for the first time on archive open.
* It can be reset for each tool under options when needed.
* Currently 2 supported languages - __English__ and __Czech__
* New localizations can be added by copying `data/localization/English.toml`, translating the entries and placing the copied file back into `data/localization`
* For example, you could create `Deutsch.toml` which would contain translations to __German__ language and place it in the mentioned folder.
Expand Down
19 changes: 17 additions & 2 deletions data/localization/English.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ ARCHIVE_DIALOG_SAVE = "Save"
ARCHIVE_DIALOG_SAVE_INTO = "Save into"
ARCHIVE_DIALOG_EXPORT_TO = "Export into"
ARCHIVE_DIALOG_IMPORT_FROM = "Import from"
ARCHIVE_DIALOG_CLOSE = "Close"
ARCHIVE_DIALOG_RELOAD = "Reload"
ARCHIVE_DIALOG_EXIT = "Exit"
ARCHIVE_DIALOG_PROCESSING = "Processing..."
ARCHIVE_DIALOG_PROGRESS_SUMMARY = "Currently processing item {} from {}..."
ARCHIVE_DIALOG_NO_ARCHIVE = "There is currently no opened archive."
ARCHIVE_DIALOG_LOADED_ARCHIVE = "Opened archive:\n{}"
ARCHIVE_DIALOG_FILE_MENU = "File"
SDL2_INITIALIZATION_ERROR = "Couldn't initialize SDL2!\n\"{}\""
MESSAGEBOX_ERROR_GENERIC_TITLE = "Error"
MESSAGEBOX_WARNING_GENERIC_TITLE = "Warning"
HITMAN_DIALOG_LOADING_ORIGINAL_RECORDS = "Loading the original records..."
HITMAN_DIALOG_ERROR_UNKNOWN_FORMAT_IN_ARCHIVE = "Found an unknown format inside the archive!"
HITMAN_DIALOG_ERROR_CORRUPTED_ORIGINAL_RECORDS_CACHE = "Original records cache corrupted for current archive! Trying to rebuild..."
HITMAN_DIALOG_WARNING_IMPORT_LOADING_DATA = "Couldn't load the input data, skipping the import!"
HITMAN_DIALOG_WARNING_IMPORT_DECODING_DATA = "Couldn't decode the input data, skipping the import!"
HITMAN_DIALOG_WARNING_IMPORT_CREATING_NATIVE_DATA = "Couldn't create the native data, skipping the import!"
Expand All @@ -30,11 +35,21 @@ HITMAN_1_DIALOG_ERROR_MISSING_BIN = "Couldn't find the necessary *.bin file!"
HITMAN_23_DIALOG_ERROR_MISSING_SCENES = "Couldn't find the necessary Scenes directory!"
SETTINGS_DIALOG_TITLE = "Settings"
SETTINGS_DIALOG_COMMON_GROUP = "Common"
SETTINGS_DIALOG_HITMAN_RESET_RECORDS_CACHE = "Reset original records cache"
SETTINGS_DIALOG_HITMAN1_GROUP = "Codename 47 Specific"
SETTINGS_DIALOG_HITMAN23_GROUP = "Silent Assassin / Contracts Specific"
SETTINGS_DIALOG_HITMAN4_GROUP = "Blood Money Specific"
SETTINGS_DIALOG_HITMAN4_EXPORT_WITH_LIP_DATA = "Export LIP data block with sound data when available"
SETTINGS_DIALOG_DISABLE_WARNINGS = "Disable warnings"
SETTINGS_DIALOG_CHECK_DATA_ORIGINALITY = "Check the originality of the data in archive"
SETTINGS_DIALOG_IMPORT_ORIGINAL_FILES = "Import the unchanged original files"
SETTINGS_DIALOG_DIRECT_IMPORT = "Import the files directly without conversions (turning this OFF is experimental!)"
SETTINGS_DIALOG_FIX_CHANNELS = "Fix the number of channels on import (turning this OFF is experimental!)"
SETTINGS_DIALOG_FIX_SAMPLE_RATE = "Fix the sample rate on import (turning this OFF is experimental!)"
SETTINGS_DIALOG_TRANSCODE_TO_ORIGINAL_FORMAT = "Transcode to the exact format of original game data on import"
SETTINGS_DIALOG_TRANSCODE_TO_PLAYABLE_FORMAT = "Transcode to easily playable PCM format on export"
SETTINGS_DIALOG_TRANSCODE_OGG_TO_PCM = "Transcode OGG files also to PCM format on export"
SETTINGS_DIALOG_LANGUAGE = "Language"
FILE_DIALOG_FILTER_ALL_SUPPORTED = "All Supported"
FILE_DIALOG_FILTER_HITMAN1_SPEECH = "Codename 47 Speech"
FILE_DIALOG_FILTER_HITMAN23_STREAMS = "Silent Assassin / Contracts Streams"
FILE_DIALOG_FILTER_HITMAN4_STREAMS = "Blood Money Streams"
19 changes: 17 additions & 2 deletions data/localization/Čeština.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ ARCHIVE_DIALOG_SAVE = "Uložit"
ARCHIVE_DIALOG_SAVE_INTO = "Uložit do"
ARCHIVE_DIALOG_EXPORT_TO = "Rozbalit do"
ARCHIVE_DIALOG_IMPORT_FROM = "Vložit z"
ARCHIVE_DIALOG_CLOSE = "Zavřít"
ARCHIVE_DIALOG_RELOAD = "Znovu načíst"
ARCHIVE_DIALOG_EXIT = "Ukončit"
ARCHIVE_DIALOG_PROCESSING = "Processing..."
ARCHIVE_DIALOG_PROGRESS_SUMMARY = "Spracovávám položku {} z {}..."
ARCHIVE_DIALOG_NO_ARCHIVE = "Momentálne není otevřen žáden archiv."
ARCHIVE_DIALOG_LOADED_ARCHIVE = "Momentálne otevřen archiv:\n{}"
ARCHIVE_DIALOG_FILE_MENU = "Soubor"
SDL2_INITIALIZATION_ERROR = "Nepodařilo se inicializovat SDL2! Chyba: \"{}\""
MESSAGEBOX_ERROR_GENERIC_TITLE = "Chyba"
MESSAGEBOX_WARNING_GENERIC_TITLE = "Varování"
HITMAN_DIALOG_LOADING_ORIGINAL_RECORDS = "Načítávám originální data..."
HITMAN_DIALOG_ERROR_UNKNOWN_FORMAT_IN_ARCHIVE = "Neznámej formát souboru v archivu!"
HITMAN_DIALOG_ERROR_CORRUPTED_ORIGINAL_RECORDS_CACHE = "Cache s originálními daty archivu je poškozená! Pokouším se data znovu vytvořit..."
HITMAN_DIALOG_WARNING_IMPORT_LOADING_DATA = "Nepodařilo se načíst data, přeskakuji import!"
HITMAN_DIALOG_WARNING_IMPORT_DECODING_DATA = "Nepodařilo se dekódovat data, přeskakuji import!"
HITMAN_DIALOG_WARNING_IMPORT_CREATING_NATIVE_DATA = "Nepodařilo se vytvořit nativní data, přeskakuji import!"
Expand All @@ -30,11 +35,21 @@ HITMAN_1_DIALOG_ERROR_MISSING_BIN = "Nebyl nalezen nezbitný *.bin soubor s daty
HITMAN_23_DIALOG_ERROR_MISSING_SCENES = "Nebyla nalezena nezbitná zložka Scenes!"
SETTINGS_DIALOG_TITLE = "Nastavení"
SETTINGS_DIALOG_COMMON_GROUP = "Pro všechny"
SETTINGS_DIALOG_HITMAN_RESET_RECORDS_CACHE = "Smazat cache originálních záznamú"
SETTINGS_DIALOG_HITMAN1_GROUP = "Specifické pro Codename 47"
SETTINGS_DIALOG_HITMAN23_GROUP = "Specifické pro Silent Assassin / Contracts"
SETTINGS_DIALOG_HITMAN4_GROUP = "Specifické pro Blood Money"
SETTINGS_DIALOG_HITMAN4_EXPORT_WITH_LIP_DATA = "Exportovat se zvukovými daty také datový blok LIP (pokud je přítomný)"
SETTINGS_DIALOG_DISABLE_WARNINGS = "Vypnout upozornění"
SETTINGS_DIALOG_CHECK_DATA_ORIGINALITY = "Skontrolovat originalitu dat v archivu"
SETTINGS_DIALOG_IMPORT_ORIGINAL_FILES = "Importovat i nezměnené originální soubory"
SETTINGS_DIALOG_DIRECT_IMPORT = "Importovat soubory napřímo bez konverzií (vypnuti tohodle nastavení je experimentální!)"
SETTINGS_DIALOG_FIX_CHANNELS = "Opravit počet kanálů při importu (vypnuti tohodle nastavení je experimentální!)"
SETTINGS_DIALOG_FIX_SAMPLE_RATE = "Opravit vzorkovací frekvenci při importu (vypnuti tohodle nastavení je experimentální!)"
SETTINGS_DIALOG_TRANSCODE_TO_ORIGINAL_FORMAT = "Převést při importu na originální formát"
SETTINGS_DIALOG_TRANSCODE_TO_PLAYABLE_FORMAT = "Převést při exportu na lehce přehratelný PCM formát"
SETTINGS_DIALOG_TRANSCODE_OGG_TO_PCM = "Převést při exportu také OGG soubory na PCM formát"
SETTINGS_DIALOG_LANGUAGE = "Jazyk"
FILE_DIALOG_FILTER_ALL_SUPPORTED = "Všechny podporované"
FILE_DIALOG_FILTER_HITMAN1_SPEECH = "Codename 47 Speech"
FILE_DIALOG_FILTER_HITMAN23_STREAMS = "Silent Assassin / Contracts Streams"
FILE_DIALOG_FILTER_HITMAN4_STREAMS = "Blood Money Streams"
Binary file removed data/records/h1
Binary file not shown.
Binary file added data/records/h1_1C01A5E5515E2754
Binary file not shown.
Binary file added data/records/h1_61B2F1AD80E53F37
Binary file not shown.
Binary file removed data/records/h2
Binary file not shown.
Binary file added data/records/h23_25E9CD9EE932330A
Binary file not shown.
Binary file added data/records/h23_4A998E2FFDB28762
Binary file not shown.
Binary file added data/records/h23_84A8C44058DAB37D
Binary file not shown.
Binary file added data/records/h23_97CD49005A7260FB
Binary file not shown.
Binary file added data/records/h23_B8085EC42984367F
Binary file not shown.
Binary file added data/records/h23_EBB627865BAE612A
Binary file not shown.
Binary file added data/records/h23_FB5E1F0B1C51E3F0
Binary file not shown.
Binary file removed data/records/h3
Binary file not shown.
Binary file removed data/records/h4
Binary file not shown.
Binary file added data/records/h4_8A287D30288020AF
Binary file not shown.
Binary file added data/records/h4_A6C8ED5FFA397C1D
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<dpiAwareness>PerMonitorV2, unaware</dpiAwareness>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor,system</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
31 changes: 31 additions & 0 deletions src/App/Main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// Created by Andrej Redeky.
// Copyright © 2015-2023 Feldarian Softworks. All rights reserved.
// SPDX-License-Identifier: EUPL-1.2
//

#include <Precompiled.hpp>

#include <Core/Application.hpp>
#include <Core/Debug/Instrumentor.hpp>
#include <Core/Log.hpp>

#include <Config/Config.hpp>

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
try {
APP_PROFILE_BEGIN_SESSION_WITH_FILE("App", "profile.json");

{
APP_PROFILE_SCOPE("Test scope");
App::Application app{G1AT_TITLE};
app.run();
}

APP_PROFILE_END_SESSION();
} catch (std::exception& e) {
APP_ERROR("Main process terminated with: {}", e.what());
}

return 0;
}
5 changes: 4 additions & 1 deletion src/Config.h.in → src/Config/Config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

#define G1AT_VERSION_STRING_GIT "${GIT_TAG_LONG}"

#define G1AT_COMPANY_NAMESPACE "${G1AT_COMPANY_NAMESPACE}"
#define G1AT_COMPANY_NAME "${G1AT_COMPANY_NAME}"

#define G1AT_NAME "${G1AT_NAME}"
#define G1AT_DESCRIPTION "${G1AT_DESCRIPTION}"
#define G1AT_HOMEPAGE "${G1AT_HOMEPAGE}"
Expand All @@ -28,7 +31,7 @@
#define NDEBUG 1
#endif

#ifdef G1AT_DEBUG_BUILD
#if G1AT_DEBUG_BUILD
#define G1AT_TITLE G1AT_NAME " (" G1AT_VERSION_STRING_GIT ")"
#else
#define G1AT_TITLE G1AT_NAME " (" G1AT_VERSION_STRING ")"
Expand Down
4 changes: 3 additions & 1 deletion src/Config.hpp → src/Config/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

extern "C"
{

// Generated by xmake from "src/Config.h.in"
#include <Config.h>
#include <Config/Config.h>

}
Loading

0 comments on commit 2f7a1d5

Please sign in to comment.