-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e26c871
commit 7a193e5
Showing
9 changed files
with
86 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
# Options reference (.ini) | ||
``` | ||
```ini | ||
[BASSMUSIC] | ||
|
||
; Transition time between audio themes in miliseconds | ||
TransitionTime = 2000.0 | ||
|
||
; Disable reverb effect globally | ||
ForceDisableReverb = false | ||
|
||
; Force fade-in fade-out transition even if theme doesn't specify it | ||
ForceFadeTransition = false | ||
|
||
; Creates C_MUSICTHEME class in main parser to make it easier to use scriptable interface. | ||
; It does not provide any coop with music parser. | ||
CreateMainParserCMusicTheme = true | ||
|
||
; Logger level for Union console (DEBUG, INFO, WARN, ERROR, OFF) | ||
LoggerLevelUnion=INFO | ||
|
||
; Logger level for ZSpy console (DEBUG, INFO, WARN, ERROR, OFF) | ||
LoggerLevelZSpy=DEBUG | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,55 @@ | ||
#include "Union.h" | ||
#include <ZenGin/zGothicAPI.h> | ||
#include <NH/BassOptions.h> | ||
|
||
namespace NH | ||
{ | ||
namespace Log | ||
{ | ||
inline bool ShouldLog(Level level, Union::StringUTF8 config) | ||
{ | ||
if (level == Level::DEBUG) return config == "DEBUG"; | ||
if (level == Level::INFO) return config == "DEBUG" || config == "INFO"; | ||
if (level == Level::WARN) return config == "DEBUG" || config == "INFO" || config == "WARN"; | ||
if (level == Level::ERROR) return config == "DEBUG" || config == "INFO" || config == "WARN" || config == "ERROR"; | ||
return false; | ||
} | ||
|
||
void Message(Level level, Union::StringUTF8 channel, Union::StringUTF8 message) | ||
{ | ||
Union::StringUTF8 output = ""; | ||
switch (level) | ||
{ | ||
case Level::DEBUG: | ||
output = Union::StringUTF8::Format("\x1B[1;97;45mzBassMusic DEBUG \x1B[0m\x1B[95m %s: %s", channel, message); | ||
break; | ||
case Level::INFO: | ||
output = Union::StringUTF8::Format("\x1B[1m\x1B[37m\x1B[44mzBassMusic INFO \x1B[0m\x1B[94m %s: %s", channel, message); | ||
break; | ||
case Level::WARN: | ||
output = Union::StringUTF8::Format("\x1B[1m\x1B[37m\x1B[43mzBassMusic WARN \x1B[0m\x1B[93m %s: %s", channel, message); | ||
break; | ||
case Level::ERROR: | ||
output = Union::StringUTF8::Format("\x1B[1m\x1B[97m\x1B[41mzBassMusic ERROR \x1B[0m\x1B[91m %s: %s", channel, message); | ||
break; | ||
if (ShouldLog(level, NH::Bass::Options.LoggerLevelUnion)) { | ||
Union::StringUTF8 output = ""; | ||
switch (level) | ||
{ | ||
case Level::DEBUG: | ||
output = Union::StringUTF8::Format("\x1B[1;97;45mzBassMusic DEBUG \x1B[0m\x1B[95m %s: %s", channel, message); | ||
break; | ||
case Level::INFO: | ||
output = Union::StringUTF8::Format("\x1B[1m\x1B[37m\x1B[44mzBassMusic INFO \x1B[0m\x1B[94m %s: %s", channel, message); | ||
break; | ||
case Level::WARN: | ||
output = Union::StringUTF8::Format("\x1B[1m\x1B[37m\x1B[43mzBassMusic WARN \x1B[0m\x1B[93m %s: %s", channel, message); | ||
break; | ||
case Level::ERROR: | ||
output = Union::StringUTF8::Format("\x1B[1m\x1B[97m\x1B[41mzBassMusic ERROR \x1B[0m\x1B[91m %s: %s", channel, message); | ||
break; | ||
} | ||
output.StdPrintLine(); | ||
} | ||
output.StdPrintLine(); | ||
|
||
#ifdef __G1 | ||
if (GetGameVersion() == Engine_G1) | ||
{ | ||
auto msg = Gothic_I_Classic::zSTRING("B:\tBASSMUSIC: ") + Gothic_I_Classic::zSTRING(channel.ToChar()) + Gothic_I_Classic::zSTRING(": ") + Gothic_I_Classic::zSTRING(message.ToChar()); | ||
Gothic_I_Classic::zerr->Message(msg); | ||
} | ||
#endif | ||
#ifdef __G2A | ||
if (GetGameVersion() == Engine_G2A) | ||
{ | ||
auto msg = Gothic_II_Addon::zSTRING("B:\tBASSMUSIC: ") + Gothic_II_Addon::zSTRING(channel.ToChar()) + Gothic_II_Addon::zSTRING(": ") + Gothic_II_Addon::zSTRING(message.ToChar()); | ||
Gothic_II_Addon::zerr->Message(msg); | ||
if (ShouldLog(level, NH::Bass::Options.LoggerLevelZSpy)) { | ||
if (GetGameVersion() == Engine_G1) | ||
{ | ||
auto msg = Gothic_I_Classic::zSTRING("B:\tBASSMUSIC: ") + Gothic_I_Classic::zSTRING(channel.ToChar()) + Gothic_I_Classic::zSTRING(": ") + Gothic_I_Classic::zSTRING(message.ToChar()); | ||
Gothic_I_Classic::zerr->Message(msg); | ||
} | ||
|
||
if (GetGameVersion() == Engine_G2A) | ||
{ | ||
auto msg = Gothic_II_Addon::zSTRING("B:\tBASSMUSIC: ") + Gothic_II_Addon::zSTRING(channel.ToChar()) + Gothic_II_Addon::zSTRING(": ") + Gothic_II_Addon::zSTRING(message.ToChar()); | ||
Gothic_II_Addon::zerr->Message(msg); | ||
} | ||
} | ||
#endif | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters