diff --git a/.gitignore b/.gitignore
index 82a2370..cdc2c43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,438 @@
-.vs
-Build
-src/backups
\ No newline at end of file
+### C++ template
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea
+
+# CMake
+cmake-build-*/
+build/
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+### CMake template
+CMakeLists.txt.user
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+Testing
+Makefile
+cmake_install.cmake
+install_manifest.txt
+compile_commands.json
+CTestTestfile.cmake
+_deps
+
+### VisualStudio template
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.iobj
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..0280f56
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,15 @@
+[submodule "minhook"]
+ path = minhook
+ url = https://github.com/TsudaKageyu/minhook
+[submodule "json"]
+ path = json
+ url = https://github.com/nlohmann/json
+[submodule "gd.h"]
+ path = gd.h
+ url = https://github.com/Galster-dev/gd.h/
+[submodule "utfcpp"]
+ path = utfcpp
+ url = https://github.com/nemtrif/utfcpp
+[submodule "cocos-headers"]
+ path = cocos-headers
+ url = https://github.com/HJfod/cocos-headers
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..097ae4e
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.0.0)
+
+project(gdl)
+
+file(GLOB_RECURSE GDL_SOURCES src/*.[hc]pp)
+
+set(CMAKE_CXX_STANDARD 17)
+
+add_subdirectory(minhook)
+add_subdirectory(json)
+add_subdirectory(cocos-headers)
+add_subdirectory(utfcpp)
+
+include_directories(src gd.h gd.h/include)
+
+add_library(gdl SHARED ${GDL_SOURCES})
+
+target_link_libraries(gdl PRIVATE cocos2d nlohmann_json::nlohmann_json minhook utf8cpp)
\ No newline at end of file
diff --git a/GDL.sln b/GDL.sln
deleted file mode 100644
index eb82dad..0000000
--- a/GDL.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30804.86
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GDL", "GDL.vcxproj", "{D2F6430A-3721-410E-80BA-D6BC6DD95A61}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x64.ActiveCfg = Debug|x64
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x64.Build.0 = Debug|x64
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x86.ActiveCfg = Debug|Win32
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x86.Build.0 = Debug|Win32
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x64.ActiveCfg = Release|x64
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x64.Build.0 = Release|x64
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x86.ActiveCfg = Release|Win32
- {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {F31C5776-6146-4D80-B31F-2F95AF57270A}
- EndGlobalSection
-EndGlobal
diff --git a/GDL.vcxproj b/GDL.vcxproj
deleted file mode 100644
index 3989e6b..0000000
--- a/GDL.vcxproj
+++ /dev/null
@@ -1,1631 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- 16.0
- Win32Proj
- {d2f6430a-3721-410e-80ba-d6bc6dd95a61}
- GDL
- 10.0
-
-
-
- DynamicLibrary
- true
- v142
- Unicode
-
-
- DynamicLibrary
- false
- v142
- true
- Unicode
-
-
- DynamicLibrary
- true
- v142
- Unicode
-
-
- DynamicLibrary
- false
- v142
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
- $(SolutionDir)Build\$(Configuration)\
- Build\temp\$(Configuration)\
-
-
- true
-
-
- false
-
-
-
- Level3
- true
- WIN32;_DEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- NotUsing
- pch.h
- $(SolutionDir)cappuccino-sdk\incl\cocos2dx;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\kazmath\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\win32;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\third_party\win32;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)gd.h\include;$(SolutionDir)gd.h\;$(SolutionDir)minhook\include;$(SolutionDir)cappuccino-sdk\incl\extensions;%(AdditionalIncludeDirectories)
- stdcpp17
-
-
- Windows
- true
- false
- $(SolutionDir)cappuccino-sdk\lib\cappuccino.lib;$(SolutionDir)cappuccino-sdk\lib\libExtensions.lib;%(AdditionalDependencies)
- /FORCE:MULTIPLE %(AdditionalOptions)
-
-
- copy "D:\Dev\VisualStudio\CappuccinoSDK\CappuccinoSDK-master\projects\GDL\Debug\GDL.dll" "D:\SteamLibrary\steamapps\common\Geometry Dash\GDL.dll"
-
-
-
-
- Level3
- true
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)
- true
- NotUsing
- pch.h
- $(SolutionDir)gd.h\include;$(SolutionDir)src;$(SolutionDir);$(SolutionDir)utf8;$(SolutionDir)gd.h;$(SolutionDir)minhook\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)extensions;%(AdditionalIncludeDirectories)
- stdcpp17
-
-
- Windows
- true
- true
- true
- false
- $(SolutionDir)cocos2dx/libcocos2d.lib;$(SolutionDir)extensions/libExtensions.lib;%(AdditionalDependencies)
- /FORCE:MULTIPLE %(AdditionalOptions)
-
-
- copy "$(SolutionDir)Build\$(Configuration)\$(ProjectName).dll" "D:\SteamLibrary\steamapps\common\Geometry Dash GDL\adaf-dll\$(ProjectName).dll"
-copy "$(SolutionDir)Build\$(Configuration)\$(ProjectName).dll" "D:\SteamLibrary\steamapps\common\Geometry Dash GDL MH7\extensions\$(ProjectName).dll"
-
-
-
-
- Level3
- true
- _DEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- Use
- pch.h
-
-
- Windows
- true
- false
-
-
-
-
- Level3
- true
- true
- true
- NDEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- Use
- pch.h
-
-
- Windows
- true
- true
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GDL.vcxproj.filters b/GDL.vcxproj.filters
deleted file mode 100644
index 750a7a8..0000000
--- a/GDL.vcxproj.filters
+++ /dev/null
@@ -1,4393 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
- {4ade963d-40d1-4197-ac1c-a6c93ef2c26b}
-
-
- {bd62c547-26f4-4ed8-b6db-8eeb6d665746}
-
-
- {cfbea212-bfc1-4654-8157-3dea78907027}
-
-
- {551404e2-4047-4fe9-9fa5-4d267a359e29}
-
-
- {92ecd13c-4f23-43a5-b80d-1488cf61f173}
-
-
- {46df90b6-4ad6-47ee-8ec7-6fa8b892e2ba}
-
-
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\minhook
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\gd.h
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files\cocos2d
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files\utf8
-
-
- Header Files\utf8
-
-
- Header Files\utf8
-
-
- Header Files\utf8
-
-
- Header Files
-
-
- Header Files\json
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files\minhook
-
-
- Source Files\minhook
-
-
- Source Files\minhook
-
-
- Source Files\minhook
-
-
- Source Files\minhook
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Resource Files
-
-
-
-
- Source Files\minhook
-
-
-
\ No newline at end of file
diff --git a/GDL.vcxproj.user b/GDL.vcxproj.user
deleted file mode 100644
index 5df420f..0000000
--- a/GDL.vcxproj.user
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- false
-
-
\ No newline at end of file
diff --git a/cocos-headers b/cocos-headers
new file mode 160000
index 0000000..cbf79fc
--- /dev/null
+++ b/cocos-headers
@@ -0,0 +1 @@
+Subproject commit cbf79fcfc68253f2be4a58775aa72de55a9d9495
diff --git a/cocos2dx/CCCamera.h b/cocos2dx/CCCamera.h
deleted file mode 100644
index b3df361..0000000
--- a/cocos2dx/CCCamera.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCCAMERA_H__
-#define __CCCAMERA_H__
-
-#include "cocoa/CCObject.h"
-#include "ccMacros.h"
-#include "kazmath/mat4.h"
-#include
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup base_nodes
- * @{
- */
-
-/**
-A CCCamera is used in every CCNode.
-Useful to look at the object from different views.
-The OpenGL gluLookAt() function is used to locate the
-camera.
-
-If the object is transformed by any of the scale, rotation or
-position attributes, then they will override the camera.
-
-IMPORTANT: Either your use the camera or the rotation/scale/position properties. You can't use both.
-World coordinates won't work if you use the camera.
-
-Limitations:
-
-- Some nodes, like CCParallaxNode, CCParticle uses world node coordinates, and they won't work properly if you move them (or any of their ancestors)
-using the camera.
-
-- It doesn't work on batched nodes like CCSprite objects when they are parented to a CCSpriteBatchNode object.
-
-- It is recommended to use it ONLY if you are going to create 3D effects. For 2D effects, use the action CCFollow or position/scale/rotate.
-
-*/
-class CC_DLL CCCamera : public CCObject
-{
-protected:
- float m_fEyeX;
- float m_fEyeY;
- float m_fEyeZ;
-
- float m_fCenterX;
- float m_fCenterY;
- float m_fCenterZ;
-
- float m_fUpX;
- float m_fUpY;
- float m_fUpZ;
-
- bool m_bDirty;
- kmMat4 m_lookupMatrix;
-public:
- /**
- * @js ctor
- */
- CCCamera(void);
- /**
- * @js NA
- * @lua NA
- */
- ~CCCamera(void);
-
- void init(void);
- /**
- * @js NA
- */
- const char* description(void);
-
- /** sets the dirty value */
- inline void setDirty(bool bValue) { m_bDirty = bValue; }
- /** get the dirty value */
- inline bool isDirty(void) { return m_bDirty; }
-
- /** sets the camera in the default position */
- void restore(void);
- /** Sets the camera using gluLookAt using its eye, center and up_vector */
- void locate(void);
- /** sets the eye values in points
- * @js setEye
- */
- void setEyeXYZ(float fEyeX, float fEyeY, float fEyeZ);
- /** sets the center values in points
- * @js setCenter
- */
- void setCenterXYZ(float fCenterX, float fCenterY, float fCenterZ);
- /** sets the up values
- * @js setUp
- */
- void setUpXYZ(float fUpX, float fUpY, float fUpZ);
-
- /** get the eye vector values in points
- * @js NA
- */
- void getEyeXYZ(float *pEyeX, float *pEyeY, float *pEyeZ);
- /** get the center vector values int points
- * @js NA
- */
- void getCenterXYZ(float *pCenterX, float *pCenterY, float *pCenterZ);
- /** get the up vector values
- * @js NA
- */
- void getUpXYZ(float *pUpX, float *pUpY, float *pUpZ);
-public:
- /** returns the Z eye */
- static float getZEye();
-
-private:
- DISALLOW_COPY_AND_ASSIGN(CCCamera);
-};
-
-// end of base_node group
-/// @}
-
-NS_CC_END
-
-#endif // __CCCAMERA_H__
diff --git a/cocos2dx/CCConfiguration.h b/cocos2dx/CCConfiguration.h
deleted file mode 100644
index c6f506d..0000000
--- a/cocos2dx/CCConfiguration.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 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.
-****************************************************************************/
-
-#ifndef __CCCONFIGURATION_H__
-#define __CCCONFIGURATION_H__
-
-#include "cocoa/CCObject.h"
-#include "CCGL.h"
-#include "cocoa/CCString.h"
-#include
-
-
-
-NS_CC_BEGIN
-
-typedef enum _ccConfigurationType {
- ConfigurationError,
- ConfigurationString,
- ConfigurationInt,
- ConfigurationDouble,
- ConfigurationBoolean
-} ccConfigurationType;
-
-
-/**
- * @addtogroup global
- * @{
- */
-/**
- @brief CCConfiguration contains some openGL variables
- @since v0.99.0
- */
-class CC_DLL CCConfiguration : public CCObject
-{
-public:
- /** returns a shared instance of CCConfiguration */
- static CCConfiguration *sharedConfiguration(void);
-
- /** purge the shared instance of CCConfiguration */
- static void purgeConfiguration(void);
-
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCConfiguration(void);
-
- /** OpenGL Max texture size. */
- int getMaxTextureSize(void) const;
-
- /** OpenGL Max Modelview Stack Depth. */
- int getMaxModelviewStackDepth(void) const;
-
- /** returns the maximum texture units
- @since v2.0.0
- */
- int getMaxTextureUnits(void) const;
-
- /** Whether or not the GPU supports NPOT (Non Power Of Two) textures.
- OpenGL ES 2.0 already supports NPOT (iOS).
-
- @since v0.99.2
- */
- bool supportsNPOT(void) const;
-
- /** Whether or not PVR Texture Compressed is supported */
- bool supportsPVRTC(void) const;
-
- /** Whether or not BGRA8888 textures are supported.
- @since v0.99.2
- */
- bool supportsBGRA8888(void) const;
-
- /** Whether or not glDiscardFramebufferEXT is supported
- @since v0.99.2
- */
- bool supportsDiscardFramebuffer(void) const;
-
- /** Whether or not shareable VAOs are supported.
- @since v2.0.0
- */
- bool supportsShareableVAO(void) const;
-
- /** returns whether or not an OpenGL is supported */
- bool checkForGLExtension(const std::string &searchName) const;
-
- bool init(void);
-
- /** returns the value of a given key as a string.
- If the key is not found, it will return the default value */
- const char* getCString( const char *key, const char *default_value=NULL ) const;
-
- /** returns the value of a given key as a boolean.
- If the key is not found, it will return the default value */
- bool getBool( const char *key, bool default_value=false ) const;
-
- /** returns the value of a given key as a double.
- If the key is not found, it will return the default value */
- double getNumber( const char *key, double default_value=0.0 ) const;
-
- /** returns the value of a given key as a double */
- CCObject * getObject( const char *key ) const;
-
- /** sets a new key/value pair in the configuration dictionary */
- void setObject( const char *key, CCObject *value );
-
- /** dumps the current configuration on the console */
- void dumpInfo(void) const;
-
- /** gathers OpenGL / GPU information */
- void gatherGPUInfo( void );
-
- /** Loads a config file. If the keys are already present, then they are going to be replaced. Otherwise the new keys are added. */
- void loadConfigFile( const char *filename );
-
-private:
- CCConfiguration(void);
- static CCConfiguration *s_gSharedConfiguration;
- static std::string s_sConfigfile;
-
-protected:
- GLint m_nMaxTextureSize;
- GLint m_nMaxModelviewStackDepth;
- bool m_bSupportsPVRTC;
- bool m_bSupportsNPOT;
- bool m_bSupportsBGRA8888;
- bool m_bSupportsDiscardFramebuffer;
- bool m_bSupportsShareableVAO;
- GLint m_nMaxSamplesAllowed;
- GLint m_nMaxTextureUnits;
- char * m_pGlExtensions;
-
- CCDictionary *m_pValueDict;
-};
-
-// end of global group
-/// @}
-
-NS_CC_END
-
-#endif // __CCCONFIGURATION_H__
diff --git a/cocos2dx/CCDirector.h b/cocos2dx/CCDirector.h
deleted file mode 100644
index 936cdea..0000000
--- a/cocos2dx/CCDirector.h
+++ /dev/null
@@ -1,570 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCDIRECTOR_H__
-#define __CCDIRECTOR_H__
-
-#include "platform/CCPlatformMacros.h"
-#include "cocoa/CCObject.h"
-#include "ccTypes.h"
-#include "cocoa/CCGeometry.h"
-#include "cocoa/CCArray.h"
-#include "CCGL.h"
-#include "kazmath/mat4.h"
-#include "label_nodes/CCLabelAtlas.h"
-#include "ccTypeInfo.h"
-
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup base_nodes
- * @{
- */
-
-/** @typedef ccDirectorProjection
- Possible OpenGL projections used by director
- */
-typedef enum {
- /// sets a 2D projection (orthogonal projection)
- kCCDirectorProjection2D,
-
- /// sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
- kCCDirectorProjection3D,
-
- /// it calls "updateProjection" on the projection delegate.
- kCCDirectorProjectionCustom,
-
- /// Default projection is 3D projection
- kCCDirectorProjectionDefault = kCCDirectorProjection3D,
-} ccDirectorProjection;
-
-RT_ADD(
- typedef enum {
- kTextureQualityLow = 1,
- kTextureQualityMedium,
- kTextureQualityHigh
- } TextureQuality;
-
- typedef enum {
- kPopTransitionFade,
- kPopTransitionMoveInT
- } PopTransition;
-)
-
-
-/* Forward declarations. */
-class CCLabelAtlas;
-class CCScene;
-class CCEGLView;
-class CCDirectorDelegate;
-class CCNode;
-class CCScheduler;
-class CCActionManager;
-class CCTouchDispatcher;
-class CCKeypadDispatcher;
-class CCAccelerometer;
-RT_ADD(
- class CCKeyboardDispatcher;
- class CCMouseDispatcher;
- class CCSceneDelegate;
-)
-
-/**
-@brief Class that creates and handle the main Window and manages how
-and when to execute the Scenes.
-
- The CCDirector is also responsible for:
- - initializing the OpenGL context
- - setting the OpenGL pixel format (default on is RGB565)
- - setting the OpenGL buffer depth (default one is 0-bit)
- - setting the projection (default one is 3D)
- - setting the orientation (default one is Portrait)
-
- Since the CCDirector is a singleton, the standard way to use it is by calling:
- _ CCDirector::sharedDirector()->methodName();
-
- The CCDirector also sets the default OpenGL context:
- - GL_TEXTURE_2D is enabled
- - GL_VERTEX_ARRAY is enabled
- - GL_COLOR_ARRAY is enabled
- - GL_TEXTURE_COORD_ARRAY is enabled
-*/
-class CC_DLL CCDirector : public CCObject, public TypeInfo
-{
-public:
- /**
- * @js ctor
- */
- CCDirector(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCDirector(void);
- virtual bool init(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual long getClassTypeInfo() {
- static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCDirector).name());
- return id;
- }
-
- // attribute
-
- /** Get current running Scene. Director can only run one Scene at the time */
- inline CCScene* getRunningScene(void) { return m_pRunningScene; }
-
- /** Get the FPS value */
- inline double getAnimationInterval(void) { return m_dAnimationInterval; }
- /** Set the FPS value. */
- virtual void setAnimationInterval(double dValue) = 0;
-
- /** Whether or not to display the FPS on the bottom-left corner */
- inline bool isDisplayStats(void) { return m_bDisplayStats; }
- /** Display the FPS on the bottom-left corner */
- inline void setDisplayStats(bool bDisplayStats) { m_bDisplayStats = bDisplayStats; }
-
- /** seconds per frame */
- inline float getSecondsPerFrame() { return m_fSecondsPerFrame; }
-
- /** Get the CCEGLView, where everything is rendered
- * @js NA
- */
- inline CCEGLView* getOpenGLView(void) { return m_pobOpenGLView; }
- void setOpenGLView(CCEGLView *pobOpenGLView);
-
- inline bool isNextDeltaTimeZero(void) { return m_bNextDeltaTimeZero; }
- void setNextDeltaTimeZero(bool bNextDeltaTimeZero);
-
- /** Whether or not the Director is paused */
- inline bool isPaused(void) { return m_bPaused; }
-
- /** How many frames were called since the director started */
- inline unsigned int getTotalFrames(void) { return m_uTotalFrames; }
-
- /** Sets an OpenGL projection
- @since v0.8.2
- @js NA
- */
- inline ccDirectorProjection getProjection(void) { return m_eProjection; }
- void setProjection(ccDirectorProjection kProjection);
- /** reshape projection matrix when canvas has been change"*/
- void reshapeProjection(const CCSize& newWindowSize);
-
- /** Sets the glViewport*/
- void setViewport();
-
- /** How many frames were called since the director started */
-
-
- /** Whether or not the replaced scene will receive the cleanup message.
- If the new scene is pushed, then the old scene won't receive the "cleanup" message.
- If the new scene replaces the old one, the it will receive the "cleanup" message.
- @since v0.99.0
- */
- inline bool isSendCleanupToScene(void) { return m_bSendCleanupToScene; }
-
- /** This object will be visited after the main scene is visited.
- This object MUST implement the "visit" selector.
- Useful to hook a notification object, like CCNotifications (http://github.com/manucorporat/CCNotifications)
- @since v0.99.5
- */
- CCNode* getNotificationNode();
- void setNotificationNode(CCNode *node);
-
- /** CCDirector delegate. It shall implemente the CCDirectorDelegate protocol
- @since v0.99.5
- */
- CCDirectorDelegate* getDelegate() const;
- void setDelegate(CCDirectorDelegate* pDelegate);
-
- // window size
-
- /** returns the size of the OpenGL view in points.
- */
- CCSize getWinSize(void);
-
- /** returns the size of the OpenGL view in pixels.
- */
- CCSize getWinSizeInPixels(void);
-
- /** returns visible size of the OpenGL view in points.
- * the value is equal to getWinSize if don't invoke
- * CCEGLView::setDesignResolutionSize()
- */
- CCSize getVisibleSize();
-
- /** returns visible origin of the OpenGL view in points.
- */
- CCPoint getVisibleOrigin();
-
- /** converts a UIKit coordinate to an OpenGL coordinate
- Useful to convert (multi) touch coordinates to the current layout (portrait or landscape)
- */
- CCPoint convertToGL(const CCPoint& obPoint);
-
- /** converts an OpenGL coordinate to a UIKit coordinate
- Useful to convert node points to window points for calls such as glScissor
- */
- CCPoint convertToUI(const CCPoint& obPoint);
-
- /// XXX: missing description
- float getZEye(void);
-
- // Scene Management
-
- /** Enters the Director's main loop with the given Scene.
- * Call it to run only your FIRST scene.
- * Don't call it if there is already a running scene.
- *
- * It will call pushScene: and then it will call startAnimation
- */
- void runWithScene(CCScene *pScene);
-
- /** Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
- * The new scene will be executed.
- * Try to avoid big stacks of pushed scenes to reduce memory allocation.
- * ONLY call it if there is a running scene.
- */
- RT_REMOVE( void pushScene(CCScene *pScene); )
- RT_ADD( bool pushScene(CCScene *pScene); )
-
- /** Pops out a scene from the queue.
- * This scene will replace the running one.
- * The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
- * ONLY call it if there is a running scene.
- */
- void popScene(void);
-
- /** Pops out all scenes from the queue until the root scene in the queue.
- * This scene will replace the running one.
- * Internally it will call `popToSceneStackLevel(1)`
- */
- void popToRootScene(void);
-
- /** Pops out all scenes from the queue until it reaches `level`.
- If level is 0, it will end the director.
- If level is 1, it will pop all scenes until it reaches to root scene.
- If level is <= than the current stack level, it won't do anything.
- */
- void popToSceneStackLevel(int level);
-
- /** Replaces the running scene with a new one. The running scene is terminated.
- * ONLY call it if there is a running scene.
- */
- RT_REMOVE( void replaceScene(CCScene *pScene); )
- RT_ADD( bool replaceScene(CCScene *pScene); )
-
- /** Ends the execution, releases the running scene.
- It doesn't remove the OpenGL view from its parent. You have to do it manually.
- */
- void end(void);
-
- /** Pauses the running scene.
- The running scene will be _drawed_ but all scheduled timers will be paused
- While paused, the draw rate will be 4 FPS to reduce CPU consumption
- */
- void pause(void);
-
- /** Resumes the paused scene
- The scheduled timers will be activated again.
- The "delta time" will be 0 (as if the game wasn't paused)
- */
- void resume(void);
-
- /** Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
- If you don't want to pause your animation call [pause] instead.
- */
- virtual void stopAnimation(void) = 0;
-
- /** The main loop is triggered again.
- Call this function only if [stopAnimation] was called earlier
- @warning Don't call this function to start the main loop. To run the main loop call runWithScene
- */
- virtual void startAnimation(void) = 0;
-
- /** Draw the scene.
- This method is called every frame. Don't call it manually.
- */
- void drawScene(void);
-
- // Memory Helper
-
- /** Removes cached all cocos2d cached data.
- It will purge the CCTextureCache, CCSpriteFrameCache, CCLabelBMFont cache
- @since v0.99.3
- */
- void purgeCachedData(void);
-
- /** sets the default values based on the CCConfiguration info */
- void setDefaultValues(void);
-
- // OpenGL Helper
-
- /** sets the OpenGL default values */
- void setGLDefaultValues(void);
-
- /** enables/disables OpenGL alpha blending */
- void setAlphaBlending(bool bOn);
-
- /** enables/disables OpenGL depth test */
- void setDepthTest(bool bOn);
-
- virtual void mainLoop(void) = 0;
-
- /** The size in pixels of the surface. It could be different than the screen size.
- High-res devices might have a higher surface size than the screen size.
- Only available when compiled using SDK >= 4.0.
- @since v0.99.4
- */
- void setContentScaleFactor(float scaleFactor);
- float getContentScaleFactor(void);
-
- RT_ADD(
- public:
- CCDirector(const CCDirector&);
-
- CCDirector& operator=(const CCDirector&);
-
- void checkSceneReference(void);
-
- CCScene* getNextScene(void);
- int levelForSceneInStack(CCScene*);
- bool popSceneWithTransition(float, PopTransition);
- void popToSceneInStack(CCScene*);
- int sceneCount(void);
- void willSwitchToScene(CCScene*);
-
- void removeStatsLabel(void);
-
- void resetSmoothFixCounter(void);
- void setDeltaTime(float);
-
- void setupScreenScale(CCSize, CCSize, TextureQuality);
- void updateContentScale(TextureQuality);
- void updateScreenScale(CCSize);
- TextureQuality getLoadedTextureQuality(void) const;
-
- protected:
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactor, ScreenScaleFactor);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactorMax, ScreenScaleFactorMax);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactorW, ScreenScaleFactorW);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactorH, ScreenScaleFactorH);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenTop, ScreenTop);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenBottom, ScreenBottom);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenLeft, ScreenLeft);
- CC_SYNTHESIZE_READONLY_NV(float, m_fScreenRight, ScreenRight);
- CC_SYNTHESIZE_NV(CCScene*, m_pSceneReference, SceneReference);
- )
-
-public:
- /** CCScheduler associated with this director
- @since v2.0
- */
- CC_PROPERTY(CCScheduler*, m_pScheduler, Scheduler);
-
- /** CCActionManager associated with this director
- @since v2.0
- */
- CC_PROPERTY(CCActionManager*, m_pActionManager, ActionManager);
-
- /** CCTouchDispatcher associated with this director
- @since v2.0
- */
- CC_PROPERTY(CCTouchDispatcher*, m_pTouchDispatcher, TouchDispatcher);
-
- /** CCKeypadDispatcher associated with this director
- @since v2.0
- */
- CC_PROPERTY(CCKeypadDispatcher*, m_pKeypadDispatcher, KeypadDispatcher);
-
- RT_ADD(
- CC_PROPERTY(CCKeyboardDispatcher*, m_pKeyboardDispatcher, KeyboardDispatcher);
-
- CC_PROPERTY(CCMouseDispatcher*, m_pMouseDispatcher, MouseDispatcher);
- )
-
- /** CCAccelerometer associated with this director
- @since v2.0
- @js NA
- @lua NA
- */
- CC_PROPERTY(CCAccelerometer*, m_pAccelerometer, Accelerometer);
-
- /* delta time since last tick to main loop */
- CC_PROPERTY_READONLY(float, m_fDeltaTime, DeltaTime);
-
- /* *actual* delta time, according to rob. not sure what that means but i'm not arguing */
- RT_ADD(
- CC_SYNTHESIZE_NV(float, m_fActualDeltaTime, ActualDeltaTime);
- )
-
-
-public:
- /** returns a shared instance of the director
- * @js getInstance
- */
- static CCDirector* sharedDirector(void);
-
-protected:
-
- void purgeDirector();
- RT_ADD(
- CC_SYNTHESIZE_READONLY_NV(bool, m_bIsTransitioning, IsTransitioning); // if in a CCTransitionScene
-
- CC_SYNTHESIZE_NV(bool, m_bSmoothFix, SmoothFix); // if smooth fix is on
- CC_SYNTHESIZE_NV(bool, m_bSmoothFixCheck, SmoothFixCheck); // not exactly sure what this is, but the name says something ig
- CC_SYNTHESIZE_NV(bool, m_bForceSmoothFix, ForceSmoothFix); // if "force smooth fix" is on or not
- CC_SYNTHESIZE_READONLY_NV(int, m_nSmoothFixCounter, SmoothFixCounter); // not sure about this one either
- )
-
- bool m_bPurgeDirecotorInNextLoop; // this flag will be set to true in end()
-
- void setNextScene(void);
-
- void showStats();
- void createStatsLabel();
- void calculateMPF();
- void getFPSImageData(unsigned char** datapointer, unsigned int* length);
-
- /** calculates delta time since last time it was called */
- void calculateDeltaTime();
-protected:
- /* The CCEGLView, where everything is rendered */
- CCEGLView *m_pobOpenGLView;
-
- RT_ADD(
- // this is never referenced; probably optimized out
- PAD(0x4);
- )
-
- double m_dAnimationInterval;
- double m_dOldAnimationInterval;
-
- /* landscape mode ? */
- bool m_bLandscape;
-
- bool m_bDisplayStats;
- float m_fAccumDt;
- float m_fFrameRate;
-
- CCLabelAtlas *m_pFPSLabel;
- CCLabelAtlas *m_pSPFLabel;
- CCLabelAtlas *m_pDrawsLabel;
-
- /** Whether or not the Director is paused */
- bool m_bPaused;
-
- /* How many frames were called since the director started */
- unsigned int m_uTotalFrames;
- unsigned int m_uFrames;
- float m_fSecondsPerFrame;
-
- /* The running scene */
- CCScene *m_pRunningScene;
-
- /* will be the next 'runningScene' in the next frame
- nextScene is a weak reference. */
- CCScene *m_pNextScene;
-
- /* If YES, then "old" scene will receive the cleanup message */
- bool m_bSendCleanupToScene;
-
- /* scheduled scenes */
- CCArray* m_pobScenesStack;
-
- /* last time the main loop was updated */
- struct cc_timeval *m_pLastUpdate;
-
- /* whether or not the next delta time will be zero */
- bool m_bNextDeltaTimeZero;
-
- /* projection used */
- ccDirectorProjection m_eProjection;
-
- /* window size in points */
- CCSize m_obWinSizeInPoints;
-
- /* content scale factor */
- float m_fContentScaleFactor;
-
- /* store the fps string */
- char *m_pszFPS;
-
- /* This object will be visited after the scene. Useful to hook a notification node */
- CCNode *m_pNotificationNode;
-
- /* Projection protocol delegate */
- CCDirectorDelegate *m_pProjectionDelegate;
-
- RT_ADD(
- CC_PROPERTY(CCSceneDelegate*, m_pAppDelegate, SceneDelegate);
- CCSize m_obScaleFactor;
- CCSize m_obResolutionInPixels;
- TextureQuality m_eTextureQuality;
- CC_SYNTHESIZE_NV(bool, m_bDontCallWillSwitch, DontCallWillSwitch);
- )
-
- // CCEGLViewProtocol will recreate stats labels to fit visible rect
- friend class CCEGLViewProtocol;
-};
-
-/**
- @brief DisplayLinkDirector is a Director that synchronizes timers with the refresh rate of the display.
-
- Features and Limitations:
- - Scheduled timers & drawing are synchronizes with the refresh rate of the display
- - Only supports animation intervals of 1/60 1/30 & 1/15
-
- @since v0.8.2
- @js NA
- @lua NA
- */
-class CCDisplayLinkDirector : public CCDirector
-{
-public:
- CCDisplayLinkDirector(void)
- : m_bInvalid(false)
- {}
-
- virtual void mainLoop(void);
- virtual void setAnimationInterval(double dValue);
- virtual void startAnimation(void);
- virtual void stopAnimation();
-
-protected:
- bool m_bInvalid;
-};
-
-// end of base_node group
-/// @}
-
-NS_CC_END
-
-#endif // __CCDIRECTOR_H__
diff --git a/cocos2dx/CCScheduler.h b/cocos2dx/CCScheduler.h
deleted file mode 100644
index 8c12e2d..0000000
--- a/cocos2dx/CCScheduler.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCSCHEDULER_H__
-#define __CCSCHEDULER_H__
-
-#include "cocoa/CCObject.h"
-#include "support/data_support/uthash.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup global
- * @{
- */
-
-// Priority level reserved for system services.
-#define kCCPrioritySystem INT_MIN
-
-// Minimum priority level for user scheduling.
-#define kCCPriorityNonSystemMin (kCCPrioritySystem+1)
-
-class CCSet;
-//
-// CCTimer
-//
-/** @brief Light-weight timer */
-//
-class CC_DLL CCTimer : public CCObject
-{
-public:
- /**
- * @js ctor
- * @lua NA
- */
- CCTimer(void);
-
- /** get interval in seconds */
- float getInterval(void) const;
- /** set interval in seconds */
- void setInterval(float fInterval);
- /**
- * @lua NA
- */
- SEL_SCHEDULE getSelector() const;
-
- /** Initializes a timer with a target and a selector.
- * @lua NA
- */
- bool initWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector);
-
- /** Initializes a timer with a target, a selector and an interval in seconds, repeat in number of times to repeat, delay in seconds.
- * @lua NA
- */
- bool initWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector, float fSeconds, unsigned int nRepeat, float fDelay);
-
- /** Initializes a timer with a script callback function and an interval in seconds. */
- bool initWithScriptHandler(int nHandler, float fSeconds);
-
- /** triggers the timer */
- void update(float dt);
-
-public:
- /** Allocates a timer with a target and a selector.
- * @lua NA
- */
- static CCTimer* timerWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector);
-
- /** Allocates a timer with a target, a selector and an interval in seconds.
- * @lua NA
- */
- static CCTimer* timerWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector, float fSeconds);
-
- /** Allocates a timer with a script callback function and an interval in seconds. */
- static CCTimer* timerWithScriptHandler(int nHandler, float fSeconds);
- /**
- * @lua NA
- */
- inline int getScriptHandler() { return m_nScriptHandler; };
-
-protected:
- CCObject *m_pTarget;
- float m_fElapsed;
- bool m_bRunForever;
- bool m_bUseDelay;
- unsigned int m_uTimesExecuted;
- unsigned int m_uRepeat; //0 = once, 1 is 2 x executed
- float m_fDelay;
- float m_fInterval;
- SEL_SCHEDULE m_pfnSelector;
-
- int m_nScriptHandler;
-};
-
-//
-// CCScheduler
-//
-struct _listEntry;
-struct _hashSelectorEntry;
-struct _hashUpdateEntry;
-
-class CCArray;
-
-/** @brief Scheduler is responsible for triggering the scheduled callbacks.
-You should not use NSTimer. Instead use this class.
-
-There are 2 different types of callbacks (selectors):
-
-- update selector: the 'update' selector will be called every frame. You can customize the priority.
-- custom selector: A custom selector will be called every frame, or with a custom interval of time
-
-The 'custom selectors' should be avoided when possible. It is faster, and consumes less memory to use the 'update selector'.
-
-*/
-class CC_DLL CCScheduler : public CCObject
-{
-public:
- CCScheduler();
- /**
- * @js NA
- * @lua NA
- */
- ~CCScheduler(void);
-
- inline float getTimeScale(void) { return m_fTimeScale; }
- /** Modifies the time of all scheduled callbacks.
- You can use this property to create a 'slow motion' or 'fast forward' effect.
- Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
- To create a 'fast forward' effect, use values higher than 1.0.
- @since v0.8
- @warning It will affect EVERY scheduled selector / action.
- */
- inline void setTimeScale(float fTimeScale) { m_fTimeScale = fTimeScale; }
-
- /** 'update' the scheduler.
- * You should NEVER call this method, unless you know what you are doing.
- * @js NA
- * @lua NA
- */
- void update(float dt);
-
- /** The scheduled method will be called every 'interval' seconds.
- If paused is YES, then it won't be called until it is resumed.
- If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead.
- If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
- repeat let the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously
- delay is the amount of time the action will wait before it'll start
-
- @since v0.99.3, repeat and delay added in v1.1
- @js NA
- @lua NA
- */
- void scheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget, float fInterval, unsigned int repeat, float delay, bool bPaused);
-
- /** calls scheduleSelector with kCCRepeatForever and a 0 delay
- * @js NA
- * @lua NA
- */
- void scheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget, float fInterval, bool bPaused);
- /** Schedules the 'update' selector for a given target with a given priority.
- The 'update' selector will be called every frame.
- The lower the priority, the earlier it is called.
- @since v0.99.3
- @lua NA
- */
- void scheduleUpdateForTarget(CCObject *pTarget, int nPriority, bool bPaused);
-
- /** Unschedule a selector for a given target.
- If you want to unschedule the "update", use unscheudleUpdateForTarget.
- @since v0.99.3
- @lua NA
- */
- void unscheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget);
-
- /** Unschedules the update selector for a given target
- @since v0.99.3
- @lua NA
- */
- void unscheduleUpdateForTarget(const CCObject *pTarget);
-
- /** Unschedules all selectors for a given target.
- This also includes the "update" selector.
- @since v0.99.3
- @js unscheduleCallbackForTarget
- @lua NA
- */
- void unscheduleAllForTarget(CCObject *pTarget);
-
- /** Unschedules all selectors from all targets.
- You should NEVER call this method, unless you know what you are doing.
-
- @since v0.99.3
- @js unscheduleAllCallbacks
- @lua NA
- */
- void unscheduleAll(void);
-
- /** Unschedules all selectors from all targets with a minimum priority.
- You should only call this with kCCPriorityNonSystemMin or higher.
- @since v2.0.0
- @js unscheduleAllCallbacksWithMinPriority
- @lua NA
- */
- void unscheduleAllWithMinPriority(int nMinPriority);
-
- /** The scheduled script callback will be called every 'interval' seconds.
- If paused is YES, then it won't be called until it is resumed.
- If 'interval' is 0, it will be called every frame.
- return schedule script entry ID, used for unscheduleScriptFunc().
- @js NA
- */
- unsigned int scheduleScriptFunc(unsigned int nHandler, float fInterval, bool bPaused);
-
- /** Unschedule a script entry.
- * @js NA
- */
- void unscheduleScriptEntry(unsigned int uScheduleScriptEntryID);
-
- /** Pauses the target.
- All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed.
- If the target is not present, nothing happens.
- @since v0.99.3
- @lua NA
- */
- void pauseTarget(CCObject *pTarget);
-
- /** Resumes the target.
- The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again.
- If the target is not present, nothing happens.
- @since v0.99.3
- @lua NA
- */
- void resumeTarget(CCObject *pTarget);
-
- /** Returns whether or not the target is paused
- @since v1.0.0
- @lua NA
- */
- bool isTargetPaused(CCObject *pTarget);
-
- /** Pause all selectors from all targets.
- You should NEVER call this method, unless you know what you are doing.
- @since v2.0.0
- @lua NA
- */
- CCSet* pauseAllTargets();
-
- /** Pause all selectors from all targets with a minimum priority.
- You should only call this with kCCPriorityNonSystemMin or higher.
- @since v2.0.0
- @lua NA
- */
- CCSet* pauseAllTargetsWithMinPriority(int nMinPriority);
-
- /** Resume selectors on a set of targets.
- This can be useful for undoing a call to pauseAllSelectors.
- @since v2.0.0
- @lua NA
- */
- void resumeTargets(CCSet* targetsToResume);
-
-private:
- void removeHashElement(struct _hashSelectorEntry *pElement);
- void removeUpdateFromHash(struct _listEntry *entry);
-
- // update specific
-
- void priorityIn(struct _listEntry **ppList, CCObject *pTarget, int nPriority, bool bPaused);
- void appendIn(struct _listEntry **ppList, CCObject *pTarget, bool bPaused);
-
-protected:
- float m_fTimeScale;
-
- //
- // "updates with priority" stuff
- //
- struct _listEntry *m_pUpdatesNegList; // list of priority < 0
- struct _listEntry *m_pUpdates0List; // list priority == 0
- struct _listEntry *m_pUpdatesPosList; // list priority > 0
- struct _hashUpdateEntry *m_pHashForUpdates; // hash used to fetch quickly the list entries for pause,delete,etc
-
- // Used for "selectors with interval"
- struct _hashSelectorEntry *m_pHashForTimers;
- struct _hashSelectorEntry *m_pCurrentTarget;
- bool m_bCurrentTargetSalvaged;
- // If true unschedule will not remove anything from a hash. Elements will only be marked for deletion.
- bool m_bUpdateHashLocked;
- CCArray* m_pScriptHandlerEntries;
-};
-
-// end of global group
-/// @}
-
-NS_CC_END
-
-#endif // __CCSCHEDULER_H__
diff --git a/cocos2dx/actions/CCAction.h b/cocos2dx/actions/CCAction.h
deleted file mode 100644
index dc1b18a..0000000
--- a/cocos2dx/actions/CCAction.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __ACTIONS_CCACTION_H__
-#define __ACTIONS_CCACTION_H__
-
-#include "cocoa/CCObject.h"
-#include "cocoa/CCGeometry.h"
-#include "platform/CCPlatformMacros.h"
-
-NS_CC_BEGIN
-
-enum {
- //! Default tag
- kCCActionTagInvalid = -1,
-};
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
-@brief Base class for CCAction objects.
- */
-class CC_DLL CCAction : public CCObject
-{
-public:
- /**
- * @js ctor
- */
- CCAction(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCAction(void);
- /**
- * @js NA
- * @lua NA
- */
- const char* description();
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-
- //! return true if the action has finished
- virtual bool isDone(void);
-
- //! called before the action start. It will also set the target.
- virtual void startWithTarget(CCNode *pTarget);
-
- /**
- called after the action has finished. It will set the 'target' to nil.
- IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);"
- */
- virtual void stop(void);
-
- //! called every frame with it's delta time. DON'T override unless you know what you are doing.
- virtual void step(float dt);
-
- /**
- called once per frame. time a value between 0 and 1
-
- For example:
- - 0 means that the action just started
- - 0.5 means that the action is in the middle
- - 1 means that the action is over
- */
- virtual void update(float time);
-
- inline CCNode* getTarget(void) { return m_pTarget; }
- /** The action will modify the target properties. */
- inline void setTarget(CCNode *pTarget) { m_pTarget = pTarget; }
-
- inline CCNode* getOriginalTarget(void) { return m_pOriginalTarget; }
- /** Set the original target, since target can be nil.
- Is the target that were used to run the action. Unless you are doing something complex, like CCActionManager, you should NOT call this method.
- The target is 'assigned', it is not 'retained'.
- @since v0.8.2
- */
- inline void setOriginalTarget(CCNode *pOriginalTarget) { m_pOriginalTarget = pOriginalTarget; }
-
- inline int getTag(void) { return m_nTag; }
- inline void setTag(int nTag) { m_nTag = nTag; }
-
- RT_ADD(void setSpeedMod(float mod);)
-
-public:
- /** Create an action */
- static CCAction* create();
-protected:
- CCNode *m_pOriginalTarget;
- /** The "target".
- The target will be set with the 'startWithTarget' method.
- When the 'stop' method is called, target will be set to nil.
- The target is 'assigned', it is not 'retained'.
- */
- CCNode *m_pTarget;
- /** The action tag. An identifier of the action */
- int m_nTag;
- RT_ADD(float m_fSpeedMod;)
-};
-
-/**
-@brief
- Base class actions that do have a finite time duration.
- Possible actions:
- - An action with a duration of 0 seconds
- - An action with a duration of 35.5 seconds
-
- Infinite time actions are valid
- */
-class CC_DLL CCFiniteTimeAction : public CCAction
-{
-public:
- /**
- * @js ctor
- */
- CCFiniteTimeAction()
- : m_fDuration(0)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCFiniteTimeAction(){}
- //! get duration in seconds of the action
- inline float getDuration(void) { return m_fDuration; }
- //! set duration in seconds of the action
- inline void setDuration(float duration) { m_fDuration = duration; }
-
- /** returns a reversed action */
- virtual CCFiniteTimeAction* reverse(void);
-protected:
- //! duration in seconds
- float m_fDuration;
-};
-
-class CCActionInterval;
-class CCRepeatForever;
-
-/**
- @brief Changes the speed of an action, making it take longer (speed>1)
- or less (speed<1) time.
- Useful to simulate 'slow motion' or 'fast forward' effect.
- @warning This action can't be Sequenceable because it is not an CCIntervalAction
- */
-class CC_DLL CCSpeed : public CCAction
-{
-public:
- /**
- * @js ctor
- */
- CCSpeed()
- : m_fSpeed(0.0)
- , m_pInnerAction(NULL)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCSpeed(void);
-
- inline float getSpeed(void) { return m_fSpeed; }
- /** alter the speed of the inner function in runtime */
- inline void setSpeed(float fSpeed) { m_fSpeed = fSpeed; }
-
- /** initializes the action */
- bool initWithAction(CCActionInterval *pAction, float fSpeed);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual void startWithTarget(CCNode* pTarget);
- virtual void stop();
- virtual void step(float dt);
- virtual bool isDone(void);
- virtual CCActionInterval* reverse(void);
-
- void setInnerAction(CCActionInterval *pAction);
-
- inline CCActionInterval* getInnerAction()
- {
- return m_pInnerAction;
- }
-
-public:
- /** create the action */
- static CCSpeed* create(CCActionInterval* pAction, float fSpeed);
-protected:
- float m_fSpeed;
- CCActionInterval *m_pInnerAction;
-};
-
-/**
-@brief CCFollow is an action that "follows" a node.
-
-Eg:
-layer->runAction(CCFollow::actionWithTarget(hero));
-
-Instead of using CCCamera as a "follower", use this action instead.
-@since v0.99.2
-*/
-class CC_DLL CCFollow : public CCAction
-{
-public:
- /**
- * @js ctor
- */
- CCFollow()
- : m_pobFollowedNode(NULL)
- , m_bBoundarySet(false)
- , m_bBoundaryFullyCovered(false)
- , m_fLeftBoundary(0.0)
- , m_fRightBoundary(0.0)
- , m_fTopBoundary(0.0)
- , m_fBottomBoundary(0.0)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCFollow(void);
-
- inline bool isBoundarySet(void) { return m_bBoundarySet; }
- /** alter behavior - turn on/off boundary */
- inline void setBoudarySet(bool bValue) { m_bBoundarySet = bValue; }
-
- /** initializes the action with a set boundary */
- bool initWithTarget(CCNode *pFollowedNode, const CCRect& rect = CCRectZero);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual void step(float dt);
- virtual bool isDone(void);
- virtual void stop(void);
-
-public:
- /** creates the action with a set boundary,
- It will work with no boundary if @param rect is equal to CCRectZero.
- */
- static CCFollow* create(CCNode *pFollowedNode, const CCRect& rect = CCRectZero);
-protected:
- // node to follow
- CCNode *m_pobFollowedNode;
-
- // whether camera should be limited to certain area
- bool m_bBoundarySet;
-
- // if screen size is bigger than the boundary - update not needed
- bool m_bBoundaryFullyCovered;
-
- // fast access to the screen dimensions
- CCPoint m_obHalfScreenSize;
- CCPoint m_obFullScreenSize;
-
- // world boundaries
- float m_fLeftBoundary;
- float m_fRightBoundary;
- float m_fTopBoundary;
- float m_fBottomBoundary;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTIONS_CCACTION_H__
diff --git a/cocos2dx/actions/CCActionCamera.h b/cocos2dx/actions/CCActionCamera.h
deleted file mode 100644
index 62c3449..0000000
--- a/cocos2dx/actions/CCActionCamera.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-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.
-****************************************************************************/
-
-#ifndef __CCCAMERA_ACTION_H__
-#define __CCCAMERA_ACTION_H__
-
-#include "CCActionInterval.h"
-
-NS_CC_BEGIN
-
-class CCCamera;
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
-@brief Base class for CCCamera actions
-@ingroup Actions
-*/
-class CC_DLL CCActionCamera : public CCActionInterval //
-{
-public:
- /**
- * @js ctor
- */
- CCActionCamera()
- :m_fCenterXOrig(0)
- ,m_fCenterYOrig(0)
- ,m_fCenterZOrig(0)
- ,m_fEyeXOrig(0)
- ,m_fEyeYOrig(0)
- ,m_fEyeZOrig(0)
- ,m_fUpXOrig(0)
- ,m_fUpYOrig(0)
- ,m_fUpZOrig(0)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCActionCamera(){}
- // super methods
- virtual void startWithTarget(CCNode *pTarget);
- virtual CCActionInterval * reverse();
-protected:
- float m_fCenterXOrig;
- float m_fCenterYOrig;
- float m_fCenterZOrig;
-
- float m_fEyeXOrig;
- float m_fEyeYOrig;
- float m_fEyeZOrig;
-
- float m_fUpXOrig;
- float m_fUpYOrig;
- float m_fUpZOrig;
-};
-
-/**
-@brief CCOrbitCamera action
-Orbits the camera around the center of the screen using spherical coordinates
-@ingroup Actions
-*/
-class CC_DLL CCOrbitCamera : public CCActionCamera //
-{
-public:
- /**
- * @js ctor
- */
- CCOrbitCamera()
- : m_fRadius(0.0)
- , m_fDeltaRadius(0.0)
- , m_fAngleZ(0.0)
- , m_fDeltaAngleZ(0.0)
- , m_fAngleX(0.0)
- , m_fDeltaAngleX(0.0)
- , m_fRadZ(0.0)
- , m_fRadDeltaZ(0.0)
- , m_fRadX(0.0)
- , m_fRadDeltaX(0.0)
- {}
- /**
- * @js NA
- * @lua NA
- */
- ~CCOrbitCamera(){}
-
- /** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
- static CCOrbitCamera* create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
-
- /** initializes a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
- bool initWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);
- /** positions the camera according to spherical coordinates */
- void sphericalRadius(float *r, float *zenith, float *azimuth);
- // super methods
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-protected:
- float m_fRadius;
- float m_fDeltaRadius;
- float m_fAngleZ;
- float m_fDeltaAngleZ;
- float m_fAngleX;
- float m_fDeltaAngleX;
-
- float m_fRadZ;
- float m_fRadDeltaZ;
- float m_fRadX;
- float m_fRadDeltaX;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif //__CCCAMERA_ACTION_H__
\ No newline at end of file
diff --git a/cocos2dx/actions/CCActionCatmullRom.h b/cocos2dx/actions/CCActionCatmullRom.h
deleted file mode 100644
index 85b5ca8..0000000
--- a/cocos2dx/actions/CCActionCatmullRom.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 2012 cocos2d-x.org
- * cocos2d for iPhone: http://www.cocos2d-iphone.org
- *
- * Copyright (c) 2008 Radu Gruian
- *
- * Copyright (c) 2011 Vit Valentin
- *
- *
- * 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.
- *
- *
- * Original code by Radu Gruian: http://www.codeproject.com/Articles/30838/Overhauser-Catmull-Rom-Splines-for-Camera-Animatio.So
- *
- * Adapted to cocos2d-x by Vit Valentin
- *
- * Adapted from cocos2d-x to cocos2d-iphone by Ricardo Quesada
- */
-
-
-#ifndef __CCACTION_CATMULLROM_H__
-#define __CCACTION_CATMULLROM_H__
-
-#include
-
-#include "CCActionInterval.h"
-#include "base_nodes/CCNode.h"
-#include "cocoa/CCGeometry.h"
-
-NS_CC_BEGIN;
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/** An Array that contain control points.
- * Used by CCCardinalSplineTo and (By) and CCCatmullRomTo (and By) actions.
- * @ingroup Actions
- * @js NA
- */
-class CC_DLL CCPointArray : public CCObject
-{
-public:
-
- /** creates and initializes a Points array with capacity
- * @lua NA
- */
- static CCPointArray* create(unsigned int capacity);
- /**
- * @lua NA
- */
- virtual ~CCPointArray();
- /**
- * @lua NA
- */
- CCPointArray();
-
- /** initializes a Catmull Rom config with a capacity hint */
- bool initWithCapacity(unsigned int capacity);
-
- /** appends a control point */
- void addControlPoint(CCPoint controlPoint);
-
- /** inserts a controlPoint at index */
- void insertControlPoint(CCPoint &controlPoint, unsigned int index);
-
- /** replaces an existing controlPoint at index */
- void replaceControlPoint(CCPoint &controlPoint, unsigned int index);
-
- /** get the value of a controlPoint at a given index */
- CCPoint getControlPointAtIndex(unsigned int index);
-
- /** deletes a control point at a given index */
- void removeControlPointAtIndex(unsigned int index);
-
- /** returns the number of objects of the control point array */
- unsigned int count();
-
- /** returns a new copy of the array reversed. User is responsible for releasing this copy */
- CCPointArray* reverse();
-
- /** reverse the current control point array inline, without generating a new one */
- void reverseInline();
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *zone);
-
- const std::vector* getControlPoints();
-
- void setControlPoints(std::vector *controlPoints);
-private:
- /** Array that contains the control points */
- std::vector *m_pControlPoints;
-};
-
-/** Cardinal Spline path.
- http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline
-@ingroup Actions
- */
-class CC_DLL CCCardinalSplineTo : public CCActionInterval
-{
-public:
-
- /** creates an action with a Cardinal Spline array of points and tension
- * @code
- * when thie function bound to js,the input params are changed
- * js:var create(var duration,var pointTable,var tension)
- * @endcode
- */
- static CCCardinalSplineTo* create(float duration, CCPointArray* points, float tension);
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCCardinalSplineTo();
- /**
- * @js ctor
- * @lua NA
- */
- CCCardinalSplineTo();
-
- /** initializes the action with a duration and an array of points
- * @lua NA
- */
- bool initWithDuration(float duration, CCPointArray* points, float tension);
-
- // super virtual functions
- /**
- * @js NA
- * @lua NA
- */
- virtual CCCardinalSplineTo* copyWithZone(CCZone* pZone);
- /**
- * @lua NA
- */
- virtual void startWithTarget(CCNode *pTarget);
- /**
- * @lua NA
- */
- virtual void update(float time);
- virtual CCActionInterval* reverse();
- /**
- * @lua NA
- */
- virtual void updatePosition(CCPoint &newPos);
-
- inline CCPointArray* getPoints() { return m_pPoints; }
- /**
- * @js NA
- */
- inline void setPoints(CCPointArray* points)
- {
- CC_SAFE_RETAIN(points);
- CC_SAFE_RELEASE(m_pPoints);
- m_pPoints = points;
- }
-
-protected:
- /** Array of control points */
- CCPointArray *m_pPoints;
- float m_fDeltaT;
- float m_fTension;
- CCPoint m_previousPosition;
- CCPoint m_accumulatedDiff;
-};
-
-/** Cardinal Spline path.
- http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline
- @ingroup Actions
- */
-class CC_DLL CCCardinalSplineBy : public CCCardinalSplineTo
-{
-public:
-
- /** creates an action with a Cardinal Spline array of points and tension
- * @code
- * when thie function bound to js,the input params are changed
- * js:var create(var duration,var pointTable,var tension)
- * @endcode
- */
- static CCCardinalSplineBy* create(float duration, CCPointArray* points, float tension);
- /**
- * @js NA
- * @lua NA
- */
- CCCardinalSplineBy();
- /**
- * @lua NA
- */
- virtual void startWithTarget(CCNode *pTarget);
- virtual CCActionInterval* reverse();
- /**
- * @lua NA
- */
- virtual void updatePosition(CCPoint &newPos);
-protected:
- CCPoint m_startPosition;
-};
-
-/** An action that moves the target with a CatmullRom curve to a destination point.
- A Catmull Rom is a Cardinal Spline with a tension of 0.5.
- http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline
- @ingroup Actions
- */
-class CC_DLL CCCatmullRomTo : public CCCardinalSplineTo
-{
-public:
-
- /** creates an action with a Cardinal Spline array of points and tension
- * @code
- * when this function bound to js,the input params are changed
- * js:var create(var dt,var pointTable)
- * @endcode
- */
- static CCCatmullRomTo* create(float dt, CCPointArray* points);
-
- /** initializes the action with a duration and an array of points
- * @js NA
- * @lua NA
- */
- bool initWithDuration(float dt, CCPointArray* points);
-};
-
-/** An action that moves the target with a CatmullRom curve by a certain distance.
- A Catmull Rom is a Cardinal Spline with a tension of 0.5.
- http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline
- @ingroup Actions
- */
-class CC_DLL CCCatmullRomBy : public CCCardinalSplineBy
-{
-public:
-
- /** creates an action with a Cardinal Spline array of points and tension
- * @code
- * when this function bound to js,the input params are changed
- * js:var create(var dt,var pointTable)
- * @endcode
- */
- static CCCatmullRomBy* create(float dt, CCPointArray* points);
-
- /** initializes the action with a duration and an array of points
- * @js NA
- * @lua NA
- */
- bool initWithDuration(float dt, CCPointArray* points);
-};
-
-/** Returns the Cardinal Spline position for a given set of control points, tension and time */
-extern CC_DLL CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, float tension, float t);
-
-// end of actions group
-/// @}
-
-NS_CC_END;
-
-#endif // __CCACTION_CATMULLROM_H__
diff --git a/cocos2dx/actions/CCActionEase.h b/cocos2dx/actions/CCActionEase.h
deleted file mode 100644
index b913e91..0000000
--- a/cocos2dx/actions/CCActionEase.h
+++ /dev/null
@@ -1,567 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2009 Jason Booth
-
-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.
-****************************************************************************/
-
-#ifndef __ACTION_CCEASE_ACTION_H__
-#define __ACTION_CCEASE_ACTION_H__
-
-#include "CCActionInterval.h"
-
-NS_CC_BEGIN
-
-class CCObject;
-class CCZone;
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
- @brief Base class for Easing actions
- @ingroup Actions
- */
-class CC_DLL CCActionEase : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCActionEase(void);
-
- /** initializes the action */
- bool initWithAction(CCActionInterval *pAction);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void stop(void);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- virtual CCActionInterval* getInnerAction();
-
-public:
-
- /** creates the action */
- static CCActionEase* create(CCActionInterval *pAction);
-
-protected:
- /** The inner action */
- CCActionInterval *m_pInner;
-};
-
-/**
- @brief Base class for Easing actions with rate parameters
- @ingroup Actions
- */
-class CC_DLL CCEaseRateAction : public CCActionEase
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCEaseRateAction(void);
-
- /** set rate value for the actions */
- inline void setRate(float rate) { m_fRate = rate; }
- /** get rate value for the actions */
- inline float getRate(void) { return m_fRate; }
-
- /** Initializes the action with the inner action and the rate parameter */
- bool initWithAction(CCActionInterval *pAction, float fRate);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** Creates the action with the inner action and the rate parameter */
- static CCEaseRateAction* create(CCActionInterval* pAction, float fRate);
-
-protected:
- float m_fRate;
-};
-
-/**
- @brief CCEaseIn action with a rate
- @ingroup Actions
- */
-class CC_DLL CCEaseIn : public CCEaseRateAction
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-public:
-
- /** Creates the action with the inner action and the rate parameter */
- static CCEaseIn* create(CCActionInterval* pAction, float fRate);
-};
-
-/**
- @brief CCEaseOut action with a rate
- @ingroup Actions
- */
-class CC_DLL CCEaseOut : public CCEaseRateAction
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse();
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** Creates the action with the inner action and the rate parameter */
- static CCEaseOut* create(CCActionInterval* pAction, float fRate);
-};
-
-/**
- @brief CCEaseInOut action with a rate
- @ingroup Actions
- */
-class CC_DLL CCEaseInOut : public CCEaseRateAction
-{
-public:
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** Creates the action with the inner action and the rate parameter */
- static CCEaseInOut* create(CCActionInterval* pAction, float fRate);
-};
-
-/**
- @brief CCEase Exponential In
- @ingroup Actions
- */
-class CC_DLL CCEaseExponentialIn : public CCActionEase
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action */
- static CCEaseExponentialIn* create(CCActionInterval* pAction);
-};
-
-/**
- @brief Ease Exponential Out
- @ingroup Actions
- */
-class CC_DLL CCEaseExponentialOut : public CCActionEase
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action */
- static CCEaseExponentialOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief Ease Exponential InOut
- @ingroup Actions
- */
-class CC_DLL CCEaseExponentialInOut : public CCActionEase
-{
-public:
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse();
-
-public:
-
- /** creates the action */
- static CCEaseExponentialInOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief Ease Sine In
- @ingroup Actions
- */
-class CC_DLL CCEaseSineIn : public CCActionEase
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action */
- static CCEaseSineIn* create(CCActionInterval* pAction);
-};
-
-/**
- @brief Ease Sine Out
- @ingroup Actions
- */
-class CC_DLL CCEaseSineOut : public CCActionEase
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCEaseSineOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief Ease Sine InOut
- @ingroup Actions
- */
-class CC_DLL CCEaseSineInOut : public CCActionEase
-{
-public:
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse();
-
-public:
-
- /** creates the action */
- static CCEaseSineInOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief Ease Elastic abstract class
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseElastic : public CCActionEase
-{
-public:
- /** get period of the wave in radians. default is 0.3 */
- inline float getPeriod(void) { return m_fPeriod; }
- /** set period of the wave in radians. */
- inline void setPeriod(float fPeriod) { m_fPeriod = fPeriod; }
-
- /** Initializes the action with the inner action and the period in radians (default is 0.3) */
- bool initWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
-
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** Creates the action with the inner action and the period in radians (default is 0.3) */
- static CCEaseElastic* create(CCActionInterval *pAction, float fPeriod);
- static CCEaseElastic* create(CCActionInterval *pAction);
-protected:
- float m_fPeriod;
-};
-
-/**
- @brief Ease Elastic In action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseElasticIn : public CCEaseElastic
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** Creates the action with the inner action and the period in radians (default is 0.3) */
- static CCEaseElasticIn* create(CCActionInterval *pAction, float fPeriod);
- static CCEaseElasticIn* create(CCActionInterval *pAction);
-};
-
-/**
- @brief Ease Elastic Out action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseElasticOut : public CCEaseElastic
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** Creates the action with the inner action and the period in radians (default is 0.3) */
- static CCEaseElasticOut* create(CCActionInterval *pAction, float fPeriod);
- static CCEaseElasticOut* create(CCActionInterval *pAction);
-};
-
-/**
- @brief Ease Elastic InOut action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseElasticInOut : public CCEaseElastic
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** Creates the action with the inner action and the period in radians (default is 0.3) */
- static CCEaseElasticInOut* create(CCActionInterval *pAction, float fPeriod);
- static CCEaseElasticInOut* create(CCActionInterval *pAction);
-};
-
-/**
- @brief CCEaseBounce abstract class.
- @since v0.8.2
- @ingroup Actions
-*/
-class CC_DLL CCEaseBounce : public CCActionEase
-{
-public:
- float bounceTime(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse();
-
-public:
-
- /** creates the action */
- static CCEaseBounce* create(CCActionInterval* pAction);
-};
-
-/**
- @brief CCEaseBounceIn action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
-*/
-class CC_DLL CCEaseBounceIn : public CCEaseBounce
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCEaseBounceIn* create(CCActionInterval* pAction);
-};
-
-/**
- @brief EaseBounceOut action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseBounceOut : public CCEaseBounce
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCEaseBounceOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief CCEaseBounceInOut action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseBounceInOut : public CCEaseBounce
-{
-public:
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse();
-
-public:
-
- /** creates the action */
- static CCEaseBounceInOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief CCEaseBackIn action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseBackIn : public CCActionEase
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCEaseBackIn* create(CCActionInterval* pAction);
-};
-
-/**
- @brief CCEaseBackOut action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseBackOut : public CCActionEase
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCEaseBackOut* create(CCActionInterval* pAction);
-};
-
-/**
- @brief CCEaseBackInOut action.
- @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action.
- @since v0.8.2
- @ingroup Actions
- */
-class CC_DLL CCEaseBackInOut : public CCActionEase
-{
-public:
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual CCActionInterval* reverse();
-
-public:
-
- /** creates the action */
- static CCEaseBackInOut* create(CCActionInterval* pAction);
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCEASE_ACTION_H__
diff --git a/cocos2dx/actions/CCActionGrid.h b/cocos2dx/actions/CCActionGrid.h
deleted file mode 100644
index 16fe732..0000000
--- a/cocos2dx/actions/CCActionGrid.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2009 On-Core
-
-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.
-****************************************************************************/
-#ifndef __ACTION_CCGRID_ACTION_H__
-#define __ACTION_CCGRID_ACTION_H__
-
-#include "CCActionInterval.h"
-#include "CCActionInstant.h"
-
-NS_CC_BEGIN
-
-class CCGridBase;
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/** @brief Base class for Grid actions */
-class CC_DLL CCGridAction : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual CCActionInterval* reverse(void);
-
- /** initializes the action with size and duration */
- virtual bool initWithDuration(float duration, const CCSize& gridSize);
-
- /** returns the grid */
- virtual CCGridBase* getGrid(void);
-
-public:
- /** creates the action with size and duration */
- // We can't make this create function compatible with previous version, bindings-generator will be confused since they
- // have the same function name and the same number of arguments. So sorry about that.
- //CC_DEPRECATED_ATTRIBUTE static CCGridAction* create(const CCSize& gridSize, float duration);
-
- /** creates the action with size and duration */
- static CCGridAction* create(float duration, const CCSize& gridSize);
-protected:
- CCSize m_sGridSize;
-};
-
-/**
- @brief Base class for CCGrid3D actions.
- Grid3D actions can modify a non-tiled grid.
- */
-class CC_DLL CCGrid3DAction : public CCGridAction
-{
-public:
- /** returns the grid */
- virtual CCGridBase* getGrid(void);
- /** returns the vertex than belongs to certain position in the grid */
- ccVertex3F vertex(const CCPoint& position);
- /** returns the non-transformed vertex than belongs to certain position in the grid */
- ccVertex3F originalVertex(const CCPoint& position);
- /** sets a new vertex to a certain position of the grid */
- void setVertex(const CCPoint& position, const ccVertex3F& vertex);
-
-public:
- /** creates the action with size and duration
- * @js NA
- * @lua NA
- */
- static CCGrid3DAction* create(float duration, const CCSize& gridSize);
-};
-
-/** @brief Base class for CCTiledGrid3D actions */
-class CC_DLL CCTiledGrid3DAction : public CCGridAction
-{
-public:
- /** returns the tile that belongs to a certain position of the grid */
- ccQuad3 tile(const CCPoint& position);
- /** returns the non-transformed tile that belongs to a certain position of the grid */
- ccQuad3 originalTile(const CCPoint& position);
- /** sets a new tile to a certain position of the grid */
- void setTile(const CCPoint& position, const ccQuad3& coords);
-
- /** returns the grid */
- virtual CCGridBase* getGrid(void);
-
-public:
- /** creates the action with size and duration
- * @js NA
- * @lua NA
- */
- static CCTiledGrid3DAction* create(float duration, const CCSize& gridSize);
-};
-
-/** @brief CCAccelDeccelAmplitude action */
-class CC_DLL CCAccelDeccelAmplitude : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCAccelDeccelAmplitude(void);
- /** initializes the action with an inner action that has the amplitude property, and a duration time */
- bool initWithAction(CCAction *pAction, float duration);
-
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
- /** get amplitude rate */
- inline float getRate(void) { return m_fRate; }
- /** set amplitude rate */
- inline void setRate(float fRate) { m_fRate = fRate; }
-
-public:
- /** creates the action with an inner action that has the amplitude property, and a duration time */
- static CCAccelDeccelAmplitude* create(CCAction *pAction, float duration);
-
-protected:
- float m_fRate;
- CCActionInterval *m_pOther;
-};
-
-/** @brief CCAccelAmplitude action */
-class CC_DLL CCAccelAmplitude : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCAccelAmplitude(void);
- /** initializes the action with an inner action that has the amplitude property, and a duration time */
- bool initWithAction(CCAction *pAction, float duration);
-
- /** get amplitude rate */
- inline float getRate(void) { return m_fRate; }
- /** set amplitude rate */
- inline void setRate(float fRate) { m_fRate = fRate; }
-
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates the action with an inner action that has the amplitude property, and a duration time */
- static CCAccelAmplitude* create(CCAction *pAction, float duration);
-protected:
- float m_fRate;
- CCActionInterval *m_pOther;
-};
-
-/** @brief CCDeccelAmplitude action */
-class CC_DLL CCDeccelAmplitude : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCDeccelAmplitude(void);
- /** initializes the action with an inner action that has the amplitude property, and a duration time */
- bool initWithAction(CCAction *pAction, float duration);
-
- /** get amplitude rate */
- inline float getRate(void) { return m_fRate; }
- /** set amplitude rate */
- inline void setRate(float fRate) { m_fRate = fRate; }
-
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates the action with an inner action that has the amplitude property, and a duration time */
- static CCDeccelAmplitude* create(CCAction *pAction, float duration);
-
-protected:
- float m_fRate;
- CCActionInterval *m_pOther;
-};
-
-/** @brief CCStopGrid action.
- @warning Don't call this action if another grid action is active.
- Call if you want to remove the the grid effect. Example:
- CCSequence::actions(Lens::action(...), CCStopGrid::action(...), NULL);
- */
-class CC_DLL CCStopGrid : public CCActionInstant
-{
-public:
- virtual void startWithTarget(CCNode *pTarget);
-
-public:
- /** Allocates and initializes the action */
- static CCStopGrid* create(void);
-};
-
-/** @brief CCReuseGrid action */
-class CC_DLL CCReuseGrid : public CCActionInstant
-{
-public:
- /** initializes an action with the number of times that the current grid will be reused */
- bool initWithTimes(int times);
-
- virtual void startWithTarget(CCNode *pTarget);
-
-public:
- /** creates an action with the number of times that the current grid will be reused */
- static CCReuseGrid* create(int times);
-protected:
- int m_nTimes;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCGRID_ACTION_H__
diff --git a/cocos2dx/actions/CCActionGrid3D.h b/cocos2dx/actions/CCActionGrid3D.h
deleted file mode 100644
index 3e52850..0000000
--- a/cocos2dx/actions/CCActionGrid3D.h
+++ /dev/null
@@ -1,296 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2009 On-Core
-
-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.
-****************************************************************************/
-#ifndef __ACTION_CCGRID3D_ACTION_H__
-#define __ACTION_CCGRID3D_ACTION_H__
-
-#include "CCActionGrid.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
-@brief CCWaves3D action
-*/
-class CC_DLL CCWaves3D : public CCGrid3DAction
-{
-public:
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes an action with duration, grid size, waves and amplitude */
- bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates an action with duration, grid size, waves and amplitude */
- static CCWaves3D* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude);
-protected:
- unsigned int m_nWaves;
- float m_fAmplitude;
- float m_fAmplitudeRate;
-};
-
-/** @brief CCFlipX3D action */
-class CC_DLL CCFlipX3D : public CCGrid3DAction
-{
-public:
- /** initializes the action with duration */
- virtual bool initWithDuration(float duration);
- virtual bool initWithSize(const CCSize& gridSize, float duration);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with duration */
- static CCFlipX3D* create(float duration);
-};
-
-/** @brief CCFlipY3D action */
-class CC_DLL CCFlipY3D : public CCFlipX3D
-{
-public:
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action with duration */
- static CCFlipY3D* create(float duration);
-};
-
-/** @brief CCLens3D action */
-class CC_DLL CCLens3D : public CCGrid3DAction
-{
-public:
- /** Get lens center position */
- inline float getLensEffect(void) { return m_fLensEffect; }
- /** Set lens center position */
- inline void setLensEffect(float fLensEffect) { m_fLensEffect = fLensEffect; }
- /** Set whether lens is concave */
- inline void setConcave(bool bConcave) { m_bConcave = bConcave; }
-
- inline const CCPoint& getPosition(void) { return m_position; }
- void setPosition(const CCPoint& position);
-
- /** initializes the action with center position, radius, a grid size and duration */
- bool initWithDuration(float duration, const CCSize& gridSize, const CCPoint& position, float radius);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with center position, radius, a grid size and duration */
- static CCLens3D* create(float duration, const CCSize& gridSize, const CCPoint& position, float radius);
-protected:
- /* lens center position */
- CCPoint m_position;
- float m_fRadius;
- /** lens effect. Defaults to 0.7 - 0 means no effect, 1 is very strong effect */
- float m_fLensEffect;
- /** lens is concave. (true = concave, false = convex) default is convex i.e. false */
- bool m_bConcave;
-
- bool m_bDirty;
-};
-
-/** @brief CCRipple3D action */
-class CC_DLL CCRipple3D : public CCGrid3DAction
-{
-public:
- /** get center position */
- inline const CCPoint& getPosition(void) { return m_position; }
- /** set center position */
- void setPosition(const CCPoint& position);
-
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes the action with radius, number of waves, amplitude, a grid size and duration */
- bool initWithDuration(float duration, const CCSize& gridSize, const CCPoint& position, float radius, unsigned int waves, float amplitude);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with radius, number of waves, amplitude, a grid size and duration */
- static CCRipple3D* create(float duration, const CCSize& gridSize, const CCPoint& position, float radius, unsigned int waves, float amplitude);
-protected:
- /* center position */
- CCPoint m_position;
- float m_fRadius;
- unsigned int m_nWaves;
- float m_fAmplitude;
- float m_fAmplitudeRate;
-};
-
-/** @brief CCShaky3D action */
-class CC_DLL CCShaky3D : public CCGrid3DAction
-{
-public:
- /** initializes the action with a range, shake Z vertices, a grid and duration */
- bool initWithDuration(float duration, const CCSize& gridSize, int range, bool shakeZ);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with a range, shake Z vertices, a grid and duration */
- static CCShaky3D* create(float duration, const CCSize& gridSize, int range, bool shakeZ);
-protected:
- int m_nRandrange;
- bool m_bShakeZ;
-};
-
-/** @brief CCLiquid action */
-class CC_DLL CCLiquid : public CCGrid3DAction
-{
-public:
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes the action with amplitude, a grid and duration */
- bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with amplitude, a grid and duration */
- static CCLiquid* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude);
-protected:
- unsigned int m_nWaves;
- float m_fAmplitude;
- float m_fAmplitudeRate;
-};
-
-/** @brief CCWaves action */
-class CC_DLL CCWaves : public CCGrid3DAction
-{
-public:
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */
- bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
-
- /** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */
- static CCWaves* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical);
-protected:
- unsigned int m_nWaves;
- float m_fAmplitude;
- float m_fAmplitudeRate;
- bool m_bVertical;
- bool m_bHorizontal;
-};
-
-/** @brief CCTwirl action */
-class CC_DLL CCTwirl : public CCGrid3DAction
-{
-public:
- /** get twirl center */
- inline const CCPoint& getPosition(void) { return m_position; }
- /** set twirl center */
- void setPosition(const CCPoint& position);
-
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes the action with center position, number of twirls, amplitude, a grid size and duration */
- bool initWithDuration(float duration, const CCSize& gridSize, CCPoint position, unsigned int twirls, float amplitude);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with center position, number of twirls, amplitude, a grid size and duration */
- static CCTwirl* create(float duration, const CCSize& gridSize, CCPoint position, unsigned int twirls, float amplitude);
-protected:
- /* twirl center */
- CCPoint m_position;
- unsigned int m_nTwirls;
- float m_fAmplitude;
- float m_fAmplitudeRate;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCGRID3D_ACTION_H__
diff --git a/cocos2dx/actions/CCActionInstant.h b/cocos2dx/actions/CCActionInstant.h
deleted file mode 100644
index 4556e94..0000000
--- a/cocos2dx/actions/CCActionInstant.h
+++ /dev/null
@@ -1,526 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCINSTANT_ACTION_H__
-#define __CCINSTANT_ACTION_H__
-
-#include
-#include "ccTypeInfo.h"
-#include "CCAction.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
-@brief Instant actions are immediate actions. They don't have a duration like
-the CCIntervalAction actions.
-*/
-class CC_DLL CCActionInstant : public CCFiniteTimeAction //
-{
-public:
- /**
- * @js ctor
- */
- CCActionInstant();
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCActionInstant(){}
- // CCAction methods
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual bool isDone(void);
- virtual void step(float dt);
- virtual void update(float time);
- //CCFiniteTimeAction method
- virtual CCFiniteTimeAction * reverse(void);
-};
-
-/** @brief Show the node
-*/
-class CC_DLL CCShow : public CCActionInstant
-{
-public:
- /**
- * @js ctor
- * @lua NA
- */
- CCShow(){}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCShow(){}
- //super methods
- virtual void update(float time);
- virtual CCFiniteTimeAction * reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-public:
-
- /** Allocates and initializes the action */
- static CCShow * create();
-};
-
-
-
-/**
-@brief Hide the node
-*/
-class CC_DLL CCHide : public CCActionInstant
-{
-public:
- /**
- * @js ctor
- * @lua NA
- */
- CCHide(){}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCHide(){}
- //super methods
- /**
- * @lua NA
- */
- virtual void update(float time);
- virtual CCFiniteTimeAction * reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-public:
-
- /** Allocates and initializes the action */
- static CCHide * create();
-};
-
-/** @brief Toggles the visibility of a node
-*/
-class CC_DLL CCToggleVisibility : public CCActionInstant
-{
-public:
- /**
- * @js ctor
- */
- CCToggleVisibility(){}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCToggleVisibility(){}
- //super method
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-public:
-
- /** Allocates and initializes the action */
- static CCToggleVisibility * create();
-};
-
-/**
- @brief Remove the node
- @js NA
- @lua NA
- */
-class CC_DLL CCRemoveSelf : public CCActionInstant
-{
-public:
- CCRemoveSelf(){}
- virtual ~CCRemoveSelf(){}
- //super methods
- virtual void update(float time);
- virtual CCFiniteTimeAction * reverse(void);
- virtual CCObject* copyWithZone(CCZone *pZone);
-public:
- /** create the action */
- static CCRemoveSelf * create(bool isNeedCleanUp = true);
- /** init the action */
- bool init(bool isNeedCleanUp);
-protected:
- bool m_bIsNeedCleanUp;
-};
-
-/**
-@brief Flips the sprite horizontally
-@since v0.99.0
-@js NA
-*/
-class CC_DLL CCFlipX : public CCActionInstant
-{
-public:
- /**
- * @js ctor
- */
- CCFlipX()
- :m_bFlipX(false)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCFlipX(){}
-
- /** create the action */
- static CCFlipX * create(bool x);
-
- /** init the action */
- bool initWithFlipX(bool x);
- //super methods
- virtual void update(float time);
- virtual CCFiniteTimeAction * reverse(void);
- /**
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-
-protected:
- bool m_bFlipX;
-};
-
-/**
-@brief Flips the sprite vertically
-@since v0.99.0
-@js NA
-*/
-class CC_DLL CCFlipY : public CCActionInstant
-{
-public:
- /**
- * @js ctor
- */
- CCFlipY()
- :m_bFlipY(false)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCFlipY(){}
-
- /** create the action */
- static CCFlipY * create(bool y);
-
- /** init the action */
- bool initWithFlipY(bool y);
- //super methods
- virtual void update(float time);
- virtual CCFiniteTimeAction * reverse(void);
- /**
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-
-protected:
- bool m_bFlipY;
-};
-
-/** @brief Places the node in a certain position
-*/
-class CC_DLL CCPlace : public CCActionInstant //
-{
-public:
- /**
- * @js ctor
- */
- CCPlace(){}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCPlace(){}
-
- /** creates a Place action with a position */
- static CCPlace * create(const CCPoint& pos);
- /** Initializes a Place action with a position */
- bool initWithPosition(const CCPoint& pos);
- //super methods
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
-protected:
- CCPoint m_tPosition;
-};
-
-/** @brief Calls a 'callback'
-*/
-class CC_DLL CCCallFunc : public CCActionInstant //
-{
-public:
- /**
- * @js ctor
- */
- CCCallFunc()
- : m_pSelectorTarget(NULL)
- , m_nScriptHandler(0)
- , m_pCallFunc(NULL)
- {
- }
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCCallFunc();
-
- /** creates the action with the callback
-
- * typedef void (CCObject::*SEL_CallFunc)();
- * @lua NA
- */
- static CCCallFunc * create(CCObject* pSelectorTarget, SEL_CallFunc selector);
-
- /** creates the action with the handler script function
- * @js NA
- */
- static CCCallFunc * create(int nHandler);
-
- /** initializes the action with the callback
-
- * typedef void (CCObject::*SEL_CallFunc)();
- * @lua NA
- */
- virtual bool initWithTarget(CCObject* pSelectorTarget);
- /** executes the callback
- * @lua NA
- */
- virtual void execute();
- /** super methods
- * @lua NA
- */
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- CCObject * copyWithZone(CCZone *pZone);
- /**
- * @lua NA
- */
- inline CCObject* getTargetCallback()
- {
- return m_pSelectorTarget;
- }
- /**
- * @lua NA
- */
- inline void setTargetCallback(CCObject* pSel)
- {
- if (pSel != m_pSelectorTarget)
- {
- CC_SAFE_RETAIN(pSel);
- CC_SAFE_RELEASE(m_pSelectorTarget);
- m_pSelectorTarget = pSel;
- }
- }
- /**
- * @lua NA
- */
- inline int getScriptHandler() { return m_nScriptHandler; };
-protected:
- /** Target that will be called */
- CCObject* m_pSelectorTarget;
-
- int m_nScriptHandler;
-
- union
- {
- SEL_CallFunc m_pCallFunc;
- SEL_CallFuncN m_pCallFuncN;
- SEL_CallFuncND m_pCallFuncND;
- SEL_CallFuncO m_pCallFuncO;
- };
-};
-
-/**
-@brief Calls a 'callback' with the node as the first argument
-N means Node
-* @js NA
-*/
-class CC_DLL CCCallFuncN : public CCCallFunc, public TypeInfo
-{
-public:
- /**
- * @js ctor
- * @lua NA
- */
- CCCallFuncN(){}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCCallFuncN(){}
- /**
- * @lua NA
- */
- virtual long getClassTypeInfo() {
- static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name());
- return id;
- }
-
- /** creates the action with the callback
-
- * typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
- * @lua NA
- */
- static CCCallFuncN * create(CCObject* pSelectorTarget, SEL_CallFuncN selector);
-
- /** creates the action with the handler script function*/
- static CCCallFuncN * create(int nHandler);
-
- /** initializes the action with the callback
-
- * typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
- * @lua NA
- */
- virtual bool initWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector);
- /** super methods
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- /**
- * @lua NA
- */
- virtual void execute();
-};
-
-
-/**
-* @brief Calls a 'callback' with the node as the first argument and the 2nd argument is data
-* ND means: Node and Data. Data is void *, so it could be anything.
-* @js NA
-* @lua NA
-*/
-class CC_DLL CCCallFuncND : public CCCallFuncN
-{
-public:
- virtual long getClassTypeInfo() {
- static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name());
- return id;
- }
-
- /** creates the action with the callback and the data to pass as an argument */
- static CCCallFuncND * create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
-
- /** initializes the action with the callback and the data to pass as an argument */
- virtual bool initWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d);
- // super methods
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual void execute();
-
-protected:
- void *m_pData;
-};
-
-
-/**
-@brief Calls a 'callback' with an object as the first argument.
-O means Object.
-@since v0.99.5
-@js NA
-@lua NA
-*/
-
-class CC_DLL CCCallFuncO : public CCCallFunc, public TypeInfo
-{
-public:
- CCCallFuncO();
- virtual ~CCCallFuncO();
-
- virtual long getClassTypeInfo() {
- static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name());
- return id;
- }
-
- /** creates the action with the callback
-
- typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
- */
- static CCCallFuncO * create(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
-
- /** initializes the action with the callback
-
- typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
- */
- virtual bool initWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject);
- // super methods
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual void execute();
-
- inline CCObject* getObject()
- {
- return m_pObject;
- }
-
- inline void setObject(CCObject* pObj)
- {
- if (pObj != m_pObject)
- {
- CC_SAFE_RELEASE(m_pObject);
- m_pObject = pObj;
- CC_SAFE_RETAIN(m_pObject);
- }
- }
-
-protected:
- /** object to be passed as argument */
- CCObject* m_pObject;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif //__CCINSTANT_ACTION_H__
diff --git a/cocos2dx/actions/CCActionInterval.h b/cocos2dx/actions/CCActionInterval.h
deleted file mode 100644
index 5de28ed..0000000
--- a/cocos2dx/actions/CCActionInterval.h
+++ /dev/null
@@ -1,961 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2011 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __ACTION_CCINTERVAL_ACTION_H__
-#define __ACTION_CCINTERVAL_ACTION_H__
-
-#include "base_nodes/CCNode.h"
-#include "CCAction.h"
-#include "CCProtocols.h"
-#include "sprite_nodes/CCSpriteFrame.h"
-#include "sprite_nodes/CCAnimation.h"
-#include
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
-@brief An interval action is an action that takes place within a certain period of time.
-It has an start time, and a finish time. The finish time is the parameter
-duration plus the start time.
-
-These CCActionInterval actions have some interesting properties, like:
-- They can run normally (default)
-- They can run reversed with the reverse method
-- They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.
-
-For example, you can simulate a Ping Pong effect running the action normally and
-then running it again in Reverse mode.
-
-Example:
-
-CCAction *pingPongAction = CCSequence::actions(action, action->reverse(), NULL);
-*/
-class CC_DLL CCActionInterval : public CCFiniteTimeAction
-{
-public:
- /** how many seconds had elapsed since the actions started to run. */
- inline float getElapsed(void) { return m_elapsed; }
-
- /** initializes the action */
- bool initWithDuration(float d);
-
- /** returns true if the action has finished */
- virtual bool isDone(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void step(float dt);
- virtual void startWithTarget(CCNode *pTarget);
- /** returns a reversed action */
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** creates the action */
- static CCActionInterval* create(float d);
-
-public:
- //extension in CCGridAction
- void setAmplitudeRate(float amp);
- float getAmplitudeRate(void);
-
-protected:
- float m_elapsed;
- bool m_bFirstTick;
-};
-
-/** @brief Runs actions sequentially, one after another
- */
-class CC_DLL CCSequence : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCSequence(void);
-
- /** initializes the action
- * @lua NA
- */
- bool initWithTwoActions(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- /**
- * @lua NA
- */
- virtual void startWithTarget(CCNode *pTarget);
- /**
- * @lua NA
- */
- virtual void stop(void);
- /**
- * @lua NA
- */
- virtual void update(float t);
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** helper constructor to create an array of sequenceable actions
- * @lua NA
- */
- static CCSequence* create(CCFiniteTimeAction *pAction1, ...);
- /** helper constructor to create an array of sequenceable actions given an array
- * @js NA
- */
- static CCSequence* create(CCArray *arrayOfActions);
- /** helper constructor to create an array of sequence-able actions
- * @js NA
- * @lua NA
- */
- static CCSequence* createWithVariableList(CCFiniteTimeAction *pAction1, va_list args);
- /** creates the action
- * @js NA
- */
- static CCSequence* createWithTwoActions(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo);
-
-protected:
- CCFiniteTimeAction *m_pActions[2];
- float m_split;
- int m_last;
-};
-
-/** @brief Repeats an action a number of times.
- * To repeat an action forever use the CCRepeatForever action.
- */
-class CC_DLL CCRepeat : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCRepeat(void);
-
- /** initializes a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */
- bool initWithAction(CCFiniteTimeAction *pAction, unsigned int times);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void stop(void);
- virtual void update(float dt);
- virtual bool isDone(void);
- virtual CCActionInterval* reverse(void);
-
- inline void setInnerAction(CCFiniteTimeAction *pAction)
- {
- if (m_pInnerAction != pAction)
- {
- CC_SAFE_RETAIN(pAction);
- CC_SAFE_RELEASE(m_pInnerAction);
- m_pInnerAction = pAction;
- }
- }
-
- inline CCFiniteTimeAction* getInnerAction()
- {
- return m_pInnerAction;
- }
-
-public:
-
- /** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */
- static CCRepeat* create(CCFiniteTimeAction *pAction, unsigned int times);
-protected:
- unsigned int m_uTimes;
- unsigned int m_uTotal;
- float m_fNextDt;
- bool m_bActionInstant;
- /** Inner action */
- CCFiniteTimeAction *m_pInnerAction;
-};
-
-/** @brief Repeats an action for ever.
-To repeat the an action for a limited number of times use the Repeat action.
-@warning This action can't be Sequenceable because it is not an IntervalAction
-*/
-class CC_DLL CCRepeatForever : public CCActionInterval
-{
-public:
- /**
- * @js ctor
- */
- CCRepeatForever()
- : m_pInnerAction(NULL)
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCRepeatForever();
-
- /** initializes the action */
- bool initWithAction(CCActionInterval *pAction);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual void startWithTarget(CCNode* pTarget);
- virtual void step(float dt);
- virtual bool isDone(void);
- virtual CCActionInterval* reverse(void);
-
- inline void setInnerAction(CCActionInterval *pAction)
- {
- if (m_pInnerAction != pAction)
- {
- CC_SAFE_RELEASE(m_pInnerAction);
- m_pInnerAction = pAction;
- CC_SAFE_RETAIN(m_pInnerAction);
- }
- }
-
- inline CCActionInterval* getInnerAction()
- {
- return m_pInnerAction;
- }
-
-public:
-
- /** creates the action */
- static CCRepeatForever* create(CCActionInterval *pAction);
-protected:
- /** Inner action */
- CCActionInterval *m_pInnerAction;
-};
-
-/** @brief Spawn a new action immediately
- */
-class CC_DLL CCSpawn : public CCActionInterval
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCSpawn(void);
-
- /** initializes the Spawn action with the 2 actions to spawn
- * @lua NA
- */
- bool initWithTwoActions(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- /**
- * @lua NA
- */
- virtual void startWithTarget(CCNode *pTarget);
- /**
- * @lua NA
- */
- virtual void stop(void);
- /**
- * @lua NA
- */
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** helper constructor to create an array of spawned actions
- * @lua NA
- */
- static CCSpawn* create(CCFiniteTimeAction *pAction1, ...);
-
- /** helper constructor to create an array of spawned actions
- * @js NA
- * @lua NA
- */
- static CCSpawn* createWithVariableList(CCFiniteTimeAction *pAction1, va_list args);
-
- /** helper constructor to create an array of spawned actions given an array
- * @js NA
- */
- static CCSpawn* create(CCArray *arrayOfActions);
-
- /** creates the Spawn action
- * @js NA
- */
- static CCSpawn* createWithTwoActions(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2);
-
-protected:
- CCFiniteTimeAction *m_pOne;
- CCFiniteTimeAction *m_pTwo;
-};
-
-/** @brief Rotates a CCNode object to a certain angle by modifying it's
- rotation attribute.
- The direction will be decided by the shortest angle.
-*/
-class CC_DLL CCRotateTo : public CCActionInterval
-{
-public:
- /** creates the action */
- static CCRotateTo* create(float fDuration, float fDeltaAngle);
- /** initializes the action */
- bool initWithDuration(float fDuration, float fDeltaAngle);
-
- /** creates the action with separate rotation angles */
- static CCRotateTo* create(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
- virtual bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-protected:
- float m_fDstAngleX;
- float m_fStartAngleX;
- float m_fDiffAngleX;
-
- float m_fDstAngleY;
- float m_fStartAngleY;
- float m_fDiffAngleY;
-};
-
-/** @brief Rotates a CCNode object clockwise a number of degrees by modifying it's rotation attribute.
-*/
-class CC_DLL CCRotateBy : public CCActionInterval
-{
-public:
- /** creates the action */
- static CCRotateBy* create(float fDuration, float fDeltaAngle);
- /** initializes the action */
- bool initWithDuration(float fDuration, float fDeltaAngle);
-
- static CCRotateBy* create(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
- bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-protected:
- float m_fAngleX;
- float m_fStartAngleX;
- float m_fAngleY;
- float m_fStartAngleY;
-};
-
-/** Moves a CCNode object x,y pixels by modifying it's position attribute.
- x and y are relative to the position of the object.
- Several CCMoveBy actions can be concurrently called, and the resulting
- movement will be the sum of individual movements.
- @since v2.1beta2-custom
- */
-class CC_DLL CCMoveBy : public CCActionInterval
-{
-public:
- /** initializes the action */
- bool initWithDuration(float duration, const CCPoint& deltaPosition);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual CCActionInterval* reverse(void);
- virtual void update(float time);
-
-public:
- /** creates the action */
- static CCMoveBy* create(float duration, const CCPoint& deltaPosition);
-protected:
- CCPoint m_positionDelta;
- CCPoint m_startPosition;
- CCPoint m_previousPosition;
-};
-
-/** Moves a CCNode object to the position x,y. x and y are absolute coordinates by modifying it's position attribute.
- Several CCMoveTo actions can be concurrently called, and the resulting
- movement will be the sum of individual movements.
- @since v2.1beta2-custom
- */
-class CC_DLL CCMoveTo : public CCMoveBy
-{
-public:
- /** initializes the action */
- bool initWithDuration(float duration, const CCPoint& position);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
-
-public:
- /** creates the action */
- static CCMoveTo* create(float duration, const CCPoint& position);
-protected:
- CCPoint m_endPosition;
-};
-
-/** Skews a CCNode object to given angles by modifying it's skewX and skewY attributes
-@since v1.0
-*/
-class CC_DLL CCSkewTo : public CCActionInterval
-{
-public:
- /**
- * @js ctor
- */
- CCSkewTo();
- virtual bool initWithDuration(float t, float sx, float sy);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
-
- /** creates the action */
- static CCSkewTo* create(float t, float sx, float sy);
-protected:
- float m_fSkewX;
- float m_fSkewY;
- float m_fStartSkewX;
- float m_fStartSkewY;
- float m_fEndSkewX;
- float m_fEndSkewY;
- float m_fDeltaX;
- float m_fDeltaY;
-};
-
-/** Skews a CCNode object by skewX and skewY degrees
-@since v1.0
-*/
-class CC_DLL CCSkewBy : public CCSkewTo
-{
-public:
- virtual bool initWithDuration(float t, float sx, float sy);
- virtual void startWithTarget(CCNode *pTarget);
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** creates the action */
- static CCSkewBy* create(float t, float deltaSkewX, float deltaSkewY);
-};
-
-/** @brief Moves a CCNode object simulating a parabolic jump movement by modifying it's position attribute.
-*/
-class CC_DLL CCJumpBy : public CCActionInterval
-{
-public:
- /** initializes the action */
- bool initWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates the action */
- static CCJumpBy* create(float duration, const CCPoint& position, float height, unsigned int jumps);
-protected:
- CCPoint m_startPosition;
- CCPoint m_delta;
- float m_height;
- unsigned int m_nJumps;
- CCPoint m_previousPos;
-};
-
-/** @brief Moves a CCNode object to a parabolic position simulating a jump movement by modifying it's position attribute.
-*/
-class CC_DLL CCJumpTo : public CCJumpBy
-{
-public:
- virtual void startWithTarget(CCNode *pTarget);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action */
- static CCJumpTo* create(float duration, const CCPoint& position, float height, int jumps);
-};
-
-/** @typedef bezier configuration structure
- */
-typedef struct _ccBezierConfig {
- //! end position of the bezier
- CCPoint endPosition;
- //! Bezier control point 1
- CCPoint controlPoint_1;
- //! Bezier control point 2
- CCPoint controlPoint_2;
-} ccBezierConfig;
-
-/** @brief An action that moves the target with a cubic Bezier curve by a certain distance.
- */
-class CC_DLL CCBezierBy : public CCActionInterval
-{
-public:
- /** initializes the action with a duration and a bezier configuration
- * @lua NA
- */
- bool initWithDuration(float t, const ccBezierConfig& c);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- /**
- * @lua NA
- */
- virtual void startWithTarget(CCNode *pTarget);
- /**
- * @lua NA
- */
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates the action with a duration and a bezier configuration
- * @code
- * when this function bound to js,the input params are changed
- * js: var create(var t, var pointTable)
- * @endcode
- */
- static CCBezierBy* create(float t, const ccBezierConfig& c);
-protected:
- ccBezierConfig m_sConfig;
- CCPoint m_startPosition;
- CCPoint m_previousPosition;
-};
-
-/** @brief An action that moves the target with a cubic Bezier curve to a destination point.
- @since v0.8.2
- */
-class CC_DLL CCBezierTo : public CCBezierBy
-{
-public:
- /**
- * @lua NA
- */
- virtual void startWithTarget(CCNode *pTarget);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action with a duration and a bezier configuration
- * @code
- * when this function bound to js,the input params are changed
- * js: var create(var t, var pointTable)
- * @endcode
- */
- static CCBezierTo* create(float t, const ccBezierConfig& c);
- /**
- * @lua NA
- */
- bool initWithDuration(float t, const ccBezierConfig &c);
-
-protected:
- ccBezierConfig m_sToConfig;
-};
-
-/** @brief Scales a CCNode object to a zoom factor by modifying it's scale attribute.
- @warning This action doesn't support "reverse"
- */
-class CC_DLL CCScaleTo : public CCActionInterval
-{
-public:
- /** initializes the action with the same scale factor for X and Y */
- bool initWithDuration(float duration, float s);
-
- /** initializes the action with and X factor and a Y factor */
- bool initWithDuration(float duration, float sx, float sy);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
-
- /** creates the action with the same scale factor for X and Y */
- static CCScaleTo* create(float duration, float s);
-
- /** creates the action with and X factor and a Y factor */
- static CCScaleTo* create(float duration, float sx, float sy);
-protected:
- float m_fScaleX;
- float m_fScaleY;
- float m_fStartScaleX;
- float m_fStartScaleY;
- float m_fEndScaleX;
- float m_fEndScaleY;
- float m_fDeltaX;
- float m_fDeltaY;
-};
-
-/** @brief Scales a CCNode object a zoom factor by modifying it's scale attribute.
-*/
-class CC_DLL CCScaleBy : public CCScaleTo
-{
-public:
- virtual void startWithTarget(CCNode *pTarget);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action with the same scale factor for X and Y */
- static CCScaleBy* create(float duration, float s);
-
- /** creates the action with and X factor and a Y factor */
- static CCScaleBy* create(float duration, float sx, float sy);
-};
-
-/** @brief Blinks a CCNode object by modifying it's visible attribute
-*/
-class CC_DLL CCBlink : public CCActionInterval
-{
-public:
- /** initializes the action */
- bool initWithDuration(float duration, unsigned int uBlinks);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
-
- /** creates the action */
- static CCBlink* create(float duration, unsigned int uBlinks);
-
- virtual void startWithTarget(CCNode *pTarget);
- virtual void stop();
-
-protected:
- unsigned int m_nTimes;
- bool m_bOriginalState;
-};
-
-/** @brief Fades In an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 0 to 255.
- The "reverse" of this action is FadeOut
- */
-class CC_DLL CCFadeIn : public CCActionInterval
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action */
- static CCFadeIn* create(float d);
-};
-
-/** @brief Fades Out an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 255 to 0.
- The "reverse" of this action is FadeIn
-*/
-class CC_DLL CCFadeOut : public CCActionInterval
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCFadeOut* create(float d);
-};
-
-/** @brief Fades an object that implements the CCRGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
- @warning This action doesn't support "reverse"
- */
-class CC_DLL CCFadeTo : public CCActionInterval
-{
-public:
- /** initializes the action with duration and opacity */
- bool initWithDuration(float duration, GLubyte opacity);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
- /** creates an action with duration and opacity */
- static CCFadeTo* create(float duration, GLubyte opacity);
-protected:
- GLubyte m_toOpacity;
- GLubyte m_fromOpacity;
-};
-
-/** @brief Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one.
- @warning This action doesn't support "reverse"
- @since v0.7.2
-*/
-class CC_DLL CCTintTo : public CCActionInterval
-{
-public:
- /** initializes the action with duration and color */
- bool initWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
- /** creates an action with duration and color */
- static CCTintTo* create(float duration, GLubyte red, GLubyte green, GLubyte blue);
-protected:
- ccColor3B m_to;
- ccColor3B m_from;
-};
-
-/** @brief Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one.
- @since v0.7.2
- */
-class CC_DLL CCTintBy : public CCActionInterval
-{
-public:
- /** initializes the action with duration and color */
- bool initWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates an action with duration and color */
- static CCTintBy* create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue);
-protected:
- GLshort m_deltaR;
- GLshort m_deltaG;
- GLshort m_deltaB;
-
- GLshort m_fromR;
- GLshort m_fromG;
- GLshort m_fromB;
-};
-
-/** @brief Delays the action a certain amount of seconds
-*/
-class CC_DLL CCDelayTime : public CCActionInterval
-{
-public:
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
-
- /** creates the action */
- static CCDelayTime* create(float d);
-};
-
-/** @brief Executes an action in reverse order, from time=duration to time=0
-
- @warning Use this action carefully. This action is not
- sequenceable. Use it as the default "reversed" method
- of your own actions, but using it outside the "reversed"
- scope is not recommended.
-*/
-class CC_DLL CCReverseTime : public CCActionInterval
-{
-public:
- /**
- * @js ctor
- */
- ~CCReverseTime(void);
- /**
- * @js NA
- * @lua NA
- */
- CCReverseTime();
-
- /** initializes the action */
- bool initWithAction(CCFiniteTimeAction *pAction);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void stop(void);
- virtual void update(float time);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates the action */
- static CCReverseTime* create(CCFiniteTimeAction *pAction);
-protected:
- CCFiniteTimeAction *m_pOther;
-};
-
-class CCTexture2D;
-/** @brief Animates a sprite given the name of an Animation */
-class CC_DLL CCAnimate : public CCActionInterval
-{
-public:
- /**
- * @js ctor
- */
- CCAnimate();
- /**
- * @js NA
- * @lua NA
- */
- ~CCAnimate();
-
- /** initializes the action with an Animation and will restore the original frame when the animation is over */
- bool initWithAnimation(CCAnimation *pAnimation);
-
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void stop(void);
- virtual void update(float t);
- virtual CCActionInterval* reverse(void);
-
-public:
- /** creates the action with an Animation and will restore the original frame when the animation is over */
- static CCAnimate* create(CCAnimation *pAnimation);
- CC_SYNTHESIZE_RETAIN(CCAnimation*, m_pAnimation, Animation)
-protected:
- std::vector* m_pSplitTimes;
- int m_nNextFrame;
- CCSpriteFrame* m_pOrigFrame;
- unsigned int m_uExecutedLoops;
-};
-
-/** Overrides the target of an action so that it always runs on the target
- * specified at action creation rather than the one specified by runAction.
- */
-class CC_DLL CCTargetedAction : public CCActionInterval
-{
-public:
- /**
- * @js ctor
- */
- CCTargetedAction();
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCTargetedAction();
-
- /** Create an action with the specified action and forced target */
- static CCTargetedAction* create(CCNode* pTarget, CCFiniteTimeAction* pAction);
-
- /** Init an action with the specified action and forced target */
- bool initWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void stop(void);
- virtual void update(float time);
-
- /** This is the target that the action will be forced to run with */
- CC_SYNTHESIZE_RETAIN(CCNode*, m_pForcedTarget, ForcedTarget);
-private:
- CCFiniteTimeAction* m_pAction;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif //__ACTION_CCINTERVAL_ACTION_H__
diff --git a/cocos2dx/actions/CCActionManager.h b/cocos2dx/actions/CCActionManager.h
deleted file mode 100644
index 93999be..0000000
--- a/cocos2dx/actions/CCActionManager.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2009 Valentin Milea
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __ACTION_CCACTION_MANAGER_H__
-#define __ACTION_CCACTION_MANAGER_H__
-
-#include "CCAction.h"
-#include "cocoa/CCArray.h"
-#include "cocoa/CCObject.h"
-
-NS_CC_BEGIN
-
-class CCSet;
-
-struct _hashElement;
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
- @brief CCActionManager is a singleton that manages all the actions.
- Normally you won't need to use this singleton directly. 99% of the cases you will use the CCNode interface,
- which uses this singleton.
- But there are some cases where you might need to use this singleton.
- Examples:
- - When you want to run an action where the target is different from a CCNode.
- - When you want to pause / resume the actions
-
- @since v0.8
- */
-class CC_DLL CCActionManager : public CCObject
-{
-public:
- /**
- * @js ctor
- */
- CCActionManager(void);
- /**
- * @js NA
- * @lua NA
- */
- ~CCActionManager(void);
-
- // actions
-
- /** Adds an action with a target.
- If the target is already present, then the action will be added to the existing target.
- If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.
- When the target is paused, the queued actions won't be 'ticked'.
- */
- void addAction(CCAction *pAction, CCNode *pTarget, bool paused);
-
- /** Removes all actions from all the targets.
- */
- void removeAllActions(void);
-
- /** Removes all actions from a certain target.
- All the actions that belongs to the target will be removed.
- */
- void removeAllActionsFromTarget(CCObject *pTarget);
-
- /** Removes an action given an action reference.
- */
- void removeAction(CCAction *pAction);
-
- /** Removes an action given its tag and the target */
- void removeActionByTag(unsigned int tag, CCObject *pTarget);
-
- /** Gets an action given its tag an a target
- @return the Action the with the given tag
- */
- CCAction* getActionByTag(unsigned int tag, CCObject *pTarget);
-
- /** Returns the numbers of actions that are running in a certain target.
- * Composable actions are counted as 1 action. Example:
- * - If you are running 1 Sequence of 7 actions, it will return 1.
- * - If you are running 7 Sequences of 2 actions, it will return 7.
- */
- unsigned int numberOfRunningActionsInTarget(CCObject *pTarget);
-
- /** Pauses the target: all running actions and newly added actions will be paused.
- */
- void pauseTarget(CCObject *pTarget);
-
- /** Resumes the target. All queued actions will be resumed.
- */
- void resumeTarget(CCObject *pTarget);
-
- /** Pauses all running actions, returning a list of targets whose actions were paused.
- */
- CCSet* pauseAllRunningActions();
-
- /** Resume a set of targets (convenience function to reverse a pauseAllRunningActions call)
- */
- void resumeTargets(CCSet *targetsToResume);
-
-protected:
- // declared in CCActionManager.m
-
- void removeActionAtIndex(unsigned int uIndex, struct _hashElement *pElement);
- void deleteHashElement(struct _hashElement *pElement);
- void actionAllocWithHashElement(struct _hashElement *pElement);
- void update(float dt);
-
-protected:
- struct _hashElement *m_pTargets;
- struct _hashElement *m_pCurrentTarget;
- bool m_bCurrentTargetSalvaged;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCACTION_MANAGER_H__
diff --git a/cocos2dx/actions/CCActionPageTurn3D.h b/cocos2dx/actions/CCActionPageTurn3D.h
deleted file mode 100644
index 92962fd..0000000
--- a/cocos2dx/actions/CCActionPageTurn3D.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
-
-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.
-****************************************************************************/
-#ifndef __ACTION_CCPAGETURN3D_ACTION_H__
-#define __ACTION_CCPAGETURN3D_ACTION_H__
-
-#include "CCActionGrid3D.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
- @brief This action simulates a page turn from the bottom right hand corner of the screen.
- It's not much use by itself but is used by the PageTurnTransition.
-
- Based on an original paper by L Hong et al.
- http://www.parc.com/publication/1638/turning-pages-of-3d-electronic-books.html
-
- @since v0.8.2
- */
-class CC_DLL CCPageTurn3D : public CCGrid3DAction
-{
-public:
- virtual void update(float time);
-
-public:
-
- /** create the action */
- static CCPageTurn3D* create(float duration, const CCSize& gridSize);
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCPAGETURN3D_ACTION_H__
diff --git a/cocos2dx/actions/CCActionProgressTimer.h b/cocos2dx/actions/CCActionProgressTimer.h
deleted file mode 100644
index 9cac31a..0000000
--- a/cocos2dx/actions/CCActionProgressTimer.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (C) 2010 Lam Pham
-
-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.
-****************************************************************************/
-#ifndef __ACTION_CCPROGRESS_TIMER_H__
-#define __ACTION_CCPROGRESS_TIMER_H__
-
-#include "CCActionInterval.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/**
-@brief Progress to percentage
-@since v0.99.1
-*/
-class CC_DLL CCProgressTo : public CCActionInterval
-{
-public:
- /** Initializes with a duration and a percent */
- bool initWithDuration(float duration, float fPercent);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
- /** Creates and initializes with a duration and a percent */
- static CCProgressTo* create(float duration, float fPercent);
-protected:
- float m_fTo;
- float m_fFrom;
-};
-
-/**
-@brief Progress from a percentage to another percentage
-@since v0.99.1
-*/
-class CC_DLL CCProgressFromTo : public CCActionInterval
-{
-public:
- /** Initializes the action with a duration, a "from" percentage and a "to" percentage */
- bool initWithDuration(float duration, float fFromPercentage, float fToPercentage);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone *pZone);
- virtual CCActionInterval* reverse(void);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
-
- /** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
- static CCProgressFromTo* create(float duration, float fFromPercentage, float fToPercentage);
-protected:
- float m_fTo;
- float m_fFrom;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCPROGRESS_TIMER_H__
diff --git a/cocos2dx/actions/CCActionTiledGrid.h b/cocos2dx/actions/CCActionTiledGrid.h
deleted file mode 100644
index ee6fe54..0000000
--- a/cocos2dx/actions/CCActionTiledGrid.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2009 On-Core
-
-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.
-****************************************************************************/
-#ifndef __ACTION_CCTILEDGRID_ACTION_H__
-#define __ACTION_CCTILEDGRID_ACTION_H__
-
-#include "CCActionGrid.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-/** @brief CCShakyTiles3D action */
-class CC_DLL CCShakyTiles3D : public CCTiledGrid3DAction
-{
-public:
- /** initializes the action with a range, whether or not to shake Z vertices, a grid size, and duration */
- virtual bool initWithDuration(float duration, const CCSize& gridSize, int nRange, bool bShakeZ);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
-
- /** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration */
- static CCShakyTiles3D* create(float duration, const CCSize& gridSize, int nRange, bool bShakeZ);
-
-protected:
- int m_nRandrange;
- bool m_bShakeZ;
-};
-
-/** @brief CCShatteredTiles3D action */
-class CC_DLL CCShatteredTiles3D : public CCTiledGrid3DAction
-{
-public:
- /** initializes the action with a range, whether or not to shatter Z vertices, a grid size and duration */
- virtual bool initWithDuration(float duration, const CCSize& gridSize, int nRange, bool bShatterZ);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
-
- /** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration */
- static CCShatteredTiles3D* create(float duration, const CCSize& gridSize, int nRange, bool bShatterZ);
-protected:
- int m_nRandrange;
- bool m_bOnce;
- bool m_bShatterZ;
-};
-
-struct Tile;
-/** @brief CCShuffleTiles action
- Shuffle the tiles in random order
- */
-class CC_DLL CCShuffleTiles : public CCTiledGrid3DAction
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCShuffleTiles(void);
- /** initializes the action with a random seed, the grid size and the duration */
- virtual bool initWithDuration(float duration, const CCSize& gridSize, unsigned int seed);
- void shuffle(unsigned int *pArray, unsigned int nLen);
- CCSize getDelta(const CCSize& pos);
- void placeTile(const CCPoint& pos, Tile *t);
-
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
-public:
- /** creates the action with a random seed, the grid size and the duration */
- static CCShuffleTiles* create(float duration, const CCSize& gridSize, unsigned int seed);
-protected:
- unsigned int m_nSeed;
- unsigned int m_nTilesCount;
- unsigned int* m_pTilesOrder;
- Tile* m_pTiles;
-};
-
-/** @brief CCFadeOutTRTiles action
- Fades out the tiles in a Top-Right direction
- */
-class CC_DLL CCFadeOutTRTiles : public CCTiledGrid3DAction
-{
-public:
- virtual float testFunc(const CCSize& pos, float time);
- void turnOnTile(const CCPoint& pos);
- void turnOffTile(const CCPoint& pos);
- virtual void transformTile(const CCPoint& pos, float distance);
- virtual void update(float time);
-
-public:
-
- /** creates the action with the grid size and the duration */
- static CCFadeOutTRTiles* create(float duration, const CCSize& gridSize);
-};
-
-/** @brief CCFadeOutBLTiles action.
- Fades out the tiles in a Bottom-Left direction
- */
-class CC_DLL CCFadeOutBLTiles : public CCFadeOutTRTiles
-{
-public:
- virtual float testFunc(const CCSize& pos, float time);
-
-public:
-
- /** creates the action with the grid size and the duration */
- static CCFadeOutBLTiles* create(float duration, const CCSize& gridSize);
-};
-
-/** @brief CCFadeOutUpTiles action.
- Fades out the tiles in upwards direction
- */
-class CC_DLL CCFadeOutUpTiles : public CCFadeOutTRTiles
-{
-public:
- virtual float testFunc(const CCSize& pos, float time);
- virtual void transformTile(const CCPoint& pos, float distance);
-
-public:
- /** creates the action with the grid size and the duration */
- static CCFadeOutUpTiles* create(float duration, const CCSize& gridSize);
-
-};
-
-/** @brief CCFadeOutDownTiles action.
- Fades out the tiles in downwards direction
- */
-class CC_DLL CCFadeOutDownTiles : public CCFadeOutUpTiles
-{
-public:
- virtual float testFunc(const CCSize& pos, float time);
-
-public:
-
- /** creates the action with the grid size and the duration */
- static CCFadeOutDownTiles* create(float duration, const CCSize& gridSize);
-};
-
-/** @brief CCTurnOffTiles action.
- Turn off the files in random order
- */
-class CC_DLL CCTurnOffTiles : public CCTiledGrid3DAction
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- ~CCTurnOffTiles(void);
- /** initializes the action with a random seed, the grid size and the duration */
- virtual bool initWithDuration(float duration, const CCSize& gridSize, unsigned int seed);
- void shuffle(unsigned int *pArray, unsigned int nLen);
- void turnOnTile(const CCPoint& pos);
- void turnOffTile(const CCPoint& pos);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void startWithTarget(CCNode *pTarget);
- virtual void update(float time);
-
-public:
-
- /** creates the action with the grid size and the duration */
- static CCTurnOffTiles* create(float duration, const CCSize& gridSize);
- /** creates the action with a random seed, the grid size and the duration */
- static CCTurnOffTiles* create(float duration, const CCSize& gridSize, unsigned int seed);
-
-protected:
- unsigned int m_nSeed;
- unsigned int m_nTilesCount;
- unsigned int* m_pTilesOrder;
-};
-
-/** @brief CCWavesTiles3D action. */
-class CC_DLL CCWavesTiles3D : public CCTiledGrid3DAction
-{
-public:
- /** waves amplitude */
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- /** waves amplitude rate */
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes the action with a number of waves, the waves amplitude, the grid size and the duration */
- virtual bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
- /** creates the action with a number of waves, the waves amplitude, the grid size and the duration */
- static CCWavesTiles3D* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude);
-protected:
- unsigned int m_nWaves;
- float m_fAmplitude;
- float m_fAmplitudeRate;
-};
-
-/** @brief CCJumpTiles3D action.
- A sin function is executed to move the tiles across the Z axis
- */
-class CC_DLL CCJumpTiles3D : public CCTiledGrid3DAction
-{
-public:
- /** amplitude of the sin*/
- inline float getAmplitude(void) { return m_fAmplitude; }
- inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; }
-
- /** amplitude rate */
- inline float getAmplitudeRate(void) { return m_fAmplitudeRate; }
- inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; }
-
- /** initializes the action with the number of jumps, the sin amplitude, the grid size and the duration */
- bool initWithDuration(float duration, const CCSize& gridSize, unsigned int numberOfJumps, float amplitude);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
-
-public:
-
- /** creates the action with the number of jumps, the sin amplitude, the grid size and the duration */
- static CCJumpTiles3D* create(float duration, const CCSize& gridSize, unsigned int numberOfJumps, float amplitude);
-protected:
- unsigned int m_nJumps;
- float m_fAmplitude;
- float m_fAmplitudeRate;
-};
-
-/** @brief CCSplitRows action */
-class CC_DLL CCSplitRows : public CCTiledGrid3DAction
-{
-public :
- /** initializes the action with the number of rows to split and the duration */
- virtual bool initWithDuration(float duration, unsigned int nRows);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
- virtual void startWithTarget(CCNode *pTarget);
-
-public:
-
- /** creates the action with the number of rows to split and the duration */
- static CCSplitRows* create(float duration, unsigned int nRows);
-protected:
- unsigned int m_nRows;
- CCSize m_winSize;
-};
-
-/** @brief CCSplitCols action */
-class CC_DLL CCSplitCols : public CCTiledGrid3DAction
-{
-public:
- /** initializes the action with the number of columns to split and the duration */
- virtual bool initWithDuration(float duration, unsigned int nCols);
- /**
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual void update(float time);
- virtual void startWithTarget(CCNode *pTarget);
-
-public:
- /** creates the action with the number of columns to split and the duration */
- static CCSplitCols* create(float duration, unsigned int nCols);
-protected:
- unsigned int m_nCols;
- CCSize m_winSize;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif // __ACTION_CCTILEDGRID_ACTION_H__
diff --git a/cocos2dx/actions/CCActionTween.h b/cocos2dx/actions/CCActionTween.h
deleted file mode 100644
index e47845d..0000000
--- a/cocos2dx/actions/CCActionTween.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright 2009 lhunath (Maarten Billemont)
-
-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.
-****************************************************************************/
-#ifndef __CCACTIONTWEEN_H__
-#define __CCACTIONTWEEN_H__
-
-#include "CCActionInterval.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup actions
- * @{
- */
-
-class CC_DLL CCActionTweenDelegate
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCActionTweenDelegate() {}
- virtual void updateTweenAction(float value, const char* key) = 0;
-};
-
-/** CCActionTween
-
- CCActionTween is an action that lets you update any property of an object.
- For example, if you want to modify the "width" property of a target from 200 to 300 in 2 seconds, then:
-
- id modifyWidth = [CCActionTween actionWithDuration:2 key:@"width" from:200 to:300];
- [target runAction:modifyWidth];
-
-
- Another example: CCScaleTo action could be rewritten using CCPropertyAction:
-
- // scaleA and scaleB are equivalents
- id scaleA = [CCScaleTo actionWithDuration:2 scale:3];
- id scaleB = [CCActionTween actionWithDuration:2 key:@"scale" from:1 to:3];
-
-
- @since v0.99.2
- */
-class CC_DLL CCActionTween : public CCActionInterval
-{
-public:
- /** creates an initializes the action with the property name (key), and the from and to parameters. */
- static CCActionTween* create(float aDuration, const char* key, float from, float to);
- /** initializes the action with the property name (key), and the from and to parameters. */
- bool initWithDuration(float aDuration, const char* key, float from, float to);
-
- void startWithTarget(CCNode *pTarget);
- void update(float dt);
- CCActionInterval* reverse();
-
- std::string m_strKey;
- float m_fFrom, m_fTo;
- float m_fDelta;
-};
-
-// end of actions group
-/// @}
-
-NS_CC_END
-
-#endif /* __CCACTIONTWEEN_H__ */
-
-
diff --git a/cocos2dx/base_nodes/CCAtlasNode.h b/cocos2dx/base_nodes/CCAtlasNode.h
deleted file mode 100644
index 2d3aa5e..0000000
--- a/cocos2dx/base_nodes/CCAtlasNode.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCATLAS_NODE_H__
-#define __CCATLAS_NODE_H__
-
-#include "CCNode.h"
-#include "CCProtocols.h"
-#include "ccTypes.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup base_nodes
- * @{
- */
-
-class CCTextureAtlas;
-
-/** @brief CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and CCTextureProtocol protocol
-
-It knows how to render a TextureAtlas object.
-If you are going to render a TextureAtlas consider subclassing CCAtlasNode (or a subclass of CCAtlasNode)
-
-All features from CCNode are valid, plus the following features:
-- opacity and RGB colors
-*/
-class CC_DLL CCAtlasNode : public CCNodeRGBA, public CCTextureProtocol
-{
-protected:
-
- //! chars per row
- unsigned int m_uItemsPerRow;
- //! chars per column
- unsigned int m_uItemsPerColumn;
-
- //! width of each char
- unsigned int m_uItemWidth;
- //! height of each char
- unsigned int m_uItemHeight;
-
- ccColor3B m_tColorUnmodified;
-
- CC_PROPERTY(CCTextureAtlas*, m_pTextureAtlas, TextureAtlas);
-
- // protocol variables
- bool m_bIsOpacityModifyRGB;
-
- CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc);
-
- // quads to draw
- CC_PROPERTY(unsigned int, m_uQuadsToDraw, QuadsToDraw);
- // color uniform
- GLint m_nUniformColor;
- // This varible is only used for CCLabelAtlas FPS display. So plz don't modify its value.
- bool m_bIgnoreContentScaleFactor;
-
-public:
- /**
- * @js ctor
- */
- CCAtlasNode();
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCAtlasNode();
-
- /** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
- static CCAtlasNode * create(const char* tile,unsigned int tileWidth, unsigned int tileHeight,
- unsigned int itemsToRender);
-
- /** initializes an CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
- bool initWithTileFile(const char* tile, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender);
-
- /** initializes an CCAtlasNode with a texture the width and height of each item measured in points and the quantity of items to render*/
- bool initWithTexture(CCTexture2D* texture, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender);
-
- /** updates the Atlas (indexed vertex array).
- * Shall be overridden in subclasses
- */
- virtual void updateAtlasValues();
-
- virtual void draw(void);
-
- // CC Texture protocol
-
- /** returns the used texture*/
- virtual CCTexture2D* getTexture(void);
-
- /** sets a new texture. it will be retained*/
- virtual void setTexture(CCTexture2D *texture);
-
- virtual bool isOpacityModifyRGB();
- virtual void setOpacityModifyRGB(bool isOpacityModifyRGB);
- virtual const ccColor3B& getColor(void);
- virtual void setColor(const ccColor3B& color);
- virtual void setOpacity(GLubyte opacity);
-
-private :
- void calculateMaxItems();
- void updateBlendFunc();
- void updateOpacityModifyRGB();
-
- friend class CCDirector;
- void setIgnoreContentScaleFactor(bool bIgnoreContentScaleFactor);
-};
-
-// end of base_node group
-/// @}
-
-NS_CC_END
-
-#endif // __CCATLAS_NODE_H__
-
-
diff --git a/cocos2dx/base_nodes/CCGLBufferedNode.h b/cocos2dx/base_nodes/CCGLBufferedNode.h
deleted file mode 100644
index 0892639..0000000
--- a/cocos2dx/base_nodes/CCGLBufferedNode.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-Copyright (c) 2013 Zynga Inc.
-
-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.
-****************************************************************************/
-#ifndef __CC_GL_BUFFERED_NODE__
-#define __CC_GL_BUFFERED_NODE__
-
-#include
-
-class CCGLBufferedNode
-{
-public:
- CCGLBufferedNode(void);
-
- /**
- * Load the given data into this CCNode's GL Buffer. Needed for WebGL, as it does not support client-side arrays.
- */
- void setGLBufferData(void *buf, GLuint bufSize, int slot);
- void setGLIndexData(void *buf, GLuint bufSize, int slot);
-
- // We allocate 4 buffer objs per node, and index into them as slots.
-#define BUFFER_SLOTS 4
- GLuint m_bufferObject[BUFFER_SLOTS];
- GLuint m_bufferSize[BUFFER_SLOTS];
-
- GLuint m_indexBufferObject[BUFFER_SLOTS];
- GLuint m_indexBufferSize[BUFFER_SLOTS];
-};
-#endif // __CC_GL_BUFFERED_NODE__
diff --git a/cocos2dx/base_nodes/CCNode.h b/cocos2dx/base_nodes/CCNode.h
deleted file mode 100644
index 682ba59..0000000
--- a/cocos2dx/base_nodes/CCNode.h
+++ /dev/null
@@ -1,1551 +0,0 @@
-/****************************************************************************
- Copyright (c) 2010-2012 cocos2d-x.org
- Copyright (c) 2008-2010 Ricardo Quesada
- Copyright (c) 2009 Valentin Milea
- Copyright (c) 2011 Zynga Inc.
-
- 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.
- ****************************************************************************/
-
-#ifndef __PLATFORM_CCNODE_H__
-#define __PLATFORM_CCNODE_H__
-
-#include "ccMacros.h"
-#include "cocoa/CCAffineTransform.h"
-#include "cocoa/CCArray.h"
-#include "CCGL.h"
-#include "shaders/ccGLStateCache.h"
-#include "shaders/CCGLProgram.h"
-#include "kazmath/kazmath.h"
-#include "script_support/CCScriptSupport.h"
-#include "CCProtocols.h"
-
-NS_CC_BEGIN
-
-class CCCamera;
-class CCGridBase;
-class CCPoint;
-class CCTouch;
-class CCAction;
-class CCRGBAProtocol;
-class CCLabelProtocol;
-class CCScheduler;
-class CCActionManager;
-class CCComponent;
-class CCDictionary;
-class CCComponentContainer;
-
-/**
- * @addtogroup base_nodes
- * @{
- */
-
-enum {
- kCCNodeTagInvalid = -1,
-};
-
-enum {
- kCCNodeOnEnter,
- kCCNodeOnExit,
- kCCNodeOnEnterTransitionDidFinish,
- kCCNodeOnExitTransitionDidStart,
- kCCNodeOnCleanup
-};
-
-/** @brief CCNode is the main element. Anything that gets drawn or contains things that get drawn is a CCNode.
- The most popular CCNodes are: CCScene, CCLayer, CCSprite, CCMenu.
-
- The main features of a CCNode are:
- - They can contain other CCNode nodes (addChild, getChildByTag, removeChild, etc)
- - They can schedule periodic callback (schedule, unschedule, etc)
- - They can execute actions (runAction, stopAction, etc)
-
- Some CCNode nodes provide extra functionality for them or their children.
-
- Subclassing a CCNode usually means (one/all) of:
- - overriding init to initialize resources and schedule callbacks
- - create callbacks to handle the advancement of time
- - overriding draw to render the node
-
- Features of CCNode:
- - position
- - scale (x, y)
- - rotation (in degrees, clockwise)
- - CCCamera (an interface to gluLookAt )
- - CCGridBase (to do mesh transformations)
- - anchor point
- - size
- - visible
- - z-order
- - openGL z position
-
- Default values:
- - rotation: 0
- - position: (x=0,y=0)
- - scale: (x=1,y=1)
- - contentSize: (x=0,y=0)
- - anchorPoint: (x=0,y=0)
-
- Limitations:
- - A CCNode is a "void" object. It doesn't have a texture
-
- Order in transformations with grid disabled
- -# The node will be translated (position)
- -# The node will be rotated (rotation)
- -# The node will be scaled (scale)
- -# The node will be moved according to the camera values (camera)
-
- Order in transformations with grid enabled
- -# The node will be translated (position)
- -# The node will be rotated (rotation)
- -# The node will be scaled (scale)
- -# The grid will capture the screen
- -# The node will be moved according to the camera values (camera)
- -# The grid will render the captured screen
-
- Camera:
- - Each node has a camera. By default it points to the center of the CCNode.
- */
-
-class CC_DLL CCNode : public CCObject
-{
-public:
- /// @{
- /// @name Constructor, Distructor and Initializers
-
- /**
- * Default constructor
- * @js ctor
- */
- CCNode(void);
-
- RT_ADD(
- CCNode(const CCNode&);
- )
-
- /**
- * Default destructor
- * @js NA
- * @lua NA
- */
- virtual ~CCNode(void);
-
- /**
- * Initializes the instance of CCNode
- * @return Whether the initialization was successful.
- */
- virtual bool init();
- /**
- * Allocates and initializes a node.
- * @return A initialized node which is marked as "autorelease".
- */
- static CCNode * create(void);
-
- /**
- * Gets the description string. It makes debugging easier.
- * @return A string terminated with '\0'
- * @js NA
- */
- const char* description(void);
-
- /// @} end of initializers
-
-
-
- /// @{
- /// @name Setters & Getters for Graphic Peroperties
-
- /**
- * Sets the Z order which stands for the drawing order, and reorder this node in its parent's children array.
- *
- * The Z order of node is relative to its "brothers": children of the same parent.
- * It's nothing to do with OpenGL's z vertex. This one only affects the draw order of nodes in cocos2d.
- * The larger number it is, the later this node will be drawn in each message loop.
- * Please refer to setVertexZ(float) for the difference.
- *
- * @param nZOrder Z order of this node.
- */
- virtual void setZOrder(int zOrder);
- /**
- * Sets the z order which stands for the drawing order
- *
- * This is an internal method. Don't call it outside the framework.
- * The difference between setZOrder(int) and _setOrder(int) is:
- * - _setZOrder(int) is a pure setter for m_nZOrder memeber variable
- * - setZOrder(int) firstly changes m_nZOrder, then recorder this node in its parent's chilren array.
- */
- virtual void _setZOrder(int z);
- /**
- * Gets the Z order of this node.
- *
- * @see setZOrder(int)
- *
- * @return The Z order.
- */
- virtual int getZOrder();
-
-
- /**
- * Sets the real OpenGL Z vertex.
- *
- * Differences between openGL Z vertex and cocos2d Z order:
- * - OpenGL Z modifies the Z vertex, and not the Z order in the relation between parent-children
- * - OpenGL Z might require to set 2D projection
- * - cocos2d Z order works OK if all the nodes uses the same openGL Z vertex. eg: vertexZ = 0
- *
- * @warning Use it at your own risk since it might break the cocos2d parent-children z order
- *
- * @param fVertexZ OpenGL Z vertex of this node.
- */
- virtual void setVertexZ(float vertexZ);
- /**
- * Gets OpenGL Z vertex of this node.
- *
- * @see setVertexZ(float)
- *
- * @return OpenGL Z vertex of this node
- */
- virtual float getVertexZ();
-
-
- /**
- * Changes the scale factor on X axis of this node
- *
- * The deafult value is 1.0 if you haven't changed it before
- *
- * @param fScaleX The scale factor on X axis.
- */
- virtual void setScaleX(float fScaleX);
- /**
- * Returns the scale factor on X axis of this node
- *
- * @see setScaleX(float)
- *
- * @return The scale factor on X axis.
- */
- virtual float getScaleX();
-
-
- /**
- * Changes the scale factor on Y axis of this node
- *
- * The Default value is 1.0 if you haven't changed it before.
- *
- * @param fScaleY The scale factor on Y axis.
- */
- virtual void setScaleY(float fScaleY);
- /**
- * Returns the scale factor on Y axis of this node
- *
- * @see setScaleY(float)
- *
- * @return The scale factor on Y axis.
- */
- virtual float getScaleY();
-
-
- /**
- * Changes both X and Y scale factor of the node.
- *
- * 1.0 is the default scale factor. It modifies the X and Y scale at the same time.
- *
- * @param scale The scale factor for both X and Y axis.
- */
- virtual void setScale(float scale);
- /**
- * Gets the scale factor of the node, when X and Y have the same scale factor.
- *
- * @warning Assert when m_fScaleX != m_fScaleY.
- * @see setScale(float)
- *
- * @return The scale factor of the node.
- */
- virtual float getScale();
-
-
- /**
- * Changes both X and Y scale factor of the node.
- *
- * 1.0 is the default scale factor. It modifies the X and Y scale at the same time.
- *
- * @param fScaleX The scale factor on X axis.
- * @param fScaleY The scale factor on Y axis.
- */
- virtual void setScale(float fScaleX,float fScaleY);
-
-
- /**
- * Changes the position (x,y) of the node in OpenGL coordinates
- *
- * Usually we use ccp(x,y) to compose CCPoint object.
- * The original point (0,0) is at the left-bottom corner of screen.
- * For example, this codesnip sets the node in the center of screen.
- * @code
- * CCSize size = CCDirector::sharedDirector()->getWinSize();
- * node->setPosition( ccp(size.width/2, size.height/2) )
- * @endcode
- *
- * @param position The position (x,y) of the node in OpenGL coordinates
- * @js NA
- */
- virtual void setPosition(const CCPoint &position);
- /**
- * Gets the position (x,y) of the node in OpenGL coordinates
- *
- * @see setPosition(const CCPoint&)
- *
- * @return The position (x,y) of the node in OpenGL coordinates
- */
- virtual const CCPoint& getPosition();
- /**
- * Sets position in a more efficient way.
- *
- * Passing two numbers (x,y) is much efficient than passing CCPoint object.
- * This method is binded to lua and javascript.
- * Passing a number is 10 times faster than passing a object from lua to c++
- *
- * @code
- * // sample code in lua
- * local pos = node::getPosition() -- returns CCPoint object from C++
- * node:setPosition(x, y) -- pass x, y coordinate to C++
- * @endcode
- *
- * @param x X coordinate for position
- * @param y Y coordinate for position
- * @js NA
- */
- virtual void setPosition(float x, float y);
- /**
- * Gets position in a more efficient way, returns two number instead of a CCPoint object
- *
- * @see setPosition(float, float)
- */
- virtual void getPosition(float* x, float* y);
- /**
- * Gets/Sets x or y coordinate individually for position.
- * These methods are used in Lua and Javascript Bindings
- */
- virtual void setPositionX(float x);
- virtual float getPositionX(void);
- virtual void setPositionY(float y);
- virtual float getPositionY(void);
-
-
- /**
- * Changes the X skew angle of the node in degrees.
- *
- * This angle describes the shear distortion in the X direction.
- * Thus, it is the angle between the Y axis and the left edge of the shape
- * The default skewX angle is 0. Positive values distort the node in a CW direction.
- *
- * @param fSkewX The X skew angle of the node in degrees.
- */
- virtual void setSkewX(float fSkewX);
- /**
- * Returns the X skew angle of the node in degrees.
- *
- * @see setSkewX(float)
- *
- * @return The X skew angle of the node in degrees.
- */
- virtual float getSkewX();
-
-
- /**
- * Changes the Y skew angle of the node in degrees.
- *
- * This angle describes the shear distortion in the Y direction.
- * Thus, it is the angle between the X axis and the bottom edge of the shape
- * The default skewY angle is 0. Positive values distort the node in a CCW direction.
- *
- * @param fSkewY The Y skew angle of the node in degrees.
- */
- virtual void setSkewY(float fSkewY);
- /**
- * Returns the Y skew angle of the node in degrees.
- *
- * @see setSkewY(float)
- *
- * @return The Y skew angle of the node in degrees.
- */
- virtual float getSkewY();
-
-
- /**
- * Sets the anchor point in percent.
- *
- * anchorPoint is the point around which all transformations and positioning manipulations take place.
- * It's like a pin in the node where it is "attached" to its parent.
- * The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.
- * But you can use values higher than (1,1) and lower than (0,0) too.
- * The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
- *
- * @param anchorPoint The anchor point of node.
- */
- virtual void setAnchorPoint(const CCPoint& anchorPoint);
- /**
- * Returns the anchor point in percent.
- *
- * @see setAnchorPoint(const CCPoint&)
- *
- * @return The anchor point of node.
- */
- virtual const CCPoint& getAnchorPoint();
- /**
- * Returns the anchorPoint in absolute pixels.
- *
- * @warning You can only read it. If you wish to modify it, use anchorPoint instead.
- * @see getAnchorPoint()
- *
- * @return The anchor point in absolute pixels.
- */
- virtual const CCPoint& getAnchorPointInPoints();
-
- /**
- * Sets the untransformed size of the node.
- *
- * The contentSize remains the same no matter the node is scaled or rotated.
- * All nodes has a size. Layer and Scene has the same size of the screen.
- *
- * @param contentSize The untransformed size of the node.
- */
- virtual void setContentSize(const CCSize& contentSize);
- /**
- * Returns the untransformed size of the node.
- *
- * @see setContentSize(const CCSize&)
- *
- * @return The untransformed size of the node.
- */
- virtual const CCSize& getContentSize() const;
-
- RT_ADD(virtual CCSize getScaledContentSize(void); )
-
- /**
- * Sets whether the node is visible
- *
- * The default value is true, a node is default to visible
- *
- * @param visible true if the node is visible, false if the node is hidden.
- */
- virtual void setVisible(bool visible);
- /**
- * Determines if the node is visible
- *
- * @see setVisible(bool)
- *
- * @return true if the node is visible, false if the node is hidden.
- */
- virtual bool isVisible();
-
-
- /**
- * Sets the rotation (angle) of the node in degrees.
- *
- * 0 is the default rotation angle.
- * Positive values rotate node clockwise, and negative values for anti-clockwise.
- *
- * @param fRotation The roration of the node in degrees.
- */
- virtual void setRotation(float fRotation);
- /**
- * Returns the rotation of the node in degrees.
- *
- * @see setRotation(float)
- *
- * @return The rotation of the node in degrees.
- */
- virtual float getRotation();
-
-
- /**
- * Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
- *
- * 0 is the default rotation angle.
- * Positive values rotate node clockwise, and negative values for anti-clockwise.
- *
- * @param fRotationX The X rotation in degrees which performs a horizontal rotational skew.
- */
- virtual void setRotationX(float fRotaionX);
- /**
- * Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
- *
- * @see setRotationX(float)
- *
- * @return The X rotation in degrees.
- */
- virtual float getRotationX();
-
-
- /**
- * Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
- *
- * 0 is the default rotation angle.
- * Positive values rotate node clockwise, and negative values for anti-clockwise.
- *
- * @param fRotationY The Y rotation in degrees.
- */
- virtual void setRotationY(float fRotationY);
- /**
- * Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
- *
- * @see setRotationY(float)
- *
- * @return The Y rotation in degrees.
- */
- virtual float getRotationY();
-
-
- /**
- * Sets the arrival order when this node has a same ZOrder with other children.
- *
- * A node which called addChild subsequently will take a larger arrival order,
- * If two children have the same Z order, the child with larger arrival order will be drawn later.
- *
- * @warning This method is used internally for zOrder sorting, don't change this manually
- *
- * @param uOrderOfArrival The arrival order.
- */
- virtual void setOrderOfArrival(unsigned int uOrderOfArrival);
- /**
- * Returns the arrival order, indecates which children is added previously.
- *
- * @see setOrderOfArrival(unsigned int)
- *
- * @return The arrival order.
- */
- virtual unsigned int getOrderOfArrival();
-
-
- /**
- * Sets the state of OpenGL server side.
- *
- * @param glServerState The state of OpenGL server side.
- * @js NA
- */
- virtual void setGLServerState(ccGLServerState glServerState);
- /**
- * Returns the state of OpenGL server side.
- *
- * @return The state of OpenGL server side.
- * @js NA
- */
- virtual ccGLServerState getGLServerState();
-
-
- /**
- * Sets whether the anchor point will be (0,0) when you position this node.
- *
- * This is an internal method, only used by CCLayer and CCScene. Don't call it outside framework.
- * The default value is false, while in CCLayer and CCScene are true
- *
- * @param ignore true if anchor point will be (0,0) when you position this node
- * @todo This method shoud be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set"
- */
- virtual void ignoreAnchorPointForPosition(bool ignore);
- /**
- * Gets whether the anchor point will be (0,0) when you position this node.
- *
- * @see ignoreAnchorPointForPosition(bool)
- *
- * @return true if the anchor point will be (0,0) when you position this node.
- */
- virtual bool isIgnoreAnchorPointForPosition();
-
- /// @} end of Setters & Getters for Graphic Peroperties
-
-
- /// @{
- /// @name Children and Parent
-
- /**
- * Adds a child to the container with z-order as 0.
- *
- * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
- *
- * @param child A child node
- */
- virtual void addChild(CCNode * child);
- /**
- * Adds a child to the container with a z-order
- *
- * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
- *
- * @param child A child node
- * @param zOrder Z order for drawing priority. Please refer to setZOrder(int)
- */
- virtual void addChild(CCNode * child, int zOrder);
- /**
- * Adds a child to the container with z order and tag
- *
- * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
- *
- * @param child A child node
- * @param zOrder Z order for drawing priority. Please refer to setZOrder(int)
- * @param tag A interger to identify the node easily. Please refer to setTag(int)
- */
- virtual void addChild(CCNode* child, int zOrder, int tag);
- /**
- * Gets a child from the container with its tag
- *
- * @param tag An identifier to find the child node.
- *
- * @return a CCNode object whose tag equals to the input parameter
- */
- virtual CCNode * getChildByTag(int tag);
- /**
- * Return an array of children
- *
- * Composing a "tree" structure is a very important feature of CCNode
- * Here's a sample code of traversing children array:
- * @code
- * CCNode* node = NULL;
- * CCARRAY_FOREACH(parent->getChildren(), node)
- * {
- * node->setPosition(0,0);
- * }
- * @endcode
- * This sample code traverses all children nodes, and set theie position to (0,0)
- *
- * @return An array of children
- */
- virtual CCArray* getChildren();
-
- /**
- * Get the amount of children.
- *
- * @return The amount of children.
- */
- virtual unsigned int getChildrenCount(void) const;
-
- /**
- * Sets the parent node
- *
- * @param parent A pointer to the parnet node
- */
- virtual void setParent(CCNode* parent);
- /**
- * Returns a pointer to the parent node
- *
- * @see setParent(CCNode*)
- *
- * @returns A pointer to the parnet node
- */
- virtual CCNode* getParent();
-
-
- ////// REMOVES //////
-
- /**
- * Removes this node itself from its parent node with a cleanup.
- * If the node orphan, then nothing happens.
- * @see removeFromParentAndCleanup(bool)
- */
- virtual void removeFromParent();
- /**
- * Removes this node itself from its parent node.
- * If the node orphan, then nothing happens.
- * @param cleanup true if all actions and callbacks on this node should be removed, false otherwise.
- * @js removeFromParent
- */
- virtual void removeFromParentAndCleanup(bool cleanup);
-
- RT_ADD( virtual void removeMeAndCleanup(void); )
-
- /**
- * Removes a child from the container with a cleanup
- *
- * @see removeChild(CCNode, bool)
- *
- * @param child The child node which will be removed.
- */
- virtual void removeChild(CCNode* child);
- /**
- * Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
- *
- * @param child The child node which will be removed.
- * @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
- */
- virtual void removeChild(CCNode* child, bool cleanup);
- /**
- * Removes a child from the container by tag value with a cleanup.
- *
- * @see removeChildByTag(int, bool)
- *
- * @param tag An interger number that identifies a child node
- */
- virtual void removeChildByTag(int tag);
- /**
- * Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
- *
- * @param tag An interger number that identifies a child node
- * @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
- */
- virtual void removeChildByTag(int tag, bool cleanup);
- /**
- * Removes all children from the container with a cleanup.
- *
- * @see removeAllChildrenWithCleanup(bool)
- */
- virtual void removeAllChildren();
- /**
- * Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
- *
- * @param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
- * @js removeAllChildren
- */
- virtual void removeAllChildrenWithCleanup(bool cleanup);
-
- /**
- * Reorders a child according to a new z value.
- *
- * @param child An already added child node. It MUST be already added.
- * @param zOrder Z order for drawing priority. Please refer to setZOrder(int)
- */
- virtual void reorderChild(CCNode * child, int zOrder);
-
- /**
- * Sorts the children array once before drawing, instead of every time when a child is added or reordered.
- * This appraoch can improves the performance massively.
- * @note Don't call this manually unless a child added needs to be removed in the same frame
- */
- virtual void sortAllChildren();
-
- /// @} end of Children and Parent
-
-
-
- /// @{
- /// @name Grid object for effects
-
- /**
- * Returns a grid object that is used when applying effects
- *
- * @return A CCGrid object that is used when applying effects
- * @js NA
- */
- virtual CCGridBase* getGrid();
- /**
- * Changes a grid object that is used when applying effects
- *
- * @param A CCGrid object that is used when applying effects
- */
- virtual void setGrid(CCGridBase *pGrid);
-
- /// @} end of Grid
-
-
- /// @{
- /// @name Tag & User data
-
- /**
- * Returns a tag that is used to identify the node easily.
- *
- * You can set tags to node then identify them easily.
- * @code
- * #define TAG_PLAYER 1
- * #define TAG_MONSTER 2
- * #define TAG_BOSS 3
- * // set tags
- * node1->setTag(TAG_PLAYER);
- * node2->setTag(TAG_MONSTER);
- * node3->setTag(TAG_BOSS);
- * parent->addChild(node1);
- * parent->addChild(node2);
- * parent->addChild(node3);
- * // identify by tags
- * CCNode* node = NULL;
- * CCARRAY_FOREACH(parent->getChildren(), node)
- * {
- * switch(node->getTag())
- * {
- * case TAG_PLAYER:
- * break;
- * case TAG_MONSTER:
- * break;
- * case TAG_BOSS:
- * break;
- * }
- * }
- * @endcode
- *
- * @return A interger that identifies the node.
- */
- RT_REMOVE( virtual int getTag() const; )
- /**
- * Changes the tag that is used to identify the node easily.
- *
- * Please refer to getTag for the sample code.
- *
- * @param A interger that indentifies the node.
- */
- RT_REMOVE( virtual void setTag(int nTag); )
-
- /**
- * Returns a custom user data pointer
- *
- * You can set everything in UserData pointer, a data block, a structure or an object.
- *
- * @return A custom user data pointer
- * @js NA
- */
- virtual void* getUserData();
- /**
- * Sets a custom user data pointer
- *
- * You can set everything in UserData pointer, a data block, a structure or an object, etc.
- * @warning Don't forget to release the memroy manually,
- * especially before you change this data pointer, and before this node is autoreleased.
- *
- * @return A custom user data pointer
- * @js NA
- */
- virtual void setUserData(void *pUserData);
-
- /**
- * Returns a user assigned CCObject
- *
- * Similar to userData, but instead of holding a void* it holds an object
- *
- * @return A user assigned CCObject
- * @js NA
- */
- virtual CCObject* getUserObject();
- /**
- * Returns a user assigned CCObject
- *
- * Similar to UserData, but instead of holding a void* it holds an object.
- * The UserObject will be retained once in this method,
- * and the previous UserObject (if existed) will be relese.
- * The UserObject will be released in CCNode's destructure.
- *
- * @param A user assigned CCObject
- */
- virtual void setUserObject(CCObject *pUserObject);
-
- /// @} end of Tag & User Data
-
-
- /// @{
- /// @name Shader Program
- /**
- * Return the shader program currently used for this node
- *
- * @return The shader program currelty used for this node
- */
- virtual CCGLProgram* getShaderProgram();
- /**
- * Sets the shader program for this node
- *
- * Since v2.0, each rendering node must set its shader program.
- * It should be set in initialize phase.
- * @code
- * node->setShaderProgram(CCShaderCache::sharedShaderCache()->programForKey(kCCShader_PositionTextureColor));
- * @endcode
- *
- * @param The shader program which fetchs from CCShaderCache.
- */
- virtual void setShaderProgram(CCGLProgram *pShaderProgram);
- /// @} end of Shader Program
-
-
- /**
- * Returns a camera object that lets you move the node using a gluLookAt
- *
- * @code
- * CCCamera* camera = node->getCamera();
- * camera->setEyeXYZ(0, 0, 415/2);
- * camera->setCenterXYZ(0, 0, 0);
- * @endcode
- *
- * @return A CCCamera object that lets you move the node using a gluLookAt
- */
- virtual CCCamera* getCamera();
-
- /**
- * Returns whether or not the node accepts event callbacks.
- *
- * Running means the node accept event callbacks like onEnter(), onExit(), update()
- *
- * @return Whether or not the node is running.
- */
- virtual bool isRunning();
-
-
- /// @{
- /// @name Script Bindings for lua
-
- /**
- * Registers a script function that will be called in onEnter() & onExit() seires functions.
- *
- * This handler will be removed automatically after onExit() called.
- * @code
- * -- lua sample
- * local function sceneEventHandler(eventType)
- * if eventType == kCCNodeOnEnter then
- * -- do something
- * elseif evetType == kCCNodeOnExit then
- * -- do something
- * end
- * end
- * scene::registerScriptHandler(sceneEventHandler)
- * @endcode
- *
- * @warning This method is for internal usage, don't call it manually.
- * @todo Perhaps we should rename it to get/set/removeScriptHandler acoording to the function name style.
- *
- * @param handler A number that indicates a lua function.
- */
- virtual void registerScriptHandler(int handler);
- /**
- * Unregisters a script function that will be called in onEnter() & onExit() series functions.
- *
- * @see registerScriptHandler(int)
- */
- virtual void unregisterScriptHandler(void);
- /**
- * Gets script handler for onEnter/onExit event.
- * This is an internal method. g
- * @see registerScriptHandler(int)
- *
- * @return A number that indicates a lua function.
- */
- inline int getScriptHandler() { return m_nScriptHandler; };
-
- /**
- * Schedules for lua script.
- * @js NA
- */
- void scheduleUpdateWithPriorityLua(int nHandler, int priority);
-
- /// @} end Script Bindings
-
-
- /// @{
- /// @name Event Callbacks
-
- /**
- * Event callback that is invoked every time when CCNode enters the 'stage'.
- * If the CCNode enters the 'stage' with a transition, this event is called when the transition starts.
- * During onEnter you can't access a "sister/brother" node.
- * If you override onEnter, you shall call its parent's one, e.g., CCNode::onEnter().
- * @js NA
- * @lua NA
- */
- virtual void onEnter();
-
- /** Event callback that is invoked when the CCNode enters in the 'stage'.
- * If the CCNode enters the 'stage' with a transition, this event is called when the transition finishes.
- * If you override onEnterTransitionDidFinish, you shall call its parent's one, e.g. CCNode::onEnterTransitionDidFinish()
- * @js NA
- * @lua NA
- */
- virtual void onEnterTransitionDidFinish();
-
- /**
- * Event callback that is invoked every time the CCNode leaves the 'stage'.
- * If the CCNode leaves the 'stage' with a transition, this event is called when the transition finishes.
- * During onExit you can't access a sibling node.
- * If you override onExit, you shall call its parent's one, e.g., CCNode::onExit().
- * @js NA
- * @lua NA
- */
- virtual void onExit();
-
- /**
- * Event callback that is called every time the CCNode leaves the 'stage'.
- * If the CCNode leaves the 'stage' with a transition, this callback is called when the transition starts.
- * @js NA
- * @lua NA
- */
- virtual void onExitTransitionDidStart();
-
- /// @} end of event callbacks.
-
-
- /**
- * Stops all running actions and schedulers
- */
- virtual void cleanup(void);
-
- /**
- * Override this method to draw your own node.
- * The following GL states will be enabled by default:
- * - glEnableClientState(GL_VERTEX_ARRAY);
- * - glEnableClientState(GL_COLOR_ARRAY);
- * - glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- * - glEnable(GL_TEXTURE_2D);
- * AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE
- * But if you enable any other GL state, you should disable it after drawing your node.
- */
- virtual void draw(void);
-
- /**
- * Visits this node's children and draw them recursively.
- */
- virtual void visit(void);
-
-
- /**
- * Returns a "local" axis aligned bounding box of the node.
- * The returned box is relative only to its parent.
- *
- * @note This method returns a temporaty variable, so it can't returns const CCRect&
- * @todo Rename to getBoundingBox() in the future versions.
- *
- * @return A "local" axis aligned boudning box of the node.
- * @js getBoundingBox
- */
- CCRect boundingBox(void);
-
- /// @{
- /// @name Actions
-
- /**
- * Sets the CCActionManager object that is used by all actions.
- *
- * @warning If you set a new CCActionManager, then previously created actions will be removed.
- *
- * @param actionManager A CCActionManager object that is used by all actions.
- */
- virtual void setActionManager(CCActionManager* actionManager);
- /**
- * Gets the CCActionManager object that is used by all actions.
- * @see setActionManager(CCActionManager*)
- * @return A CCActionManager object.
- */
- virtual CCActionManager* getActionManager();
-
- /**
- * Executes an action, and returns the action that is executed.
- *
- * This node becomes the action's target. Refer to CCAction::getTarget()
- * @warning Actions don't retain their target.
- *
- * @return An Action pointer
- */
- CCAction* runAction(CCAction* action);
-
- /**
- * Stops and removes all actions from the running action list .
- */
- void stopAllActions(void);
-
- /**
- * Stops and removes an action from the running action list.
- *
- * @param An action object to be removed.
- */
- void stopAction(CCAction* action);
-
- /**
- * Removes an action from the running action list by its tag.
- *
- * @param A tag that indicates the action to be removed.
- */
- void stopActionByTag(int tag);
-
- /**
- * Gets an action from the running action list by its tag.
- *
- * @see setTag(int), getTag().
- *
- * @return The action object with the given tag.
- */
- CCAction* getActionByTag(int tag);
-
- /**
- * Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
- *
- * Composable actions are counted as 1 action. Example:
- * If you are running 1 Sequence of 7 actions, it will return 1.
- * If you are running 7 Sequences of 2 actions, it will return 7.
- * @todo Rename to getNumberOfRunningActions()
- *
- * @return The number of actions that are running plus the ones that are schedule to run
- */
- unsigned int numberOfRunningActions(void);
-
- /// @} end of Actions
-
-
- /// @{
- /// @name Scheduler and Timer
-
- /**
- * Sets a CCScheduler object that is used to schedule all "updates" and timers.
- *
- * @warning If you set a new CCScheduler, then previously created timers/update are going to be removed.
- * @param scheduler A CCShdeduler object that is used to schedule all "update" and timers.
- * @js NA
- */
- virtual void setScheduler(CCScheduler* scheduler);
- /**
- * Gets a CCSheduler object.
- *
- * @see setScheduler(CCScheduler*)
- * @return A CCScheduler object.
- * @js NA
- */
- virtual CCScheduler* getScheduler();
-
- /**
- * Checks whether a selector is scheduled.
- *
- * @param selector A function selector
- * @return Whether the funcion selector is scheduled.
- * @js NA
- * @lua NA
- */
- bool isScheduled(SEL_SCHEDULE selector);
-
- /**
- * Schedules the "update" method.
- *
- * It will use the order number 0. This method will be called every frame.
- * Scheduled methods with a lower order value will be called before the ones that have a higher order value.
- * Only one "update" method could be scheduled per node.
- * @lua NA
- */
- void scheduleUpdate(void);
-
- /**
- * Schedules the "update" method with a custom priority.
- *
- * This selector will be called every frame.
- * Scheduled methods with a lower priority will be called before the ones that have a higher value.
- * Only one "update" selector could be scheduled per node (You can't have 2 'update' selectors).
- * @lua NA
- */
- void scheduleUpdateWithPriority(int priority);
-
- /*
- * Unschedules the "update" method.
- * @see scheduleUpdate();
- */
- void unscheduleUpdate(void);
-
- /**
- * Schedules a custom selector.
- *
- * If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.
- * @code
- * // firstly, implement a schedule function
- * void MyNode::TickMe(float dt);
- * // wrap this function into a selector via schedule_selector marco.
- * this->schedule(schedule_selector(MyNode::TickMe), 0, 0, 0);
- * @endcode
- *
- * @param interval Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use scheduleUpdate() instead.
- * @param repeat The selector will be excuted (repeat + 1) times, you can use kCCRepeatForever for tick infinitely.
- * @param delay The amount of time that the first tick will wait before execution.
- * @lua NA
- */
- void schedule(SEL_SCHEDULE selector, float interval, unsigned int repeat, float delay);
-
- /**
- * Schedules a custom selector with an interval time in seconds.
- * @see schedule(SEL_SCHEDULE, float, unsigned int, float)
- *
- * @param selector A function wrapped as a selector
- * @param interval Callback interval time in seconds. 0 means tick every frame,
- * @lua NA
- */
- void schedule(SEL_SCHEDULE selector, float interval);
-
- /**
- * Schedules a selector that runs only once, with a delay of 0 or larger
- * @see schedule(SEL_SCHEDULE, float, unsigned int, float)
- *
- * @param selector A function wrapped as a selector
- * @param delay The amount of time that the first tick will wait before execution.
- * @lua NA
- */
- void scheduleOnce(SEL_SCHEDULE selector, float delay);
-
- /**
- * Schedules a custom selector, the scheduled selector will be ticked every frame
- * @see schedule(SEL_SCHEDULE, float, unsigned int, float)
- *
- * @param selector A function wrapped as a selector
- * @lua NA
- */
- void schedule(SEL_SCHEDULE selector);
-
- /**
- * Unschedules a custom selector.
- * @see schedule(SEL_SCHEDULE, float, unsigned int, float)
- *
- * @param selector A function wrapped as a selector
- * @lua NA
- */
- void unschedule(SEL_SCHEDULE selector);
-
- /**
- * Unschedule all scheduled selectors: custom selectors, and the 'update' selector.
- * Actions are not affected by this method.
- */
- void unscheduleAllSelectors(void);
-
- /**
- * Resumes all scheduled selectors and actions.
- * This method is called internally by onEnter
- * @js NA
- * @lua NA
- */
- void resumeSchedulerAndActions(void);
- /**
- * Pauses all scheduled selectors and actions.
- * This method is called internally by onExit
- * @js NA
- * @lua NA
- */
- void pauseSchedulerAndActions(void);
-
- /*
- * Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "live"
- */
- virtual void update(float delta);
-
- /// @} end of Scheduler and Timer
-
- /// @{
- /// @name Transformations
-
- /**
- * Performs OpenGL view-matrix transformation based on position, scale, rotation and other attributes.
- */
- void transform(void);
- /**
- * Performs OpenGL view-matrix transformation of it's ancestors.
- * Generally the ancestors are already transformed, but in certain cases (eg: attaching a FBO)
- * It's necessary to transform the ancestors again.
- */
- void transformAncestors(void);
- /**
- * Calls children's updateTransform() method recursively.
- *
- * This method is moved from CCSprite, so it's no longer specific to CCSprite.
- * As the result, you apply CCSpriteBatchNode's optimization on your customed CCNode.
- * e.g., batchNode->addChild(myCustomNode), while you can only addChild(sprite) before.
- */
- virtual void updateTransform(void);
-
- /**
- * Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
- * The matrix is in Pixels.
- */
- RT_REMOVE( virtual CCAffineTransform nodeToParentTransform(void); )
- RT_ADD( virtual const CCAffineTransform nodeToParentTransform(void); )
-
- /**
- * Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
- * The matrix is in Pixels.
- */
- RT_REMOVE( virtual CCAffineTransform parentToNodeTransform(void); )
- RT_ADD( virtual const CCAffineTransform parentToNodeTransform(void);)
-
- /**
- * Returns the world affine transform matrix. The matrix is in Pixels.
- */
- virtual CCAffineTransform nodeToWorldTransform(void);
-
- /**
- * Returns the inverse world affine transform matrix. The matrix is in Pixels.
- */
- virtual CCAffineTransform worldToNodeTransform(void);
-
- /// @} end of Transformations
-
-
- /// @{
- /// @name Coordinate Converters
-
- /**
- * Converts a Point to node (local) space coordinates. The result is in Points.
- */
- CCPoint convertToNodeSpace(const CCPoint& worldPoint);
-
- /**
- * Converts a Point to world space coordinates. The result is in Points.
- */
- CCPoint convertToWorldSpace(const CCPoint& nodePoint);
-
- /**
- * Converts a Point to node (local) space coordinates. The result is in Points.
- * treating the returned/received node point as anchor relative.
- */
- CCPoint convertToNodeSpaceAR(const CCPoint& worldPoint);
-
- /**
- * Converts a local Point to world space coordinates.The result is in Points.
- * treating the returned/received node point as anchor relative.
- */
- CCPoint convertToWorldSpaceAR(const CCPoint& nodePoint);
-
- /**
- * convenience methods which take a CCTouch instead of CCPoint
- */
- CCPoint convertTouchToNodeSpace(CCTouch * touch);
-
- /**
- * converts a CCTouch (world coordinates) into a local coordinate. This method is AR (Anchor Relative).
- */
- CCPoint convertTouchToNodeSpaceAR(CCTouch * touch);
-
- /**
- * Sets the additional transform.
- *
- * @note The additional transform will be concatenated at the end of nodeToParentTransform.
- * It could be used to simulate `parent-child` relationship between two nodes (e.g. one is in BatchNode, another isn't).
- * @code
- // create a batchNode
- CCSpriteBatchNode* batch= CCSpriteBatchNode::create("Icon-114.png");
- this->addChild(batch);
-
- // create two sprites, spriteA will be added to batchNode, they are using different textures.
- CCSprite* spriteA = CCSprite::createWithTexture(batch->getTexture());
- CCSprite* spriteB = CCSprite::create("Icon-72.png");
-
- batch->addChild(spriteA);
-
- // We can't make spriteB as spriteA's child since they use different textures. So just add it to layer.
- // But we want to simulate `parent-child` relationship for these two node.
- this->addChild(spriteB);
-
- //position
- spriteA->setPosition(ccp(200, 200));
-
- // Gets the spriteA's transform.
- CCAffineTransform t = spriteA->nodeToParentTransform();
-
- // Sets the additional transform to spriteB, spriteB's postion will based on its pseudo parent i.e. spriteA.
- spriteB->setAdditionalTransform(t);
-
- //scale
- spriteA->setScale(2);
-
- // Gets the spriteA's transform.
- t = spriteA->nodeToParentTransform();
-
- // Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA.
- spriteB->setAdditionalTransform(t);
-
- //rotation
- spriteA->setRotation(20);
-
- // Gets the spriteA's transform.
- t = spriteA->nodeToParentTransform();
-
- // Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA.
- spriteB->setAdditionalTransform(t);
- * @endcode
- */
- void setAdditionalTransform(const CCAffineTransform& additionalTransform);
-
- /// @} end of Coordinate Converters
-
- /// @{
- /// @name component functions
- /**
- * gets a component by its name
- */
- CCComponent* getComponent(const char *pName) const;
-
- /**
- * adds a component
- */
- virtual bool addComponent(CCComponent *pComponent);
-
- /**
- * removes a component by its name
- */
- virtual bool removeComponent(const char *pName);
-
- /**
- * removes a component by its pointer
- */
- virtual bool removeComponent(CCComponent *pComponent);
-
- /**
- * removes all components
- */
- virtual void removeAllComponents();
- /// @} end of component functions
-
- RT_ADD(
- virtual void updateTweenAction(float, const char*);
-
- CCNode& operator=(const CCNode&);
- )
-
-private:
- /// lazy allocs
- void childrenAlloc(void);
-
- /// helper that reorder a child
- void insertChild(CCNode* child, int z);
-
- /// Removes a child, call child->onExit(), do cleanup, remove it from children array.
- void detachChild(CCNode *child, bool doCleanup);
-
- /** Convert cocos2d coordinates to UI windows coordinate.
- * @js NA
- * @lua NA
- */
- CCPoint convertToWindowSpace(const CCPoint& nodePoint);
-
-protected:
- float m_fRotationX; ///< rotation angle on x-axis
- float m_fRotationY; ///< rotation angle on y-axis
-
- float m_fScaleX; ///< scaling factor on x-axis
- float m_fScaleY; ///< scaling factor on y-axis
-
- float m_fVertexZ; ///< OpenGL real Z vertex
-
- CCPoint m_obPosition; ///< position of the node
-
- float m_fSkewX; ///< skew angle on x-axis
- float m_fSkewY; ///< skew angle on y-axis
-
- CCPoint m_obAnchorPointInPoints; ///< anchor point in points
- CCPoint m_obAnchorPoint; ///< anchor point normalized (NOT in points)
-
- CCSize m_obContentSize; ///< untransformed size of the node
-
-
- CCAffineTransform m_sAdditionalTransform; ///< transform
- CCAffineTransform m_sTransform; ///< transform
- CCAffineTransform m_sInverse; ///< transform
-
- CCCamera *m_pCamera; ///< a camera
-
- CCGridBase *m_pGrid; ///< a grid
-
- int m_nZOrder; ///< z-order value that affects the draw order
-
- CCArray *m_pChildren; ///< array of children nodes
- CCNode *m_pParent; ///< weak reference to parent node
-
- RT_REMOVE( int m_nTag; ) ///< a tag. Can be any number you assigned just to identify this node
-
- void *m_pUserData; ///< A user assingned void pointer, Can be point to any cpp object
- CCObject *m_pUserObject; ///< A user assigned CCObject
-
- CCGLProgram *m_pShaderProgram; ///< OpenGL shader
-
- ccGLServerState m_eGLServerState; ///< OpenGL servier side state
-
- unsigned int m_uOrderOfArrival; ///< used to preserve sequence while sorting children with the same zOrder
-
- CCScheduler *m_pScheduler; ///< scheduler used to schedule timers and updates
-
- CCActionManager *m_pActionManager; ///< a pointer to ActionManager singleton, which is used to handle all the actions
-
- bool m_bRunning; ///< is running
-
- bool m_bTransformDirty; ///< transform dirty flag
- bool m_bInverseDirty; ///< transform dirty flag
- bool m_bAdditionalTransformDirty; ///< The flag to check whether the additional transform is dirty
- public:
- bool m_bVisible; ///< is this node visible
- protected:
-
- bool m_bIgnoreAnchorPointForPosition; ///< true if the Anchor Point will be (0,0) when you position the CCNode, false otherwise.
- ///< Used by CCLayer and CCScene.
-
- bool m_bReorderChildDirty; ///< children order dirty flag
-
- int m_nScriptHandler; ///< script handler for onEnter() & onExit(), used in Javascript binding and Lua binding.
- int m_nUpdateScriptHandler; ///< script handler for update() callback per frame, which is invoked from lua & javascript.
- ccScriptType m_eScriptType; ///< type of script binding, lua or javascript
-
- CCComponentContainer *m_pComponentContainer; ///< Dictionary of components
-
-};
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
-//#pragma mark - CCNodeRGBA
-#endif
-
-/** CCNodeRGBA is a subclass of CCNode that implements the CCRGBAProtocol protocol.
-
- All features from CCNode are valid, plus the following new features:
- - opacity
- - RGB colors
-
- Opacity/Color propagates into children that conform to the CCRGBAProtocol if cascadeOpacity/cascadeColor is enabled.
- @since v2.1
- */
-class CC_DLL CCNodeRGBA : public CCNode, public CCRGBAProtocol
-{
-public:
- /**
- * @js ctor
- */
- CCNodeRGBA();
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCNodeRGBA();
-
- virtual bool init();
-
- /**
- * Allocates and initializes a nodergba.
- * @return A initialized node which is marked as "autorelease".
- */
- static CCNodeRGBA * create(void);
-
- virtual GLubyte getOpacity();
- virtual GLubyte getDisplayedOpacity();
- virtual void setOpacity(GLubyte opacity);
- virtual void updateDisplayedOpacity(GLubyte parentOpacity);
- virtual bool isCascadeOpacityEnabled();
- virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled);
-
- virtual const ccColor3B& getColor(void);
- virtual const ccColor3B& getDisplayedColor();
- virtual void setColor(const ccColor3B& color);
- virtual void updateDisplayedColor(const ccColor3B& parentColor);
- virtual bool isCascadeColorEnabled();
- virtual void setCascadeColorEnabled(bool cascadeColorEnabled);
-
- virtual void setOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);};
- virtual bool isOpacityModifyRGB() { return false; };
-
-protected:
- GLubyte _displayedOpacity;
- GLubyte _realOpacity;
- ccColor3B _displayedColor;
- ccColor3B _realColor;
- bool _cascadeColorEnabled;
- bool _cascadeOpacityEnabled;
-};
-
-// end of base_node group
-/// @}
-
-NS_CC_END
-
-#endif // __PLATFORM_CCNODE_H__
diff --git a/cocos2dx/ccFPSImages.h b/cocos2dx/ccFPSImages.h
deleted file mode 100644
index 20807f8..0000000
--- a/cocos2dx/ccFPSImages.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * cocos2d for iPhone: http://www.cocos2d-iphone.org
- *
- * Copyright (c) 2012 Zynga Inc.
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern unsigned char cc_fps_images_png[];
-unsigned int cc_fps_images_len(void);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/cocos2dx/cocoa/CCAffineTransform.h b/cocos2dx/cocoa/CCAffineTransform.h
deleted file mode 100644
index 6bc8b35..0000000
--- a/cocos2dx/cocoa/CCAffineTransform.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __COCOA_CGAFFINETRANSFORM_H__
-#define __COCOA_CGAFFINETRANSFORM_H__
-
-#include "CCGeometry.h"
-#include "platform/CCPlatformMacros.h"
-
-NS_CC_BEGIN
-
-struct CCAffineTransform {
- float a, b, c, d;
- float tx, ty;
-};
-
-CC_DLL CCAffineTransform __CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty);
-#define CCAffineTransformMake __CCAffineTransformMake
-
-CC_DLL CCPoint __CCPointApplyAffineTransform(const CCPoint& point, const CCAffineTransform& t);
-#define CCPointApplyAffineTransform __CCPointApplyAffineTransform
-
-CC_DLL CCSize __CCSizeApplyAffineTransform(const CCSize& size, const CCAffineTransform& t);
-#define CCSizeApplyAffineTransform __CCSizeApplyAffineTransform
-
-CC_DLL CCAffineTransform CCAffineTransformMakeIdentity();
-CC_DLL CCRect CCRectApplyAffineTransform(const CCRect& rect, const CCAffineTransform& anAffineTransform);
-
-CC_DLL CCAffineTransform CCAffineTransformTranslate(const CCAffineTransform& t, float tx, float ty);
-CC_DLL CCAffineTransform CCAffineTransformRotate(const CCAffineTransform& aTransform, float anAngle);
-CC_DLL CCAffineTransform CCAffineTransformScale(const CCAffineTransform& t, float sx, float sy);
-CC_DLL CCAffineTransform CCAffineTransformConcat(const CCAffineTransform& t1, const CCAffineTransform& t2);
-CC_DLL bool CCAffineTransformEqualToTransform(const CCAffineTransform& t1, const CCAffineTransform& t2);
-CC_DLL CCAffineTransform CCAffineTransformInvert(const CCAffineTransform& t);
-
-extern CC_DLL const CCAffineTransform CCAffineTransformIdentity;
-
-NS_CC_END
-
-#endif // __COCOA_CGAFFINETRANSFORM_H__
diff --git a/cocos2dx/cocoa/CCArray.h b/cocos2dx/cocoa/CCArray.h
deleted file mode 100644
index a09c199..0000000
--- a/cocos2dx/cocoa/CCArray.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-#ifndef __CCARRAY_H__
-#define __CCARRAY_H__
-
-#include "support/data_support/ccCArray.h"
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-/** @def CCARRAY_FOREACH
-A convenience macro to iterate over a CCArray using. It is faster than the "fast enumeration" interface.
-@since v0.99.4
-*/
-
-/*
-In cocos2d-iphone 1.0.0, This macro have been update to like this:
-
-#define CCARRAY_FOREACH(__array__, __object__) \
-if (__array__ && __array__->data->num > 0) \
-for(id *__arr__ = __array__->data->arr, *end = __array__->data->arr + __array__->data->num-1; \
-__arr__ <= end && ((__object__ = *__arr__) != nil || true); \
-__arr__++)
-
-I found that it's not work in C++. So it keep what it's look like in version 1.0.0-rc3. ---By Bin
-*/
-#define CCARRAY_FOREACH(__array__, __object__) \
- if ((__array__) && (__array__)->data->num > 0) \
- for(CCObject** __arr__ = (__array__)->data->arr, **__end__ = (__array__)->data->arr + (__array__)->data->num-1; \
- __arr__ <= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \
- __arr__++)
-
-#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \
- if ((__array__) && (__array__)->data->num > 0) \
- for(CCObject** __arr__ = (__array__)->data->arr + (__array__)->data->num-1, **__end__ = (__array__)->data->arr; \
- __arr__ >= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \
- __arr__--)
-
-#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
-#define CCARRAY_VERIFY_TYPE(__array__, __type__) \
- do { \
- if ((__array__) && (__array__)->data->num > 0) \
- for(CCObject** __arr__ = (__array__)->data->arr, \
- **__end__ = (__array__)->data->arr + (__array__)->data->num-1; __arr__ <= __end__; __arr__++) \
- CCAssert(dynamic_cast<__type__>(*__arr__), "element type is wrong!"); \
- } while(false)
-#else
-#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0)
-#endif
-
-#define arrayMakeObjectsPerformSelector(pArray, func, elementType) \
-do { \
- if(pArray && pArray->count() > 0) \
- { \
- CCObject* child; \
- CCARRAY_FOREACH(pArray, child) \
- { \
- elementType pNode = (elementType) child; \
- if(pNode) \
- { \
- pNode->func(); \
- } \
- } \
- } \
-} \
-while(false)
-
-#define arrayMakeObjectsPerformSelectorWithObject(pArray, func, pObject, elementType) \
-do { \
- if(pArray && pArray->count() > 0) \
- { \
- CCObject* child = NULL; \
- CCARRAY_FOREACH(pArray, child) \
- { \
- elementType pNode = (elementType) child; \
- if(pNode) \
- { \
- pNode->func(pObject); \
- } \
- } \
- } \
-} \
-while(false)
-
-
-NS_CC_BEGIN
-/**
- * @js NA
- */
-class CC_DLL CCArray : public CCObject
-{
-public:
- /**
- * @lua NA
- */
- ~CCArray();
-
- /** Create an array */
- static CCArray* create();
- /** Create an array with some objects
- * @lua NA
- */
- static CCArray* create(CCObject* pObject, ...);
- /** Create an array with one object */
- static CCArray* createWithObject(CCObject* pObject);
- /** Create an array with capacity */
- static CCArray* createWithCapacity(unsigned int capacity);
- /** Create an array with an existing array */
- static CCArray* createWithArray(CCArray* otherArray);
- /**
- @brief Generate a CCArray pointer by file
- @param pFileName The file name of *.plist file
- @return The CCArray pointer generated from the file
- */
- static CCArray* createWithContentsOfFile(const char* pFileName);
-
- /*
- @brief The same meaning as arrayWithContentsOfFile(), but it doesn't call autorelease, so the
- invoker should call release().
- @lua NA
- */
- static CCArray* createWithContentsOfFileThreadSafe(const char* pFileName);
-
- /** Initializes an array
- * @lua NA
- */
- bool init();
- /** Initializes an array with one object
- * @lua NA
- */
- bool initWithObject(CCObject* pObject);
- /** Initializes an array with some objects
- * @lua NA
- */
- bool initWithObjects(CCObject* pObject, ...);
- /** Initializes an array with capacity
- * @lua NA
- */
- bool initWithCapacity(unsigned int capacity);
- /** Initializes an array with an existing array
- * @lua NA
- */
- bool initWithArray(CCArray* otherArray);
-
- // Querying an Array
-
- /** Returns element count of the array */
- unsigned int count() const;
- /** Returns capacity of the array */
- unsigned int capacity() const;
- /** Returns index of a certain object, return UINT_MAX if doesn't contain the object */
- unsigned int indexOfObject(CCObject* object) const;
- /** Returns an element with a certain index */
- CCObject* objectAtIndex(unsigned int index);
- /** Returns last element */
- CCObject* lastObject();
- /** Returns a random element */
- CCObject* randomObject();
- /** Returns a Boolean value that indicates whether object is present in array. */
- bool containsObject(CCObject* object) const;
- /** @since 1.1 */
- bool isEqualToArray(CCArray* pOtherArray);
- // Adding Objects
-
- /** Add a certain object */
- void addObject(CCObject* object);
- /** Add all elements of an existing array */
- void addObjectsFromArray(CCArray* otherArray);
- /** Insert a certain object at a certain index */
- void insertObject(CCObject* object, unsigned int index);
-
- // Removing Objects
-
- /** Remove last object */
- void removeLastObject(bool bReleaseObj = true);
- /** Remove a certain object */
- void removeObject(CCObject* object, bool bReleaseObj = true);
- /** Remove an element with a certain index */
- void removeObjectAtIndex(unsigned int index, bool bReleaseObj = true);
- /** Remove all elements */
- void removeObjectsInArray(CCArray* otherArray);
- /** Remove all objects */
- void removeAllObjects();
- /** Fast way to remove a certain object */
- void fastRemoveObject(CCObject* object);
- /** Fast way to remove an element with a certain index */
- void fastRemoveObjectAtIndex(unsigned int index);
-
- // Rearranging Content
-
- /** Swap two elements */
- void exchangeObject(CCObject* object1, CCObject* object2);
- /** Swap two elements with certain indexes */
- void exchangeObjectAtIndex(unsigned int index1, unsigned int index2);
-
- /** Replace object at index with another object. */
- void replaceObjectAtIndex(unsigned int uIndex, CCObject* pObject, bool bReleaseObject = true);
-
- /** Revers the array */
- void reverseObjects();
- /* Shrinks the array so the memory footprint corresponds with the number of items */
- void reduceMemoryFootprint();
-
- /** override functions
- * @js NA
- * @lua NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
-
- /* override functions */
- virtual void acceptVisitor(CCDataVisitor &visitor);
-
-public:
- ccArray* data;
- /**
- * @lua NA
- */
- CCArray();
- /**
- * @lua NA
- */
- CCArray(unsigned int capacity);
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif // __CCARRAY_H__
diff --git a/cocos2dx/cocoa/CCAutoreleasePool.h b/cocos2dx/cocoa/CCAutoreleasePool.h
deleted file mode 100644
index 5c83686..0000000
--- a/cocos2dx/cocoa/CCAutoreleasePool.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-#ifndef __AUTORELEASEPOOL_H__
-#define __AUTORELEASEPOOL_H__
-
-#include "CCObject.h"
-#include "CCArray.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup base_nodes
- * @{
- * @js NA
- * @lua NA
- */
-
-class CC_DLL CCAutoreleasePool : public CCObject
-{
- CCArray* m_pManagedObjectArray;
-public:
- CCAutoreleasePool(void);
- ~CCAutoreleasePool(void);
-
- void addObject(CCObject *pObject);
- void removeObject(CCObject *pObject);
-
- void clear();
-};
-
-/**
- * @js NA
- * @lua NA
- */
-class CC_DLL CCPoolManager
-{
- CCArray* m_pReleasePoolStack;
- CCAutoreleasePool* m_pCurReleasePool;
-
- CCAutoreleasePool* getCurReleasePool();
-public:
- CCPoolManager();
- ~CCPoolManager();
- void finalize();
- void push();
- void pop();
-
- void removeObject(CCObject* pObject);
- void addObject(CCObject* pObject);
-
- static CCPoolManager* sharedPoolManager();
- static void purgePoolManager();
-
- friend class CCAutoreleasePool;
-};
-
-// end of base_nodes group
-/// @}
-
-NS_CC_END
-
-#endif //__AUTORELEASEPOOL_H__
diff --git a/cocos2dx/cocoa/CCBool.h b/cocos2dx/cocoa/CCBool.h
deleted file mode 100644
index 51e5b79..0000000
--- a/cocos2dx/cocoa/CCBool.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
- Copyright (c) 2010-2012 cocos2d-x.org
-
- 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.
- ****************************************************************************/
-
-#ifndef __CCBOOL_H__
-#define __CCBOOL_H__
-
-#include "CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- * @js NA
- * @lua NA
- */
-
-class CC_DLL CCBool : public CCObject
-{
-public:
- CCBool(bool v)
- : m_bValue(v) {}
- bool getValue() const {return m_bValue;}
-
- static CCBool* create(bool v)
- {
- CCBool* pRet = new CCBool(v);
- if (pRet)
- {
- pRet->autorelease();
- }
- return pRet;
- }
-
- /* override functions */
- virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); }
-
-private:
- bool m_bValue;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif /* __CCBOOL_H__ */
diff --git a/cocos2dx/cocoa/CCDataVisitor.h b/cocos2dx/cocoa/CCDataVisitor.h
deleted file mode 100644
index 28f01c9..0000000
--- a/cocos2dx/cocoa/CCDataVisitor.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
- Copyright (c) 2013 cocos2d-x.org
-
- 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.
- ****************************************************************************/
-
-#ifndef __CCDATAVISITOR_H__
-#define __CCDATAVISITOR_H__
-
-#include "platform/CCPlatformMacros.h"
-#include
-
-NS_CC_BEGIN
-
-class CCObject;
-class CCBool;
-class CCInteger;
-class CCFloat;
-class CCDouble;
-class CCString;
-class CCArray;
-class CCDictionary;
-class CCSet;
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-/**
- * Visitor that helps to perform action that depends on polymorphic object type
- *
- * Use cases:
- * - data serialization,
- * - pretty printing of \a CCObject *
- * - safe value reading from \a CCArray, \a CCDictionary, \a CCSet
- *
- * Usage:
- * 1. subclass CCDataVisitor
- * 2. overload visit() methods for object that you need to handle
- * 3. handle other objects in \a visitObject()
- * 4. pass your visitor to \a CCObject::acceptVisitor()
- * @js NA
- * @lua NA
- */
-class CC_DLL CCDataVisitor
-{
-public:
- virtual ~CCDataVisitor() {}
-
- /** default method, called from non-overloaded methods and for unrecognized objects */
- virtual void visitObject(const CCObject *p) = 0;
-
- virtual void visit(const CCBool *p);
- virtual void visit(const CCInteger *p);
- virtual void visit(const CCFloat *p);
- virtual void visit(const CCDouble *p);
- virtual void visit(const CCString *p);
- virtual void visit(const CCArray *p);
- virtual void visit(const CCDictionary *p);
- virtual void visit(const CCSet *p);
-};
-
-/**
- * @js NA
- * @lua NA
- */
-class CC_DLL CCPrettyPrinter : public CCDataVisitor
-{
-public:
- CCPrettyPrinter(int indentLevel = 0);
-
- virtual void clear();
- virtual std::string getResult();
-
- virtual void visitObject(const CCObject *p);
- virtual void visit(const CCBool * p);
- virtual void visit(const CCInteger *p);
- virtual void visit(const CCFloat *p);
- virtual void visit(const CCDouble *p);
- virtual void visit(const CCString *p);
- virtual void visit(const CCArray *p);
- virtual void visit(const CCDictionary *p);
- virtual void visit(const CCSet *p);
-private:
- void setIndentLevel(int indentLevel);
- int _indentLevel;
- std::string _indentStr;
- std::string _result;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif // __CCDATAVISITOR_H__
diff --git a/cocos2dx/cocoa/CCDictionary.h b/cocos2dx/cocoa/CCDictionary.h
deleted file mode 100644
index c86ae64..0000000
--- a/cocos2dx/cocoa/CCDictionary.h
+++ /dev/null
@@ -1,436 +0,0 @@
-/****************************************************************************
-Copyright (c) 2012 - 2013 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CCDICTIONARY_H__
-#define __CCDICTIONARY_H__
-
-#include "support/data_support/uthash.h"
-#include "CCObject.h"
-#include "CCArray.h"
-#include "CCString.h"
-
-NS_CC_BEGIN
-
-class CCDictionary;
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-
-/**
- * CCDictElement is used for traversing CCDictionary.
- *
- * A CCDictElement is one element of CCDictionary, it contains two properties, key and object.
- * Its key has two different type (integer and string).
- *
- * @note The key type is unique, all the elements in CCDictionary has the same key type(integer or string).
- * @code
- * CCDictElement* pElement;
- * CCDICT_FOREACH(dict, pElement)
- * {
- * const char*key = pElement->getStrKey();
- * // You certainly know the type of value, so we assume that it's a CCSprite.
- * CCSprite* pSprite = (CCSprite*)pElement->getObject();
- * // ......
- * }
- * @endcode
- * @js NA
- * @lua NA
- */
-class CC_DLL CCDictElement
-{
-private:
- /**
- * Constructor of CCDictElement. It's only for internal usage. CCDictionary is its friend class.
- *
- * @param pszKey The string key of this element.
- * @param pObject The object of this element.
- */
- CCDictElement(const char* pszKey, CCObject* pObject);
-
- /**
- * Constructor of CCDictElement. It's only for internal usage. CCDictionary is its friend class.
- *
- * @param iKey The integer key of this element.
- * @param pObject The object of this element.
- */
- CCDictElement(intptr_t iKey, CCObject* pObject);
-
-public:
- /**
- * The destructor of CCDictElement.
- */
- ~CCDictElement();
-
- // Inline functions need to be implemented in header file on Android.
-
- /**
- * Get the string key of this element.
- * @note This method assumes you know the key type in the element.
- * If the element's key type is integer, invoking this method will cause an assert.
- *
- * @return The string key of this element.
- */
- inline const char* getStrKey() const
- {
- CCAssert(m_szKey[0] != '\0', "Should not call this function for integer dictionary");
- return m_szKey;
- }
-
- /**
- * Get the integer key of this element.
- * @note This method assumes you know the key type in the element.
- * If the element's key type is string, invoking this method will cause an assert.
- *
- * @return The integer key of this element.
- */
- inline intptr_t getIntKey() const
- {
- CCAssert(m_szKey[0] == '\0', "Should not call this function for string dictionary");
- return m_iKey;
- }
-
- /**
- * Get the object of this element.
- *
- * @return The object of this element.
- */
- inline CCObject* getObject() const { return m_pObject; }
-
-private:
- // The max length of string key.
- #define MAX_KEY_LEN 256
- // char array is needed for HASH_ADD_STR in UT_HASH.
- // So it's a pain that all elements will allocate 256 bytes for this array.
- char m_szKey[MAX_KEY_LEN]; // hash key of string type
- intptr_t m_iKey; // hash key of integer type
- CCObject* m_pObject; // hash value
-public:
- UT_hash_handle hh; // makes this class hashable
- friend class CCDictionary; // declare CCDictionary as friend class
-};
-
-/** The macro for traversing dictionary
- *
- * @note It's faster than getting all keys and traversing keys to get objects by objectForKey.
- * It's also safe to remove elements while traversing.
- */
-#define CCDICT_FOREACH(__dict__, __el__) \
- CCDictElement* pTmp##__dict__##__el__ = NULL; \
- if (__dict__) \
- HASH_ITER(hh, (__dict__)->m_pElements, __el__, pTmp##__dict__##__el__)
-
-
-
-/**
- * CCDictionary is a class like NSDictionary in Obj-C .
- *
- * @note Only the pointer of CCObject or its subclass can be inserted to CCDictionary.
- * @code
- * // Create a dictionary, return an autorelease object.
- * CCDictionary* pDict = CCDictionary::create();
- *
- * // Insert objects to dictionary
- * CCString* pValue1 = CCString::create("100");
- * CCString* pValue2 = CCString::create("120");
- * CCInteger* pValue3 = CCInteger::create(200);
- * pDict->setObject(pValue1, "key1");
- * pDict->setObject(pValue2, "key2");
- * pDict->setObject(pValue3, "key3");
- *
- * // Get the object for key
- * CCString* pStr1 = (CCString*)pDict->objectForKey("key1");
- * CCLog("{ key1: %s }", pStr1->getCString());
- * CCInteger* pInteger = (CCInteger*)pDict->objectForKey("key3");
- * CCLog("{ key3: %d }", pInteger->getValue());
- * @endcode
- * @js NA
- *
- */
-
-class CC_DLL CCDictionary : public CCObject
-{
-public:
- /**
- * The constructor of CCDictionary.
- * @lua NA
- */
- CCDictionary();
-
- /**
- * The destructor of CCDictionary
- * @lua NA
- */
- ~CCDictionary();
-
- /**
- * Get the count of elements in CCDictionary.
- *
- * @return The count of elements.
- */
- unsigned int count();
-
- /**
- * Return all keys of elements.
- *
- * @return The array contains all keys of elements. It's an autorelease object yet.
- */
- CCArray* allKeys();
-
- /**
- * Get all keys according to the specified object.
- * @warning We use '==' to compare two objects
- * @return The array contains all keys for the specified object. It's an autorelease object yet.
- */
- CCArray* allKeysForObject(CCObject* object);
-
- /**
- * Get the object according to the specified string key.
- *
- * @note The dictionary needs to use string as key. If integer is passed, an assert will appear.
- * @param key The string key for searching.
- * @return The object matches the key. You need to force convert it to the type you know.
- * @code
- * // Assume that the elements are CCString* pointers. Convert it by following code.
- * CCString* pStr = (CCString*)pDict->objectForKey("key1");
- * // Do something about pStr.
- * // If you don't know the object type, properly you need to use dynamic_cast to check it.
- * CCString* pStr2 = dynamic_cast(pDict->objectForKey("key1"));
- * if (pStr2 != NULL) {
- * // Do something about pStr2
- * }
- * @endcode
- * @see objectForKey(intptr_t)
- */
- CCObject* objectForKey(const std::string& key);
-
- /**
- * Get the object according to the specified integer key.
- *
- * @note The dictionary needs to use integer as key. If string is passed, an assert will appear.
- * @param key The integer key for searching.
- * @return The object matches the key.
- * @see objectForKey(const std::string&)
- */
- CCObject* objectForKey(intptr_t key);
-
- /** Get the value according to the specified string key.
- *
- * @note Be careful to use this function since it assumes the objects in the dictionary are CCString pointer.
- * @param key The string key for searching
- * @return An instance of CCString.
- * It will return an empty string if the objects aren't CCString pointer or the key wasn't found.
- * @see valueForKey(intptr_t)
- */
- const CCString* valueForKey(const std::string& key);
-
- /** Get the value according to the specified integer key.
- *
- * @note Be careful to use this function since it assumes the objects in the dictionary are CCString pointer.
- * @param key The string key for searching.
- * @return An instance of CCString.
- * It will return an empty string if the objects aren't CCString pointer or the key wasn't found.
- * @see valueForKey(intptr_t)
- */
- const CCString* valueForKey(intptr_t key);
-
- /** Insert an object to dictionary, and match it with the specified string key.
- *
- * @note Whe the first time this method is invoked, the key type will be set to string.
- * After that you can't setObject with an integer key.
- * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary.
- * Then the new object will be inserted after that.
- *
- * @param pObject The Object to be inserted.
- * @param key The string key for searching.
- * @see setObject(CCObject*, intptr_t)
- */
- void setObject(CCObject* pObject, const std::string& key);
-
- /** Insert an object to dictionary, and match it with the specified string key.
- *
- * @note Then the first time this method is invoked, the key type will be set to string.
- * After that you can't setObject with an integer key.
- * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary.
- * Then the new object will be inserted after that.
- * @param pObject The Object to be inserted.
- * @param key The string key for searching.
- * @see setObject(CCObject*, const std::string&)
- */
- void setObject(CCObject* pObject, intptr_t key);
-
- /**
- * Remove an object by the specified string key.
- *
- * @param key The string key for searching.
- * @see removeObjectForKey(intptr_t), removeObjectsForKeys(CCArray*),
- * removeObjectForElememt(CCDictElement*), removeAllObjects().
- */
- void removeObjectForKey(const std::string& key);
-
- /**
- * Remove an object by the specified integer key.
- *
- * @param key The integer key for searching.
- * @see removeObjectForKey(const std::string&), removeObjectsForKeys(CCArray*),
- * removeObjectForElememt(CCDictElement*), removeAllObjects().
- */
- void removeObjectForKey(intptr_t key);
-
- /**
- * Remove objects by an array of keys.
- *
- * @param pKeyArray The array contains keys to be removed.
- * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t),
- * removeObjectForElememt(CCDictElement*), removeAllObjects().
- */
- void removeObjectsForKeys(CCArray* pKeyArray);
-
- /**
- * Remove an object by an element.
- *
- * @param pElement The element need to be removed.
- * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t),
- * removeObjectsForKeys(CCArray*), removeAllObjects().
- * @lua NA
- */
- void removeObjectForElememt(CCDictElement* pElement);
-
- /**
- * Remove all objects in the dictionary.
- *
- * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t),
- * removeObjectsForKeys(CCArray*), removeObjectForElememt(CCDictElement*).
- */
- void removeAllObjects();
-
- /// @{
- /// @name Function override
- /**
- * This function is used for deepcopy elements from source dictionary to destination dictionary.
- * You shouldn't invoke this function manually since it's called by CCObject::copy.
- * @lua NA
- * @js NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- /// @}
-
- /**
- * Return a random object in the dictionary.
- *
- * @return The random object.
- * @see objectForKey(intptr_t), objectForKey(const std::string&)
- * @lua NA
- */
- CCObject* randomObject();
-
- /**
- * Create a dictionary.
- * @return A dictionary which is an autorelease object.
- * @see createWithDictionary(CCDictionary*), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*).
- */
- static CCDictionary* create();
-
- /**
- * Create a dictionary with an existing dictionary.
- *
- * @param srcDict The exist dictionary.
- * @return A dictionary which is an autorelease object.
- * @see create(), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*).
- */
- static CCDictionary* createWithDictionary(CCDictionary* srcDict);
-
- /**
- * Create a dictionary with a plist file.
- * @param pFileName The name of the plist file.
- * @return A dictionary which is an autorelease object.
- * @see create(), createWithDictionary(CCDictionary*), createWithContentsOfFileThreadSafe(const char*).
- */
- static CCDictionary* createWithContentsOfFile(const char *pFileName);
-
- /**
- * Write a dictionary to a plist file.
- * @param fullPath The full path of the plist file. You can get writeable path by getWritablePath()
- * @return true if successed, false if failed
- * @lua NA
- */
- bool writeToFile(const char *fullPath);
-
- /**
- * Create a dictionary with a plist file.
- *
- * @note the return object isn't an autorelease object.
- * This can make sure not using autorelease pool in a new thread.
- * Therefore, you need to manage the lifecycle of the return object.
- * It means that when you don't need it, CC_SAFE_RELEASE needs to be invoked.
- *
- * @param pFileName The name of the plist file.
- * @return A dictionary which isn't an autorelease object.
- * @lua NA
- */
- static CCDictionary* createWithContentsOfFileThreadSafe(const char *pFileName);
-
- /* override functions
- * @lua NA
- */
- virtual void acceptVisitor(CCDataVisitor &visitor);
-
-private:
- /**
- * For internal usage, invoked by setObject.
- */
- void setObjectUnSafe(CCObject* pObject, const std::string& key);
- void setObjectUnSafe(CCObject* pObject, const intptr_t key);
-
-public:
- /**
- * All the elements in dictionary.
- *
- * @note For internal usage, we need to declare this member variable as public since it's used in UT_HASH.
- */
- CCDictElement* m_pElements;
-private:
-
- /** The support type of dictionary, it's confirmed when setObject is invoked. */
- enum CCDictType
- {
- kCCDictUnknown = 0,
- kCCDictStr,
- kCCDictInt
- };
-
- /**
- * The type of dictionary, it's assigned to kCCDictUnknown by default.
- */
- CCDictType m_eDictType;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif /* __CCDICTIONARY_H__ */
diff --git a/cocos2dx/cocoa/CCDouble.h b/cocos2dx/cocoa/CCDouble.h
deleted file mode 100644
index 25023fa..0000000
--- a/cocos2dx/cocoa/CCDouble.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
- Copyright (c) 2010-2012 cocos2d-x.org
-
- 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.
- ****************************************************************************/
-
-#ifndef __CCDOUBLE_H__
-#define __CCDOUBLE_H__
-
-#include "CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- * @js NA
- * @lua NA
- */
-
-class CC_DLL CCDouble : public CCObject
-{
-public:
- CCDouble(double v)
- : m_dValue(v) {}
- double getValue() const {return m_dValue;}
-
- static CCDouble* create(double v)
- {
- CCDouble* pRet = new CCDouble(v);
- if (pRet)
- {
- pRet->autorelease();
- }
- return pRet;
- }
-
- /* override functions */
- virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); }
-
-private:
- double m_dValue;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif /* __CCDOUBLE_H__ */
diff --git a/cocos2dx/cocoa/CCFloat.h b/cocos2dx/cocoa/CCFloat.h
deleted file mode 100644
index ab5131d..0000000
--- a/cocos2dx/cocoa/CCFloat.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
- Copyright (c) 2010-2012 cocos2d-x.org
-
- 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.
- ****************************************************************************/
-
-#ifndef __CCFLOAT_H__
-#define __CCFLOAT_H__
-
-#include "CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- * @js NA
- * @lua NA
- */
-
-class CC_DLL CCFloat : public CCObject
-{
-public:
- CCFloat(float v)
- : m_fValue(v) {}
- float getValue() const {return m_fValue;}
-
- static CCFloat* create(float v)
- {
- CCFloat* pRet = new CCFloat(v);
- if (pRet)
- {
- pRet->autorelease();
- }
- return pRet;
- }
-
- /* override functions */
- virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); }
-
-private:
- float m_fValue;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif /* __CCFLOAT_H__ */
diff --git a/cocos2dx/cocoa/CCGeometry.h b/cocos2dx/cocoa/CCGeometry.h
deleted file mode 100644
index b269973..0000000
--- a/cocos2dx/cocoa/CCGeometry.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CCGEMETRY_H__
-#define __CCGEMETRY_H__
-
-#include "platform/CCPlatformMacros.h"
-#include "CCObject.h"
-#include
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-// for CCPoint assignement operator and copy constructor
-class CC_DLL CCSize;
-
-/**
- * @js NA
- */
-class CC_DLL CCPoint
-{
-public:
- float x;
- float y;
-
-public:
- CCPoint();
- CCPoint(float x, float y);
- /**
- * @lua NA
- */
- CCPoint(const CCPoint& other);
- /**
- * @lua NA
- */
- CCPoint(const CCSize& size);
- /**
- * @lua NA
- */
- CCPoint& operator= (const CCPoint& other);
- /**
- * @lua NA
- */
- CCPoint& operator= (const CCSize& size);
- /**
- * @lua NA
- */
- CCPoint operator+(const CCPoint& right) const;
- /**
- * @lua NA
- */
- CCPoint operator-(const CCPoint& right) const;
- /**
- * @lua NA
- */
- CCPoint operator-() const;
- /**
- * @lua NA
- */
- CCPoint operator*(float a) const;
- /**
- * @lua NA
- */
- CCPoint operator/(float a) const;
-
-HJ_ADD(
- inline CCPoint operator*(const CCPoint& right) const {return CCPoint(x*right.x, y*right.y);}
- inline CCPoint operator/(const CCPoint& right) const {return CCPoint(x/right.x, y/right.y);}
-)
- /**
- * @lua NA
- */
- void setPoint(float x, float y);
- bool equals(const CCPoint& target) const;
-
- /** @returns if points have fuzzy equality which means equal with some degree of variance.
- * @since v2.1.4
- * @lua NA
- */
- bool fuzzyEquals(const CCPoint& target, float variance) const;
-
- /** Calculates distance between point an origin
- * @return float
- * @since v2.1.4
- * @lua NA
- */
- inline float getLength() const {
- return sqrtf(x*x + y*y);
- };
-
- /** Calculates the square length of a CCPoint (not calling sqrt() )
- * @return float
- * @since v2.1.4
- * @lua NA
- */
- inline float getLengthSq() const {
- return dot(*this); //x*x + y*y;
- };
-
- /** Calculates the square distance between two points (not calling sqrt() )
- @return float
- @since v2.1.4
- */
- inline float getDistanceSq(const CCPoint& other) const {
- return (*this - other).getLengthSq();
- };
-
- /** Calculates the distance between two points
- @return float
- @since v2.1.4
- */
- inline float getDistance(const CCPoint& other) const {
- return (*this - other).getLength();
- };
-
- /** @returns the angle in radians between this vector and the x axis
- @since v2.1.4
- */
- inline float getAngle() const {
- return atan2f(y, x);
- };
-
- /** @returns the angle in radians between two vector directions
- @since v2.1.4
- */
- float getAngle(const CCPoint& other) const;
-
- /** Calculates dot product of two points.
- @return float
- @since v2.1.4
- */
- inline float dot(const CCPoint& other) const {
- return x*other.x + y*other.y;
- };
-
- /** Calculates cross product of two points.
- @return float
- @since v2.1.4
- */
- inline float cross(const CCPoint& other) const {
- return x*other.y - y*other.x;
- };
-
- /** Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0
- @return CCPoint
- @since v2.1.4
- */
- inline CCPoint getPerp() const {
- return CCPoint(-y, x);
- };
-
- /** Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0
- @return CCPoint
- @since v2.1.4
- */
- inline CCPoint getRPerp() const {
- return CCPoint(y, -x);
- };
-
- /** Calculates the projection of this over other.
- @return CCPoint
- @since v2.1.4
- */
- inline CCPoint project(const CCPoint& other) const {
- return other * (dot(other)/other.dot(other));
- };
-
- /** Complex multiplication of two points ("rotates" two points).
- @return CCPoint vector with an angle of this.getAngle() + other.getAngle(),
- and a length of this.getLength() * other.getLength().
- @since v2.1.4
- */
- inline CCPoint rotate(const CCPoint& other) const {
- return CCPoint(x*other.x - y*other.y, x*other.y + y*other.x);
- };
-
- /** Unrotates two points.
- @return CCPoint vector with an angle of this.getAngle() - other.getAngle(),
- and a length of this.getLength() * other.getLength().
- @since v2.1.4
- */
- inline CCPoint unrotate(const CCPoint& other) const {
- return CCPoint(x*other.x + y*other.y, y*other.x - x*other.y);
- };
-
- /** Returns point multiplied to a length of 1.
- * If the point is 0, it returns (1, 0)
- @return CCPoint
- @since v2.1.4
- */
- inline CCPoint normalize() const {
- float length = getLength();
- if(length == 0.) return CCPoint(1.f, 0);
- return *this / getLength();
- };
-
- /** Linear Interpolation between two points a and b
- @returns
- alpha == 0 ? a
- alpha == 1 ? b
- otherwise a value between a..b
- @since v2.1.4
- */
- inline CCPoint lerp(const CCPoint& other, float alpha) const {
- return *this * (1.f - alpha) + other * alpha;
- };
-
- /** Rotates a point counter clockwise by the angle around a pivot
- @param pivot is the pivot, naturally
- @param angle is the angle of rotation ccw in radians
- @returns the rotated point
- @since v2.1.4
- */
- CCPoint rotateByAngle(const CCPoint& pivot, float angle) const;
-
- static inline CCPoint forAngle(const float a)
- {
- return CCPoint(cosf(a), sinf(a));
- }
-};
-
-/**
- * @js NA
- */
-class CC_DLL CCSize
-{
-public:
- float width;
- float height;
-
-public:
- CCSize();
- CCSize(float width, float height);
- /**
- * @lua NA
- */
- CCSize(const CCSize& other);
- /**
- * @lua NA
- */
- CCSize(const CCPoint& point);
- /**
- * @lua NA
- */
- CCSize& operator= (const CCSize& other);
- /**
- * @lua NA
- */
- CCSize& operator= (const CCPoint& point);
- /**
- * @lua NA
- */
- CCSize operator+(const CCSize& right) const;
- /**
- * @lua NA
- */
- CCSize operator-(const CCSize& right) const;
- /**
- * @lua NA
- */
- CCSize operator*(float a) const;
- /**
- * @lua NA
- */
- CCSize operator/(float a) const;
- /**
- * @lua NA
- */
- void setSize(float width, float height);
- /**
- * @lua NA
- */
- bool equals(const CCSize& target) const;
-};
-
-/**
- * @js NA
- */
-class CC_DLL CCRect
-{
-public:
- CCPoint origin;
- CCSize size;
-
-public:
- CCRect();
- CCRect(float x, float y, float width, float height);
- /**
- * @lua NA
- */
- CCRect(const CCRect& other);
- /**
- * @lua NA
- */
- CCRect& operator= (const CCRect& other);
- void setRect(float x, float y, float width, float height);
- float getMinX() const; /// return the leftmost x-value of current rect
- float getMidX() const; /// return the midpoint x-value of current rect
- float getMaxX() const; /// return the rightmost x-value of current rect
- float getMinY() const; /// return the bottommost y-value of current rect
- float getMidY() const; /// return the midpoint y-value of current rect
- float getMaxY() const; /// return the topmost y-value of current rect
- bool equals(const CCRect& rect) const;
- bool containsPoint(const CCPoint& point) const;
- bool intersectsRect(const CCRect& rect) const;
-};
-
-
-#define CCPointMake(x, y) CCPoint((float)(x), (float)(y))
-#define CCSizeMake(width, height) CCSize((float)(width), (float)(height))
-#define CCRectMake(x, y, width, height) CCRect((float)(x), (float)(y), (float)(width), (float)(height))
-
-
-const CCPoint CCPointZero = CCPointMake(0,0);
-
-/* The "zero" size -- equivalent to CCSizeMake(0, 0). */
-const CCSize CCSizeZero = CCSizeMake(0,0);
-
-/* The "zero" rectangle -- equivalent to CCRectMake(0, 0, 0, 0). */
-const CCRect CCRectZero = CCRectMake(0,0,0,0);
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif // __CCGEMETRY_H__
diff --git a/cocos2dx/cocoa/CCInteger.h b/cocos2dx/cocoa/CCInteger.h
deleted file mode 100644
index f700a30..0000000
--- a/cocos2dx/cocoa/CCInteger.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef __CCINTEGER_H__
-#define __CCINTEGER_H__
-
-#include "CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- * @js NA
- */
-
-class CC_DLL CCInteger : public CCObject
-{
-public:
- CCInteger(int v)
- : m_nValue(v) {}
- int getValue() const {return m_nValue;}
-
- static CCInteger* create(int v)
- {
- CCInteger* pRet = new CCInteger(v);
- pRet->autorelease();
- return pRet;
- }
-
- /* override functions
- * @lua NA
- */
- virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); }
-
-private:
- int m_nValue;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif /* __CCINTEGER_H__ */
diff --git a/cocos2dx/cocoa/CCNS.h b/cocos2dx/cocoa/CCNS.h
deleted file mode 100644
index e5d4744..0000000
--- a/cocos2dx/cocoa/CCNS.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __PLATFOMR_CCNS_H__
-#define __PLATFOMR_CCNS_H__
-
-#include "CCGeometry.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-/**
-@brief Returns a Core Graphics rectangle structure corresponding to the data in a given string.
-@param pszContent A string object whose contents are of the form "{{x,y},{w, h}}",
- where x is the x coordinate, y is the y coordinate, w is the width, and h is the height.
- These components can represent integer or float values.
- An example of a valid string is "{{3,2},{4,5}}".
- The string is not localized, so items are always separated with a comma.
-@return A Core Graphics structure that represents a rectangle.
- If the string is not well-formed, the function returns CCRectZero.
-*/
-CCRect CC_DLL CCRectFromString(const char* pszContent);
-
-/**
-@brief Returns a Core Graphics point structure corresponding to the data in a given string.
-@param pszContent A string object whose contents are of the form "{x,y}",
- where x is the x coordinate and y is the y coordinate.
- The x and y values can represent integer or float values.
- An example of a valid string is "{3.0,2.5}".
- The string is not localized, so items are always separated with a comma.
-@return A Core Graphics structure that represents a point.
- If the string is not well-formed, the function returns CCPointZero.
-*/
-CCPoint CC_DLL CCPointFromString(const char* pszContent);
-
-/**
-@brief Returns a Core Graphics size structure corresponding to the data in a given string.
-@param pszContent A string object whose contents are of the form "{w, h}",
- where w is the width and h is the height.
- The w and h values can be integer or float values.
- An example of a valid string is "{3.0,2.5}".
- The string is not localized, so items are always separated with a comma.
-@return A Core Graphics structure that represents a size.
- If the string is not well-formed, the function returns CCSizeZero.
-*/
-CCSize CC_DLL CCSizeFromString(const char* pszContent);
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif // __PLATFOMR_CCNS_H__
-
-
diff --git a/cocos2dx/cocoa/CCObject.h b/cocos2dx/cocoa/CCObject.h
deleted file mode 100644
index 05319af..0000000
--- a/cocos2dx/cocoa/CCObject.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CCOBJECT_H__
-#define __CCOBJECT_H__
-
-#include "CCDataVisitor.h"
-#include "ccMacros.h"
-
-#ifdef EMSCRIPTEN
-#include
-#endif // EMSCRIPTEN
-
-RT_ADD(
- class DS_Dictionary;
-)
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup base_nodes
- * @{
- */
-
-RT_ADD(
- typedef enum {
- kCCObjectTypePlayLayer = 5,
- kCCObjectTypeLevelEditorLayer = 6,
- kCCObjectTypeMenuLayer = 15,
- } CCObjectType;
-)
-
-class CCZone;
-class CCObject;
-class CCNode;
-class CCEvent;
-
-/**
- * @js NA
- * @lua NA
- */
-class CC_DLL CCCopying
-{
-public:
- virtual CCObject* copyWithZone(CCZone* pZone);
-};
-
-/**
- * @js NA
- */
-class CC_DLL CCObject : public CCCopying
-{
-public:
- // object id, CCScriptSupport need public m_uID
- unsigned int m_uID;
- // Lua reference id
- int m_nLuaID;
-protected:
- // the object's tag
- RT_ADD( int m_nTag; )
- // count of references
- unsigned int m_uReference;
- // count of autorelease
- unsigned int m_uAutoReleaseCount;
-
- RT_ADD(
- int m_eObjType;
- int m_nUnknown;
- )
-public:
- CCObject(void);
- RT_ADD( CCObject(const CCObject&); )
- /**
- * @lua NA
- */
- virtual ~CCObject(void);
-
- RT_ADD( CCObject& operator=(const CCObject&); )
-
- void release(void);
- void retain(void);
- CCObject* autorelease(void);
- CCObject* copy(void);
- bool isSingleReference(void) const;
- unsigned int retainCount(void) const;
- virtual bool isEqual(const CCObject* pObject);
-
- virtual void acceptVisitor(CCDataVisitor &visitor);
-
- virtual void update(float dt) {CC_UNUSED_PARAM(dt);};
-
- RT_ADD(
- virtual void encodeWithCoder(DS_Dictionary*);
-
- static CCObject* createWithCoder(DS_Dictionary*);
-
- virtual bool canEncode();
-
- CCObjectType getObjType() const;
-
- virtual int getTag() const;
-
- virtual void setTag(int nTag);
-
- void setObjType(CCObjectType);
-
- //i have no idea if vtable function order matters so
- )
-
- friend class CCAutoreleasePool;
-};
-
-
-typedef void (CCObject::*SEL_SCHEDULE)(float);
-typedef void (CCObject::*SEL_CallFunc)();
-typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
-typedef void (CCObject::*SEL_CallFuncND)(CCNode*, void*);
-typedef void (CCObject::*SEL_CallFuncO)(CCObject*);
-typedef void (CCObject::*SEL_MenuHandler)(CCObject*);
-typedef void (CCObject::*SEL_EventHandler)(CCEvent*);
-typedef int (CCObject::*SEL_Compare)(CCObject*);
-
-#define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(&_SELECTOR)
-#define callfunc_selector(_SELECTOR) (SEL_CallFunc)(&_SELECTOR)
-#define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(&_SELECTOR)
-#define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(&_SELECTOR)
-#define callfuncO_selector(_SELECTOR) (SEL_CallFuncO)(&_SELECTOR)
-#define menu_selector(_SELECTOR) (SEL_MenuHandler)(&_SELECTOR)
-#define event_selector(_SELECTOR) (SEL_EventHandler)(&_SELECTOR)
-#define compare_selector(_SELECTOR) (SEL_Compare)(&_SELECTOR)
-
-// end of base_nodes group
-/// @}
-
-NS_CC_END
-
-#endif // __CCOBJECT_H__
diff --git a/cocos2dx/cocoa/CCSet.h b/cocos2dx/cocoa/CCSet.h
deleted file mode 100644
index d24ae3c..0000000
--- a/cocos2dx/cocoa/CCSet.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CC_SET_H__
-#define __CC_SET_H__
-
-#include
-#include "CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-typedef std::set::iterator CCSetIterator;
-
-class CC_DLL CCSet : public CCObject
-{
-public:
- /**
- * @js ctor
- * @lua NA
- */
- CCSet(void);
- /**
- * @lua NA
- */
- CCSet(const CCSet &rSetObject);
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCSet(void);
-
- /**
- * @brief Create and return a new empty set.
- * @lua NA
- */
- static CCSet * create();
-
- /**
- *@brief Return a copy of the CCSet, it will copy all the elements.
- */
- CCSet* copy();
- /**
- *@brief It is the same as copy().
- *@lua NA
- */
- CCSet* mutableCopy();
- /**
- *@brief Return the number of elements the CCSet contains.
- */
- int count();
- /**
- *@brief Add a element into CCSet, it will retain the element.
- */
- void addObject(CCObject *pObject);
- /**
- *@brief Remove the given element, nothing todo if no element equals pObject.
- */
- void removeObject(CCObject *pObject);
- /**
- *@brief Remove all elements of the set
- */
- void removeAllObjects();
- /**
- *@brief Check if CCSet contains a element equals pObject.
- */
- bool containsObject(CCObject *pObject);
- /**
- *@brief Return the iterator that points to the first element.
- *@js NA
- *@lua NA
- */
- CCSetIterator begin();
- /**
- *@brief Return the iterator that points to the position after the last element.
- *@js NA
- *@lua NA
- */
- CCSetIterator end();
- /**
- *@brief Return the first element if it contains elements, or null if it doesn't contain any element.
- */
- CCObject* anyObject();
- /**
- * @js NA
- * @lua NA
- */
- virtual void acceptVisitor(CCDataVisitor &visitor);
-
-private:
- std::set *m_pSet;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif // __CC_SET_H__
-
diff --git a/cocos2dx/cocoa/CCString.h b/cocos2dx/cocoa/CCString.h
deleted file mode 100644
index b0a1e53..0000000
--- a/cocos2dx/cocoa/CCString.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-#ifndef __CCSTRING_H__
-#define __CCSTRING_H__
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
-#include
-#endif
-
-#include
-#include
-#include
-#include "CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- * @ js NA
- */
-
-class CC_DLL CCString : public CCObject
-{
-public:
- /**
- * @lua NA
- */
- CCString();
- /**
- * @lua NA
- */
- CCString(const char* str);
- /**
- * @lua NA
- */
- CCString(const std::string& str);
- /**
- * @lua NA
- */
- CCString(const CCString& str);
- /**
- * @lua NA
- */
- virtual ~CCString();
-
- /* override assignment operator
- * @lua NA
- */
- CCString& operator= (const CCString& other);
-
- /** init a string with format, it's similar with the c function 'sprintf'
- * @lua NA
- */
- bool initWithFormat(const char* format, ...) CC_FORMAT_PRINTF(2, 3);
-
- /** convert to int value */
- int intValue() const;
-
- /** convert to unsigned int value */
- unsigned int uintValue() const;
-
- /** convert to float value */
- float floatValue() const;
-
- /** convert to double value */
- double doubleValue() const;
-
- /** convert to bool value */
- bool boolValue() const;
-
- /** get the C string */
- const char* getCString() const;
-
- /** get the length of string */
- unsigned int length() const;
-
- /** compare to a c string */
- int compare(const char *) const;
-
- /* override functions
- * @lua NA
- * @js NA
- */
- virtual CCObject* copyWithZone(CCZone* pZone);
- virtual bool isEqual(const CCObject* pObject);
-
- /** create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer.
- * @return A CCString pointer which is an autorelease object pointer,
- * it means that you needn't do a release operation unless you retain it.
- */
- static CCString* create(const std::string& str);
-
- /** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes,
- * if you want to change it, you should modify the kMaxStringLen macro in CCString.cpp file.
- * @return A CCString pointer which is an autorelease object pointer,
- * it means that you needn't do a release operation unless you retain it.
- * @lua NA
- */
- static CCString* createWithFormat(const char* format, ...) CC_FORMAT_PRINTF(1, 2);
-
- /** create a string with binary data
- * @return A CCString pointer which is an autorelease object pointer,
- * it means that you needn't do a release operation unless you retain it.
- */
- static CCString* createWithData(const unsigned char* pData, unsigned long nLen);
-
- /** create a string with a file,
- * @return A CCString pointer which is an autorelease object pointer,
- * it means that you needn't do a release operation unless you retain it.
- */
- static CCString* createWithContentsOfFile(const char* pszFileName);
- /**
- * @lua NA
- */
- virtual void acceptVisitor(CCDataVisitor &visitor);
-
-private:
-
- /** only for internal use */
- bool initWithFormatAndValist(const char* format, va_list ap);
-
-public:
- std::string m_sString;
-};
-
-/*
-struct CCStringCompare : public std::binary_function {
- public:
- bool operator() (CCString * a, CCString * b) const {
- return strcmp(a->getCString(), b->getCString()) < 0;
- }
-};*/
-
-#define CCStringMake(str) CCString::create(str)
-#define ccs CCStringMake
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif //__CCSTRING_H__
diff --git a/cocos2dx/cocoa/CCZone.h b/cocos2dx/cocoa/CCZone.h
deleted file mode 100644
index b69648b..0000000
--- a/cocos2dx/cocoa/CCZone.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CC_ZONE_H__
-#define __CC_ZONE_H__
-
-#include "platform/CCPlatformMacros.h"
-#include
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup data_structures
- * @{
- */
-
-class CCObject;
-/**
- * @js NA
- * @lua NA
- */
-class CC_DLL CCZone
-{
-public:
- CCZone(CCObject *pObject = NULL);
-
-public:
- CCObject *m_pCopyObject;
-};
-
-// end of data_structure group
-/// @}
-
-NS_CC_END
-
-#endif // __CC_ZONE_H__
-
diff --git a/cocos2dx/draw_nodes/CCDrawNode.h b/cocos2dx/draw_nodes/CCDrawNode.h
deleted file mode 100644
index a6e0d40..0000000
--- a/cocos2dx/draw_nodes/CCDrawNode.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software
- * Copyright (c) 2012 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.
- */
-
-/*
- * Code copied & pasted from SpacePatrol game https://github.com/slembcke/SpacePatrol
- *
- * Renamed and added some changes for cocos2d
- *
- */
-
-#ifndef __CCDRAWNODES_CCDRAW_NODE_H__
-#define __CCDRAWNODES_CCDRAW_NODE_H__
-
-#include "base_nodes/CCNode.h"
-#include "ccTypes.h"
-
-NS_CC_BEGIN
-
-/** CCDrawNode
- Node that draws dots, segments and polygons.
- Faster than the "drawing primitives" since they it draws everything in one single batch.
-
- @since v2.1
- @lua NA
- */
-class CC_DLL CCDrawNode : public CCNode
-{
-protected:
- GLuint m_uVao;
- GLuint m_uVbo;
-
- unsigned int m_uBufferCapacity;
- GLsizei m_nBufferCount;
- ccV2F_C4B_T2F *m_pBuffer;
-
- ccBlendFunc m_sBlendFunc;
-
- bool m_bDirty;
-
-public:
- static CCDrawNode* create();
- virtual ~CCDrawNode();
-
- virtual bool init();
- virtual void draw();
-
- /** draw a dot at a position, with a given radius and color */
- void drawDot(const CCPoint &pos, float radius, const ccColor4F &color);
-
- /** draw a segment with a radius and color */
- void drawSegment(const CCPoint &from, const CCPoint &to, float radius, const ccColor4F &color);
-
- /** draw a polygon with a fill color and line color
- * @code
- * when this funciton bound to js,the input params are changed
- * js:var drawPolygon(var verts, var fillColor,var borderWidth,var borderColor)
- * @endcode
- */
- void drawPolygon(CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor);
-
- /** Clear the geometry in the node's buffer. */
- void clear();
- /**
- * @js NA
- */
- ccBlendFunc getBlendFunc() const;
- /**
- * @code
- * when this function bound to js ,the input param is change
- * js:var setBlendFunc(var src,var dst)
- * @endcode
- */
- void setBlendFunc(const ccBlendFunc &blendFunc);
-
- CCDrawNode();
-
- /** listen the event that coming to foreground on Android
- * @js NA
- */
- void listenBackToForeground(CCObject *obj);
-private:
- void ensureCapacity(unsigned int count);
- void render();
-};
-
-NS_CC_END
-
-#endif // __CCDRAWNODES_CCDRAW_NODE_H__
diff --git a/cocos2dx/draw_nodes/CCDrawingPrimitives.h b/cocos2dx/draw_nodes/CCDrawingPrimitives.h
deleted file mode 100644
index cb667d3..0000000
--- a/cocos2dx/draw_nodes/CCDrawingPrimitives.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-/*
- *
- * IMPORTANT IMPORTANT IMPORTANT IMPORTANT
- *
- *
- * LEGACY FUNCTIONS
- *
- * USE CCDrawNode instead
- *
- */
-
-
-#ifndef __CCDRAWING_PRIMITIVES__
-#define __CCDRAWING_PRIMITIVES__
-
-
-#include "ccTypes.h"
-#include "ccMacros.h"
-#include "cocoa/CCGeometry.h" // for CCPoint
-
-/**
- @file
- Drawing OpenGL ES primitives.
- - ccDrawPoint, ccDrawPoints
- - ccDrawLine
- - ccDrawRect, ccDrawSolidRect
- - ccDrawPoly, ccDrawSolidPoly
- - ccDrawCircle
- - ccDrawQuadBezier
- - ccDrawCubicBezier
- - ccDrawCatmullRom
- - ccDrawCardinalSpline
-
- You can change the color, point size, width by calling:
- - ccDrawColor4B(), ccDrawColor4F()
- - ccPointSize()
- - glLineWidth()
-
- @warning These functions draws the Line, Point, Polygon, immediately. They aren't batched. If you are going to make a game that depends on these primitives, I suggest creating a batch. Instead you should use CCDrawNode
-
- */
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup global
- * @{
- */
-
-class CCPointArray;
-
-/** Initializes the drawing primitives */
-void CC_DLL ccDrawInit();
-
-/** Frees allocated resources by the drawing primitives */
-void CC_DLL ccDrawFree();
-
-/** draws a point given x and y coordinate measured in points */
-void CC_DLL ccDrawPoint( const CCPoint& point );
-
-/** draws an array of points.
- @since v0.7.2
- */
-void CC_DLL ccDrawPoints( const CCPoint *points, unsigned int numberOfPoints );
-
-/** draws a line given the origin and destination point measured in points */
-void CC_DLL ccDrawLine( const CCPoint& origin, const CCPoint& destination );
-
-/** draws a rectangle given the origin and destination point measured in points. */
-void CC_DLL ccDrawRect( CCPoint origin, CCPoint destination );
-
-/** draws a solid rectangle given the origin and destination point measured in points.
- @since 1.1
- */
-void CC_DLL ccDrawSolidRect( CCPoint origin, CCPoint destination, ccColor4F color );
-
-/** draws a polygon given a pointer to CCPoint coordinates and the number of vertices measured in points.
-The polygon can be closed or open
-*/
-void CC_DLL ccDrawPoly( const CCPoint *vertices, unsigned int numOfVertices, bool closePolygon );
-
-/** draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.
- */
-void CC_DLL ccDrawSolidPoly( const CCPoint *poli, unsigned int numberOfPoints, ccColor4F color );
-
-/** draws a circle given the center, radius and number of segments. */
-void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY);
-void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter);
-
-/** draws a quad bezier path
- @warning This function could be pretty slow. Use it only for debugging purposes.
- @since v0.8
- */
-void CC_DLL ccDrawQuadBezier(const CCPoint& origin, const CCPoint& control, const CCPoint& destination, unsigned int segments);
-
-/** draws a cubic bezier path
- @warning This function could be pretty slow. Use it only for debugging purposes.
- @since v0.8
- */
-void CC_DLL ccDrawCubicBezier(const CCPoint& origin, const CCPoint& control1, const CCPoint& control2, const CCPoint& destination, unsigned int segments);
-
-/** draws a Catmull Rom path.
- @warning This function could be pretty slow. Use it only for debugging purposes.
- @since v2.0
- */
-void CC_DLL ccDrawCatmullRom( CCPointArray *arrayOfControlPoints, unsigned int segments );
-
-/** draws a Cardinal Spline path.
- @warning This function could be pretty slow. Use it only for debugging purposes.
- @since v2.0
- */
-void CC_DLL ccDrawCardinalSpline( CCPointArray *config, float tension, unsigned int segments );
-
-/** set the drawing color with 4 unsigned bytes
- @since v2.0
- */
-void CC_DLL ccDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a );
-
-/** set the drawing color with 4 floats
- @since v2.0
- */
-void CC_DLL ccDrawColor4F( GLfloat r, GLfloat g, GLfloat b, GLfloat a );
-
-/** set the point size in points. Default 1.
- @since v2.0
- */
-void CC_DLL ccPointSize( GLfloat pointSize );
-
-// end of global group
-/// @}
-
-NS_CC_END
-
-#endif // __CCDRAWING_PRIMITIVES__
diff --git a/cocos2dx/effects/CCGrabber.h b/cocos2dx/effects/CCGrabber.h
deleted file mode 100644
index 9cd11ce..0000000
--- a/cocos2dx/effects/CCGrabber.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2009 On-Core
-
-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.
-****************************************************************************/
-#ifndef __EFFECTS_CCGRABBER_H__
-#define __EFFECTS_CCGRABBER_H__
-
-#include "CCConfiguration.h"
-#include "cocoa/CCObject.h"
-#include "CCGL.h"
-
-NS_CC_BEGIN
-
-class CCTexture2D;
-
-/**
- * @addtogroup effects
- * @{
- */
-
-/** FBO class that grabs the the contents of the screen
- * @js NA
- * @lua NA
- */
-class CCGrabber : public CCObject
-{
-public:
- CCGrabber(void);
- ~CCGrabber(void);
-
- void grab(CCTexture2D *pTexture);
- void beforeRender(CCTexture2D *pTexture);
- void afterRender(CCTexture2D *pTexture);
-
-protected:
- GLuint m_FBO;
- GLint m_oldFBO;
- GLfloat m_oldClearColor[4];
-};
-
-// end of effects group
-/// @}
-
-NS_CC_END
-
-#endif // __EFFECTS_CCGRABBER_H__
diff --git a/cocos2dx/effects/CCGrid.h b/cocos2dx/effects/CCGrid.h
deleted file mode 100644
index ced7b90..0000000
--- a/cocos2dx/effects/CCGrid.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2009 On-Core
-
-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.
-****************************************************************************/
-#ifndef __EFFECTS_CCGRID_H__
-#define __EFFECTS_CCGRID_H__
-
-#include "cocoa/CCObject.h"
-#include "base_nodes/CCNode.h"
-#include "CCCamera.h"
-#include "ccTypes.h"
-#include "textures/CCTexture2D.h"
-#include "CCDirector.h"
-#include "kazmath/mat4.h"
-#ifdef EMSCRIPTEN
-#include "base_nodes/CCGLBufferedNode.h"
-#endif // EMSCRIPTEN
-
-NS_CC_BEGIN
-
-class CCTexture2D;
-class CCGrabber;
-class CCGLProgram;
-
-/**
- * @addtogroup effects
- * @{
- */
-
-/** Base class for other
-*/
-class CC_DLL CCGridBase : public CCObject
-{
-public:
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCGridBase(void);
-
- /** whether or not the grid is active
- * @lua NA
- */
- inline bool isActive(void) { return m_bActive; }
- /**
- * @lua NA
- */
- void setActive(bool bActive);
-
- /** number of times that the grid will be reused
- * @lua NA
- */
- inline int getReuseGrid(void) { return m_nReuseGrid; }
- /**
- * @lua NA
- */
- inline void setReuseGrid(int nReuseGrid) { m_nReuseGrid = nReuseGrid; }
-
- /** size of the grid
- * @lua NA
- */
- inline const CCSize& getGridSize(void) { return m_sGridSize; }
- /**
- * @lua NA
- */
- inline void setGridSize(const CCSize& gridSize) { m_sGridSize = gridSize; }
-
- /** pixels between the grids
- * @lua NA
- */
- inline const CCPoint& getStep(void) { return m_obStep; }
- /**
- * @lua NA
- */
- inline void setStep(const CCPoint& step) { m_obStep = step; }
-
- /** is texture flipped
- * @lua NA
- */
- inline bool isTextureFlipped(void) { return m_bIsTextureFlipped; }
- /**
- * @lua NA
- */
- void setTextureFlipped(bool bFlipped);
- /**
- * @lua NA
- */
- bool initWithSize(const CCSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
- /**
- * @lua NA
- */
- bool initWithSize(const CCSize& gridSize);
- /**
- * @lua NA
- */
- void beforeDraw(void);
- /**
- * @lua NA
- */
- void afterDraw(CCNode *pTarget);
- /**
- * @lua NA
- */
- virtual void blit(void);
- /**
- * @lua NA
- */
- virtual void reuse(void);
- /**
- * @lua NA
- */
- virtual void calculateVertexPoints(void);
-
-public:
-
- /** create one Grid
- * @lua NA
- */
- static CCGridBase* create(const CCSize& gridSize, CCTexture2D *texture, bool flipped);
- /** create one Grid
- * @lua NA
- */
- static CCGridBase* create(const CCSize& gridSize);
- /**
- * @lua NA
- */
- void set2DProjection(void);
-
-protected:
- bool m_bActive;
- int m_nReuseGrid;
- CCSize m_sGridSize;
- CCTexture2D *m_pTexture;
- CCPoint m_obStep;
- CCGrabber *m_pGrabber;
- bool m_bIsTextureFlipped;
- CCGLProgram* m_pShaderProgram;
- ccDirectorProjection m_directorProjection;
-};
-
-/**
- CCGrid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
- @js NA
- @lua NA
- */
-class CC_DLL CCGrid3D : public CCGridBase
-#ifdef EMSCRIPTEN
-, public CCGLBufferedNode
-#endif // EMSCRIPTEN
-{
-public:
- CCGrid3D();
- ~CCGrid3D(void);
-
- /** returns the vertex at a given position */
- ccVertex3F vertex(const CCPoint& pos);
- /** returns the original (non-transformed) vertex at a given position */
- ccVertex3F originalVertex(const CCPoint& pos);
- /** sets a new vertex at a given position */
- void setVertex(const CCPoint& pos, const ccVertex3F& vertex);
-
- virtual void blit(void);
- virtual void reuse(void);
- virtual void calculateVertexPoints(void);
-
-public:
- /** create one Grid */
- static CCGrid3D* create(const CCSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
- /** create one Grid */
- static CCGrid3D* create(const CCSize& gridSize);
-
-protected:
- GLvoid *m_pTexCoordinates;
- GLvoid *m_pVertices;
- GLvoid *m_pOriginalVertices;
- GLushort *m_pIndices;
-};
-
-/**
- CCTiledGrid3D is a 3D grid implementation. It differs from Grid3D in that
- the tiles can be separated from the grid.
- @js NA
- @lua NA
-*/
-class CC_DLL CCTiledGrid3D : public CCGridBase
-#ifdef EMSCRIPTEN
-, public CCGLBufferedNode
-#endif // EMSCRIPTEN
-{
-public:
- CCTiledGrid3D();
- ~CCTiledGrid3D(void);
-
- /** returns the tile at the given position */
- ccQuad3 tile(const CCPoint& pos);
- /** returns the original tile (untransformed) at the given position */
- ccQuad3 originalTile(const CCPoint& pos);
- /** sets a new tile */
- void setTile(const CCPoint& pos, const ccQuad3& coords);
-
- virtual void blit(void);
- virtual void reuse(void);
- virtual void calculateVertexPoints(void);
-
-public:
-
- /** create one Grid */
- static CCTiledGrid3D* create(const CCSize& gridSize, CCTexture2D *pTexture, bool bFlipped);
- /** create one Grid */
- static CCTiledGrid3D* create(const CCSize& gridSize);
-
-protected:
- GLvoid *m_pTexCoordinates;
- GLvoid *m_pVertices;
- GLvoid *m_pOriginalVertices;
- GLushort *m_pIndices;
-};
-
-// end of effects group
-/// @}
-
-NS_CC_END
-
-#endif // __EFFECTS_CCGRID_H__
diff --git a/cocos2dx/include/CCEventType.h b/cocos2dx/include/CCEventType.h
deleted file mode 100644
index 297c87c..0000000
--- a/cocos2dx/include/CCEventType.h
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#ifndef __CCEVENT_TYPE_H__
-#define __CCEVENT_TYPE_H__
-
-/**
- * This header is used for defining event types using in CCNotificationCenter
- */
-
-// The application will come to foreground.
-// This message is used for reloading resources before come to foreground on Android.
-// This message is posted in main.cpp.
-#define EVENT_COME_TO_FOREGROUND "event_come_to_foreground"
-
-// The application will come to background.
-// This message is used for doing something before coming to background, such as save CCRenderTexture.
-// This message is posted in cocos2dx/platform/android/jni/MessageJni.cpp.
-#define EVENT_COME_TO_BACKGROUND "event_come_to_background"
-
-#endif // __CCEVENT_TYPE_H__
diff --git a/cocos2dx/include/CCProtocols.h b/cocos2dx/include/CCProtocols.h
deleted file mode 100644
index 5899d56..0000000
--- a/cocos2dx/include/CCProtocols.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-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.
-****************************************************************************/
-
-#ifndef __CCPROTOCOLS_H__
-#define __CCPROTOCOLS_H__
-
-#include "ccTypes.h"
-#include "textures/CCTexture2D.h"
-#include
-
-NS_CC_BEGIN
-
-/**
- * RGBA protocol that affects CCNode's color and opacity
- * @js NA
- */
-class CC_DLL CCRGBAProtocol
-{
-public:
- /**
- * Changes the color with R,G,B bytes
- *
- * @param color Example: ccc3(255,100,0) means R=255, G=100, B=0
- */
- virtual void setColor(const ccColor3B& color) = 0;
-
- /**
- * Returns color that is currently used.
- *
- * @return The ccColor3B contains R,G,B bytes.
- */
- virtual const ccColor3B& getColor(void) = 0;
-
- /**
- * Returns the displayed color.
- *
- * @return The ccColor3B contains R,G,B bytes.
- */
- virtual const ccColor3B& getDisplayedColor(void) = 0;
-
- /**
- * Returns the displayed opacity.
- *
- * @return The opacity of sprite, from 0 ~ 255
- */
- virtual GLubyte getDisplayedOpacity(void) = 0;
- /**
- * Returns the opacity.
- *
- * The opacity which indicates how transparent or opaque this node is.
- * 0 indicates fully transparent and 255 is fully opaque.
- *
- * @return The opacity of sprite, from 0 ~ 255
- */
- virtual GLubyte getOpacity(void) = 0;
-
- /**
- * Changes the opacity.
- *
- * @param value Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent.
- */
- virtual void setOpacity(GLubyte opacity) = 0;
-
- // optional
-
- /**
- * Changes the OpacityModifyRGB property.
- * If thie property is set to true, then the rendered color will be affected by opacity.
- * Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
- *
- * @param bValue true then the opacity will be applied as: glColor(R,G,B,opacity);
- * false then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity);
- */
- virtual void setOpacityModifyRGB(bool bValue) = 0;
-
- /**
- * Returns whether or not the opacity will be applied using glColor(R,G,B,opacity)
- * or glColor(opacity, opacity, opacity, opacity)
- *
- * @return Returns opacity modify flag.
- */
- virtual bool isOpacityModifyRGB(void) = 0;
-
- /**
- * whether or not color should be propagated to its children.
- */
- virtual bool isCascadeColorEnabled(void) = 0;
- virtual void setCascadeColorEnabled(bool cascadeColorEnabled) = 0;
-
- /**
- * recursive method that updates display color
- */
- virtual void updateDisplayedColor(const ccColor3B& color) = 0;
-
- /**
- * whether or not opacity should be propagated to its children.
- */
- virtual bool isCascadeOpacityEnabled(void) = 0;
- virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled) = 0;
-
- /**
- * recursive method that updates the displayed opacity.
- */
- virtual void updateDisplayedOpacity(GLubyte opacity) = 0;
-};
-
-/**
- * Specify the blending function according glBlendFunc
- * Please refer to glBlendFunc in OpenGL ES Manual
- * http://www.khronos.org/opengles/sdk/docs/man/xhtml/glBlendFunc.xml for more details.
- * @js NA
- * @lua NA
- */
-class CC_DLL CCBlendProtocol
-{
-public:
- /**
- * Sets the source blending function.
- *
- * @param blendFunc A structure with source and destination factor to specify pixel arithmetic,
- * e.g. {GL_ONE, GL_ONE}, {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}.
- *
- */
- virtual void setBlendFunc(ccBlendFunc blendFunc) = 0;
-
- /**
- * Returns the blending function that is currently being used.
- *
- * @return A ccBlendFunc structure with source and destination factor which specified pixel arithmetic.
- */
- virtual ccBlendFunc getBlendFunc(void) = 0;
-};
-
-/**
- * CCNode objects that uses a CCTexture2D to render the images.
- * The texture can have a blending function.
- * If the texture has alpha premultiplied the default blending function is:
- * src=GL_ONE dst= GL_ONE_MINUS_SRC_ALPHA
- * else
- * src=GL_SRC_ALPHA dst= GL_ONE_MINUS_SRC_ALPHA
- * But you can change the blending function at any time.
- * @js NA
- */
-class CC_DLL CCTextureProtocol : public CCBlendProtocol
-{
-public:
- /**
- * Returns the currently used texture
- *
- * @return The texture that is currenlty being used.
- * @lua NA
- */
- virtual CCTexture2D* getTexture(void) = 0;
-
- /**
- * Sets a new texuture. It will be retained.
- *
- * @param texture A valid CCTexture2D object, which will be applied to this sprite object.
- * @lua NA
- */
- virtual void setTexture(CCTexture2D *texture) = 0;
-};
-
-/**
- * Common interface for Labels
- * @js NA
- * @lua NA
- */
-class CC_DLL CCLabelProtocol
-{
-public:
- /**
- * Sets a new label using an string
- *
- * @param A null terminated string
- */
- virtual void setString(const char *label) = 0;
-
- /**
- * Returns the string that is currently being used in this label
- *
- * @return The string that is currently being used in this label
- */
- virtual const char* getString(void) = 0;
-};
-
-/**
- * OpenGL projection protocol
- * @js NA
- * @lua NA
- */
-class CC_DLL CCDirectorDelegate
-{
-public:
- /**
- * Will be called by CCDirector when the projection is updated, and "custom" projection is used
- */
- virtual void updateProjection(void) = 0;
-};
-
-NS_CC_END
-
-#endif // __CCPROTOCOLS_H__
diff --git a/cocos2dx/include/ccConfig.h b/cocos2dx/include/ccConfig.h
deleted file mode 100644
index 5fc2365..0000000
--- a/cocos2dx/include/ccConfig.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCCONFIG_H__
-#define __CCCONFIG_H__
-
-#include "platform/CCPlatformConfig.h"
-
-/**
- @file
- cocos2d (cc) configuration file
-*/
-
-/** @def CC_ENABLE_STACKABLE_ACTIONS
- If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked.
- If you run 2 or more 'position' actions at the same time on a node, then end position will be the sum of all the positions.
- If disabled, only the last run action will take effect.
-
- Enabled by default. Disable to be compatible with v2.0 and older versions.
-
- @since v2.1
- */
-#ifndef CC_ENABLE_STACKABLE_ACTIONS
-#define CC_ENABLE_STACKABLE_ACTIONS 1
-#endif
-
-/** @def CC_ENABLE_GL_STATE_CACHE
- If enabled, cocos2d will maintain an OpenGL state cache internally to avoid unnecessary switches.
- In order to use them, you have to use the following functions, instead of the the GL ones:
- - ccGLUseProgram() instead of glUseProgram()
- - ccGLDeleteProgram() instead of glDeleteProgram()
- - ccGLBlendFunc() instead of glBlendFunc()
-
- If this functionality is disabled, then ccGLUseProgram(), ccGLDeleteProgram(), ccGLBlendFunc() will call the GL ones, without using the cache.
-
- It is recommended to enable whenever possible to improve speed.
- If you are migrating your code from GL ES 1.1, then keep it disabled. Once all your code works as expected, turn it on.
-
- Default value: Enabled by default
-
- @since v2.0.0
- */
-#ifndef CC_ENABLE_GL_STATE_CACHE
-#define CC_ENABLE_GL_STATE_CACHE 1
-#endif
-
-/** @def CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
-If enabled, the texture coordinates will be calculated by using this formula:
-- texCoord.left = (rect.origin.x*2+1) / (texture.wide*2);
-- texCoord.right = texCoord.left + (rect.size.width*2-2)/(texture.wide*2);
-
-The same for bottom and top.
-
-This formula prevents artifacts by using 99% of the texture.
-The "correct" way to prevent artifacts is by using the spritesheet-artifact-fixer.py or a similar tool.
-
-Affected nodes:
-- CCSprite / CCSpriteBatchNode and subclasses: CCLabelBMFont, CCTMXTiledMap
-- CCLabelAtlas
-- CCQuadParticleSystem
-- CCTileMap
-
-To enabled set it to 1. Disabled by default.
-
-@since v0.99.5
-*/
-#ifndef CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
-#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 0
-#endif
-
-/** @def CC_DIRECTOR_FPS_INTERVAL
- Seconds between FPS updates.
- 0.5 seconds, means that the FPS number will be updated every 0.5 seconds.
- Having a bigger number means a more reliable FPS
-
- Default value: 0.1f
- */
-#ifndef CC_DIRECTOR_STATS_INTERVAL
-#define CC_DIRECTOR_STATS_INTERVAL (0.5f)
-#endif
-
-/** @def CC_DIRECTOR_FPS_POSITION
- Position of the FPS
-
- Default: 0,0 (bottom-left corner)
- */
-#ifndef CC_DIRECTOR_FPS_POSITION
-#define CC_DIRECTOR_FPS_POSITION ccp(0,0)
-#endif
-
-/** @def CC_DIRECTOR_DISPATCH_FAST_EVENTS
- If enabled, and only when it is used with CCFastDirector, the main loop will wait 0.04 seconds to
- dispatch all the events, even if there are not events to dispatch.
- If your game uses lot's of events (eg: touches) it might be a good idea to enable this feature.
- Otherwise, it is safe to leave it disabled.
-
- To enable set it to 1. Disabled by default.
-
- @warning This feature is experimental
- */
-#ifndef CC_DIRECTOR_DISPATCH_FAST_EVENTS
- #define CC_DIRECTOR_DISPATCH_FAST_EVENTS 0
-#endif
-
-/** @def CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD
-If enabled, cocos2d-mac will run on the Display Link thread. If disabled cocos2d-mac will run in its own thread.
-
-If enabled, the images will be drawn at the "correct" time, but the events might not be very responsive.
-If disabled, some frames might be skipped, but the events will be dispatched as they arrived.
-
-To enable set it to a 1, to disable it set to 0. Enabled by default.
-
-Only valid for cocos2d-mac. Not supported on cocos2d-ios.
-
-*/
-#ifndef CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD
-#define CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD 1
-#endif
-
-/** @def CC_NODE_RENDER_SUBPIXEL
- If enabled, the CCNode objects (CCSprite, CCLabel,etc) will be able to render in subpixels.
- If disabled, integer pixels will be used.
-
- To enable set it to 1. Enabled by default.
- */
-#ifndef CC_NODE_RENDER_SUBPIXEL
-#define CC_NODE_RENDER_SUBPIXEL 1
-#endif
-
-/** @def CC_SPRITEBATCHNODE_RENDER_SUBPIXEL
- If enabled, the CCSprite objects rendered with CCSpriteBatchNode will be able to render in subpixels.
- If disabled, integer pixels will be used.
-
- To enable set it to 1. Enabled by default.
- */
-#ifndef CC_SPRITEBATCHNODE_RENDER_SUBPIXEL
-#define CC_SPRITEBATCHNODE_RENDER_SUBPIXEL 1
-#endif
-
-/** @def CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
- Use GL_TRIANGLE_STRIP instead of GL_TRIANGLES when rendering the texture atlas.
- It seems it is the recommend way, but it is much slower, so, enable it at your own risk
-
- To enable set it to a value different than 0. Disabled by default.
-
- */
-#ifndef CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
-#define CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP 0
-#endif
-
-/** @def CC_TEXTURE_ATLAS_USE_VAO
- By default, CCTextureAtlas (used by many cocos2d classes) will use VAO (Vertex Array Objects).
- Apple recommends its usage but they might consume a lot of memory, specially if you use many of them.
- So for certain cases, where you might need hundreds of VAO objects, it might be a good idea to disable it.
-
- To disable it set it to 0. Enabled by default.
-
- */
-#ifndef CC_TEXTURE_ATLAS_USE_VAO
- #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
- #define CC_TEXTURE_ATLAS_USE_VAO 1
- #else
- /* Some Windows display adapter driver cannot support VAO. */
- /* Some android devices cannot support VAO very well, so we disable it by default for android platform. */
- /* Blackberry also doesn't support this feature. */
- #define CC_TEXTURE_ATLAS_USE_VAO 0
- #endif
-#endif
-
-
-/** @def CC_USE_LA88_LABELS
- If enabled, it will use LA88 (Luminance Alpha 16-bit textures) for CCLabelTTF objects.
- If it is disabled, it will use A8 (Alpha 8-bit textures).
- LA88 textures are 6% faster than A8 textures, but they will consume 2x memory.
-
- This feature is enabled by default.
-
- @since v0.99.5
- */
-#ifndef CC_USE_LA88_LABELS
-#define CC_USE_LA88_LABELS 1
-#endif
-
-/** @def CC_SPRITE_DEBUG_DRAW
- If enabled, all subclasses of CCSprite will draw a bounding box
- Useful for debugging purposes only. It is recommended to leave it disabled.
-
- To enable set it to a value different than 0. Disabled by default:
- 0 -- disabled
- 1 -- draw bounding box
- 2 -- draw texture box
- 0 -- disabled
- 1 -- draw bounding box
- 2 -- draw texture box
-*/
-#ifndef CC_SPRITE_DEBUG_DRAW
-#define CC_SPRITE_DEBUG_DRAW 0
-#endif
-
-/** @def CC_SPRITEBATCHNODE_DEBUG_DRAW
-If enabled, all subclasses of CCSprite that are rendered using an CCSpriteBatchNode draw a bounding box.
-Useful for debugging purposes only. It is recommended to leave it disabled.
-
-To enable set it to a value different than 0. Disabled by default.
-*/
-#ifndef CC_SPRITEBATCHNODE_DEBUG_DRAW
-#define CC_SPRITEBATCHNODE_DEBUG_DRAW 0
-#endif
-
-/** @def CC_LABELBMFONT_DEBUG_DRAW
-If enabled, all subclasses of CCLabelBMFont will draw a bounding box
-Useful for debugging purposes only. It is recommended to leave it disabled.
-
-To enable set it to a value different than 0. Disabled by default.
-*/
-#ifndef CC_LABELBMFONT_DEBUG_DRAW
-#define CC_LABELBMFONT_DEBUG_DRAW 0
-#endif
-
-/** @def CC_LABELATLAS_DEBUG_DRAW
- If enabled, all subclasses of LabeltAtlas will draw a bounding box
- Useful for debugging purposes only. It is recommended to leave it disabled.
-
- To enable set it to a value different than 0. Disabled by default.
- */
-#ifndef CC_LABELATLAS_DEBUG_DRAW
-#define CC_LABELATLAS_DEBUG_DRAW 0
-#endif
-
-/** @def CC_ENABLE_PROFILERS
- If enabled, will activate various profilers within cocos2d. This statistical data will be output to the console
- once per second showing average time (in milliseconds) required to execute the specific routine(s).
- Useful for debugging purposes only. It is recommended to leave it disabled.
-
- To enable set it to a value different than 0. Disabled by default.
- */
-#ifndef CC_ENABLE_PROFILERS
-#define CC_ENABLE_PROFILERS 0
-#endif
-
-/** Enable Lua engine debug log */
-#ifndef CC_LUA_ENGINE_DEBUG
-#define CC_LUA_ENGINE_DEBUG 0
-#endif
-
-#endif // __CCCONFIG_H__
diff --git a/cocos2dx/include/ccMacros.h b/cocos2dx/include/ccMacros.h
deleted file mode 100644
index bb4046a..0000000
--- a/cocos2dx/include/ccMacros.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCMACROS_H__
-#define __CCMACROS_H__
-
-#ifndef _USE_MATH_DEFINES
-#define _USE_MATH_DEFINES
-#endif
-
-#include "platform/CCCommon.h"
-#include "CCStdC.h"
-
-#ifndef CCAssert
-#if COCOS2D_DEBUG > 0
-extern bool CC_DLL cc_assert_script_compatible(const char *msg);
-#define CCAssert(cond, msg) do { \
- if (!(cond)) { \
- if (!cc_assert_script_compatible(msg) && strlen(msg)) \
- cocos2d::CCLog("Assert failed: %s", msg); \
- CC_ASSERT(cond); \
- } \
- } while (0)
-#else
-#define CCAssert(cond, msg) ((void)(cond))
-#endif
-#endif // CCAssert
-
-#include "ccConfig.h"
-
-/** @def CC_SWAP
-simple macro that swaps 2 variables
-*/
-#define CC_SWAP(x, y, type) \
-{ type temp = (x); \
- x = y; y = temp; \
-}
-
-
-/** @def CCRANDOM_MINUS1_1
- returns a random float between -1 and 1
- */
-#define CCRANDOM_MINUS1_1() ((2.0f*((float)rand()/RAND_MAX))-1.0f)
-
-/** @def CCRANDOM_0_1
- returns a random float between 0 and 1
- */
-#define CCRANDOM_0_1() ((float)rand()/RAND_MAX)
-
-/** @def CC_DEGREES_TO_RADIANS
- converts degrees to radians
- */
-#define CC_DEGREES_TO_RADIANS(__ANGLE__) ((__ANGLE__) * 0.01745329252f) // PI / 180
-
-/** @def CC_RADIANS_TO_DEGREES
- converts radians to degrees
- */
-#define CC_RADIANS_TO_DEGREES(__ANGLE__) ((__ANGLE__) * 57.29577951f) // PI * 180
-
-#define kCCRepeatForever (UINT_MAX -1)
-
-/** @def CC_BLEND_SRC
-default gl blend src function. Compatible with premultiplied alpha images.
-*/
-#define CC_BLEND_SRC GL_ONE
-#define CC_BLEND_DST GL_ONE_MINUS_SRC_ALPHA
-
-
-/** @def CC_NODE_DRAW_SETUP
- Helpful macro that setups the GL server state, the correct GL program and sets the Model View Projection matrix
- @since v2.0
- */
-#define CC_NODE_DRAW_SETUP() \
-do { \
- ccGLEnable(m_eGLServerState); \
- CCAssert(getShaderProgram(), "No shader program set for this node"); \
- { \
- getShaderProgram()->use(); \
- getShaderProgram()->setUniformsForBuiltins(); \
- } \
-} while(0)
-
-
- /** @def CC_DIRECTOR_END
- Stops and removes the director from memory.
- Removes the CCGLView from its parent
-
- @since v0.99.4
- */
-#define CC_DIRECTOR_END() \
-do { \
- CCDirector *__director = CCDirector::sharedDirector(); \
- __director->end(); \
-} while(0)
-
-/** @def CC_CONTENT_SCALE_FACTOR
-On Mac it returns 1;
-On iPhone it returns 2 if RetinaDisplay is On. Otherwise it returns 1
-*/
-#define CC_CONTENT_SCALE_FACTOR() CCDirector::sharedDirector()->getContentScaleFactor()
-
-/****************************/
-/** RETINA DISPLAY ENABLED **/
-/****************************/
-
-/** @def CC_RECT_PIXELS_TO_POINTS
- Converts a rect in pixels to points
- */
-#define CC_RECT_PIXELS_TO_POINTS(__rect_in_pixels__) \
- CCRectMake( (__rect_in_pixels__).origin.x / CC_CONTENT_SCALE_FACTOR(), (__rect_in_pixels__).origin.y / CC_CONTENT_SCALE_FACTOR(), \
- (__rect_in_pixels__).size.width / CC_CONTENT_SCALE_FACTOR(), (__rect_in_pixels__).size.height / CC_CONTENT_SCALE_FACTOR() )
-
-/** @def CC_RECT_POINTS_TO_PIXELS
- Converts a rect in points to pixels
- */
-#define CC_RECT_POINTS_TO_PIXELS(__rect_in_points_points__) \
- CCRectMake( (__rect_in_points_points__).origin.x * CC_CONTENT_SCALE_FACTOR(), (__rect_in_points_points__).origin.y * CC_CONTENT_SCALE_FACTOR(), \
- (__rect_in_points_points__).size.width * CC_CONTENT_SCALE_FACTOR(), (__rect_in_points_points__).size.height * CC_CONTENT_SCALE_FACTOR() )
-
-/** @def CC_POINT_PIXELS_TO_POINTS
- Converts a rect in pixels to points
- */
-#define CC_POINT_PIXELS_TO_POINTS(__pixels__) \
-CCPointMake( (__pixels__).x / CC_CONTENT_SCALE_FACTOR(), (__pixels__).y / CC_CONTENT_SCALE_FACTOR())
-
-/** @def CC_POINT_POINTS_TO_PIXELS
- Converts a rect in points to pixels
- */
-#define CC_POINT_POINTS_TO_PIXELS(__points__) \
-CCPointMake( (__points__).x * CC_CONTENT_SCALE_FACTOR(), (__points__).y * CC_CONTENT_SCALE_FACTOR())
-
-/** @def CC_POINT_PIXELS_TO_POINTS
- Converts a rect in pixels to points
- */
-#define CC_SIZE_PIXELS_TO_POINTS(__size_in_pixels__) \
-CCSizeMake( (__size_in_pixels__).width / CC_CONTENT_SCALE_FACTOR(), (__size_in_pixels__).height / CC_CONTENT_SCALE_FACTOR())
-
-/** @def CC_POINT_POINTS_TO_PIXELS
- Converts a rect in points to pixels
- */
-#define CC_SIZE_POINTS_TO_PIXELS(__size_in_points__) \
-CCSizeMake( (__size_in_points__).width * CC_CONTENT_SCALE_FACTOR(), (__size_in_points__).height * CC_CONTENT_SCALE_FACTOR())
-
-
-#ifndef FLT_EPSILON
-#define FLT_EPSILON 1.192092896e-07F
-#endif // FLT_EPSILON
-
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&);\
- void operator=(const TypeName&)
-
-/**
-Helper macros which converts 4-byte little/big endian
-integral number to the machine native number representation
-
-It should work same as apples CFSwapInt32LittleToHost(..)
-*/
-
-/// when define returns true it means that our architecture uses big endian
-#define CC_HOST_IS_BIG_ENDIAN (bool)(*(unsigned short *)"\0\xff" < 0x100)
-#define CC_SWAP32(i) ((i & 0x000000ff) << 24 | (i & 0x0000ff00) << 8 | (i & 0x00ff0000) >> 8 | (i & 0xff000000) >> 24)
-#define CC_SWAP16(i) ((i & 0x00ff) << 8 | (i &0xff00) >> 8)
-#define CC_SWAP_INT32_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP32(i) : (i) )
-#define CC_SWAP_INT16_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP16(i) : (i) )
-#define CC_SWAP_INT32_BIG_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? (i) : CC_SWAP32(i) )
-#define CC_SWAP_INT16_BIG_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? (i): CC_SWAP16(i) )
-
-/**********************/
-/** Profiling Macros **/
-/**********************/
-#if CC_ENABLE_PROFILERS
-
-#define CC_PROFILER_DISPLAY_TIMERS() CCProfiler::sharedProfiler()->displayTimers()
-#define CC_PROFILER_PURGE_ALL() CCProfiler::sharedProfiler()->releaseAllTimers()
-
-#define CC_PROFILER_START(__name__) CCProfilingBeginTimingBlock(__name__)
-#define CC_PROFILER_STOP(__name__) CCProfilingEndTimingBlock(__name__)
-#define CC_PROFILER_RESET(__name__) CCProfilingResetTimingBlock(__name__)
-
-#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do{ if(__cat__) CCProfilingBeginTimingBlock(__name__); } while(0)
-#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do{ if(__cat__) CCProfilingEndTimingBlock(__name__); } while(0)
-#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do{ if(__cat__) CCProfilingResetTimingBlock(__name__); } while(0)
-
-#define CC_PROFILER_START_INSTANCE(__id__, __name__) do{ CCProfilingBeginTimingBlock( CCString::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
-#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do{ CCProfilingEndTimingBlock( CCString::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
-#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ CCProfilingResetTimingBlock( CCString::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
-
-
-#else
-
-#define CC_PROFILER_DISPLAY_TIMERS() do {} while (0)
-#define CC_PROFILER_PURGE_ALL() do {} while (0)
-
-#define CC_PROFILER_START(__name__) do {} while (0)
-#define CC_PROFILER_STOP(__name__) do {} while (0)
-#define CC_PROFILER_RESET(__name__) do {} while (0)
-
-#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do {} while(0)
-#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do {} while(0)
-#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do {} while(0)
-
-#define CC_PROFILER_START_INSTANCE(__id__, __name__) do {} while(0)
-#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do {} while(0)
-#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do {} while(0)
-
-#endif
-
-#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
-#define CHECK_GL_ERROR_DEBUG()
-#else
-#define CHECK_GL_ERROR_DEBUG() \
- do { \
- GLenum __error = glGetError(); \
- if(__error) { \
- CCLog("OpenGL error 0x%04X in %s %s %d\n", __error, __FILE__, __FUNCTION__, __LINE__); \
- } \
- } while (false)
-#endif
-
-/** @def CC_INCREMENT_GL_DRAWS_BY_ONE
- Increments the GL Draws counts by one.
- The number of calls per frame are displayed on the screen when the CCDirector's stats are enabled.
- */
-extern unsigned int CC_DLL g_uNumberOfDraws;
-#define CC_INCREMENT_GL_DRAWS(__n__) g_uNumberOfDraws += __n__
-
-/*******************/
-/** Notifications **/
-/*******************/
-/** @def CCAnimationFrameDisplayedNotification
- Notification name when a CCSpriteFrame is displayed
- */
-#define CCAnimationFrameDisplayedNotification "CCAnimationFrameDisplayedNotification"
-
-/**********************/
-/** Modding-specific **/
-/**********************/
-/** __AS_STR__(str)
-* Use token as a C string.
-* Useful for multi-layer macros.
-* Don't use this.
-*/
-#define __AS_STR__(str) #str
-
-/** __STR_CAT__(str)
-* Concatenate 2 tokens. Don't use this.
-*/
-#define __STR_CAT___(str1, str2) str1##str2
-#define __STR_CAT__(str1, str2) __STR_CAT___(str1, str2)
-
-/** RT_ADD
-* RobTop added this function / field. It is proprietary,
-* and the modding library will not compile properly
-* if this function / field is not found in the
-* Cocos2d headers.
-*
-* Variadic arguments used due to enums using commas,
-* which will not expand correctly otherwise.
-*/
-#define RT_ADD(...) __VA_ARGS__
-
-/** RT_REMOVE
-* RobTop removed this function / field. It is not
-* found in libcocos2d.dll, and can't be called / used.
-*/
-#define RT_REMOVE(name)
-
-/** HJ_ADD
- * This function / field might not actually exist in GD itself.
- *
- * However, it has been added in these headers for ease-of-use
- * or other equivalent reasons. It should not conflict with
- * GD itself.
-*/
-#define HJ_ADD(...) __VA_ARGS__
-
-/** PAD
-* Add padding to a class / struct. For shifting classes /
-* structs to be aligned, if too lazy to fully reverse.
-*
-* Based on line number, to be standard C / C++ compatible.
-*/
-#define PAD(size) char __STR_CAT__(pad, __LINE__)[size] = {};
-
-/** STUB
-* Stub class. Not complete: use with caution.
-*/
-#define STUB(className)\
-[[deprecated(__STR_CAT__("incompletely reversed class ", __AS_STR__(className)))]] className
-
-#endif // __CCMACROS_H__
diff --git a/cocos2dx/include/ccTypeInfo.h b/cocos2dx/include/ccTypeInfo.h
deleted file mode 100644
index c7eeedd..0000000
--- a/cocos2dx/include/ccTypeInfo.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-Copyright (c) 2012 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef cocos2dx_ccTypeInfo_h
-#define cocos2dx_ccTypeInfo_h
-
-#include "platform/CCPlatformMacros.h"
-
-#include
-#include
-#include
-
-NS_CC_BEGIN
-
-class TypeInfo
-{
-public:
- virtual long getClassTypeInfo() = 0;
-};
-
-static inline unsigned int getHashCodeByString(const char *key)
-{
- unsigned int len = strlen(key);
- const char *end=key+len;
- unsigned int hash;
-
- for (hash = 0; key < end; key++)
- {
- hash *= 16777619;
- hash ^= (unsigned int) (unsigned char) toupper(*key);
- }
- return (hash);
-}
-NS_CC_END
-
-#endif
diff --git a/cocos2dx/include/ccTypes.h b/cocos2dx/include/ccTypes.h
deleted file mode 100644
index ca24604..0000000
--- a/cocos2dx/include/ccTypes.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __CCTYPES_H__
-#define __CCTYPES_H__
-
-#include
-#include "cocoa/CCGeometry.h"
-#include "CCGL.h"
-
-
-NS_CC_BEGIN
-
-/** RGB color composed of bytes 3 bytes
-@since v0.8
- */
-typedef struct _ccColor3B
-{
- GLubyte r;
- GLubyte g;
- GLubyte b;
-} ccColor3B;
-
-RT_ADD(
-typedef struct _ccHSVValue
-{
- float h, s, v;
- GLubyte absoluteSaturation;
- GLubyte absoluteBrightness;
- private: unsigned char __pad[2];
-} ccHSVValue;
-)
-
-static inline ccHSVValue
-cchsv(const float vh, const float vs, const float vv, const bool as, const bool ab)
-{
- ccHSVValue hsv;
- hsv.h = vh;
- hsv.s = vs;
- hsv.v = vv;
- hsv.absoluteSaturation = as;
- hsv.absoluteBrightness = ab;
- return hsv;
-}
-
-static inline bool hsv_geta(ccHSVValue hsv, bool brightOrSaturation)
-{
- if (brightOrSaturation) return static_cast(hsv.absoluteSaturation);
- return static_cast(hsv.absoluteBrightness);
-}
-
-//! helper macro that creates an ccColor3B type
-static inline ccColor3B
-ccc3(const GLubyte r, const GLubyte g, const GLubyte b)
-{
- ccColor3B c = {r, g, b};
- return c;
-}
-
-/** returns true if both ccColor3B are equal. Otherwise it returns false.
- */
-static inline bool ccc3BEqual(const ccColor3B &col1, const ccColor3B &col2)
-{
- return col1.r == col2.r && col1.g == col2.g && col1.b == col2.b;
-}
-
-//ccColor3B predefined colors
-//! White color (255,255,255)
-static const ccColor3B ccWHITE={255,255,255};
-//! Yellow color (255,255,0)
-static const ccColor3B ccYELLOW={255,255,0};
-//! Blue color (0,0,255)
-static const ccColor3B ccBLUE={0,0,255};
-//! Green Color (0,255,0)
-static const ccColor3B ccGREEN={0,255,0};
-//! Red Color (255,0,0,)
-static const ccColor3B ccRED={255,0,0};
-//! Magenta Color (255,0,255)
-static const ccColor3B ccMAGENTA={255,0,255};
-//! Black Color (0,0,0)
-static const ccColor3B ccBLACK={0,0,0};
-//! Orange Color (255,127,0)
-static const ccColor3B ccORANGE={255,127,0};
-//! Gray Color (166,166,166)
-static const ccColor3B ccGRAY={166,166,166};
-
-/** RGBA color composed of 4 bytes
-@since v0.8
-*/
-typedef struct _ccColor4B
-{
- GLubyte r;
- GLubyte g;
- GLubyte b;
- GLubyte a;
-} ccColor4B;
-//! helper macro that creates an ccColor4B type
-static inline ccColor4B
-ccc4(const GLubyte r, const GLubyte g, const GLubyte b, const GLubyte o)
-{
- ccColor4B c = {r, g, b, o};
- return c;
-}
-
-
-/** RGBA color composed of 4 floats
-@since v0.8
-*/
-typedef struct _ccColor4F {
- GLfloat r;
- GLfloat g;
- GLfloat b;
- GLfloat a;
-} ccColor4F;
-
-
-/** Returns a ccColor4F from a ccColor3B. Alpha will be 1.
- @since v0.99.1
- */
-static inline ccColor4F ccc4FFromccc3B(ccColor3B c)
-{
- ccColor4F c4 = {c.r/255.f, c.g/255.f, c.b/255.f, 1.f};
- return c4;
-}
-
-//! helper that creates a ccColor4f type
-static inline ccColor4F
-ccc4f(const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a)
-{
- ccColor4F c4 = {r, g, b, a};
- return c4;
-}
-
-/** Returns a ccColor4F from a ccColor4B.
- @since v0.99.1
- */
-static inline ccColor4F ccc4FFromccc4B(ccColor4B c)
-{
- ccColor4F c4 = {c.r/255.f, c.g/255.f, c.b/255.f, c.a/255.f};
- return c4;
-}
-
-static inline ccColor4B ccc4BFromccc4F(ccColor4F c)
-{
- ccColor4B ret = {(GLubyte)(c.r*255), (GLubyte)(c.g*255), (GLubyte)(c.b*255), (GLubyte)(c.a*255)};
- return ret;
-}
-
-/** returns YES if both ccColor4F are equal. Otherwise it returns NO.
- @since v0.99.1
- */
-static inline bool ccc4FEqual(ccColor4F a, ccColor4F b)
-{
- return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
-}
-
-/** A vertex composed of 2 floats: x, y
- @since v0.8
- */
-typedef struct _ccVertex2F
-{
- GLfloat x;
- GLfloat y;
-} ccVertex2F;
-
-static inline ccVertex2F vertex2(const float x, const float y)
-{
- ccVertex2F c = {x, y};
- return c;
-}
-
-
-/** A vertex composed of 2 floats: x, y
- @since v0.8
- */
-typedef struct _ccVertex3F
-{
- GLfloat x;
- GLfloat y;
- GLfloat z;
-} ccVertex3F;
-
-static inline ccVertex3F vertex3(const float x, const float y, const float z)
-{
- ccVertex3F c = {x, y, z};
- return c;
-}
-
-/** A texcoord composed of 2 floats: u, y
- @since v0.8
- */
-typedef struct _ccTex2F {
- GLfloat u;
- GLfloat v;
-} ccTex2F;
-
-static inline ccTex2F tex2(const float u, const float v)
-{
- ccTex2F t = {u , v};
- return t;
-}
-
-
-//! Point Sprite component
-typedef struct _ccPointSprite
-{
- ccVertex2F pos; // 8 bytes
- ccColor4B color; // 4 bytes
- GLfloat size; // 4 bytes
-} ccPointSprite;
-
-//! A 2D Quad. 4 * 2 floats
-typedef struct _ccQuad2 {
- ccVertex2F tl;
- ccVertex2F tr;
- ccVertex2F bl;
- ccVertex2F br;
-} ccQuad2;
-
-
-//! A 3D Quad. 4 * 3 floats
-typedef struct _ccQuad3 {
- ccVertex3F bl;
- ccVertex3F br;
- ccVertex3F tl;
- ccVertex3F tr;
-} ccQuad3;
-
-//! a Point with a vertex point, a tex coord point and a color 4B
-typedef struct _ccV2F_C4B_T2F
-{
- //! vertices (2F)
- ccVertex2F vertices;
- //! colors (4B)
- ccColor4B colors;
- //! tex coords (2F)
- ccTex2F texCoords;
-} ccV2F_C4B_T2F;
-
-//! a Point with a vertex point, a tex coord point and a color 4F
-typedef struct _ccV2F_C4F_T2F
-{
- //! vertices (2F)
- ccVertex2F vertices;
- //! colors (4F)
- ccColor4F colors;
- //! tex coords (2F)
- ccTex2F texCoords;
-} ccV2F_C4F_T2F;
-
-//! a Point with a vertex point, a tex coord point and a color 4B
-typedef struct _ccV3F_C4B_T2F
-{
- //! vertices (3F)
- ccVertex3F vertices; // 12 bytes
-// char __padding__[4];
-
- //! colors (4B)
- ccColor4B colors; // 4 bytes
-// char __padding2__[4];
-
- // tex coords (2F)
- ccTex2F texCoords; // 8 bytes
-} ccV3F_C4B_T2F;
-
-//! A Triangle of ccV2F_C4B_T2F
-typedef struct _ccV2F_C4B_T2F_Triangle
-{
- //! Point A
- ccV2F_C4B_T2F a;
- //! Point B
- ccV2F_C4B_T2F b;
- //! Point B
- ccV2F_C4B_T2F c;
-} ccV2F_C4B_T2F_Triangle;
-
-//! A Quad of ccV2F_C4B_T2F
-typedef struct _ccV2F_C4B_T2F_Quad
-{
- //! bottom left
- ccV2F_C4B_T2F bl;
- //! bottom right
- ccV2F_C4B_T2F br;
- //! top left
- ccV2F_C4B_T2F tl;
- //! top right
- ccV2F_C4B_T2F tr;
-} ccV2F_C4B_T2F_Quad;
-
-//! 4 ccVertex3FTex2FColor4B
-typedef struct _ccV3F_C4B_T2F_Quad
-{
- //! top left
- ccV3F_C4B_T2F tl;
- //! bottom left
- ccV3F_C4B_T2F bl;
- //! top right
- ccV3F_C4B_T2F tr;
- //! bottom right
- ccV3F_C4B_T2F br;
-} ccV3F_C4B_T2F_Quad;
-
-//! 4 ccVertex2FTex2FColor4F Quad
-typedef struct _ccV2F_C4F_T2F_Quad
-{
- //! bottom left
- ccV2F_C4F_T2F bl;
- //! bottom right
- ccV2F_C4F_T2F br;
- //! top left
- ccV2F_C4F_T2F tl;
- //! top right
- ccV2F_C4F_T2F tr;
-} ccV2F_C4F_T2F_Quad;
-
-//! Blend Function used for textures
-typedef struct _ccBlendFunc
-{
- //! source blend function
- GLenum src;
- //! destination blend function
- GLenum dst;
-} ccBlendFunc;
-
-static const ccBlendFunc kCCBlendFuncDisable = {GL_ONE, GL_ZERO};
-
-// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m
-//! Vertical text alignment type
-typedef enum
-{
- kCCVerticalTextAlignmentTop,
- kCCVerticalTextAlignmentCenter,
- kCCVerticalTextAlignmentBottom,
-} CCVerticalTextAlignment;
-
-// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m
-//! Horizontal text alignment type
-typedef enum
-{
- kCCTextAlignmentLeft,
- kCCTextAlignmentCenter,
- kCCTextAlignmentRight,
-} CCTextAlignment;
-
-// types for animation in particle systems
-
-// texture coordinates for a quad
-typedef struct _ccT2F_Quad
-{
- //! bottom left
- ccTex2F bl;
- //! bottom right
- ccTex2F br;
- //! top left
- ccTex2F tl;
- //! top right
- ccTex2F tr;
-} ccT2F_Quad;
-
-// struct that holds the size in pixels, texture coordinates and delays for animated CCParticleSystemQuad
-typedef struct
-{
- ccT2F_Quad texCoords;
- float delay;
- CCSize size;
-} ccAnimationFrameData;
-
-
-
-/**
- types used for defining fonts properties (i.e. font name, size, stroke or shadow)
- */
-
-// shadow attributes
-typedef struct _ccFontShadow
-{
-public:
-
- // shadow is not enabled by default
- _ccFontShadow(): m_shadowEnabled(false) {}
-
- // true if shadow enabled
- bool m_shadowEnabled;
- // shadow x and y offset
- CCSize m_shadowOffset;
- // shadow blurrines
- float m_shadowBlur;
- // shadow opacity
- float m_shadowOpacity;
-
-} ccFontShadow;
-
-// stroke attributes
-typedef struct _ccFontStroke
-{
-public:
-
- // stroke is disabled by default
- _ccFontStroke(): m_strokeEnabled(false) {}
-
- // true if stroke enabled
- bool m_strokeEnabled;
- // stroke color
- ccColor3B m_strokeColor;
- // stroke size
- float m_strokeSize;
-
-} ccFontStroke;
-
-// font attributes
-/**
- * @js NA
- * @lua NA
- */
-typedef struct _ccFontDefinition
-{
-public:
-
- _ccFontDefinition(): m_alignment(kCCTextAlignmentCenter),
- m_vertAlignment(kCCVerticalTextAlignmentTop),
- m_fontFillColor(ccWHITE)
- { m_dimensions = CCSizeMake(0,0); }
-
- // font name
- std::string m_fontName;
- // font size
- int m_fontSize;
- // horizontal alignment
- CCTextAlignment m_alignment;
- // vertical alignment
- CCVerticalTextAlignment m_vertAlignment;
- // renering box
- CCSize m_dimensions;
- // font color
- ccColor3B m_fontFillColor;
- // font shadow
- ccFontShadow m_shadow;
- // font stroke
- ccFontStroke m_stroke;
-
-} ccFontDefinition;
-
-
-NS_CC_END
-
-#endif //__CCTYPES_H__
diff --git a/cocos2dx/include/cocos2d.h b/cocos2dx/include/cocos2d.h
deleted file mode 100644
index 124b820..0000000
--- a/cocos2dx/include/cocos2d.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-Copyright (c) Microsoft Open Technologies, Inc.
-
-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.
-****************************************************************************/
-
-#ifndef __COCOS2D_H__
-#define __COCOS2D_H__
-
-// 0x00 HI ME LO
-// 00 02 01 00
-#define COCOS2D_VERSION 0x00020100
-
-//
-// all cocos2d include files
-//
-#include "ccConfig.h"
-
-// actions
-#include "actions/CCAction.h"
-#include "actions/CCActionInterval.h"
-#include "actions/CCActionCamera.h"
-#include "actions/CCActionManager.h"
-#include "actions/CCActionEase.h"
-#include "actions/CCActionPageTurn3D.h"
-#include "actions/CCActionGrid.h"
-#include "actions/CCActionProgressTimer.h"
-#include "actions/CCActionGrid3D.h"
-#include "actions/CCActionTiledGrid.h"
-#include "actions/CCActionInstant.h"
-#include "actions/CCActionTween.h"
-#include "actions/CCActionCatmullRom.h"
-
-// base_nodes
-#include "base_nodes/CCNode.h"
-#include "base_nodes/CCAtlasNode.h"
-
-// cocoa
-#include "cocoa/CCAffineTransform.h"
-#include "cocoa/CCDictionary.h"
-#include "cocoa/CCObject.h"
-#include "cocoa/CCArray.h"
-#include "cocoa/CCGeometry.h"
-#include "cocoa/CCSet.h"
-#include "cocoa/CCAutoreleasePool.h"
-#include "cocoa/CCInteger.h"
-#include "cocoa/CCFloat.h"
-#include "cocoa/CCDouble.h"
-#include "cocoa/CCBool.h"
-#include "cocoa/CCString.h"
-#include "cocoa/CCNS.h"
-#include "cocoa/CCZone.h"
-
-// draw nodes
-#include "draw_nodes/CCDrawingPrimitives.h"
-#include "draw_nodes/CCDrawNode.h"
-
-// effects
-#include "effects/CCGrabber.h"
-#include "effects/CCGrid.h"
-
-// include
-#include "CCEventType.h"
-#include "CCProtocols.h"
-#include "ccConfig.h"
-#include "ccMacros.h"
-#include "ccTypes.h"
-
-// kazmath
-#include "kazmath/include/kazmath/kazmath.h"
-#include "kazmath/include/kazmath/GL/matrix.h"
-
-// keypad_dispatcher
-#include "keypad_dispatcher/CCKeypadDelegate.h"
-#include "keypad_dispatcher/CCKeypadDispatcher.h"
-
-// label_nodes
-#include "label_nodes/CCLabelAtlas.h"
-#include "label_nodes/CCLabelTTF.h"
-#include "label_nodes/CCLabelBMFont.h"
-
-// layers_scenes_transitions_nodes
-#include "layers_scenes_transitions_nodes/CCLayer.h"
-#include "layers_scenes_transitions_nodes/CCScene.h"
-#include "layers_scenes_transitions_nodes/CCTransition.h"
-#include "layers_scenes_transitions_nodes/CCTransitionPageTurn.h"
-#include "layers_scenes_transitions_nodes/CCTransitionProgress.h"
-
-// menu_nodes
-#include "menu_nodes/CCMenu.h"
-#include "menu_nodes/CCMenuItem.h"
-
-// misc_nodes
-#include "misc_nodes/CCClippingNode.h"
-#include "misc_nodes/CCMotionStreak.h"
-#include "misc_nodes/CCProgressTimer.h"
-#include "misc_nodes/CCRenderTexture.h"
-
-// particle_nodes
-#include "particle_nodes/CCParticleBatchNode.h"
-#include "particle_nodes/CCParticleSystem.h"
-#include "particle_nodes/CCParticleExamples.h"
-#include "particle_nodes/CCParticleSystemQuad.h"
-
-// platform
-#include "platform/CCDevice.h"
-#include "platform/CCCommon.h"
-#include "platform/CCFileUtils.h"
-#include "platform/CCImage.h"
-#include "platform/CCSAXParser.h"
-#include "platform/CCThread.h"
-#include "platform/platform.h"
-#include "platform/CCPlatformConfig.h"
-#include "platform/CCPlatformMacros.h"
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
- #include "platform/ios/CCAccelerometer.h"
- #include "platform/ios/CCApplication.h"
- #include "platform/ios/CCEGLView.h"
- #include "platform/ios/CCGL.h"
- #include "platform/ios/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
- #include "platform/android/CCAccelerometer.h"
- #include "platform/android/CCApplication.h"
- #include "platform/android/CCEGLView.h"
- #include "platform/android/CCGL.h"
- #include "platform/android/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
- #include "platform/blackberry/CCAccelerometer.h"
- #include "platform/blackberry/CCApplication.h"
- #include "platform/blackberry/CCEGLView.h"
- #include "platform/blackberry/CCGL.h"
- #include "platform/blackberry/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
- #include "platform/win32/CCAccelerometer.h"
- #include "platform/win32/CCApplication.h"
- #include "platform/win32/CCEGLView.h"
- #include "platform/win32/CCGL.h"
- #include "platform/win32/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
- #include "platform/winrt/CCApplication.h"
- #include "platform/winrt/CCEGLView.h"
- #include "platform/winrt/CCGL.h"
- #include "platform/winrt/CCStdC.h"
- #include "platform/winrt/CCAccelerometer.h"
- #include "platform/winrt/CCPrecompiledShaders.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
- #include "platform/winrt/CCApplication.h"
- #include "platform/wp8/CCEGLView.h"
- #include "platform/winrt/CCGL.h"
- #include "platform/winrt/CCStdC.h"
- #include "platform/winrt/CCAccelerometer.h"
- #include "platform/winrt/CCPrecompiledShaders.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
- #include "platform/mac/CCAccelerometer.h"
- #include "platform/mac/CCApplication.h"
- #include "platform/mac/CCEGLView.h"
- #include "platform/mac/CCGL.h"
- #include "platform/mac/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
-
-
-
-
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
- #include "platform/linux/CCAccelerometer.h"
- #include "platform/linux/CCApplication.h"
- #include "platform/linux/CCEGLView.h"
- #include "platform/linux/CCGL.h"
- #include "platform/linux/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
-
-// MARMALADE CHANGE
-// Added for Marmalade support
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE)
- #include "platform/Marmalade/CCAccelerometer.h"
- #include "platform/Marmalade/CCApplication.h"
- #include "platform/Marmalade/CCEGLView.h"
- #include "platform/Marmalade/CCGL.h"
- #include "platform/Marmalade/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_NACL)
- #include "platform/nacl/CCAccelerometer.h"
- #include "platform/nacl/CCApplication.h"
- #include "platform/nacl/CCEGLView.h"
- #include "platform/nacl/CCGL.h"
- #include "platform/nacl/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
- #include "platform/emscripten/CCAccelerometer.h"
- #include "platform/emscripten/CCApplication.h"
- #include "platform/emscripten/CCEGLView.h"
- #include "platform/emscripten/CCGL.h"
- #include "platform/emscripten/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN
-
-#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
- #include "platform/tizen/CCAccelerometer.h"
- #include "platform/tizen/CCApplication.h"
- #include "platform/tizen/CCEGLView.h"
- #include "platform/tizen/CCGL.h"
- #include "platform/tizen/CCStdC.h"
-#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
-
-// script_support
-#include "script_support/CCScriptSupport.h"
-
-// shaders
-#include "shaders/CCGLProgram.h"
-#include "shaders/ccGLStateCache.h"
-#include "shaders/CCShaderCache.h"
-#include "shaders/ccShaders.h"
-
-// sprite_nodes
-#include "sprite_nodes/CCAnimation.h"
-#include "sprite_nodes/CCAnimationCache.h"
-#include "sprite_nodes/CCSprite.h"
-#include "sprite_nodes/CCSpriteBatchNode.h"
-#include "sprite_nodes/CCSpriteFrame.h"
-#include "sprite_nodes/CCSpriteFrameCache.h"
-
-// support
-#include "support/ccUTF8.h"
-#include "support/CCNotificationCenter.h"
-#include "support/CCPointExtension.h"
-#include "support/CCProfiling.h"
-#include "support/user_default/CCUserDefault.h"
-#include "support/CCVertex.h"
-#include "support/tinyxml2/tinyxml2.h"
-
-// text_input_node
-#include "text_input_node/CCIMEDelegate.h"
-#include "text_input_node/CCIMEDispatcher.h"
-#include "text_input_node/CCTextFieldTTF.h"
-
-// textures
-#include "textures/CCTexture2D.h"
-#include "textures/CCTextureAtlas.h"
-#include "textures/CCTextureCache.h"
-#include "textures/CCTexturePVR.h"
-
-// tilemap_parallax_nodes
-#include "tilemap_parallax_nodes/CCParallaxNode.h"
-#include "tilemap_parallax_nodes/CCTMXLayer.h"
-#include "tilemap_parallax_nodes/CCTMXObjectGroup.h"
-#include "tilemap_parallax_nodes/CCTMXTiledMap.h"
-#include "tilemap_parallax_nodes/CCTMXXMLParser.h"
-#include "tilemap_parallax_nodes/CCTileMapAtlas.h"
-
-// touch_dispatcher
-#include "touch_dispatcher/CCTouch.h"
-#include "touch_dispatcher/CCTouchDelegateProtocol.h"
-#include "touch_dispatcher/CCTouchDispatcher.h"
-#include "touch_dispatcher/CCTouchHandler.h"
-
-// root
-#include "CCCamera.h"
-#include "CCConfiguration.h"
-#include "CCDirector.h"
-#include "CCScheduler.h"
-
-// component
-#include "support/component/CCComponent.h"
-#include "support/component/CCComponentContainer.h"
-
-//robtop
-#include "robtop/keyboard_dispatcher/CCKeyboardDelegate.h"
-#include "robtop/keyboard_dispatcher/CCKeyboardDispatcher.h"
-
-#include "robtop/mouse_dispatcher/CCMouseDelegate.h"
-#include "robtop/mouse_dispatcher/CCMouseDispatcher.h"
-
-#include "robtop/scene_nodes/CCSceneTransitionDelegate.h"
-
-#include "robtop/xml/DS_Dictionary.h"
-
-#include "robtop/glfw/glfw3.h"
-
-NS_CC_BEGIN
-
-CC_DLL const char* cocos2dVersion();
-
-NS_CC_END
-
-#endif // __COCOS2D_H__
diff --git a/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h b/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h
deleted file mode 100644
index a1084c8..0000000
--- a/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef C_STACK_H_INCLUDED
-#define C_STACK_H_INCLUDED
-
-#include "../mat4.h"
-
-typedef struct km_mat4_stack {
- int capacity; //The total item capacity
- int item_count; //The number of items
- kmMat4* top;
- kmMat4* stack;
-} km_mat4_stack;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void km_mat4_stack_initialize(km_mat4_stack* stack);
-void km_mat4_stack_push(km_mat4_stack* stack, const kmMat4* item);
-void km_mat4_stack_pop(km_mat4_stack* stack, kmMat4* pOut);
-void km_mat4_stack_release(km_mat4_stack* stack);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // C_STACK_H_INCLUDED
diff --git a/cocos2dx/kazmath/include/kazmath/GL/matrix.h b/cocos2dx/kazmath/include/kazmath/GL/matrix.h
deleted file mode 100644
index a1c95f8..0000000
--- a/cocos2dx/kazmath/include/kazmath/GL/matrix.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef KM_GL_MATRIX_H_INCLUDED
-#define KM_GL_MATRIX_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-
-#define KM_GL_MODELVIEW 0x1700
-#define KM_GL_PROJECTION 0x1701
-#define KM_GL_TEXTURE 0x1702
-
-typedef unsigned int kmGLEnum;
-
-#include "../mat4.h"
-#include "../vec3.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void CC_DLL kmGLFreeAll(void);
-void CC_DLL kmGLPushMatrix(void);
-void CC_DLL kmGLPopMatrix(void);
-void CC_DLL kmGLMatrixMode(kmGLEnum mode);
-void CC_DLL kmGLLoadIdentity(void);
-void CC_DLL kmGLLoadMatrix(const kmMat4* pIn);
-void CC_DLL kmGLMultMatrix(const kmMat4* pIn);
-void CC_DLL kmGLTranslatef(float x, float y, float z);
-void CC_DLL kmGLRotatef(float angle, float x, float y, float z);
-void CC_DLL kmGLScalef(float x, float y, float z);
-void CC_DLL kmGLGetMatrix(kmGLEnum mode, kmMat4* pOut);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MATRIX_H_INCLUDED
diff --git a/cocos2dx/kazmath/include/kazmath/aabb.h b/cocos2dx/kazmath/include/kazmath/aabb.h
deleted file mode 100644
index 629889c..0000000
--- a/cocos2dx/kazmath/include/kazmath/aabb.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef KAZMATH_AABB_H_INCLUDED
-#define KAZMATH_AABB_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-#include "vec3.h"
-#include "utility.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * A structure that represents an axis-aligned
- * bounding box.
- */
-typedef struct kmAABB {
- kmVec3 min; /** The max corner of the box */
- kmVec3 max; /** The min corner of the box */
-} kmAABB;
-
-CC_DLL const int kmAABBContainsPoint(const kmVec3* pPoint, const kmAABB* pBox);
-CC_DLL kmAABB* const kmAABBAssign(kmAABB* pOut, const kmAABB* pIn);
-CC_DLL kmAABB* const kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cocos2dx/kazmath/include/kazmath/kazmath.h b/cocos2dx/kazmath/include/kazmath/kazmath.h
deleted file mode 100644
index ef09870..0000000
--- a/cocos2dx/kazmath/include/kazmath/kazmath.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef KAZMATH_H_INCLUDED
-#define KAZMATH_H_INCLUDED
-
-#include "vec2.h"
-#include "vec3.h"
-#include "mat3.h"
-#include "mat4.h"
-#include "utility.h"
-#include "quaternion.h"
-#include "plane.h"
-#include "aabb.h"
-#include "ray2.h"
-
-#endif // KAZMATH_H_INCLUDED
diff --git a/cocos2dx/kazmath/include/kazmath/mat3.h b/cocos2dx/kazmath/include/kazmath/mat3.h
deleted file mode 100644
index 4d22dfb..0000000
--- a/cocos2dx/kazmath/include/kazmath/mat3.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-#ifndef MAT3_H_INCLUDED
-#define MAT3_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-#include "utility.h"
-
-struct kmVec3;
-struct kmQuaternion;
-
-typedef struct kmMat3{
- kmScalar mat[9];
-} kmMat3;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-CC_DLL kmMat3* const kmMat3Fill(kmMat3* pOut, const kmScalar* pMat);
-CC_DLL kmMat3* const kmMat3Adjugate(kmMat3* pOut, const kmMat3* pIn);
-CC_DLL kmMat3* const kmMat3Identity(kmMat3* pOut);
-CC_DLL kmMat3* const kmMat3Inverse(kmMat3* pOut, const kmScalar pDeterminate, const kmMat3* pM);
-CC_DLL const int kmMat3IsIdentity(const kmMat3* pIn);
-CC_DLL kmMat3* const kmMat3Transpose(kmMat3* pOut, const kmMat3* pIn);
-CC_DLL const kmScalar kmMat3Determinant(const kmMat3* pIn);
-CC_DLL kmMat3* const kmMat3Multiply(kmMat3* pOut, const kmMat3* pM1, const kmMat3* pM2);
-CC_DLL kmMat3* const kmMat3ScalarMultiply(kmMat3* pOut, const kmMat3* pM, const kmScalar pFactor);
-
-CC_DLL kmMat3* const kmMat3RotationAxisAngle(kmMat3* pOut, const struct kmVec3* axis, kmScalar radians);
-CC_DLL struct kmVec3* const kmMat3RotationToAxisAngle(struct kmVec3* pAxis, kmScalar* radians, const kmMat3* pIn);
-
-CC_DLL kmMat3* const kmMat3Assign(kmMat3* pOut, const kmMat3* pIn);
-CC_DLL const int kmMat3AreEqual(const kmMat3* pM1, const kmMat3* pM2);
-
-CC_DLL kmMat3* const kmMat3RotationX(kmMat3* pOut, const kmScalar radians);
-CC_DLL kmMat3* const kmMat3RotationY(kmMat3* pOut, const kmScalar radians);
-CC_DLL kmMat3* const kmMat3RotationZ(kmMat3* pOut, const kmScalar radians);
-
-CC_DLL kmMat3* const kmMat3Rotation(kmMat3* pOut, const kmScalar radians);
-CC_DLL kmMat3* const kmMat3Scaling(kmMat3* pOut, const kmScalar x, const kmScalar y);
-CC_DLL kmMat3* const kmMat3Translation(kmMat3* pOut, const kmScalar x, const kmScalar y);
-
-CC_DLL kmMat3* const kmMat3RotationQuaternion(kmMat3* pOut, const struct kmQuaternion* pIn);
-CC_DLL kmMat3* const kmMat3RotationAxisAngle(kmMat3* pOut, const struct kmVec3* axis, kmScalar radians);
-CC_DLL struct kmVec3* const kmMat3RotationToAxisAngle(struct kmVec3* pAxis, kmScalar* radians, const kmMat3* pIn);
-
-#ifdef __cplusplus
-}
-#endif
-#endif // MAT3_H_INCLUDED
-
diff --git a/cocos2dx/kazmath/include/kazmath/mat4.h b/cocos2dx/kazmath/include/kazmath/mat4.h
deleted file mode 100644
index 241a0b9..0000000
--- a/cocos2dx/kazmath/include/kazmath/mat4.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MAT4_H_INCLUDED
-#define MAT4_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-#include "utility.h"
-
-struct kmVec3;
-struct kmMat3;
-struct kmQuaternion;
-struct kmPlane;
-
-/*
-A 4x4 matrix
-
- | 0 4 8 12 |
-mat = | 1 5 9 13 |
- | 2 6 10 14 |
- | 3 7 11 15 |
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct kmMat4 {
- kmScalar mat[16];
-} kmMat4;
-
-CC_DLL kmMat4* const kmMat4Fill(kmMat4* pOut, const kmScalar* pMat);
-
-
-CC_DLL kmMat4* const kmMat4Identity(kmMat4* pOut);
-
-CC_DLL kmMat4* const kmMat4Inverse(kmMat4* pOut, const kmMat4* pM);
-
-
-CC_DLL const int kmMat4IsIdentity(const kmMat4* pIn);
-
-CC_DLL kmMat4* const kmMat4Transpose(kmMat4* pOut, const kmMat4* pIn);
-CC_DLL kmMat4* const kmMat4Multiply(kmMat4* pOut, const kmMat4* pM1, const kmMat4* pM2);
-
-CC_DLL kmMat4* const kmMat4Assign(kmMat4* pOut, const kmMat4* pIn);
-CC_DLL const int kmMat4AreEqual(const kmMat4* pM1, const kmMat4* pM2);
-
-CC_DLL kmMat4* const kmMat4RotationX(kmMat4* pOut, const kmScalar radians);
-CC_DLL kmMat4* const kmMat4RotationY(kmMat4* pOut, const kmScalar radians);
-CC_DLL kmMat4* const kmMat4RotationZ(kmMat4* pOut, const kmScalar radians);
-CC_DLL kmMat4* const kmMat4RotationPitchYawRoll(kmMat4* pOut, const kmScalar pitch, const kmScalar yaw, const kmScalar roll);
-CC_DLL kmMat4* const kmMat4RotationQuaternion(kmMat4* pOut, const struct kmQuaternion* pQ);
-CC_DLL kmMat4* const kmMat4RotationTranslation(kmMat4* pOut, const struct kmMat3* rotation, const struct kmVec3* translation);
-CC_DLL kmMat4* const kmMat4Scaling(kmMat4* pOut, const kmScalar x, const kmScalar y, const kmScalar z);
-CC_DLL kmMat4* const kmMat4Translation(kmMat4* pOut, const kmScalar x, const kmScalar y, const kmScalar z);
-
-CC_DLL struct kmVec3* const kmMat4GetUpVec3(struct kmVec3* pOut, const kmMat4* pIn);
-CC_DLL struct kmVec3* const kmMat4GetRightVec3(struct kmVec3* pOut, const kmMat4* pIn);
-CC_DLL struct kmVec3* const kmMat4GetForwardVec3(struct kmVec3* pOut, const kmMat4* pIn);
-
-CC_DLL kmMat4* const kmMat4PerspectiveProjection(kmMat4* pOut, kmScalar fovY, kmScalar aspect, kmScalar zNear, kmScalar zFar);
-CC_DLL kmMat4* const kmMat4OrthographicProjection(kmMat4* pOut, kmScalar left, kmScalar right, kmScalar bottom, kmScalar top, kmScalar nearVal, kmScalar farVal);
-CC_DLL kmMat4* const kmMat4LookAt(kmMat4* pOut, const struct kmVec3* pEye, const struct kmVec3* pCenter, const struct kmVec3* pUp);
-
-CC_DLL kmMat4* const kmMat4RotationAxisAngle(kmMat4* pOut, const struct kmVec3* axis, kmScalar radians);
-CC_DLL struct kmMat3* const kmMat4ExtractRotation(struct kmMat3* pOut, const kmMat4* pIn);
-CC_DLL struct kmPlane* const kmMat4ExtractPlane(struct kmPlane* pOut, const kmMat4* pIn, const kmEnum plane);
-CC_DLL struct kmVec3* const kmMat4RotationToAxisAngle(struct kmVec3* pAxis, kmScalar* radians, const kmMat4* pIn);
-#ifdef __cplusplus
-}
-#endif
-#endif /* MAT4_H_INCLUDED */
diff --git a/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h b/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h
deleted file mode 100644
index aa85e6d..0000000
--- a/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- NEON math library for the iPhone / iPod touch
-
- Copyright (c) 2009 Justin Saunders
-
- This software is provided 'as-is', without any express or implied warranty.
- In no event will the authors be held liable for any damages arising
- from the use of this software.
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it freely,
- subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product documentation
- would be appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef __NEON_MATRIX_IMPL_H__
-#define __NEON_MATRIX_IMPL_H__
-
-#ifdef __arm__
-#if defined(__QNX__) || defined(ANDROID) || defined(I3D_ARCH_ARM) || defined(__native_client__) || defined(TIZEN) // MARMALADE CHANGE: Added for Marmalade support
-// blackberry and android don't have arm/arch.h but it defines __arm__
-#else
-#include "arm/arch.h"
-#endif
-#endif // __arm__
-
-// Matrices are assumed to be stored in column major format according to OpenGL
-// specification.
-
-// Multiplies two 4x4 matrices (a,b) outputting a 4x4 matrix (output)
-void NEON_Matrix4Mul(const float* a, const float* b, float* output );
-
-// Multiplies a 4x4 matrix (m) with a vector 4 (v), outputting a vector 4
-void NEON_Matrix4Vector4Mul(const float* m, const float* v, float* output);
-
-
-#endif // __NEON_MATRIX_IMPL_H__
diff --git a/cocos2dx/kazmath/include/kazmath/plane.h b/cocos2dx/kazmath/include/kazmath/plane.h
deleted file mode 100644
index c4e4fe5..0000000
--- a/cocos2dx/kazmath/include/kazmath/plane.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef PLANE_H_INCLUDED
-#define PLANE_H_INCLUDED
-
-#define KM_PLANE_LEFT 0
-#define KM_PLANE_RIGHT 1
-#define KM_PLANE_BOTTOM 2
-#define KM_PLANE_TOP 3
-#define KM_PLANE_NEAR 4
-#define KM_PLANE_FAR 5
-
-#include "platform/CCPlatformMacros.h"
-#include "utility.h"
-
-struct kmVec3;
-struct kmVec4;
-struct kmMat4;
-
-typedef struct kmPlane {
- kmScalar a, b, c, d;
-} kmPlane;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum POINT_CLASSIFICATION {
- POINT_INFRONT_OF_PLANE = 0,
- POINT_BEHIND_PLANE,
- POINT_ON_PLANE,
-} POINT_CLASSIFICATION;
-
-CC_DLL const kmScalar kmPlaneDot(const kmPlane* pP, const struct kmVec4* pV);
-CC_DLL const kmScalar kmPlaneDotCoord(const kmPlane* pP, const struct kmVec3* pV);
-CC_DLL const kmScalar kmPlaneDotNormal(const kmPlane* pP, const struct kmVec3* pV);
-CC_DLL kmPlane* const kmPlaneFromPointNormal(kmPlane* pOut, const struct kmVec3* pPoint, const struct kmVec3* pNormal);
-CC_DLL kmPlane* const kmPlaneFromPoints(kmPlane* pOut, const struct kmVec3* p1, const struct kmVec3* p2, const struct kmVec3* p3);
-CC_DLL kmVec3* const kmPlaneIntersectLine(struct kmVec3* pOut, const kmPlane* pP, const struct kmVec3* pV1, const struct kmVec3* pV2);
-CC_DLL kmPlane* const kmPlaneNormalize(kmPlane* pOut, const kmPlane* pP);
-CC_DLL kmPlane* const kmPlaneScale(kmPlane* pOut, const kmPlane* pP, kmScalar s);
-CC_DLL const POINT_CLASSIFICATION kmPlaneClassifyPoint(const kmPlane* pIn, const kmVec3* pP); /** Classifies a point against a plane */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // PLANE_H_INCLUDED
diff --git a/cocos2dx/kazmath/include/kazmath/quaternion.h b/cocos2dx/kazmath/include/kazmath/quaternion.h
deleted file mode 100644
index a3632f0..0000000
--- a/cocos2dx/kazmath/include/kazmath/quaternion.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef QUATERNION_H_INCLUDED
-#define QUATERNION_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "platform/CCPlatformMacros.h"
-#include "utility.h"
-
-struct kmMat4;
-struct kmMat3;
-struct kmVec3;
-
-typedef struct kmQuaternion {
- kmScalar x;
- kmScalar y;
- kmScalar z;
- kmScalar w;
-} kmQuaternion;
-
-CC_DLL kmQuaternion* const kmQuaternionConjugate(kmQuaternion* pOut, const kmQuaternion* pIn); ///< Returns pOut, sets pOut to the conjugate of pIn
-
-CC_DLL const kmScalar kmQuaternionDot(const kmQuaternion* q1, const kmQuaternion* q2); ///< Returns the dot product of the 2 quaternions
-
-CC_DLL kmQuaternion* kmQuaternionExp(kmQuaternion* pOut, const kmQuaternion* pIn); ///< Returns the exponential of the quaternion
-
-///< Makes the passed quaternion an identity quaternion
-
-CC_DLL kmQuaternion* kmQuaternionIdentity(kmQuaternion* pOut);
-
-///< Returns the inverse of the passed Quaternion
-
-CC_DLL kmQuaternion* kmQuaternionInverse(kmQuaternion* pOut,
- const kmQuaternion* pIn);
-
-///< Returns true if the quaternion is an identity quaternion
-
-CC_DLL int kmQuaternionIsIdentity(const kmQuaternion* pIn);
-
-///< Returns the length of the quaternion
-
-CC_DLL kmScalar kmQuaternionLength(const kmQuaternion* pIn);
-
-///< Returns the length of the quaternion squared (prevents a sqrt)
-
-CC_DLL kmScalar kmQuaternionLengthSq(const kmQuaternion* pIn);
-
-///< Returns the natural logarithm
-
-CC_DLL kmQuaternion* kmQuaternionLn(kmQuaternion* pOut, const kmQuaternion* pIn);
-
-///< Multiplies 2 quaternions together
-
-CC_DLL kmQuaternion* kmQuaternionMultiply(kmQuaternion* pOut, const kmQuaternion* q1, const kmQuaternion* q2);
-
-///< Normalizes a quaternion
-
-CC_DLL kmQuaternion* kmQuaternionNormalize(kmQuaternion* pOut, const kmQuaternion* pIn);
-
-///< Rotates a quaternion around an axis
-
-CC_DLL kmQuaternion* kmQuaternionRotationAxis(kmQuaternion* pOut, const struct kmVec3* pV, kmScalar angle);
-
-///< Creates a quaternion from a rotation matrix
-
-CC_DLL kmQuaternion* kmQuaternionRotationMatrix(kmQuaternion* pOut, const struct kmMat3* pIn);
-
-///< Create a quaternion from yaw, pitch and roll
-
-CC_DLL kmQuaternion* kmQuaternionRotationYawPitchRoll(kmQuaternion* pOut, kmScalar yaw, kmScalar pitch, kmScalar roll);
-///< Interpolate between 2 quaternions
-CC_DLL kmQuaternion* kmQuaternionSlerp(kmQuaternion* pOut, const kmQuaternion* q1, const kmQuaternion* q2, kmScalar t);
-
-///< Get the axis and angle of rotation from a quaternion
-CC_DLL void kmQuaternionToAxisAngle(const kmQuaternion* pIn, struct kmVec3* pVector, kmScalar* pAngle);
-
-///< Scale a quaternion
-CC_DLL kmQuaternion* kmQuaternionScale(kmQuaternion* pOut, const kmQuaternion* pIn, kmScalar s);
-CC_DLL kmQuaternion* kmQuaternionAssign(kmQuaternion* pOut, const kmQuaternion* pIn);
-CC_DLL kmQuaternion* kmQuaternionAdd(kmQuaternion* pOut, const kmQuaternion* pQ1, const kmQuaternion* pQ2);
-CC_DLL kmQuaternion* kmQuaternionRotationBetweenVec3(kmQuaternion* pOut, const struct kmVec3* vec1, const struct kmVec3* vec2, const struct kmVec3* fallback);
-CC_DLL struct kmVec3* kmQuaternionMultiplyVec3(struct kmVec3* pOut, const kmQuaternion* q, const struct kmVec3* v);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cocos2dx/kazmath/include/kazmath/ray2.h b/cocos2dx/kazmath/include/kazmath/ray2.h
deleted file mode 100644
index 6734a95..0000000
--- a/cocos2dx/kazmath/include/kazmath/ray2.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright (c) 2011, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef RAY_2_H
-#define RAY_2_H
-
-#include "platform/CCPlatformMacros.h"
-#include "utility.h"
-#include "vec2.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct kmRay2 {
- kmVec2 start;
- kmVec2 dir;
-} kmRay2;
-
-CC_DLL void kmRay2Fill(kmRay2* ray, kmScalar px, kmScalar py, kmScalar vx, kmScalar vy);
-CC_DLL kmBool kmRay2IntersectLineSegment(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, kmVec2* intersection);
-CC_DLL kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out);
-CC_DLL kmBool kmRay2IntersectCircle(const kmRay2* ray, const kmVec2 centre, const kmScalar radius, kmVec2* intersection);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cocos2dx/kazmath/include/kazmath/utility.h b/cocos2dx/kazmath/include/kazmath/utility.h
deleted file mode 100644
index ed6bff6..0000000
--- a/cocos2dx/kazmath/include/kazmath/utility.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef UTILITY_H_INCLUDED
-#define UTILITY_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-#include
-
-#ifndef kmScalar
-#define kmScalar float
-#endif
-
-#ifndef kmBool
-#define kmBool unsigned char
-#endif
-
-#ifndef kmEnum
-#define kmEnum unsigned int
-#endif
-
-#ifndef KM_FALSE
-#define KM_FALSE 0
-#endif
-
-#ifndef KM_TRUE
-#define KM_TRUE 1
-#endif
-
-#define kmPI 3.141592f
-#define kmPIOver180 0.017453f // PI / 180
-#define kmPIUnder180 57.295779f // 180 / PI
-#define kmEpsilon 1.0 / 64.0
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-CC_DLL kmScalar kmSQR(kmScalar s);
-CC_DLL kmScalar kmDegreesToRadians(kmScalar degrees);
-CC_DLL kmScalar kmRadiansToDegrees(kmScalar radians);
-
-CC_DLL kmScalar kmMin(kmScalar lhs, kmScalar rhs);
-CC_DLL kmScalar kmMax(kmScalar lhs, kmScalar rhs);
-CC_DLL kmBool kmAlmostEqual(kmScalar lhs, kmScalar rhs);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* UTILITY_H_INCLUDED */
diff --git a/cocos2dx/kazmath/include/kazmath/vec2.h b/cocos2dx/kazmath/include/kazmath/vec2.h
deleted file mode 100644
index 6c29d40..0000000
--- a/cocos2dx/kazmath/include/kazmath/vec2.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef VEC2_H_INCLUDED
-#define VEC2_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-
-struct kmMat3;
-
-#ifndef kmScalar
-#define kmScalar float
-#endif
-
-#pragma pack(push) /* push current alignment to stack */
-#pragma pack(1) /* set alignment to 1 byte boundary */
-typedef struct kmVec2 {
- kmScalar x;
- kmScalar y;
-} kmVec2;
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-CC_DLL kmVec2* kmVec2Fill(kmVec2* pOut, kmScalar x, kmScalar y);
-CC_DLL kmScalar kmVec2Length(const kmVec2* pIn); ///< Returns the length of the vector
-CC_DLL kmScalar kmVec2LengthSq(const kmVec2* pIn); ///< Returns the square of the length of the vector
-CC_DLL kmVec2* kmVec2Normalize(kmVec2* pOut, const kmVec2* pIn); ///< Returns the vector passed in set to unit length
-CC_DLL kmVec2* kmVec2Add(kmVec2* pOut, const kmVec2* pV1, const kmVec2* pV2); ///< Adds 2 vectors and returns the result
-CC_DLL kmScalar kmVec2Dot(const kmVec2* pV1, const kmVec2* pV2); /** Returns the Dot product which is the cosine of the angle between the two vectors multiplied by their lengths */
-CC_DLL kmVec2* kmVec2Subtract(kmVec2* pOut, const kmVec2* pV1, const kmVec2* pV2); ///< Subtracts 2 vectors and returns the result
-CC_DLL kmVec2* kmVec2Transform(kmVec2* pOut, const kmVec2* pV1, const struct kmMat3* pM); /** Transform the Vector */
-CC_DLL kmVec2* kmVec2TransformCoord(kmVec2* pOut, const kmVec2* pV, const struct kmMat3* pM); ///
-
-#ifndef kmScalar
-#define kmScalar float
-#endif
-
-struct kmMat4;
-
-typedef struct kmVec3 {
- kmScalar x;
- kmScalar y;
- kmScalar z;
-} kmVec3;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-CC_DLL kmVec3* kmVec3Fill(kmVec3* pOut, kmScalar x, kmScalar y, kmScalar z);
-CC_DLL kmScalar kmVec3Length(const kmVec3* pIn); /** Returns the length of the vector */
-CC_DLL kmScalar kmVec3LengthSq(const kmVec3* pIn); /** Returns the square of the length of the vector */
-CC_DLL kmVec3* kmVec3Normalize(kmVec3* pOut, const kmVec3* pIn); /** Returns the vector passed in set to unit length */
-CC_DLL kmVec3* kmVec3Cross(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2); /** Returns a vector perpendicular to 2 other vectors */
-CC_DLL kmScalar kmVec3Dot(const kmVec3* pV1, const kmVec3* pV2); /** Returns the cosine of the angle between 2 vectors */
-CC_DLL kmVec3* kmVec3Add(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2); /** Adds 2 vectors and returns the result */
-CC_DLL kmVec3* kmVec3Subtract(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2); /** Subtracts 2 vectors and returns the result */
-CC_DLL kmVec3* kmVec3Transform(kmVec3* pOut, const kmVec3* pV1, const struct kmMat4* pM); /** Transforms a vector (assuming w=1) by a given matrix */
-CC_DLL kmVec3* kmVec3TransformNormal(kmVec3* pOut, const kmVec3* pV, const struct kmMat4* pM);/**Transforms a 3D normal by a given matrix */
-CC_DLL kmVec3* kmVec3TransformCoord(kmVec3* pOut, const kmVec3* pV, const struct kmMat4* pM); /**Transforms a 3D vector by a given matrix, projecting the result back into w = 1. */
-CC_DLL kmVec3* kmVec3Scale(kmVec3* pOut, const kmVec3* pIn, const kmScalar s); /** Scales a vector to length s */
-CC_DLL int kmVec3AreEqual(const kmVec3* p1, const kmVec3* p2);
-CC_DLL kmVec3* kmVec3InverseTransform(kmVec3* pOut, const kmVec3* pV, const struct kmMat4* pM);
-CC_DLL kmVec3* kmVec3InverseTransformNormal(kmVec3* pOut, const kmVec3* pVect, const struct kmMat4* pM);
-CC_DLL kmVec3* kmVec3Assign(kmVec3* pOut, const kmVec3* pIn);
-CC_DLL kmVec3* kmVec3Zero(kmVec3* pOut);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* VEC3_H_INCLUDED */
diff --git a/cocos2dx/kazmath/include/kazmath/vec4.h b/cocos2dx/kazmath/include/kazmath/vec4.h
deleted file mode 100644
index 7956d2a..0000000
--- a/cocos2dx/kazmath/include/kazmath/vec4.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-Copyright (c) 2008, Luke Benstead.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef VEC4_H_INCLUDED
-#define VEC4_H_INCLUDED
-
-#include "platform/CCPlatformMacros.h"
-#include "utility.h"
-
-struct kmMat4;
-
-#pragma pack(push) /* push current alignment to stack */
-#pragma pack(1) /* set alignment to 1 byte boundary */
-
-typedef struct kmVec4 {
- kmScalar x;
- kmScalar y;
- kmScalar z;
- kmScalar w;
-} kmVec4;
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-CC_DLL kmVec4* kmVec4Fill(kmVec4* pOut, kmScalar x, kmScalar y, kmScalar z, kmScalar w);
-CC_DLL kmVec4* kmVec4Add(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2);
-CC_DLL kmScalar kmVec4Dot(const kmVec4* pV1, const kmVec4* pV2);
-CC_DLL kmScalar kmVec4Length(const kmVec4* pIn);
-CC_DLL kmScalar kmVec4LengthSq(const kmVec4* pIn);
-CC_DLL kmVec4* kmVec4Lerp(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2, kmScalar t);
-CC_DLL kmVec4* kmVec4Normalize(kmVec4* pOut, const kmVec4* pIn);
-CC_DLL kmVec4* kmVec4Scale(kmVec4* pOut, const kmVec4* pIn, const kmScalar s); ///< Scales a vector to length s
-CC_DLL kmVec4* kmVec4Subtract(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2);
-CC_DLL kmVec4* kmVec4Transform(kmVec4* pOut, const kmVec4* pV, const struct kmMat4* pM);
-CC_DLL kmVec4* kmVec4TransformArray(kmVec4* pOut, unsigned int outStride,
- const kmVec4* pV, unsigned int vStride, const struct kmMat4* pM, unsigned int count);
-CC_DLL int kmVec4AreEqual(const kmVec4* p1, const kmVec4* p2);
-CC_DLL kmVec4* kmVec4Assign(kmVec4* pOut, const kmVec4* pIn);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // VEC4_H_INCLUDED
diff --git a/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h b/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h
deleted file mode 100644
index 5a92eb1..0000000
--- a/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CCKEYPAD_DELEGATE_H__
-#define __CCKEYPAD_DELEGATE_H__
-
-
-#include "cocoa/CCObject.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup input
- * @{
- * @js NA
- * @lua NA
- */
-
-class CC_DLL CCKeypadDelegate
-{
-public:
- // The back key clicked
- virtual void keyBackClicked() {}
-
- // The menu key clicked. only available on wophone & android
- virtual void keyMenuClicked() {};
-};
-
-/**
- * @brief
- * CCKeypadHandler
- * Object than contains the CCKeypadDelegate.
- * @js NA
- * @lua NA
- */
-class CC_DLL CCKeypadHandler : public CCObject
-{
-public:
- virtual ~CCKeypadHandler(void);
-
- /** delegate */
- CCKeypadDelegate* getDelegate();
- void setDelegate(CCKeypadDelegate *pDelegate);
-
- /** initializes a CCKeypadHandler with a delegate */
- virtual bool initWithDelegate(CCKeypadDelegate *pDelegate);
-
-public:
- /** allocates a CCKeypadHandler with a delegate */
- static CCKeypadHandler* handlerWithDelegate(CCKeypadDelegate *pDelegate);
-
-protected:
- CCKeypadDelegate* m_pDelegate;
-};
-
-// end of input group
-/// @}
-
-NS_CC_END
-
-#endif // __CCKEYPAD_DELEGATE_H__
diff --git a/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h b/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h
deleted file mode 100644
index 87d321c..0000000
--- a/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010 cocos2d-x.org
-
-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.
-****************************************************************************/
-
-#ifndef __CCKEYPAD_DISPATCHER_H__
-#define __CCKEYPAD_DISPATCHER_H__
-
-#include "CCKeypadDelegate.h"
-#include "cocoa/CCArray.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup input
- * @{
- */
-
-typedef enum {
- // the back key clicked msg
- kTypeBackClicked = 1,
- kTypeMenuClicked,
-} ccKeypadMSGType;
-
-struct _ccCArray;
-/**
-@class CCKeypadDispatcher
-@brief Dispatch the keypad message from the phone
-@js NA
-@lua NA
-*/
-class CC_DLL CCKeypadDispatcher : public CCObject
-{
-public:
- CCKeypadDispatcher();
- ~CCKeypadDispatcher();
-
- /**
- @brief add delegate to concern keypad msg
- */
- void addDelegate(CCKeypadDelegate* pDelegate);
-
- /**
- @brief remove the delegate from the delegates who concern keypad msg
- */
- void removeDelegate(CCKeypadDelegate* pDelegate);
-
- /**
- @brief force add the delegate
- */
- void forceAddDelegate(CCKeypadDelegate* pDelegate);
-
- /**
- @brief force remove the delegate
- */
- void forceRemoveDelegate(CCKeypadDelegate* pDelegate);
-
- /**
- @brief dispatch the key pad msg
- */
- bool dispatchKeypadMSG(ccKeypadMSGType nMsgType);
-
-protected:
-
- CCArray* m_pDelegates;
- bool m_bLocked;
- bool m_bToAdd;
- bool m_bToRemove;
-
- struct _ccCArray *m_pHandlersToAdd;
- struct _ccCArray *m_pHandlersToRemove;
-};
-
-// end of input group
-/// @}
-
-NS_CC_END
-
-#endif //__CCKEYPAD_DISPATCHER_H__
diff --git a/cocos2dx/label_nodes/CCLabelAtlas.h b/cocos2dx/label_nodes/CCLabelAtlas.h
deleted file mode 100644
index 600a6d4..0000000
--- a/cocos2dx/label_nodes/CCLabelAtlas.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-****************************************************************************/
-#ifndef __CCLABEL_ATLAS_H__
-#define __CCLABEL_ATLAS_H__
-
-#include "base_nodes/CCAtlasNode.h"
-
-NS_CC_BEGIN
-
-/**
- * @addtogroup GUI
- * @{
- * @addtogroup label
- * @{
- */
-
-/** @brief CCLabelAtlas is a subclass of CCAtlasNode.
-
-It can be as a replacement of CCLabel since it is MUCH faster.
-
-CCLabelAtlas versus CCLabel:
-- CCLabelAtlas is MUCH faster than CCLabel
-- CCLabelAtlas "characters" have a fixed height and width
-- CCLabelAtlas "characters" can be anything you want since they are taken from an image file
-
-A more flexible class is CCLabelBMFont. It supports variable width characters and it also has a nice editor.
-*/
-class CC_DLL CCLabelAtlas : public CCAtlasNode, public CCLabelProtocol
-{
-public:
- /**
- * @js ctor
- * @lua NA
- */
- CCLabelAtlas()
- :m_sString("")
- {}
- /**
- * @js NA
- * @lua NA
- */
- virtual ~CCLabelAtlas()
- {
- m_sString.clear();
- }
-
- /** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
- static CCLabelAtlas * create(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
-
- /** creates the CCLabelAtlas with a string and a configuration file
- @since v2.0
- @js _create
- */
- static CCLabelAtlas* create(const char *string, const char *fntFile);
-
- /** initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
- bool initWithString(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
-
- /** initializes the CCLabelAtlas with a string and a configuration file
- @since v2.0
- */
- bool initWithString(const char *string, const char *fntFile);
-
- /** initializes the CCLabelAtlas with a string, a texture, the width and height in points of each element and the starting char of the atlas */
- bool initWithString(const char* string, CCTexture2D* texture, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
-
- // super methods
- virtual void updateAtlasValues();
- virtual void setString(const char *label);
- virtual const char* getString(void);
-
-#if CC_LABELATLAS_DEBUG_DRAW
- virtual void draw();
-#endif
-
-protected:
- // string to render
- std::string m_sString;
- // the first char in the charmap
- unsigned int m_uMapStartChar;
-};
-
-// end of GUI group
-/// @}
-/// @}
-
-
-NS_CC_END
-
-#endif //__CCLABEL_ATLAS_H__
diff --git a/cocos2dx/label_nodes/CCLabelBMFont.h b/cocos2dx/label_nodes/CCLabelBMFont.h
deleted file mode 100644
index f8d9b5f..0000000
--- a/cocos2dx/label_nodes/CCLabelBMFont.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/****************************************************************************
-Copyright (c) 2010-2012 cocos2d-x.org
-Copyright (c) 2008-2010 Ricardo Quesada
-Copyright (c) 2011 Zynga Inc.
-
-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.
-
-Use any of these editors to generate BMFonts:
- http://glyphdesigner.71squared.com/ (Commercial, Mac OS X)
- http://www.n4te.com/hiero/hiero.jnlp (Free, Java)
- http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java)
- http://www.angelcode.com/products/bmfont/ (Free, Windows only)
-
-****************************************************************************/
-#ifndef __CCBITMAP_FONT_ATLAS_H__
-#define __CCBITMAP_FONT_ATLAS_H__
-
-#include "sprite_nodes/CCSpriteBatchNode.h"
-#include "support/data_support/uthash.h"
-#include