Lee, Jae-Hong
d83ed86739
Implementing foreground and background status and modify CocosDenshion comment.
2013-05-21 22:48:51 +09:00
Lee, Jae-Hong
4b248d5f8c
Delete Tizen 2.0 headers and libraries.
2013-05-21 21:52:10 +09:00
Lee, Jae-Hong
6f34c7cb46
Support Tizen 2.1 SDK.
2013-05-21 21:22:31 +09:00
minggo
0857fdd599
issue #2188:fix compiling error of iOS
2013-05-21 18:18:44 +08:00
minggo
cc2b00e9fe
Merge pull request #2573 from j4m3z0r/emscriptenate
...
Use browser font rendering instead of FreeType
2013-05-20 22:50:28 -07:00
James Gregory
da7113a04f
Implement audio for Emscripten using SDL. Still needs methods to release samples when we're done with them.
2013-05-20 20:09:56 -07:00
James Chen
acef98a350
Merge pull request #2572 from pyrasis/tizen
...
fixed #2185 : Cocos2d-x Tizen support.
2013-05-20 20:08:28 -07:00
minggo
e7d9e09a44
Merge pull request #2586 from silverscania/master
...
Bug in previous modifications made to GL_UNPACK_ALIGNMENT
2013-05-20 18:59:03 -07:00
Lee, Jae-Hong
5faa5e92af
Modify getWritablePath function.
2013-05-21 10:56:18 +09:00
Lee, Jae-Hong
6bb8d58d3a
Update cocos2d project and use float.h
2013-05-21 10:32:34 +09:00
Lee, Jae-Hong
73590e57f6
Set relative include path.
2013-05-21 09:55:33 +09:00
Nicolas Gramlich
cef2575180
Updated .classpath of Android project to latest ADT 22 build tool compatibility.
...
Changes correspond to: https://groups.google.com/forum/?fromgroups#!msg/adt-dev/epOfZbKPFdk/RbR2VYNQ5_8J
2013-05-20 14:39:25 -06:00
silverscania
1d23f1a2b4
The real cause of the problem for the texture corruption was when using textures with no alpha.
...
The function bitsPerPixelForFormat returns the wrong number for RGB_888.
2013-05-19 18:53:59 +03:00
silverscania
5adb4bc895
For some non power of two textures, even if the row alignment was 8, 4 or 2, setting this resulted in corruption.
...
See ddafa42850 (commitcomment-3243089)
for texture example.
Fix by setting alignment to 1 for ALL non-PO2 textures.
2013-05-19 15:17:48 +03:00
silverscania
1973a52fbe
Revert "Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1"
...
This was not the correct fix.
This reverts commit 110ea5a501
.
2013-05-19 15:12:39 +03:00
silverscania
110ea5a501
Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1
2013-05-19 13:55:20 +03:00
James Gregory
391fb636fa
Add a flag to indicate whether raw image data is pre-multiplied or not, and switch to using Emscripten's SDL implementation when loading images from file (much faster)
2013-05-17 17:11:52 -07:00
James Gregory
7cca63130c
Pre-multiply text when rendered by Emscripten's SDL implementation (since HTML5 canvas is non-pre-multiplied).
2013-05-17 17:10:51 -07:00
James Gregory
ae5454cffc
Remove SDL code from texture cache, and move all image loading code to CCImage.
2013-05-17 17:09:28 -07:00
James Gregory
2bcbf5c2b8
Coordinates are already in terms of pixels -- no need to do content scaling
2013-05-17 17:08:46 -07:00
Ricardo Quesada
ba12022134
Grid setProjection2D fix
...
It doesn't multiply it by the CC_CONTENT_SCALE_FACTOR().
Not needed since it is CCDirector::getWinSizeInPixels() already has it
calculated
2013-05-17 15:30:19 -07:00
James Gregory
a1ff189854
Query the GL canvas for its width and height and use that rather than hardcoding it. Default the frame size to the whole canvas, and update the samples to use iPad resolution (1024x768).
2013-05-17 12:39:18 -07:00
Lee, Jae-Hong
900190e468
Replace tab to spaces.
2013-05-17 22:04:39 +09:00
James Gregory
95b5ce2e56
Remove freetype since it now works using Emscripten's SDL.
2013-05-16 17:34:33 -07:00
Lee, Jae-Hong
0ae6da81bd
Include CCGL.h
2013-05-16 20:40:49 +09:00
Lee, Jae-Hong
43b11a73d6
Remove unused headers and defines.
2013-05-16 20:24:00 +09:00
Lee, Jae-Hong
fb00de3e97
Implementing screen orientation function.
2013-05-16 20:17:11 +09:00
Lee, Jae-Hong
e1cf030372
Change the default font path.
2013-05-16 20:16:57 +09:00
Lee, Jae-Hong
6072c9291f
Adding libcocos2d.a project for Tizen.
2013-05-16 20:11:48 +09:00
Lee, Jae-Hong
f47958356c
Adding dependencies for libcurl.so
2013-05-16 20:09:23 +09:00
Lee, Jae-Hong
659e884009
Use CCImage.cpp from Linux implementation.
2013-05-16 20:07:31 +09:00
Lee, Jae-Hong
e459129fac
Move to rootstraps directory.
2013-05-16 20:06:25 +09:00
Lee, Jae-Hong
8915e90a36
Adding CCDevice.cpp for Tizen.
2013-05-16 20:05:04 +09:00
Lee, Jae-Hong
0ba2a82d35
Set return value.
2013-05-16 20:04:51 +09:00
Lee, Jae-Hong
434878c736
Delete libcurl.a because link error. Adding libcurl.so.
2013-05-16 20:04:06 +09:00
Lee, Jae-Hong
109e2feec8
Adding libcurl headers and x86 libraries for tizen.
2013-05-16 20:03:11 +09:00
Lee, Jae-Hong
ce4663f851
Implementing file utils use with Osp.
2013-05-16 20:01:36 +09:00
Lee, Jae-Hong
704b8013fc
Fix Assert bug.
2013-05-16 20:01:01 +09:00
Lee, Jae-Hong
e51fe4f75e
Define CC_ASSERT.
2013-05-16 19:59:38 +09:00
Lee, Jae-Hong
d887b3cd84
Implementing getCurrentLanguage function.
2013-05-16 19:59:16 +09:00
Lee, Jae-Hong
0bd49de547
Implementing Animation Interval setting.
2013-05-16 19:58:46 +09:00
Lee, Jae-Hong
b011bd2904
Implementing touch.
2013-05-16 19:58:14 +09:00
Lee, Jae-Hong
d66abaa12c
Implementing Termination.
2013-05-16 19:57:47 +09:00
Lee, Jae-Hong
3856c94416
Modify header define.
2013-05-16 19:57:17 +09:00
Lee, Jae-Hong
ab8ede5ff8
Adding Osp Application, Osp Form Layer and implementing CCEGLView.
2013-05-16 19:55:26 +09:00
Lee, Jae-Hong
86bf779812
Adding third party headers and x86 libraries for Tizen.
2013-05-16 19:54:01 +09:00
Lee, Jae-Hong
58b181736d
Adding platform code for Tizen.
2013-05-16 19:53:37 +09:00
Lee, Jae-Hong
27428dc5f4
Adding defines and enums for Tizen.
2013-05-16 19:49:16 +09:00
flamingo
3686107313
Update CCTexture2D.cpp
...
Fixed compilation error on MSVC compiler
2013-05-16 12:58:35 +04:00
minggo
1412eeefd1
Merge pull request #1893 from martell/mingw
...
Added Mingw-crt Support without breaking VS SDK
2013-05-15 23:30:43 -07:00
James Gregory
d1922b6086
Add experimental (and currently disabled) code for using SDL to load texture data. If I can iron out the kinks, it should be a lot faster.
2013-05-15 20:22:43 -07:00
James Gregory
bdbab7f5cf
TTF rendering via SDL now seems to basically work. Not perfect yet, but seems to be about 3X faster on Chrome.
2013-05-15 20:21:30 -07:00
James Gregory
82f1a8e8ff
Re-enable mouse-handling.
2013-05-15 20:21:02 -07:00
carlo morgantini
a3f5238407
fix a warning caused by member variables initialization order in constructor
2013-05-15 16:37:08 -07:00
carlo morgantini
fb2a73048d
it now shares code between createTextBitmap and createTextBitmapShadowStroke (no more duplication)
2013-05-15 16:37:08 -07:00
carlo morgantini
4d3ed48905
initWithStringShadowStroke() renamed to initWithString()
2013-05-15 16:37:08 -07:00
carlo morgantini
c9e875869e
comment fixed
2013-05-15 16:37:08 -07:00
carlo morgantini
3c28048c14
fix alignent problem when rendering text with shadow
2013-05-15 16:37:08 -07:00
carlo morgantini
0ff33fd4f5
fix a problem with float stroke size
2013-05-15 16:37:08 -07:00
carlo morgantini
3b50ffe5ba
Fix problem with CCLabelTTF + shadow and text alignment; also fontDefinition property names now are lowercase
2013-05-15 16:37:08 -07:00
carlo morgantini
d77604b958
initWithStringAndTextDefinition() changed method's signature
2013-05-15 16:37:08 -07:00
carlo morgantini
04c890522d
class renamed and moved to ccTypes.h
2013-05-15 16:35:25 -07:00
carlo morgantini
ed981aee7e
ccTextDefinition becomes CCTextDefinition
2013-05-15 16:29:33 -07:00
carlo morgantini
bc9a74218c
added a new utility for comparing 2 ccColor3b
2013-05-15 16:29:33 -07:00
carlo morgantini
d9a53b3eb1
CCLabelTTF new interface for ccBuilder
2013-05-15 16:29:33 -07:00
carlo morgantini
9ba489bba4
new assert() added on unsupported platforms for CCLabelTTF and CCTexture2D
2013-05-15 16:29:33 -07:00
carlo morgantini
74441203cb
stroke and shadow are implemented and supported only on iOS and Android for now
2013-05-15 16:29:33 -07:00
carlo morgantini
fcea506fef
fixed some text formatting issues
2013-05-15 16:29:33 -07:00
carlo morgantini
54347bf767
setFontTintColor renamed to setFontFillColor
2013-05-15 16:29:33 -07:00
carlo morgantini
7bc3ceb8c8
uses const ccColor & in the interface instead of ccColor&
2013-05-15 16:29:33 -07:00
carlo morgantini
c727fa33c0
CCLabelTTF have now a tint, plus bug fixing and code clean up
2013-05-15 16:29:33 -07:00
carlo morgantini
221884f6d4
better CCTexture2D API for init texture with shadow and stroke
2013-05-15 16:29:32 -07:00
carlo morgantini
fc846bb9ac
label TTF stroke and shadow for Android
2013-05-15 16:29:32 -07:00
carlo morgantini
690d5968ca
New stroke and shadows for Android
2013-05-15 16:12:43 -07:00
carlo morgantini
dd9b4a8932
new shadow and stroke for CCLabelTTF
2013-05-15 16:12:43 -07:00
James Gregory
ab2d94c040
First pass at using SDL to render fonts instead of FreeType.
2013-05-14 21:38:56 -07:00
James Gregory
0daa3adfd6
Emscripten changed ABI for .a files. Rebuild all deps, updating to current version. Switch Emscripten to incoming branch as it's not working on master right now. Added simple script for rebuilding deps in case it becomes necessary again. Switch builds to always use -g flag, per Emscripten's warnings. Undefine native client defines so that it builds (Emscripten switched to NaCl alignment, macro got defined as a side-effect).
2013-05-14 15:26:48 -07:00
James Gregory
de1a6340da
Add my hacky script to rebuild dependencies, in case this is needed again in the future.
2013-05-14 15:14:54 -07:00
James Chen
99664b5998
Merge pull request #2391 from sbc100/log_asserts
...
fixed #2152 : Logging assert messages to the console and renaming CCScriptSupport::executeAssert to CCScriptSupport::handleAssert.
2013-05-13 19:56:28 -07:00
James Chen
cdb3985f0d
fixed #2151 : Commenting a log in CCFileUtils::fullPathForFilename.
2013-05-13 21:48:25 +08:00
James Chen
8fa593a8fe
fixed #2151 : Custom font can't be loaded correctly if using full path of filename.
2013-05-13 19:12:37 +08:00
James Chen
4e3ff65707
Merge branch 'android_custom_font_fix' of git://github.com/DarraghCoy/cocos2d-x into iss2151-customttf
2013-05-13 18:40:14 +08:00
James Chen
fa8daa2ebb
Merge branch 'master' of https://github.com/metalgit92/cocos2d-x into metalgit92-master
2013-05-13 14:03:29 +08:00
minggo
aa5e5661ce
Merge pull request #2551 from silverscania/master
...
Fix for corrupted texture issue: https://github.com/cocos2d/cocos2d-x/issues/2550
2013-05-12 20:36:41 -07:00
minggo
3ebb61a09c
Merge pull request #2543 from FlagellumDei/patch-1
...
centerWindow() fix
2013-05-12 19:44:15 -07:00
Xavier Arias
71df5706bd
Added const to CCNode::getChildrenCount()
2013-05-12 20:45:41 +02:00
silverscania
ddafa42850
Fix for wrong alignment using texture format sizes other than 4 bytes.
...
For example RGBA4444 is 2 bytes per pixel. A texture with width of 1 passes the previous power of 2 test, but the alignment value needs to be 2, not 4.
2013-05-12 18:08:33 +03:00
Xavier Arias Botargues
4d78d102dd
Merge remote-tracking branch 'upstream/master'
2013-05-11 08:55:38 +02:00
James Chen
e3e07b4c1e
Fixing compilation errors for NaCl port.
2013-05-10 16:03:01 +08:00
James Chen
23f23be681
Bug fixes for Nacl port.
2013-05-10 16:02:12 +08:00
James Chen
8ebde4df7f
Merge branch 'data-visitor' of https://github.com/dumganhar/cocos2d-x into iss2142-datavisitor
2013-05-10 15:54:47 +08:00
James Chen
db464530fb
fixed #2142 : updating win32.
2013-05-10 15:46:24 +08:00
James Chen
42427634f2
fixed #2142 : Adding datavisitor support for other platforms except win32.
2013-05-10 15:37:40 +08:00
James Chen
cbafaf67a6
fixed #2142 : Adding CCDataVisitor and Implementing CCPrettyPrinter, iOS port is ok.
2013-05-10 15:07:05 +08:00
Darragh Coy
032aed4499
Fix custom font loading on Android when using fonts that are in resource mapped directories/paths.
...
1: Use the CCFileUtils::fullPathForFilename function to lookup the resolved path for the font in the Android specific function, CCImage::getBitmapFromJava.
2: Remove a warning previously added in pull request 2422 (https://github.com/cocos2d/cocos2d-x/pull/2422 ) in CCFileUtils::fullPathForFilename in order to support change (1) above. If we pass just a system font name to CCFileUtils::fullPathForFilename such as 'Arial' (instead of a path) then it should just return 'Arial' and not generate a warning. We can't assume that when a path (or handle) given to CCFileUtils::fullPathForFilename isn't found within Cocos2dx that it doesn't exist or isn't valid. Depending on the platform there might be files or folders or handles that could be accessible to the app which might exist outside of the knowledge of Cocos2dx. The correct place to warn about missing resource files would be at the point where the resource loading itself fails; e.g if a texture or sound fails to load for example.
2013-05-09 14:29:42 +01:00
Attila Szilágyi
989b0a249c
Fix centerWindow() when the taskbar is located along the top or left screen edge
...
centerWindow() will not center the window correctly when the taskbar is located along the top or left screen edge.
2013-05-09 14:13:24 +03:00
James Chen
bc4bf29f51
Merge pull request #2526 from djh-/master
...
fixed #2140 : The displayed color of CCDrawNode is incorrect when VAO is disabled.
2013-05-09 03:34:49 -07:00
minggo
ee8ec25f6a
Merge pull request #2541 from j4m3z0r/emscriptenate
...
Compile for Emscripten in asm.js mode
2013-05-08 18:53:35 -07:00
Xavier Arias
1c6c13b3e5
Added const to CCNode's getTag & getContentSize
2013-05-09 00:20:08 +02:00
James Gregory
7f03838639
Use asm.js by default.
2013-05-08 14:59:48 -07:00
Ed Bartley
8b55f1285f
Fix ccCArray
2013-05-08 15:22:05 -04:00
minggo
e5155eedca
export ZipUtils
2013-05-08 11:45:27 +08:00
minggo
8e78f8a7eb
Merge branch 'TexturePacker-SpriteSheetProtection' of https://github.com/FlowerpotGames/cocos2d-x into TexturePacker-SpriteSheetProtection
2013-05-08 10:32:26 +08:00
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