[Patches] Support most escape characters
This commit is contained in:
@@ -12,5 +12,5 @@ IGNORE
|
|||||||
// "@" omit patch console output
|
// "@" omit patch console output
|
||||||
// ":" address:bytes (hex)
|
// ":" address:bytes (hex)
|
||||||
// " " byte byte
|
// " " 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
|
// "IGNORE" skip patch file
|
||||||
@@ -870,6 +870,34 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING)
|
|||||||
byte_u = '\n';
|
byte_u = '\n';
|
||||||
i++;
|
i++;
|
||||||
break;
|
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;
|
if (echo) std::cout << byte_u;
|
||||||
|
|||||||
Reference in New Issue
Block a user