code:
//
// Prefix header for all source files of the 'LuaProjectTemplate' target in the 'LuaProjectTemplate' project
//

#ifdef __OBJC__
	#import <Foundation/Foundation.h>
	#import <UIKit/UIKit.h>
#endif

license: mit


code:
/****************************************************************************
 Copyright (c) 2010-2011 cocos2d-x.org
 Copyright (c) 2010      Ricardo Quesada

 http://www.cocos2d-x.org

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 ****************************************************************************/

#import <UIKit/UIKit.h>

@interface RootViewController : UIViewController {

}

@end


code:
/****************************************************************************
 Copyright (c) 2010-2011 cocos2d-x.org
 Copyright (c) 2010      Ricardo Quesada

 http://www.cocos2d-x.org

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 ****************************************************************************/

#import "RootViewController.h"

@implementation RootViewController

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/

/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}

*/
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	return UIInterfaceOrientationIsLandscape( interfaceOrientation );
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)dealloc {
    [super dealloc];
}

@end


code:
//
//  main.m
//  LuaProjectTemplate
//
//  Created by Walzer on 11-6-15.
//  Copyright __MyCompanyName__ 2011. All rights reserved.
//

#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {
	NSAutoreleasePool *pool = [NSAutoreleasePool new];
	int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
	[pool release];
	return retVal;
}


code:
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9.00"
	Name="LuaProjectTemplate"
	ProjectGUID="{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
	RootNamespace="LuaProjectTemplate.win32"
	TargetFrameworkVersion="196613"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName).win32"
			IntermediateDirectory="$(ConfigurationName).win32"
			ConfigurationType="1"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="_DEBUG"
				MkTypLibCompatible="false"
				TargetEnvironment="1"
				GenerateStublessProxies="true"
				TypeLibraryName="$(IntDir)/LuaProjectTemplate.tlb"
				HeaderFileName="LuaProjectTemplate.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="LuaProjectTemplate_i.c"
				ProxyFileName="LuaProjectTemplate_p.c"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\Classes;"$(SolutionDir)\lua\cocos2dx_support";"$(SolutionDir)\lua\CocosDenshion_support";"$(SolutionDir)\lua\lua";"$(SolutionDir)\lua\tolua";"$(SolutionDir)\lua\src";.;"$(SolutionDir)\cocos2dx";"$(SolutionDir)\cocos2dx\include";"$(SolutionDir)\cocos2dx\platform";"$(SolutionDir)\cocos2dx\platform\third_party\win32\OGLES";"$(SolutionDir)\CocosDenshion\Include""
				PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="4"
				DisableSpecificWarnings="4251"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG"
				Culture="1033"
				AdditionalIncludeDirectories="$(IntDir)"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="libcocos2d.lib libCocosDenshion.lib libgles_cm.lib liblua.lib"
				LinkIncremental="2"
				AdditionalLibraryDirectories="$(OutDir)"
				GenerateDebugInformation="true"
				SubSystem="2"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName).win32"
			IntermediateDirectory="$(ConfigurationName).win32"
			ConfigurationType="1"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="NDEBUG"
				MkTypLibCompatible="false"
				TargetEnvironment="1"
				GenerateStublessProxies="true"
				TypeLibraryName="$(IntDir)/LuaProjectTemplate.tlb"
				HeaderFileName="LuaProjectTemplate.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="LuaProjectTemplate_i.c"
				ProxyFileName="LuaProjectTemplate_p.c"
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalIncludeDirectories="..\Classes;"$(SolutionDir)lua\cocos2dx_support";".$(SolutionDir)\lua\CocosDenshion_support";"$(SolutionDir)lua\tolua";"$(SolutionDir)lua\lua";"$(SolutionDir)cocos2dx";"$(SolutionDir)cocos2dx\include";"$(SolutionDir)cocos2dx\platform";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";"$(SolutionDir)CocosDenshion\Include""
				PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;NDEBUG"
				ExceptionHandling="0"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="0"
				DisableSpecificWarnings="4251"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="NDEBUG"
				Culture="1033"
				AdditionalIncludeDirectories="$(IntDir)"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="libcocos2d.lib libCocosDenshion.lib libgles_cm.lib liblua.lib"
				LinkIncremental="1"
				AdditionalLibraryDirectories="$(OutDir)"
				SubSystem="2"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Classes"
			>
			<File
				RelativePath="..\Classes\AppDelegate.cpp"
				>
			</File>
			<File
				RelativePath="..\Classes\AppDelegate.h"
				>
			</File>
			<Filter
				Name="cocos2dx_support"
				>
				<File
					RelativePath="..\..\lua\cocos2dx_support\LuaCocos2d.cpp"
					>
				</File>
				<File
					RelativePath="..\..\lua\cocos2dx_support\LuaCocos2d.h"
					>
				</File>
				<File
					RelativePath="..\..\lua\cocos2dx_support\LuaEngine.cpp"
					>
				</File>
				<File
					RelativePath="..\..\lua\cocos2dx_support\LuaEngine.h"
					>
				</File>
				<File
					RelativePath="..\..\lua\cocos2dx_support\LuaEngineImpl.cpp"
					>
				</File>
				<File
					RelativePath="..\..\lua\cocos2dx_support\LuaEngineImpl.h"
					>
				</File>
			</Filter>
			<Filter
				Name="CocosDenshion_support"
				>
				<File
					RelativePath="..\..\lua\CocosDenshion_support\LuaSimpleAudioEngine.cpp"
					>
				</File>
				<File
					RelativePath="..\..\lua\CocosDenshion_support\LuaSimpleAudioEngine.h"
					>
				</File>
			</Filter>
		</Filter>
		<Filter
			Name="win32"
			>
			<File
				RelativePath=".\main.cpp"
				>
			</File>
			<File
				RelativePath=".\main.h"
				>
			</File>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>


code:
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioUserFile
	ProjectType="Visual C++"
	Version="9.00"
	ShowAllFiles="false"
	>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			>
			<DebugSettings
				WorkingDirectory="$(ProjectDir)..\Resource\"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			>
			<DebugSettings
				WorkingDirectory="$(ProjectDir)..\Resource\"
			/>
		</Configuration>
    </Configurations>
</VisualStudioUserFile>


code:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectName>LuaProjectTemplate</ProjectName>
    <ProjectGuid>{13E55395-94A2-4CD9-BFC2-1A051F80C17D}</ProjectGuid>
    <RootNamespace>LuaProjectTemplate.win32</RootNamespace>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir>
    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration).win32\</IntDir>
    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir>
    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration).win32\</IntDir>
    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Midl>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <TargetEnvironment>Win32</TargetEnvironment>
      <GenerateStublessProxies>true</GenerateStublessProxies>
      <TypeLibraryName>$(IntDir)LuaProjectTemplate.tlb</TypeLibraryName>
      <HeaderFileName>LuaProjectTemplate.h</HeaderFileName>
      <DllDataFileName>
      </DllDataFileName>
      <InterfaceIdentifierFileName>LuaProjectTemplate_i.c</InterfaceIdentifierFileName>
      <ProxyFileName>LuaProjectTemplate_p.c</ProxyFileName>
    </Midl>
    <ClCompile>
      <Optimization>Disabled</Optimization>
      <AdditionalIncludeDirectories>..\Classes;$(SolutionDir)\lua\cocos2dx_support;$(SolutionDir)\lua\CocosDenshion_support;$(SolutionDir)\lua\lua;$(SolutionDir)\lua\tolua;.;$(SolutionDir)\cocos2dx;$(SolutionDir)\cocos2dx\include;$(SolutionDir)\cocos2dx\platform;$(SolutionDir)\cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)\CocosDenshion\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1;ENABLE_LUA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <MinimalRebuild>true</MinimalRebuild>
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <Culture>0x0409</Culture>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
      <AdditionalDependencies>libcocos2d.lib;libCocosDenshion.lib;libgles_cm.lib;liblua.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <SubSystem>Windows</SubSystem>
      <TargetMachine>MachineX86</TargetMachine>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Midl>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <TargetEnvironment>Win32</TargetEnvironment>
      <GenerateStublessProxies>true</GenerateStublessProxies>
      <TypeLibraryName>$(IntDir)LuaProjectTemplate.tlb</TypeLibraryName>
      <HeaderFileName>LuaProjectTemplate.h</HeaderFileName>
      <DllDataFileName>
      </DllDataFileName>
      <InterfaceIdentifierFileName>LuaProjectTemplate_i.c</InterfaceIdentifierFileName>
      <ProxyFileName>LuaProjectTemplate_p.c</ProxyFileName>
    </Midl>
    <ClCompile>
      <AdditionalIncludeDirectories>..\Classes;$(SolutionDir)\lua\cocos2dx_support;$(SolutionDir)\lua\CocosDenshion_support;$(SolutionDir)\lua\lua;$(SolutionDir)\lua\tolua;$(SolutionDir)\lua\src;.;$(SolutionDir)\cocos2dx;$(SolutionDir)\cocos2dx\include;$(SolutionDir)\cocos2dx\platform;$(SolutionDir)\cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)\CocosDenshion\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WIN32;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ExceptionHandling>
      </ExceptionHandling>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>
      </DebugInformationFormat>
      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <Culture>0x0409</Culture>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
      <AdditionalDependencies>libcocos2d.lib;libCocosDenshion.lib;libgles_cm.lib;liblua.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <SubSystem>Windows</SubSystem>
      <TargetMachine>MachineX86</TargetMachine>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="..\..\lua\cocos2dx_support\LuaCocos2d.cpp" />
    <ClCompile Include="..\..\lua\cocos2dx_support\LuaEngine.cpp" />
    <ClCompile Include="..\..\lua\cocos2dx_support\LuaEngineImpl.cpp" />
    <ClCompile Include="..\..\lua\CocosDenshion_support\LuaSimpleAudioEngine.cpp" />
    <ClCompile Include="..\Classes\AppDelegate.cpp" />
    <ClCompile Include="main.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\lua\cocos2dx_support\LuaCocos2d.h" />
    <ClInclude Include="..\..\lua\cocos2dx_support\LuaEngine.h" />
    <ClInclude Include="..\..\lua\cocos2dx_support\LuaEngineImpl.h" />
    <ClInclude Include="..\..\lua\CocosDenshion_support\LuaSimpleAudioEngine.h" />
    <ClInclude Include="..\Classes\AppDelegate.h" />
    <ClInclude Include="main.h" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\cocos2dx\proj.win32\cocos2d-win32.vcxproj">
      <Project>{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}</Project>
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
    </ProjectReference>
    <ProjectReference Include="..\..\lua\proj.win32\liblua.vcxproj">
      <Project>{ddc3e27f-004d-4dd4-9dd3-931a013d2159}</Project>
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>


code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="Classes">
      <UniqueIdentifier>{888ac7ef-491a-4b16-aa9a-69b45241d15b}</UniqueIdentifier>
    </Filter>
    <Filter Include="win32">
      <UniqueIdentifier>{ce400533-5bf6-41a7-8d1a-59e2de196b8e}</UniqueIdentifier>
    </Filter>
    <Filter Include="Classes\cocos2dx_support">
      <UniqueIdentifier>{0421f3bc-da65-4d23-900a-f62683dfa470}</UniqueIdentifier>
    </Filter>
    <Filter Include="Classes\CocosDenshion_support">
      <UniqueIdentifier>{15664904-70f4-43bb-aa33-ba131ee365b6}</UniqueIdentifier>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\Classes\AppDelegate.cpp">
      <Filter>Classes</Filter>
    </ClCompile>
    <ClCompile Include="main.cpp">
      <Filter>win32</Filter>
    </ClCompile>
    <ClCompile Include="..\..\lua\cocos2dx_support\LuaCocos2d.cpp">
      <Filter>Classes\cocos2dx_support</Filter>
    </ClCompile>
    <ClCompile Include="..\..\lua\cocos2dx_support\LuaEngine.cpp">
      <Filter>Classes\cocos2dx_support</Filter>
    </ClCompile>
    <ClCompile Include="..\..\lua\cocos2dx_support\LuaEngineImpl.cpp">
      <Filter>Classes\cocos2dx_support</Filter>
    </ClCompile>
    <ClCompile Include="..\..\lua\CocosDenshion_support\LuaSimpleAudioEngine.cpp">
      <Filter>Classes\CocosDenshion_support</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\Classes\AppDelegate.h">
      <Filter>Classes</Filter>
    </ClInclude>
    <ClInclude Include="main.h">
      <Filter>win32</Filter>
    </ClInclude>
    <ClInclude Include="..\..\lua\cocos2dx_support\LuaCocos2d.h">
      <Filter>Classes\cocos2dx_support</Filter>
    </ClInclude>
    <ClInclude Include="..\..\lua\cocos2dx_support\LuaEngine.h">
      <Filter>Classes\cocos2dx_support</Filter>
    </ClInclude>
    <ClInclude Include="..\..\lua\cocos2dx_support\LuaEngineImpl.h">
      <Filter>Classes\cocos2dx_support</Filter>
    </ClInclude>
    <ClInclude Include="..\..\lua\CocosDenshion_support\LuaSimpleAudioEngine.h">
      <Filter>Classes\CocosDenshion_support</Filter>
    </ClInclude>
  </ItemGroup>
</Project>


code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LocalDebuggerWorkingDirectory>$(ProjectDir)..\Resource\</LocalDebuggerWorkingDirectory>
    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LocalDebuggerWorkingDirectory>$(ProjectDir)..\Resource\</LocalDebuggerWorkingDirectory>
    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
  </PropertyGroup>
</Project>


code:
#include "main.h"

#include "AppDelegate.h"

int APIENTRY _tWinMain(HINSTANCE hInstance,
					   HINSTANCE hPrevInstance,
					   LPTSTR    lpCmdLine,
					   int       nCmdShow)
{
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);

    // create the application instance
	AppDelegate app;

    return cocos2d::CCApplication::sharedApplication().run();
}


code:
#ifndef __MAIN_H__
#define __MAIN_H__

#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers

// Windows Header Files:
#include <windows.h>
#include <tchar.h>

// C RunTime Header Files
#include "CCStdC.h"

#endif	// __MAIN_H__


code:
class CCAction : public CCObject
{
    CCNode* getTarget(void);
    int getTag(void);
    void setTag(int nTag);
};

class CCFiniteTimeAction : public CCAction
{
    ccTime getDuration(void);
    void setDuration(ccTime duration);
};

class CCSpeed : public CCAction
{
    float getSpeed(void);
    void setSpeed(float fSpeed);
    static CCSpeed* actionWithAction(CCActionInterval* pAction, float fRate);
};

class CCFollow : public CCAction
{
    bool isBoundarySet(void);
    void setBoudarySet(bool bValue);
    static CCFollow* actionWithTarget(CCNode *pFollowedNode);
    static CCFollow* actionWithTarget(CCNode *pFollowedNode, CCRect rect);
};


code:
class CCActionCamera : public CCActionInterval
{
    CCActionInterval* reverse();
};

class CCOrbitCamera : public CCActionCamera
{
    static CCOrbitCamera * actionWithDuration(float t, float radius,
                                              float deltaRadius, float angleZ,
                                              float deltaAngleZ, float angleX,
                                              float deltaAngleX);
};


code:
class CCActionEase : public CCActionInterval
{
    static CCActionEase* actionWithAction(CCActionInterval *pAction);
};

class CCEaseRateAction : public CCActionEase
{
    void setRate(float rate);
    float getRate(void);
    static CCEaseRateAction* actionWithAction(CCActionInterval* pAction, float fRate);
};

class CCEaseIn : public CCEaseRateAction
{
    static CCEaseIn* actionWithAction(CCActionInterval* pAction, float fRate);
};

class CCEaseOut : public CCEaseRateAction
{
    static CCEaseOut* actionWithAction(CCActionInterval* pAction, float fRate);
};

class CCEaseInOut : public CCEaseRateAction
{
    static CCEaseInOut* actionWithAction(CCActionInterval* pAction, float fRate);
};

class CCEaseExponentialIn : public CCActionEase
{
    static CCEaseExponentialIn* actionWithAction(CCActionInterval* pAction);
};

class CCEaseExponentialOut : public CCActionEase
{
    static CCEaseExponentialOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseExponentialInOut : public CCActionEase
{
    static CCEaseExponentialInOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseSineIn : public CCActionEase
{
    static CCEaseSineIn* actionWithAction(CCActionInterval* pAction);
};

class CCEaseSineOut : public CCActionEase
{
    static CCEaseSineOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseSineInOut : public CCActionEase
{
    static CCEaseSineInOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseElastic : public CCActionEase
{
    float getPeriod(void);
    void setPeriod(float fPeriod);
    static CCEaseElastic* actionWithAction(CCActionInterval *pAction);
    static CCEaseElastic* actionWithAction(CCActionInterval *pAction, float fPeriod);
};

class CCEaseElasticIn : public CCEaseElastic
{
    static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction);
    static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction, float fPeriod);
};

class CCEaseElasticOut : public CCEaseElastic
{
    static CCEaseElasticOut* actionWithAction(CCActionInterval *pAction);
    static CCEaseElasticOut* actionWithAction(CCActionInterval *pAction, float fPeriod);
};

class CCEaseElasticInOut : public CCEaseElastic
{
    static CCEaseElasticInOut* actionWithAction(CCActionInterval *pAction);
    static CCEaseElasticInOut* actionWithAction(CCActionInterval *pAction, float fPeriod);
};

class CCEaseBounce : public CCActionEase
{
    ccTime bounceTime(ccTime time);
    static CCEaseBounce* actionWithAction(CCActionInterval* pAction);
};

class CCEaseBounceIn : public CCEaseBounce
{
    static CCEaseBounceIn* actionWithAction(CCActionInterval* pAction);
};

class CCEaseBounceOut : public CCEaseBounce
{
    static CCEaseBounceOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseBounceInOut : public CCEaseBounce
{
    static CCEaseBounceInOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseBackIn : public CCActionEase
{
    static CCEaseBackIn* actionWithAction(CCActionInterval* pAction);
};

class CCEaseBackOut : public CCActionEase
{
    static CCEaseBackOut* actionWithAction(CCActionInterval* pAction);
};

class CCEaseBackInOut : public CCActionEase
{
    static CCEaseBackInOut* actionWithAction(CCActionInterval* pAction);
};


code:
class CCGridAction : public CCActionInterval
{
    // virtual CCGridBase* getGrid(void);
    static CCGridAction* actionWithSize(ccGridSize gridSize, ccTime duration);
};

class CCGrid3DAction : public CCGridAction
{
    // virtual CCGridBase* getGrid(void);
    // ccVertex3F vertex(ccGridSize pos);
    // ccVertex3F originalVertex(ccGridSize pos);
    // void setVertex(ccGridSize pos, ccVertex3F vertex);
};

class CCTiledGrid3DAction : public CCGridAction
{
    // ccQuad3 tile(ccGridSize pos);
    // ccQuad3 originalTile(ccGridSize pos);
    // void setTile(ccGridSize pos, ccQuad3 coords);
    // virtual CCGridBase* getGrid(void);
    // static CCTiledGrid3DAction* actionWithSize( ccGridSize gridSize, ccTime duration);
};

class CCAccelDeccelAmplitude : public CCActionInterval
{
    // inline float getRate(void);
    // inline void setRate(float fRate);
    static CCAccelDeccelAmplitude* actionWithAction(CCAction *pAction, ccTime duration);
};

class CCAccelAmplitude : public CCActionInterval
{
    // inline float getRate(void);
    // inline void setRate(float fRate);
    static CCAccelAmplitude* actionWithAction(CCAction *pAction, ccTime duration);
};

class CCDeccelAmplitude : public CCActionInterval
{
    // inline float getRate(void);
    // inline void setRate(float fRate);
    static CCDeccelAmplitude* actionWithAction(CCAction *pAction, ccTime duration);
};

class CCStopGrid : public CCActionInstant
{
    static CCStopGrid* action(void);
};

class CCReuseGrid : public CCActionInstant
{
    static CCReuseGrid* actionWithTimes(int times);
};


code:
class CCWaves3D : public CCGrid3DAction
{
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCWaves3D* actionWithWaves(int wav, float amp, ccGridSize gridSize, ccTime duration);
};

class CCFlipX3D : public CCGrid3DAction
{
    static CCFlipX3D* actionWithDuration(ccTime duration);
};

class CCFlipY3D : public CCFlipX3D
{
    static CCFlipY3D* actionWithDuration(ccTime duration);
};

class CCLens3D : public CCGrid3DAction
{
    float getLensEffect(void);
    void setLensEffect(float fLensEffect);
    CCPoint getPosition(void);
    void setPosition(CCPoint position);
    static CCLens3D* actionWithPosition(CCPoint pos, float r, ccGridSize gridSize, ccTime duration);
};

class CCRipple3D : public CCGrid3DAction
{
    CCPoint getPosition(void);
    void setPosition(CCPoint position);
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCRipple3D* actionWithPosition(CCPoint pos, float r, int wav, float amp,
        ccGridSize gridSize, ccTime duration);
};

class CCShaky3D : public CCGrid3DAction
{
    static CCShaky3D* actionWithRange(int range, bool shakeZ, ccGridSize gridSize, ccTime duration);
};

class CCLiquid : public CCGrid3DAction
{
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCLiquid* actionWithWaves(int wav, float amp, ccGridSize gridSize, ccTime duration);
};

class CCWaves : public CCGrid3DAction
{
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCWaves* actionWithWaves(int wav, float amp, bool h, bool v, ccGridSize gridSize,
        ccTime duration);
};

class CCTwirl : public CCGrid3DAction
{
    CCPoint getPosition(void);
    void setPosition(CCPoint position);
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCTwirl* actionWithPosition(CCPoint pos, int t, float amp, ccGridSize gridSize,
        ccTime duration);
};


code:
class CCActionInstant : public CCFiniteTimeAction
{
};

class CCShow : public CCActionInstant
{
    static CCShow * action();
};

class CCHide : public CCActionInstant
{
    static CCHide * action();
};

class CCToggleVisibility : public CCActionInstant
{
    static CCToggleVisibility * action();
};

class CCFlipX : public CCActionInstant
{
    static CCFlipX * actionWithFlipX(bool x);
};

class CCFlipY : public CCActionInstant
{
    static CCFlipY * actionWithFlipY(bool y);
};

class CCPlace : public CCActionInstant
{
    static CCPlace * actionWithPosition(CCPoint pos);
};


code:
class CCActionInterval : public CCFiniteTimeAction
{
};

class CCSequence : public CCActionInterval
{
    static CCSequence* actionsWithArrayLua(CCArray *actions);
    static CCSequence* actionOneTwo(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
};

class CCRepeat : public CCActionInterval
{
    static CCRepeat* actionWithAction(CCFiniteTimeAction *pAction, unsigned int times);
};

class CCRepeatForever : public CCActionInterval
{
    static CCRepeatForever* actionWithAction(CCActionInterval *pAction);
};

class CCSpawn : public CCActionInterval
{
    static CCSpawn* actionsWithArrayLua(CCArray *actions);
    static CCSpawn* actionOneTwo(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
};

class CCRotateTo : public CCActionInterval
{
    static CCRotateTo* actionWithDuration(ccTime duration, float fDeltaAngle);
};

class CCRotateBy : public CCActionInterval
{
    static CCRotateBy* actionWithDuration(ccTime duration, float fDeltaAngle);
};

class CCMoveTo : public CCActionInterval
{
    static CCMoveTo* actionWithDuration(ccTime duration, CCPoint position);
};

class CCMoveBy : public CCMoveTo
{
    static CCMoveBy* actionWithDuration(ccTime duration, CCPoint position);
};

class CCSkewTo : public CCActionInterval
{
    static CCSkewTo* actionWithDuration(ccTime t, float sx, float sy);
};

class CCSkewBy : public CCSkewTo
{
    static CCSkewBy* actionWithDuration(ccTime t, float deltaSkewX, float deltaSkewY);
};

class CCJumpBy : public CCActionInterval
{
    static CCJumpBy* actionWithDuration(ccTime duration, CCPoint position, ccTime height, unsigned int jumps);
};

class CCJumpTo : public CCJumpBy
{
    static CCJumpTo* actionWithDuration(ccTime duration, CCPoint position, ccTime height, int jumps);
};

typedef struct _ccBezierConfig {
    CCPoint endPosition;
    CCPoint controlPoint_1;
    CCPoint controlPoint_2;
} ccBezierConfig;

class CCBezierBy : public CCActionInterval
{
    static CCBezierBy* actionWithDuration(ccTime t, ccBezierConfig c);
};

class CCBezierTo : public CCBezierBy
{
    static CCBezierTo* actionWithDuration(ccTime t, ccBezierConfig c);
};

class CCScaleTo : public CCActionInterval
{
    static CCScaleTo* actionWithDuration(ccTime duration, float s);
    static CCScaleTo* actionWithDuration(ccTime duration, float sx, float sy);
};

class CCScaleBy : public CCScaleTo
{
    static CCScaleBy* actionWithDuration(ccTime duration, float s);
    static CCScaleBy* actionWithDuration(ccTime duration, float sx, float sy);
};

class CCBlink : public CCActionInterval
{
    static CCBlink* actionWithDuration(ccTime duration, unsigned int uBlinks);
};

class CCFadeIn : public CCActionInterval
{
    static CCFadeIn* actionWithDuration(ccTime d);
};

class CCFadeOut : public CCActionInterval
{
    static CCFadeOut* actionWithDuration(ccTime d);
};

class CCFadeTo : public CCActionInterval
{
    static CCFadeTo* actionWithDuration(ccTime duration, GLubyte opacity);
};

class CCTintTo : public CCActionInterval
{
    static CCTintTo* actionWithDuration(ccTime duration, GLubyte red, GLubyte green, GLubyte blue);
};

class CCTintBy : public CCActionInterval
{
    static CCTintBy* actionWithDuration(ccTime duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
};

class CCDelayTime : public CCActionInterval
{
    static CCDelayTime* actionWithDuration(ccTime d);
};

class CCReverseTime : public CCActionInterval
{
    static CCReverseTime* actionWithAction(CCFiniteTimeAction *pAction);
};

class CCAnimate : public CCActionInterval
{
    CCAnimation* getAnimation(void);
    void setAnimation(CCAnimation *pAnimation);
    static CCAnimate* actionWithAnimation(CCAnimation *pAnimation);
    static CCAnimate* actionWithAnimation(CCAnimation *pAnimation, bool bRestoreOriginalFrame);
    static CCAnimate* actionWithDuration(ccTime duration, CCAnimation *pAnimation, bool bRestoreOriginalFrame);
};


code:
class CCActionManager : public CCObject
{
    void addAction(CCAction *pAction, CCNode *pTarget, bool paused);
    void removeAllActions(void);
    void removeAllActionsFromTarget(CCObject *pTarget);
    void removeAction(CCAction *pAction);
    void removeActionByTag(unsigned int tag, CCObject *pTarget);
    CCAction* getActionByTag(unsigned int tag, CCObject *pTarget);
    unsigned int numberOfRunningActionsInTarget(CCObject *pTarget);
    void pauseTarget(CCObject *pTarget);
    void resumeTarget(CCObject *pTarget);
    static CCActionManager* sharedManager(void);
};


code:
class CCPageTurn3D : public CCGrid3DAction
{
    static CCPageTurn3D* actionWithSize(ccGridSize gridSize, ccTime time);
};


code:
class CCProgressTo : public CCActionInterval
{
    static CCProgressTo* actionWithDuration(ccTime duration, float fPercent);
};

class CCProgressFromTo : public CCActionInterval
{
    static CCProgressFromTo* actionWithDuration(ccTime duration, float fFromPercentage, float fToPercentage);
};


code:
class CCShakyTiles3D : public CCTiledGrid3DAction
{
    static CCShakyTiles3D* actionWithRange(int nRange, bool bShakeZ, ccGridSize gridSize,
        ccTime duration);
};

class CCShatteredTiles3D : public CCTiledGrid3DAction
{
    static CCShatteredTiles3D* actionWithRange(int nRange, bool bShatterZ, ccGridSize gridSize,
        ccTime duration);
};

class CCShuffleTiles : public CCTiledGrid3DAction
{
    void shuffle(int *pArray, unsigned int nLen);
    ccGridSize getDelta(ccGridSize pos);
    void placeTile(ccGridSize pos, Tile *t);
    static CCShuffleTiles* actionWithSeed(int s, ccGridSize gridSize, ccTime duration);
};

class CCFadeOutTRTiles : public CCTiledGrid3DAction
{
    void turnOnTile(ccGridSize pos);
    void turnOffTile(ccGridSize pos);
    static CCFadeOutTRTiles* actionWithSize(ccGridSize gridSize, ccTime time);
};

class CCFadeOutBLTiles : public CCFadeOutTRTiles
{
    static CCFadeOutBLTiles* actionWithSize(ccGridSize gridSize, ccTime time);
};

class CCFadeOutUpTiles : public CCFadeOutTRTiles
{
    static CCFadeOutUpTiles* actionWithSize(ccGridSize gridSize, ccTime time);
};

class CCFadeOutDownTiles : public CCFadeOutUpTiles
{
    static CCFadeOutDownTiles* actionWithSize(ccGridSize gridSize, ccTime time);
};

class CCTurnOffTiles : public CCTiledGrid3DAction
{
    void shuffle(int *pArray, unsigned int nLen);
    void turnOnTile(ccGridSize pos);
    void turnOffTile(ccGridSize pos);
    static CCTurnOffTiles* actionWithSize(ccGridSize size, ccTime d);
    static CCTurnOffTiles* actionWithSeed(int s, ccGridSize gridSize, ccTime duration);
};

class CCWavesTiles3D : public CCTiledGrid3DAction
{
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCWavesTiles3D* actionWithWaves(int wav, float amp, ccGridSize gridSize, ccTime duration);
};

class CCJumpTiles3D : public CCTiledGrid3DAction
{
    float getAmplitude(void);
    void setAmplitude(float fAmplitude);
    float getAmplitudeRate(void);
    void setAmplitudeRate(float fAmplitudeRate);
    static CCJumpTiles3D* actionWithJumps(int j, float amp, ccGridSize gridSize, ccTime duration);
};

class CCSplitRows : public CCTiledGrid3DAction
{
    static CCSplitRows* actionWithRows(int nRows, ccTime duration);
};

class CCSplitCols : public CCTiledGrid3DAction
{
    static CCSplitCols* actionWithCols(int nCols, ccTime duration);
};


code:
struct CCAffineTransform {
    CGFloat a, b, c, d;
    CGFloat tx, ty;
};

CCAffineTransform __CCAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty);
CCAffineTransform CCAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty);

CCPoint __CCPointApplyAffineTransform(CCPoint point, CCAffineTransform t);
CCPoint CCPointApplyAffineTransform(CCPoint point, CCAffineTransform t);

CCSize CCSizeApplyAffineTransform(CCSize size, CCAffineTransform t);
CCSize __CCSizeApplyAffineTransform(CCSize size, CCAffineTransform t);

CCAffineTransform CCAffineTransformMakeIdentity();
CCRect CCRectApplyAffineTransform(CCRect rect, CCAffineTransform anAffineTransform);

CCAffineTransform CCAffineTransformTranslate(CCAffineTransform t, float tx, float ty);
CCAffineTransform CCAffineTransformRotate(CCAffineTransform aTransform, CGFloat anAngle);
CCAffineTransform CCAffineTransformScale(CCAffineTransform t, CGFloat sx, CGFloat sy);
CCAffineTransform CCAffineTransformConcat(CCAffineTransform t1,CCAffineTransform t2);
bool CCAffineTransformEqualToTransform(CCAffineTransform t1,CCAffineTransform t2);
CCAffineTransform CCAffineTransformInvert(CCAffineTransform t);


code:
class CCAnimation : public CCObject
{
    char* getName(void);
    void setName(char *pszName);

    float getDelay(void);
    void setDelay(float fDelay);

    void addFrame(CCSpriteFrame *pFrame);
    void addFrameWithFileName(char *pszFileName);
    void addFrameWithTexture(CCTexture2D* pobTexture, CCRect rect);

    static CCAnimation* animation(void);
    static CCAnimation* animationWithFrames(CCMutableArray<CCSpriteFrame*> *frames);
    static CCAnimation* animationWithFrames(CCMutableArray<CCSpriteFrame*> *frames, float delay);
};


code:
class CCAnimationCache : public CCObject
{
    void addAnimation(CCAnimation* animation, char * name);
    void removeAnimationByName(char* name);
    CCAnimation* animationByName(char* name);

    static CCAnimationCache* sharedAnimationCache(void);
    static void purgeSharedAnimationCache(void);
};


code:
typedef enum LanguageType
{
    kLanguageEnglish = 0,
    kLanguageChinese,
    kLanguageFrench,
    kLanguageItalian,
    kLanguageGerman,
    kLanguageSpanish,
    kLanguageRussian
} ccLanguageType;

class CCApplication
{
    static ccLanguageType getCurrentLanguage();
};


code:
class CCArray : public CCObject
{
    unsigned int count();
    unsigned int capacity();

    unsigned int indexOfObject(CCObject* object);
    CCObject* objectAtIndex(unsigned int index);
    CCObject* lastObject();
    CCObject* randomObject();

    bool containsObject(CCObject* object);

    void addObject(CCObject* object);
    void addObjectsFromArray(CCArray* otherArray);
    void insertObject(CCObject* object, unsigned int index);

    void removeLastObject();
    void removeObject(CCObject* object);
    void removeObjectAtIndex(unsigned int index);
    void removeObjectsInArray(CCArray* otherArray);
    void removeAllObjects();
    void fastRemoveObject(CCObject* object);
    void fastRemoveObjectAtIndex(unsigned int index);

    void exchangeObject(CCObject* object1, CCObject* object2);
    void exchangeObjectAtIndex(unsigned int index1, unsigned int index2);
    void reverseObjects();
    void reduceMemoryFootprint();

    static CCArray* array();
    static CCArray* arrayWithCapacity(unsigned int capacity);
    static CCArray* arrayWithArray(CCArray* otherArray);
};


code:
class CCAtlasNode : public CCNode
{
    static CCAtlasNode * atlasWithTileFile(char* tile,unsigned int tileWidth,
                                           unsigned int tileHeight, unsigned int itemsToRender);
    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D *texture);
};


code:
class CCCamera : public CCObject
{
    void setDirty(bool bValue);
    bool getDirty(void);

    void restore(void);
    void locate(void);
    void setEyeXYZ(float fEyeX, float fEyeY, float fEyeZ);
    void setCenterXYZ(float fCenterX, float fCenterY, float fCenterZ);
    void setUpXYZ(float fUpX, float fUpY, float fUpZ);
    void getEyeXYZ(float *pEyeX, float *pEyeY, float *pEyeZ);
    void getCenterXYZ(float *pCenterX, float *pCenterY, float *pCenterZ);
    void getUpXYZ(float *pUpX, float *pUpY, float *pUpZ);
    static float getZEye();
};


code:
void CCLuaLog(char * pszFormat);
void CCMessageBox(char * pszMsg, char * pszTitle);


code:
enum {
    kCCiOSVersion_3_0   = 0x03000000,
    kCCiOSVersion_3_1   = 0x03010000,
    kCCiOSVersion_3_1_1 = 0x03010100,
    kCCiOSVersion_3_1_2 = 0x03010200,
    kCCiOSVersion_3_1_3 = 0x03010300,
    kCCiOSVersion_3_2   = 0x03020000,
    kCCiOSVersion_3_2_1 = 0x03020100,
    kCCiOSVersion_4_0   = 0x04000000,
    kCCiOSVersion_4_0_1 = 0x04000100,
    kCCiOSVersion_4_1   = 0x04010000,
    kCCiOSVersion_4_2   = 0x04020000,
    kCCiOSVersion_4_3   = 0x04030000,
    kCCiOSVersion_4_3_1 = 0x04030100,
    kCCiOSVersion_4_3_2 = 0x04030200,
    kCCiOSVersion_4_3_3 = 0x04030300,
};

typedef enum
{
    GLES_VER_INVALID,
    GLES_VER_1_0,
    GLES_VER_1_1,
    GLES_VER_2_0,
} CCGlesVersion;

class CCConfiguration : public CCObject
{
    CCGlesVersion getGlesVersion();
    int getMaxTextureSize(void);
    int getMaxModelviewStackDepth(void);
    bool isSupportsNPOT(void);
    bool isSupportsPVRTC(void);
    bool isSupportsBGRA8888(void);
    bool isSupportsDiscardFramebuffer(void);
    unsigned int getOSVersion();
    bool checkForGLExtension(std::string &searchName);
    static CCConfiguration *sharedConfiguration(void);
};


code:
typedef enum {
    kCCDeviceOrientationPortrait = 0,
    kCCDeviceOrientationPortraitUpsideDown = 1,
    kCCDeviceOrientationLandscapeLeft = 2,
    kCCDeviceOrientationLandscapeRight = 3,
} ccDeviceOrientation;

class CCDirector : public CCObject
{
    CCScene* getRunningScene(void);
    double getAnimationInterval(void);
    void setAnimationInterval(double dValue);
    bool isDisplayFPS(void);
    void setDisplayFPS(bool bDisplayFPS);
    bool isPaused(void);
    unsigned int getFrames(void);
    bool isSendCleanupToScene(void);
    CCNode* getNotificationNode();
    void setNotificationNode(CCNode *node);
    CCSize getWinSize(void);
    CCSize getWinSizeInPixels(void);
    CCSize getDisplaySizeInPixels(void);
    CCPoint convertToGL(CCPoint obPoint);
    CCPoint convertToUI(CCPoint obPoint);
    float getZEye(void);
    void runWithScene(CCScene *pScene);
    void pushScene(CCScene *pScene);
    void popScene(void);
    void replaceScene(CCScene *pScene);
    void showProfilers(void);
    void applyOrientation(void);
    ccDeviceOrientation getDeviceOrientation(void);
    void setDeviceOrientation(ccDeviceOrientation kDeviceOrientation);
    CGFloat getContentScaleFactor(void);
    bool isRetinaDisplay();
    static CCDirector* sharedDirector(void);
};


code:
class CCFileUtils
{
    static std::string& removeSuffixFromFile(std::string& path);
    static char* fullPathFromRelativePath(char *pszRelativePath);
    static char* fullPathFromRelativeFile(char *pszFilename, char *pszRelativeFile);
    static std::string getWriteablePath();
    static void setiPhoneRetinaDisplaySuffix(const char *suffix);
    static void setiPadRetinaDisplaySuffix(const char *suffix);
    bool iPadFileExistsAtPath(const char *filename);
    bool iPadRetinaDisplayFileExistsAtPath(const char *filename);
};


code:
typedef float CGFloat;

class CCPoint
{
    float x;
    float y;
    CCPoint();
    CCPoint(float x, float y);

    static bool CCPointEqualToPoint(CCPoint point1, CCPoint point2);
};

class CCSize
{
    float width;
    float height;
    CCSize();
    CCSize(float width, float height);

    static bool CCSizeEqualToSize(CCSize size1, CCSize size2);
};

class CCRect
{
    CCPoint origin;
    CCSize  size;
    CCRect();
    CCRect(float x, float y, float width, float height);

    static CGFloat CCRectGetMinX(CCRect rect);
    static CGFloat CCRectGetMaxX(CCRect rect);
    static CGFloat CCRectGetMidX(CCRect rect);
    static CGFloat CCRectGetMinY(CCRect rect);
    static CGFloat CCRectGetMaxY(CCRect rect);
    static CGFloat CCRectGetMidY(CCRect rect);
    static bool CCRectEqualToRect(CCRect rect1, CCRect rect2);
    static bool CCRectContainsPoint(CCRect rect, CCPoint point);
    static bool CCRectIntersectsRect(CCRect rectA, CCRect rectB);
};

CCPoint CCPointMake(float x, float y);
CCSize  CCSizeMake(float width, float height);
CCRect  CCRectMake(float x, float y, float width,float height);


code:
class CCImage
{
    int getDataLen();
    bool hasAlpha();
    bool isPremultipliedAlpha();
    bool saveToFile(char *pszFilePath, bool bIsToRGB = true);

    short getWidth(void);
    short getHeight(void);
    int getBitsPerComponent(void);
};


code:
class CCLabelAtlas : public CCAtlasNode
{
    static CCLabelAtlas * labelWithString(char *label, char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned char startCharMap);
    void updateAtlasValues();
    void setString(char *label);
    char* getString(void);
};


code:
class CCLabelBMFont : public CCSpriteBatchNode
{
    GLubyte getOpacity(void);
    void setOpacity(GLubyte opacity);
    ccColor3B getColor(void);
    void setColor(ccColor3B color);
    bool getIsOpacityModifyRGB(void);
    void setIsOpacityModifyRGB(bool isOpacityModifyRGB);
    void setString(char *label);
    void setString(char *label, bool fromUpdate);
    void updateString(bool fromUpdate);
    char* getString(void);
    void setAnchorPoint(CCPoint var);
    void updateLabel();
    void setAlignment(CCTextAlignment alignment);
    void setWidth(float width);
    void setLineBreakWithoutSpace(bool breakWithoutSpace);
    static void purgeCachedData();
    static CCLabelBMFont * labelWithString(char *str, char *fntFile);
    static CCLabelBMFont * labelWithString(char *str, char *fntFile, CCTextAlignment alignment, float width);
};


code:
class CCLabelTTF : public CCSprite
{
    void setString(char *label);
    char* getString(void);

    static CCLabelTTF * labelWithString(char *label, CCSize dimensions, CCTextAlignment alignment, char *fontName, float fontSize);
    static CCLabelTTF * labelWithString(char *label, char *fontName, float fontSize);
};


code:
class CCLayer : public CCNode
{
    void setIsTouchEnabled(bool bValue);
    bool getIsTouchEnabled(void);

    void setIsAccelerometerEnabled(bool bValue);
    bool getIsAccelerometerEnabled(void);

    void setIsKeypadEnabled(bool bValue);
    bool getIsKeypadEnabled(void);

    void registerScriptTouchHandler(LUA_FUNCTION nHandler,
                                    bool bIsMultiTouches = false,
                                    int nPriority = 0,
                                    bool bSwallowsTouches = false);
    void unregisterScriptTouchHandler();

    static CCLayer*node(void);
};

class CCLayerColor : public CCLayer
{
    void changeWidth(GLfloat w);
    void changeHeight(GLfloat h);
    void changeWidthAndHeight(GLfloat w ,GLfloat h);

    void setOpacity(GLubyte opacity);
    GLubyte getOpacity(void);
    void setColor(ccColor3B color);
    ccColor3B getColor(void);
    void setBlendFunc(ccBlendFunc blendFunc);
    ccBlendFunc getBlendFunc(void);

    static CCLayerColor* layerWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
    static CCLayerColor* layerWithColor(ccColor4B color);
    static CCLayerColor* node(void);
};

class CCLayerGradient : public CCLayerColor
{
    void setStartColor(ccColor3B color);
    ccColor3B getStartColor();
    void setEndColor(ccColor3B color);
    ccColor3B getEndColor(void);
    void setStartOpacity(GLubyte opacity);
    GLubyte getStartOpacity(void);
    void setEndOpacity(GLubyte opacity);
    GLubyte getEndOpacity(void);
    void setVector(CCPoint vector);
    CCPoint getVector(void);

    void setIsCompressedInterpolation(bool Value);
    bool getIsCompressedInterpolation(void);

    static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end);
    static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end, CCPoint v);
    static CCLayerGradient* node(void);
};

class CCLayerMultiplex : public CCLayer
{
    void addLayer(CCLayer* layer);
    void switchTo(unsigned int n);
    void switchToAndReleaseMe(unsigned int n);

    static CCLayerMultiplex* layerWithLayer(CCLayer* layer);
};


code:
typedef enum
{
    kCCMenuStateWaiting,
    kCCMenuStateTrackingTouch
} tCCMenuState;

enum {
    kCCMenuTouchPriority = -128,
};

class CCMenu : public CCLayer
{
    ccColor3B getColor(void);
    void setColor(ccColor3B color);
    GLubyte getOpacity(void);
    void setOpacity(GLubyte opacity);

    void alignItemsVertically();
    void alignItemsVerticallyWithPadding(float padding);
    void alignItemsHorizontally();
    void alignItemsHorizontallyWithPadding(float padding);
    void addChild(CCNode * child, int zOrder = kCCMenuTouchPriority);
    void addChild(CCNode * child, int zOrder, int tag);
    void setIsOpacityModifyRGB(bool bValue);
    bool getIsOpacityModifyRGB(void);

    static CCMenu* node();
    static CCMenu* menuWithItem(CCMenuItem* item);
};


code:
class CCMenuItem : public CCNode
{
    bool getIsSelected(void);
    bool getIsEnabled(void);
    void setIsEnabled(bool isEnabled);

    CCRect rect();
    void activate();
    void selected();
    void unselected();
    void registerScriptHandler(LUA_FUNCTION nHandler);
    void unregisterScriptHandler(void);
};

class CCMenuItemLabel : public CCMenuItem
{
    ccColor3B getDisabledColor(void);
    void setDisabledColor(ccColor3B color);

    void setOpacity(GLubyte opacity);
    GLubyte getOpacity();
    void setColor(ccColor3B color);
    ccColor3B getColor();

    CCNode* getLabel(void);
    void setLabel(CCNode* label);

    static CCMenuItemLabel* itemWithLabel(CCNode* label);
    void setString(char* label);

    void setIsOpacityModifyRGB(bool bValue);
    bool getIsOpacityModifyRGB(void);
};

class CCMenuItemAtlasFont : public CCMenuItemLabel
{
    static CCMenuItemAtlasFont* itemFromString(char* value, char* charMapFile, int itemWidth, int itemHeight, char startCharMap);
};

class CCMenuItemFont : public CCMenuItemLabel
{
    static void setFontSize(unsigned int s);
    static unsigned int fontSize();
    static void setFontName(char* name);
    static char* fontName();
    static CCMenuItemFont* itemFromString(char* value);
    void setFontSizeObj(unsigned int s);
    unsigned int fontSizeObj();
    void setFontNameObj(char* name);
    char* fontNameObj();
};

class CCMenuItemSprite : public CCMenuItem
{
    CCNode* getNormalImage(void);
    void setNormalImage(CCNode* image);
    CCNode* getSelectedImage(void);
    void setSelectedImage(CCNode* image);
    CCNode* getDisabledImage(void);
    void setDisabledImage(CCNode* image);

    static CCMenuItemSprite* itemFromNormalSprite(CCNode* normalSprite, CCNode* selectedSprite = NULL, CCNode* disabledSprite = NULL);

    void setOpacity(GLubyte opacity);
    GLubyte getOpacity();
    void setColor(ccColor3B color);
    ccColor3B getColor();

    void setIsOpacityModifyRGB(bool bValue);
    bool getIsOpacityModifyRGB(void);
};

class CCMenuItemImage : public CCMenuItemSprite
{
    static CCMenuItemImage* itemFromNormalImage(char* normalImage, char* selectedImage = NULL, char* disabledImage = NULL);
};

class CCMenuItemToggle : public CCMenuItem
{
    void setOpacity(GLubyte opacity);
    GLubyte getOpacity();
    void setColor(ccColor3B color);
    ccColor3B getColor();

    unsigned int getSelectedIndex(void);
    void setSelectedIndex(unsigned int selectedIndex);

    static CCMenuItemToggle* itemWithItem(CCMenuItem* item);
    void addSubItem(CCMenuItem* item);

    CCMenuItem* selectedItem();

    void setIsOpacityModifyRGB(bool bValue);
    bool getIsOpacityModifyRGB(void);
};


code:
class CCMotionStreak : public CCNode
{
    CCRibbon* getRibbon(void);
    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D* texture);
    ccBlendFunc getBlendFunc(void);
    void setBlendFunc(ccBlendFunc blendFunc);

    static CCMotionStreak * streakWithFade(float fade, float seg, char *imagePath,
                                           float width, float length, ccColor4B color);
};


code:
class CCMutableArray : public CCObject
{
    TOLUA_TEMPLATE_BIND(T, CCObject*, CCSpriteFrame*, CCFiniteTimeAction*)

    CCMutableArray(unsigned int uSize = 0);

    unsigned int count(void);

    bool containsObject(T pObject);

    T getLastObject(void);
    T getObjectAtIndex(unsigned int uIndex);

    void addObject(T pObject);
    void addObjectsFromArray(CCMutableArray<T> *pArray);

    void insertObjectAtIndex(T pObject, unsigned int uIndex);
    void removeLastObject(bool bDeleteObject = true);

    void removeObject(T pObject, bool bDeleteObject = true);

    void removeObjectsInArray(CCMutableArray<T>* pDeleteArray);

    void removeObjectAtIndex(unsigned int uIndex, bool bDeleteObject = true);
    void removeAllObjects(bool bDeleteObject = true);

    void replaceObjectAtIndex(unsigned int uIndex, T pObject, bool bDeleteObject = true);

    std::vector<T>::iterator begin(void);

    std::vector<T>::reverse_iterator rbegin(void);

    std::vector<T>::iterator endToLua(void);
    std::vector<T>::reverse_iterator rend(void);
    CCMutableArray<T>* copy(void);

    static CCMutableArray<T>* arrayWithArray(CCMutableArray<T> *pArray);
};


code:
class CCMutableDictionary : public CCObject
{
    TOLUA_TEMPLATE_BIND(K V, std::string CCObject*)

    unsigned int count();
    std::vector<std::string> allKeys();
    std::vector<std::string> allKeysForObject(V object);

    V objectForKey(K key);

    bool setObject(V pObject, K key);
    void removeObjectForKey(K key);
    bool begin();
    void endToLua();

    V next(K* key = NULL);

    void endToLua();

    void removeAllObjects();

    static CCMutableDictionary<K, V>* dictionaryWithDictionary(CCMutableDictionary<K, V>* srcDict);
};

typedef CCMutableDictionary<std::string, CCString*> CCStringToStringDictionary;


code:
enum {
    kCCNodeTagInvalid = -1,
};

enum {
    kCCNodeOnEnter,
    kCCNodeOnExit
};

class CCNode : public CCObject
{
    int     getZOrder();
    tolua_readonly tolua_property__CCZOrder int zOrder;

    float   getVertexZ();
    void    setVertexZ(float var);
    tolua_property__CCVertexZ       float vertexZ;

    float   getRotation();
    void    setRotation(float newRotation);
    tolua_property__CCRotation      float rotation;

    float   getScale();
    void    setScale(float scale);
    tolua_property__CCScale         float scale;

    float   getScaleX();
    void    setScaleX(float newScaleX);
    tolua_property__CCScaleX        float scaleX;

    float   getScaleY();
    void    setScaleY(float newScaleY);
    tolua_property__CCScaleY        float scaleY;

    CCPoint getPositionLua();
    void    getPosition(float* x = 0, float* y = 0);
    float   getPositionX();
    float   getPositionY();
    void    setPosition(float x, float y);
    void    setPositionX(float x);
    void    setPositionY(float y);
    tolua_property__CCPositionX     float x;
    tolua_property__CCPositionY     float y;

    float   getSkewX();
    void    setSkewX(float skewX);
    tolua_property__CCSkewX         float skewX;

    float   getSkewY();
    void    setSkewY(float skewY);
    tolua_property__CCSkewY         float skewY;

    CCArray* getChildren();
    unsigned int getChildrenCount(void);

    CCCamera*   getCamera();

    CCGridBase* getGrid();
    void    setGrid(CCGridBase* pGrid);

    bool    getIsVisible();
    void    setIsVisible(bool var);
    tolua_property__CCIsVisible     bool  isVisible;

    CCPoint getAnchorPoint();
    void    setAnchorPoint(CCPoint point);
    tolua_property__CCAnchorPoint   CCPoint anchorPoint;

    CCPoint getAnchorPointInPixels();

    CCSize  getContentSize();
    void    setContentSize(CCSize size);
    tolua_property__CCContentSize   CCSize contentSize;

    CCSize  getContentSizeInPixels();
    void    setContentSizeInPixels(CCSize sz);

    bool    getIsRunning();

    CCNode* getParent();
    void    setParent(CCNode * var);

    bool    getIsRelativeAnchorPoint();
    void    setIsRelativeAnchorPoint(bool newValue);

    int     getTag();
    void    setTag(int var);
    tolua_property__CCTag           int tag;

    // void*   getUserData();
    // void    setUserData(void *var);

    void    registerScriptHandler(LUA_FUNCTION nHandler);
    void    unregisterScriptHandler(void);

    void    addChild(CCNode * child);
    void    addChild(CCNode * child, int zOrder);
    void    addChild(CCNode * child, int zOrder, int tag);
    void    removeFromParentAndCleanup(bool cleanup);
    void    removeChild(CCNode* child, bool cleanup);
    void    removeChildByTag(int tag, bool cleanup);
    void    removeAllChildrenWithCleanup(bool cleanup);

    CCNode* getChildByTag(int tag);
    void    reorderChild(CCNode * child, int zOrder);
    void    cleanup(void);

    void    draw(void);
    void    visit(void);
    void    transform(void);
    void    transformAncestors(void);

    CCRect  boundingBox(void);
    CCRect  boundingBoxInPixels(void);

    CCAction* runAction(CCAction* action);
    void    stopAllActions(void);
    void    stopAction(CCAction* action);
    void    stopActionByTag(int tag);
    CCAction* getActionByTag(int tag);
    unsigned int numberOfRunningActions(void);

    void    scheduleUpdate(void);
    void    scheduleUpdateWithPriority(int priority);
    void    unscheduleUpdate(void);
    void    unscheduleAllSelectors(void);

    void    resumeSchedulerAndActions(void);
    void    pauseSchedulerAndActions(void);

    CCAffineTransform nodeToParentTransform(void);
    CCAffineTransform parentToNodeTransform(void);
    CCAffineTransform nodeToWorldTransform(void);
    CCAffineTransform worldToNodeTransform(void);

    CCPoint convertToNodeSpace(CCPoint worldPoint);
    CCPoint convertToWorldSpace(CCPoint nodePoint);
    CCPoint convertToNodeSpaceAR(CCPoint worldPoint);
    CCPoint convertToWorldSpaceAR(CCPoint nodePoint);
    CCPoint convertTouchToNodeSpace(CCTouch * touch);
    CCPoint convertTouchToNodeSpaceAR(CCTouch * touch);

    static CCNode * node(void);
};


code:
class CCNotificationCenter : public CCObject
{
    static CCNotificationCenter* sharedNotifCenter(void);
    static void purgeNotifCenter(void);

    void postNotification(char *name);
    void postNotification(char *name, CCObject *object);
};


code:
class CCObject
{
    void release(void);
    void retain(void);
    bool isSingleRefrence(void);
    unsigned int retainCount(void);
    bool isEqual(CCObject* pObject);
};


code:
class CCParallaxNode : public CCNode
{
    static CCParallaxNode* node();

    void addChild(CCNode * child, int z, CCPoint parallaxRatio, CCPoint positionOffset);
};


code:
class CCParticleFire : public CCParticleSystemQuad
{
    static CCParticleFire* node();
};

class CCParticleFireworks : public CCParticleSystemQuad
{
    static CCParticleFireworks* node();
};

class CCParticleSun : public CCParticleSystemQuad
{
    static CCParticleSun* node();
};

class CCParticleGalaxy : public CCParticleSystemQuad
{
    static CCParticleGalaxy* node();
};

class CCParticleFlower : public CCParticleSystemQuad
{
    static CCParticleFlower* node();
};

class CCParticleMeteor : public CCParticleSystemQuad
{
    static CCParticleMeteor* node();
};

class CCParticleSpiral : public CCParticleSystemQuad
{
    static CCParticleSpiral* node();
};

class CCParticleExplosion : public CCParticleSystemQuad
{
    static CCParticleExplosion* node();
};

class CCParticleSmoke : public CCParticleSystemQuad
{
    static CCParticleSmoke* node();
};

class CCParticleSnow : public CCParticleSystemQuad
{
    static CCParticleSnow* node();
};

class CCParticleRain : public CCParticleSystemQuad
{
    static CCParticleRain* node();
};


code:
class CCParticleSystem : public CCNode
{
    void stopSystem();
    void resetSystem();
    bool isFull();

    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D* var);

    ccBlendFunc getBlendFunc(void);
    void setBlendFunc(ccBlendFunc var);

    static CCParticleSystem* particleWithFile(char *plistFile);
};


code:
class CCParticleSystemPoint : public CCParticleSystem {
    static CCParticleSystemPoint* particleWithFile(char *plistFile);
};


code:
class CCParticleSystemQuad : public CCParticleSystem {
    static CCParticleSystemQuad* particleWithFile(char *plistFile);
};


code:
CCPoint ccpNeg(CCPoint v);
CCPoint ccpAdd(CCPoint v1, CCPoint v2);
CCPoint ccpSub(CCPoint v1, CCPoint v2);
CCPoint ccpMult(CCPoint v, CGFloat s);
CCPoint ccpMidpoint(CCPoint v1, CCPoint v2);
CGFloat ccpDot(CCPoint v1, CCPoint v2);
CGFloat ccpCross(CCPoint v1, CCPoint v2);
CCPoint ccpPerp(CCPoint v);
CCPoint ccpRPerp(CCPoint v);
CCPoint ccpProject(CCPoint v1, CCPoint v2);
CCPoint ccpRotate(CCPoint v1, CCPoint v2);
CCPoint ccpUnrotate(CCPoint v1, CCPoint v2);
CGFloat ccpLengthSQ(CCPoint v);
CGFloat ccpLength(CCPoint v);
CGFloat ccpDistance(CCPoint v1, CCPoint v2);
CCPoint ccpNormalize(CCPoint v);
CCPoint ccpForAngle(CGFloat a);
CGFloat ccpToAngle(CCPoint v);
float   clampf(float value, float min_inclusive, float max_inclusive);
CCPoint ccpClamp(CCPoint p, CCPoint from, CCPoint to);
CCPoint ccpFromSize(CCSize s);
CCPoint  ccpLerp(CCPoint a, CCPoint b, float alpha);
bool  ccpFuzzyEqual(CCPoint a, CCPoint b, float variance);
CCPoint  ccpCompMult(CCPoint a, CCPoint b);
float  ccpAngleSigned(CCPoint a, CCPoint b);
float  ccpAngle(CCPoint a, CCPoint b);
CCPoint  ccpRotateByAngle(CCPoint v, CCPoint pivot, float angle);
bool  ccpLineIntersect(CCPoint p1, CCPoint p2, CCPoint p3, CCPoint p4, float *s, float *t);
bool ccpSegmentIntersect(CCPoint A, CCPoint B, CCPoint C, CCPoint D);
CCPoint ccpIntersectPoint(CCPoint A, CCPoint B, CCPoint C, CCPoint D);


code:
typedef enum {
    /// Radial Counter-Clockwise
    kCCProgressTimerTypeRadialCCW,
    /// Radial ClockWise
    kCCProgressTimerTypeRadialCW,
    /// Horizontal Left-Right
    kCCProgressTimerTypeHorizontalBarLR,
    /// Horizontal Right-Left
    kCCProgressTimerTypeHorizontalBarRL,
    /// Vertical Bottom-top
    kCCProgressTimerTypeVerticalBarBT,
    /// Vertical Top-Bottom
    kCCProgressTimerTypeVerticalBarTB,
} CCProgressTimerType;

class CCProgressTimer : public CCNode
{
    CCProgressTimerType getType(void);
    float getPercentage(void);
    CCSprite* getSprite(void);

    void setPercentage(float fPercentage);
    void setSprite(CCSprite *pSprite);
    void setType(CCProgressTimerType type);

    static CCProgressTimer* progressWithFile(char* pszFileName);
    static CCProgressTimer* progressWithTexture(CCTexture2D* pTexture);
};


code:
typedef enum eImageFormat
{
    kCCImageFormatJPG       = 0,
    kCCImageFormatPNG       = 1,
    kCCImageFormatRawData   = 2
} tImageFormat;

class CCRenderTexture : public CCNode
{
    CCSprite* getSprite();
    void setSprite(CCSprite* psprite);

    void begin();
    void beginWithClear(float r, float g, float b, float a);
    void endToLua();

    void clear(float r, float g, float b, float a);
    bool saveBuffer(char *szFilePath, int x = 0, int y = 0, int nWidth = 0, int nHeight = 0);
    bool saveBuffer(int format, char *name, int x = 0, int y = 0, int nWidth = 0, int nHeight = 0);
    bool getUIImageFromBuffer(CCImage *pImage, int x = 0, int y = 0, int nWidth = 0, int nHeight = 0);

    static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
    static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h);
};


code:
class CCRibbon: public CCNode
{
    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D* texture);
    void  setTextureLength(float textureLength);
    float getTextureLength(void);
    ccBlendFunc getBlendFunc(void);
    void setBlendFunc(ccBlendFunc blendFunc);
    ccColor4B getColor(void);
    void setColor(ccColor4B color);

    void addPointAt(CCPoint location, float width);
    float sideOfLine(CCPoint p, CCPoint l1, CCPoint l2);

    static CCRibbon* ribbonWithWidth(float w, char *path, float length, ccColor4B color, float fade);
};


code:
class CCScene : public CCNode
{
    static CCScene *node(void);
};


code:
class CCTimer : public CCObject
{
    static CCTimer* timerWithScriptHandler(LUA_FUNCTION nHandler, ccTime fSeconds);
};

class CCScheduler : public CCObject
{
    ccTime getTimeScale(void);
    void setTimeScale(ccTime fTimeScale);
    // void scheduleUpdateForTarget(CCObject *pTarget, int nPriority, bool bPaused);
    void unscheduleUpdateForTarget(CCObject *pTarget);
    void unscheduleAllSelectorsForTarget(CCObject *pTarget);
    void unscheduleAllSelectors(void);
    unsigned int scheduleScriptFunc(LUA_FUNCTION nHandler, ccTime fInterval, bool bPaused);
    void unscheduleScriptEntry(unsigned int uScheduleScriptEntryID);
    void pauseTarget(CCObject *pTarget);
    void resumeTarget(CCObject *pTarget);
    bool isTargetPaused(CCObject *pTarget);
    static CCScheduler* sharedScheduler(void);
};


code:
typedef enum {
    //! Translate with it's parent
    CC_HONOR_PARENT_TRANSFORM_TRANSLATE =  1 << 0,
    //! Rotate with it's parent
    CC_HONOR_PARENT_TRANSFORM_ROTATE    =  1 << 1,
    //! Scale with it's parent
    CC_HONOR_PARENT_TRANSFORM_SCALE     =  1 << 2,
    //! Skew with it's parent
    CC_HONOR_PARENT_TRANSFORM_SKEW      =  1 << 3,

    //! All possible transformation enabled. Default value.
    CC_HONOR_PARENT_TRANSFORM_ALL       =  CC_HONOR_PARENT_TRANSFORM_TRANSLATE | CC_HONOR_PARENT_TRANSFORM_ROTATE | CC_HONOR_PARENT_TRANSFORM_SCALE | CC_HONOR_PARENT_TRANSFORM_SKEW,

} ccHonorParentTransform;

class CCSprite : public CCNode
{
    void setOpacity(GLubyte opacity);
    GLubyte getOpacity();
    void setColor(ccColor3B color);
    ccColor3B getColor();

    bool isDirty(void);
    void setDirty(bool bDirty);
    // ccV3F_C4B_T2F_Quad getQuad(void);
    bool isTextureRectRotated(void);
    unsigned int getAtlasIndex(void);
    void setAtlasIndex(unsigned int uAtlasIndex);
    CCRect getTextureRect(void);
    bool isUsesBatchNode(void);
    void setUsesSpriteBatchNode(bool bUsesSpriteBatchNode);
    CCTextureAtlas* getTextureAtlas(void);
    void setTextureAtlas(CCTextureAtlas *pobTextureAtlas);
    CCSpriteBatchNode* getSpriteBatchNode(void);
    void setSpriteBatchNode(CCSpriteBatchNode *pobSpriteBatchNode);
    ccHonorParentTransform getHonorParentTransform(void);
    void setHonorParentTransform(ccHonorParentTransform eHonorParentTransform);
    CCPoint getOffsetPositionInPixels(void);
    ccBlendFunc getBlendFunc(void);
    void setBlendFunc(ccBlendFunc blendFunc);

    static CCSprite* spriteWithTexture(CCTexture2D *pTexture);
    static CCSprite* spriteWithTexture(CCTexture2D *pTexture, CCRect rect);
    static CCSprite* spriteWithTexture(CCTexture2D *pTexture, CCRect rect, CCPoint offset);
    static CCSprite* spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
    static CCSprite* spriteWithSpriteFrameName(char *pszSpriteFrameName);
    static CCSprite* spriteWithFile(char *pszFileName);
    static CCSprite* spriteWithFile(char *pszFileName, CCRect rect);
    static CCSprite* spriteWithBatchNode(CCSpriteBatchNode *batchNode, CCRect rect);

    void setDirtyRecursively(bool bValue);
    void setFlipX(bool bFlipX);
    void setFlipY(bool bFlipY);
    bool isFlipX(void);
    bool isFlipY(void);
    void updateColor(void);
    void setTexture(CCTexture2D *texture);
    CCTexture2D* getTexture(void);

    void updateTransform(void);
    void useSelfRender(void);
    void setTextureRect(CCRect rect);
    void setTextureRectInPixels(CCRect rect, bool rotated, CCSize size);
    void useBatchNode(CCSpriteBatchNode *batchNode);
    void setDisplayFrame(CCSpriteFrame *pNewFrame);
    bool isFrameDisplayed(CCSpriteFrame *pFrame);
    CCSpriteFrame* displayedFrame(void);
    void setDisplayFrameWithAnimationName(char *animationName, int frameIndex);
};


code:
class CCSpriteBatchNode : public CCNode
{
    CCTextureAtlas* getTextureAtlas(void);
    void setTextureAtlas(CCTextureAtlas* textureAtlas);
    CCArray* getDescendants(void);

    void increaseAtlasCapacity();

    void removeChildAtIndex(unsigned int index, bool doCleanup);
    void insertChild(CCSprite *child, unsigned int index);
    void removeSpriteFromAtlas(CCSprite *sprite);
    unsigned int rebuildIndexInOrder(CCSprite *parent, unsigned int index);
    unsigned int highestAtlasIndexInChild(CCSprite *sprite);
    unsigned int lowestAtlasIndexInChild(CCSprite *sprite);
    unsigned int atlasIndexForChild(CCSprite *sprite, int z);

    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D *texture);
    void setBlendFunc(ccBlendFunc blendFunc);
    ccBlendFunc getBlendFunc(void);

    static CCSpriteBatchNode* batchNodeWithTexture(CCTexture2D *tex);
    static CCSpriteBatchNode* batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity);
    static CCSpriteBatchNode* batchNodeWithFile(char* fileImage);
    static CCSpriteBatchNode* batchNodeWithFile(char* fileImage, unsigned int capacity);
};


code:
class CCSpriteFrame : public CCObject
{
    CCRect getRectInPixels(void);
    void setRectInPixels(CCRect rectInPixels);
    bool isRotated(void);
    void setRotated(bool bRotated);
    CCRect getRect(void);
    void setRect(CCRect rect);
    CCPoint getOffsetInPixels(void);
    void setOffsetInPixels(CCPoint offsetInPixels);
    CCSize getOriginalSizeInPixels(void);
    void setOriginalSizeInPixels(CCSize sizeInPixels);
    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D* pobTexture);

    static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, CCRect rect);
    static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, CCRect rect, bool rotated, CCPoint offset, CCSize originalSize);
};


code:
class CCSpriteFrameCache : public CCObject
{
    void addSpriteFramesWithFile(char *pszPlist);
    void addSpriteFramesWithFile(char* plist, char* textureFileName);
    void addSpriteFramesWithFile(char *pszPlist, CCTexture2D *pobTexture);
    void addSpriteFrame(CCSpriteFrame *pobFrame, char *pszFrameName);
    void removeSpriteFrames(void);
    void removeUnusedSpriteFrames(void);
    void removeSpriteFrameByName(char *pszName);
    void removeSpriteFramesFromFile(char* plist);
    void removeSpriteFramesFromTexture(CCTexture2D* texture);
    CCSpriteFrame* spriteFrameByName(char *pszName);

    static CCSpriteFrameCache* sharedSpriteFrameCache(void);
    static void purgeSharedSpriteFrameCache(void);
};


code:
class CCString : public CCObject
{
    int toInt();
    unsigned int toUInt();
    float toFloat();
    bool isEmpty();
};


code:
class CCTMXLayer : public CCSpriteBatchNode
{
    CCSize getLayerSize(void);
    void setLayerSize(CCSize size);

    CCSize getMapTileSize(void);
    void setMapTileSize(CCSize size);

    unsigned int getLayerOrientation(void);
    void setLayerOrientation(unsigned int orientation);

    void releaseMap();

    CCSprite* tileAt(CCPoint tileCoordinate);
    unsigned int tileGIDAt(CCPoint tileCoordinate);
    void setTileGID(unsigned int gid, CCPoint tileCoordinate);
    void removeTileAt(CCPoint tileCoordinate);
    CCPoint positionAt(CCPoint tileCoordinate);

    CCString* propertyNamed(char *propertyName);

    void setupTiles();
    char* getLayerName();
    inline void setLayerName(char *layerName);
};


code:
/** Possible oritentations of the TMX map */
enum
{
    /** Orthogonal orientation */
    CCTMXOrientationOrtho,
    /** Hexagonal orientation */
    CCTMXOrientationHex,
    /** Isometric orientation */
    CCTMXOrientationIso,
};

class CCTMXTiledMap : public CCNode
{
    CCSize getMapSize(void);
    void setMapSize(CCSize size);

    CCSize getTileSize(void);
    void setTileSize(CCSize size);

    int getMapOrientation(void);
    void setMapOrientation(int orientation);

    static CCTMXTiledMap * tiledMapWithTMXFile(char *tmxFile);

    CCTMXLayer* layerNamed(char *layerName);
    CCString* propertyNamed(char *propertyName);
};


code:
class CCTextFieldTTF : public CCLabelTTF
{
    static CCTextFieldTTF * textFieldWithPlaceHolder(char *placeholder, CCSize dimensions, CCTextAlignment alignment, char *fontName, float fontSize);
    static CCTextFieldTTF * textFieldWithPlaceHolder(char *placeholder, char *fontName, float fontSize);

    bool attachWithIME();
    bool detachWithIME();

    int getCharCount(void);
    ccColor3B getColorSpaceHolder(void);
    void setColorSpaceHolder(ccColor3B color);

    char* getString(void);
    void setString(char *text);
    char* getPlaceHolder(void);
    void setPlaceHolder(char * text);
};


code:
typedef enum {
    kCCTexture2DPixelFormat_Automatic = 0,
    //! 32-bit texture: RGBA8888
    kCCTexture2DPixelFormat_RGBA8888,
    //! 24-bit texture: RGBA888
    kCCTexture2DPixelFormat_RGB888,
    //! 16-bit texture without Alpha channel
    kCCTexture2DPixelFormat_RGB565,
    //! 8-bit textures used as masks
    kCCTexture2DPixelFormat_A8,
    //! 8-bit intensity texture
    kCCTexture2DPixelFormat_I8,
    //! 16-bit textures used as masks
    kCCTexture2DPixelFormat_AI88,
    //! 16-bit textures: RGBA4444
    kCCTexture2DPixelFormat_RGBA4444,
    //! 16-bit textures: RGB5A1
    kCCTexture2DPixelFormat_RGB5A1,
    //! 4-bit PVRTC-compressed texture: PVRTC4
    kCCTexture2DPixelFormat_PVRTC4,
    //! 2-bit PVRTC-compressed texture: PVRTC2
    kCCTexture2DPixelFormat_PVRTC2,

    //! Default texture format: RGBA8888
    kCCTexture2DPixelFormat_Default = kCCTexture2DPixelFormat_RGBA8888,

    // backward compatibility stuff
    kTexture2DPixelFormat_Automatic = kCCTexture2DPixelFormat_Automatic,
    kTexture2DPixelFormat_RGBA8888 = kCCTexture2DPixelFormat_RGBA8888,
    kTexture2DPixelFormat_RGB888 = kCCTexture2DPixelFormat_RGB888,
    kTexture2DPixelFormat_RGB565 = kCCTexture2DPixelFormat_RGB565,
    kTexture2DPixelFormat_A8 = kCCTexture2DPixelFormat_A8,
    kTexture2DPixelFormat_RGBA4444 = kCCTexture2DPixelFormat_RGBA4444,
    kTexture2DPixelFormat_RGB5A1 = kCCTexture2DPixelFormat_RGB5A1,
    kTexture2DPixelFormat_Default = kCCTexture2DPixelFormat_Default

} CCTexture2DPixelFormat;

typedef struct _ccTexParams {
    GLuint  minFilter;
    GLuint  magFilter;
    GLuint  wrapS;
    GLuint  wrapT;
} ccTexParams;

class CCTexture2D : public CCObject
{
    CCTexture2DPixelFormat getPixelFormat(void);
    unsigned int getPixelsWide(void);
    unsigned int getPixelsHigh(void);
    GLuint getName(void);
    CCSize getContentSizeInPixels(void);
    CCSize getContentSize(void);

    GLfloat getMaxS(void);
    void setMaxS(GLfloat maxS);
    GLfloat getMaxT(void);
    void setMaxT(GLfloat maxT);

    bool getHasPremultipliedAlpha(void);

    void setTexParameters(ccTexParams* texParams);
    void setAntiAliasTexParameters();
    void setAliasTexParameters();
    void generateMipmap();
    unsigned int bitsPerPixelForFormat();

    static void setDefaultAlphaPixelFormat(CCTexture2DPixelFormat format);
    static CCTexture2DPixelFormat defaultAlphaPixelFormat();
    static void PVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied);
};


code:
class CCTextureAtlas : public CCObject
{
    unsigned int getTotalQuads(void);
    unsigned int getCapacity(void);

    CCTexture2D* getTexture(void);
    void setTexture(CCTexture2D* texture);

    // ccV3F_C4B_T2F_Quad getQuads(void);
    // void setQuads(ccV3F_C4B_T2F_Quad quads);

    static CCTextureAtlas * textureAtlasWithFile(char* file , unsigned int capacity);
    static CCTextureAtlas * textureAtlasWithTexture(CCTexture2D *texture, unsigned int capacity);

    // void updateQuad(ccV3F_C4B_T2F_Quad* quad, unsigned int index);
    // void insertQuad(ccV3F_C4B_T2F_Quad* quad, unsigned int index);
    void insertQuadFromIndex(unsigned int fromIndex, unsigned int newIndex);
    void removeQuadAtIndex(unsigned int index);
    void removeAllQuads();
    bool resizeCapacity(unsigned int n);
    void drawNumberOfQuads(unsigned int n);
    void drawNumberOfQuads(unsigned int n, unsigned int start);
    void drawQuads();
};


code:
class CCTextureCache : public CCObject
{
    static CCTextureCache * sharedTextureCache();
    static void purgeSharedTextureCache();

    CCTexture2D* addImage(char* fileimage);
    CCTexture2D* addUIImage(CCImage *image, char *key);
    CCTexture2D* textureForKey(char* key);
    void removeAllTextures();
    void removeUnusedTextures();
    void removeTexture(CCTexture2D* texture);
    void removeTextureForKey(char *textureKeyName);
    void dumpCachedTextureInfo();
    CCTexture2D* addPVRImage(char* filename);
};


code:
class CCTexturePVR : public CCObject
{
    static CCTexturePVR * pvrTextureWithContentsOfFile(const char* path);

    GLuint getName(void);
    unsigned int getWidth(void);
    unsigned int getHeight(void);
    CCTexture2DPixelFormat getFormat(void);
    bool getHasAlpha(void);
    bool getRetainName(void);
    void setRetainName(bool retainName);
};


code:
class CCTileMapAtlas : public CCAtlasNode
{
    static CCTileMapAtlas* tileMapAtlasWithTileFile(char *tile, char *mapFile, int tileWidth, int tileHeight);

    ccColor3B tileAt(ccGridSize position);
    void setTile(ccColor3B tile, ccGridSize position);
    void releaseMap();
};


code:
enum {
    CCTOUCHBEGAN,
    CCTOUCHMOVED,
    CCTOUCHENDED,
    CCTOUCHCANCELLED,
};

class CCTouch : public CCObject
{
    CCPoint locationInView(void);
    CCPoint previousLocationInView(void);
};

class CCEvent : public CCObject
{
};


code:
class CCTransitionEaseScene
{
    virtual CCActionInterval* easeActionWithAction(CCActionInterval* action);
};

typedef enum {
    kOrientationLeftOver = 0,
    kOrientationRightOver = 1,
    kOrientationUpOver = 0,
    kOrientationDownOver = 1,
} tOrientation;

class CCTransitionScene : public CCScene
{
    static CCTransitionScene* transitionWithDuration(ccTime t, CCScene*scene);
};

class CCTransitionSceneOriented : public CCTransitionScene
{
    static CCTransitionSceneOriented* transitionWithDuration(ccTime t,CCScene* scene, tOrientation orientation);
};

class CCTransitionRotoZoom : public CCTransitionScene
{
    static CCTransitionRotoZoom* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionJumpZoom : public CCTransitionScene
{
    static CCTransitionJumpZoom* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionMoveInL : public CCTransitionScene, public CCTransitionEaseScene
{
    static CCTransitionMoveInL* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionMoveInR : public CCTransitionMoveInL
{
    static CCTransitionMoveInR* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionMoveInT : public CCTransitionMoveInL
{
    static CCTransitionMoveInT* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionMoveInB : public CCTransitionMoveInL
{
    static CCTransitionMoveInB* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionSlideInL : public CCTransitionScene, public CCTransitionEaseScene
{
    static CCTransitionSlideInL* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionSlideInR : public CCTransitionSlideInL
{
    static CCTransitionSlideInR* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionSlideInB : public CCTransitionSlideInL
{
    static CCTransitionSlideInB* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionSlideInT : public CCTransitionSlideInL
{
    static CCTransitionSlideInT* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionShrinkGrow : public CCTransitionScene , public CCTransitionEaseScene
{
    static CCTransitionShrinkGrow* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionFlipX : public CCTransitionSceneOriented
{
    static CCTransitionFlipX* transitionWithDuration(ccTime t, CCScene* s, tOrientation o = kOrientationRightOver);
};

class CCTransitionFlipY : public CCTransitionSceneOriented
{
    static CCTransitionFlipY* transitionWithDuration(ccTime t, CCScene* s, tOrientation o = kOrientationUpOver);
};

class CCTransitionFlipAngular : public CCTransitionSceneOriented
{
    static CCTransitionFlipAngular* transitionWithDuration(ccTime t, CCScene* s, tOrientation o = kOrientationRightOver);
};

class CCTransitionZoomFlipX : public CCTransitionSceneOriented
{
    static CCTransitionZoomFlipX* transitionWithDuration(ccTime t, CCScene* s, tOrientation o = kOrientationRightOver);
};

class CCTransitionZoomFlipY : public CCTransitionSceneOriented
{
    static CCTransitionZoomFlipY* transitionWithDuration(ccTime t, CCScene* s, tOrientation o = kOrientationUpOver);
};

class CCTransitionZoomFlipAngular : public CCTransitionSceneOriented
{
    static CCTransitionZoomFlipAngular* transitionWithDuration(ccTime t, CCScene* s, tOrientation o = kOrientationRightOver);
};

class CCTransitionFade : public CCTransitionScene
{
    static CCTransitionFade* transitionWithDuration(ccTime duration,CCScene* scene, ccColor3B color = ccBLACK);
};

class CCTransitionCrossFade : public CCTransitionScene
{
    static CCTransitionCrossFade* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionTurnOffTiles : public CCTransitionScene ,public CCTransitionEaseScene
{
    static CCTransitionTurnOffTiles* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionSplitCols : public CCTransitionScene , public CCTransitionEaseScene
{
    static CCTransitionSplitCols* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionSplitRows : public CCTransitionSplitCols
{
    static CCTransitionSplitRows* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionFadeTR : public CCTransitionScene , public CCTransitionEaseScene
{
    static CCTransitionFadeTR* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionFadeBL : public CCTransitionFadeTR
{
    static CCTransitionFadeBL* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionFadeUp : public CCTransitionFadeTR
{
    static CCTransitionFadeUp* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionFadeDown : public CCTransitionFadeTR
{
    static CCTransitionFadeDown* transitionWithDuration(ccTime t, CCScene* scene);
};


code:
class CCTransitionPageTurn : public CCTransitionScene
{
    static CCTransitionPageTurn* transitionWithDuration(ccTime t,CCScene* scene,bool backwards);
};


code:
class CCTransitionRadialCCW : public CCTransitionScene
{
    static CCTransitionRadialCCW* transitionWithDuration(ccTime t, CCScene* scene);
};

class CCTransitionRadialCW : public CCTransitionRadialCCW
{
    static CCTransitionRadialCW* transitionWithDuration(ccTime t, CCScene* scene);
};


code:
class CCUserDefault
{
    bool    getBoolForKey(char* pKey, bool defaultValue = false);
    int     getIntegerForKey(char* pKey, int defaultValue = 0);
    float   getFloatForKey(char* pKey, float defaultValue=0.0f);
    double  getDoubleForKey(char* pKey, double defaultValue=0.0);
    std::string getStringForKey(char* pKey, std::string  defaultValue = "");

    void    setBoolForKey(char* pKey, bool value);
    void    setIntegerForKey(char* pKey, int value);
    void    setFloatForKey(char* pKey, float value);
    void    setDoubleForKey(char* pKey, double value);
    void    setStringForKey(char* pKey, std::string  value);

    void    flush();

    static CCUserDefault* sharedUserDefault();
    static void purgeSharedUserDefault();
    static std::string getXMLFilePath();
};


code:
$#include "LuaCocos2d.h"

// !!! DON'T CHANGE THE ORDER !!!

// types
$pfile "ccTypes.pkg"
$pfile "CCCommon.pkg"

// cocoa
$pfile "CCAffineTransform.pkg"
$pfile "CCGeometry.pkg"
$pfile "CCObject.pkg"
$pfile "CCString.pkg"
$pfile "CCArray.pkg"
$pfile "CCMutableArray.pkg"
$pfile "CCMutableDictionary.pkg"

// core
$pfile "CCCamera.pkg"
$pfile "CCConfiguration.pkg"
$pfile "CCDirector.pkg"
$pfile "CCScheduler.pkg"

// actions
$pfile "CCActionManager.pkg"
$pfile "CCAction.pkg"
$pfile "CCActionInterval.pkg"
$pfile "CCActionInstant.pkg"
$pfile "CCActionCamera.pkg"
$pfile "CCActionEase.pkg"
$pfile "CCActionGrid.pkg"
$pfile "CCActionGrid3D.pkg"
$pfile "CCActionPageTurn3D.pkg"
$pfile "CCActionProgressTimer.pkg"
$pfile "CCActionTiledGrid.pkg"

// base_nodes
$pfile "CCNode.pkg"
$pfile "CCAtlasNode.pkg"

// sprite nodes
$pfile "CCSprite.pkg"
$pfile "CCSpriteFrame.pkg"
$pfile "CCSpriteFrameCache.pkg"
$pfile "CCSpriteBatchNode.pkg"
$pfile "CCAnimation.pkg"
$pfile "CCAnimationCache.pkg"

// label nodes
$pfile "CCLabelAtlas.pkg"
$pfile "CCLabelBMFont.pkg"
$pfile "CCLabelTTF.pkg"

// layers scenes transitions nodes
$pfile "CCLayer.pkg"
$pfile "CCScene.pkg"
$pfile "CCTransition.pkg"
$pfile "CCTransitionPageTurn.pkg"
$pfile "CCTransitionRadial.pkg"

// menu nodes
$pfile "CCMenu.pkg"
$pfile "CCMenuItem.pkg"

// misc nodes
$pfile "CCMotionStreak.pkg"
$pfile "CCProgressTimer.pkg"
$pfile "CCRenderTexture.pkg"
$pfile "CCRibbon.pkg"

// particle nodes
$pfile "CCParticleExamples.pkg"
$pfile "CCParticleSystem.pkg"
$pfile "CCParticleSystemPoint.pkg"
$pfile "CCParticleSystemQuad.pkg"

// textures
$pfile "CCTexture2D.pkg"
$pfile "CCTextureAtlas.pkg"
$pfile "CCTextureCache.pkg"
$pfile "CCTexturePVR.pkg"

// platform
$pfile "CCApplication.pkg"
$pfile "CCFileUtils.pkg"
$pfile "CCImage.pkg"
$pfile "CCTouch.pkg"
$pfile "CCPointExtension.pkg"

// tileMap parallax nodes
$pfile "CCParallaxNode.pkg"
$pfile "CCTileMapAtlas.pkg"
$pfile "CCTMXLayer.pkg"
$pfile "CCTMXTiledMap.pkg"

// support
$pfile "CCTextFieldTTF.pkg"
$pfile "CCUserDefault.pkg"

// extensions
$pfile "CCNotificationCenter.pkg"

// CocosDenshion
$pfile "SimpleAudioEngine.pkg"


code:
1. Generating the lua<-->C bindings with tolua++
tolua++.exe -tCocos2d -o LuaCocos2d.cpp Cocos2d.pkg

    An ant script has been provided to generate the relevant files, to do this after
    modifying the .pkg files you should use the following command in this directory:

    ant

    This will generate the bindings file, patch it to compile successfully and move it
    to the standard destination.

2. Writing .pkg files

    1) enum keeps the same
    2) remove CC_DLL for the class defines, pay attention to multi inherites
    3) remove inline keyword for declaration and implementation
    4) remove public protect and private
    5) remove the decalration of class member variable
    6) keep static keyword
    7) remove memeber functions that declared as private or protected

path: tools/tolua++/README


code:
/****************************************************************************
Copyright (c) 2010-2011 cocos2d-x.org
Copyright (c) 2010      Steve Oldmeadow

http://www.cocos2d-x.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/

class SimpleAudioEngine
{
    /**
    @brief Get the shared Engine object,it will new one when first time be called
    */
    static SimpleAudioEngine* sharedEngine();

    /**
    @brief  Set the zip file name
    @param pszZipFileName The relative path of the .zip file
    */
    static void setResource(char* pszZipFileName);

    /**
     @brief Preload background music
     @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
     */
    void preloadBackgroundMusic(char* pszFilePath);

    /**
    @brief Play background music
    @param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
    @param bLoop Whether the background music loop or not
    */
    void playBackgroundMusic(char* pszFilePath, bool bLoop = false);

    /**
    @brief Stop playing background music
    @param bReleaseData If release the background music data or not.As default value is false
    */
    void stopBackgroundMusic(bool bReleaseData = false);

    /**
    @brief Pause playing background music
    */
    void pauseBackgroundMusic();

    /**
    @brief Resume playing background music
    */
    void resumeBackgroundMusic();

    /**
    @brief Rewind playing background music
    */
    void rewindBackgroundMusic();

    bool willPlayBackgroundMusic();

    /**
    @brief Whether the background music is playing
    @return If is playing return true,or return false
    */
    bool isBackgroundMusicPlaying();

    // properties
    /**
    @brief The volume of the background music max value is 1.0,the min value is 0.0
    */
    float getBackgroundMusicVolume();

    /**
    @brief set the volume of background music
    @param volume must be in 0.0~1.0
    */
    void setBackgroundMusicVolume(float volume);

    /**
    @brief The volume of the effects max value is 1.0,the min value is 0.0
    */
    float getEffectsVolume();

    /**
    @brief set the volume of sound effecs
    @param volume must be in 0.0~1.0
    */
    void setEffectsVolume(float volume);

    // for sound effects
    /**
    @brief Play sound effect
    @param pszFilePath The path of the effect file,or the FileName of T_SoundResInfo
    @bLoop Whether to loop the effect playing, default value is false
    */
    unsigned int playEffect(char* pszFilePath, bool bLoop = false);

    /**
    @brief Stop playing sound effect
    @param nSoundId The return value of function playEffect
    */
    void stopEffect(unsigned int nSoundId);

    /**
    @brief  		preload a compressed audio file
    @details	    the compressed audio will be decode to wave, then write into an
    internal buffer in SimpleaudioEngine
    */
    void preloadEffect(char* pszFilePath);

    /**
    @brief  		unload the preloaded effect from internal buffer
    @param[in]		pszFilePath		The path of the effect file,or the FileName of T_SoundResInfo
    */
    void unloadEffect(char* pszFilePath);
};


code:
_is_functions = _is_functions or {}
_to_functions = _to_functions or {}
_push_functions = _push_functions or {}

local CCObjectTypes = {
    "CCObject",
    "CCAction",
    "CCFiniteTimeAction",
    "CCActionInstant",
    "CCCallFunc",
    "CCCallFuncN",
    "CCCallFuncND",
    "CCCallFuncO",
    "CCFlipX",
    "CCFlipY",
    "CCHide",
    "CCPlace",
    "CCReuseGrid",
    "CCShow",
    "CCStopGrid",
    "CCToggleVisibility",
    "CCActionInterval",
    "CCAccelAmplitude",
    "CCAccelDeccelAmplitude",
    "CCActionCamera",
    "CCOrbitCamera",
    "CCActionEase",
    "CCEaseBackIn",
    "CCEaseBackInOut",
    "CCEaseBackOut",
    "CCEaseBounce",
    "CCEaseElastic",
    "CCEaseExponentialIn",
    "CCEaseExponentialInOut",
    "CCEaseExponentialOut",
    "CCEaseRateAction",
    "CCEaseSineIn",
    "CCEaseSineInOut",
    "CCEaseSineOut",
    "CCAnimate",
    "CCBezierBy",
    "CCBezierTo",
    "CCBlink",
    "CCDeccelAmplitude",
    "CCDelayTime",
    "CCFadeIn",
    "CCFadeOut",
    "CCFadeTo",
    "CCGridAction",
    "CCJumpBy",
    "CCJumpTo",
    "CCMoveTo",
    "CCMoveBy",
    "CCProgressFromTo",
    "CCProgressTo",
    "CCRepeat",
    "CCRepeatForever",
    "CCReverseTime",
    "CCRotateBy",
    "CCRotateTo",
    "CCScaleTo",
    "CCScaleBy",
    "CCSequence",
    "CCSkewTo",
    "CCSkewBy",
    "CCSpawn",
    "CCTintBy",
    "CCTintTo",
    "CCActionManager",
    "CCAnimation",
    "CCAnimationCache",
    "CCArray",
    "CCAsyncObject",
    "CCAutoreleasePool",
    "CCBMFontConfiguration",
    "CCCamera",
    "CCConfiguration",
    "CCData",
    "CCDirector",
    "CCDisplayLinkDirector",
    "CCEvent",
    "CCGrabber",
    "CCGrid3D",
    "CCTiledGrid3D",
    "CCKeypadDispatcher",
    "CCKeypadHandler",
    "CCMutableArray",
    "CCMutableDictionary",
    "CCNode",
    "CCAtlasNode",
    "CCLabelAtlas",
    "CCTileMapAtlas",
    "CCLayer",
    "CCLayerColor",
    "CCLayerGradient",
    "CCLayerMultiplex",
    "CCMenu",
    "CCMenuItem",
    "CCMenuItemLabel",
    "CCMenuItemAtlasFont",
    "CCMenuItemFont",
    "CCMenuItemSprite",
    "CCMenuItemImage",
    "CCMenuItemToggle",
    "CCMotionStreak",
    "CCParallaxNode",
    "CCParticleSystem",
    "CCParticleSystemPoint",
    "CCParticleSystemQuad",
    "CCProgressTimer",
    "CCRenderTexture",
    "CCRibbon",
    "CCScene",
    "CCTransitionScene",
    "CCTransitionCrossFade",
    "CCTransitionFade",
    "CCTransitionFadeTR",
    "CCTransitionFadeBL",
    "CCTransitionFadeDown",
    "CCTransitionFadeUp",
    "CCTransitionJumpZoom",
    "CCTransitionMoveInL",
    "CCTransitionMoveInB",
    "CCTransitionMoveInR",
    "CCTransitionMoveInT",
    "CCTransitionPageTurn",
    "CCTransitionRadialCCW",
    "CCTransitionRadialCW",
    "CCTransitionRotoZoom",
    "CCTransitionSceneOriented",
    "CCTransitionFlipAngular",
    "CCTransitionFlipX",
    "CCTransitionFlipY",
    "CCTransitionZoomFlipAngular",
    "CCTransitionZoomFlipX",
    "CCTransitionZoomFlipY",
    "CCTransitionShrinkGrow",
    "CCTransitionSlideInL",
    "CCTransitionSlideInB",
    "CCTransitionSlideInR",
    "CCTransitionSlideInT",
    "CCTransitionSplitCols",
    "CCTransitionSplitRows",
    "CCTransitionTurnOffTiles",
    "CCSprite",
    "CCLabelTTF",
    "CCTextFieldTTF",
    "CCSpriteBatchNode",
    "CCLabelBMFont",
    "CCTMXLayer",
    "CCTMXTiledMap",
    "CCPointObject",
    "CCProjectionProtocol",
    "CCRibbonSegment",
    "CCScheduler",
    "CCSet",
    "CCSpriteFrame",
    "CCSpriteFrameCache",
    "CCString",
    "CCTexture2D",
    "CCTextureAtlas",
    "CCTextureCache",
    "CCTexturePVR",
    "CCTimer",
    "CCTMXLayerInfo",
    "CCTMXMapInfo",
    "CCTMXObjectGroup",
    "CCTMXTilesetInfo",
    "CCTouch",
    "CCTouchDispatcher",
    "CCTouchHandler",
}

-- register CCObject types
for i = 1, #CCObjectTypes do
    _push_functions[CCObjectTypes[i]] = "tolua_pushusertype_ccobject"
end

-- register LUA_FUNCTION type
_to_functions["LUA_FUNCTION"] = "tolua_ref_function"
_is_functions["LUA_FUNCTION"] = "tolua_isfunction"

function get_property_methods_hook(ptype, name)
    if string.sub(ptype, 1, 2) == "CC" then
        ptype = string.sub(ptype, 3)
    end
    return "get"..ptype, "set"..ptype
end