| 93 | } |
| 94 | |
| 95 | Error GDScriptDecomp::decompile_byte_code_encrypted(const String &p_path, Vector<uint8_t> p_key) { |
| 96 | Vector<uint8_t> bytecode; |
| 97 | Error err = get_buffer_encrypted(p_path, get_engine_ver_major(), p_key, bytecode); |
| 98 | if (err != OK) { |
| 99 | if (err == ERR_BUG) { |
| 100 | error_message = RTR("FAE doesn't exist...???"); |
| 101 | } else if (err == ERR_UNAUTHORIZED) { |
| 102 | error_message = RTR("Encryption Error"); |
| 103 | } else { |
| 104 | error_message = RTR("File Error"); |
| 105 | } |
| 106 | ERR_FAIL_V_MSG(err, error_message); |
| 107 | } |
| 108 | return decompile_buffer(bytecode); |
| 109 | } |
| 110 | |
| 111 | Error GDScriptDecomp::decompile_byte_code(const String &p_path) { |
| 112 | Vector<uint8_t> bytecode; |