summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-13 08:49:39 +0100
committerGitHub <noreply@github.com>2019-02-13 08:49:39 +0100
commit55ca2a7c88503d0f07785ab9215809b02027f858 (patch)
treedff95ace09acaa882c74f77f1036b05c7e4a360b
parenta18ceb6a302b23094136adfc9591121f8b49a8cf (diff)
parentfe7e11e008598e4bbbe46cf817af2fac999a5326 (diff)
Merge pull request #25821 from akien-mga/sync-class-and-filenames
Ensure classes match their header filename
-rw-r--r--core/allocators.h195
-rw-r--r--core/core_string_names.h2
-rw-r--r--core/global_constants.h2
-rw-r--r--core/hashfuncs.h2
-rw-r--r--core/image.h2
-rw-r--r--core/io/file_access_buffered.h2
-rw-r--r--core/io/file_access_buffered_fa.h2
-rw-r--r--core/io/resource_importer.cpp (renamed from core/io/resource_import.cpp)4
-rw-r--r--core/io/resource_importer.h (renamed from core/io/resource_import.h)8
-rw-r--r--core/io/resource_loader.cpp2
-rw-r--r--core/list.h2
-rw-r--r--core/math/bsp_tree.h2
-rw-r--r--core/math/geometry.h2
-rw-r--r--core/math/triangle_mesh.cpp2
-rw-r--r--core/node_path.h2
-rw-r--r--core/os/shell.cpp46
-rw-r--r--core/os/shell.h52
-rw-r--r--core/pool_vector.cpp (renamed from core/dvector.cpp)6
-rw-r--r--core/pool_vector.h (renamed from core/dvector.h)24
-rw-r--r--core/register_core_types.cpp2
-rw-r--r--core/sort_array.h (renamed from core/sort.h)8
-rw-r--r--core/string_name.cpp (renamed from core/string_db.cpp)4
-rw-r--r--core/string_name.h (renamed from core/string_db.h)8
-rw-r--r--core/variant.h2
-rw-r--r--core/variant_construct_string.cpp438
-rw-r--r--core/vector.h2
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.cpp (renamed from drivers/alsamidi/alsa_midi.cpp)6
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.h (renamed from drivers/alsamidi/alsa_midi.h)10
-rw-r--r--drivers/coremidi/midi_driver_coremidi.cpp (renamed from drivers/coremidi/core_midi.cpp)6
-rw-r--r--drivers/coremidi/midi_driver_coremidi.h (renamed from drivers/coremidi/core_midi.h)10
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.h2
-rw-r--r--drivers/windows/shell_windows.cpp67
-rw-r--r--drivers/windows/shell_windows.h52
-rw-r--r--drivers/winmidi/midi_driver_winmidi.cpp (renamed from drivers/winmidi/win_midi.cpp)6
-rw-r--r--drivers/winmidi/midi_driver_winmidi.h (renamed from drivers/winmidi/win_midi.h)10
-rw-r--r--editor/editor_export.cpp2
-rw-r--r--editor/editor_file_system.cpp2
-rw-r--r--editor/import/editor_import_plugin.h2
-rw-r--r--editor/import/resource_importer_bitmask.cpp2
-rw-r--r--editor/import/resource_importer_bitmask.h2
-rw-r--r--editor/import/resource_importer_csv_translation.h2
-rw-r--r--editor/import/resource_importer_image.h2
-rw-r--r--editor/import/resource_importer_layered_texture.h2
-rw-r--r--editor/import/resource_importer_scene.cpp2
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/resource_importer_texture.h2
-rw-r--r--editor/import/resource_importer_wav.h2
-rw-r--r--editor/import_dock.h2
-rw-r--r--editor/plugins/audio_stream_editor_plugin.h2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/editor_preview_plugins.cpp2
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp2
-rw-r--r--main/main.cpp2
-rw-r--r--main/main_timer_sync.cpp (renamed from main/timer_sync.cpp)4
-rw-r--r--main/main_timer_sync.h (renamed from main/timer_sync.h)8
-rw-r--r--modules/csg/csg.cpp2
-rw-r--r--modules/csg/csg.h2
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative/array.cpp2
-rw-r--r--modules/gdnative/gdnative/pool_arrays.cpp2
-rw-r--r--modules/gdnative/gdnative/string.cpp2
-rw-r--r--modules/gdnative/gdnative/string_name.cpp2
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp2
-rw-r--r--modules/gdscript/gdscript_function.h2
-rw-r--r--modules/gdscript/gdscript_tokenizer.h2
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp2
-rw-r--r--modules/mono/glue/base_object_glue.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_field.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_method.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_property.h2
-rw-r--r--modules/mono/mono_gd/i_mono_class_member.h (renamed from modules/mono/mono_gd/gd_mono_class_member.h)8
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.h2
-rw-r--r--modules/upnp/register_types.cpp2
-rw-r--r--modules/upnp/upnp.h2
-rw-r--r--modules/upnp/upnp_device.cpp (renamed from modules/upnp/upnpdevice.cpp)4
-rw-r--r--modules/upnp/upnp_device.h (renamed from modules/upnp/upnpdevice.h)8
-rw-r--r--modules/websocket/websocket_client.h2
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp (renamed from modules/websocket/websocket_multiplayer.cpp)5
-rw-r--r--modules/websocket/websocket_multiplayer_peer.h (renamed from modules/websocket/websocket_multiplayer.h)2
-rw-r--r--modules/websocket/websocket_server.h2
-rw-r--r--platform/android/export/export.cpp12
-rw-r--r--platform/android/os_android.cpp2
-rw-r--r--platform/android/os_android.h2
-rw-r--r--platform/android/power_android.cpp12
-rw-r--r--platform/android/power_android.h13
-rw-r--r--platform/iphone/SCsub2
-rw-r--r--platform/iphone/os_iphone.cpp3
-rw-r--r--platform/iphone/power_iphone.h6
-rw-r--r--platform/iphone/semaphore_iphone.cpp (renamed from platform/iphone/sem_iphone.cpp)5
-rw-r--r--platform/iphone/semaphore_iphone.h (renamed from platform/iphone/sem_iphone.h)8
-rw-r--r--platform/osx/SCsub2
-rw-r--r--platform/osx/crash_handler_osx.h2
-rw-r--r--platform/osx/crash_handler_osx.mm4
-rw-r--r--platform/osx/os_osx.h5
-rw-r--r--platform/osx/os_osx.mm4
-rw-r--r--platform/osx/power_osx.cpp16
-rw-r--r--platform/osx/power_osx.h13
-rw-r--r--platform/osx/semaphore_osx.cpp (renamed from platform/osx/sem_osx.cpp)5
-rw-r--r--platform/osx/semaphore_osx.h (renamed from platform/osx/sem_osx.h)8
-rw-r--r--platform/server/SCsub2
-rw-r--r--platform/server/os_server.cpp2
-rw-r--r--platform/server/os_server.h4
-rw-r--r--platform/uwp/SCsub4
-rw-r--r--platform/uwp/app.cpp10
-rw-r--r--platform/uwp/app.h2
-rw-r--r--platform/uwp/context_egl_uwp.cpp (renamed from platform/uwp/gl_context_egl.cpp)24
-rw-r--r--platform/uwp/context_egl_uwp.h (renamed from platform/uwp/gl_context_egl.h)17
-rw-r--r--platform/uwp/export/export.cpp20
-rw-r--r--platform/uwp/os_uwp.cpp170
-rw-r--r--platform/uwp/os_uwp.h16
-rw-r--r--platform/uwp/power_uwp.h6
-rw-r--r--platform/windows/SCsub11
-rw-r--r--platform/windows/context_gl_windows.cpp (renamed from platform/windows/context_gl_win.cpp)24
-rw-r--r--platform/windows/context_gl_windows.h (renamed from platform/windows/context_gl_win.h)8
-rw-r--r--platform/windows/crash_handler_windows.cpp (renamed from platform/windows/crash_handler_win.cpp)4
-rw-r--r--platform/windows/crash_handler_windows.h (renamed from platform/windows/crash_handler_win.h)8
-rw-r--r--platform/windows/ctxgl_procaddr.cpp188
-rw-r--r--platform/windows/ctxgl_procaddr.h39
-rw-r--r--platform/windows/godot_windows.cpp (renamed from platform/windows/godot_win.cpp)3
-rw-r--r--platform/windows/joypad_windows.cpp (renamed from platform/windows/joypad.cpp)4
-rw-r--r--platform/windows/joypad_windows.h (renamed from platform/windows/joypad.h)9
-rw-r--r--platform/windows/key_mapping_windows.cpp (renamed from platform/windows/key_mapping_win.cpp)4
-rw-r--r--platform/windows/key_mapping_windows.h (renamed from platform/windows/key_mapping_win.h)4
-rw-r--r--platform/windows/os_windows.cpp6
-rw-r--r--platform/windows/os_windows.h15
-rw-r--r--platform/windows/power_windows.h6
-rw-r--r--platform/x11/crash_handler_x11.cpp9
-rw-r--r--platform/x11/crash_handler_x11.h2
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--platform/x11/power_x11.h6
-rw-r--r--scene/2d/collision_shape_2d.cpp2
-rw-r--r--scene/2d/line_builder.h2
-rw-r--r--scene/2d/navigation_2d.cpp (renamed from scene/2d/navigation2d.cpp)4
-rw-r--r--scene/2d/navigation_2d.h (renamed from scene/2d/navigation2d.h)4
-rw-r--r--scene/2d/navigation_polygon.cpp2
-rw-r--r--scene/2d/tile_map.h2
-rw-r--r--scene/2d/touch_screen_button.cpp (renamed from scene/2d/screen_button.cpp)5
-rw-r--r--scene/2d/touch_screen_button.h (renamed from scene/2d/screen_button.h)10
-rw-r--r--scene/3d/SCsub2
-rw-r--r--scene/3d/reflection_probe.h2
-rw-r--r--scene/3d/world_environment.cpp (renamed from scene/3d/scenario_fx.cpp)4
-rw-r--r--scene/3d/world_environment.h (renamed from scene/3d/scenario_fx.h)2
-rw-r--r--scene/audio/audio_stream_player.cpp (renamed from scene/audio/audio_player.cpp)4
-rw-r--r--scene/audio/audio_stream_player.h (renamed from scene/audio/audio_player.h)9
-rw-r--r--scene/gui/gradient_edit.h2
-rw-r--r--scene/gui/link_button.h2
-rw-r--r--scene/gui/texture_button.h2
-rw-r--r--scene/main/scene_tree.h1
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/register_scene_types.cpp18
-rw-r--r--scene/resources/bit_map.cpp (renamed from scene/resources/bit_mask.cpp)4
-rw-r--r--scene/resources/bit_map.h (renamed from scene/resources/bit_mask.h)8
-rw-r--r--scene/resources/bounds.cpp52
-rw-r--r--scene/resources/bounds.h52
-rw-r--r--scene/resources/environment.h2
-rw-r--r--scene/resources/gradient.cpp (renamed from scene/resources/color_ramp.cpp)5
-rw-r--r--scene/resources/gradient.h (renamed from scene/resources/color_ramp.h)8
-rw-r--r--scene/resources/line_shape_2d.cpp (renamed from scene/resources/shape_line_2d.cpp)5
-rw-r--r--scene/resources/line_shape_2d.h (renamed from scene/resources/shape_line_2d.h)8
-rw-r--r--scene/resources/resource_format_text.cpp (renamed from scene/resources/scene_format_text.cpp)5
-rw-r--r--scene/resources/resource_format_text.h (renamed from scene/resources/scene_format_text.h)8
-rw-r--r--scene/resources/sky.cpp (renamed from scene/resources/sky_box.cpp)5
-rw-r--r--scene/resources/sky.h (renamed from scene/resources/sky_box.h)9
-rw-r--r--scene/resources/texture.cpp2
-rw-r--r--scene/resources/texture.h2
-rw-r--r--scene/scene_string_names.h2
-rw-r--r--servers/physics/shape_sw.cpp2
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp2
-rw-r--r--servers/visual/shader_language.h2
-rw-r--r--servers/visual/visual_server_canvas.cpp2
-rw-r--r--servers/visual/visual_server_globals.cpp (renamed from servers/visual/visual_server_global.cpp)4
-rw-r--r--servers/visual/visual_server_globals.h (renamed from servers/visual/visual_server_global.h)8
-rw-r--r--servers/visual/visual_server_raster.cpp4
-rw-r--r--servers/visual/visual_server_raster.h3
-rw-r--r--servers/visual/visual_server_scene.cpp2
-rw-r--r--servers/visual/visual_server_scene.h2
-rw-r--r--servers/visual/visual_server_viewport.cpp2
178 files changed, 495 insertions, 1658 deletions
diff --git a/core/allocators.h b/core/allocators.h
deleted file mode 100644
index 8d4af7a9fb..0000000000
--- a/core/allocators.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*************************************************************************/
-/* allocators.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef ALLOCATORS_H
-#define ALLOCATORS_H
-
-#include "core/os/memory.h"
-
-template <int PREALLOC_COUNT = 64, int MAX_HANDS = 8>
-class BalloonAllocator {
-
- enum {
-
- USED_FLAG = (1 << 30),
- USED_MASK = USED_FLAG - 1
- };
-
- struct Balloon {
-
- Balloon *next;
- Balloon *prev;
- uint32_t hand;
- };
-
- struct Hand {
-
- int used;
- int allocated;
- Balloon *first;
- Balloon *last;
- };
-
- Hand hands[MAX_HANDS];
-
-public:
- void *alloc(size_t p_size) {
-
- size_t max = (1 << MAX_HANDS);
- ERR_FAIL_COND_V(p_size > max, NULL);
-
- unsigned int hand = 0;
-
- while (p_size > (size_t)(1 << hand))
- ++hand;
-
- Hand &h = hands[hand];
-
- if (h.used == h.allocated) {
-
- for (int i = 0; i < PREALLOC_COUNT; i++) {
-
- Balloon *b = (Balloon *)memalloc(sizeof(Balloon) + (1 << hand));
- b->hand = hand;
- if (h.last) {
-
- b->prev = h.last;
- h.last->next = b;
- h.last = b;
- } else {
-
- b->prev = NULL;
- h.last = b;
- h.first = b;
- }
- }
-
- h.last->next = NULL;
- h.allocated += PREALLOC_COUNT;
- }
-
- Balloon *pick = h.last;
-
- ERR_FAIL_COND_V((pick->hand & USED_FLAG), NULL);
-
- // remove last
- h.last = h.last->prev;
- h.last->next = NULL;
-
- pick->next = h.first;
- h.first->prev = pick;
- pick->prev = NULL;
- h.first = pick;
- h.used++;
- pick->hand |= USED_FLAG;
-
- return (void *)(pick + 1);
- }
-
- void free(void *p_ptr) {
-
- Balloon *b = (Balloon *)p_ptr;
- b -= 1;
-
- ERR_FAIL_COND(!(b->hand & USED_FLAG));
-
- b->hand = b->hand & USED_MASK; // not used
- int hand = b->hand;
-
- Hand &h = hands[hand];
-
- if (b == h.first)
- h.first = b->next;
-
- if (b->prev)
- b->prev->next = b->next;
- if (b->next)
- b->next->prev = b->prev;
-
- if (h.last != b) {
- h.last->next = b;
- b->prev = h.last;
- b->next = NULL;
- h.last = b;
- }
-
- h.used--;
-
- if (h.used <= (h.allocated - (PREALLOC_COUNT * 2))) { // this is done to ensure no alloc/free is done constantly
-
- for (int i = 0; i < PREALLOC_COUNT; i++) {
- ERR_CONTINUE(h.last->hand & USED_FLAG);
-
- Balloon *new_last = h.last->prev;
- if (new_last)
- new_last->next = NULL;
- memfree(h.last);
- h.last = new_last;
- }
- h.allocated -= PREALLOC_COUNT;
- }
- }
-
- BalloonAllocator() {
-
- for (int i = 0; i < MAX_HANDS; i++) {
-
- hands[i].allocated = 0;
- hands[i].used = 0;
- hands[i].first = NULL;
- hands[i].last = NULL;
- }
- }
-
- void clear() {
-
- for (int i = 0; i < MAX_HANDS; i++) {
-
- while (hands[i].first) {
-
- Balloon *b = hands[i].first;
- hands[i].first = b->next;
- memfree(b);
- }
-
- hands[i].allocated = 0;
- hands[i].used = 0;
- hands[i].first = NULL;
- hands[i].last = NULL;
- }
- }
-
- ~BalloonAllocator() {
-
- clear();
- }
-};
-
-#endif // ALLOCATORS_H
diff --git a/core/core_string_names.h b/core/core_string_names.h
index 1a837cdc2e..6fea40e1b2 100644
--- a/core/core_string_names.h
+++ b/core/core_string_names.h
@@ -31,7 +31,7 @@
#ifndef CORE_STRING_NAMES_H
#define CORE_STRING_NAMES_H
-#include "core/string_db.h"
+#include "core/string_name.h"
class CoreStringNames {
diff --git a/core/global_constants.h b/core/global_constants.h
index 47c1a4dafc..c798a3b9bc 100644
--- a/core/global_constants.h
+++ b/core/global_constants.h
@@ -31,7 +31,7 @@
#ifndef GLOBAL_CONSTANTS_H
#define GLOBAL_CONSTANTS_H
-#include "core/string_db.h"
+#include "core/string_name.h"
class GlobalConstants {
public:
diff --git a/core/hashfuncs.h b/core/hashfuncs.h
index 811ce6264e..07d78dcbde 100644
--- a/core/hashfuncs.h
+++ b/core/hashfuncs.h
@@ -34,7 +34,7 @@
#include "core/math/math_defs.h"
#include "core/math/math_funcs.h"
#include "core/node_path.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/typedefs.h"
#include "core/ustring.h"
diff --git a/core/image.h b/core/image.h
index b23f8cac46..872b84d565 100644
--- a/core/image.h
+++ b/core/image.h
@@ -32,8 +32,8 @@
#define IMAGE_H
#include "core/color.h"
-#include "core/dvector.h"
#include "core/math/rect2.h"
+#include "core/pool_vector.h"
#include "core/resource.h"
/**
diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h
index 756045a674..4065d77c58 100644
--- a/core/io/file_access_buffered.h
+++ b/core/io/file_access_buffered.h
@@ -31,8 +31,8 @@
#ifndef FILE_ACCESS_BUFFERED_H
#define FILE_ACCESS_BUFFERED_H
-#include "core/dvector.h"
#include "core/os/file_access.h"
+#include "core/pool_vector.h"
#include "core/ustring.h"
class FileAccessBuffered : public FileAccess {
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index 5180f2344f..be960fbc25 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -54,7 +54,7 @@ class FileAccessBufferedFA : public FileAccessBuffered {
cache.offset = p_offset;
cache.buffer.resize(p_size);
- // on dvector
+ // on PoolVector
//PoolVector<uint8_t>::Write write = cache.buffer.write();
//f.get_buffer(write.ptrw(), p_size);
diff --git a/core/io/resource_import.cpp b/core/io/resource_importer.cpp
index 63dc0b6a26..9327e000f5 100644
--- a/core/io/resource_import.cpp
+++ b/core/io/resource_importer.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* resource_import.cpp */
+/* resource_importer.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "resource_import.h"
+#include "resource_importer.h"
#include "core/os/os.h"
#include "core/variant_parser.h"
diff --git a/core/io/resource_import.h b/core/io/resource_importer.h
index 96dd7983e6..32c39a8085 100644
--- a/core/io/resource_import.h
+++ b/core/io/resource_importer.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* resource_import.h */
+/* resource_importer.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef RESOURCE_IMPORT_H
-#define RESOURCE_IMPORT_H
+#ifndef RESOURCE_IMPORTER_H
+#define RESOURCE_IMPORTER_H
#include "core/io/resource_loader.h"
@@ -110,4 +110,4 @@ public:
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL) = 0;
};
-#endif // RESOURCE_IMPORT_H
+#endif // RESOURCE_IMPORTER_H
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 02e4d8dc7a..4aa002e9a2 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -30,7 +30,7 @@
#include "resource_loader.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "core/os/file_access.h"
#include "core/os/os.h"
#include "core/path_remap.h"
diff --git a/core/list.h b/core/list.h
index dd4ea3bd89..c26aad6463 100644
--- a/core/list.h
+++ b/core/list.h
@@ -32,7 +32,7 @@
#define GLOBALS_LIST_H
#include "core/os/memory.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
/**
* Generic Templatized Linked List Implementation.
diff --git a/core/math/bsp_tree.h b/core/math/bsp_tree.h
index 0af532a2d5..a7a3697990 100644
--- a/core/math/bsp_tree.h
+++ b/core/math/bsp_tree.h
@@ -31,11 +31,11 @@
#ifndef BSP_TREE_H
#define BSP_TREE_H
-#include "core/dvector.h"
#include "core/math/aabb.h"
#include "core/math/face3.h"
#include "core/math/plane.h"
#include "core/method_ptrcall.h"
+#include "core/pool_vector.h"
#include "core/variant.h"
#include "core/vector.h"
/**
diff --git a/core/math/geometry.h b/core/math/geometry.h
index 29493516b8..f927a63ed5 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -31,12 +31,12 @@
#ifndef GEOMETRY_H
#define GEOMETRY_H
-#include "core/dvector.h"
#include "core/math/face3.h"
#include "core/math/rect2.h"
#include "core/math/triangulate.h"
#include "core/math/vector3.h"
#include "core/object.h"
+#include "core/pool_vector.h"
#include "core/print_string.h"
#include "core/vector.h"
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index cdf3d16b72..83784a1fa7 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -30,7 +30,7 @@
#include "triangle_mesh.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
int TriangleMesh::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc) {
diff --git a/core/node_path.h b/core/node_path.h
index 17b1435723..24725123d6 100644
--- a/core/node_path.h
+++ b/core/node_path.h
@@ -31,7 +31,7 @@
#ifndef NODE_PATH_H
#define NODE_PATH_H
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
/**
diff --git a/core/os/shell.cpp b/core/os/shell.cpp
deleted file mode 100644
index a859241cb6..0000000000
--- a/core/os/shell.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************/
-/* shell.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "shell.h"
-
-Shell *Shell::singleton = NULL;
-
-Shell *Shell::get_singleton() {
-
- return singleton;
-}
-
-Shell::~Shell() {
-}
-
-Shell::Shell() {
-
- singleton = this;
-}
diff --git a/core/os/shell.h b/core/os/shell.h
deleted file mode 100644
index c1bd995b5b..0000000000
--- a/core/os/shell.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* shell.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef SHELL_H
-#define SHELL_H
-
-#include "core/typedefs.h"
-#include "core/ustring.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class Shell {
-
- static Shell *singleton;
-
-public:
- static Shell *get_singleton();
- virtual void execute(String p_path) = 0;
-
- Shell();
- virtual ~Shell();
-};
-
-#endif
diff --git a/core/dvector.cpp b/core/pool_vector.cpp
index 592c3c053d..b9d2316315 100644
--- a/core/dvector.cpp
+++ b/core/pool_vector.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* dvector.cpp */
+/* pool_vector.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,9 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "dvector.h"
+#include "pool_vector.h"
-Mutex *dvector_lock = NULL;
+Mutex *pool_vector_lock = NULL;
PoolAllocator *MemoryPool::memory_pool = NULL;
uint8_t *MemoryPool::pool_memory = NULL;
diff --git a/core/dvector.h b/core/pool_vector.h
index fc962b4940..102a620f17 100644
--- a/core/dvector.h
+++ b/core/pool_vector.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* dvector.h */
+/* pool_vector.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef DVECTOR_H
-#define DVECTOR_H
+#ifndef POOL_VECTOR_H
+#define POOL_VECTOR_H
#include "core/os/copymem.h"
#include "core/os/memory.h"
@@ -188,19 +188,19 @@ class PoolVector {
}
}
- void _reference(const PoolVector &p_dvector) {
+ void _reference(const PoolVector &p_pool_vector) {
- if (alloc == p_dvector.alloc)
+ if (alloc == p_pool_vector.alloc)
return;
_unreference();
- if (!p_dvector.alloc) {
+ if (!p_pool_vector.alloc) {
return;
}
- if (p_dvector.alloc->refcount.ref()) {
- alloc = p_dvector.alloc;
+ if (p_pool_vector.alloc->refcount.ref()) {
+ alloc = p_pool_vector.alloc;
}
}
@@ -460,11 +460,11 @@ public:
void invert();
- void operator=(const PoolVector &p_dvector) { _reference(p_dvector); }
+ void operator=(const PoolVector &p_pool_vector) { _reference(p_pool_vector); }
PoolVector() { alloc = NULL; }
- PoolVector(const PoolVector &p_dvector) {
+ PoolVector(const PoolVector &p_pool_vector) {
alloc = NULL;
- _reference(p_dvector);
+ _reference(p_pool_vector);
}
~PoolVector() { _unreference(); }
};
@@ -640,4 +640,4 @@ void PoolVector<T>::invert() {
}
}
-#endif
+#endif // POOL_VECTOR_H
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 60c2778603..97c96b4018 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -47,7 +47,7 @@
#include "core/io/packet_peer_udp.h"
#include "core/io/pck_packer.h"
#include "core/io/resource_format_binary.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "core/io/stream_peer_ssl.h"
#include "core/io/tcp_server.h"
#include "core/io/translation_loader_po.h"
diff --git a/core/sort.h b/core/sort_array.h
index 4da7c323c7..0f258aec3e 100644
--- a/core/sort.h
+++ b/core/sort_array.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sort.h */
+/* sort_array.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SORT_H
-#define SORT_H
+#ifndef SORT_ARRAY_H
+#define SORT_ARRAY_H
#include "core/typedefs.h"
@@ -327,4 +327,4 @@ public:
}
};
-#endif
+#endif // SORT_ARRAY_H
diff --git a/core/string_db.cpp b/core/string_name.cpp
index c776c56023..10b71ad3ac 100644
--- a/core/string_db.cpp
+++ b/core/string_name.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* string_db.cpp */
+/* string_name.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "string_db.h"
+#include "string_name.h"
#include "core/os/os.h"
#include "core/print_string.h"
diff --git a/core/string_db.h b/core/string_name.h
index 06b24c28da..0984b0181f 100644
--- a/core/string_db.h
+++ b/core/string_name.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* string_db.h */
+/* string_name.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef STRING_DB_H
-#define STRING_DB_H
+#ifndef STRING_NAME_H
+#define STRING_NAME_H
#include "core/os/mutex.h"
#include "core/safe_refcount.h"
@@ -169,4 +169,4 @@ public:
StringName _scs_create(const char *p_chr);
-#endif
+#endif // STRING_NAME_H
diff --git a/core/variant.h b/core/variant.h
index 6ddaf17406..a819ba1f8c 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -38,7 +38,6 @@
#include "core/array.h"
#include "core/color.h"
#include "core/dictionary.h"
-#include "core/dvector.h"
#include "core/io/ip_address.h"
#include "core/math/aabb.h"
#include "core/math/basis.h"
@@ -49,6 +48,7 @@
#include "core/math/transform_2d.h"
#include "core/math/vector3.h"
#include "core/node_path.h"
+#include "core/pool_vector.h"
#include "core/ref_ptr.h"
#include "core/rid.h"
#include "core/ustring.h"
diff --git a/core/variant_construct_string.cpp b/core/variant_construct_string.cpp
deleted file mode 100644
index 2cb7481634..0000000000
--- a/core/variant_construct_string.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-/*************************************************************************/
-/* variant_construct_string.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "variant.h"
-
-class VariantConstruct {
-
- enum TokenType {
- TK_CURLY_BRACKET_OPEN,
- TK_CURLY_BRACKET_CLOSE,
- TK_BRACKET_OPEN,
- TK_BRACKET_CLOSE,
- TK_IDENTIFIER,
- TK_STRING,
- TK_NUMBER,
- TK_COLON,
- TK_COMMA,
- TK_EOF,
- TK_MAX
- };
-
- enum Expecting {
-
- EXPECT_OBJECT,
- EXPECT_OBJECT_KEY,
- EXPECT_COLON,
- EXPECT_OBJECT_VALUE,
- };
-
- struct Token {
-
- TokenType type;
- Variant value;
- };
-
- static const char *tk_name[TK_MAX];
-
- static String _print_var(const Variant &p_var);
-
- static Error _get_token(const CharType *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str);
- static Error _parse_value(Variant &value, Token &token, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud);
- static Error _parse_array(Array &array, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud);
- static Error _parse_dict(Dictionary &dict, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud);
-
-public:
- static Error parse(const String &p_string, Variant &r_ret, String &r_err_str, int &r_err_line, Variant::ObjectConstruct *p_construct, void *p_ud);
-};
-
-const char *VariantConstruct::tk_name[TK_MAX] = {
- "'{'",
- "'}'",
- "'['",
- "']'",
- "identifier",
- "string",
- "number",
- "':'",
- "','",
- "EOF",
-};
-
-Error VariantConstruct::_get_token(const CharType *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str) {
-
- while (true) {
- switch (p_str[index]) {
-
- case '\n': {
-
- line++;
- index++;
- break;
- };
- case 0: {
- r_token.type = TK_EOF;
- return OK;
- } break;
- case '{': {
-
- r_token.type = TK_CURLY_BRACKET_OPEN;
- index++;
- return OK;
- };
- case '}': {
-
- r_token.type = TK_CURLY_BRACKET_CLOSE;
- index++;
- return OK;
- };
- case '[': {
-
- r_token.type = TK_BRACKET_OPEN;
- index++;
- return OK;
- };
- case ']': {
-
- r_token.type = TK_BRACKET_CLOSE;
- index++;
- return OK;
- };
- case ':': {
-
- r_token.type = TK_COLON;
- index++;
- return OK;
- };
- case ',': {
-
- r_token.type = TK_COMMA;
- index++;
- return OK;
- };
- case '"': {
-
- index++;
- String str;
- while (true) {
- if (p_str[index] == 0) {
- r_err_str = "Unterminated String";
- return ERR_PARSE_ERROR;
- } else if (p_str[index] == '"') {
- index++;
- break;
- } else if (p_str[index] == '\\') {
- //escaped characters...
- index++;
- CharType next = p_str[index];
- if (next == 0) {
- r_err_str = "Unterminated String";
- return ERR_PARSE_ERROR;
- }
- CharType res = 0;
-
- switch (next) {
-
- case 'b': res = 8; break;
- case 't': res = 9; break;
- case 'n': res = 10; break;
- case 'f': res = 12; break;
- case 'r': res = 13; break;
- case '\"': res = '\"'; break;
- case '\\': res = '\\'; break;
- case '/': res = '/'; break;
- case 'u': {
- //hexnumbarh - oct is deprecated
-
- for (int j = 0; j < 4; j++) {
- CharType c = p_str[index + j + 1];
- if (c == 0) {
- r_err_str = "Unterminated String";
- return ERR_PARSE_ERROR;
- }
- if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))) {
-
- r_err_str = "Malformed hex constant in string";
- return ERR_PARSE_ERROR;
- }
- CharType v;
- if (c >= '0' && c <= '9') {
- v = c - '0';
- } else if (c >= 'a' && c <= 'f') {
- v = c - 'a';
- v += 10;
- } else if (c >= 'A' && c <= 'F') {
- v = c - 'A';
- v += 10;
- } else {
- ERR_PRINT("BUG");
- v = 0;
- }
-
- res <<= 4;
- res |= v;
- }
- index += 4; //will add at the end anyway
-
- } break;
- default: {
-
- r_err_str = "Invalid escape sequence";
- return ERR_PARSE_ERROR;
- } break;
- }
-
- str += res;
-
- } else {
- if (p_str[index] == '\n')
- line++;
- str += p_str[index];
- }
- index++;
- }
-
- r_token.type = TK_STRING;
- r_token.value = str;
- return OK;
-
- } break;
- default: {
-
- if (p_str[index] <= 32) {
- index++;
- break;
- }
-
- if (p_str[index] == '-' || (p_str[index] >= '0' && p_str[index] <= '9')) {
- //a number
- const CharType *rptr;
- double number = String::to_double(&p_str[index], &rptr);
- index += (rptr - &p_str[index]);
- r_token.type = TK_NUMBER;
- r_token.value = number;
- return OK;
-
- } else if ((p_str[index] >= 'A' && p_str[index] <= 'Z') || (p_str[index] >= 'a' && p_str[index] <= 'z')) {
-
- String id;
-
- while ((p_str[index] >= 'A' && p_str[index] <= 'Z') || (p_str[index] >= 'a' && p_str[index] <= 'z')) {
-
- id += p_str[index];
- index++;
- }
-
- r_token.type = TK_IDENTIFIER;
- r_token.value = id;
- return OK;
- } else {
- r_err_str = "Unexpected character.";
- return ERR_PARSE_ERROR;
- }
- }
- }
- }
-
- return ERR_PARSE_ERROR;
-}
-
-Error VariantConstruct::_parse_value(Variant &value, Token &token, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- if (token.type == TK_CURLY_BRACKET_OPEN) {
-
- Dictionary d;
- Error err = _parse_dict(d, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
- value = d;
- return OK;
- } else if (token.type == TK_BRACKET_OPEN) {
-
- Array a;
- Error err = _parse_array(a, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
- value = a;
- return OK;
-
- } else if (token.type == TK_IDENTIFIER) {
-
- String id = token.value;
- if (id == "true")
- value = true;
- else if (id == "false")
- value = false;
- else if (id == "null")
- value = Variant();
- else {
- r_err_str = "Expected 'true','false' or 'null', got '" + id + "'.";
- return ERR_PARSE_ERROR;
- }
- return OK;
-
- } else if (token.type == TK_NUMBER) {
-
- value = token.value;
- return OK;
- } else if (token.type == TK_STRING) {
-
- value = token.value;
- return OK;
- } else {
- r_err_str = "Expected value, got " + String(tk_name[token.type]) + ".";
- return ERR_PARSE_ERROR;
- }
-
- return ERR_PARSE_ERROR;
-}
-
-Error VariantConstruct::_parse_array(Array &array, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- Token token;
- bool need_comma = false;
-
- while (index < p_len) {
-
- Error err = _get_token(p_str, index, p_len, token, line, r_err_str);
- if (err != OK)
- return err;
-
- if (token.type == TK_BRACKET_CLOSE) {
-
- return OK;
- }
-
- if (need_comma) {
-
- if (token.type != TK_COMMA) {
-
- r_err_str = "Expected ','";
- return ERR_PARSE_ERROR;
- } else {
- need_comma = false;
- continue;
- }
- }
-
- Variant v;
- err = _parse_value(v, token, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
-
- array.push_back(v);
- need_comma = true;
- }
-
- return OK;
-}
-
-Error VariantConstruct::_parse_dict(Dictionary &dict, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- bool at_key = true;
- Variant key;
- Token token;
- bool need_comma = false;
-
- while (index < p_len) {
-
- if (at_key) {
-
- Error err = _get_token(p_str, index, p_len, token, line, r_err_str);
- if (err != OK)
- return err;
-
- if (token.type == TK_CURLY_BRACKET_CLOSE) {
-
- return OK;
- }
-
- if (need_comma) {
-
- if (token.type != TK_COMMA) {
-
- r_err_str = "Expected '}' or ','";
- return ERR_PARSE_ERROR;
- } else {
- need_comma = false;
- continue;
- }
- }
-
- err = _parse_value(key, token, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
-
- if (err != OK)
- return err;
-
- err = _get_token(p_str, index, p_len, token, line, r_err_str);
-
- if (err != OK)
- return err;
-
- if (token.type != TK_COLON) {
-
- r_err_str = "Expected ':'";
- return ERR_PARSE_ERROR;
- }
- at_key = false;
- } else {
-
- Error err = _get_token(p_str, index, p_len, token, line, r_err_str);
- if (err != OK)
- return err;
-
- Variant v;
- err = _parse_value(v, token, p_str, index, p_len, line, r_err_str, p_construct, p_ud);
- if (err)
- return err;
- dict[key] = v;
- need_comma = true;
- at_key = true;
- }
- }
-
- return OK;
-}
-
-Error VariantConstruct::parse(const String &p_string, Variant &r_ret, String &r_err_str, int &r_err_line, Variant::ObjectConstruct *p_construct, void *p_ud) {
-
- const CharType *str = p_string.ptr();
- int idx = 0;
- int len = p_string.length();
- Token token;
- r_err_line = 0;
- String aux_key;
-
- Error err = _get_token(str, idx, len, token, r_err_line, r_err_str);
- if (err)
- return err;
-
- return _parse_value(r_ret, token, str, idx, len, r_err_line, r_err_str, p_construct, p_ud);
-}
diff --git a/core/vector.h b/core/vector.h
index 90b3d90826..93ee003519 100644
--- a/core/vector.h
+++ b/core/vector.h
@@ -40,7 +40,7 @@
#include "core/cowdata.h"
#include "core/error_macros.h"
#include "core/os/memory.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
template <class T>
class VectorWriteProxy {
diff --git a/drivers/alsamidi/alsa_midi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp
index cd90c8912b..aae0ae0216 100644
--- a/drivers/alsamidi/alsa_midi.cpp
+++ b/drivers/alsamidi/midi_driver_alsamidi.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* alsa_midi.cpp */
+/* midi_driver_alsamidi.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#ifdef ALSAMIDI_ENABLED
-#include "alsa_midi.h"
+#include "midi_driver_alsamidi.h"
#include "core/os/os.h"
#include "core/print_string.h"
@@ -199,4 +199,4 @@ MIDIDriverALSAMidi::~MIDIDriverALSAMidi() {
close();
}
-#endif
+#endif // ALSAMIDI_ENABLED
diff --git a/drivers/alsamidi/alsa_midi.h b/drivers/alsamidi/midi_driver_alsamidi.h
index 054a7b474e..b6956cc32f 100644
--- a/drivers/alsamidi/alsa_midi.h
+++ b/drivers/alsamidi/midi_driver_alsamidi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* alsa_midi.h */
+/* midi_driver_alsamidi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,8 +30,8 @@
#ifdef ALSAMIDI_ENABLED
-#ifndef ALSA_MIDI_H
-#define ALSA_MIDI_H
+#ifndef MIDI_DRIVER_ALSAMIDI_H
+#define MIDI_DRIVER_ALSAMIDI_H
#include "core/os/midi_driver.h"
#include "core/os/mutex.h"
@@ -65,5 +65,5 @@ public:
virtual ~MIDIDriverALSAMidi();
};
-#endif
-#endif
+#endif // MIDI_DRIVER_ALSAMIDI_H
+#endif // ALSAMIDI_ENABLED
diff --git a/drivers/coremidi/core_midi.cpp b/drivers/coremidi/midi_driver_coremidi.cpp
index 7d3477213f..7a92ac0702 100644
--- a/drivers/coremidi/core_midi.cpp
+++ b/drivers/coremidi/midi_driver_coremidi.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* core_midi.cpp */
+/* midi_driver_coremidi.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#ifdef COREMIDI_ENABLED
-#include "core_midi.h"
+#include "midi_driver_coremidi.h"
#include "core/print_string.h"
@@ -120,4 +120,4 @@ MIDIDriverCoreMidi::~MIDIDriverCoreMidi() {
close();
}
-#endif
+#endif // COREMIDI_ENABLED
diff --git a/drivers/coremidi/core_midi.h b/drivers/coremidi/midi_driver_coremidi.h
index 7a10b5548e..23c2a19812 100644
--- a/drivers/coremidi/core_midi.h
+++ b/drivers/coremidi/midi_driver_coremidi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* core_midi.h */
+/* midi_driver_coremidi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,8 +30,8 @@
#ifdef COREMIDI_ENABLED
-#ifndef CORE_MIDI_H
-#define CORE_MIDI_H
+#ifndef MIDI_DRIVER_COREMIDI_H
+#define MIDI_DRIVER_COREMIDI_H
#include "core/os/midi_driver.h"
#include "core/vector.h"
@@ -58,5 +58,5 @@ public:
virtual ~MIDIDriverCoreMidi();
};
-#endif
-#endif
+#endif // MIDI_DRIVER_COREMIDI_H
+#endif // COREMIDI_ENABLED
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h
index ba48ddd185..a0fa2aacc5 100644
--- a/drivers/gles2/rasterizer_storage_gles2.h
+++ b/drivers/gles2/rasterizer_storage_gles2.h
@@ -31,7 +31,7 @@
#ifndef RASTERIZERSTORAGEGLES2_H
#define RASTERIZERSTORAGEGLES2_H
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/self_list.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual/shader_language.h"
diff --git a/drivers/windows/shell_windows.cpp b/drivers/windows/shell_windows.cpp
deleted file mode 100644
index 731d16d18d..0000000000
--- a/drivers/windows/shell_windows.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************/
-/* shell_windows.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifdef WINDOWS_ENABLED
-
-#ifdef UWP_ENABLED
-
-// Use Launcher class on windows 8
-
-#else
-
-//
-// C++ Implementation: shell_windows
-//
-// Description:
-//
-//
-// Author: Juan Linietsky <reduzio@gmail.com>, (C) 2008
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
-#include "shell_windows.h"
-
-#include <windows.h>
-
-void ShellWindows::execute(String p_path) {
-
- ShellExecuteW(NULL, L"open", p_path.c_str(), NULL, NULL, SW_SHOWNORMAL);
-}
-
-ShellWindows::ShellWindows() {
-}
-
-ShellWindows::~ShellWindows() {
-}
-
-#endif
-
-#endif
diff --git a/drivers/windows/shell_windows.h b/drivers/windows/shell_windows.h
deleted file mode 100644
index 9e9edd2f62..0000000000
--- a/drivers/windows/shell_windows.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* shell_windows.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef SHELL_WINDOWS_H
-#define SHELL_WINDOWS_H
-
-#include "core/os/shell.h"
-
-#ifdef WINDOWS_ENABLED
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-class ShellWindows : public Shell {
-public:
- virtual void execute(String p_path);
-
- ShellWindows();
-
- ~ShellWindows();
-};
-
-#endif
-#endif
diff --git a/drivers/winmidi/win_midi.cpp b/drivers/winmidi/midi_driver_winmidi.cpp
index 26bba34661..65676b629a 100644
--- a/drivers/winmidi/win_midi.cpp
+++ b/drivers/winmidi/midi_driver_winmidi.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* win_midi.cpp */
+/* midi_driver_winmidi.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#ifdef WINMIDI_ENABLED
-#include "win_midi.h"
+#include "midi_driver_winmidi.h"
#include "core/print_string.h"
@@ -104,4 +104,4 @@ MIDIDriverWinMidi::~MIDIDriverWinMidi() {
close();
}
-#endif
+#endif // WINMIDI_ENABLED
diff --git a/drivers/winmidi/win_midi.h b/drivers/winmidi/midi_driver_winmidi.h
index 4341f7ca7e..2eaa70ef8d 100644
--- a/drivers/winmidi/win_midi.h
+++ b/drivers/winmidi/midi_driver_winmidi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* win_midi.h */
+/* midi_driver_winmidi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,8 +30,8 @@
#ifdef WINMIDI_ENABLED
-#ifndef WIN_MIDI_H
-#define WIN_MIDI_H
+#ifndef MIDI_DRIVER_WINMIDI_H
+#define MIDI_DRIVER_WINMIDI_H
#include "core/os/midi_driver.h"
#include "core/vector.h"
@@ -57,5 +57,5 @@ public:
virtual ~MIDIDriverWinMidi();
};
-#endif
-#endif
+#endif // MIDI_DRIVER_WINMIDI_H
+#endif // WINMIDI_ENABLED
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 7c99318dca..4e8b2c82f1 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -42,7 +42,7 @@
#include "editor/plugins/script_editor_plugin.h"
#include "editor_node.h"
#include "editor_settings.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include "thirdparty/misc/md5.h"
static int _get_pad(int p_alignment, int p_n) {
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index fe8d57d1a1..a262f1886c 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -30,7 +30,7 @@
#include "editor_file_system.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/os/file_access.h"
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index 9e64fdb7c7..607d99e6e2 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -31,7 +31,7 @@
#ifndef EDITOR_IMPORT_PLUGIN_H
#define EDITOR_IMPORT_PLUGIN_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class EditorImportPlugin : public ResourceImporter {
GDCLASS(EditorImportPlugin, Reference)
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 431396d584..b568cbda9b 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -34,7 +34,7 @@
#include "core/io/image_loader.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/texture.h"
String ResourceImporterBitMap::get_importer_name() const {
diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h
index b0168e2b53..7cfb0c4a98 100644
--- a/editor/import/resource_importer_bitmask.h
+++ b/editor/import/resource_importer_bitmask.h
@@ -32,7 +32,7 @@
#define RESOURCE_IMPORTER_BITMASK_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class StreamBitMap;
diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h
index 3d74731e8c..cf16826535 100644
--- a/editor/import/resource_importer_csv_translation.h
+++ b/editor/import/resource_importer_csv_translation.h
@@ -31,7 +31,7 @@
#ifndef RESOURCEIMPORTERCSVTRANSLATION_H
#define RESOURCEIMPORTERCSVTRANSLATION_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterCSVTranslation : public ResourceImporter {
GDCLASS(ResourceImporterCSVTranslation, ResourceImporter)
diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h
index b38d833c5b..ffe05bdf58 100644
--- a/editor/import/resource_importer_image.h
+++ b/editor/import/resource_importer_image.h
@@ -32,7 +32,7 @@
#define RESOURCE_IMPORTER_IMAGE_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterImage : public ResourceImporter {
GDCLASS(ResourceImporterImage, ResourceImporter)
diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h
index 599fdf12fa..6a616e09d6 100644
--- a/editor/import/resource_importer_layered_texture.h
+++ b/editor/import/resource_importer_layered_texture.h
@@ -32,7 +32,7 @@
#define RESOURCE_IMPORTER_LAYERED_TEXTURE_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class StreamTexture;
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index f230fa1b8b..2616ba6e87 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -46,7 +46,7 @@
#include "scene/resources/box_shape.h"
#include "scene/resources/plane_shape.h"
#include "scene/resources/ray_shape.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include "scene/resources/sphere_shape.h"
uint32_t EditorSceneImporter::get_import_flags() const {
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 9435b6599a..9d06b411d6 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -31,7 +31,7 @@
#ifndef RESOURCEIMPORTERSCENE_H
#define RESOURCEIMPORTERSCENE_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "scene/resources/animation.h"
#include "scene/resources/mesh.h"
#include "scene/resources/shape.h"
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index 900654c114..408af1edcf 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -32,7 +32,7 @@
#define RESOURCEIMPORTTEXTURE_H
#include "core/image.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class StreamTexture;
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index 68e677b977..755dea3d84 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -31,7 +31,7 @@
#ifndef RESOURCEIMPORTWAV_H
#define RESOURCEIMPORTWAV_H
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterWAV : public ResourceImporter {
GDCLASS(ResourceImporterWAV, ResourceImporter)
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 1d43e00b63..77a34e80eb 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -32,7 +32,7 @@
#define IMPORTDOCK_H
#include "core/io/config_file.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
#include "scene/gui/box_container.h"
diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h
index e60bf6a38f..12e4faef94 100644
--- a/editor/plugins/audio_stream_editor_plugin.h
+++ b/editor/plugins/audio_stream_editor_plugin.h
@@ -33,7 +33,7 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
-#include "scene/audio/audio_player.h"
+#include "scene/audio/audio_stream_player.h"
#include "scene/gui/color_rect.h"
#include "scene/resources/texture.h"
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 98d639a2d3..873bdd9e7f 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -42,9 +42,9 @@
#include "scene/2d/light_2d.h"
#include "scene/2d/particles_2d.h"
#include "scene/2d/polygon_2d.h"
-#include "scene/2d/screen_button.h"
#include "scene/2d/skeleton_2d.h"
#include "scene/2d/sprite.h"
+#include "scene/2d/touch_screen_button.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/nine_patch_rect.h"
#include "scene/main/canvas_layer.h"
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index fc572f54e1..10023d88bf 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -35,9 +35,9 @@
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/line_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/shape_line_2d.h"
Variant CollisionShape2DEditor::get_handle_value(int idx) const {
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 0c0cc9d635..071a0287e6 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -36,7 +36,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 9ece812c49..0704e57bb9 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -35,7 +35,7 @@
#include "core/os/keyboard.h"
#include "core/print_string.h"
#include "core/project_settings.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/plugins/animation_player_editor_plugin.h"
diff --git a/main/main.cpp b/main/main.cpp
index f9044b61cd..5ccc6662e8 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -53,11 +53,11 @@
#include "drivers/register_driver_types.h"
#include "main/app_icon.gen.h"
#include "main/input_default.h"
+#include "main/main_timer_sync.h"
#include "main/performance.h"
#include "main/splash.gen.h"
#include "main/splash_editor.gen.h"
#include "main/tests/test_main.h"
-#include "main/timer_sync.h"
#include "modules/register_module_types.h"
#include "platform/register_platform_apis.h"
#include "scene/main/scene_tree.h"
diff --git a/main/timer_sync.cpp b/main/main_timer_sync.cpp
index 5ee834880f..f7388c8517 100644
--- a/main/timer_sync.cpp
+++ b/main/main_timer_sync.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* timer_sync.cpp */
+/* main_timer_sync.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "timer_sync.h"
+#include "main_timer_sync.h"
void MainFrameTime::clamp_idle(float min_idle_step, float max_idle_step) {
if (idle_step < min_idle_step) {
diff --git a/main/timer_sync.h b/main/main_timer_sync.h
index fcce6d7a9a..179119edce 100644
--- a/main/timer_sync.h
+++ b/main/main_timer_sync.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* timer_sync.h */
+/* main_timer_sync.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TIMER_SYNC_H
-#define TIMER_SYNC_H
+#ifndef MAIN_TIMER_SYNC_H
+#define MAIN_TIMER_SYNC_H
#include "core/engine.h"
@@ -98,4 +98,4 @@ public:
MainFrameTime advance(float p_frame_slice, int p_iterations_per_second);
};
-#endif // TIMER_SYNC_H
+#endif // MAIN_TIMER_SYNC_H
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 12282b4730..a0be0138d3 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -32,7 +32,7 @@
#include "core/math/face3.h"
#include "core/math/geometry.h"
#include "core/os/os.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "thirdparty/misc/triangulator.h"
void CSGBrush::clear() {
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index ac16575e82..4fa1a945cc 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -31,7 +31,6 @@
#ifndef CSG_H
#define CSG_H
-#include "core/dvector.h"
#include "core/map.h"
#include "core/math/aabb.h"
#include "core/math/plane.h"
@@ -39,6 +38,7 @@
#include "core/math/transform.h"
#include "core/math/vector3.h"
#include "core/oa_hash_map.h"
+#include "core/pool_vector.h"
#include "scene/resources/material.h"
struct CSGBrush {
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
index 01fbc316cf..11509fc20a 100644
--- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
@@ -31,7 +31,7 @@
#include "arvr_interface_gdnative.h"
#include "main/input_default.h"
#include "servers/arvr/arvr_positional_tracker.h"
-#include "servers/visual/visual_server_global.h"
+#include "servers/visual/visual_server_globals.h"
ARVRInterfaceGDNative::ARVRInterfaceGDNative() {
// testing
diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp
index 18da9d811e..6849ff03d7 100644
--- a/modules/gdnative/gdnative/array.cpp
+++ b/modules/gdnative/gdnative/array.cpp
@@ -34,7 +34,7 @@
#include "core/os/memory.h"
#include "core/color.h"
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/variant.h"
diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp
index 68e064d829..74c540ca14 100644
--- a/modules/gdnative/gdnative/pool_arrays.cpp
+++ b/modules/gdnative/gdnative/pool_arrays.cpp
@@ -31,7 +31,7 @@
#include "gdnative/pool_arrays.h"
#include "core/array.h"
-#include "core/dvector.h"
+#include "core/pool_vector.h"
#include "core/variant.h"
#include "core/color.h"
diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp
index 4b8d79305c..913c57eb56 100644
--- a/modules/gdnative/gdnative/string.cpp
+++ b/modules/gdnative/gdnative/string.cpp
@@ -30,7 +30,7 @@
#include "gdnative/string.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
#include "core/variant.h"
diff --git a/modules/gdnative/gdnative/string_name.cpp b/modules/gdnative/gdnative/string_name.cpp
index d2862c5980..dcbb773c25 100644
--- a/modules/gdnative/gdnative/string_name.cpp
+++ b/modules/gdnative/gdnative/string_name.cpp
@@ -30,7 +30,7 @@
#include "gdnative/string_name.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
#include <string.h>
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 0370060937..9fd0a2e8ec 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -39,7 +39,7 @@
#include "core/project_settings.h"
#include "scene/main/scene_tree.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include <stdlib.h>
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index a412b2950f..cefc28d77f 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -36,7 +36,7 @@
#include "core/reference.h"
#include "core/script_language.h"
#include "core/self_list.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/variant.h"
class GDScriptInstance;
diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h
index abacdf0322..e4315f7969 100644
--- a/modules/gdscript/gdscript_tokenizer.h
+++ b/modules/gdscript/gdscript_tokenizer.h
@@ -32,7 +32,7 @@
#define GDSCRIPT_TOKENIZER_H
#include "core/pair.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/ustring.h"
#include "core/variant.h"
#include "core/vmap.h"
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index 78cc667718..b4fbd417d7 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -31,7 +31,7 @@
#include "mobile_vr_interface.h"
#include "core/os/input.h"
#include "core/os/os.h"
-#include "servers/visual/visual_server_global.h"
+#include "servers/visual/visual_server_globals.h"
StringName MobileVRInterface::get_name() const {
return "Native mobile";
diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp
index 2963619b79..fad02b01d3 100644
--- a/modules/mono/glue/base_object_glue.cpp
+++ b/modules/mono/glue/base_object_glue.cpp
@@ -33,7 +33,7 @@
#ifdef MONO_GLUE_ENABLED
#include "core/reference.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "../csharp_script.h"
#include "../mono_gd/gd_mono_internals.h"
diff --git a/modules/mono/mono_gd/gd_mono_field.h b/modules/mono/mono_gd/gd_mono_field.h
index a3244101d8..e348583370 100644
--- a/modules/mono/mono_gd/gd_mono_field.h
+++ b/modules/mono/mono_gd/gd_mono_field.h
@@ -32,8 +32,8 @@
#define GDMONOFIELD_H
#include "gd_mono.h"
-#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
+#include "i_mono_class_member.h"
class GDMonoField : public IMonoClassMember {
diff --git a/modules/mono/mono_gd/gd_mono_method.h b/modules/mono/mono_gd/gd_mono_method.h
index fc035d387c..f74cef438d 100644
--- a/modules/mono/mono_gd/gd_mono_method.h
+++ b/modules/mono/mono_gd/gd_mono_method.h
@@ -32,8 +32,8 @@
#define GD_MONO_METHOD_H
#include "gd_mono.h"
-#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
+#include "i_mono_class_member.h"
class GDMonoMethod : public IMonoClassMember {
diff --git a/modules/mono/mono_gd/gd_mono_property.h b/modules/mono/mono_gd/gd_mono_property.h
index d8a9f69ffb..2700c460b0 100644
--- a/modules/mono/mono_gd/gd_mono_property.h
+++ b/modules/mono/mono_gd/gd_mono_property.h
@@ -32,8 +32,8 @@
#define GD_MONO_PROPERTY_H
#include "gd_mono.h"
-#include "gd_mono_class_member.h"
#include "gd_mono_header.h"
+#include "i_mono_class_member.h"
class GDMonoProperty : public IMonoClassMember {
diff --git a/modules/mono/mono_gd/gd_mono_class_member.h b/modules/mono/mono_gd/i_mono_class_member.h
index 3058b18c05..553d9edc72 100644
--- a/modules/mono/mono_gd/gd_mono_class_member.h
+++ b/modules/mono/mono_gd/i_mono_class_member.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gd_mono_class_member.h */
+/* i_mono_class_member.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef GD_MONO_CLASS_MEMBER_H
-#define GD_MONO_CLASS_MEMBER_H
+#ifndef I_MONO_CLASS_MEMBER_H
+#define I_MONO_CLASS_MEMBER_H
#include "gd_mono_header.h"
@@ -65,4 +65,4 @@ public:
virtual MonoObject *get_attribute(GDMonoClass *p_attr_class) = 0;
};
-#endif // GD_MONO_CLASS_MEMBER_H
+#endif // I_MONO_CLASS_MEMBER_H
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.h b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
index ca2d662e61..f61fc91cda 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.h
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
@@ -32,7 +32,7 @@
#define RESOURCEIMPORTEROGGVORBIS_H
#include "audio_stream_ogg_vorbis.h"
-#include "core/io/resource_import.h"
+#include "core/io/resource_importer.h"
class ResourceImporterOGGVorbis : public ResourceImporter {
GDCLASS(ResourceImporterOGGVorbis, ResourceImporter)
diff --git a/modules/upnp/register_types.cpp b/modules/upnp/register_types.cpp
index abb73a3605..fbf0ee8b97 100644
--- a/modules/upnp/register_types.cpp
+++ b/modules/upnp/register_types.cpp
@@ -33,7 +33,7 @@
#include "core/error_macros.h"
#include "upnp.h"
-#include "upnpdevice.h"
+#include "upnp_device.h"
void register_upnp_types() {
diff --git a/modules/upnp/upnp.h b/modules/upnp/upnp.h
index b73908724d..011b6d44b3 100644
--- a/modules/upnp/upnp.h
+++ b/modules/upnp/upnp.h
@@ -33,7 +33,7 @@
#include "core/reference.h"
-#include "upnpdevice.h"
+#include "upnp_device.h"
#include <miniupnpc/miniupnpc.h>
diff --git a/modules/upnp/upnpdevice.cpp b/modules/upnp/upnp_device.cpp
index 2fb2102df9..4d67e3ddc8 100644
--- a/modules/upnp/upnpdevice.cpp
+++ b/modules/upnp/upnp_device.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* upnpdevice.cpp */
+/* upnp_device.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "upnpdevice.h"
+#include "upnp_device.h"
#include "upnp.h"
diff --git a/modules/upnp/upnpdevice.h b/modules/upnp/upnp_device.h
index 20fe5c62fe..09fce6af89 100644
--- a/modules/upnp/upnpdevice.h
+++ b/modules/upnp/upnp_device.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* upnpdevice.h */
+/* upnp_device.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef GODOT_UPNPDEVICE_H
-#define GODOT_UPNPDEVICE_H
+#ifndef GODOT_UPNP_DEVICE_H
+#define GODOT_UPNP_DEVICE_H
#include "core/reference.h"
@@ -92,4 +92,4 @@ private:
VARIANT_ENUM_CAST(UPNPDevice::IGDStatus)
-#endif // GODOT_UPNPDEVICE_H
+#endif // GODOT_UPNP_DEVICE_H
diff --git a/modules/websocket/websocket_client.h b/modules/websocket/websocket_client.h
index 32db719435..c464d97c7f 100644
--- a/modules/websocket/websocket_client.h
+++ b/modules/websocket/websocket_client.h
@@ -32,7 +32,7 @@
#define WEBSOCKET_CLIENT_H
#include "core/error_list.h"
-#include "websocket_multiplayer.h"
+#include "websocket_multiplayer_peer.h"
#include "websocket_peer.h"
class WebSocketClient : public WebSocketMultiplayerPeer {
diff --git a/modules/websocket/websocket_multiplayer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index 11caac944b..a48738b6a4 100644
--- a/modules/websocket/websocket_multiplayer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* websocket_multiplayer.cpp */
+/* websocket_multiplayer_peer.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "websocket_multiplayer.h"
+#include "websocket_multiplayer_peer.h"
+
#include "core/os/os.h"
WebSocketMultiplayerPeer::WebSocketMultiplayerPeer() {
diff --git a/modules/websocket/websocket_multiplayer.h b/modules/websocket/websocket_multiplayer_peer.h
index 1aecad97a0..b050449ee0 100644
--- a/modules/websocket/websocket_multiplayer.h
+++ b/modules/websocket/websocket_multiplayer_peer.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* websocket_multiplayer.h */
+/* websocket_multiplayer_peer.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
diff --git a/modules/websocket/websocket_server.h b/modules/websocket/websocket_server.h
index 3f3e46db5a..7a94c4047b 100644
--- a/modules/websocket/websocket_server.h
+++ b/modules/websocket/websocket_server.h
@@ -32,7 +32,7 @@
#define WEBSOCKET_H
#include "core/reference.h"
-#include "websocket_multiplayer.h"
+#include "websocket_multiplayer_peer.h"
#include "websocket_peer.h"
class WebSocketServer : public WebSocketMultiplayerPeer {
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index f293eef2ba..60cc33e6bf 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -206,9 +206,9 @@ static const LauncherIcon launcher_icons[] = {
{ "launcher_icons/mdpi_48x48", "res/drawable-mdpi-v4/icon.png" }
};
-class EditorExportAndroid : public EditorExportPlatform {
+class EditorExportPlatformAndroid : public EditorExportPlatform {
- GDCLASS(EditorExportAndroid, EditorExportPlatform)
+ GDCLASS(EditorExportPlatformAndroid, EditorExportPlatform)
Ref<ImageTexture> logo;
Ref<ImageTexture> run_icon;
@@ -235,7 +235,7 @@ class EditorExportAndroid : public EditorExportPlatform {
static void _device_poll_thread(void *ud) {
- EditorExportAndroid *ea = (EditorExportAndroid *)ud;
+ EditorExportPlatformAndroid *ea = (EditorExportPlatformAndroid *)ud;
while (!ea->quit_request) {
@@ -1925,7 +1925,7 @@ public:
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
}
- EditorExportAndroid() {
+ EditorExportPlatformAndroid() {
Ref<Image> img = memnew(Image(_android_logo));
logo.instance();
@@ -1941,7 +1941,7 @@ public:
device_thread = Thread::create(_device_poll_thread, this);
}
- ~EditorExportAndroid() {
+ ~EditorExportPlatformAndroid() {
quit_request = true;
Thread::wait_to_finish(device_thread);
memdelete(device_lock);
@@ -1969,6 +1969,6 @@ void register_android_exporter() {
EDITOR_DEF("export/android/timestamping_authority_url", "");
EDITOR_DEF("export/android/shutdown_adb_on_exit", true);
- Ref<EditorExportAndroid> exporter = Ref<EditorExportAndroid>(memnew(EditorExportAndroid));
+ Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>(memnew(EditorExportPlatformAndroid));
EditorExport::get_singleton()->add_export_platform(exporter);
}
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 2ee0b34c48..3ba8468e0b 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -175,7 +175,7 @@ Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
input = memnew(InputDefault);
input->set_fallback_mapping("Default Android Gamepad");
- //power_manager = memnew(power_android);
+ //power_manager = memnew(PowerAndroid);
return OK;
}
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 3c591af4bb..1e5b89e24d 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -134,7 +134,7 @@ private:
SetKeepScreenOnFunc set_keep_screen_on_func;
AlertFunc alert_func;
- //power_android *power_manager;
+ //PowerAndroid *power_manager;
int video_driver_index;
public:
diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp
index 40b9d81189..4d2fbfbf1a 100644
--- a/platform/android/power_android.cpp
+++ b/platform/android/power_android.cpp
@@ -190,7 +190,7 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco
return 0;
}
-bool power_android::GetPowerInfo_Android() {
+bool PowerAndroid::GetPowerInfo_Android() {
int battery;
int plugged;
int charged;
@@ -218,7 +218,7 @@ bool power_android::GetPowerInfo_Android() {
return true;
}
-OS::PowerState power_android::get_power_state() {
+OS::PowerState PowerAndroid::get_power_state() {
if (GetPowerInfo_Android()) {
return power_state;
} else {
@@ -227,7 +227,7 @@ OS::PowerState power_android::get_power_state() {
}
}
-int power_android::get_power_seconds_left() {
+int PowerAndroid::get_power_seconds_left() {
if (GetPowerInfo_Android()) {
return nsecs_left;
} else {
@@ -236,7 +236,7 @@ int power_android::get_power_seconds_left() {
}
}
-int power_android::get_power_percent_left() {
+int PowerAndroid::get_power_percent_left() {
if (GetPowerInfo_Android()) {
return percent_left;
} else {
@@ -245,11 +245,11 @@ int power_android::get_power_percent_left() {
}
}
-power_android::power_android() :
+PowerAndroid::PowerAndroid() :
nsecs_left(-1),
percent_left(-1),
power_state(OS::POWERSTATE_UNKNOWN) {
}
-power_android::~power_android() {
+PowerAndroid::~PowerAndroid() {
}
diff --git a/platform/android/power_android.h b/platform/android/power_android.h
index 9730c53674..6cb745b6c0 100644
--- a/platform/android/power_android.h
+++ b/platform/android/power_android.h
@@ -28,13 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_ANDROID_POWER_ANDROID_H_
-#define PLATFORM_ANDROID_POWER_ANDROID_H_
+#ifndef POWER_ANDROID_H
+#define POWER_ANDROID_H
#include "core/os/os.h"
+
#include <android/native_window_jni.h>
-class power_android {
+class PowerAndroid {
struct LocalReferenceHolder {
JNIEnv *m_env;
@@ -65,8 +66,8 @@ private:
public:
static int s_active;
- power_android();
- virtual ~power_android();
+ PowerAndroid();
+ virtual ~PowerAndroid();
static bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder, JNIEnv *env);
static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func);
static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder);
@@ -76,4 +77,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_ANDROID_POWER_ANDROID_H_ */
+#endif // POWER_ANDROID_H
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub
index d5540fe8db..41991bce86 100644
--- a/platform/iphone/SCsub
+++ b/platform/iphone/SCsub
@@ -7,7 +7,7 @@ import os
iphone_lib = [
'godot_iphone.cpp',
'os_iphone.cpp',
- 'sem_iphone.cpp',
+ 'semaphore_iphone.cpp',
'gl_view.mm',
'main.m',
'app_delegate.mm',
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 16634c3b30..c939e234b9 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -45,9 +45,10 @@
#include "core/project_settings.h"
#include "drivers/unix/syslog_logger.h"
-#include "sem_iphone.h"
+#include "semaphore_iphone.h"
#include "ios.h"
+
#include <dlfcn.h>
int OSIPhone::get_video_driver_count() const {
diff --git a/platform/iphone/power_iphone.h b/platform/iphone/power_iphone.h
index eb930b99c5..d7d4bf4a69 100644
--- a/platform/iphone/power_iphone.h
+++ b/platform/iphone/power_iphone.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_IPHONE_POWER_IPHONE_H_
-#define PLATFORM_IPHONE_POWER_IPHONE_H_
+#ifndef POWER_IPHONE_H
+#define POWER_IPHONE_H
#include <os/os.h>
@@ -50,4 +50,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_IPHONE_POWER_IPHONE_H_ */
+#endif // POWER_IPHONE_H
diff --git a/platform/iphone/sem_iphone.cpp b/platform/iphone/semaphore_iphone.cpp
index 05cdb6a2f7..cc7dde72f7 100644
--- a/platform/iphone/sem_iphone.cpp
+++ b/platform/iphone/semaphore_iphone.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_iphone.cpp */
+/* semaphore_iphone.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "sem_iphone.h"
+#include "semaphore_iphone.h"
#include <fcntl.h>
#include <unistd.h>
@@ -71,6 +71,7 @@ void cgsem_destroy(cgsem_t *cgsem) {
}
#include "core/os/memory.h"
+
#include <errno.h>
Error SemaphoreIphone::wait() {
diff --git a/platform/iphone/sem_iphone.h b/platform/iphone/semaphore_iphone.h
index 134bc723d9..16658384e6 100644
--- a/platform/iphone/sem_iphone.h
+++ b/platform/iphone/semaphore_iphone.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_iphone.h */
+/* semaphore_iphone.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEM_IPHONE_H
-#define SEM_IPHONE_H
+#ifndef SEMAPHORE_IPHONE_H
+#define SEMAPHORE_IPHONE_H
struct cgsem {
int pipefd[2];
@@ -56,4 +56,4 @@ public:
~SemaphoreIphone();
};
-#endif
+#endif // SEMAPHORE_IPHONE_H
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index dc407eee9e..d2952ebdc0 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -10,7 +10,7 @@ files = [
'crash_handler_osx.mm',
'os_osx.mm',
'godot_main_osx.mm',
- 'sem_osx.cpp',
+ 'semaphore_osx.cpp',
'dir_access_osx.mm',
'joypad_osx.cpp',
'power_osx.cpp',
diff --git a/platform/osx/crash_handler_osx.h b/platform/osx/crash_handler_osx.h
index dead90ca90..6a72ce8ae9 100644
--- a/platform/osx/crash_handler_osx.h
+++ b/platform/osx/crash_handler_osx.h
@@ -45,4 +45,4 @@ public:
~CrashHandler();
};
-#endif
+#endif // CRASH_HANDLER_OSX_H
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm
index 6684898085..ed8a955ae5 100644
--- a/platform/osx/crash_handler_osx.mm
+++ b/platform/osx/crash_handler_osx.mm
@@ -28,9 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "crash_handler_osx.h"
+
+#include "core/os/os.h"
#include "core/project_settings.h"
#include "main/main.h"
-#include "os_osx.h"
#include <string.h>
#include <unistd.h>
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 927c8c9b00..dfe7b27bd0 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -34,7 +34,7 @@
#include "core/os/input.h"
#include "crash_handler_osx.h"
#include "drivers/coreaudio/audio_driver_coreaudio.h"
-#include "drivers/coremidi/core_midi.h"
+#include "drivers/coremidi/midi_driver_coremidi.h"
#include "drivers/unix/os_unix.h"
#include "joypad_osx.h"
#include "main/input_default.h"
@@ -43,6 +43,7 @@
#include "servers/visual/rasterizer.h"
#include "servers/visual/visual_server_wrap_mt.h"
#include "servers/visual_server.h"
+
#include <AppKit/AppKit.h>
#include <AppKit/NSCursor.h>
#include <ApplicationServices/ApplicationServices.h>
@@ -132,7 +133,7 @@ public:
String im_text;
Point2 im_selection;
- power_osx *power_manager;
+ PowerOSX *power_manager;
CrashHandler crash_handler;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 6b65c1a529..225e0aee06 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -37,7 +37,7 @@
#include "drivers/gles2/rasterizer_gles2.h"
#include "drivers/gles3/rasterizer_gles3.h"
#include "main/main.h"
-#include "sem_osx.h"
+#include "semaphore_osx.h"
#include "servers/visual/visual_server_raster.h"
#include <mach-o/dyld.h>
@@ -1461,7 +1461,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
input = memnew(InputDefault);
joypad_osx = memnew(JoypadOSX);
- power_manager = memnew(power_osx);
+ power_manager = memnew(PowerOSX);
_ensure_user_data_dir();
diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp
index a7cf9d831f..04d423d8c5 100644
--- a/platform/osx/power_osx.cpp
+++ b/platform/osx/power_osx.cpp
@@ -67,7 +67,7 @@ Adapted from corresponding SDL 2.0 code.
CFDictionaryGetValueIfPresent(dict, CFSTR(k), (const void **)v)
/* Note that AC power sources also include a laptop battery it is charging. */
-void power_osx::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging) {
+void PowerOSX::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging) {
CFStringRef strval; /* don't CFRelease() this. */
CFBooleanRef bval;
CFNumberRef numval;
@@ -169,7 +169,7 @@ void power_osx::checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery,
#undef STRMATCH
// CODE CHUNK IMPORTED FROM SDL 2.0
-bool power_osx::GetPowerInfo_MacOSX() {
+bool PowerOSX::GetPowerInfo_MacOSX() {
CFTypeRef blob = IOPSCopyPowerSourcesInfo();
nsecs_left = -1;
@@ -211,14 +211,14 @@ bool power_osx::GetPowerInfo_MacOSX() {
return true; /* always the definitive answer on Mac OS X. */
}
-bool power_osx::UpdatePowerInfo() {
+bool PowerOSX::UpdatePowerInfo() {
if (GetPowerInfo_MacOSX()) {
return true;
}
return false;
}
-OS::PowerState power_osx::get_power_state() {
+OS::PowerState PowerOSX::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
@@ -226,7 +226,7 @@ OS::PowerState power_osx::get_power_state() {
}
}
-int power_osx::get_power_seconds_left() {
+int PowerOSX::get_power_seconds_left() {
if (UpdatePowerInfo()) {
return nsecs_left;
} else {
@@ -234,7 +234,7 @@ int power_osx::get_power_seconds_left() {
}
}
-int power_osx::get_power_percent_left() {
+int PowerOSX::get_power_percent_left() {
if (UpdatePowerInfo()) {
return percent_left;
} else {
@@ -242,11 +242,11 @@ int power_osx::get_power_percent_left() {
}
}
-power_osx::power_osx() :
+PowerOSX::PowerOSX() :
nsecs_left(-1),
percent_left(-1),
power_state(OS::POWERSTATE_UNKNOWN) {
}
-power_osx::~power_osx() {
+PowerOSX::~PowerOSX() {
}
diff --git a/platform/osx/power_osx.h b/platform/osx/power_osx.h
index 0f18f9f691..40d0d40fd4 100644
--- a/platform/osx/power_osx.h
+++ b/platform/osx/power_osx.h
@@ -28,15 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_OSX_POWER_OSX_H_
-#define PLATFORM_OSX_POWER_OSX_H_
+#ifndef POWER_OSX_H
+#define POWER_OSX_H
#include "core/os/file_access.h"
#include "core/os/os.h"
#include "dir_access_osx.h"
+
#include <CoreFoundation/CoreFoundation.h>
-class power_osx {
+class PowerOSX {
private:
int nsecs_left;
@@ -47,12 +48,12 @@ private:
bool UpdatePowerInfo();
public:
- power_osx();
- virtual ~power_osx();
+ PowerOSX();
+ virtual ~PowerOSX();
OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};
-#endif /* PLATFORM_OSX_POWER_OSX_H_ */
+#endif // POWER_OSX_H
diff --git a/platform/osx/sem_osx.cpp b/platform/osx/semaphore_osx.cpp
index 4c3bad4379..fe7d19bd9e 100644
--- a/platform/osx/sem_osx.cpp
+++ b/platform/osx/semaphore_osx.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_osx.cpp */
+/* semaphore_osx.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "sem_osx.h"
+#include "semaphore_osx.h"
#include <fcntl.h>
#include <unistd.h>
@@ -66,6 +66,7 @@ void cgsem_destroy(cgsem_t *cgsem) {
}
#include "core/os/memory.h"
+
#include <errno.h>
Error SemaphoreOSX::wait() {
diff --git a/platform/osx/sem_osx.h b/platform/osx/semaphore_osx.h
index 563bdfdcb1..c8e7c45227 100644
--- a/platform/osx/sem_osx.h
+++ b/platform/osx/semaphore_osx.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sem_osx.h */
+/* semaphore_osx.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SEM_OSX_H
-#define SEM_OSX_H
+#ifndef SEMAPHORE_OSX_H
+#define SEMAPHORE_OSX_H
struct cgsem {
int pipefd[2];
@@ -56,4 +56,4 @@ public:
~SemaphoreOSX();
};
-#endif
+#endif // SEMAPHORE_OSX_H
diff --git a/platform/server/SCsub b/platform/server/SCsub
index 51fd05a87e..62d45efbc0 100644
--- a/platform/server/SCsub
+++ b/platform/server/SCsub
@@ -13,7 +13,7 @@ common_server = [\
if sys.platform == "darwin":
common_server.append("#platform/osx/crash_handler_osx.mm")
common_server.append("#platform/osx/power_osx.cpp")
- common_server.append("#platform/osx/sem_osx.cpp")
+ common_server.append("#platform/osx/semaphore_osx.cpp")
else:
common_server.append("#platform/x11/crash_handler_x11.cpp")
common_server.append("#platform/x11/power_x11.cpp")
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 9b6e7864e1..e643d3e8bb 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -93,7 +93,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
input = memnew(InputDefault);
#ifdef __APPLE__
- power_manager = memnew(power_osx);
+ power_manager = memnew(PowerOSX);
#else
power_manager = memnew(PowerX11);
#endif
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index 7273a690ca..312b5811d1 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -38,7 +38,7 @@
#ifdef __APPLE__
#include "platform/osx/crash_handler_osx.h"
#include "platform/osx/power_osx.h"
-#include "platform/osx/sem_osx.h"
+#include "platform/osx/semaphore_osx.h"
#else
#include "platform/x11/crash_handler_x11.h"
#include "platform/x11/power_x11.h"
@@ -69,7 +69,7 @@ class OS_Server : public OS_Unix {
InputDefault *input;
#ifdef __APPLE__
- power_osx *power_manager;
+ PowerOSX *power_manager;
#else
PowerX11 *power_manager;
#endif
diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub
index fb0c4a92ae..c14290f0c4 100644
--- a/platform/uwp/SCsub
+++ b/platform/uwp/SCsub
@@ -4,11 +4,11 @@ Import('env')
files = [
'thread_uwp.cpp',
- '#platform/windows/key_mapping_win.cpp',
+ '#platform/windows/key_mapping_windows.cpp',
'#platform/windows/windows_terminal_logger.cpp',
'joypad_uwp.cpp',
'power_uwp.cpp',
- 'gl_context_egl.cpp',
+ 'context_egl_uwp.cpp',
'app.cpp',
'os_uwp.cpp',
]
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index 1b8f9f3f9e..4f2ee0237a 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -39,7 +39,7 @@
#include "core/os/keyboard.h"
#include "main/main.h"
-#include "platform/windows/key_mapping_win.h"
+#include "platform/windows/key_mapping_windows.h"
#include <collection.h>
@@ -99,7 +99,7 @@ void App::Initialize(CoreApplicationView ^ applicationView) {
// Information about the Suspending and Resuming event handlers can be found here:
// http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
- os = new OSUWP;
+ os = new OS_UWP;
}
// Called when the CoreWindow object is created (or re-created).
@@ -398,7 +398,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs ^ key_args, Windows::UI::Core::CharacterReceivedEventArgs ^ char_args) {
- OSUWP::KeyEvent ke;
+ OS_UWP::KeyEvent ke;
ke.control = sender->GetAsyncKeyState(VirtualKey::Control) == CoreVirtualKeyStates::Down;
ke.alt = sender->GetAsyncKeyState(VirtualKey::Menu) == CoreVirtualKeyStates::Down;
@@ -408,14 +408,14 @@ void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Wind
if (key_args != nullptr) {
- ke.type = OSUWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
+ ke.type = OS_UWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
ke.unicode = 0;
ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
} else {
- ke.type = OSUWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
+ ke.type = OS_UWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
ke.unicode = char_args->KeyCode;
ke.scancode = 0;
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
diff --git a/platform/uwp/app.h b/platform/uwp/app.h
index d403dace9d..0bd996d483 100644
--- a/platform/uwp/app.h
+++ b/platform/uwp/app.h
@@ -103,7 +103,7 @@ namespace GodotUWP
EGLSurface mEglSurface;
CoreWindow^ window;
- OSUWP* os;
+ OS_UWP* os;
int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse
int last_touch_y[32];
diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/context_egl_uwp.cpp
index db15be3e06..061c54687c 100644
--- a/platform/uwp/gl_context_egl.cpp
+++ b/platform/uwp/context_egl_uwp.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gl_context_egl.cpp */
+/* context_egl_uwp.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,33 +28,33 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "gl_context_egl.h"
+#include "context_egl_uwp.h"
#include "EGL/eglext.h"
using Platform::Exception;
-void ContextEGL::release_current() {
+void ContextEGL_UWP::release_current() {
eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, mEglContext);
};
-void ContextEGL::make_current() {
+void ContextEGL_UWP::make_current() {
eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext);
};
-int ContextEGL::get_window_width() {
+int ContextEGL_UWP::get_window_width() {
return width;
};
-int ContextEGL::get_window_height() {
+int ContextEGL_UWP::get_window_height() {
return height;
};
-void ContextEGL::reset() {
+void ContextEGL_UWP::reset() {
cleanup();
@@ -62,7 +62,7 @@ void ContextEGL::reset() {
initialize();
};
-void ContextEGL::swap_buffers() {
+void ContextEGL_UWP::swap_buffers() {
if (eglSwapBuffers(mEglDisplay, mEglSurface) != EGL_TRUE) {
cleanup();
@@ -74,7 +74,7 @@ void ContextEGL::swap_buffers() {
}
};
-Error ContextEGL::initialize() {
+Error ContextEGL_UWP::initialize() {
EGLint configAttribList[] = {
EGL_RED_SIZE, 8,
@@ -190,7 +190,7 @@ Error ContextEGL::initialize() {
return OK;
};
-void ContextEGL::cleanup() {
+void ContextEGL_UWP::cleanup() {
if (mEglDisplay != EGL_NO_DISPLAY && mEglSurface != EGL_NO_SURFACE) {
eglDestroySurface(mEglDisplay, mEglSurface);
@@ -208,14 +208,14 @@ void ContextEGL::cleanup() {
}
};
-ContextEGL::ContextEGL(CoreWindow ^ p_window, Driver p_driver) :
+ContextEGL_UWP::ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver) :
mEglDisplay(EGL_NO_DISPLAY),
mEglContext(EGL_NO_CONTEXT),
mEglSurface(EGL_NO_SURFACE),
driver(p_driver),
window(p_window) {}
-ContextEGL::~ContextEGL() {
+ContextEGL_UWP::~ContextEGL_UWP() {
cleanup();
};
diff --git a/platform/uwp/gl_context_egl.h b/platform/uwp/context_egl_uwp.h
index 60feed2e24..812bdfb688 100644
--- a/platform/uwp/gl_context_egl.h
+++ b/platform/uwp/context_egl_uwp.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gl_context_egl.h */
+/* context_egl_uwp.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,19 +28,20 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CONTEXT_EGL_H
-#define CONTEXT_EGL_H
+#ifndef CONTEXT_EGL_UWP_H
+#define CONTEXT_EGL_UWP_H
#include <wrl.h>
-#include "EGL/egl.h"
+#include <EGL/egl.h>
+
#include "core/error_list.h"
#include "core/os/os.h"
#include "drivers/gl_context/context_gl.h"
using namespace Windows::UI::Core;
-class ContextEGL : public ContextGL {
+class ContextEGL_UWP : public ContextGL {
public:
enum Driver {
@@ -79,8 +80,8 @@ public:
void cleanup();
- ContextEGL(CoreWindow ^ p_window, Driver p_driver);
- virtual ~ContextEGL();
+ ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver);
+ virtual ~ContextEGL_UWP();
};
-#endif
+#endif // CONTEXT_EGL_UWP_H
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 6808016f13..a4655117a7 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -646,9 +646,9 @@ AppxPackager::~AppxPackager() {}
////////////////////////////////////////////////////////////////////
-class EditorExportUWP : public EditorExportPlatform {
+class EditorExportPlatformUWP : public EditorExportPlatform {
- GDCLASS(EditorExportUWP, EditorExportPlatform);
+ GDCLASS(EditorExportPlatformUWP, EditorExportPlatform);
Ref<ImageTexture> logo;
@@ -1035,13 +1035,13 @@ public:
r_features->push_back("s3tc");
r_features->push_back("etc");
switch ((int)p_preset->get("architecture/target")) {
- case EditorExportUWP::ARM: {
+ case EditorExportPlatformUWP::ARM: {
r_features->push_back("arm");
} break;
- case EditorExportUWP::X86: {
+ case EditorExportPlatformUWP::X86: {
r_features->push_back("32");
} break;
- case EditorExportUWP::X64: {
+ case EditorExportPlatformUWP::X64: {
r_features->push_back("64");
} break;
}
@@ -1123,13 +1123,13 @@ public:
String platform_infix;
switch (arch) {
- case EditorExportUWP::ARM: {
+ case EditorExportPlatformUWP::ARM: {
platform_infix = "arm";
} break;
- case EditorExportUWP::X86: {
+ case EditorExportPlatformUWP::X86: {
platform_infix = "x86";
} break;
- case EditorExportUWP::X64: {
+ case EditorExportPlatformUWP::X64: {
platform_infix = "x64";
} break;
}
@@ -1459,7 +1459,7 @@ public:
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
}
- EditorExportUWP() {
+ EditorExportPlatformUWP() {
Ref<Image> img = memnew(Image(_uwp_logo));
logo.instance();
logo->create_from_image(img);
@@ -1478,7 +1478,7 @@ void register_uwp_exporter() {
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "export/uwp/debug_algorithm", PROPERTY_HINT_ENUM, "MD5,SHA1,SHA256"));
#endif // WINDOWS_ENABLED
- Ref<EditorExportUWP> exporter;
+ Ref<EditorExportPlatformUWP> exporter;
exporter.instance();
EditorExport::get_singleton()->add_export_platform(exporter);
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index ea4f63b49c..9c9280ac7e 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -67,22 +67,22 @@ using namespace Windows::Devices::Sensors;
using namespace Windows::ApplicationModel::DataTransfer;
using namespace concurrency;
-int OSUWP::get_video_driver_count() const {
+int OS_UWP::get_video_driver_count() const {
return 2;
}
-Size2 OSUWP::get_window_size() const {
+Size2 OS_UWP::get_window_size() const {
Size2 size;
size.width = video_mode.width;
size.height = video_mode.height;
return size;
}
-int OSUWP::get_current_video_driver() const {
+int OS_UWP::get_current_video_driver() const {
return video_driver_index;
}
-void OSUWP::set_window_size(const Size2 p_size) {
+void OS_UWP::set_window_size(const Size2 p_size) {
Windows::Foundation::Size new_size;
new_size.Width = p_size.width;
@@ -97,7 +97,7 @@ void OSUWP::set_window_size(const Size2 p_size) {
}
}
-void OSUWP::set_window_fullscreen(bool p_enabled) {
+void OS_UWP::set_window_fullscreen(bool p_enabled) {
ApplicationView ^ view = ApplicationView::GetForCurrentView();
@@ -117,12 +117,12 @@ void OSUWP::set_window_fullscreen(bool p_enabled) {
}
}
-bool OSUWP::is_window_fullscreen() const {
+bool OS_UWP::is_window_fullscreen() const {
return ApplicationView::GetForCurrentView()->IsFullScreenMode;
}
-void OSUWP::set_keep_screen_on(bool p_enabled) {
+void OS_UWP::set_keep_screen_on(bool p_enabled) {
if (is_keep_screen_on() == p_enabled) return;
@@ -134,7 +134,7 @@ void OSUWP::set_keep_screen_on(bool p_enabled) {
OS::set_keep_screen_on(p_enabled);
}
-void OSUWP::initialize_core() {
+void OS_UWP::initialize_core() {
last_button_state = 0;
@@ -167,36 +167,36 @@ void OSUWP::initialize_core() {
cursor_shape = CURSOR_ARROW;
}
-bool OSUWP::can_draw() const {
+bool OS_UWP::can_draw() const {
return !minimized;
};
-void OSUWP::set_window(Windows::UI::Core::CoreWindow ^ p_window) {
+void OS_UWP::set_window(Windows::UI::Core::CoreWindow ^ p_window) {
window = p_window;
}
-void OSUWP::screen_size_changed() {
+void OS_UWP::screen_size_changed() {
gl_context->reset();
};
-Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
main_loop = NULL;
outside = true;
- ContextEGL::Driver opengl_api_type = ContextEGL::GLES_2_0;
+ ContextEGL_UWP::Driver opengl_api_type = ContextEGL_UWP::GLES_2_0;
if (p_video_driver == VIDEO_DRIVER_GLES2) {
- opengl_api_type = ContextEGL::GLES_2_0;
+ opengl_api_type = ContextEGL_UWP::GLES_2_0;
}
bool gl_initialization_error = false;
gl_context = NULL;
while (!gl_context) {
- gl_context = memnew(ContextEGL(window, opengl_api_type));
+ gl_context = memnew(ContextEGL_UWP(window, opengl_api_type));
if (gl_context->initialize() != OK) {
memdelete(gl_context);
@@ -209,7 +209,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
}
p_video_driver = VIDEO_DRIVER_GLES2;
- opengl_api_type = ContextEGL::GLES_2_0;
+ opengl_api_type = ContextEGL_UWP::GLES_2_0;
} else {
gl_initialization_error = true;
break;
@@ -218,7 +218,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
}
while (true) {
- if (opengl_api_type == ContextEGL::GLES_3_0) {
+ if (opengl_api_type == ContextEGL_UWP::GLES_3_0) {
if (RasterizerGLES3::is_viable() == OK) {
RasterizerGLES3::register_config();
RasterizerGLES3::make_current();
@@ -226,7 +226,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
} else {
if (GLOBAL_GET("rendering/quality/driver/driver_fallback") == "Best") {
p_video_driver = VIDEO_DRIVER_GLES2;
- opengl_api_type = ContextEGL::GLES_2_0;
+ opengl_api_type = ContextEGL_UWP::GLES_2_0;
continue;
} else {
gl_initialization_error = true;
@@ -235,7 +235,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
}
}
- if (opengl_api_type == ContextEGL::GLES_2_0) {
+ if (opengl_api_type == ContextEGL_UWP::GLES_2_0) {
if (RasterizerGLES2::is_viable() == OK) {
RasterizerGLES2::register_config();
RasterizerGLES2::make_current();
@@ -349,7 +349,7 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
return OK;
}
-void OSUWP::set_clipboard(const String &p_text) {
+void OS_UWP::set_clipboard(const String &p_text) {
DataPackage ^ clip = ref new DataPackage();
clip->RequestedOperation = DataPackageOperation::Copy;
@@ -358,7 +358,7 @@ void OSUWP::set_clipboard(const String &p_text) {
Clipboard::SetContent(clip);
};
-String OSUWP::get_clipboard() const {
+String OS_UWP::get_clipboard() const {
if (managed_object->clipboard != nullptr)
return managed_object->clipboard->Data();
@@ -366,25 +366,25 @@ String OSUWP::get_clipboard() const {
return "";
};
-void OSUWP::input_event(const Ref<InputEvent> &p_event) {
+void OS_UWP::input_event(const Ref<InputEvent> &p_event) {
input->parse_input_event(p_event);
};
-void OSUWP::delete_main_loop() {
+void OS_UWP::delete_main_loop() {
if (main_loop)
memdelete(main_loop);
main_loop = NULL;
}
-void OSUWP::set_main_loop(MainLoop *p_main_loop) {
+void OS_UWP::set_main_loop(MainLoop *p_main_loop) {
input->set_main_loop(p_main_loop);
main_loop = p_main_loop;
}
-void OSUWP::finalize() {
+void OS_UWP::finalize() {
if (main_loop)
memdelete(main_loop);
@@ -403,19 +403,19 @@ void OSUWP::finalize() {
joypad = nullptr;
}
-void OSUWP::finalize_core() {
+void OS_UWP::finalize_core() {
NetSocketPosix::cleanup();
}
-void OSUWP::alert(const String &p_alert, const String &p_title) {
+void OS_UWP::alert(const String &p_alert, const String &p_title) {
Platform::String ^ alert = ref new Platform::String(p_alert.c_str());
Platform::String ^ title = ref new Platform::String(p_title.c_str());
MessageDialog ^ msg = ref new MessageDialog(alert, title);
- UICommand ^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSUWP::ManagedType::alert_close));
+ UICommand ^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OS_UWP::ManagedType::alert_close));
msg->Commands->Append(close);
msg->DefaultCommandIndex = 0;
@@ -424,17 +424,17 @@ void OSUWP::alert(const String &p_alert, const String &p_title) {
msg->ShowAsync();
}
-void OSUWP::ManagedType::alert_close(IUICommand ^ command) {
+void OS_UWP::ManagedType::alert_close(IUICommand ^ command) {
alert_close_handle = false;
}
-void OSUWP::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
+void OS_UWP::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
update_clipboard();
}
-void OSUWP::ManagedType::update_clipboard() {
+void OS_UWP::ManagedType::update_clipboard() {
DataPackageView ^ data = Clipboard::GetContent();
@@ -446,7 +446,7 @@ void OSUWP::ManagedType::update_clipboard() {
}
}
-void OSUWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
+void OS_UWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
AccelerometerReading ^ reading = args->Reading;
@@ -456,7 +456,7 @@ void OSUWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender
reading->AccelerationZ));
}
-void OSUWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
+void OS_UWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
MagnetometerReading ^ reading = args->Reading;
@@ -466,7 +466,7 @@ void OSUWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender,
reading->MagneticFieldZ));
}
-void OSUWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
+void OS_UWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
GyrometerReading ^ reading = args->Reading;
@@ -476,7 +476,7 @@ void OSUWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, Gyrome
reading->AngularVelocityZ));
}
-void OSUWP::set_mouse_mode(MouseMode p_mode) {
+void OS_UWP::set_mouse_mode(MouseMode p_mode) {
if (p_mode == MouseMode::MOUSE_MODE_CAPTURED) {
@@ -501,41 +501,41 @@ void OSUWP::set_mouse_mode(MouseMode p_mode) {
SetEvent(mouse_mode_changed);
}
-OSUWP::MouseMode OSUWP::get_mouse_mode() const {
+OS_UWP::MouseMode OS_UWP::get_mouse_mode() const {
return mouse_mode;
}
-Point2 OSUWP::get_mouse_position() const {
+Point2 OS_UWP::get_mouse_position() const {
return Point2(old_x, old_y);
}
-int OSUWP::get_mouse_button_state() const {
+int OS_UWP::get_mouse_button_state() const {
return last_button_state;
}
-void OSUWP::set_window_title(const String &p_title) {
+void OS_UWP::set_window_title(const String &p_title) {
}
-void OSUWP::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
+void OS_UWP::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
video_mode = p_video_mode;
}
-OS::VideoMode OSUWP::get_video_mode(int p_screen) const {
+OS::VideoMode OS_UWP::get_video_mode(int p_screen) const {
return video_mode;
}
-void OSUWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
+void OS_UWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
}
-String OSUWP::get_name() {
+String OS_UWP::get_name() {
return "UWP";
}
-OS::Date OSUWP::get_date(bool utc) const {
+OS::Date OS_UWP::get_date(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -551,7 +551,7 @@ OS::Date OSUWP::get_date(bool utc) const {
date.dst = false;
return date;
}
-OS::Time OSUWP::get_time(bool utc) const {
+OS::Time OS_UWP::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -566,7 +566,7 @@ OS::Time OSUWP::get_time(bool utc) const {
return time;
}
-OS::TimeZoneInfo OSUWP::get_time_zone_info() const {
+OS::TimeZoneInfo OS_UWP::get_time_zone_info() const {
TIME_ZONE_INFORMATION info;
bool daylight = false;
if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT)
@@ -583,7 +583,7 @@ OS::TimeZoneInfo OSUWP::get_time_zone_info() const {
return ret;
}
-uint64_t OSUWP::get_unix_time() const {
+uint64_t OS_UWP::get_unix_time() const {
FILETIME ft;
SYSTEMTIME st;
@@ -605,14 +605,14 @@ uint64_t OSUWP::get_unix_time() const {
return (*(uint64_t *)&ft - *(uint64_t *)&fep) / 10000000;
};
-void OSUWP::delay_usec(uint32_t p_usec) const {
+void OS_UWP::delay_usec(uint32_t p_usec) const {
int msec = p_usec < 1000 ? 1 : p_usec / 1000;
// no Sleep()
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
}
-uint64_t OSUWP::get_ticks_usec() const {
+uint64_t OS_UWP::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;
@@ -626,13 +626,13 @@ uint64_t OSUWP::get_ticks_usec() const {
return time;
}
-void OSUWP::process_events() {
+void OS_UWP::process_events() {
joypad->process_controllers();
process_key_events();
}
-void OSUWP::process_key_events() {
+void OS_UWP::process_key_events() {
for (int i = 0; i < key_event_pos; i++) {
@@ -653,7 +653,7 @@ void OSUWP::process_key_events() {
key_event_pos = 0;
}
-void OSUWP::queue_key_event(KeyEvent &p_event) {
+void OS_UWP::queue_key_event(KeyEvent &p_event) {
// This merges Char events with the previous Key event, so
// the unicode can be retrieved without sending duplicate events.
if (p_event.type == KeyEvent::MessageType::CHAR_EVENT_MESSAGE && key_event_pos > 0) {
@@ -670,7 +670,7 @@ void OSUWP::queue_key_event(KeyEvent &p_event) {
key_event_buffer[key_event_pos++] = p_event;
}
-void OSUWP::set_cursor_shape(CursorShape p_shape) {
+void OS_UWP::set_cursor_shape(CursorShape p_shape) {
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
@@ -702,62 +702,62 @@ void OSUWP::set_cursor_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
-void OSUWP::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
+void OS_UWP::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
// TODO
}
-Error OSUWP::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
+Error OS_UWP::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
return FAILED;
};
-Error OSUWP::kill(const ProcessID &p_pid) {
+Error OS_UWP::kill(const ProcessID &p_pid) {
return FAILED;
};
-Error OSUWP::set_cwd(const String &p_cwd) {
+Error OS_UWP::set_cwd(const String &p_cwd) {
return FAILED;
}
-String OSUWP::get_executable_path() const {
+String OS_UWP::get_executable_path() const {
return "";
}
-void OSUWP::set_icon(const Ref<Image> &p_icon) {
+void OS_UWP::set_icon(const Ref<Image> &p_icon) {
}
-bool OSUWP::has_environment(const String &p_var) const {
+bool OS_UWP::has_environment(const String &p_var) const {
return false;
};
-String OSUWP::get_environment(const String &p_var) const {
+String OS_UWP::get_environment(const String &p_var) const {
return "";
};
-bool OSUWP::set_environment(const String &p_var, const String &p_value) const {
+bool OS_UWP::set_environment(const String &p_var, const String &p_value) const {
return false;
}
-String OSUWP::get_stdin_string(bool p_block) {
+String OS_UWP::get_stdin_string(bool p_block) {
return String();
}
-void OSUWP::move_window_to_foreground() {
+void OS_UWP::move_window_to_foreground() {
}
-Error OSUWP::shell_open(String p_uri) {
+Error OS_UWP::shell_open(String p_uri) {
return FAILED;
}
-String OSUWP::get_locale() const {
+String OS_UWP::get_locale() const {
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't
return "en";
@@ -767,39 +767,39 @@ String OSUWP::get_locale() const {
#endif
}
-void OSUWP::release_rendering_thread() {
+void OS_UWP::release_rendering_thread() {
gl_context->release_current();
}
-void OSUWP::make_rendering_thread() {
+void OS_UWP::make_rendering_thread() {
gl_context->make_current();
}
-void OSUWP::swap_buffers() {
+void OS_UWP::swap_buffers() {
gl_context->swap_buffers();
}
-bool OSUWP::has_touchscreen_ui_hint() const {
+bool OS_UWP::has_touchscreen_ui_hint() const {
TouchCapabilities ^ tc = ref new TouchCapabilities();
return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
}
-bool OSUWP::has_virtual_keyboard() const {
+bool OS_UWP::has_virtual_keyboard() const {
return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
}
-void OSUWP::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
+void OS_UWP::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
InputPane ^ pane = InputPane::GetForCurrentView();
pane->TryShow();
}
-void OSUWP::hide_virtual_keyboard() {
+void OS_UWP::hide_virtual_keyboard() {
InputPane ^ pane = InputPane::GetForCurrentView();
pane->TryHide();
@@ -818,7 +818,7 @@ static String format_error_message(DWORD id) {
return msg;
}
-Error OSUWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
+Error OS_UWP::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
String full_path = "game/" + p_path;
p_library_handle = (void *)LoadPackagedLibrary(full_path.c_str(), 0);
@@ -830,14 +830,14 @@ Error OSUWP::open_dynamic_library(const String p_path, void *&p_library_handle,
return OK;
}
-Error OSUWP::close_dynamic_library(void *p_library_handle) {
+Error OS_UWP::close_dynamic_library(void *p_library_handle) {
if (!FreeLibrary((HMODULE)p_library_handle)) {
return FAILED;
}
return OK;
}
-Error OSUWP::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional) {
+Error OS_UWP::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional) {
p_symbol_handle = (void *)GetProcAddress((HMODULE)p_library_handle, p_name.utf8().get_data());
if (!p_symbol_handle) {
if (!p_optional) {
@@ -850,7 +850,7 @@ Error OSUWP::get_dynamic_library_symbol_handle(void *p_library_handle, const Str
return OK;
}
-void OSUWP::run() {
+void OS_UWP::run() {
if (!main_loop)
return;
@@ -874,35 +874,35 @@ void OSUWP::run() {
main_loop->finish();
}
-MainLoop *OSUWP::get_main_loop() const {
+MainLoop *OS_UWP::get_main_loop() const {
return main_loop;
}
-String OSUWP::get_user_data_dir() const {
+String OS_UWP::get_user_data_dir() const {
Windows::Storage::StorageFolder ^ data_folder = Windows::Storage::ApplicationData::Current->LocalFolder;
return String(data_folder->Path->Data()).replace("\\", "/");
}
-bool OSUWP::_check_internal_feature_support(const String &p_feature) {
+bool OS_UWP::_check_internal_feature_support(const String &p_feature) {
return p_feature == "pc" || p_feature == "s3tc";
}
-OS::PowerState OSUWP::get_power_state() {
+OS::PowerState OS_UWP::get_power_state() {
return power_manager->get_power_state();
}
-int OSUWP::get_power_seconds_left() {
+int OS_UWP::get_power_seconds_left() {
return power_manager->get_power_seconds_left();
}
-int OSUWP::get_power_percent_left() {
+int OS_UWP::get_power_percent_left() {
return power_manager->get_power_percent_left();
}
-OSUWP::OSUWP() {
+OS_UWP::OS_UWP() {
key_event_pos = 0;
force_quit = false;
@@ -936,7 +936,7 @@ OSUWP::OSUWP() {
_set_logger(memnew(CompositeLogger(loggers)));
}
-OSUWP::~OSUWP() {
+OS_UWP::~OS_UWP() {
#ifdef STDOUT_FILE
fclose(stdo);
#endif
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 5475c4e60a..fd78b3cdf7 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OSUWP_H
-#define OSUWP_H
+#ifndef OS_UWP_H
+#define OS_UWP_H
+#include "context_egl_uwp.h"
#include "core/math/transform_2d.h"
#include "core/os/input.h"
#include "core/os/os.h"
#include "core/ustring.h"
#include "drivers/xaudio2/audio_driver_xaudio2.h"
-#include "gl_context_egl.h"
#include "joypad_uwp.h"
#include "main/input_default.h"
#include "power_uwp.h"
@@ -52,7 +52,7 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-class OSUWP : public OS {
+class OS_UWP : public OS {
public:
struct KeyEvent {
@@ -95,7 +95,7 @@ private:
VisualServer *visual_server;
int pressrc;
- ContextEGL *gl_context;
+ ContextEGL_UWP *gl_context;
Windows::UI::Core::CoreWindow ^ window;
VideoMode video_mode;
@@ -144,7 +144,7 @@ private:
/* clang-format off */
internal:
ManagedType() { alert_close_handle = false; }
- property OSUWP* os;
+ property OS_UWP* os;
/* clang-format on */
};
ManagedType ^ managed_object;
@@ -262,8 +262,8 @@ public:
void queue_key_event(KeyEvent &p_event);
- OSUWP();
- ~OSUWP();
+ OS_UWP();
+ ~OS_UWP();
};
#endif
diff --git a/platform/uwp/power_uwp.h b/platform/uwp/power_uwp.h
index d6623f9340..cc19904a62 100644
--- a/platform/uwp/power_uwp.h
+++ b/platform/uwp/power_uwp.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_UWP_POWER_UWP_H_
-#define PLATFORM_UWP_POWER_UWP_H_
+#ifndef POWER_UWP_H
+#define POWER_UWP_H
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -53,4 +53,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_UWP_POWER_UWP_H_ */
+#endif // POWER_UWP_H
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index e07d373c4b..892d734734 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -7,13 +7,12 @@ from platform_methods import run_in_subprocess
import platform_windows_builders
common_win = [
- "godot_win.cpp",
- "context_gl_win.cpp",
- "crash_handler_win.cpp",
+ "godot_windows.cpp",
+ "context_gl_windows.cpp",
+ "crash_handler_windows.cpp",
"os_windows.cpp",
- "ctxgl_procaddr.cpp",
- "key_mapping_win.cpp",
- "joypad.cpp",
+ "key_mapping_windows.cpp",
+ "joypad_windows.cpp",
"power_windows.cpp",
"windows_terminal_logger.cpp"
]
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_windows.cpp
index 9d267c699f..e715999378 100644
--- a/platform/windows/context_gl_win.cpp
+++ b/platform/windows/context_gl_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* context_gl_win.cpp */
+/* context_gl_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -32,7 +32,7 @@
// Author: Juan Linietsky <reduzio@gmail.com>, (C) 2008
-#include "context_gl_win.h"
+#include "context_gl_windows.h"
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
@@ -43,32 +43,32 @@
typedef HGLRC(APIENTRY *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int *);
-void ContextGL_Win::release_current() {
+void ContextGL_Windows::release_current() {
wglMakeCurrent(hDC, NULL);
}
-void ContextGL_Win::make_current() {
+void ContextGL_Windows::make_current() {
wglMakeCurrent(hDC, hRC);
}
-int ContextGL_Win::get_window_width() {
+int ContextGL_Windows::get_window_width() {
return OS::get_singleton()->get_video_mode().width;
}
-int ContextGL_Win::get_window_height() {
+int ContextGL_Windows::get_window_height() {
return OS::get_singleton()->get_video_mode().height;
}
-void ContextGL_Win::swap_buffers() {
+void ContextGL_Windows::swap_buffers() {
SwapBuffers(hDC);
}
-void ContextGL_Win::set_use_vsync(bool p_use) {
+void ContextGL_Windows::set_use_vsync(bool p_use) {
if (wglSwapIntervalEXT) {
wglSwapIntervalEXT(p_use ? 1 : 0);
@@ -76,14 +76,14 @@ void ContextGL_Win::set_use_vsync(bool p_use) {
use_vsync = p_use;
}
-bool ContextGL_Win::is_using_vsync() const {
+bool ContextGL_Windows::is_using_vsync() const {
return use_vsync;
}
#define _WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
-Error ContextGL_Win::initialize() {
+Error ContextGL_Windows::initialize() {
static PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
@@ -172,14 +172,14 @@ Error ContextGL_Win::initialize() {
return OK;
}
-ContextGL_Win::ContextGL_Win(HWND hwnd, bool p_opengl_3_context) {
+ContextGL_Windows::ContextGL_Windows(HWND hwnd, bool p_opengl_3_context) {
opengl_3_context = p_opengl_3_context;
hWnd = hwnd;
use_vsync = false;
}
-ContextGL_Win::~ContextGL_Win() {
+ContextGL_Windows::~ContextGL_Windows() {
}
#endif
diff --git a/platform/windows/context_gl_win.h b/platform/windows/context_gl_windows.h
index 3076bbb1e8..09801b9146 100644
--- a/platform/windows/context_gl_win.h
+++ b/platform/windows/context_gl_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* context_gl_win.h */
+/* context_gl_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -43,7 +43,7 @@
typedef bool(APIENTRY *PFNWGLSWAPINTERVALEXTPROC)(int interval);
-class ContextGL_Win : public ContextGL {
+class ContextGL_Windows : public ContextGL {
HDC hDC;
HGLRC hRC;
@@ -68,8 +68,8 @@ public:
virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
- ContextGL_Win(HWND hwnd, bool p_opengl_3_context);
- virtual ~ContextGL_Win();
+ ContextGL_Windows(HWND hwnd, bool p_opengl_3_context);
+ virtual ~ContextGL_Windows();
};
#endif
diff --git a/platform/windows/crash_handler_win.cpp b/platform/windows/crash_handler_windows.cpp
index 1d93c6d8dd..f93a449c7b 100644
--- a/platform/windows/crash_handler_win.cpp
+++ b/platform/windows/crash_handler_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* crash_handler_win.cpp */
+/* crash_handler_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "crash_handler_windows.h"
+
#include "core/project_settings.h"
#include "main/main.h"
#include "os_windows.h"
diff --git a/platform/windows/crash_handler_win.h b/platform/windows/crash_handler_windows.h
index 016612a00e..eba72beb7e 100644
--- a/platform/windows/crash_handler_win.h
+++ b/platform/windows/crash_handler_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* crash_handler_win.h */
+/* crash_handler_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CRASH_HANDLER_WIN_H
-#define CRASH_HANDLER_WIN_H
+#ifndef CRASH_HANDLER_WINDOWS_H
+#define CRASH_HANDLER_WINDOWS_H
#include <windows.h>
@@ -54,4 +54,4 @@ public:
~CrashHandler();
};
-#endif
+#endif // CRASH_HANDLER_WINDOWS_H
diff --git a/platform/windows/ctxgl_procaddr.cpp b/platform/windows/ctxgl_procaddr.cpp
deleted file mode 100644
index ecff8f7a4d..0000000000
--- a/platform/windows/ctxgl_procaddr.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/*************************************************************************/
-/* ctxgl_procaddr.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifdef OPENGL_ENABLED
-#include "ctxgl_procaddr.h"
-#include <GL/gl.h>
-#include <stdio.h>
-
-static PROC _gl_procs[] = {
- (PROC)glCullFace,
- (PROC)glFrontFace,
- (PROC)glHint,
- (PROC)glLineWidth,
- (PROC)glPointSize,
- (PROC)glPolygonMode,
- (PROC)glScissor,
- (PROC)glTexParameterf,
- (PROC)glTexParameterfv,
- (PROC)glTexParameteri,
- (PROC)glTexParameteriv,
- (PROC)glTexImage1D,
- (PROC)glTexImage2D,
- (PROC)glDrawBuffer,
- (PROC)glClear,
- (PROC)glClearColor,
- (PROC)glClearStencil,
- (PROC)glClearDepth,
- (PROC)glStencilMask,
- (PROC)glColorMask,
- (PROC)glDepthMask,
- (PROC)glDisable,
- (PROC)glEnable,
- (PROC)glFinish,
- (PROC)glFlush,
- (PROC)glBlendFunc,
- (PROC)glLogicOp,
- (PROC)glStencilFunc,
- (PROC)glStencilOp,
- (PROC)glDepthFunc,
- (PROC)glPixelStoref,
- (PROC)glPixelStorei,
- (PROC)glReadBuffer,
- (PROC)glReadPixels,
- (PROC)glGetBooleanv,
- (PROC)glGetDoublev,
- (PROC)glGetError,
- (PROC)glGetFloatv,
- (PROC)glGetIntegerv,
- (PROC)glGetString,
- (PROC)glGetTexImage,
- (PROC)glGetTexParameterfv,
- (PROC)glGetTexParameteriv,
- (PROC)glGetTexLevelParameterfv,
- (PROC)glGetTexLevelParameteriv,
- (PROC)glIsEnabled,
- (PROC)glDepthRange,
- (PROC)glViewport,
- /* not detected in ATI */
- (PROC)glDrawArrays,
- (PROC)glDrawElements,
- (PROC)glGetPointerv,
- (PROC)glPolygonOffset,
- (PROC)glCopyTexImage1D,
- (PROC)glCopyTexImage2D,
- (PROC)glCopyTexSubImage1D,
- (PROC)glCopyTexSubImage2D,
- (PROC)glTexSubImage1D,
- (PROC)glTexSubImage2D,
- (PROC)glBindTexture,
- (PROC)glDeleteTextures,
- (PROC)glGenTextures,
- (PROC)glIsTexture,
-
- 0
-};
-
-static const char *_gl_proc_names[] = {
- "glCullFace",
- "glFrontFace",
- "glHint",
- "glLineWidth",
- "glPointSize",
- "glPolygonMode",
- "glScissor",
- "glTexParameterf",
- "glTexParameterfv",
- "glTexParameteri",
- "glTexParameteriv",
- "glTexImage1D",
- "glTexImage2D",
- "glDrawBuffer",
- "glClear",
- "glClearColor",
- "glClearStencil",
- "glClearDepth",
- "glStencilMask",
- "glColorMask",
- "glDepthMask",
- "glDisable",
- "glEnable",
- "glFinish",
- "glFlush",
- "glBlendFunc",
- "glLogicOp",
- "glStencilFunc",
- "glStencilOp",
- "glDepthFunc",
- "glPixelStoref",
- "glPixelStorei",
- "glReadBuffer",
- "glReadPixels",
- "glGetBooleanv",
- "glGetDoublev",
- "glGetError",
- "glGetFloatv",
- "glGetIntegerv",
- "glGetString",
- "glGetTexImage",
- "glGetTexParameterfv",
- "glGetTexParameteriv",
- "glGetTexLevelParameterfv",
- "glGetTexLevelParameteriv",
- "glIsEnabled",
- "glDepthRange",
- "glViewport",
- /* not detected in ati */
- "glDrawArrays",
- "glDrawElements",
- "glGetPointerv",
- "glPolygonOffset",
- "glCopyTexImage1D",
- "glCopyTexImage2D",
- "glCopyTexSubImage1D",
- "glCopyTexSubImage2D",
- "glTexSubImage1D",
- "glTexSubImage2D",
- "glBindTexture",
- "glDeleteTextures",
- "glGenTextures",
- "glIsTexture",
-
- 0
-};
-
-PROC get_gl_proc_address(const char *p_address) {
-
- PROC proc = wglGetProcAddress((const CHAR *)p_address);
- if (!proc) {
-
- int i = 0;
- while (_gl_procs[i]) {
-
- if (strcmp(p_address, _gl_proc_names[i]) == 0) {
- return _gl_procs[i];
- }
- i++;
- }
- }
- return proc;
-}
-#endif
diff --git a/platform/windows/ctxgl_procaddr.h b/platform/windows/ctxgl_procaddr.h
deleted file mode 100644
index cc40804ae6..0000000000
--- a/platform/windows/ctxgl_procaddr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************/
-/* ctxgl_procaddr.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef CTXGL_PROCADDR_H
-#define CTXGL_PROCADDR_H
-
-#ifdef OPENGL_ENABLED
-#include <windows.h>
-
-PROC get_gl_proc_address(const char *p_address);
-#endif
-#endif // CTXGL_PROCADDR_H
diff --git a/platform/windows/godot_win.cpp b/platform/windows/godot_windows.cpp
index 0f5065d816..0b52682c7c 100644
--- a/platform/windows/godot_win.cpp
+++ b/platform/windows/godot_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* godot_win.cpp */
+/* godot_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,6 +30,7 @@
#include "main/main.h"
#include "os_windows.h"
+
#include <locale.h>
#include <stdio.h>
diff --git a/platform/windows/joypad.cpp b/platform/windows/joypad_windows.cpp
index 5fafc7c8c0..5a399cdf90 100644
--- a/platform/windows/joypad.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad.cpp */
+/* joypad_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "joypad.h"
+#include "joypad_windows.h"
#include <oleauto.h>
#include <wbemidl.h>
diff --git a/platform/windows/joypad.h b/platform/windows/joypad_windows.h
index 3a6c0cef9f..4af5d9bd6a 100644
--- a/platform/windows/joypad.h
+++ b/platform/windows/joypad_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad.h */
+/* joypad_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,10 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef JOYPAD_H
-#define JOYPAD_H
+#ifndef JOYPAD_WINDOWS_H
+#define JOYPAD_WINDOWS_H
#include "os_windows.h"
+
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <xinput.h> // on unix the file is called "xinput.h", on windows I'm sure it won't mind
@@ -145,4 +146,4 @@ private:
XInputSetState_t xinput_set_state;
};
-#endif
+#endif // JOYPAD_WINDOWS_H
diff --git a/platform/windows/key_mapping_win.cpp b/platform/windows/key_mapping_windows.cpp
index f9b01e5532..01bbb072bb 100644
--- a/platform/windows/key_mapping_win.cpp
+++ b/platform/windows/key_mapping_windows.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* key_mapping_win.cpp */
+/* key_mapping_windows.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "key_mapping_win.h"
+#include "key_mapping_windows.h"
#include <stdio.h>
diff --git a/platform/windows/key_mapping_win.h b/platform/windows/key_mapping_windows.h
index e4f8a61d04..dbb8c20f1e 100644
--- a/platform/windows/key_mapping_win.h
+++ b/platform/windows/key_mapping_windows.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* key_mapping_win.h */
+/* key_mapping_windows.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -45,4 +45,4 @@ public:
static unsigned int get_keysym(unsigned int p_code);
};
-#endif
+#endif // KEY_MAPPING_WINDOWS_H
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 9ae1be9afd..3de33da8f5 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -43,15 +43,15 @@
#include "drivers/windows/rw_lock_windows.h"
#include "drivers/windows/semaphore_windows.h"
#include "drivers/windows/thread_windows.h"
-#include "joypad.h"
+#include "joypad_windows.h"
#include "lang_table.h"
#include "main/main.h"
#include "servers/audio_server.h"
#include "servers/visual/visual_server_raster.h"
#include "servers/visual/visual_server_wrap_mt.h"
#include "windows_terminal_logger.h"
-#include <avrt.h>
+#include <avrt.h>
#include <process.h>
#include <regstr.h>
#include <shlobj.h>
@@ -1273,7 +1273,7 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
gl_context = NULL;
while (!gl_context) {
- gl_context = memnew(ContextGL_Win(hWnd, gles3_context));
+ gl_context = memnew(ContextGL_Windows(hWnd, gles3_context));
if (gl_context->initialize() != OK) {
memdelete(gl_context);
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 771789c86b..8ca58b534a 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -30,14 +30,18 @@
#ifndef OS_WINDOWS_H
#define OS_WINDOWS_H
-#include "context_gl_win.h"
+
+#include "context_gl_windows.h"
#include "core/os/input.h"
#include "core/os/os.h"
#include "core/project_settings.h"
-#include "crash_handler_win.h"
+#include "crash_handler_windows.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
+#include "drivers/unix/ip_unix.h"
#include "drivers/wasapi/audio_driver_wasapi.h"
-#include "drivers/winmidi/win_midi.h"
+#include "drivers/winmidi/midi_driver_winmidi.h"
+#include "key_mapping_windows.h"
+#include "main/input_default.h"
#include "power_windows.h"
#include "servers/audio_server.h"
#include "servers/visual/rasterizer.h"
@@ -45,9 +49,6 @@
#ifdef XAUDIO2_ENABLED
#include "drivers/xaudio2/audio_driver_xaudio2.h"
#endif
-#include "drivers/unix/ip_unix.h"
-#include "key_mapping_win.h"
-#include "main/input_default.h"
#include <fcntl.h>
#include <io.h>
@@ -86,7 +87,7 @@ class OS_Windows : public OS {
int old_x, old_y;
Point2i center;
#if defined(OPENGL_ENABLED)
- ContextGL_Win *gl_context;
+ ContextGL_Windows *gl_context;
#endif
VisualServer *visual_server;
int pressrc;
diff --git a/platform/windows/power_windows.h b/platform/windows/power_windows.h
index 4d83d75e00..ef75ce6271 100644
--- a/platform/windows/power_windows.h
+++ b/platform/windows/power_windows.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PLATFORM_WINDOWS_POWER_WINDOWS_H_
-#define PLATFORM_WINDOWS_POWER_WINDOWS_H_
+#ifndef POWER_WINDOWS_H
+#define POWER_WINDOWS_H
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -55,4 +55,4 @@ public:
int get_power_percent_left();
};
-#endif /* PLATFORM_WINDOWS_POWER_WINDOWS_H_ */
+#endif // POWER_WINDOWS_H
diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp
index 8737a2b92b..1e7f393bdd 100644
--- a/platform/x11/crash_handler_x11.cpp
+++ b/platform/x11/crash_handler_x11.cpp
@@ -28,15 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifdef DEBUG_ENABLED
-#define CRASH_HANDLER_ENABLED 1
-#endif
-
#include "crash_handler_x11.h"
+
#include "core/os/os.h"
#include "core/project_settings.h"
#include "main/main.h"
+#ifdef DEBUG_ENABLED
+#define CRASH_HANDLER_ENABLED 1
+#endif
+
#ifdef CRASH_HANDLER_ENABLED
#include <cxxabi.h>
#include <dlfcn.h>
diff --git a/platform/x11/crash_handler_x11.h b/platform/x11/crash_handler_x11.h
index 6efdd33d9d..d0664aef85 100644
--- a/platform/x11/crash_handler_x11.h
+++ b/platform/x11/crash_handler_x11.h
@@ -45,4 +45,4 @@ public:
~CrashHandler();
};
-#endif
+#endif // CRASH_HANDLER_X11_H
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index cf1619bae2..6d1a66af84 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -35,7 +35,7 @@
#include "core/os/input.h"
#include "crash_handler_x11.h"
#include "drivers/alsa/audio_driver_alsa.h"
-#include "drivers/alsamidi/alsa_midi.h"
+#include "drivers/alsamidi/midi_driver_alsamidi.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
#include "drivers/unix/os_unix.h"
#include "joypad_linux.h"
diff --git a/platform/x11/power_x11.h b/platform/x11/power_x11.h
index 56fbd602f4..469e3910f4 100644
--- a/platform/x11/power_x11.h
+++ b/platform/x11/power_x11.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef X11_POWER_H_
-#define X11_POWER_H_
+#ifndef POWER_X11_H
+#define POWER_X11_H
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
@@ -63,4 +63,4 @@ public:
int get_power_percent_left();
};
-#endif /* X11_POWER_H_ */
+#endif // POWER_X11_H
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index c756f49bbd..5440a1d8c3 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -36,9 +36,9 @@
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/line_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/shape_line_2d.h"
void CollisionShape2D::_shape_changed() {
diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h
index 2ca28d09c4..b961385e33 100644
--- a/scene/2d/line_builder.h
+++ b/scene/2d/line_builder.h
@@ -34,7 +34,7 @@
#include "core/color.h"
#include "core/math/vector2.h"
#include "line_2d.h"
-#include "scene/resources/color_ramp.h"
+#include "scene/resources/gradient.h"
class LineBuilder {
public:
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation_2d.cpp
index 1c0e924433..57e0a5b118 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation_2d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* navigation2d.cpp */
+/* navigation_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "navigation2d.h"
+#include "navigation_2d.h"
#define USE_ENTRY_POINT
diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation_2d.h
index fc1762221c..b4d659ff5c 100644
--- a/scene/2d/navigation2d.h
+++ b/scene/2d/navigation_2d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* navigation2d.h */
+/* navigation_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -171,4 +171,4 @@ public:
Navigation2D();
};
-#endif // Navigation2D2D_H
+#endif // NAVIGATION_2D_H
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 50618c6baa..0f6af358bd 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -32,7 +32,7 @@
#include "core/core_string_names.h"
#include "core/engine.h"
-#include "navigation2d.h"
+#include "navigation_2d.h"
#include "thirdparty/misc/triangulator.h"
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index a44098fd77..e450e1e256 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -33,7 +33,7 @@
#include "core/self_list.h"
#include "core/vset.h"
-#include "scene/2d/navigation2d.h"
+#include "scene/2d/navigation_2d.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/tile_set.h"
diff --git a/scene/2d/screen_button.cpp b/scene/2d/touch_screen_button.cpp
index fb1558a404..9a1a759e72 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* screen_button.cpp */
+/* touch_screen_button.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "screen_button.h"
+#include "touch_screen_button.h"
+
#include "core/input_map.h"
#include "core/os/input.h"
#include "core/os/os.h"
diff --git a/scene/2d/screen_button.h b/scene/2d/touch_screen_button.h
index fd944ead64..df54e5340b 100644
--- a/scene/2d/screen_button.h
+++ b/scene/2d/touch_screen_button.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* screen_button.h */
+/* touch_screen_button.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SCREEN_BUTTON_H
-#define SCREEN_BUTTON_H
+#ifndef TOUCH_SCREEN_BUTTON_H
+#define TOUCH_SCREEN_BUTTON_H
#include "scene/2d/node_2d.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/texture.h"
@@ -112,4 +112,4 @@ public:
VARIANT_ENUM_CAST(TouchScreenButton::VisibilityMode);
-#endif // SCREEN_BUTTON_H
+#endif // TOUCH_SCREEN_BUTTON_H
diff --git a/scene/3d/SCsub b/scene/3d/SCsub
index 35cc7479d8..200cf4316f 100644
--- a/scene/3d/SCsub
+++ b/scene/3d/SCsub
@@ -7,6 +7,6 @@ if env['disable_3d']:
env.scene_sources.append("3d/skeleton.cpp")
env.scene_sources.append("3d/particles.cpp")
env.scene_sources.append("3d/visual_instance.cpp")
- env.scene_sources.append("3d/scenario_fx.cpp")
+ env.scene_sources.append("3d/world_environment.cpp")
else:
env.add_source_files(env.scene_sources, "*.cpp")
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index 2921a3a881..48d65b79f7 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -32,7 +32,7 @@
#define REFLECTIONPROBE_H
#include "scene/3d/visual_instance.h"
-#include "scene/resources/sky_box.h"
+#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
#include "servers/visual_server.h"
diff --git a/scene/3d/scenario_fx.cpp b/scene/3d/world_environment.cpp
index ad9b61e1ff..3cd43cbf5b 100644
--- a/scene/3d/scenario_fx.cpp
+++ b/scene/3d/world_environment.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scenario_fx.cpp */
+/* world_environment.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scenario_fx.h"
+#include "world_environment.h"
#include "scene/main/viewport.h"
void WorldEnvironment::_notification(int p_what) {
diff --git a/scene/3d/scenario_fx.h b/scene/3d/world_environment.h
index 6317dae75d..bf36a0a532 100644
--- a/scene/3d/scenario_fx.h
+++ b/scene/3d/world_environment.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scenario_fx.h */
+/* world_environment.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_stream_player.cpp
index 4eae3b04e7..e6864e2117 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_player.cpp */
+/* audio_stream_player.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "audio_player.h"
+#include "audio_stream_player.h"
#include "core/engine.h"
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_stream_player.h
index 2e9526c335..0f7713bf33 100644
--- a/scene/audio/audio_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_player.h */
+/* audio_stream_player.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef AUDIOPLAYER_H
-#define AUDIOPLAYER_H
+#ifndef AUDIO_STREAM_PLAYER_H
+#define AUDIO_STREAM_PLAYER_H
#include "scene/main/node.h"
#include "servers/audio/audio_stream.h"
@@ -110,4 +110,5 @@ public:
};
VARIANT_ENUM_CAST(AudioStreamPlayer::MixTarget)
-#endif // AUDIOPLAYER_H
+
+#endif // AUDIO_STREAM_PLAYER_H
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index fd340b3f6c..662278a17b 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -33,8 +33,8 @@
#include "scene/gui/color_picker.h"
#include "scene/gui/popup.h"
-#include "scene/resources/color_ramp.h"
#include "scene/resources/default_theme/theme_data.h"
+#include "scene/resources/gradient.h"
#define POINT_WIDTH (8 * EDSCALE)
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index ffe248ac5e..17c4bca67b 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -32,7 +32,7 @@
#define LINKBUTTON_H
#include "scene/gui/base_button.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
class LinkButton : public BaseButton {
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h
index 4dc0de5358..d9224de686 100644
--- a/scene/gui/texture_button.h
+++ b/scene/gui/texture_button.h
@@ -32,7 +32,7 @@
#define TEXTURE_BUTTON_H
#include "scene/gui/base_button.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
class TextureButton : public BaseButton {
GDCLASS(TextureButton, BaseButton);
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 3a1ff5cb06..e15a64604d 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -43,7 +43,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-class SceneTree;
class PackedScene;
class Node;
class Viewport;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 61d6fc7401..c66814d115 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -37,8 +37,8 @@
#include "scene/3d/camera.h"
#include "scene/3d/collision_object.h"
#include "scene/3d/listener.h"
-#include "scene/3d/scenario_fx.h"
#include "scene/3d/spatial.h"
+#include "scene/3d/world_environment.h"
#include "scene/gui/control.h"
#include "scene/gui/label.h"
#include "scene/gui/menu_button.h"
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 078d880d0e..49c9c4c23c 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -48,7 +48,7 @@
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/line_2d.h"
#include "scene/2d/mesh_instance_2d.h"
-#include "scene/2d/navigation2d.h"
+#include "scene/2d/navigation_2d.h"
#include "scene/2d/parallax_background.h"
#include "scene/2d/parallax_layer.h"
#include "scene/2d/particles_2d.h"
@@ -58,10 +58,10 @@
#include "scene/2d/position_2d.h"
#include "scene/2d/ray_cast_2d.h"
#include "scene/2d/remote_transform_2d.h"
-#include "scene/2d/screen_button.h"
#include "scene/2d/skeleton_2d.h"
#include "scene/2d/sprite.h"
#include "scene/2d/tile_map.h"
+#include "scene/2d/touch_screen_button.h"
#include "scene/2d/visibility_notifier_2d.h"
#include "scene/2d/y_sort.h"
#include "scene/animation/animation_blend_space_1d.h"
@@ -73,7 +73,7 @@
#include "scene/animation/animation_tree_player.h"
#include "scene/animation/root_motion_view.h"
#include "scene/animation/tween.h"
-#include "scene/audio/audio_player.h"
+#include "scene/audio/audio_stream_player.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/center_container.h"
@@ -125,12 +125,11 @@
#include "scene/main/timer.h"
#include "scene/main/viewport.h"
#include "scene/resources/audio_stream_sample.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
#include "scene/resources/box_shape.h"
#include "scene/resources/capsule_shape.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
-#include "scene/resources/color_ramp.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape.h"
@@ -139,6 +138,8 @@
#include "scene/resources/default_theme/default_theme.h"
#include "scene/resources/dynamic_font.h"
#include "scene/resources/dynamic_font_stb.h"
+#include "scene/resources/gradient.h"
+#include "scene/resources/line_shape_2d.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/mesh_data_tool.h"
@@ -151,10 +152,9 @@
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/rectangle_shape_2d.h"
-#include "scene/resources/scene_format_text.h"
+#include "scene/resources/resource_format_text.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/shape_line_2d.h"
-#include "scene/resources/sky_box.h"
+#include "scene/resources/sky.h"
#include "scene/resources/sphere_shape.h"
#include "scene/resources/surface_tool.h"
#include "scene/resources/text_file.h"
@@ -167,8 +167,8 @@
#include "scene/resources/world_2d.h"
#include "scene/scene_string_names.h"
-#include "scene/3d/scenario_fx.h"
#include "scene/3d/spatial.h"
+#include "scene/3d/world_environment.h"
#ifndef _3D_DISABLED
#include "scene/3d/area.h"
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_map.cpp
index 0e2152f244..8263096c8f 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_map.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* bit_mask.cpp */
+/* bit_map.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "bit_mask.h"
+#include "bit_map.h"
#include "core/io/image_loader.h"
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_map.h
index 4575064260..b3c86afd38 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_map.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* bit_mask.h */
+/* bit_map.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef BIT_MASK_H
-#define BIT_MASK_H
+#ifndef BIT_MAP_H
+#define BIT_MAP_H
#include "core/image.h"
#include "core/io/resource_loader.h"
@@ -72,4 +72,4 @@ public:
BitMap();
};
-#endif // BIT_MASK_H
+#endif // BIT_MAP_H
diff --git a/scene/resources/bounds.cpp b/scene/resources/bounds.cpp
deleted file mode 100644
index e6fa5b818d..0000000000
--- a/scene/resources/bounds.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* bounds.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "bounds.h"
-
-void Bounds::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("set_bsp_tree", "bsp_tree"), &Bounds::set_bsp_tree);
- ClassDB::bind_method(D_METHOD("get_bsp_tree"), &Bounds::get_bsp_tree);
-
- ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "bsp_tree"), "set_bsp_tree", "get_bsp_tree");
-}
-
-void Bounds::set_bsp_tree(const BSP_Tree &p_bsp_tree) {
-
- bsp_tree = p_bsp_tree;
-}
-
-BSP_Tree Bounds::get_bsp_tree() const {
-
- return bsp_tree;
-}
-
-Bounds::Bounds() {
-}
diff --git a/scene/resources/bounds.h b/scene/resources/bounds.h
deleted file mode 100644
index 9a1801f23d..0000000000
--- a/scene/resources/bounds.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************/
-/* bounds.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef BOUNDS_H
-#define BOUNDS_H
-
-#include "core/math/bsp_tree.h"
-#include "core/resource.h"
-
-class Bounds : public Resource {
-
- GDCLASS(Bounds, Resource);
- BSP_Tree bsp_tree;
-
-protected:
- static void _bind_methods();
-
-public:
- void set_bsp_tree(const BSP_Tree &p_bsp_tree);
- BSP_Tree get_bsp_tree() const;
-
- Bounds();
-};
-
-#endif // BOUNDS_H
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 666112b473..a54f13a88f 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -32,7 +32,7 @@
#define ENVIRONMENT_H
#include "core/resource.h"
-#include "scene/resources/sky_box.h"
+#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/color_ramp.cpp b/scene/resources/gradient.cpp
index 845a1474a4..99ce8ef821 100644
--- a/scene/resources/color_ramp.cpp
+++ b/scene/resources/gradient.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* color_ramp.cpp */
+/* gradient.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "color_ramp.h"
+#include "gradient.h"
+
#include "core/core_string_names.h"
//setter and getter names for property serialization
diff --git a/scene/resources/color_ramp.h b/scene/resources/gradient.h
index 7a96bb429b..a51a0ca0d0 100644
--- a/scene/resources/color_ramp.h
+++ b/scene/resources/gradient.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* color_ramp.h */
+/* gradient.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SCENE_RESOURCES_COLOR_RAMP_H_
-#define SCENE_RESOURCES_COLOR_RAMP_H_
+#ifndef GRADIENT_H
+#define GRADIENT_H
#include "core/resource.h"
@@ -126,4 +126,4 @@ public:
int get_points_count() const;
};
-#endif /* SCENE_RESOURCES_COLOR_RAMP_H_ */
+#endif // GRADIENT_H
diff --git a/scene/resources/shape_line_2d.cpp b/scene/resources/line_shape_2d.cpp
index 4ca535658f..f5d5fb561a 100644
--- a/scene/resources/shape_line_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* shape_line_2d.cpp */
+/* line_shape_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "shape_line_2d.h"
+#include "line_shape_2d.h"
+
#include "servers/physics_2d_server.h"
#include "servers/visual_server.h"
diff --git a/scene/resources/shape_line_2d.h b/scene/resources/line_shape_2d.h
index dd3dbe3a43..f684862025 100644
--- a/scene/resources/shape_line_2d.h
+++ b/scene/resources/line_shape_2d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* shape_line_2d.h */
+/* line_shape_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SHAPE_LINE_2D_H
-#define SHAPE_LINE_2D_H
+#ifndef LINE_SHAPE_2D_H
+#define LINE_SHAPE_2D_H
#include "scene/resources/shape_2d.h"
@@ -59,4 +59,4 @@ public:
LineShape2D();
};
-#endif // SHAPE_LINE_2D_H
+#endif // LINE_SHAPE_2D_H
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/resource_format_text.cpp
index d00a7c2918..e838d4a685 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scene_format_text.cpp */
+/* resource_format_text.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scene_format_text.h"
+#include "resource_format_text.h"
+
#include "core/io/resource_format_binary.h"
#include "core/os/dir_access.h"
#include "core/project_settings.h"
diff --git a/scene/resources/scene_format_text.h b/scene/resources/resource_format_text.h
index 8fedbd0dd6..526f7760d2 100644
--- a/scene/resources/scene_format_text.h
+++ b/scene/resources/resource_format_text.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* scene_format_text.h */
+/* resource_format_text.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SCENE_FORMAT_TEXT_H
-#define SCENE_FORMAT_TEXT_H
+#ifndef RESOURCE_FORMAT_TEXT_H
+#define RESOURCE_FORMAT_TEXT_H
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
@@ -180,4 +180,4 @@ public:
ResourceFormatSaverText();
};
-#endif // SCENE_FORMAT_TEXT_H
+#endif // RESOURCE_FORMAT_TEXT_H
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky.cpp
index d9da85310e..a473fe8b7f 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sky_box.cpp */
+/* sky.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "sky_box.h"
+#include "sky.h"
+
#include "core/io/image_loader.h"
void Sky::set_radiance_size(RadianceSize p_size) {
diff --git a/scene/resources/sky_box.h b/scene/resources/sky.h
index af10803b36..3b410396e0 100644
--- a/scene/resources/sky_box.h
+++ b/scene/resources/sky.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* sky_box.h */
+/* sky.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SKY_BOX_H
-#define SKY_BOX_H
+#ifndef SKY_H
+#define SKY_H
#include "core/os/thread.h"
#include "scene/resources/texture.h"
+
class Sky : public Resource {
GDCLASS(Sky, Resource);
@@ -196,4 +197,4 @@ public:
VARIANT_ENUM_CAST(ProceduralSky::TextureSize)
-#endif // SKY_BOX_H
+#endif // SKY_H
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index ff5900cd3e..b60ec9a80d 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -34,7 +34,7 @@
#include "core/io/image_loader.h"
#include "core/method_bind_ext.gen.inc"
#include "core/os/os.h"
-#include "scene/resources/bit_mask.h"
+#include "scene/resources/bit_map.h"
Size2 Texture::get_size() const {
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 4b5b504510..bfea0f9300 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -37,8 +37,8 @@
#include "core/os/rw_lock.h"
#include "core/os/thread_safe.h"
#include "core/resource.h"
-#include "scene/resources/color_ramp.h"
#include "scene/resources/curve.h"
+#include "scene/resources/gradient.h"
#include "servers/visual_server.h"
/**
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 103b06dbc1..4d1a7f255c 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -32,7 +32,7 @@
#define SCENE_STRING_NAMES_H
#include "core/node_path.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
class SceneStringNames {
friend void register_scene_types();
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index fdc5eccc5a..d40de669fd 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -32,7 +32,7 @@
#include "core/math/geometry.h"
#include "core/math/quick_hull.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#define _POINT_SNAP 0.001953125
#define _EDGE_IS_VALID_SUPPORT_THRESHOLD 0.0002
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 558700f400..b622550ec9 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -31,7 +31,7 @@
#include "shape_2d_sw.h"
#include "core/math/geometry.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
void Shape2DSW::configure(const Rect2 &p_aabb) {
aabb = p_aabb;
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index 185bad4222..acc3297bed 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -33,7 +33,7 @@
#include "core/list.h"
#include "core/map.h"
-#include "core/string_db.h"
+#include "core/string_name.h"
#include "core/typedefs.h"
#include "core/ustring.h"
#include "core/variant.h"
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index bb02027479..e1ecba6334 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_raster.h"
#include "visual_server_viewport.h"
diff --git a/servers/visual/visual_server_global.cpp b/servers/visual/visual_server_globals.cpp
index 2d6d489759..5c247c7f0f 100644
--- a/servers/visual/visual_server_global.cpp
+++ b/servers/visual/visual_server_globals.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* visual_server_global.cpp */
+/* visual_server_globals.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
RasterizerStorage *VisualServerGlobals::storage = NULL;
RasterizerCanvas *VisualServerGlobals::canvas_render = NULL;
diff --git a/servers/visual/visual_server_global.h b/servers/visual/visual_server_globals.h
index b510307e81..04d52aa1eb 100644
--- a/servers/visual/visual_server_global.h
+++ b/servers/visual/visual_server_globals.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* visual_server_global.h */
+/* visual_server_globals.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef VISUALSERVERGLOBAL_H
-#define VISUALSERVERGLOBAL_H
+#ifndef VISUAL_SERVER_GLOBALS_H
+#define VISUAL_SERVER_GLOBALS_H
#include "rasterizer.h"
@@ -51,4 +51,4 @@ public:
#define VSG VisualServerGlobals
-#endif // VISUALSERVERGLOBAL_H
+#endif // VISUAL_SERVER_GLOBALS_H
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 7be3bc562d..6622433b17 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -33,9 +33,9 @@
#include "core/io/marshalls.h"
#include "core/os/os.h"
#include "core/project_settings.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
// careful, these may run in different threads than the visual server
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index e6434189f9..89a759b963 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -31,12 +31,11 @@
#ifndef VISUAL_SERVER_RASTER_H
#define VISUAL_SERVER_RASTER_H
-#include "core/allocators.h"
#include "core/math/octree.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual_server.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
#include "visual_server_viewport.h"
/**
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index c8d64fca45..5d0456686a 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -30,7 +30,7 @@
#include "visual_server_scene.h"
#include "core/os/os.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_raster.h"
#include <new>
/* CAMERA API */
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index 539855bdc4..7583acd88f 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -33,7 +33,6 @@
#include "servers/visual/rasterizer.h"
-#include "core/allocators.h"
#include "core/math/geometry.h"
#include "core/math/octree.h"
#include "core/os/semaphore.h"
@@ -120,7 +119,6 @@ public:
VS::ScenarioDebugMode debug;
RID self;
- // well wtf, balloon allocator is slower?
Octree<Instance, true> octree;
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index 7a7ae3a823..d6e43b0f00 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -32,7 +32,7 @@
#include "core/project_settings.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::Eyes p_eye) {