mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Fix build.
This commit is contained in:
parent
ececc7991c
commit
f6d9ca069f
@ -174,22 +174,14 @@ StringName ContextTranslation::get_context_message(const StringName &p_src_text,
|
||||
|
||||
///////////////////////////////////////////////
|
||||
|
||||
static _FORCE_INLINE_ bool is_ascii_upper_case(char32_t c) {
|
||||
return (c >= 'A' && c <= 'Z');
|
||||
}
|
||||
|
||||
static _FORCE_INLINE_ bool is_ascii_lower_case(char32_t c) {
|
||||
return (c >= 'a' && c <= 'z');
|
||||
}
|
||||
|
||||
Vector<TranslationServer::LocaleScriptInfo> TranslationServer::locale_script_info;
|
||||
|
||||
Map<String, String> TranslationServer::language_map;
|
||||
Map<String, String> TranslationServer::script_map;
|
||||
Map<String, String> TranslationServer::locale_rename_map;
|
||||
Map<String, String> TranslationServer::country_name_map;
|
||||
Map<String, String> TranslationServer::variant_map;
|
||||
Map<String, String> TranslationServer::country_rename_map;
|
||||
RBMap<String, String> TranslationServer::language_map;
|
||||
RBMap<String, String> TranslationServer::script_map;
|
||||
RBMap<String, String> TranslationServer::locale_rename_map;
|
||||
RBMap<String, String> TranslationServer::country_name_map;
|
||||
RBMap<String, String> TranslationServer::variant_map;
|
||||
RBMap<String, String> TranslationServer::country_rename_map;
|
||||
|
||||
void TranslationServer::init_locale_info() {
|
||||
// Init locale info.
|
||||
@ -421,7 +413,7 @@ String TranslationServer::get_locale_name(const String &p_locale) const {
|
||||
Vector<String> TranslationServer::get_all_languages() const {
|
||||
Vector<String> languages;
|
||||
|
||||
for (Map<String, String>::Element *E = language_map.front(); E; E = E->next()) {
|
||||
for (RBMap<String, String>::Element *E = language_map.front(); E; E = E->next()) {
|
||||
languages.push_back(E->key());
|
||||
}
|
||||
|
||||
@ -435,7 +427,7 @@ String TranslationServer::get_language_name(const String &p_language) const {
|
||||
Vector<String> TranslationServer::get_all_scripts() const {
|
||||
Vector<String> scripts;
|
||||
|
||||
for (Map<String, String>::Element *E = script_map.front(); E; E = E->next()) {
|
||||
for (RBMap<String, String>::Element *E = script_map.front(); E; E = E->next()) {
|
||||
scripts.push_back(E->key());
|
||||
}
|
||||
|
||||
@ -449,7 +441,7 @@ String TranslationServer::get_script_name(const String &p_script) const {
|
||||
Vector<String> TranslationServer::get_all_countries() const {
|
||||
Vector<String> countries;
|
||||
|
||||
for (Map<String, String>::Element *E = country_name_map.front(); E; E = E->next()) {
|
||||
for (RBMap<String, String>::Element *E = country_name_map.front(); E; E = E->next()) {
|
||||
countries.push_back(E->key());
|
||||
}
|
||||
|
||||
@ -476,7 +468,7 @@ String TranslationServer::get_locale() const {
|
||||
|
||||
Array TranslationServer::get_loaded_locales() const {
|
||||
Array locales;
|
||||
for (Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
|
||||
for (RBSet<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
|
||||
const Ref<Translation> &t = E->get();
|
||||
ERR_FAIL_COND_V(t.is_null(), Array());
|
||||
String l = t->get_locale();
|
||||
@ -574,7 +566,7 @@ StringName TranslationServer::translate_to(const StringName &p_message, const St
|
||||
// same language code).
|
||||
|
||||
StringName res;
|
||||
String lang = get_language_code(p_locale);
|
||||
String lang = standardize_locale(p_locale);
|
||||
bool near_match = false;
|
||||
|
||||
for (const RBSet<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
|
||||
@ -587,7 +579,7 @@ StringName TranslationServer::translate_to(const StringName &p_message, const St
|
||||
if (near_match) {
|
||||
continue; // Only near-match once, but keep looking for exact matches.
|
||||
}
|
||||
if (get_language_code(l) != lang) {
|
||||
if (standardize_locale(l) != lang) {
|
||||
continue; // Language code does not match.
|
||||
}
|
||||
}
|
||||
|
@ -99,16 +99,16 @@ class TranslationServer : public Object {
|
||||
String name;
|
||||
String script;
|
||||
String default_country;
|
||||
Set<String> supported_countries;
|
||||
RBSet<String> supported_countries;
|
||||
};
|
||||
static Vector<LocaleScriptInfo> locale_script_info;
|
||||
|
||||
static Map<String, String> language_map;
|
||||
static Map<String, String> script_map;
|
||||
static Map<String, String> locale_rename_map;
|
||||
static Map<String, String> country_name_map;
|
||||
static Map<String, String> country_rename_map;
|
||||
static Map<String, String> variant_map;
|
||||
static RBMap<String, String> language_map;
|
||||
static RBMap<String, String> script_map;
|
||||
static RBMap<String, String> locale_rename_map;
|
||||
static RBMap<String, String> country_name_map;
|
||||
static RBMap<String, String> country_rename_map;
|
||||
static RBMap<String, String> variant_map;
|
||||
|
||||
void init_locale_info();
|
||||
|
||||
|
@ -30,21 +30,14 @@
|
||||
|
||||
#include "editor_locale_dialog.h"
|
||||
|
||||
#include "core/project_settings.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/tree.h"
|
||||
|
||||
static _FORCE_INLINE_ bool is_ascii_upper_case(char32_t c) {
|
||||
return (c >= 'A' && c <= 'Z');
|
||||
}
|
||||
|
||||
static _FORCE_INLINE_ bool is_ascii_lower_case(char32_t c) {
|
||||
return (c >= 'a' && c <= 'z');
|
||||
}
|
||||
#include "scene/gui/label.h"
|
||||
|
||||
void EditorLocaleDialog::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_filter_mode_changed"), &EditorLocaleDialog::_filter_mode_changed);
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef EDITOR_LOCALE_DIALOG_H
|
||||
#define EDITOR_LOCALE_DIALOG_H
|
||||
|
||||
#include "core/translation.h"
|
||||
#include "core/string/translation.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
|
||||
class Button;
|
||||
|
@ -1438,12 +1438,12 @@ void EditorNode::_find_node_types(Node *p_node, int &count_2d, int &count_3d) {
|
||||
void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
|
||||
EditorProgress save("save", TTR("Saving Scene"), 4);
|
||||
|
||||
Ref<World> edited_world;
|
||||
Ref<World3D> edited_world;
|
||||
|
||||
if (editor_data.get_edited_scene_root() != nullptr) {
|
||||
// Allow a generic mechanism for the engine to make changes prior, and after saving.
|
||||
if (editor_data.get_edited_scene_root()->get_tree() && editor_data.get_edited_scene_root()->get_tree()->get_root()) {
|
||||
edited_world = editor_data.get_edited_scene_root()->get_tree()->get_root()->get_world();
|
||||
edited_world = editor_data.get_edited_scene_root()->get_tree()->get_root()->get_world_3d();
|
||||
if (edited_world.is_valid()) {
|
||||
edited_world->notify_saving(true);
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ void EditorPropertyLocale::setup(const String &p_hint_text) {
|
||||
|
||||
void EditorPropertyLocale::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
locale_edit->set_icon(get_icon("Translation", "EditorIcons"));
|
||||
locale_edit->set_icon(get_theme_icon("Translation", "EditorIcons"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,10 +32,11 @@
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "scene/3d/visual_instance.h"
|
||||
#include "scene/resources/world_3d.h"
|
||||
|
||||
void LOD::_lod_register() {
|
||||
if (!data.registered) {
|
||||
Ref<World> world = get_world();
|
||||
Ref<World3D> world = get_world_3d();
|
||||
ERR_FAIL_COND(!world.is_valid());
|
||||
world->_register_lod(this, data.queue_id);
|
||||
data.registered = true;
|
||||
@ -44,7 +45,7 @@ void LOD::_lod_register() {
|
||||
|
||||
void LOD::_lod_unregister() {
|
||||
if (data.registered) {
|
||||
Ref<World> world = get_world();
|
||||
Ref<World3D> world = get_world_3d();
|
||||
ERR_FAIL_COND(!world.is_valid());
|
||||
world->_unregister_lod(this, data.queue_id);
|
||||
data.registered = false;
|
||||
@ -104,7 +105,7 @@ void LOD::set_lod_priority(int p_priority) {
|
||||
if (is_inside_tree()) {
|
||||
// If already in the world, we must remove the LOD
|
||||
// and re-add in a different queue.
|
||||
Ref<World> world = get_world();
|
||||
Ref<World3D> world = get_world_3d();
|
||||
ERR_FAIL_COND(!world.is_valid());
|
||||
world->_unregister_lod(this, data.queue_id);
|
||||
|
||||
|
@ -241,13 +241,13 @@ void World3D::_remove_camera(Camera *p_camera) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void World::_register_lod(LOD *p_lod, uint32_t p_queue_id) {
|
||||
void World3D::_register_lod(LOD *p_lod, uint32_t p_queue_id) {
|
||||
#ifndef _3D_DISABLED
|
||||
lod_manager->register_lod(p_lod, p_queue_id);
|
||||
#endif
|
||||
}
|
||||
|
||||
void World::_unregister_lod(LOD *p_lod, uint32_t p_queue_id) {
|
||||
void World3D::_unregister_lod(LOD *p_lod, uint32_t p_queue_id) {
|
||||
#ifndef _3D_DISABLED
|
||||
lod_manager->unregister_lod(p_lod, p_queue_id);
|
||||
#endif
|
||||
@ -355,7 +355,7 @@ void World3D::move_cameras_into(Ref<World3D> target) {
|
||||
}
|
||||
}
|
||||
|
||||
void World::notify_saving(bool p_active) {
|
||||
void World3D::notify_saving(bool p_active) {
|
||||
#ifndef _3D_DISABLED
|
||||
if (lod_manager) {
|
||||
lod_manager->notify_saving(p_active);
|
||||
|
@ -1784,11 +1784,6 @@ void RenderingServerScene::instance_geometry_set_material_overlay(RID p_instance
|
||||
}
|
||||
}
|
||||
|
||||
void RenderingServerScene::instance_geometry_set_draw_range(RID p_instance, float p_min, float p_max, float p_min_margin, float p_max_margin) {
|
||||
}
|
||||
void RenderingServerScene::instance_geometry_set_as_instance_lod(RID p_instance, RID p_as_lod_of_instance) {
|
||||
}
|
||||
|
||||
void RenderingServerScene::_update_instance(Instance *p_instance) {
|
||||
p_instance->version++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user