~ubuntu-branches/ubuntu/wily/box2d/wily

« back to all changes in this revision

Viewing changes to Box2D/Testbed/Tests/BodyTypes.h

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2014-05-30 18:42:02 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140530184202-hosw11agojg02ac3
Tags: 2.3.1+ds-1
* Imported Upstream version 2.3.1+ds.
* Fix debian/watch to determine new releases by parsing
  the SVN tags of upstream's version control system.
* Update get-orig-source target for new release.
* dh_strip override: Replace $VER variable with 2.3.0 string.
* debian/copyright: Add new Public Domain and Apache 2.0 license.
* libbox2d-dev.install:
  - Install *.cmake files in /usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Box2D.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
                }
106
106
        }
107
107
 
108
 
        void Keyboard(unsigned char key)
 
108
        void Keyboard(int key)
109
109
        {
110
110
                switch (key)
111
111
                {
112
 
                case 'd':
 
112
                case GLFW_KEY_D:
113
113
                        m_platform->SetType(b2_dynamicBody);
114
114
                        break;
115
115
 
116
 
                case 's':
 
116
                case GLFW_KEY_S:
117
117
                        m_platform->SetType(b2_staticBody);
118
118
                        break;
119
119
 
120
 
                case 'k':
 
120
                case GLFW_KEY_K:
121
121
                        m_platform->SetType(b2_kinematicBody);
122
122
                        m_platform->SetLinearVelocity(b2Vec2(-m_speed, 0.0f));
123
123
                        m_platform->SetAngularVelocity(0.0f);
142
142
                }
143
143
 
144
144
                Test::Step(settings);
145
 
                m_debugDraw.DrawString(5, m_textLine, "Keys: (d) dynamic, (s) static, (k) kinematic");
 
145
                g_debugDraw.DrawString(5, m_textLine, "Keys: (d) dynamic, (s) static, (k) kinematic");
146
146
                m_textLine += DRAW_STRING_NEW_LINE;
147
147
        }
148
148