Skip to content

Commit

Permalink
Renamed fixed_process to physics_process
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaCatania committed Sep 30, 2017
1 parent 4f39ce3 commit 4537977
Show file tree
Hide file tree
Showing 75 changed files with 296 additions and 296 deletions.
6 changes: 3 additions & 3 deletions core/bind/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2557,8 +2557,8 @@ Dictionary _Engine::get_version_info() const {
return Engine::get_singleton()->get_version_info();
}

bool _Engine::is_in_fixed_frame() const {
return Engine::get_singleton()->is_in_fixed_frame();
bool _Engine::is_in_physics_frame() const {
return Engine::get_singleton()->is_in_physics_frame();
}

void _Engine::set_editor_hint(bool p_enabled) {
Expand Down Expand Up @@ -2588,7 +2588,7 @@ void _Engine::_bind_methods() {

ClassDB::bind_method(D_METHOD("get_version_info"), &_Engine::get_version_info);

ClassDB::bind_method(D_METHOD("is_in_fixed_frame"), &_Engine::is_in_fixed_frame);
ClassDB::bind_method(D_METHOD("is_in_physics_frame"), &_Engine::is_in_physics_frame);

ClassDB::bind_method(D_METHOD("set_editor_hint", "enabled"), &_Engine::set_editor_hint);
ClassDB::bind_method(D_METHOD("is_editor_hint"), &_Engine::is_editor_hint);
Expand Down
2 changes: 1 addition & 1 deletion core/bind/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ class _Engine : public Object {

Dictionary get_version_info() const;

bool is_in_fixed_frame() const;
bool is_in_physics_frame() const;

void set_editor_hint(bool p_enabled);
bool is_editor_hint() const;
Expand Down
4 changes: 2 additions & 2 deletions core/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ Engine::Engine() {
_target_fps = 0;
_time_scale = 1.0;
_pixel_snap = false;
_fixed_frames = 0;
_physics_frames = 0;
_idle_frames = 0;
_in_fixed = false;
_in_physics = false;
_frame_ticks = 0;
_frame_step = 0;
editor_hint = false;
Expand Down
8 changes: 4 additions & 4 deletions core/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class Engine {
int _target_fps;
float _time_scale;
bool _pixel_snap;
uint64_t _fixed_frames;
uint64_t _physics_frames;

uint64_t _idle_frames;
bool _in_fixed;
bool _in_physics;

bool editor_hint;

Expand All @@ -71,9 +71,9 @@ class Engine {

uint64_t get_frames_drawn();

uint64_t get_fixed_frames() const { return _fixed_frames; }
uint64_t get_physics_frames() const { return _physics_frames; }
uint64_t get_idle_frames() const { return _idle_frames; }
bool is_in_fixed_frame() const { return _in_fixed; }
bool is_in_physics_frame() const { return _in_physics; }
uint64_t get_idle_frame_ticks() const { return _frame_ticks; }
float get_idle_frame_step() const { return _frame_step; }

Expand Down
10 changes: 5 additions & 5 deletions core/script_debugger_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ struct _ScriptDebuggerLocalProfileInfoSort {
}
};

void ScriptDebuggerLocal::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time) {
void ScriptDebuggerLocal::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {

frame_time = p_frame_time;
idle_time = p_idle_time;
fixed_time = p_fixed_time;
fixed_frame_time = p_fixed_frame_time;
physics_time = p_physics_time;
physics_frame_time = p_physics_frame_time;
}

void ScriptDebuggerLocal::idle_poll() {
Expand Down Expand Up @@ -250,9 +250,9 @@ void ScriptDebuggerLocal::profiling_start() {
profiling = true;
pinfo.resize(32768);
frame_time = 0;
fixed_time = 0;
physics_time = 0;
idle_time = 0;
fixed_frame_time = 0;
physics_frame_time = 0;
}

void ScriptDebuggerLocal::profiling_end() {
Expand Down
4 changes: 2 additions & 2 deletions core/script_debugger_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class ScriptDebuggerLocal : public ScriptDebugger {

bool profiling;
float frame_time, idle_time, fixed_time, fixed_frame_time;
float frame_time, idle_time, physics_time, physics_frame_time;
uint64_t idle_accum;

Vector<ScriptLanguage::ProfilingInfo> pinfo;
Expand All @@ -51,7 +51,7 @@ class ScriptDebuggerLocal : public ScriptDebugger {

virtual void profiling_start();
virtual void profiling_end();
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time);
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);

ScriptDebuggerLocal();
};
Expand Down
14 changes: 7 additions & 7 deletions core/script_debugger_remote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@ void ScriptDebuggerRemote::_poll_events() {
profiling = true;
frame_time = 0;
idle_time = 0;
fixed_time = 0;
fixed_frame_time = 0;
physics_time = 0;
physics_frame_time = 0;

print_line("PROFILING ALRIGHT!");

Expand Down Expand Up @@ -727,8 +727,8 @@ void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) {
packet_peer_stream->put_var(Engine::get_singleton()->get_frames_drawn()); //total frame time
packet_peer_stream->put_var(frame_time); //total frame time
packet_peer_stream->put_var(idle_time); //idle frame time
packet_peer_stream->put_var(fixed_time); //fixed frame time
packet_peer_stream->put_var(fixed_frame_time); //fixed frame time
packet_peer_stream->put_var(physics_time); //fixed frame time
packet_peer_stream->put_var(physics_frame_time); //fixed frame time

packet_peer_stream->put_var(USEC_TO_SEC(total_script_time)); //total script execution time

Expand Down Expand Up @@ -917,12 +917,12 @@ void ScriptDebuggerRemote::profiling_end() {
//ignores this, uses it via connnection
}

void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time) {
void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {

frame_time = p_frame_time;
idle_time = p_idle_time;
fixed_time = p_fixed_time;
fixed_frame_time = p_fixed_frame_time;
physics_time = p_physics_time;
physics_frame_time = p_physics_frame_time;
}

ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
Expand Down
4 changes: 2 additions & 2 deletions core/script_debugger_remote.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ScriptDebuggerRemote : public ScriptDebugger {
Vector<ScriptLanguage::ProfilingInfo *> profile_info_ptrs;

Map<StringName, int> profiler_function_signature_map;
float frame_time, idle_time, fixed_time, fixed_frame_time;
float frame_time, idle_time, physics_time, physics_frame_time;

bool profiling;
int max_frame_functions;
Expand Down Expand Up @@ -161,7 +161,7 @@ class ScriptDebuggerRemote : public ScriptDebugger {

virtual void profiling_start();
virtual void profiling_end();
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time);
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);

ScriptDebuggerRemote();
~ScriptDebuggerRemote();
Expand Down
2 changes: 1 addition & 1 deletion core/script_language.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class ScriptDebugger {
virtual void add_profiling_frame_data(const StringName &p_name, const Array &p_data) = 0;
virtual void profiling_start() = 0;
virtual void profiling_end() = 0;
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time) = 0;
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) = 0;

ScriptDebugger();
virtual ~ScriptDebugger() { singleton = NULL; }
Expand Down
8 changes: 4 additions & 4 deletions editor/editor_profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void EditorProfiler::clear() {
variables->clear();
//activate->set_pressed(false);
plot_sigs.clear();
plot_sigs.insert("fixed_frame_time");
plot_sigs.insert("physics_frame_time");
plot_sigs.insert("category_frame_time");

updating_frame = true;
Expand Down Expand Up @@ -120,9 +120,9 @@ String EditorProfiler::_get_time_as_text(Metric &m, float p_time, int p_calls) {
return rtos(p_time / p_calls);
} else if (dmode == DISPLAY_FRAME_PERCENT) {
return _get_percent_txt(p_time, m.frame_time);
} else if (dmode == DISPLAY_FIXED_FRAME_PERCENT) {
} else if (dmode == DISPLAY_PHYSICS_FRAME_PERCENT) {

return _get_percent_txt(p_time, m.fixed_frame_time);
return _get_percent_txt(p_time, m.physics_frame_time);
}

return "err";
Expand Down Expand Up @@ -714,7 +714,7 @@ EditorProfiler::EditorProfiler() {
add_child(plot_delay);
plot_delay->connect("timeout", this, "_update_plot");

plot_sigs.insert("fixed_frame_time");
plot_sigs.insert("physics_frame_time");
plot_sigs.insert("category_frame_time");

seeking = false;
Expand Down
6 changes: 3 additions & 3 deletions editor/editor_profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class EditorProfiler : public VBoxContainer {
int frame_number;
float frame_time;
float idle_time;
float fixed_time;
float fixed_frame_time;
float physics_time;
float physics_frame_time;

struct Category {

Expand Down Expand Up @@ -89,7 +89,7 @@ class EditorProfiler : public VBoxContainer {
DISPLAY_FRAME_TIME,
DISPLAY_AVERAGE_TIME,
DISPLAY_FRAME_PERCENT,
DISPLAY_FIXED_FRAME_PERCENT,
DISPLAY_PHYSICS_FRAME_PERCENT,
};

enum DisplayTime {
Expand Down
4 changes: 2 additions & 2 deletions editor/plugins/animation_tree_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1419,13 +1419,13 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
//editor->animation_panel_make_visible(true);
button->show();
editor->make_bottom_panel_item_visible(anim_tree_editor);
anim_tree_editor->set_fixed_process(true);
anim_tree_editor->set_physics_process(true);
} else {

if (anim_tree_editor->is_visible_in_tree())
editor->hide_bottom_panel();
button->hide();
anim_tree_editor->set_fixed_process(false);
anim_tree_editor->set_physics_process(false);
}
}

Expand Down
6 changes: 3 additions & 3 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ void CanvasItemEditor::_draw_viewport() {

void CanvasItemEditor::_notification(int p_what) {

if (p_what == NOTIFICATION_FIXED_PROCESS) {
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {

EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels"));

Expand Down Expand Up @@ -4032,14 +4032,14 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {

if (p_visible) {
canvas_item_editor->show();
canvas_item_editor->set_fixed_process(true);
canvas_item_editor->set_physics_process(true);
VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), false);
canvas_item_editor->viewport_base->grab_focus();

} else {

canvas_item_editor->hide();
canvas_item_editor->set_fixed_process(false);
canvas_item_editor->set_physics_process(false);
VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/collision_polygon_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void CollisionPolygon2DEditor::_notification(int p_what) {
get_tree()->connect("node_removed", this, "_node_removed");

} break;
case NOTIFICATION_FIXED_PROCESS: {
case NOTIFICATION_PHYSICS_PROCESS: {

} break;
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/light_occluder_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void LightOccluder2DEditor::_notification(int p_what) {
create_poly->connect("confirmed", this, "_create_poly");

} break;
case NOTIFICATION_FIXED_PROCESS: {
case NOTIFICATION_PHYSICS_PROCESS: {

} break;
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/material_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void MaterialEditor::_gui_input(InputEvent p_event) {

void MaterialEditor::_notification(int p_what) {

if (p_what==NOTIFICATION_FIXED_PROCESS) {
if (p_what==NOTIFICATION_PHYSICS_PROCESS) {

}

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/mesh_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void MeshEditor::_gui_input(Ref<InputEvent> p_event) {

void MeshEditor::_notification(int p_what) {

if (p_what == NOTIFICATION_FIXED_PROCESS) {
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}

if (p_what == NOTIFICATION_READY) {
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/navigation_polygon_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void NavigationPolygonEditor::_notification(int p_what) {
create_nav->connect("confirmed", this, "_create_nav");

} break;
case NOTIFICATION_FIXED_PROCESS: {
case NOTIFICATION_PHYSICS_PROCESS: {

} break;
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/path_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void Path2DEditor::_notification(int p_what) {
//button_edit->set_pressed(true);

} break;
case NOTIFICATION_FIXED_PROCESS: {
case NOTIFICATION_PHYSICS_PROCESS: {

} break;
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/polygon_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void Polygon2DEditor::_notification(int p_what) {
get_tree()->connect("node_removed", this, "_node_removed");

} break;
case NOTIFICATION_FIXED_PROCESS: {
case NOTIFICATION_PHYSICS_PROCESS: {

} break;
}
Expand Down
4 changes: 2 additions & 2 deletions editor/plugins/resource_preloader_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {

void ResourcePreloaderEditor::_notification(int p_what) {

if (p_what == NOTIFICATION_FIXED_PROCESS) {
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}

if (p_what == NOTIFICATION_ENTER_TREE) {
Expand Down Expand Up @@ -248,7 +248,7 @@ void ResourcePreloaderEditor::edit(ResourcePreloader *p_preloader) {
} else {

hide();
set_fixed_process(false);
set_physics_process(false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/spatial_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ void SpatialEditorViewport::_notification(int p_what) {
last_message = message;
}

message_time -= get_fixed_process_delta_time();
message_time -= get_physics_process_delta_time();
if (message_time < 0)
surface->update();
}
Expand Down
4 changes: 2 additions & 2 deletions editor/plugins/sprite_frames_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {

void SpriteFramesEditor::_notification(int p_what) {

if (p_what == NOTIFICATION_FIXED_PROCESS) {
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}

if (p_what == NOTIFICATION_ENTER_TREE) {
Expand Down Expand Up @@ -535,7 +535,7 @@ void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
} else {

hide();
//set_fixed_process(false);
//set_physics_process(false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/texture_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void TextureEditor::_gui_input(Ref<InputEvent> p_event) {

void TextureEditor::_notification(int p_what) {

if (p_what == NOTIFICATION_FIXED_PROCESS) {
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}

if (p_what == NOTIFICATION_READY) {
Expand Down
Loading

0 comments on commit 4537977

Please sign in to comment.