| 109 | } |
| 110 | |
| 111 | Error GDScriptDecomp::decompile_byte_code(const String &p_path) { |
| 112 | Vector<uint8_t> bytecode; |
| 113 | |
| 114 | if (p_path.get_extension().to_lower() == "gde") { |
| 115 | return decompile_byte_code_encrypted(p_path, GDRESettings::get_singleton()->get_encryption_key()); |
| 116 | } |
| 117 | bytecode = FileAccess::get_file_as_bytes(p_path); |
| 118 | return decompile_buffer(bytecode); |
| 119 | } |
| 120 | |
| 121 | Error GDScriptDecomp::get_buffer_encrypted(const String &p_path, int engine_ver_major, Vector<uint8_t> p_key, Vector<uint8_t> &bytecode) { |
| 122 | Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::READ); |
no test coverage detected