diff options
Diffstat (limited to 'modules')
44 files changed, 105 insertions, 270 deletions
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp index b004641838..3668088590 100644 --- a/modules/bullet/area_bullet.cpp +++ b/modules/bullet/area_bullet.cpp @@ -236,7 +236,7 @@ void AreaBullet::set_param(PhysicsServer::AreaParameter p_param, const Variant & set_spOv_gravityPointAttenuation(p_value); break; default: - print_line("The Bullet areas doesn't suppot this param: " + itos(p_param)); + WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param)); } } @@ -259,7 +259,7 @@ Variant AreaBullet::get_param(PhysicsServer::AreaParameter p_param) const { case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION: return spOv_gravityPointAttenuation; default: - print_line("The Bullet areas doesn't suppot this param: " + itos(p_param)); + WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param)); return Variant(); } } diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 70f70e7e5f..dbd27a3564 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -1001,11 +1001,13 @@ void BulletPhysicsServer::soft_body_get_collision_exceptions(RID p_body, List<RI } void BulletPhysicsServer::soft_body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) { - print_line("TODO MUST BE IMPLEMENTED"); + // FIXME: Must be implemented. + WARN_PRINT("soft_body_state is not implemented yet in Bullet backend."); } Variant BulletPhysicsServer::soft_body_get_state(RID p_body, BodyState p_state) const { - print_line("TODO MUST BE IMPLEMENTED"); + // FIXME: Must be implemented. + WARN_PRINT("soft_body_state is not implemented yet in Bullet backend."); return Variant(); } @@ -1439,7 +1441,7 @@ RID BulletPhysicsServer::joint_create_generic_6dof(RID p_body_A, const Transform ERR_FAIL_COND_V(body_A == body_B, RID()); - JointBullet *joint = bulletnew(Generic6DOFJointBullet(body_A, body_B, p_local_frame_A, p_local_frame_B, true)); + JointBullet *joint = bulletnew(Generic6DOFJointBullet(body_A, body_B, p_local_frame_A, p_local_frame_B)); AddJointToSpace(body_A, joint); CreateThenReturnRID(joint_owner, joint); diff --git a/modules/bullet/cone_twist_joint_bullet.cpp b/modules/bullet/cone_twist_joint_bullet.cpp index 472ad3b52c..6b5438c60f 100644 --- a/modules/bullet/cone_twist_joint_bullet.cpp +++ b/modules/bullet/cone_twist_joint_bullet.cpp @@ -64,26 +64,6 @@ ConeTwistJointBullet::ConeTwistJointBullet(RigidBodyBullet *rbA, RigidBodyBullet setup(coneConstraint); } -void ConeTwistJointBullet::set_angular_only(bool angularOnly) { - coneConstraint->setAngularOnly(angularOnly); -} - -void ConeTwistJointBullet::set_limit(real_t _swingSpan1, real_t _swingSpan2, real_t _twistSpan, real_t _softness, real_t _biasFactor, real_t _relaxationFactor) { - coneConstraint->setLimit(_swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor, _relaxationFactor); -} - -int ConeTwistJointBullet::get_solve_twist_limit() { - return coneConstraint->getSolveTwistLimit(); -} - -int ConeTwistJointBullet::get_solve_swing_limit() { - return coneConstraint->getSolveSwingLimit(); -} - -real_t ConeTwistJointBullet::get_twist_limit_sign() { - return coneConstraint->getTwistLimitSign(); -} - void ConeTwistJointBullet::set_param(PhysicsServer::ConeTwistJointParam p_param, real_t p_value) { switch (p_param) { case PhysicsServer::CONE_TWIST_JOINT_SWING_SPAN: diff --git a/modules/bullet/cone_twist_joint_bullet.h b/modules/bullet/cone_twist_joint_bullet.h index bd6eb49196..d6040fd6ec 100644 --- a/modules/bullet/cone_twist_joint_bullet.h +++ b/modules/bullet/cone_twist_joint_bullet.h @@ -47,14 +47,6 @@ public: virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_CONE_TWIST; } - void set_angular_only(bool angularOnly); - - void set_limit(real_t _swingSpan1, real_t _swingSpan2, real_t _twistSpan, real_t _softness = 0.8f, real_t _biasFactor = 0.3f, real_t _relaxationFactor = 1.0f); - int get_solve_twist_limit(); - - int get_solve_swing_limit(); - real_t get_twist_limit_sign(); - void set_param(PhysicsServer::ConeTwistJointParam p_param, real_t p_value); real_t get_param(PhysicsServer::ConeTwistJointParam p_param) const; }; diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp index adfad7803f..6275a0d2ed 100644 --- a/modules/bullet/generic_6dof_joint_bullet.cpp +++ b/modules/bullet/generic_6dof_joint_bullet.cpp @@ -34,13 +34,13 @@ #include "bullet_utilities.h" #include "rigid_body_bullet.h" -#include <BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h> +#include <BulletDynamics/ConstraintSolver/btGeneric6DofSpring2Constraint.h> /** @author AndreaCatania */ -Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA) : +Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB) : JointBullet() { Transform scaled_AFrame(frameInA.scaled(rbA->get_body_scale())); @@ -58,9 +58,9 @@ Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBu btTransform btFrameB; G_TO_B(scaled_BFrame, btFrameB); - sixDOFConstraint = bulletnew(btGeneric6DofConstraint(*rbA->get_bt_rigid_body(), *rbB->get_bt_rigid_body(), btFrameA, btFrameB, useLinearReferenceFrameA)); + sixDOFConstraint = bulletnew(btGeneric6DofSpring2Constraint(*rbA->get_bt_rigid_body(), *rbB->get_bt_rigid_body(), btFrameA, btFrameB)); } else { - sixDOFConstraint = bulletnew(btGeneric6DofConstraint(*rbA->get_bt_rigid_body(), btFrameA, useLinearReferenceFrameA)); + sixDOFConstraint = bulletnew(btGeneric6DofSpring2Constraint(*rbA->get_bt_rigid_body(), btFrameA)); } setup(sixDOFConstraint); @@ -123,20 +123,11 @@ void Generic6DOFJointBullet::set_param(Vector3::Axis p_axis, PhysicsServer::G6DO switch (p_param) { case PhysicsServer::G6DOF_JOINT_LINEAR_LOWER_LIMIT: limits_lower[0][p_axis] = p_value; - set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter + set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT]); // Reload bullet parameter break; case PhysicsServer::G6DOF_JOINT_LINEAR_UPPER_LIMIT: limits_upper[0][p_axis] = p_value; - set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter - break; - case PhysicsServer::G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS: - sixDOFConstraint->getTranslationalLimitMotor()->m_limitSoftness = p_value; - break; - case PhysicsServer::G6DOF_JOINT_LINEAR_RESTITUTION: - sixDOFConstraint->getTranslationalLimitMotor()->m_restitution = p_value; - break; - case PhysicsServer::G6DOF_JOINT_LINEAR_DAMPING: - sixDOFConstraint->getTranslationalLimitMotor()->m_damping = p_value; + set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT]); // Reload bullet parameter break; case PhysicsServer::G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY: sixDOFConstraint->getTranslationalLimitMotor()->m_targetVelocity.m_floats[p_axis] = p_value; @@ -146,23 +137,11 @@ void Generic6DOFJointBullet::set_param(Vector3::Axis p_axis, PhysicsServer::G6DO break; case PhysicsServer::G6DOF_JOINT_ANGULAR_LOWER_LIMIT: limits_lower[1][p_axis] = p_value; - set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter + set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT, flags[p_axis][PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT]); // Reload bullet parameter break; case PhysicsServer::G6DOF_JOINT_ANGULAR_UPPER_LIMIT: limits_upper[1][p_axis] = p_value; - set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, flags[p_axis][p_param]); // Reload bullet parameter - break; - case PhysicsServer::G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS: - sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_limitSoftness = p_value; - break; - case PhysicsServer::G6DOF_JOINT_ANGULAR_DAMPING: - sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_damping = p_value; - break; - case PhysicsServer::G6DOF_JOINT_ANGULAR_RESTITUTION: - sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_bounce = p_value; - break; - case PhysicsServer::G6DOF_JOINT_ANGULAR_FORCE_LIMIT: - sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxLimitForce = p_value; + set_flag(p_axis, PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT, flags[p_axis][PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT]); // Reload bullet parameter break; case PhysicsServer::G6DOF_JOINT_ANGULAR_ERP: sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_stopERP = p_value; @@ -171,7 +150,7 @@ void Generic6DOFJointBullet::set_param(Vector3::Axis p_axis, PhysicsServer::G6DO sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_targetVelocity = p_value; break; case PhysicsServer::G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT: - sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxLimitForce = p_value; + sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxMotorForce = p_value; break; default: WARN_PRINT("This parameter is not supported"); @@ -185,12 +164,6 @@ real_t Generic6DOFJointBullet::get_param(Vector3::Axis p_axis, PhysicsServer::G6 return limits_lower[0][p_axis]; case PhysicsServer::G6DOF_JOINT_LINEAR_UPPER_LIMIT: return limits_upper[0][p_axis]; - case PhysicsServer::G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS: - return sixDOFConstraint->getTranslationalLimitMotor()->m_limitSoftness; - case PhysicsServer::G6DOF_JOINT_LINEAR_RESTITUTION: - return sixDOFConstraint->getTranslationalLimitMotor()->m_restitution; - case PhysicsServer::G6DOF_JOINT_LINEAR_DAMPING: - return sixDOFConstraint->getTranslationalLimitMotor()->m_damping; case PhysicsServer::G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY: return sixDOFConstraint->getTranslationalLimitMotor()->m_targetVelocity.m_floats[p_axis]; case PhysicsServer::G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT: @@ -199,20 +172,14 @@ real_t Generic6DOFJointBullet::get_param(Vector3::Axis p_axis, PhysicsServer::G6 return limits_lower[1][p_axis]; case PhysicsServer::G6DOF_JOINT_ANGULAR_UPPER_LIMIT: return limits_upper[1][p_axis]; - case PhysicsServer::G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS: - return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_limitSoftness; - case PhysicsServer::G6DOF_JOINT_ANGULAR_DAMPING: - return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_damping; case PhysicsServer::G6DOF_JOINT_ANGULAR_RESTITUTION: return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_bounce; - case PhysicsServer::G6DOF_JOINT_ANGULAR_FORCE_LIMIT: - return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxLimitForce; case PhysicsServer::G6DOF_JOINT_ANGULAR_ERP: return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_stopERP; case PhysicsServer::G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY: return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_targetVelocity; case PhysicsServer::G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT: - return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxLimitForce; + return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_maxMotorForce; default: WARN_PRINT("This parameter is not supported"); return 0.; diff --git a/modules/bullet/generic_6dof_joint_bullet.h b/modules/bullet/generic_6dof_joint_bullet.h index ad06582eac..176127ed6c 100644 --- a/modules/bullet/generic_6dof_joint_bullet.h +++ b/modules/bullet/generic_6dof_joint_bullet.h @@ -40,7 +40,7 @@ class RigidBodyBullet; class Generic6DOFJointBullet : public JointBullet { - class btGeneric6DofConstraint *sixDOFConstraint; + class btGeneric6DofSpring2Constraint *sixDOFConstraint; // First is linear second is angular Vector3 limits_lower[2]; @@ -48,7 +48,7 @@ class Generic6DOFJointBullet : public JointBullet { bool flags[3][PhysicsServer::G6DOF_JOINT_FLAG_MAX]; public: - Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA); + Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB); virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_6DOF; } diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp index 97ea7ca3df..07fde6efb9 100644 --- a/modules/bullet/hinge_joint_bullet.cpp +++ b/modules/bullet/hinge_joint_bullet.cpp @@ -97,7 +97,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t switch (p_param) { case PhysicsServer::HINGE_JOINT_BIAS: if (0 < p_value) { - print_line("The Bullet Hinge Joint doesn't support bias, So it's always 0"); + WARN_PRINTS("HingeJoint doesn't support bias in the Bullet backend, so it's always 0."); } break; case PhysicsServer::HINGE_JOINT_LIMIT_UPPER: @@ -122,7 +122,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t hingeConstraint->setMaxMotorImpulse(p_value); break; default: - WARN_PRINTS("The Bullet Hinge Joint doesn't support this parameter: " + itos(p_param) + ", value: " + itos(p_value)); + WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param) + ", value: " + itos(p_value)); } } @@ -146,7 +146,7 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE: return hingeConstraint->getMaxMotorImpulse(); default: - WARN_PRINTS("The Bullet Hinge Joint doesn't support this parameter: " + itos(p_param)); + WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param)); return 0; } } diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 9f2171a82a..258c628d93 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -161,8 +161,6 @@ CSGBrush *CSGShape::_get_brush() { void CSGShape::_update_shape() { - //print_line("updating shape for " + String(get_path())); - if (parent) return; @@ -372,7 +370,6 @@ void CSGShape::_notification(int p_what) { if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) { - //print_line("local xform changed"); if (parent) { parent->_make_dirty(); } @@ -641,7 +638,6 @@ CSGBrush *CSGMesh::_build_brush() { } } - //print_line("total vertices? " + itos(vertices.size())); if (vertices.size() == 0) return NULL; diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 9424080b6d..3cb24d0407 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -217,8 +217,6 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, if (!(flags & DDSD_MIPMAPCOUNT)) mipmaps = 1; - //print_line("found format: "+String(dds_format_info[dds_format].name)); - PoolVector<uint8_t> src_data; const DDSFormatInfo &info = dds_format_info[dds_format]; diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp index ddfa7af771..f5c817c816 100644 --- a/modules/etc/image_etc.cpp +++ b/modules/etc/image_etc.cpp @@ -199,7 +199,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f int wofs = 0; - print_line("begin encoding, format: " + Image::get_format_name(etc_format)); + print_verbose("ETC: Begin encoding, format: " + Image::get_format_name(etc_format)); uint64_t t = OS::get_singleton()->get_ticks_msec(); for (int i = 0; i < mmc; i++) { // convert source image to internal etc2comp format (which is equivalent to Image::FORMAT_RGBAF) @@ -227,7 +227,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f delete[] src_rgba_f; } - print_line("time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t)); + print_verbose("ETC: Time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t)); p_img->create(imgw, imgh, p_img->has_mipmaps(), etc_format, dst_data); } diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 5125b58b41..e05bc7d591 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -294,11 +294,6 @@ bool GDScript::get_property_default_value(const StringName &p_property, Variant #ifdef TOOLS_ENABLED - /* - for (const Map<StringName,Variant>::Element *I=member_default_values.front();I;I=I->next()) { - print_line("\t"+String(String(I->key())+":"+String(I->get()))); - } - */ const Map<StringName, Variant>::Element *E = member_default_values_cache.find(p_property); if (E) { r_value = E->get(); @@ -335,17 +330,8 @@ ScriptInstance *GDScript::instance_create(Object *p_this) { PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) { #ifdef TOOLS_ENABLED - - //instance a fake script for editing the values - //plist.invert(); - - /*print_line("CREATING PLACEHOLDER"); - for(List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) { - print_line(E->get().name); - }*/ PlaceHolderScriptInstance *si = memnew(PlaceHolderScriptInstance(GDScriptLanguage::get_singleton(), Ref<Script>(this), p_this)); placeholders.insert(si); - //_update_placeholder(si); _update_exports(); return si; #else @@ -409,7 +395,6 @@ bool GDScript::_update_exports() { bool changed = false; if (source_changed_cache) { - //print_line("updating source for "+get_path()); source_changed_cache = false; changed = true; @@ -456,11 +441,8 @@ bool GDScript::_update_exports() { if (bf.is_valid()) { - //print_line("parent is: "+bf->get_path()); base_cache = bf; bf->inheriters_cache.insert(get_instance_id()); - - //bf->_update_exports(p_instances,true,false); } } else { ERR_PRINT(("Path extending itself in " + path).utf8().get_data()); @@ -475,7 +457,6 @@ bool GDScript::_update_exports() { continue; members_cache.push_back(c->variables[i]._export); - //print_line("found "+c->variables[i]._export.name); member_default_values_cache[c->variables[i].identifier] = c->variables[i].default_value; } @@ -490,7 +471,6 @@ bool GDScript::_update_exports() { } } } else { - //print_line("unchanged is "+get_path()); } if (base_cache.is_valid()) { @@ -499,11 +479,9 @@ bool GDScript::_update_exports() { } } - if (/*changed &&*/ placeholders.size()) { //hm :( - - //print_line("updating placeholders for "+get_path()); + if (placeholders.size()) { //hm :( - //update placeholders if any + // update placeholders if any Map<StringName, Variant> values; List<PropertyInfo> propnames; _update_exports_values(values, propnames); @@ -529,7 +507,6 @@ void GDScript::update_exports() { Set<ObjectID> copy = inheriters_cache; //might get modified - //print_line("update exports for "+get_path()+" ic: "+itos(copy.size())); for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) { Object *id = ObjectDB::get_instance(E->get()); GDScript *s = Object::cast_to<GDScript>(id); @@ -825,7 +802,6 @@ Error GDScript::load_source_code(const String &p_path) { #ifdef TOOLS_ENABLED source_changed_cache = true; #endif - //print_line("LSC :"+get_path()); path = p_path; return OK; } @@ -1507,7 +1483,6 @@ int GDScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_ p_info_arr[current].self_time = elem->self()->profile.last_frame_self_time; p_info_arr[current].total_time = elem->self()->profile.last_frame_total_time; p_info_arr[current].signature = elem->self()->profile.signature; - //print_line(String(elem->self()->profile.signature)+": "+itos(elem->self()->profile.last_frame_call_count)); current++; } elem = elem->next(); @@ -1546,7 +1521,7 @@ struct GDScriptDepSort { void GDScriptLanguage::reload_all_scripts() { #ifdef DEBUG_ENABLED - print_line("RELOAD ALL SCRIPTS"); + print_verbose("GDScript: Reloading all scripts"); if (lock) { lock->lock(); } @@ -1556,7 +1531,7 @@ void GDScriptLanguage::reload_all_scripts() { SelfList<GDScript> *elem = script_list.first(); while (elem) { if (elem->self()->get_path().is_resource_file()) { - print_line("FOUND: " + elem->self()->get_path()); + print_verbose("GDScript: Found: " + elem->self()->get_path()); scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident } elem = elem->next(); @@ -1572,7 +1547,7 @@ void GDScriptLanguage::reload_all_scripts() { for (List<Ref<GDScript> >::Element *E = scripts.front(); E; E = E->next()) { - print_line("RELOADING: " + E->get()->get_path()); + print_verbose("GDScript: Reloading: " + E->get()->get_path()); E->get()->load_source_code(E->get()->get_path()); E->get()->reload(true); } @@ -1703,7 +1678,6 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so void GDScriptLanguage::frame() { - //print_line("calls: "+itos(calls)); calls = 0; #ifdef DEBUG_ENABLED diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 368601127d..1403184557 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -1009,8 +1009,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser:: return prev_pos; int retval = prev_pos; - //print_line("retval: "+itos(retval)); - if (retval & GDScriptFunction::ADDR_TYPE_STACK << GDScriptFunction::ADDR_BITS) { slevel++; codegen.alloc_stack(slevel); @@ -2073,8 +2071,6 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa //validate instances if keeping state if (p_keep_state) { - - print_line("RELOAD KEEP " + p_script->path); for (Set<Object *>::Element *E = p_script->instances.front(); E;) { Set<Object *>::Element *N = E->next(); diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 934c93059a..30400f01e9 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -192,7 +192,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co if (tokenizer.get_token() == GDScriptTokenizer::TK_NEWLINE) { indent = tokenizer.get_token_line_indent(); } - //print_line("TOKEN: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token()))); if (indent == 0 && tokenizer.get_token() == GDScriptTokenizer::TK_PR_FUNCTION && tokenizer.get_token(1) == GDScriptTokenizer::TK_IDENTIFIER) { String identifier = tokenizer.get_token_identifier(1); @@ -201,7 +200,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co } } tokenizer.advance(); - //print_line("NEXT: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token()))); } return -1; } @@ -2930,7 +2928,6 @@ void GDScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_t break; } - //print_line(itos(indent_stack.size())+","+itos(tc)+": "+l); lines.write[i] = l; } diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp index f2e52d48dd..d9c20868bd 100644 --- a/modules/gdscript/gdscript_functions.cpp +++ b/modules/gdscript/gdscript_functions.cpp @@ -642,7 +642,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_line(str); r_ret = Variant(); @@ -657,7 +656,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_line(str); r_ret = Variant(); @@ -672,7 +670,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_line(str); r_ret = Variant(); @@ -686,7 +683,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_error(str); r_ret = Variant(); @@ -698,7 +694,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; OS::get_singleton()->print("%s", str.utf8().get_data()); r_ret = Variant(); @@ -716,7 +711,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += "At: " + script->debug_get_stack_level_source(0) + ":" + itos(script->debug_get_stack_level_line(0)); // + " in function '" + script->debug_get_stack_level_function(0) + "'"; } - //str+="\n"; print_line(str); r_ret = Variant(); } break; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 2c0d541d8f..a3f5e1819e 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -1074,9 +1074,6 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s } else { //find list [ or find dictionary { - - //print_line("found bug?"); - _set_error("Error parsing expression, misplaced: " + String(tokenizer->get_token_name(tokenizer->get_token()))); return NULL; //nothing } diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index 537a0c5eaf..6e7842f190 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -937,7 +937,6 @@ void GDScriptTokenizerText::_advance() { _make_constant(val); } else if (period_found || exponent_found) { double val = str.to_double(); - //print_line("*%*%*%*% to convert: "+str+" result: "+rtos(val)); _make_constant(val); } else { int64_t val = str.to_int64(); diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 8b63987cde..776c18da64 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -486,8 +486,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) { if (!mesh_library.is_valid() || !mesh_library->has_item(c.item)) continue; - //print_line("OCTANT, CELLS: "+itos(ii.cells.size())); - Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z); Vector3 ofs = _get_offset(); @@ -524,8 +522,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) { if (g.collision_debug.is_valid()) { shapes.write[i].shape->add_vertices_to_array(col_debug, xform * shapes[i].local_transform); } - - //print_line("PHIS x: "+xform); } // add the item's navmesh at given xform to GridMap's Navigation ancestor @@ -614,7 +610,6 @@ void GridMap::_octant_enter_world(const OctantKey &p_key) { Octant &g = *octant_map[p_key]; PhysicsServer::get_singleton()->body_set_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform()); PhysicsServer::get_singleton()->body_set_space(g.static_body, get_world()->get_space()); - //print_line("BODYPOS: "+get_global_transform()); if (g.collision_debug_instance.is_valid()) { VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario()); @@ -1086,7 +1081,6 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe for (Map<OctantKey, Map<Ref<Material>, Ref<SurfaceTool> > >::Element *E = surface_map.front(); E; E = E->next()) { - print_line("generating mesh " + itos(ofs++) + "/" + itos(surface_map.size())); Ref<ArrayMesh> mesh; mesh.instance(); for (Map<Ref<Material>, Ref<SurfaceTool> >::Element *F = E->get().front(); F; F = F->next()) { diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index cd1a8266ed..b8b77924f7 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2118,11 +2118,7 @@ Error CSharpScript::reload(bool p_keep_state) { if (script_class) { #ifdef DEBUG_ENABLED - if (OS::get_singleton()->is_stdout_verbose()) { - OS::get_singleton()->print(String("Found class " + script_class->get_namespace() + "." + - script_class->get_name() + " for script " + get_path() + "\n") - .utf8()); - } + print_verbose("Found class " + script_class->get_namespace() + "." + script_class->get_name() + " for script " + get_path()); #endif tool = script_class->has_attribute(CACHED_CLASS(ToolAttribute)); diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index 0fb8734410..2faab1718d 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -97,8 +97,7 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() { return GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe"); } - if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print("Cannot find executable for '" PROP_NAME_MSBUILD_VS "'. Trying with '" PROP_NAME_MSBUILD_MONO "'...\n"); + print_verbose("Cannot find executable for '" PROP_NAME_MSBUILD_VS "'. Trying with '" PROP_NAME_MSBUILD_MONO "'..."); } // FALL THROUGH case GodotSharpBuilds::MSBUILD_MONO: { String msbuild_path = GDMono::get_singleton()->get_mono_reg_info().bin_dir.plus_file("msbuild.bat"); @@ -556,8 +555,9 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { exited = true; exit_code = klass->get_field("exitCode")->get_int_value(mono_object); - if (exit_code != 0 && OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print(String("MSBuild finished with exit code " + itos(exit_code) + "\n").utf8()); + if (exit_code != 0) { + print_verbose("MSBuild finished with exit code " + itos(exit_code)); + } build_tab->on_build_exit(exit_code == 0 ? MonoBuildTab::RESULT_SUCCESS : MonoBuildTab::RESULT_ERROR); } else { diff --git a/modules/mono/glue/cs_files/Attributes/ExportAttribute.cs b/modules/mono/glue/cs_files/Attributes/ExportAttribute.cs new file mode 100644 index 0000000000..6adf044886 --- /dev/null +++ b/modules/mono/glue/cs_files/Attributes/ExportAttribute.cs @@ -0,0 +1,17 @@ +using System; + +namespace Godot +{ + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAttribute : Attribute + { + private PropertyHint hint; + private string hintString; + + public ExportAttribute(PropertyHint hint = PropertyHint.None, string hintString = "") + { + this.hint = hint; + this.hintString = hintString; + } + } +} diff --git a/modules/mono/glue/cs_files/GodotMethodAttribute.cs b/modules/mono/glue/cs_files/Attributes/GodotMethodAttribute.cs index 55848769d5..55848769d5 100644 --- a/modules/mono/glue/cs_files/GodotMethodAttribute.cs +++ b/modules/mono/glue/cs_files/Attributes/GodotMethodAttribute.cs diff --git a/modules/mono/glue/cs_files/RPCAttributes.cs b/modules/mono/glue/cs_files/Attributes/RPCAttributes.cs index 6bf9560bfa..6bf9560bfa 100644 --- a/modules/mono/glue/cs_files/RPCAttributes.cs +++ b/modules/mono/glue/cs_files/Attributes/RPCAttributes.cs diff --git a/modules/mono/glue/cs_files/SignalAttribute.cs b/modules/mono/glue/cs_files/Attributes/SignalAttribute.cs index 3957387be9..3957387be9 100644 --- a/modules/mono/glue/cs_files/SignalAttribute.cs +++ b/modules/mono/glue/cs_files/Attributes/SignalAttribute.cs diff --git a/modules/mono/glue/cs_files/Attributes/ToolAttribute.cs b/modules/mono/glue/cs_files/Attributes/ToolAttribute.cs new file mode 100644 index 0000000000..d0437409af --- /dev/null +++ b/modules/mono/glue/cs_files/Attributes/ToolAttribute.cs @@ -0,0 +1,7 @@ +using System; + +namespace Godot +{ + [AttributeUsage(AttributeTargets.Class)] + public class ToolAttribute : Attribute {} +} diff --git a/modules/mono/glue/cs_files/ExportAttribute.cs b/modules/mono/glue/cs_files/ExportAttribute.cs deleted file mode 100644 index e6f569e1bb..0000000000 --- a/modules/mono/glue/cs_files/ExportAttribute.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Godot -{ - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public class ExportAttribute : Attribute - { - private PropertyHint hint; - private string hintString; - - public ExportAttribute(PropertyHint hint = PropertyHint.None, string hintString = "") - { - this.hint = hint; - this.hintString = hintString; - } - } -} diff --git a/modules/mono/glue/cs_files/NodeExtensions.cs b/modules/mono/glue/cs_files/Extensions/NodeExtensions.cs index 71534d7782..71534d7782 100644 --- a/modules/mono/glue/cs_files/NodeExtensions.cs +++ b/modules/mono/glue/cs_files/Extensions/NodeExtensions.cs diff --git a/modules/mono/glue/cs_files/ObjectExtensions.cs b/modules/mono/glue/cs_files/Extensions/ObjectExtensions.cs index 5c9e6609f4..5c9e6609f4 100644 --- a/modules/mono/glue/cs_files/ObjectExtensions.cs +++ b/modules/mono/glue/cs_files/Extensions/ObjectExtensions.cs diff --git a/modules/mono/glue/cs_files/ResourceLoaderExtensions.cs b/modules/mono/glue/cs_files/Extensions/ResourceLoaderExtensions.cs index ceecc589e6..ceecc589e6 100644 --- a/modules/mono/glue/cs_files/ResourceLoaderExtensions.cs +++ b/modules/mono/glue/cs_files/Extensions/ResourceLoaderExtensions.cs diff --git a/modules/mono/glue/cs_files/IAwaiter.cs b/modules/mono/glue/cs_files/IAwaiter.cs deleted file mode 100644 index b5aa1a5389..0000000000 --- a/modules/mono/glue/cs_files/IAwaiter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Runtime.CompilerServices; - -namespace Godot -{ - public interface IAwaiter : INotifyCompletion - { - bool IsCompleted { get; } - - void GetResult(); - } - - public interface IAwaiter<out TResult> : INotifyCompletion - { - bool IsCompleted { get; } - - TResult GetResult(); - } -} diff --git a/modules/mono/glue/cs_files/IAwaitable.cs b/modules/mono/glue/cs_files/Interfaces/IAwaitable.cs index 0397957d00..0397957d00 100644 --- a/modules/mono/glue/cs_files/IAwaitable.cs +++ b/modules/mono/glue/cs_files/Interfaces/IAwaitable.cs diff --git a/modules/mono/glue/cs_files/Interfaces/IAwaiter.cs b/modules/mono/glue/cs_files/Interfaces/IAwaiter.cs new file mode 100644 index 0000000000..d3be9d781c --- /dev/null +++ b/modules/mono/glue/cs_files/Interfaces/IAwaiter.cs @@ -0,0 +1,18 @@ +using System.Runtime.CompilerServices; + +namespace Godot +{ + public interface IAwaiter : INotifyCompletion + { + bool IsCompleted { get; } + + void GetResult(); + } + + public interface IAwaiter<out TResult> : INotifyCompletion + { + bool IsCompleted { get; } + + TResult GetResult(); + } +} diff --git a/modules/mono/glue/cs_files/StringExtensions.cs b/modules/mono/glue/cs_files/StringExtensions.cs index eaeed7b37b..b58f8bc6a8 100644 --- a/modules/mono/glue/cs_files/StringExtensions.cs +++ b/modules/mono/glue/cs_files/StringExtensions.cs @@ -1,5 +1,3 @@ -//using System; - using System; using System.Collections.Generic; using System.Globalization; @@ -583,7 +581,7 @@ namespace Godot // </summary> public static byte[] Md5Buffer(this string instance) { - return NativeCalls.godot_icall_String_md5_buffer(instance); + return NativeCalls.godot_icall_String_md5_buffer(instance); } // <summary> @@ -591,7 +589,7 @@ namespace Godot // </summary> public static string Md5Text(this string instance) { - return NativeCalls.godot_icall_String_md5_text(instance); + return NativeCalls.godot_icall_String_md5_text(instance); } // <summary> @@ -750,7 +748,7 @@ namespace Godot // </summary> public static int Rfind(this string instance, string what, int from = -1) { - return NativeCalls.godot_icall_String_rfind(instance, what, from); + return NativeCalls.godot_icall_String_rfind(instance, what, from); } // <summary> @@ -758,7 +756,7 @@ namespace Godot // </summary> public static int Rfindn(this string instance, string what, int from = -1) { - return NativeCalls.godot_icall_String_rfindn(instance, what, from); + return NativeCalls.godot_icall_String_rfindn(instance, what, from); } // <summary> @@ -777,7 +775,7 @@ namespace Godot public static byte[] Sha256Buffer(this string instance) { - return NativeCalls.godot_icall_String_sha256_buffer(instance); + return NativeCalls.godot_icall_String_sha256_buffer(instance); } // <summary> @@ -785,7 +783,7 @@ namespace Godot // </summary> public static string Sha256Text(this string instance) { - return NativeCalls.godot_icall_String_sha256_text(instance); + return NativeCalls.godot_icall_String_sha256_text(instance); } // <summary> diff --git a/modules/mono/glue/cs_files/ToolAttribute.cs b/modules/mono/glue/cs_files/ToolAttribute.cs deleted file mode 100644 index d8601b5b32..0000000000 --- a/modules/mono/glue/cs_files/ToolAttribute.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; - -namespace Godot -{ - [AttributeUsage(AttributeTargets.Class)] - public class ToolAttribute : Attribute {} -} diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index f564b93f8f..fadac941e9 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -148,7 +148,7 @@ void GDMono::initialize() { ERR_FAIL_NULL(Engine::get_singleton()); - OS::get_singleton()->print("Mono: Initializing module...\n"); + print_verbose("Mono: Initializing module..."); #ifdef DEBUG_METHODS_ENABLED _initialize_and_check_api_hashes(); @@ -202,7 +202,7 @@ void GDMono::initialize() { runtime_initialized = true; - OS::get_singleton()->print("Mono: Runtime initialized\n"); + print_verbose("Mono: Runtime initialized"); // mscorlib assembly MUST be present at initialization ERR_EXPLAIN("Mono: Failed to load mscorlib assembly"); @@ -226,7 +226,7 @@ void GDMono::initialize() { #ifdef DEBUG_ENABLED bool debugger_attached = _wait_for_debugger_msecs(500); if (!debugger_attached && OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->printerr("Mono: Debugger wait timeout\n"); + print_error("Mono: Debugger wait timeout"); #endif _register_internal_calls(); @@ -256,7 +256,7 @@ void GDMono::initialize() { metadata_set_api_assembly_invalidated(APIAssembly::API_EDITOR, true); } - OS::get_singleton()->print("Mono: Proceeding to unload scripts domain because of invalid API assemblies\n"); + print_line("Mono: Proceeding to unload scripts domain because of invalid API assemblies."); Error err = _unload_scripts_domain(); if (err != OK) { @@ -269,11 +269,10 @@ void GDMono::initialize() { } } #else - if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print("Mono: Glue disabled, ignoring script assemblies\n"); + print_verbose("Mono: Glue disabled, ignoring script assemblies."); #endif - OS::get_singleton()->print("Mono: INITIALIZED\n"); + print_verbose("Mono: INITIALIZED"); } #ifndef MONO_GLUE_DISABLED @@ -352,8 +351,7 @@ bool GDMono::load_assembly(const String &p_name, MonoAssemblyName *p_aname, GDMo CRASH_COND(!r_assembly); - if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print((String() + "Mono: Loading assembly " + p_name + (p_refonly ? " (refonly)" : "") + "...\n").utf8()); + print_verbose("Mono: Loading assembly " + p_name + (p_refonly ? " (refonly)" : "") + "..."); MonoImageOpenStatus status = MONO_IMAGE_OK; MonoAssembly *assembly = mono_assembly_load_full(p_aname, NULL, &status, p_refonly); @@ -372,8 +370,7 @@ bool GDMono::load_assembly(const String &p_name, MonoAssemblyName *p_aname, GDMo *r_assembly = *stored_assembly; - if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print(String("Mono: Assembly " + p_name + (p_refonly ? " (refonly)" : "") + " loaded from path: " + (*r_assembly)->get_path() + "\n").utf8()); + print_verbose("Mono: Assembly " + p_name + (p_refonly ? " (refonly)" : "") + " loaded from path: " + (*r_assembly)->get_path()); return true; } @@ -500,7 +497,7 @@ bool GDMono::_load_project_assembly() { mono_assembly_set_main(project_assembly->get_assembly()); } else { if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->printerr("Mono: Failed to load project assembly\n"); + print_error("Mono: Failed to load project assembly"); } return success; @@ -510,13 +507,13 @@ bool GDMono::_load_api_assemblies() { if (!_load_core_api_assembly()) { if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->printerr("Mono: Failed to load Core API assembly\n"); + print_error("Mono: Failed to load Core API assembly"); return false; } else { #ifdef TOOLS_ENABLED if (!_load_editor_api_assembly()) { if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->printerr("Mono: Failed to load Editor API assembly\n"); + print_error("Mono: Failed to load Editor API assembly"); return false; } #endif @@ -593,9 +590,7 @@ Error GDMono::_load_scripts_domain() { ERR_FAIL_COND_V(scripts_domain != NULL, ERR_BUG); - if (OS::get_singleton()->is_stdout_verbose()) { - OS::get_singleton()->print("Mono: Loading scripts domain...\n"); - } + print_verbose("Mono: Loading scripts domain..."); scripts_domain = GDMonoUtils::create_domain("GodotEngine.ScriptsDomain"); @@ -611,9 +606,7 @@ Error GDMono::_unload_scripts_domain() { ERR_FAIL_NULL_V(scripts_domain, ERR_BUG); - if (OS::get_singleton()->is_stdout_verbose()) { - OS::get_singleton()->print("Mono: Unloading scripts domain...\n"); - } + print_verbose("Mono: Unloading scripts domain..."); _GodotSharp::get_singleton()->_dispose_callback(); @@ -661,9 +654,7 @@ Error GDMono::_load_tools_domain() { ERR_FAIL_COND_V(tools_domain != NULL, ERR_BUG); - if (OS::get_singleton()->is_stdout_verbose()) { - OS::get_singleton()->print("Mono: Loading tools domain...\n"); - } + print_verbose("Mono: Loading tools domain..."); tools_domain = GDMonoUtils::create_domain("GodotEngine.ToolsDomain"); @@ -728,8 +719,7 @@ Error GDMono::reload_scripts_domain() { if (!_load_project_assembly()) return ERR_CANT_OPEN; #else - if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print("Mono: Glue disabled, ignoring script assemblies\n"); + print_verbose("Mono: Glue disabled, ignoring script assemblies."); #endif return OK; @@ -742,9 +732,7 @@ Error GDMono::finalize_and_unload_domain(MonoDomain *p_domain) { String domain_name = mono_domain_get_friendly_name(p_domain); - if (OS::get_singleton()->is_stdout_verbose()) { - OS::get_singleton()->print(String("Mono: Unloading domain `" + domain_name + "`...\n").utf8()); - } + print_verbose("Mono: Unloading domain `" + domain_name + "`..."); if (mono_domain_get() != root_domain) mono_domain_set(root_domain, true); @@ -877,7 +865,7 @@ GDMono::~GDMono() { GDMonoUtils::clear_cache(); - OS::get_singleton()->print("Mono: Runtime cleanup...\n"); + print_verbose("Mono: Runtime cleanup..."); runtime_initialized = false; mono_jit_cleanup(root_domain); diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp index eabea8dc3c..5224d309de 100644 --- a/modules/mono/mono_gd/gd_mono_log.cpp +++ b/modules/mono/mono_gd/gd_mono_log.cpp @@ -152,8 +152,7 @@ void GDMonoLog::initialize() { log_level_id = log_level_get_id(log_level); if (log_file) { - if (OS::get_singleton()->is_stdout_verbose()) - OS::get_singleton()->print(String("Mono: Logfile is " + log_file_path + "\n").utf8()); + print_verbose("Mono: Logfile is " + log_file_path); mono_trace_set_log_handler(gdmono_MonoLogCallback, this); } else { OS::get_singleton()->printerr("Mono: No log file, using default log handler\n"); diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 911d629956..bebc3b863f 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -590,14 +590,14 @@ current_invoke_count = 0; MonoObject *runtime_invoke(MonoMethod *p_method, void *p_obj, void **p_params, MonoException **p_exc) { GD_MONO_BEGIN_RUNTIME_INVOKE; - MonoObject *ret = mono_runtime_invoke(p_method, p_obj, p_params, (MonoObject **)&p_exc); + MonoObject *ret = mono_runtime_invoke(p_method, p_obj, p_params, (MonoObject **)p_exc); GD_MONO_END_RUNTIME_INVOKE; return ret; } MonoObject *runtime_invoke_array(MonoMethod *p_method, void *p_obj, MonoArray *p_params, MonoException **p_exc) { GD_MONO_BEGIN_RUNTIME_INVOKE; - MonoObject *ret = mono_runtime_invoke_array(p_method, p_obj, p_params, (MonoObject **)&p_exc); + MonoObject *ret = mono_runtime_invoke_array(p_method, p_obj, p_params, (MonoObject **)p_exc); GD_MONO_END_RUNTIME_INVOKE; return ret; } diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index f5d35714e1..6ec44023c1 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -93,7 +93,7 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, print_line("bmask: "+itos(bmask)); print_line("amask: "+itos(amask)); print_line("surfcount: "+itos(surfcount)); -*/ + */ PoolVector<uint8_t> data; data.resize(surfsize); @@ -159,8 +159,6 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, if (mipmaps) tex_flags |= Texture::FLAG_MIPMAPS; - print_line("flip: " + itos(flags & PVR_VFLIP)); - Ref<Image> image = memnew(Image(width, height, mipmaps, format, data)); ERR_FAIL_COND_V(image->empty(), RES()); @@ -646,12 +644,6 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int static void _pvrtc_decompress(Image *p_img) { - /* - static void decompress_pvrtc(const void *p_comp_img, const int p_2bit, const int p_width, const int p_height, unsigned char* p_dst) { - decompress_pvrtc((PVRTCBlock*)p_comp_img,p_2bit,p_width,p_height,1,p_dst); - } - */ - ERR_FAIL_COND(p_img->get_format() != Image::FORMAT_PVRTC2 && p_img->get_format() != Image::FORMAT_PVRTC2A && p_img->get_format() != Image::FORMAT_PVRTC4 && p_img->get_format() != Image::FORMAT_PVRTC4A); bool _2bit = (p_img->get_format() == Image::FORMAT_PVRTC2 || p_img->get_format() == Image::FORMAT_PVRTC2A); @@ -665,12 +657,6 @@ static void _pvrtc_decompress(Image *p_img) { decompress_pvrtc((PVRTCBlock *)r.ptr(), _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w.ptr()); - /* - for(int i=0;i<newdata.size();i++) { - print_line(itos(w[i])); - } - */ - w = PoolVector<uint8_t>::Write(); r = PoolVector<uint8_t>::Read(); diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index 25fc897146..653dd82351 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -59,7 +59,7 @@ void image_decompress_squish(Image *p_image) { } else if (p_image->get_format() == Image::FORMAT_RGTC_RG) { squish_flags = squish::kBc5; } else { - print_line("Can't decompress unknown format: " + itos(p_image->get_format())); + ERR_EXPLAIN("Squish: Can't decompress unknown format: " + itos(p_image->get_format())); ERR_FAIL_COND(true); return; } diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index c95a8ac2dd..0e533d3978 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -208,8 +208,6 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) { //does this work? (it's less mem..) //decode_mem_size = ogg_alloc.alloc_buffer_length_in_bytes + info.setup_memory_required + info.temp_memory_required + info.max_frame_size; - //print_line("succeeded "+itos(ogg_alloc.alloc_buffer_length_in_bytes)+" setup "+itos(info.setup_memory_required)+" setup temp "+itos(info.setup_temp_memory_required)+" temp "+itos(info.temp_memory_required)+" maxframe"+itos(info.max_frame_size)); - length = stb_vorbis_stream_length_in_seconds(ogg_stream); stb_vorbis_close(ogg_stream); diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 881808873b..68087ac01f 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -387,7 +387,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) { thread_sem->post(); #endif - //print_line("play "+rtos(p_delta)); time += p_delta; if (videobuf_time > get_time()) { @@ -442,16 +441,8 @@ void VideoStreamPlaybackTheora::update(float p_delta) { int tr = vorbis_synthesis_read(&vd, ret - to_read); - if (vd.granulepos >= 0) { - //print_line("wrote: "+itos(audio_frames_wrote)+" gpos: "+itos(vd.granulepos)); - } - - //print_line("mix audio!"); - audio_frames_wrote += ret - to_read; - //print_line("AGP: "+itos(vd.granulepos)+" added "+itos(ret-to_read)); - } else { /* no pending audio; is there a pending packet to decode? */ @@ -460,7 +451,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) { vorbis_synthesis_blockin(&vd, &vb); } } else { /* we need more data; break out to suck in another page */ - //printf("need moar data\n"); break; }; } diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 73b6d702c1..8e98b08b22 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -1144,15 +1144,12 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in case VisualScriptBuiltinFunc::TEXT_PRINTERR: { String str = *p_inputs[0]; - - //str+="\n"; print_error(str); } break; case VisualScriptBuiltinFunc::TEXT_PRINTRAW: { - String str = *p_inputs[0]; - //str+="\n"; + String str = *p_inputs[0]; OS::get_singleton()->print("%s", str.utf8().get_data()); } break; diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 45a27d1e79..4471fbd0c4 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -882,7 +882,6 @@ void VisualScriptEditor::_member_selected() { ERR_FAIL_COND(!ti); selected = ti->get_metadata(0); - //print_line("selected: "+String(selected)); if (ti->get_parent() == members->get_root()->get_children()) { diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index ad886bc758..f926d4e2eb 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -394,7 +394,6 @@ void VisualScriptFunctionCall::_update_method_cache() { } } - //print_line("BASE: "+String(type)+" FUNC: "+String(function)); MethodBind *mb = ClassDB::get_method(type, function); if (mb) { use_default_args = mb->get_default_argument_count(); diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index e4dfc5fe45..f79c81ad88 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -285,7 +285,6 @@ void VisualScriptPropertySelector::_update_search() { Ref<Texture> icon; script_methods = false; - print_line("name: " + E->get().name); String rep = E->get().name.replace("*", ""); if (E->get().name == "*Script Methods") { icon = get_icon("Script", "EditorIcons"); |