MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_script_strings_from_buf

Method get_script_strings_from_buf

bytecode/bytecode_base.cpp:1540–1554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1538}
1539
1540Error GDScriptDecomp::get_script_strings_from_buf(const Vector<uint8_t> &p_buffer, Vector<String> &r_strings, bool p_include_identifiers) {
1541 ScriptState script_state;
1542 Error err = get_script_state(p_buffer, script_state);
1543 ERR_FAIL_COND_V_MSG(err != OK, err, "Error parsing bytecode");
1544 const String engine_version = get_engine_version();
1545 for (int i = 0; i < script_state.constants.size(); i++) {
1546 gdre::get_strings_from_variant(script_state.constants[i], r_strings, engine_version);
1547 }
1548 if (p_include_identifiers) {
1549 for (int i = 0; i < script_state.identifiers.size(); i++) {
1550 r_strings.push_back(script_state.identifiers[i]);
1551 }
1552 }
1553 return OK;
1554}
1555
1556Vector<String> GDScriptDecomp::get_compile_errors(const Vector<uint8_t> &p_buffer) {
1557 int bytecode_version = get_bytecode_version();

Callers 2

get_script_stringsMethod · 0.80

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected