Skip to content

Commit

Permalink
Scene: Ensure classes match their header filename
Browse files Browse the repository at this point in the history
Also drop some unused files.

Renamed:
- `scene/2d/navigation2d.h` -> `navigation_2d.h`
- `scene/2d/screen_button.h` -> `touch_screen_button.h`
- `scene/3d/scenario_fx.h` -> `world_environment.h`
- `scene/audio/audio_player.h` -> `audio_stream_player.h`
- `scene/resources/bit_mask.h` -> `bit_map.h`
- `scene/resources/color_ramp.h` -> `gradient.h`
- `scene/resources/shape_line_2d.h` -> `line_shape_2d.h`
- `scene/resources/scene_format_text.h` -> `resource_format_text.h`
- `scene/resources/sky_box.h` -> `sky.h`

Dropped:
- `scene/resources/bounds.h`
  • Loading branch information
akien-mga committed Feb 12, 2019
1 parent bc26d0d commit c5dcbeb
Show file tree
Hide file tree
Showing 43 changed files with 87 additions and 185 deletions.
2 changes: 1 addition & 1 deletion editor/editor_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion editor/import/resource_importer_bitmask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion editor/import/resource_importer_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/audio_stream_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/collision_shape_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/editor_preview_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion modules/gdnative/nativescript/nativescript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion scene/2d/collision_shape_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
2 changes: 1 addition & 1 deletion scene/2d/line_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions scene/2d/navigation2d.cpp → scene/2d/navigation_2d.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* navigation2d.cpp */
/* navigation_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions scene/2d/navigation2d.h → scene/2d/navigation_2d.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* navigation2d.h */
/* navigation_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -171,4 +171,4 @@ class Navigation2D : public Node2D {
Navigation2D();
};

#endif // Navigation2D2D_H
#endif // NAVIGATION_2D_H
2 changes: 1 addition & 1 deletion scene/2d/navigation_polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion scene/2d/tile_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* screen_button.cpp */
/* touch_screen_button.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions scene/2d/screen_button.h → scene/2d/touch_screen_button.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* screen_button.h */
/* touch_screen_button.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -112,4 +112,4 @@ class TouchScreenButton : public Node2D {

VARIANT_ENUM_CAST(TouchScreenButton::VisibilityMode);

#endif // SCREEN_BUTTON_H
#endif // TOUCH_SCREEN_BUTTON_H
2 changes: 1 addition & 1 deletion scene/3d/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion scene/3d/reflection_probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions scene/3d/scenario_fx.cpp → scene/3d/world_environment.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* scenario_fx.cpp */
/* world_environment.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion scene/3d/scenario_fx.h → scene/3d/world_environment.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* scenario_fx.h */
/* world_environment.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* audio_player.cpp */
/* audio_stream_player.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************/
/* audio_player.h */
/* audio_stream_player.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -110,4 +110,5 @@ class AudioStreamPlayer : public Node {
};

VARIANT_ENUM_CAST(AudioStreamPlayer::MixTarget)
#endif // AUDIOPLAYER_H

#endif // AUDIO_STREAM_PLAYER_H
2 changes: 1 addition & 1 deletion scene/gui/gradient_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion scene/gui/link_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion scene/gui/texture_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion scene/main/scene_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
@author Juan Linietsky <[email protected]>
*/

class SceneTree;
class PackedScene;
class Node;
class Viewport;
Expand Down
2 changes: 1 addition & 1 deletion scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 9 additions & 9 deletions scene/register_scene_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
Loading

0 comments on commit c5dcbeb

Please sign in to comment.