From 5f9cf99abddb7cacb4aaaab26a256342ded845f3 Mon Sep 17 00:00:00 2001 From: "bart@bartbes.ath.cx" Date: Thu, 7 Jan 2010 20:36:14 +0100 Subject: [PATCH] Fixed epic physics typo (getRestituion->getRestitution) --- src/modules/physics/box2d/Shape.cpp | 20 +++++++------- src/modules/physics/box2d/Shape.h | 26 +++++++++---------- .../physics/box2d/wrap_CircleShape.cpp | 8 +++--- .../physics/box2d/wrap_PolygonShape.cpp | 8 +++--- src/modules/physics/box2d/wrap_Shape.cpp | 16 ++++++------ src/modules/physics/box2d/wrap_Shape.h | 8 +++--- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/modules/physics/box2d/Shape.cpp b/src/modules/physics/box2d/Shape.cpp index a9a51ccdc..41c28bdd2 100644 --- a/src/modules/physics/box2d/Shape.cpp +++ b/src/modules/physics/box2d/Shape.cpp @@ -1,14 +1,14 @@ /** * Copyright (c) 2006-2009 LOVE Development Team -* +* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. -* +* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: -* +* * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -93,7 +93,7 @@ namespace box2d return shape->GetFriction(); } - float Shape::getRestituion() const + float Shape::getRestitution() const { return shape->GetRestitution(); } @@ -134,7 +134,7 @@ namespace box2d float lambda; b2Vec2 normal; - + if(shape->TestSegment(shape->GetBody()->GetXForm(), &lambda, &normal, s, 1.0f)) { lua_pushnumber(L, lambda); @@ -164,7 +164,7 @@ namespace box2d v[1] = (int)f.maskBits; v[2] = f.groupIndex; } - + int Shape::setCategory(lua_State * L) { b2FilterData f = shape->GetFilterData(); @@ -206,7 +206,7 @@ namespace box2d { return pushBits(L, ~(shape->GetFilterData().maskBits)); } - + uint16 Shape::getBits(lua_State * L) { // Get number of args. @@ -218,11 +218,11 @@ namespace box2d for(int i = 1;i<=argc;i++) { size_t bpos = (size_t)(lua_tointeger(L, i)-1); - if(bpos < 0 || bpos > 16) + if(bpos < 0 || bpos > 16) return luaL_error(L, "Values must be in range 1-16."); b.set(bpos, true); } - + return (uint16)b.to_ulong(); } @@ -243,7 +243,7 @@ namespace box2d int Shape::setData(lua_State * L) { love::luax_assert_argc(L, 1, 1); - + if(data->ref != 0) { delete data->ref; diff --git a/src/modules/physics/box2d/Shape.h b/src/modules/physics/box2d/Shape.h index b8a527399..1a78afb9d 100644 --- a/src/modules/physics/box2d/Shape.h +++ b/src/modules/physics/box2d/Shape.h @@ -1,14 +1,14 @@ /** * Copyright (c) 2006-2009 LOVE Development Team -* +* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. -* +* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: -* +* * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -51,16 +51,16 @@ namespace box2d /** * A Shape is geometry attached to a Body. - * A Body has position and orientation, and + * A Body has position and orientation, and * a Shape's geometry will be affected by the parent * body's transformation. **/ class Shape : public love::physics::Shape { protected: - + // A pointer to the parent Body. If the Body - // is destroyed, all child shapes are destroyed as well. + // is destroyed, all child shapes are destroyed as well. // This ensures that all child shapes are always destroyed // *before* the parent Body. Body * body; @@ -76,14 +76,14 @@ namespace box2d /** * Creates a Shape attatched to the specified - * Body. + * Body. **/ Shape(Body * body); virtual ~Shape(); /** - * Gets the type of Shape. Useful for + * Gets the type of Shape. Useful for * debug drawing. **/ Type getType() const; @@ -122,7 +122,7 @@ namespace box2d * Gets the restitution of the Shape. * @return The restitution of the Shape. **/ - float getRestituion() const; + float getRestitution() const; /** * Gets the density of the Shape. @@ -167,7 +167,7 @@ namespace box2d * category (16-bits), mask (16-bits) and group (32-bits/int). **/ void getFilterData(int * v); - + void setGroupIndex(int index); int getGroupIndex() const; @@ -181,7 +181,7 @@ namespace box2d /** * This function stores an in-C reference to * arbitrary Lua data in the Box2D shape object. - * + * * The data set here will be passed to the collision * handler when collisions occur. **/ @@ -194,10 +194,10 @@ namespace box2d int getData(lua_State * L); /** - * Gets the bounding box for this Shape. + * Gets the bounding box for this Shape. * The function returns eight values which can be * passed directly to love.graphics.polygon. - **/ + **/ int getBoundingBox(lua_State * L); }; diff --git a/src/modules/physics/box2d/wrap_CircleShape.cpp b/src/modules/physics/box2d/wrap_CircleShape.cpp index 49a64959b..c543ecba3 100644 --- a/src/modules/physics/box2d/wrap_CircleShape.cpp +++ b/src/modules/physics/box2d/wrap_CircleShape.cpp @@ -1,14 +1,14 @@ /** * Copyright (c) 2006-2009 LOVE Development Team -* +* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. -* +* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: -* +* * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -47,7 +47,7 @@ namespace box2d { "setDensity", w_Shape_setDensity }, { "setSensor", w_Shape_setSensor }, { "getFriction", w_Shape_getFriction }, - { "getRestituion", w_Shape_getRestituion }, + { "getRestitution", w_Shape_getRestitution }, { "getDensity", w_Shape_getDensity }, { "isSensor", w_Shape_isSensor }, { "testPoint", w_Shape_testPoint }, diff --git a/src/modules/physics/box2d/wrap_PolygonShape.cpp b/src/modules/physics/box2d/wrap_PolygonShape.cpp index 1127a1bce..720f0be33 100644 --- a/src/modules/physics/box2d/wrap_PolygonShape.cpp +++ b/src/modules/physics/box2d/wrap_PolygonShape.cpp @@ -1,14 +1,14 @@ /** * Copyright (c) 2006-2009 LOVE Development Team -* +* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. -* +* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: -* +* * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -47,7 +47,7 @@ namespace box2d { "setDensity", w_Shape_setDensity }, { "setSensor", w_Shape_setSensor }, { "getFriction", w_Shape_getFriction }, - { "getRestituion", w_Shape_getRestituion }, + { "getRestitution", w_Shape_getRestitution }, { "getDensity", w_Shape_getDensity }, { "isSensor", w_Shape_isSensor }, { "testPoint", w_Shape_testPoint }, diff --git a/src/modules/physics/box2d/wrap_Shape.cpp b/src/modules/physics/box2d/wrap_Shape.cpp index 41e659580..368b359f5 100644 --- a/src/modules/physics/box2d/wrap_Shape.cpp +++ b/src/modules/physics/box2d/wrap_Shape.cpp @@ -1,14 +1,14 @@ /** * Copyright (c) 2006-2009 LOVE Development Team -* +* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. -* +* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: -* +* * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -80,10 +80,10 @@ namespace box2d return 1; } - int w_Shape_getRestituion(lua_State * L) + int w_Shape_getRestitution(lua_State * L) { Shape * t = luax_checkshape(L, 1); - lua_pushnumber(L, t->getRestituion()); + lua_pushnumber(L, t->getRestitution()); return 1; } @@ -148,14 +148,14 @@ namespace box2d lua_pushinteger(L, v[2]); return 3; } - + int w_Shape_setCategory(lua_State * L) { Shape * t = luax_checkshape(L, 1); lua_remove(L, 1); return t->setCategory(L); } - + int w_Shape_getCategory(lua_State * L) { Shape * t = luax_checkshape(L, 1); @@ -231,7 +231,7 @@ namespace box2d { "setDensity", w_Shape_setDensity }, { "setSensor", w_Shape_setSensor }, { "getFriction", w_Shape_getFriction }, - { "getRestituion", w_Shape_getRestituion }, + { "getRestitution", w_Shape_getRestitution }, { "getDensity", w_Shape_getDensity }, { "isSensor", w_Shape_isSensor }, { "testPoint", w_Shape_testPoint }, diff --git a/src/modules/physics/box2d/wrap_Shape.h b/src/modules/physics/box2d/wrap_Shape.h index 921e89f44..9b38216ed 100644 --- a/src/modules/physics/box2d/wrap_Shape.h +++ b/src/modules/physics/box2d/wrap_Shape.h @@ -1,14 +1,14 @@ /** * Copyright (c) 2006-2009 LOVE Development Team -* +* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. -* +* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: -* +* * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be @@ -38,7 +38,7 @@ namespace box2d int w_Shape_setDensity(lua_State * L); int w_Shape_setSensor(lua_State * L); int w_Shape_getFriction(lua_State * L); - int w_Shape_getRestituion(lua_State * L); + int w_Shape_getRestitution(lua_State * L); int w_Shape_getDensity(lua_State * L); int w_Shape_isSensor(lua_State * L); int w_Shape_getBody(lua_State * L);