Merge branch 'develop' into develop_nutty_modify_framework_removeuselesssample

This commit is contained in:
CaiWenzhi 2014-01-09 18:45:49 +08:00
commit 13f1fdd79d
5 changed files with 55 additions and 10 deletions

View File

@ -2,7 +2,8 @@ language: cpp
env:
matrix:
- GEN_JSB=YES
- PLATFORM=linux DEBUG=1
- PLATFORM=linux DEBUG=1 CC_COMPILER=gcc CXX_COMPILER=g++
- PLATFORM=linux DEBUG=1 CC_COMPILER=clang CXX_COMPILER=clang++
# Since switching to C++11 only the ARM version of the nactive client
# port currently builds. TODO(sbc): Re-enable all architectures.
# Disabled travis-ci build for native client port since it doesn't support std::thread, std::mutex.
@ -23,6 +24,8 @@ env:
9lV+vgJQDRcFe7dKwtC86vk10EU7Ym2bhVmhMxi/AlmJXgavjmPVdizRT7rh
X2Ry/Nb6hGRkH3WS0T3D/KG1+e7lP/TMB9bvo6/locLJ2A6Z1YI=
script:
- export CC=$CC_COMPILER
- export CXX=$CXX_COMPILER
- tools/travis-scripts/run-script.sh
before_install:
- tools/travis-scripts/before-install.sh

@ -1 +1 @@
Subproject commit 17d3f116985b86a820a648927ea1fc5cfe5951d3
Subproject commit f7835c13644591879f5a995074ccc8faf70c355e

View File

@ -102,18 +102,22 @@ void LuaWebSocket::onMessage(WebSocket* ws, const WebSocket::Data& data)
LuaWebSocket* luaWs = dynamic_cast<LuaWebSocket*>(ws);
if (NULL != luaWs) {
if (data.isBinary) {
int nHandler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this,ScriptHandlerMgr::HandlerType::WEBSOCKET_MESSAGE);
if (0 != nHandler) {
SendBinaryMessageToLua(nHandler, (const unsigned char*)data.bytes, data.len);
int handler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this,ScriptHandlerMgr::HandlerType::WEBSOCKET_MESSAGE);
if (0 != handler) {
SendBinaryMessageToLua(handler, (const unsigned char*)data.bytes, data.len);
}
}
else{
int nHandler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this,ScriptHandlerMgr::HandlerType::WEBSOCKET_MESSAGE);
if (0 != nHandler) {
CommonScriptData commonData(nHandler,data.bytes);
ScriptEvent event(kCommonEvent,(void*)&commonData);
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
int handler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this,ScriptHandlerMgr::HandlerType::WEBSOCKET_MESSAGE);
if (0 != handler)
{
LuaStack* stack = LuaEngine::getInstance()->getLuaStack();
if (nullptr != stack)
{
stack->pushString(data.bytes,data.len);
stack->executeFunctionByHandler(handler, 1);
}
}
}
}

View File

@ -25,6 +25,7 @@ static std::function<Layer*()> createFunctions[] = {
CL(LayerExtendedBlendOpacityTest),
CL(LayerBug3162A),
CL(LayerBug3162B),
CL(LayerColorOccludeBug),
};
static int sceneIdx=-1;
@ -954,3 +955,27 @@ std::string LayerBug3162B::subtitle() const
{
return "u and m layer color is effected/diseffected with b layer";
}
std::string LayerColorOccludeBug::title() const
{
return "Layer Color Occlude Bug Test";
}
std::string LayerColorOccludeBug::subtitle() const
{
return "Layer Color Should not occlude titles and any sprites";
}
void LayerColorOccludeBug::onEnter()
{
LayerTest::onEnter();
Director::getInstance()->setDepthTest(true);
_layer = LayerColor::create(Color4B(0, 80, 95, 255));
addChild(_layer);
}
void LayerColorOccludeBug::onExit()
{
LayerTest::onExit();
Director::getInstance()->setDepthTest(false);
}

View File

@ -202,6 +202,19 @@ private:
LayerColor* _layer[3];
};
class LayerColorOccludeBug : public LayerTest
{
public:
CREATE_FUNC(LayerColorOccludeBug);
virtual void onEnter() override;
virtual void onExit() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
private:
LayerColor* _layer;
};
class LayerTestScene : public TestScene
{
public: