Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v0.99.0-final added

  • Loading branch information...
commit 609df33152d87babd1b1db94ce2d6b5921b2b1bd 1 parent 62de159
@ricardoquesada ricardoquesada authored
View
4 CHANGELOG
@@ -1,5 +1,5 @@
-version 0.99.0 - XX-MMM-2010
- . Box2d: updated to r57 (issue #494)
+version 0.99.0-final - 15-Feb-2010
+ . Box2d: updated to r58 (issue #494)
. Director: Only send "cleanup" when the scene is replaced (re fixed issue #709)
. CocosDenshion: SimpleAudioEngine incorrectly accessing CDAudioManager (issue #748)
. CocosDenshion: added support for 22Khz OpenAL (issue #594)
View
4 RELEASE_NOTES
@@ -1,5 +1,5 @@
-===== cocos2d for iPhone v0.99rc Release Notes =====
+===== cocos2d for iPhone v0.99 Release Notes =====
Please, see the online document:
-http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_99_rc
+http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_99_0
View
168 external/Box2d/Testbed/Tests/CharacterCollision.h
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2006-2010 Erin Catto http://www.gphysics.com
+*
+* 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
+* appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+* misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef CHARACTER_COLLISION_H
+#define CHARACTER_COLLISION_H
+
+/// This is a test of typical character collision scenarios. This does not
+/// show how you should implement a character in your application.
+
+class CharacterCollision : public Test
+{
+public:
+ CharacterCollision()
+ {
+ // Ground body
+ {
+ b2BodyDef bd;
+ b2Body* ground = m_world->CreateBody(&bd);
+
+ b2PolygonShape shape;
+ shape.SetAsEdge(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
+ ground->CreateFixture(&shape);
+ }
+
+ // Collinear edges
+ {
+ b2BodyDef bd;
+ b2Body* ground = m_world->CreateBody(&bd);
+
+ b2PolygonShape shape;
+ shape.m_radius = 0.0f;
+ shape.SetAsEdge(b2Vec2(-8.0f, 1.0f), b2Vec2(-6.0f, 1.0f));
+ ground->CreateFixture(&shape);
+ shape.SetAsEdge(b2Vec2(-6.0f, 1.0f), b2Vec2(-4.0f, 1.0f));
+ ground->CreateFixture(&shape);
+ shape.SetAsEdge(b2Vec2(-4.0f, 1.0f), b2Vec2(-2.0f, 1.0f));
+ ground->CreateFixture(&shape);
+ }
+
+ // Square tiles
+ {
+ b2BodyDef bd;
+ b2Body* ground = m_world->CreateBody(&bd);
+
+ b2PolygonShape shape;
+ shape.SetAsBox(1.0f, 1.0f, b2Vec2(4.0f, 3.0f), 0.0f);
+ ground->CreateFixture(&shape);
+ shape.SetAsBox(1.0f, 1.0f, b2Vec2(6.0f, 3.0f), 0.0f);
+ ground->CreateFixture(&shape);
+ shape.SetAsBox(1.0f, 1.0f, b2Vec2(8.0f, 3.0f), 0.0f);
+ ground->CreateFixture(&shape);
+ }
+
+ // Square made from edges notice how the edges are shrunk to account
+ // for the polygon radius. This makes it so the square character does
+ // not get snagged. However, ray casts can now go through the cracks.
+ {
+ b2BodyDef bd;
+ b2Body* ground = m_world->CreateBody(&bd);
+
+ b2PolygonShape shape;
+ float32 d = 2.0f * b2_polygonRadius;
+ shape.SetAsEdge(b2Vec2(-1.0f + d, 3.0f), b2Vec2(1.0f - d, 3.0f));
+ ground->CreateFixture(&shape);
+ shape.SetAsEdge(b2Vec2(1.0f, 3.0f + d), b2Vec2(1.0f, 5.0f - d));
+ ground->CreateFixture(&shape);
+ shape.SetAsEdge(b2Vec2(1.0f - d, 5.0f), b2Vec2(-1.0f + d, 5.0f));
+ ground->CreateFixture(&shape);
+ shape.SetAsEdge(b2Vec2(-1.0f, 5.0f - d), b2Vec2(-1.0f, 3.0f + d));
+ ground->CreateFixture(&shape);
+ }
+
+ // Square character
+ {
+ b2BodyDef bd;
+ bd.position.Set(-3.0f, 5.0f);
+ bd.type = b2_dynamicBody;
+ bd.fixedRotation = true;
+ bd.allowSleep = false;
+
+ b2Body* body = m_world->CreateBody(&bd);
+
+ b2PolygonShape shape;
+ shape.SetAsBox(0.5f, 0.5f);
+
+ b2FixtureDef fd;
+ fd.shape = &shape;
+ fd.density = 20.0f;
+ body->CreateFixture(&fd);
+ }
+
+ // Hexagon character
+ {
+ b2BodyDef bd;
+ bd.position.Set(-5.0f, 5.0f);
+ bd.type = b2_dynamicBody;
+ bd.fixedRotation = true;
+ bd.allowSleep = false;
+
+ b2Body* body = m_world->CreateBody(&bd);
+
+ float32 angle = 0.0f;
+ float32 delta = b2_pi / 3.0f;
+ b2Vec2 vertices[6];
+ for (int32 i = 0; i < 6; ++i)
+ {
+ vertices[i].Set(0.5f * cosf(angle), 0.5f * sinf(angle));
+ angle += delta;
+ }
+
+ b2PolygonShape shape;
+ shape.Set(vertices, 6);
+
+ b2FixtureDef fd;
+ fd.shape = &shape;
+ fd.density = 20.0f;
+ body->CreateFixture(&fd);
+ }
+
+ // Circle character
+ {
+ b2BodyDef bd;
+ bd.position.Set(3.0f, 5.0f);
+ bd.type = b2_dynamicBody;
+ bd.fixedRotation = true;
+ bd.allowSleep = false;
+
+ b2Body* body = m_world->CreateBody(&bd);
+
+ b2CircleShape shape;
+ shape.m_radius = 0.5f;
+
+ b2FixtureDef fd;
+ fd.shape = &shape;
+ fd.density = 20.0f;
+ body->CreateFixture(&fd);
+ }
+ }
+
+ void Step(Settings* settings)
+ {
+ Test::Step(settings);
+ m_debugDraw.DrawString(5, m_textLine, "This tests various character collision shapes");
+ m_textLine += 15;
+ }
+
+ static Test* Create()
+ {
+ return new CharacterCollision;
+ }
+};
+
+#endif
View
2  external/Box2d/Testbed/Tests/TestEntries.cpp
@@ -28,6 +28,7 @@
#include "Cantilever.h"
#include "ContinuousTest.h"
#include "Chain.h"
+#include "CharacterCollision.h"
#include "CollisionFiltering.h"
#include "CollisionProcessing.h"
#include "CompoundShapes.h"
@@ -59,6 +60,7 @@
TestEntry g_testEntries[] =
{
+ {"Character Collision", CharacterCollision::Create},
{"Prismatic", Prismatic::Create},
{"Edge Shapes", EdgeShapes::Create},
{"Continuous Test", ContinuousTest::Create},
View
2  tests/Box2DTestBed-Cocos2dIntegration/iPhoneTestEntries.mm
@@ -31,6 +31,7 @@
#include "Cantilever.h"
#include "ContinuousTest.h"
#include "Chain.h"
+#include "CharacterCollision.h"
#include "CollisionFiltering.h"
#include "CollisionProcessing.h"
#include "CompoundShapes.h"
@@ -62,6 +63,7 @@
TestEntry g_testEntries[] =
{
+ {"Character Collision", CharacterCollision::Create},
{"Prismatic", Prismatic::Create},
{"Edge Shapes", EdgeShapes::Create},
{"Continuous Test", ContinuousTest::Create},
View
2  tests/RotateWorldTest.m
@@ -21,7 +21,7 @@ -(id) init
NSArray *array = [UIFont familyNames];
for( NSString *s in array )
- NSLog( s );
+ NSLog( @"%@",s );
CCLabel* label = [CCLabel labelWithString:@"cocos2d" fontName:@"Marker Felt" fontSize:64];
[label setPosition: ccp(x/2,y/2)];
View
2  tools/ParticleView/Classes/ParticleViewAppDelegate.m
@@ -28,7 +28,7 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application
NSString *filePath3 = [documentDirectory stringByAppendingPathComponent:kFileName3];
NSString *filePath4 = [documentDirectory stringByAppendingPathComponent:kFileName4];
NSString *filePath5 = [documentDirectory stringByAppendingPathComponent:kFileName5];
- NSLog(filePath1);
+ NSLog(@"%@",filePath1);
// Load saved settings
settings1 = [[NSMutableArray alloc] initWithContentsOfFile:filePath1];
View
1  tools/ParticleView/Classes/ParticlesViewController.m
@@ -38,7 +38,6 @@ @implementation ParticlesViewController
@synthesize startG;
@synthesize startB;
@synthesize startA;
-@synthesize startA;
@synthesize startRVar;
@synthesize startGVar;
@synthesize startBVar;
Please sign in to comment.
Something went wrong with that request. Please try again.