James Gregory
25bded7faf
Now validates as asm.js: Disable HttpClient, pthread_cond_signal and eglReleaseThread in Emscripten.
2013-05-07 17:25:39 -07:00
James Gregory
a33e2965af
Add libwebp linkage (needed for asm.js validation)
2013-05-07 17:24:24 -07:00
Ed Bartley
3ff7e5871c
Added function ccSetPvrEncryptionKey(…) to set the encryption key in a single function call.
...
Updated the TextureAtlasEncryptionTest to show how to use the ccSetPvrEncryptionKey(…) function.
Updated the notes and header docs for improved clarity.
2013-05-07 10:14:38 -04:00
danielhaaser
8acf2644b6
Fix incorrect colors in CCDrawNode.
2013-05-07 10:15:50 -03:00
James Chen
70472d558d
Merge pull request #2430 from imbahom/master
...
Fix a typo in CCNode.cpp.
2013-05-07 01:48:31 -07:00
James Chen
c45ebfa628
Merge pull request #2422 from brawsome/master
...
fixed #2127 : Adding CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging.
The PR has fix two issues:
1) Added additional CCLOG to CCFileUtils::fullPathForFilename:
There's currently no way to be sure, from a calling function, that
fullPathForFilename has returned an invalid file path, which makes it
difficult to quickly track down missing, or incorrect file paths. Added
a CCLOG before the original string is returned to make debugging
missing or incorrect file paths easier.
2) Optmization to ccArrayGetIndexOfObject …
Optimized loop of ccArrayGetIndexOfObject to remove the overhead of 3
pointer dereferences per iteration, and pre-increment the int for
speed. If this function is called a lot, and with a large list, this
will result in a good performance win.
This can probably be done with just pointers, but I haven't taken the
time to validate all function calls to make sure it would be
appropriate. Though I can guarantee that if this worked fine before, it
will work fine with this change.
2013-05-07 01:40:57 -07:00
James Chen
288838ec92
Fixing compilation errors.
2013-05-07 15:51:58 +08:00
minggo
26bdc459d3
Merge pull request #2143 from CodeSnooker/master
...
Added Method to create a CCMenuItemToggle from a CCArray with a target selector
2013-05-07 00:26:56 -07:00
James Gregory
0630e15475
Merge remote-tracking branch 'origin/master' into emscriptenate
2013-05-06 23:56:16 -07:00
minggo
d58f21dc76
Merge pull request #2521 from minggo/emscriptenate
...
fix conflict of #2050
2013-05-06 23:51:38 -07:00
James Chen
eb936b0feb
Merge pull request #2522 from dumganhar/fix-building-error
...
Fix compilation errors for linux port.
2013-05-06 23:39:18 -07:00
James Chen
2418e72a0e
Fix compilation errors for linux port.
2013-05-07 14:36:01 +08:00
minggo
1166a02e13
resolve conflict for #2505
2013-05-07 14:31:00 +08:00
minggo
90b8dfd383
Merge pull request #2504 from wagaf-d/ccpchanges
...
Move ccpX functions to CCPoint methods and operators
2013-05-06 23:22:21 -07:00
minggo
ea5d7bc5ad
Merge pull request #2361 from tiantian20007/dictStuff
...
Implement CCDictionary::writeToFile();
2013-05-06 23:17:11 -07:00
James Gregory
c7ac6b9d01
Add libjpeg linkage.
2013-05-06 22:28:13 -07:00
Adrien Béraud
16d2b5a957
Assert that the user does not divide by 0 in CCPoint and CCSize
2013-05-07 14:58:43 +10:00
Adrien Béraud
ca4c2edc29
Clarify CCPoint::rotate & unrotate documentation
2013-05-07 14:36:17 +10:00
James Gregory
ce2d97c848
Simplify Emscripten makefile a little.
2013-05-06 21:30:03 -07:00
James Gregory
a285117aca
Disable unsafe GL opts, enable -O2
2013-05-06 21:29:45 -07:00
James Gregory
7b04e6b0e7
Implement primitive drawing methods for Emscripten
2013-05-06 21:29:44 -07:00
James Gregory
92e4c76f20
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 21:29:44 -07:00
James Gregory
fa77e6ede2
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 21:29:44 -07:00
James Gregory
29cfe512a3
Remove debug print statement
2013-05-06 21:29:44 -07:00
James Gregory
41b5cfebb6
Add warning messages if any of the raw primitive drawing methods are used (they seem not to be, in pratice).
2013-05-06 21:29:43 -07:00
James Gregory
36fc2ecf99
Get CCGrid to work.
2013-05-06 21:29:43 -07:00
James Gregory
f386272486
Add method to CCNode class to allow uploading data to GPU. Call it from CCSprite.
2013-05-06 21:29:43 -07:00
James Gregory
9ae67ff78a
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 21:25:47 -07:00
James Gregory
ff1e0aefa0
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 21:25:47 -07:00
James Gregory
0c8f7dd608
Enable texture caching with emscripten.
2013-05-06 21:23:06 -07:00
James Gregory
235b80e7f8
Get CCGrid to work.
2013-05-06 21:22:34 -07:00
James Gregory
7a3875b99d
Point Emscripten root to be the external referenced by the tree.
2013-05-06 21:17:22 -07:00
James Gregory
2b8efda0f4
Use floats instead of doubles for Chipmunk.
2013-05-06 21:17:22 -07:00
James Gregory
de9df010c3
Enable texture cache on Emscripten. Not sure yet if this is the best balance, since we're both short on memory *and* compute time.
2013-05-06 21:17:22 -07:00
James Gregory
062a5eefd8
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 21:13:21 -07:00
James Gregory
6c828bbe4f
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 21:13:21 -07:00
James Gregory
809b77d632
Get CCGrid to work.
2013-05-06 21:08:28 -07:00
James Gregory
4fb6b406ce
Add libtiff to Emscripten builds, plus some build flags.
2013-05-06 21:00:39 -07:00
James Gregory
735280572a
Add libtiff build -- build with straight emconfigure, emmake, with a troublesome assert removed (assert(sizeof(uint64) == 8)).
2013-05-06 21:00:39 -07:00
James Gregory
82c6f68593
Set orientation to 0 for Emscripten, thus avoiding a segfault.
2013-05-06 21:00:38 -07:00
James Gregory
4d4b638531
Switch to O1 for now.
2013-05-06 21:00:38 -07:00
James Gregory
d529287cfa
Remove LOG prefixes from emscripten makefiles
2013-05-06 21:00:38 -07:00
James Gregory
3829a5741b
Fix the ordering of vertex attributes for CCProgressTimer.
2013-05-06 21:00:38 -07:00
James Gregory
130647d97f
Implement primitive drawing methods for Emscripten
2013-05-06 21:00:38 -07:00
James Gregory
16e9598a54
Enable -O2 optimization now that Emscripten seems to succeed.
2013-05-06 20:59:50 -07:00
James Gregory
5b8494199e
Rebuild libfreetype without references to my home dir in it.
2013-05-06 20:59:50 -07:00
James Gregory
3077190e29
Add note on origin of libxml binary.
2013-05-06 20:59:49 -07:00
James Gregory
81ded66016
Don't set animation interval on emscripten builds since that is driven by the request frame API.
2013-05-06 20:59:49 -07:00
James Gregory
9d775d136b
Add libxml2 build for Emscripten.
2013-05-06 20:59:49 -07:00
James Gregory
e3dc808a7c
Remove redundant -l flags from emscripten build -- it doesn't have fontconfig, and GL stuff is linked in automatically.
2013-05-06 20:59:48 -07:00
James Gregory
5bac7b52ac
Move GL server-side buffer code into a separate class and use multiple inheritance to deploy only to classes that need it.
2013-05-06 20:59:48 -07:00
James Gregory
a9c8d99a4c
Switch to using GL_DYNAMIC_DRAW.
2013-05-06 20:59:48 -07:00
James Gregory
872df86f84
Remove debug print statement
2013-05-06 20:59:48 -07:00
James Gregory
3546534a66
Switch makefile over to using Emscripten headers for freetype.
2013-05-06 20:59:48 -07:00
James Gregory
8a9586fd9d
More client side buffer fixes.
2013-05-06 20:59:48 -07:00
James Gregory
91ea64db09
More client side buffer fixes.
2013-05-06 20:59:48 -07:00
James Gregory
9352b8b359
More client side buffer fixes.
2013-05-06 20:59:48 -07:00
James Gregory
f35e32d158
Add warning messages if any of the raw primitive drawing methods are used (they seem not to be, in pratice).
2013-05-06 20:59:48 -07:00
James Gregory
5295202081
Add freetype2 headers that match the .a we're using.
2013-05-06 20:59:47 -07:00
James Gregory
d52aa420e8
Switch to slot-based GL buffer loading code for CCSprite.
2013-05-06 20:59:47 -07:00
James Gregory
87daf9d3eb
Add missing Makefile reference to file utils for Emscripten.
2013-05-06 20:59:47 -07:00
James Gregory
764dffc822
Increase heap size for Emscripten binaries, add in missing linkages.
2013-05-06 20:59:47 -07:00
James Gregory
5138fb66fd
Add pre-build dependencies for Emscripten libpng, libz.
2013-05-06 20:59:47 -07:00
James Gregory
7d563a818a
Hack: use 800x500 resolution for window for emscripten so that mouse roughly lines up.
2013-05-06 20:59:47 -07:00
James Gregory
19c6a50d50
Enable texture caching with emscripten.
2013-05-06 20:59:46 -07:00
James Gregory
a1c628f80a
Fix Motion streak client side buffers
2013-05-06 20:58:46 -07:00
James Gregory
edcd0f12e4
Add platform files for Emscripten.
2013-05-06 20:58:46 -07:00
James Gregory
9500448f87
Get CCGrid to work.
2013-05-06 20:58:46 -07:00
James Gregory
089a47d937
Add method to CCNode class to allow uploading data to GPU. Call it from CCSprite.
2013-05-06 20:58:45 -07:00
James Gregory
aa2739a109
Update build process for HelloCpp to build .js and .data files separately, pulling both in from index.html
2013-05-06 20:58:45 -07:00
James Gregory
77e9f4902e
Build fixes for emscripten, add linkage to libfreetype.a
2013-05-06 20:58:45 -07:00
James Gregory
1d307d676d
Remove freetype source and add libfreetype.a as built by the Emscripten test-suite.
...
Revert "Add freetype 2.4.11 to repo"
This reverts commit 418906d2612b59ead6826d8395b69168bdff0ca4.
2013-05-06 20:58:45 -07:00
James Gregory
955ba1bfd3
ifdef tango around some symbols that aren't defined in Emscripten (nor a bunch of other platforms, it seems).
2013-05-06 20:58:43 -07:00
James Gregory
4f56f93269
Add #defines for Emscripten platform
2013-05-06 20:58:43 -07:00
James Gregory
c45e5797cf
Add Makefiles for Emscripten + Emscripten external
2013-05-06 20:58:02 -07:00
minggo
80dfd4d493
Merge pull request #2407 from sergey-shambir/attribute_format
...
Added __attribute__(__format__()) for CCLog and CCString
2013-05-06 20:06:52 -07:00
Sam Clegg
4f6de1bcad
Rename CCScriptSupport::executeAssert -> CCScriptSupport::handleAssert
...
Also remove the first "cond" argument, since it is always false.
2013-05-06 12:25:13 -07:00
Sam Clegg
e699919bc6
Log assert messages
...
Now, assert messages as visible in the trace output
as well as the line number of condition that failed.
2013-05-06 12:25:13 -07:00
Adrien Béraud
6a5559da7f
Check for 0 length in CCPoint::normalize()
2013-05-07 03:15:28 +10:00
Adrien Béraud
f71798a35b
Check for 0 length in CCPoint::normalize()
2013-05-07 02:59:38 +10:00
Adrien Béraud
49474f5194
documentation
2013-05-07 02:53:13 +10:00
Ed Bartley
040e6fc5b9
Promote global functions and variables for PVR decryption to ZipUtils class.
...
Rename PVR decryption functions and variables to better fit in the Cocos2DX framework.
Improve log error notes.
Update TextureAtlasEncryptionTest to match revised function call in ZipUtils.
Update ccSetPvrEncryptionKeyPart documentation to clarify that encryption is never 100% secure.
2013-05-06 10:04:45 -04:00
minggo
d395d26e1d
Merge pull request #2417 from sergey-shambir/disable_copy
...
Added CC_DISABLE_COPY macro
2013-05-06 03:02:48 -07:00
minggo
bbf0f9d1bd
Merge pull request #2513 from savdalion/const-methods
...
Added const methods for classes - purer code!
2013-05-05 23:55:37 -07:00
James Chen
fead37eab3
fixed #2105 : Adding Travis build support for linux and NaCl.
2013-05-06 10:55:39 +08:00
Adrien Béraud
3661e34695
Bug fix: width and height reversed in CCSize operators
2013-05-05 19:51:44 +10:00
Romain Tisserand
d2690d8942
Fix iOS 4.3 JPEG loading (darken picture, alpha issue)
2013-05-04 19:14:23 +02:00
Adrien Béraud
637cc1a9ed
CCPoint::getDistance() implemented, CCPoint::length() renamed to getLength(), bug fixes
2013-05-05 02:58:46 +10:00
minggo
1a0db3749e
Merge pull request #2496 from mchinen/mchinensedit
...
Fix missing protocol method warning for iOS 6.0 addition
2013-05-04 08:55:07 -07:00
savdalion
5f549dd011
Added const modifier for classes CCArray, CCObject - fine code!
2013-05-04 15:05:06 +03:00
Adrien Béraud
6fb586028e
Revert unrelated change commited by mistake
2013-05-04 17:20:59 +10:00
Adrien Béraud
b9fe35901a
Moved most CCPointExtension functions to CCPoint OO-equivalents
2013-05-04 17:18:22 +10:00
Ricardo Quesada
ea30d21799
updates Xcode project to detect more warnings
2013-05-03 11:59:44 -07:00
Michael Chinen
d47759cc32
EAGLView.mm: fix indent
2013-05-03 19:46:58 +09:00
Adrien Béraud
b34dc25346
Cleaner constructors and overloads for CCSize; Cross-assignement and conversion constructors between CCPoint and CCSize.
2013-05-03 13:24:52 +10:00
Adrien Béraud
b627cd4674
overloading operators +-*/ in CCPoint
2013-05-02 15:13:03 +10:00
Adrien Béraud
9fb0081add
direct constructor for CCPoint
2013-05-02 14:59:50 +10:00
Darragh Coy
212feb8d8c
Add CCDirector::popToSceneStackLevel(int level)
...
This replicates a change made to cocos2d-iphone in the following commit:
59c5272bff
The cocos2d-iphone change was originally discussed in the following pull request:
http://github.com/cocos2d/cocos2d-x/pull/2210
2013-04-30 23:33:22 +01:00
Michael Chinen
be2f20e213
Fix missing protocol method warning for iOS 6.0 addition
2013-05-01 00:35:17 +09:00
minggo
d1506326ba
Merge pull request #2484 from sergey-shambir/bit_more_verbose
...
Logging: More verbose output in removeChildByTag and getActionByTag
2013-04-29 08:06:53 -07:00