From b6f3d2114f83495c7d00833f10adfe20caa8712a Mon Sep 17 00:00:00 2001 From: Bill Meltsner Date: Sun, 25 Sep 2011 11:32:46 -0400 Subject: [PATCH] Remove legacy meter setting from love.physics.newWorld --HG-- branch : box2d-update --- src/modules/physics/box2d/Physics.cpp | 3 +-- src/modules/physics/box2d/Physics.h | 3 +-- src/modules/physics/box2d/wrap_Physics.cpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/physics/box2d/Physics.cpp b/src/modules/physics/box2d/Physics.cpp index 7bfffec98..e2e6be22e 100644 --- a/src/modules/physics/box2d/Physics.cpp +++ b/src/modules/physics/box2d/Physics.cpp @@ -38,9 +38,8 @@ namespace box2d return "love.physics.box2d"; } - World * Physics::newWorld(float gx, float gy, bool sleep, int meter) + World * Physics::newWorld(float gx, float gy, bool sleep) { - Physics::setMeter(meter); return new World(b2Vec2(gx, gy), sleep); } diff --git a/src/modules/physics/box2d/Physics.h b/src/modules/physics/box2d/Physics.h index 89ff428a5..127e28ec2 100644 --- a/src/modules/physics/box2d/Physics.h +++ b/src/modules/physics/box2d/Physics.h @@ -72,9 +72,8 @@ namespace box2d * @param gx Gravity along x-axis. * @param gy Gravity along y-axis. * @param sleep Whether the World allows sleep. - * @param meter The scale in px/m. **/ - World * newWorld(float gx, float gy, bool sleep, int meter); + World * newWorld(float gx, float gy, bool sleep); /** * Creates a new Body at the specified position. diff --git a/src/modules/physics/box2d/wrap_Physics.cpp b/src/modules/physics/box2d/wrap_Physics.cpp index 7fc77dd57..89d82424c 100644 --- a/src/modules/physics/box2d/wrap_Physics.cpp +++ b/src/modules/physics/box2d/wrap_Physics.cpp @@ -34,9 +34,8 @@ namespace box2d float gx = (float)luaL_optnumber(L, 1, 0); float gy = (float)luaL_optnumber(L, 2, 0); bool sleep = luax_optboolean(L, 3, true); - int meter = (int)luaL_optnumber(L, 4, Physics::DEFAULT_METER); - World * w = instance->newWorld(gx, gy, sleep, meter); + World * w = instance->newWorld(gx, gy, sleep); luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w); return 1;