cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
ccTypes.h File Reference
#import <Foundation/Foundation.h>
#import "ccMacros.h"
#import <CoreGraphics/CGGeometry.h>
#import "Platforms/CCGL.h"
+ Include dependency graph for ccTypes.h:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  ccColor3B
struct  ccColor4B
struct  ccColor4F
struct  ccVertex2F
struct  ccVertex3F
struct  ccTex2F
struct  ccPointSprite
 Point Sprite component. More...
struct  ccQuad2
 A 2D Quad. 4 * 2 floats. More...
struct  ccQuad3
 A 3D Quad. 4 * 3 floats. More...
struct  ccV2F_C4B_T2F
 a Point with a vertex point, a tex coord point and a color 4B More...
struct  ccV2F_C4F_T2F
 a Point with a vertex point, a tex coord point and a color 4F More...
struct  ccV3F_C4F_T2F
 a Point with a vertex point, a tex coord point and a color 4F More...
struct  ccV3F_C4F_T2F_Quad
 4 ccV3F_C4F_T2F More...
struct  ccV3F_C4B_T2F
 a Point with a vertex point, a tex coord point and a color 4B More...
struct  ccV2F_C4B_T2F_Triangle
 A Triangle of ccV2F_C4B_T2F. More...
struct  ccV2F_C4B_T2F_Quad
 A Quad of ccV2F_C4B_T2F. More...
struct  ccV3F_C4B_T2F_Quad
 4 ccVertex3FTex2FColor4B More...
struct  ccV2F_C4F_T2F_Quad
 4 ccVertex2FTex2FColor4F Quad More...
struct  ccBlendFunc
 Blend Function used for textures. More...

Typedefs

typedef CGFloat ccTime
typedef float ccMat4 [16]

Enumerations

enum  ccResolutionType {
  kCCResolutionUnknown, kCCResolutioniPhone, kCCResolutioniPhoneRetinaDisplay, kCCResolutioniPhone5,
  kCCResolutioniPhone5RetinaDisplay, kCCResolutioniPad, kCCResolutioniPadRetinaDisplay
}
 ccResolutionType More...
enum  CCVerticalTextAlignment { kCCVerticalTextAlignmentTop, kCCVerticalTextAlignmentCenter, kCCVerticalTextAlignmentBottom }
 Vertical text alignment type. More...
enum  CCTextAlignment { kCCTextAlignmentLeft, kCCTextAlignmentCenter, kCCTextAlignmentRight }
 Horizontal text alignment type. More...
enum  CCLineBreakMode {
  kCCLineBreakModeWordWrap, kCCLineBreakModeCharacterWrap, kCCLineBreakModeClip, kCCLineBreakModeHeadTruncation,
  kCCLineBreakModeTailTruncation, kCCLineBreakModeMiddleTruncation
}
 Line break modes. More...

Functions

static ccColor3B ccc3 (const GLubyte r, const GLubyte g, const GLubyte b)
 helper macro that creates an ccColor3B type
static ccColor4B ccc4 (const GLubyte r, const GLubyte g, const GLubyte b, const GLubyte o)
 helper macro that creates an ccColor4B type
static ccColor4F ccc4f (const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a)
 helper that creates a ccColor4f type
static ccColor4F ccc4FFromccc3B (ccColor3B c)
static ccColor4F ccc4FFromccc4B (ccColor4B c)
static BOOL ccc4FEqual (ccColor4F a, ccColor4F b)
static ccColor4B ccc4BFromccc4F (ccColor4F c)

Variables

static const ccColor3B ccWHITE = {255,255,255}
 White color (255,255,255)
static const ccColor3B ccYELLOW = {255,255,0}
 Yellow color (255,255,0)
static const ccColor3B ccBLUE = {0,0,255}
 Blue color (0,0,255)
static const ccColor3B ccGREEN = {0,255,0}
 Green Color (0,255,0)
static const ccColor3B ccRED = {255,0,0}
 Red Color (255,0,0,)
static const ccColor3B ccMAGENTA = {255,0,255}
 Magenta Color (255,0,255)
static const ccColor3B ccBLACK = {0,0,0}
 Black Color (0,0,0)
static const ccColor3B ccORANGE = {255,127,0}
 Orange Color (255,127,0)
static const ccColor3B ccGRAY = {166,166,166}
 Gray Color (166,166,166)
static const ccBlendFunc kCCBlendFuncDisable = {GL_ONE, GL_ZERO}

Detailed Description

cocos2d (cc) types


Typedef Documentation

typedef CGFloat ccTime

delta time type if you want more resolution redefine it as a double


Enumeration Type Documentation

Line break modes.

ccResolutionType

Enumerator:
kCCResolutionUnknown 

Unknown resolution type.

kCCResolutioniPhone 

iPhone resolution type

kCCResolutioniPhoneRetinaDisplay 

iPhone RetinaDisplay resolution type

kCCResolutioniPhone5 

iPhone5 resolution type

kCCResolutioniPhone5RetinaDisplay 

iPhone 5 RetinaDisplay resolution type

kCCResolutioniPad 

iPad resolution type

kCCResolutioniPadRetinaDisplay 

iPad Retina Display resolution type

Horizontal text alignment type.

Vertical text alignment type.


Function Documentation

static ccColor3B ccc3 ( const GLubyte  r,
const GLubyte  g,
const GLubyte  b 
) [inline, static]

helper macro that creates an ccColor3B type

static ccColor4B ccc4 ( const GLubyte  r,
const GLubyte  g,
const GLubyte  b,
const GLubyte  o 
) [inline, static]

helper macro that creates an ccColor4B type

static ccColor4F ccc4f ( const GLfloat  r,
const GLfloat  g,
const GLfloat  b,
const GLfloat  a 
) [inline, static]

helper that creates a ccColor4f type

static BOOL ccc4FEqual ( ccColor4F  a,
ccColor4F  b 
) [inline, static]

returns YES if both ccColor4F are equal. Otherwise it returns NO.

Since:
v0.99.1
static ccColor4F ccc4FFromccc3B ( ccColor3B  c) [inline, static]

Returns a ccColor4F from a ccColor3B. Alpha will be 1.

Since:
v0.99.1
static ccColor4F ccc4FFromccc4B ( ccColor4B  c) [inline, static]

Returns a ccColor4F from a ccColor4B.

Since:
v0.99.1

Variable Documentation

const ccColor3B ccBLACK = {0,0,0} [static]

Black Color (0,0,0)

const ccColor3B ccBLUE = {0,0,255} [static]

Blue color (0,0,255)

const ccColor3B ccGRAY = {166,166,166} [static]

Gray Color (166,166,166)

const ccColor3B ccGREEN = {0,255,0} [static]

Green Color (0,255,0)

const ccColor3B ccMAGENTA = {255,0,255} [static]

Magenta Color (255,0,255)

const ccColor3B ccORANGE = {255,127,0} [static]

Orange Color (255,127,0)

const ccColor3B ccRED = {255,0,0} [static]

Red Color (255,0,0,)

const ccColor3B ccWHITE = {255,255,255} [static]

White color (255,255,255)

const ccColor3B ccYELLOW = {255,255,0} [static]

Yellow color (255,255,0)