My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Steps to convert a game based on cocos2d v0.7.1 to v0.7.2

//
// NEEDED CHANGES
//

Sprite & AtlasSprite:
---------------------
* If you want to auto-center the frames when using animation (or using setDisplayFrame:)
then you should do this:
[sprite setAutoCenterFrames: YES];

where 'sprite' is an instance of Sprite or AtlasSprite


Drawing Primitives:
-------------------
All the drawing primitives were updated.
The old behavior is still present by appending the word "Deprecated" to the function name.

drawPoint( float x, float y ); // REMOVED
drawPoint( CGPoint point); // ADDED
drawPointDeprecated( float x, float y); // DEPRECATED

drawLine( float x1, float y1, float x2, flaot y2 ); // REMOVED
drawLine( CGPoint origin, CGPoint dst); // ADDED
drawLineDeprecated( float x1, float y1, float x2, flaot y2 ); // DEPRECATED

drawPoly( float *vertices, int number_of_points); // REMOVED
drawPoly( CGPoint *points, int number_of_points, BOOL close_polygon); // ADDED
drawPolyDeprecated( float *vertices, int number_of_points); // REMOVED

void drawCircle( float x, float y, float radius, float angle, int segs); // REMOVED
void drawCircle( CGPoint center, float radius, float angle, int segs, BOOL drawLineToCenter); // ADDED
void drawCircleDeprecated( float x, float y, float radius, float angle, int segs); // DEPRECATED

The script:
tools/convert_0_7_1_to_0_7_2_drawPrimitives.sh
will convert your current code to the v0.7.2 API by using the deprecated functions.


New files:
----------
* Add these files to your project
- Support/FileUtils.m
- Support/FileUtils.h
- Support/CGPointExtension.m
- Support/CGPointExtension.h


Chipmunk:
---------
cocos2d doesn't depend on chipmunk anymore.
So, if your game uses Chipmunk you need to import this file:

#import "chipmunk.h"

But if your game doesn't use chipmunk, but depends on the chipmunk macros like:
cpv(), cpvadd(), cpvsub(), etc. you can either do:

a)
#import "chipmunk.h"

or:

b) replace chipmunk macros with CG macros
$ cp tools/convert_cpvect_2_cg.sh yourgame/directory/
$ cd yourgame/directory
$ . /convert_0_7_1_to_0_7_2_cpvect_to_CGPoint.sh


//
// OPTIONAL CHANGES
//


New file:
---------
* Optionally you can include this file:
Support/ccArray.h
It will be used in v0.8

Deleted files:
--------------
* Delete these files from your project
- CocosNodesExtra.m
- CocosNodesExtra.h


Linking parameters:
-------------------
* You can safely remove the '-ObjC' parameter from:
In XCode -> Project -> Edit Active Target -> Build (All Configurations) ->
-> Linking -> Other Linker Flags:

Change log

r848 by ricardoquesada on Apr 23, 2009   Diff
preparing v0.7.2
Go to: 
Project members, sign in to write a code review

Older revisions

r812 by ricardoquesada on Apr 17, 2009   Diff
real branch of v0.7.x
r802 by ricardoquesada on Apr 16, 2009   Diff
documentation in drawprimitives
examples. improved convertion document
r799 by ricardoquesada on Apr 15, 2009   Diff
improved  issue #290 
All revisions of this file

File info

Size: 2821 bytes, 94 lines

File properties

svn:executable
*
Powered by Google Project Hosting