Commit Graph

6562 Commits

Author SHA1 Message Date
ivzave fcce930188 repair linux eclipse build & add 64-bit project configurations 2012-12-22 07:14:59 +04:00
dualface cc69e39c8a [luabinding] make CCAssert compatible Lua 2012-12-22 10:13:37 +08:00
ivzave 0538b22300 repair linux cli build 2012-12-22 04:14:15 +04:00
Denis Mingulov ca00d50259 CocosDenshion Android - missing sound effects with some conditions
Android SoundPool.load returns 0 if sound might not be loaded - for
example, it does not exist. Previously - 0 has been ignored and
incorrectly written to HashMap, so it was not possible to
understand on the application side that something goes wrong
(and use some additional workaround).

Use case:
1) On the game loading - preload all possible sound effects
   (to speed up their playing later, when it will be needed)
2) Game APK does not have any sound file, they are downloaded
   later in a separate thread.
3) Application tries to play sound effects as usual, when needed.

So due to this bug - as there was no any sound file exist
during the game loading - internal HashMap contains incorrect
0 as id for every effect, and there is no any sound effect during
the first application start.
2012-12-21 23:15:29 +02:00
minggo 4615a4a1ff Merge pull request #1774 from minggo/iss1603-adjust-directory
issue #1603:modify some path for auto building
2012-12-21 02:07:49 -08:00
James Chen f26ce4fb84 Made sys.localStorage support for jsb, works ok on win32. 2012-12-21 18:07:45 +08:00
minggo 380cadebce issue #1603:modify some path for auto building 2012-12-21 18:06:36 +08:00
minggo a22563b787 Merge pull request #1773 from minggo/iss1603-adjust-directory
issue #1603:modify path of cocos2d-x
2012-12-21 01:42:17 -08:00
minggo b0e752eac3 issue #1603:modify path of cocos2d-x 2012-12-21 17:40:54 +08:00
minggo d726b35eb8 Merge pull request #1772 from minggo/iss1603-adjust-directory
issue #1603:change pathes of android codes
2012-12-21 01:29:32 -08:00
minggo 89fb58e791 issue #1603:change pathes of android codes 2012-12-21 17:28:14 +08:00
minggo b457d19523 Merge pull request #1771 from minggo/iss1603-adjust-directory
issue #1603: modify some pathes
2012-12-20 23:06:28 -08:00
minggo 9beac15305 issue #1603: modify some pathes 2012-12-21 15:05:22 +08:00
minggo 686111ed20 Merge pull request #1770 from minggo/iss1603-adjust-directory
issue #1536:add permissions and modify module path error
2012-12-20 22:42:00 -08:00
minggo f71f13fc53 issue #1536:add permissions and modify module path error 2012-12-21 14:40:34 +08:00
minggo 504c3acba7 Merge pull request #1769 from minggo/iss1603-adjust-directory
issue #1603:modify pathes for auto test
2012-12-20 22:07:28 -08:00
minggo 7b81217c3c issue #1603:modify pathes for auto test 2012-12-21 14:06:20 +08:00
minggo f34e9b8ae0 Merge pull request #1768 from minggo/iss1603-adjust-directory
Iss1603 adjust directory
2012-12-20 18:56:58 -08:00
minggo f23f69088c Merge pull request #4 from dumganhar/iss1603-adjust-directory
issue #1603: Updated TestLua project setting for iOS port.
2012-12-20 18:41:29 -08:00
James Chen e670d702a8 issue #1603: Updated TestLua project setting for iOS port. 2012-12-20 21:58:26 +08:00
James Chen a36446cba2 Merge branch 'iss1603-adjust-directory' of https://github.com/minggo/cocos2d-x into iss1603-adjust-directory 2012-12-20 18:39:52 +08:00
James Chen d94a0cf4c7 issue #1603: fixed a warning in unzip.cpp. 2012-12-20 18:39:29 +08:00
James Chen f47c5e1714 Added app.icf, development.icf. 2012-12-20 18:29:25 +08:00
minggo 65e01b9ade issue #1603:build ok on mac 2012-12-20 18:02:24 +08:00
James Chen f65717cd86 issue #1603: updated linux project configuration. 2012-12-20 17:49:34 +08:00
James Chen 08aa5066a5 issue #1603: updated blackberry, linux, marmalade project configurations. 2012-12-20 17:47:30 +08:00
James Chen 6700a1c4ce issue #1603: fixed some warnings for liblua.vcxproj. 2012-12-20 17:28:49 +08:00
minggo 977046cc32 issue #1603:make some samples build ok on iOS 2012-12-20 17:20:10 +08:00
James Chen 9a0a5e6b31 issue #1603: fixed some warnings. 2012-12-20 17:18:49 +08:00
James Chen 1562658bd8 issue #1603: Added libJSBinding project for win32 platform. 2012-12-20 17:18:02 +08:00
James Chen 7b19ab2689 Updated vs project configuration after adjusting directory. 2012-12-20 15:07:19 +08:00
minggo 959b7a3f0d issue #1603:build MoonWarriors ok on iOS and android 2012-12-20 15:06:02 +08:00
minggo 7433da8bec issue #1603:build CocosDragon ok on iOS and android 2012-12-20 14:54:20 +08:00
James Chen af03a969c1 Merge branch 'iss1603-adjust-directory' of https://github.com/minggo/cocos2d-x into iss1603-refactor-folder 2012-12-20 14:36:08 +08:00
minggo f9a9d45f88 issue #1603:adjust samples directory
Signed-off-by: minggo <ming@cocos2d-x.org>
2012-12-20 14:14:53 +08:00
James Chen dcfd38756d Updated android build files. 2012-12-20 14:04:49 +08:00
James Chen 4660e72eda issue #1603: Moved the position of some projects. 2012-12-20 12:58:21 +08:00
James Chen 3130e0d6a4 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1603-refactor-folder
Conflicts:
	samples/Javascript/Shared
2012-12-20 11:33:14 +08:00
James Chen eb0e189842 Moved the submodule of cocos2d-js-tests and renamed it to Shared. 2012-12-20 11:30:18 +08:00
James Chen c610f85ffd Merge pull request #1764 from dumganhar/iss1617-js-improvements
fixed #1617: Some improvements for JS Bindings.
2012-12-19 19:26:04 -08:00
James Chen 4a41b25753 Merge pull request #1767 from dumganhar/gles20
Updated the submodule of cocos2d-js-tests.
2012-12-19 18:43:47 -08:00
James Chen 43c8aa6878 Updated the submodule of cocos2d-js-tests. 2012-12-20 10:41:36 +08:00
johnangel b8eaf00359 ESC button on Windows behaves like Back button 2012-12-19 21:11:26 +01:00
johnangel f409aba724 Setting Windows app title 2012-12-19 20:43:09 +01:00
unknown adb68ddbb6 Enable Windows XP support in Visual Studio 2012 Update 1.
Not tested with Visual Studio 2010, not sure will it work with PlatformToolset v110_xp.
2012-12-19 19:28:25 +01:00
unknown fdd67d37c9 Missing subproject 2012-12-18 23:01:22 +01:00
James Chen e8c0844dd5 fixed #1617: Some improvements for JS Bindings.
1) Changed cc.REPEAT_FOREVER = - 1 to cc.REPEAT_FOREVER = 0xffffffff
[Reason]: If cc.REPEAT_FOREVER = -1, it will be a very big double value after converting it to double by JS_ValueToNumber on android.
Then cast it to unsigned int, the value will be 0. The schedule will not be able to work.
I don't know why this occurs only on android.
[Solution]: Instead of passing -1 to it, I assign it with max value of unsigned int in c++.

2) Added two helper function, cc.ArrayGetIndexOfObject and cc.ArrayContainsObject.

3) Added JSScheduleWrapper::removeTargetForNativeNode to avoid memory leaks.

4) Improvments for JSTouchDelegate. Added four functions as follows:
// Set the touch delegate to map by using the key (pJSObj).
static void setDelegateForJSObject(JSObject* pJSObj, JSTouchDelegate* pDelegate);

// Get the touch delegate by the key (pJSObj).
static JSTouchDelegate* getDelegateForJSObject(JSObject* pJSObj);

// Remove the delegate by the key (pJSObj).
static void removeDelegateForJSObject(JSObject* pJSObj);

void unregisterTouchDelegate();
And exported cc.unregisterTouchDelegate(); to js.
Fix a memory leak for JSTouchDelegate by making it as an autorelease object.

5) Don't add js callback function to the reserved slot of object.
[Reason]: The target object may execute more than one schedule.
Therefore, previous js callback function will be replaced
by the current one. For example:

this.scheduleOnce(function() { temporary function 1 }, 0.5);
this.scheduleOnce(function() { temporary function 2 }, 0.5);

In this case, the temporary function 1 will be removed from reserved slot 0.
And temporary function 2 will be set to reserved slot 0 of this object.
If gc is triggered before the JSScheduleWrapper::scheduleFunc is invoked,
crash will happen. You could simply reproduce it by adding jsc.garbageCollect(); after scheduleOnce.
[Solution] Because one schedule corresponds to one JSScheduleWrapper, we root
the js callback function in JSScheduleWrapper::setJSCallbackFunc and unroot it
at the destructor of JSScheduleWrapper.
2012-12-18 11:56:44 +08:00
James Chen c2e1cf2d51 Merge pull request #1763 from CocosRobot/updategeneratedsubmodule_1355729180
cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings
2012-12-16 23:40:28 -08:00
CocosRobot 13b04e3ee4 cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings 2012-12-17 15:26:28 +08:00
minggo e9c7db5a36 Merge pull request #1761 from dualface/fix_ccnode_scheduleupdate_lua
[lua] remove current schedule before register new script schedule
2012-12-16 17:26:59 -08:00