Skip to content

Commit

Permalink
Updated README.md, fixed third party licenses, added docs for formats…
Browse files Browse the repository at this point in the history
… (WIP)
  • Loading branch information
WSSDude committed Jul 2, 2023
1 parent d27ed7e commit 1b241df
Show file tree
Hide file tree
Showing 15 changed files with 666 additions and 35 deletions.
95 changes: 95 additions & 0 deletions LICENSE_ThirdParty.md
Original file line number Diff line number Diff line change
Expand Up @@ -819,3 +819,98 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# NotoSans
Copyright 2022 The Noto Project Authors (https://github.com/notofonts)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
71 changes: 44 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
# Hitman Audio Tool
# Glacier 1 Audio Tool

## Supported

### Hitman: Codename 47
Format | Open | Save | Export | Import
:---|:---:|:---:|:---:|:---:
\*.IDX + \*.BIN | ✔ | ✔ | ✔ | ✔
Repeat.WAV + PackRepeat.WAV | ✘ | ✘ | ✘ | ✘


### Hitman: Silent Assassin
Format | Open | Save | Export | Import
:---|:---:|:---:|:---:|:---:
\*.WAV + \*.WHD + streams.wav | ✔ | ✔ | ✔ | ✔
\*.SND (in scene's \*.ZIP) | ✘ | ✘ | ✘ | ✘

### Hitman: Contracts
Format | Open | Save | Export | Import
:---|:---:|:---:|:---:|:---:
\*.WAV + \*.WHD + streams.wav | ✔ | ✔ | ✔ | ✔
\*.SND (in scene's \*.ZIP) | ✘ | ✘ | ✘ | ✘

### Hitman: Blood Money
Format | Open | Save | Export | Import
:---|:---:|:---:|:---:|:---:
\*.WAV + \*.WHD + \*.STR | ✔ | ✘ | ✔ | ✘
\*.SND (in scene's \*.ZIP) | ✘ | ✘ | ✘ | ✘

## Features
* Full support of import and export of the Hitman: Codename 47 *.idx/*.bin pairs existing entries
* Support for adding new ones is not planned for now
* Full supports of import and export of the Hitman 2: Silent Assassin and Hitman 3: Silent Assassin *.whd/*.wav pairs + streams.wav existing entries
* Support for adding new ones is not planned for now
* Automatically convert input data to exact game format
* Note that reimported files won't be 100% the same, but they will have exact same format (unless user tunes the options)
* Tool can also import all audio in highest quality as PCM 16-bit signed WAVs
* Conversions can be completely disabled, in which case tool tries to import data directly
* Automatically ignore unchanged original files from original archives when trying to import
* This feature can be turned off in case someone wants to reimport original files also for whatever reason
* Currently 2 supported languages - English and Czech
* Supports multiple Glacier 1 games (see list of supported formats and games above).
* Import and save functionality currently only encompasses replacements, not new additions.
* Automatically converts data to desired format on import.
* Offers nearly perfect reimport of data with default settings (imperfections are there only due to decompression and recompression).
* Ability to import in highest quality PCM S16 (best quality format game supports out of the box, this is not default and enabling this is experimental!).
* Automatically fixes number of channels and sample rate (both are enabled by default, disabling these options is experimental!).
* Tool can try to import data as-is for fastest imports (not enabled by default, disabling this option is experimental!).
* 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.
* 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
* New option would then appear in the Options tab under Language
* If newly added language is missing glyphs in fonts used by the tool, you may add additional font defining them into `data/fonts` folder (note that fonts are currently being read in alphabetical order)
* For example, you could create `Deutsch.toml` which would contain translations to __German__ language and place it in the mentioned folder.
* New option would then appear in the __Options__ tab under __Language__.
* If newly added language is missing glyphs in fonts used by the tool, you may add additional font defining them into `data/fonts` folder (note that fonts are currently being read in alphabetical order, first font should always be the base font!).

## Future
* Definitely some more cleanup/refactor of the source code
* Code is clean enough to be readable and usable I would say, but it lacks comments and there is still a lot of duplication all around
* Some parts are also glued together from my previous projects, so there is inconsistent styling and some other stuff...
* I would still consider the tool in its early stages, but it can do much more for old Hitman 1, 2 and 3 games than the old Hitman Audio Tool floating around the internet (not mentioning it not correctly interpreting parts of the data, making exports broken and import from these exports impossible)
* I would like to expand this beyond older Hitman titles to all Glacier 1 games
* Freedom Fighters should be technically already in working state also, just have to update few smaller things in the tool
* Potential rename of the tool (considering it should support all Glacier 1 games....)
* Version 1.0.0 tagged code contains Hitman: Blood Money WIP code which seems to work for exports
* This code is currently locked under debug builds, so you have to build the tool yourself if you want to try this feature out for now
* Will be made as part of regular release when I figure out enough to be able to reliably import the files back and save the archives

## Used "Open-Source Licensed" Tools
* [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.
* [ReSharper C++](https://www.jetbrains.com/community/opensource/#support) - provides multiple features for increasing productivity when working with C++ code.
Expand Down
8 changes: 4 additions & 4 deletions data/localization/English.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ SETTINGS_DIALOG_COMMON_GROUP = "Common"
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"
SETTINGS_DIALOG_FIX_CHANNELS = "Fix the number of channels"
SETTINGS_DIALOG_FIX_SAMPLE_RATE = "Fix the sample rate"
SETTINGS_DIALOG_TRANSCODE_TO_ORIGINAL_FORMAT = "Transcode to the exact format of original game data"
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_LANGUAGE = "Language"
8 changes: 4 additions & 4 deletions data/localization/Čeština.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ SETTINGS_DIALOG_COMMON_GROUP = "Pro všechny"
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í"
SETTINGS_DIALOG_FIX_CHANNELS = "Opravit počet kanálů"
SETTINGS_DIALOG_FIX_SAMPLE_RATE = "Opravit vzorkovací frekvenci"
SETTINGS_DIALOG_TRANSCODE_TO_ORIGINAL_FORMAT = "Transkódovat na originální formát"
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_LANGUAGE = "Jazyk"
Loading

0 comments on commit 1b241df

Please sign in to comment.