diff --git a/source-code/data/patches/custom_freeplay_text_example.p b/source-code/data/patches/custom_freeplay_text_example.p index 3780e39..062ff13 100644 --- a/source-code/data/patches/custom_freeplay_text_example.p +++ b/source-code/data/patches/custom_freeplay_text_example.p @@ -12,5 +12,5 @@ IGNORE // "@" omit patch console output // ":" address:bytes (hex) // " " byte byte -// ":!" address:!string ('\0' terminates the string, '\n' new line; both require PD Loader 2.1+) +// ":!" address:!string (escape characters require PD Loader 2.1+) // "IGNORE" skip patch file \ No newline at end of file diff --git a/source-code/source/plugins/Patches/dllmain.cpp b/source-code/source/plugins/Patches/dllmain.cpp index 4069406..673ec48 100644 --- a/source-code/source/plugins/Patches/dllmain.cpp +++ b/source-code/source/plugins/Patches/dllmain.cpp @@ -870,6 +870,34 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING) byte_u = '\n'; i++; break; + case 't': + byte_u = '\t'; + i++; + break; + case 'r': + byte_u = '\r'; + i++; + break; + case 'b': + byte_u = '\b'; + i++; + break; + case 'a': + byte_u = '\a'; + i++; + break; + case 'f': + byte_u = '\f'; + i++; + break; + case 'v': + byte_u = '\v'; + i++; + break; + case '\\': + byte_u = '\\'; + i++; + break; } } if (echo) std::cout << byte_u;