diff options
Diffstat (limited to 'core/path_remap.cpp')
-rw-r--r-- | core/path_remap.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/core/path_remap.cpp b/core/path_remap.cpp index 8f189187f2..42383e212d 100644 --- a/core/path_remap.cpp +++ b/core/path_remap.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -124,13 +124,13 @@ void PathRemap::clear_remaps() { void PathRemap::load_remaps() { // default remaps first - DVector<String> remaps = Globals::get_singleton()->get("remap/all"); + PoolVector<String> remaps = GlobalConfig::get_singleton()->get("remap/all"); { int rlen = remaps.size(); ERR_FAIL_COND( rlen%2 ); - DVector<String>::Read r = remaps.read(); + PoolVector<String>::Read r = remaps.read(); for(int i=0;i<rlen/2;i++) { String from = r[i*2+0]; @@ -141,18 +141,18 @@ void PathRemap::load_remaps() { // platform remaps second, so override - remaps = Globals::get_singleton()->get("remap/"+OS::get_singleton()->get_name()); -// remaps = Globals::get_singleton()->get("remap/PSP"); + remaps = GlobalConfig::get_singleton()->get("remap/"+OS::get_singleton()->get_name()); + //remaps = Globals::get_singleton()->get("remap/PSP"); { int rlen = remaps.size(); ERR_FAIL_COND( rlen%2 ); - DVector<String>::Read r = remaps.read(); + PoolVector<String>::Read r = remaps.read(); for(int i=0;i<rlen/2;i++) { String from = r[i*2+0]; String to = r[i*2+1]; -// print_line("add remap: "+from+" -> "+to); + //print_line("add remap: "+from+" -> "+to); add_remap(from,to); } } @@ -160,17 +160,17 @@ void PathRemap::load_remaps() { //locale based remaps - if (Globals::get_singleton()->has("locale/translation_remaps")) { + if (GlobalConfig::get_singleton()->has("locale/translation_remaps")) { - Dictionary remaps = Globals::get_singleton()->get("locale/translation_remaps"); + Dictionary remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps"); List<Variant> rk; remaps.get_key_list(&rk); for(List<Variant>::Element *E=rk.front();E;E=E->next()) { String source = E->get(); - StringArray sa = remaps[E->get()]; + PoolStringArray sa = remaps[E->get()]; int sas = sa.size(); - StringArray::Read r = sa.read(); + PoolStringArray::Read r = sa.read(); for(int i=0;i<sas;i++) { @@ -190,11 +190,11 @@ void PathRemap::load_remaps() { void PathRemap::_bind_methods() { - ObjectTypeDB::bind_method(_MD("add_remap","from","to","locale"),&PathRemap::add_remap,DEFVAL(String())); - ObjectTypeDB::bind_method(_MD("has_remap","path"),&PathRemap::has_remap); - ObjectTypeDB::bind_method(_MD("get_remap","path"),&PathRemap::get_remap); - ObjectTypeDB::bind_method(_MD("erase_remap","path"),&PathRemap::erase_remap); - ObjectTypeDB::bind_method(_MD("clear_remaps"),&PathRemap::clear_remaps); + ClassDB::bind_method(_MD("add_remap","from","to","locale"),&PathRemap::add_remap,DEFVAL(String())); + ClassDB::bind_method(_MD("has_remap","path"),&PathRemap::has_remap); + ClassDB::bind_method(_MD("get_remap","path"),&PathRemap::get_remap); + ClassDB::bind_method(_MD("erase_remap","path"),&PathRemap::erase_remap); + ClassDB::bind_method(_MD("clear_remaps"),&PathRemap::clear_remaps); } PathRemap::PathRemap() { |