mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp
This commit is contained in:
parent
74907876d3
commit
97ee05e9b7
53 changed files with 220 additions and 197 deletions
|
|
@ -1028,10 +1028,10 @@ void ResourceLoaderBinary::open(Ref<FileAccess> p_f, bool p_no_resources, bool p
|
|||
print_bl("minor: " + itos(ver_minor));
|
||||
print_bl("format: " + itos(ver_format));
|
||||
|
||||
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
|
||||
if (ver_format > FORMAT_VERSION || ver_major > GODOT_VERSION_MAJOR) {
|
||||
f.unref();
|
||||
ERR_FAIL_MSG(vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).",
|
||||
local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH));
|
||||
local_path, ver_format, ver_major, ver_minor, GODOT_VERSION_BRANCH));
|
||||
}
|
||||
|
||||
type = get_unicode_string();
|
||||
|
|
@ -1155,7 +1155,7 @@ String ResourceLoaderBinary::recognize(Ref<FileAccess> p_f) {
|
|||
f->get_32(); // ver_minor
|
||||
uint32_t ver_fmt = f->get_32();
|
||||
|
||||
if (ver_fmt > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
|
||||
if (ver_fmt > FORMAT_VERSION || ver_major > GODOT_VERSION_MAJOR) {
|
||||
f.unref();
|
||||
return "";
|
||||
}
|
||||
|
|
@ -1196,7 +1196,7 @@ String ResourceLoaderBinary::recognize_script_class(Ref<FileAccess> p_f) {
|
|||
f->get_32(); // ver_minor
|
||||
uint32_t ver_fmt = f->get_32();
|
||||
|
||||
if (ver_fmt > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
|
||||
if (ver_fmt > FORMAT_VERSION || ver_major > GODOT_VERSION_MAJOR) {
|
||||
f.unref();
|
||||
return "";
|
||||
}
|
||||
|
|
@ -1392,10 +1392,10 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
|
|||
return ResourceFormatSaverBinary::singleton->save(res, p_path);
|
||||
}
|
||||
|
||||
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
|
||||
if (ver_format > FORMAT_VERSION || ver_major > GODOT_VERSION_MAJOR) {
|
||||
ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED,
|
||||
vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).",
|
||||
local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH));
|
||||
local_path, ver_format, ver_major, ver_minor, GODOT_VERSION_BRANCH));
|
||||
}
|
||||
|
||||
// Since we're not actually converting the file contents, leave the version
|
||||
|
|
@ -2186,8 +2186,8 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Re
|
|||
}
|
||||
|
||||
f->store_32(0); //64 bits file, false for now
|
||||
f->store_32(VERSION_MAJOR);
|
||||
f->store_32(VERSION_MINOR);
|
||||
f->store_32(GODOT_VERSION_MAJOR);
|
||||
f->store_32(GODOT_VERSION_MINOR);
|
||||
f->store_32(FORMAT_VERSION);
|
||||
|
||||
if (f->get_error() != OK && f->get_error() != ERR_FILE_EOF) {
|
||||
|
|
@ -2450,10 +2450,10 @@ Error ResourceFormatSaverBinaryInstance::set_uid(const String &p_path, ResourceU
|
|||
return ERR_UNAVAILABLE;
|
||||
}
|
||||
|
||||
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
|
||||
if (ver_format > FORMAT_VERSION || ver_major > GODOT_VERSION_MAJOR) {
|
||||
ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED,
|
||||
vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).",
|
||||
local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH));
|
||||
local_path, ver_format, ver_major, ver_minor, GODOT_VERSION_BRANCH));
|
||||
}
|
||||
|
||||
// Since we're not actually converting the file contents, leave the version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue