Skip to content

Commit 6f3d9f0

Browse files
committed
issue #176 replace Int32 by int.
1 parent 661cd21 commit 6f3d9f0

30 files changed

+128
-128
lines changed

test_uphone/tests/ActionsTest/ActionsTest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "ActionsTest.h"
22
#include "../testResource.h"
33

4-
static Int32 s_nActionIdx = -1;
4+
static int s_nActionIdx = -1;
55

6-
CCLayer* CreateLayer(Int32 nIndex)
6+
CCLayer* CreateLayer(int nIndex)
77
{
88
CCLayer * pLayer = NULL;
99

test_uphone/tests/Box2DTest/Box2dTest.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Box2DTestLayer::Box2DTestLayer()
3636
m_debugDraw = new GLESDebugDraw( PTM_RATIO );
3737
world->SetDebugDraw(m_debugDraw);
3838
39-
uint32 flags = 0;
39+
uint flags = 0;
4040
flags += b2DebugDraw::e_shapeBit;
4141
flags += b2DebugDraw::e_jointBit;
4242
flags += b2DebugDraw::e_aabbBit;
@@ -156,8 +156,8 @@ void Box2DTestLayer::tick(ccTime dt)
156156
//You need to make an informed choice, the following URL is useful
157157
//http://gafferongames.com/game-physics/fix-your-timestep/
158158

159-
int32 velocityIterations = 8;
160-
int32 positionIterations = 1;
159+
int velocityIterations = 8;
160+
int positionIterations = 1;
161161

162162
// Instruct the world to perform a single step of simulation. It is
163163
// generally best to keep the time step and iterations fixed.

test_uphone/tests/Box2DTestBed/GLES-Render.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ GLESDebugDraw::GLESDebugDraw( float32 ratio )
1717
}
1818

1919

20-
void GLESDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int32 vertexCount, const b2Color& color)
20+
void GLESDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int vertexCount, const b2Color& color)
2121
{
2222
b2Vec2* vertices = new b2Vec2[vertexCount];
2323
for( int i=0;i<vertexCount;i++)
@@ -33,7 +33,7 @@ void GLESDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int32 vertexCount, c
3333
delete[] vertices;
3434
}
3535

36-
void GLESDebugDraw::DrawSolidPolygon(const b2Vec2* old_vertices, int32 vertexCount, const b2Color& color)
36+
void GLESDebugDraw::DrawSolidPolygon(const b2Vec2* old_vertices, int vertexCount, const b2Color& color)
3737
{
3838
b2Vec2* vertices = new b2Vec2[vertexCount];
3939
for( int i=0;i<vertexCount;i++) {
@@ -61,7 +61,7 @@ void GLESDebugDraw::DrawCircle(const b2Vec2& center, float32 radius, const b2Col
6161
float32 theta = 0.0f;
6262

6363
GLfloat* glVertices = new GLfloat[vertexCount*2];
64-
for (int32 i = 0; i < k_segments; ++i)
64+
for (int i = 0; i < k_segments; ++i)
6565
{
6666
b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta));
6767
glVertices[i*2]=v.x * mRatio;
@@ -86,7 +86,7 @@ void GLESDebugDraw::DrawSolidCircle(const b2Vec2& center, float32 radius, const
8686
float32 theta = 0.0f;
8787

8888
GLfloat* glVertices = new GLfloat[vertexCount*2];
89-
for (int32 i = 0; i < k_segments; ++i)
89+
for (int i = 0; i < k_segments; ++i)
9090
{
9191
b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta));
9292
glVertices[i*2]=v.x * mRatio;

test_uphone/tests/Box2DTestBed/GLES-Render.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class GLESDebugDraw : public b2DebugDraw
2020

2121
GLESDebugDraw( float32 ratio );
2222

23-
virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
23+
virtual void DrawPolygon(const b2Vec2* vertices, int vertexCount, const b2Color& color);
2424

25-
virtual void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
25+
virtual void DrawSolidPolygon(const b2Vec2* vertices, int vertexCount, const b2Color& color);
2626

2727
virtual void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color);
2828

test_uphone/tests/Box2DTestBed/Test.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void Test::PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
7474
b2WorldManifold worldManifold;
7575
contact->GetWorldManifold(&worldManifold);
7676

77-
for (int32 i = 0; i < manifold->pointCount && m_pointCount < k_maxContactPoints; ++i)
77+
for (int i = 0; i < manifold->pointCount && m_pointCount < k_maxContactPoints; ++i)
7878
{
7979
ContactPoint* cp = m_points + m_pointCount;
8080
cp->fixtureA = fixtureA;
@@ -277,7 +277,7 @@ void Test::Step(Settings* settings)
277277
m_textLine += 15;
278278
}
279279

280-
uint32 flags = 0;
280+
unsigned int flags = 0;
281281
flags += settings->drawShapes * b2DebugDraw::e_shapeBit;
282282
flags += settings->drawJoints * b2DebugDraw::e_jointBit;
283283
flags += settings->drawAABBs * b2DebugDraw::e_aabbBit;
@@ -347,7 +347,7 @@ void Test::Step(Settings* settings)
347347
//const float32 k_impulseScale = 0.1f;
348348
const float32 k_axisScale = 0.3f;
349349

350-
for (int32 i = 0; i < m_pointCount; ++i)
350+
for (int i = 0; i < m_pointCount; ++i)
351351
{
352352
ContactPoint* point = m_points + i;
353353

test_uphone/tests/Box2DTestBed/Test.h

+21-21
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,22 @@ struct Settings
8282
{}
8383

8484
float32 hz;
85-
int32 velocityIterations;
86-
int32 positionIterations;
87-
int32 drawShapes;
88-
int32 drawJoints;
89-
int32 drawAABBs;
90-
int32 drawPairs;
91-
int32 drawContactPoints;
92-
int32 drawContactNormals;
93-
int32 drawContactForces;
94-
int32 drawFrictionForces;
95-
int32 drawCOMs;
96-
int32 drawStats;
97-
int32 enableWarmStarting;
98-
int32 enableContinuous;
99-
int32 pause;
100-
int32 singleStep;
85+
int velocityIterations;
86+
int positionIterations;
87+
int drawShapes;
88+
int drawJoints;
89+
int drawAABBs;
90+
int drawPairs;
91+
int drawContactPoints;
92+
int drawContactNormals;
93+
int drawContactForces;
94+
int drawFrictionForces;
95+
int drawCOMs;
96+
int drawStats;
97+
int enableWarmStarting;
98+
int enableContinuous;
99+
int pause;
100+
int singleStep;
101101
};
102102

103103
struct TestEntry
@@ -120,7 +120,7 @@ class DestructionListener : public b2DestructionListener
120120
Test* test;
121121
};
122122

123-
const int32 k_maxContactPoints = 2048;
123+
const int k_maxContactPoints = 2048;
124124

125125
struct ContactPoint
126126
{
@@ -139,7 +139,7 @@ class Test : public b2ContactListener
139139
virtual ~Test();
140140

141141
void SetGravity(float x,float y);
142-
void SetTextLine(int32 line) { m_textLine = line; }
142+
void SetTextLine(int line) { m_textLine = line; }
143143
void DrawTitle(int x, int y, const char *string);
144144
virtual void Step(Settings* settings);
145145
virtual void Keyboard(unsigned char key) { B2_NOT_USED(key); }
@@ -176,16 +176,16 @@ class Test : public b2ContactListener
176176
b2Body* m_groundBody;
177177
b2AABB m_worldAABB;
178178
ContactPoint m_points[k_maxContactPoints];
179-
int32 m_pointCount;
179+
int m_pointCount;
180180
DestructionListener m_destructionListener;
181181
GLESDebugDraw m_debugDraw;
182-
int32 m_textLine;
182+
int m_textLine;
183183
b2Body* m_bomb;
184184
b2MouseJoint* m_mouseJoint;
185185
b2Vec2 m_bombSpawnPoint;
186186
bool m_bombSpawning;
187187
b2Vec2 m_mouseWorld;
188-
int32 m_stepCount;
188+
int m_stepCount;
189189
};
190190

191191
#endif

test_uphone/tests/Box2DTestBed/Tests/Breakable.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ class Breakable : public Test
6969
}
7070

7171
// Should the body break?
72-
int32 count = contact->GetManifold()->pointCount;
72+
int count = contact->GetManifold()->pointCount;
7373

7474
float32 maxImpulse = 0.0f;
75-
for (int32 i = 0; i < count; ++i)
75+
for (int i = 0; i < count; ++i)
7676
{
7777
maxImpulse = b2Max(maxImpulse, impulse->normalImpulses[i]);
7878
}

test_uphone/tests/Box2DTestBed/Tests/Bridge.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Bridge : public Test
5252
b2RevoluteJointDef jd;
5353

5454
b2Body* prevBody = ground;
55-
for (int32 i = 0; i < e_count; ++i)
55+
for (int i = 0; i < e_count; ++i)
5656
{
5757
b2BodyDef bd;
5858
bd.type = b2_dynamicBody;
@@ -76,7 +76,7 @@ class Bridge : public Test
7676
m_world->CreateJoint(&jd);
7777
}
7878

79-
for (int32 i = 0; i < 2; ++i)
79+
for (int i = 0; i < 2; ++i)
8080
{
8181
b2Vec2 vertices[3];
8282
vertices[0].Set(-0.5f, 0.0f);
@@ -97,7 +97,7 @@ class Bridge : public Test
9797
body->CreateFixture(&fd);
9898
}
9999

100-
for (int32 i = 0; i < 3; ++i)
100+
for (int i = 0; i < 3; ++i)
101101
{
102102
b2CircleShape shape;
103103
shape.m_radius = 0.5f;

test_uphone/tests/Box2DTestBed/Tests/Cantilever.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Cantilever : public Test
5151
b2WeldJointDef jd;
5252

5353
b2Body* prevBody = ground;
54-
for (int32 i = 0; i < e_count; ++i)
54+
for (int i = 0; i < e_count; ++i)
5555
{
5656
b2BodyDef bd;
5757
bd.type = b2_dynamicBody;
@@ -78,7 +78,7 @@ class Cantilever : public Test
7878
b2WeldJointDef jd;
7979

8080
b2Body* prevBody = ground;
81-
for (int32 i = 0; i < e_count; ++i)
81+
for (int i = 0; i < e_count; ++i)
8282
{
8383
b2BodyDef bd;
8484
bd.type = b2_dynamicBody;
@@ -106,7 +106,7 @@ class Cantilever : public Test
106106
b2WeldJointDef jd;
107107

108108
b2Body* prevBody = ground;
109-
for (int32 i = 0; i < e_count; ++i)
109+
for (int i = 0; i < e_count; ++i)
110110
{
111111
b2BodyDef bd;
112112
bd.type = b2_dynamicBody;
@@ -136,7 +136,7 @@ class Cantilever : public Test
136136
b2WeldJointDef jd;
137137

138138
b2Body* prevBody = ground;
139-
for (int32 i = 0; i < e_count; ++i)
139+
for (int i = 0; i < e_count; ++i)
140140
{
141141
b2BodyDef bd;
142142
bd.type = b2_dynamicBody;
@@ -156,7 +156,7 @@ class Cantilever : public Test
156156
}
157157
}
158158

159-
for (int32 i = 0; i < 2; ++i)
159+
for (int i = 0; i < 2; ++i)
160160
{
161161
b2Vec2 vertices[3];
162162
vertices[0].Set(-0.5f, 0.0f);
@@ -177,7 +177,7 @@ class Cantilever : public Test
177177
body->CreateFixture(&fd);
178178
}
179179

180-
for (int32 i = 0; i < 2; ++i)
180+
for (int i = 0; i < 2; ++i)
181181
{
182182
b2CircleShape shape;
183183
shape.m_radius = 0.5f;

test_uphone/tests/Box2DTestBed/Tests/Chain.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Chain : public Test
4848

4949
const float32 y = 25.0f;
5050
b2Body* prevBody = ground;
51-
for (int32 i = 0; i < 30; ++i)
51+
for (int i = 0; i < 30; ++i)
5252
{
5353
b2BodyDef bd;
5454
bd.type = b2_dynamicBody;

test_uphone/tests/Box2DTestBed/Tests/CharacterCollision.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class CharacterCollision : public Test
117117
float32 angle = 0.0f;
118118
float32 delta = b2_pi / 3.0f;
119119
b2Vec2 vertices[6];
120-
for (int32 i = 0; i < 6; ++i)
120+
for (int i = 0; i < 6; ++i)
121121
{
122122
vertices[i].Set(0.5f * cosf(angle), 0.5f * sinf(angle));
123123
angle += delta;

test_uphone/tests/Box2DTestBed/Tests/CollisionProcessing.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ class CollisionProcessing : public Test
126126
// We are going to destroy some bodies according to contact
127127
// points. We must buffer the bodies that should be destroyed
128128
// because they may belong to multiple contact points.
129-
const int32 k_maxNuke = 6;
129+
const int k_maxNuke = 6;
130130
b2Body* nuke[k_maxNuke];
131-
int32 nukeCount = 0;
131+
int nukeCount = 0;
132132

133133
// Traverse the contact results. Destroy bodies that
134134
// are touching heavier bodies.
135-
for (int32 i = 0; i < m_pointCount; ++i)
135+
for (int i = 0; i < m_pointCount; ++i)
136136
{
137137
ContactPoint* point = m_points + i;
138138

@@ -163,7 +163,7 @@ class CollisionProcessing : public Test
163163
std::sort(nuke, nuke + nukeCount);
164164

165165
// Destroy the bodies, skipping duplicates.
166-
int32 i = 0;
166+
int i = 0;
167167
while (i < nukeCount)
168168
{
169169
b2Body* b = nuke[i++];

test_uphone/tests/Box2DTestBed/Tests/CompoundShapes.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class CompoundShapes : public Test
101101
vertices[2] = b2Mul(xf2, b2Vec2(0.0f, 0.5f));
102102
triangle2.Set(vertices, 3);
103103

104-
for (int32 i = 0; i < 10; ++i)
104+
for (int i = 0; i < 10; ++i)
105105
{
106106
float32 x = RandomFloat(-0.1f, 0.1f);
107107
b2BodyDef bd;

test_uphone/tests/Box2DTestBed/Tests/Confined.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Confined : public Test
6464
fd.density = 1.0f;
6565
fd.friction = 0.1f;
6666

67-
for (int32 j = 0; j < e_columnCount; ++j)
67+
for (int j = 0; j < e_columnCount; ++j)
6868
{
6969
for (int i = 0; i < e_rowCount; ++i)
7070
{
@@ -112,7 +112,7 @@ class Confined : public Test
112112

113113
void Step(Settings* settings)
114114
{
115-
int32 flag = settings->enableContinuous;
115+
int flag = settings->enableContinuous;
116116
settings->enableContinuous = 0;
117117
Test::Step(settings);
118118
m_debugDraw.DrawString(5, m_textLine, "Press 'c' to create a circle.");

test_uphone/tests/Box2DTestBed/Tests/ContinuousTest.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ContinuousTest : public Test
9595

9696
Test::Step(settings);
9797

98-
extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
98+
extern int b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
9999

100100
if (b2_gjkCalls > 0)
101101
{
@@ -104,9 +104,9 @@ class ContinuousTest : public Test
104104
m_textLine += 15;
105105
}
106106

107-
extern int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;
108-
extern int32 b2_toiRootIters, b2_toiMaxRootIters;
109-
extern int32 b2_toiMaxOptIters;
107+
extern int b2_toiCalls, b2_toiIters, b2_toiMaxIters;
108+
extern int b2_toiRootIters, b2_toiMaxRootIters;
109+
extern int b2_toiMaxOptIters;
110110

111111
if (b2_toiCalls > 0)
112112
{

test_uphone/tests/Box2DTestBed/Tests/DistanceTest.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ class DistanceTest : public Test
6868
{
6969
b2Color color(0.9f, 0.9f, 0.9f);
7070
b2Vec2 v[b2_maxPolygonVertices];
71-
for (int32 i = 0; i < m_polygonA.m_vertexCount; ++i)
71+
for (int i = 0; i < m_polygonA.m_vertexCount; ++i)
7272
{
7373
v[i] = b2Mul(m_transformA, m_polygonA.m_vertices[i]);
7474
}
7575
m_debugDraw.DrawPolygon(v, m_polygonA.m_vertexCount, color);
7676

77-
for (int32 i = 0; i < m_polygonB.m_vertexCount; ++i)
77+
for (int i = 0; i < m_polygonB.m_vertexCount; ++i)
7878
{
7979
v[i] = b2Mul(m_transformB, m_polygonB.m_vertices[i]);
8080
}

test_uphone/tests/Box2DTestBed/Tests/Dominos.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class Dominos : public Test
195195
b2CircleShape shape;
196196
shape.m_radius = radius;
197197

198-
for (int32 i = 0; i < 4; ++i)
198+
for (int i = 0; i < 4; ++i)
199199
{
200200
b2BodyDef bd;
201201
bd.type = b2_dynamicBody;

0 commit comments

Comments
 (0)