Merge branch 'v3luaruntime' of https://github.com/chuanweizhang2013/cocos2d-x into v3luaruntime

This commit is contained in:
chuanweizhang2013 2014-07-04 02:33:51 -07:00
commit bad371fbf0
3 changed files with 19 additions and 21 deletions

View File

@ -208,7 +208,7 @@
<SDLCheck> <SDLCheck>
</SDLCheck> </SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\win32-specific\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat> <DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile> </ClCompile>

View File

@ -627,10 +627,6 @@ public:
#include "ResData.h" #include "ResData.h"
int designWidth = 1280; int designWidth = 1280;
int designHeight = 800; int designHeight = 800;
string fontName = "Arial";
if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID){
fontName = "DroidSans";
}
Director::getInstance()->getOpenGLView()->setDesignResolutionSize(designWidth,designHeight,ResolutionPolicy::EXACT_FIT); Director::getInstance()->getOpenGLView()->setDesignResolutionSize(designWidth,designHeight,ResolutionPolicy::EXACT_FIT);
Image* imagebg = new Image(); Image* imagebg = new Image();
imagebg->initWithImageData(__landscapePngData, sizeof(__landscapePngData)); imagebg->initWithImageData(__landscapePngData, sizeof(__landscapePngData));
@ -677,10 +673,7 @@ public:
string strip = getIPAddress(); string strip = getIPAddress();
char szIPAddress[512]={0}; char szIPAddress[512]={0};
sprintf(szIPAddress, "IP: %s",strip.c_str()); sprintf(szIPAddress, "IP: %s",strip.c_str());
auto IPlabel = Label::create(); auto IPlabel = Label::createWithSystemFont(szIPAddress,"",72);
IPlabel->setString(szIPAddress);
IPlabel->setSystemFontName(fontName.c_str());
IPlabel->setSystemFontSize(72);
IPlabel->setAnchorPoint(Vec2(0,0)); IPlabel->setAnchorPoint(Vec2(0,0));
int spaceSizex = 72; int spaceSizex = 72;
int spaceSizey = 200; int spaceSizey = 200;
@ -694,20 +687,14 @@ public:
char szVersion[1024]={0}; char szVersion[1024]={0};
sprintf(szVersion,"runtimeVersion:%s \ncocos2dVersion:%s",getRuntimeVersion(),cocos2dVersion()); sprintf(szVersion,"runtimeVersion:%s \ncocos2dVersion:%s",getRuntimeVersion(),cocos2dVersion());
Label* verLable = Label::create(); Label* verLable = Label::createWithSystemFont(szVersion,"",24);
verLable->setString(szVersion);
verLable->setSystemFontName(fontName.c_str());
verLable->setSystemFontSize(24);
verLable->setAnchorPoint(Vec2(0,0)); verLable->setAnchorPoint(Vec2(0,0));
int width = verLable->getBoundingBox().size.width; int width = verLable->getBoundingBox().size.width;
int height = verLable->getBoundingBox().size.height; int height = verLable->getBoundingBox().size.height;
verLable->setPosition( Point(VisibleRect::right().x-width, VisibleRect::rightBottom().y) ); verLable->setPosition( Point(VisibleRect::right().x-width, VisibleRect::rightBottom().y) );
verLable->setAlignment(TextHAlignment::LEFT); verLable->setAlignment(TextHAlignment::LEFT);
addChild(verLable, 9002); addChild(verLable, 9002);
_labelUploadFile = Label::create(); _labelUploadFile = Label::createWithSystemFont(_transferTip,"",36);
_labelUploadFile->setString(_transferTip);
_labelUploadFile->setSystemFontName(fontName.c_str());
_labelUploadFile->setSystemFontSize(36);
_labelUploadFile->setAnchorPoint(Vec2(0,0)); _labelUploadFile->setAnchorPoint(Vec2(0,0));
_labelUploadFile->setPosition( Point(VisibleRect::leftTop().x+spaceSizex, IPlabel->getPositionY()-spaceSizex) ); _labelUploadFile->setPosition( Point(VisibleRect::leftTop().x+spaceSizex, IPlabel->getPositionY()-spaceSizex) );
_labelUploadFile->setAlignment(TextHAlignment::LEFT); _labelUploadFile->setAlignment(TextHAlignment::LEFT);

View File

@ -7,6 +7,17 @@ LOCAL_MODULE := cocos2dlua_shared
LOCAL_MODULE_FILENAME := libcocos2dlua LOCAL_MODULE_FILENAME := libcocos2dlua
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
../../Classes/protobuf-lite/google/protobuf/io/coded_stream.cc \
../../Classes/protobuf-lite/google/protobuf/stubs/common.cc \
../../Classes/protobuf-lite/google/protobuf/extension_set.cc \
../../Classes/protobuf-lite/google/protobuf/generated_message_util.cc \
../../Classes/protobuf-lite/google/protobuf/message_lite.cc \
../../Classes/protobuf-lite/google/protobuf/stubs/once.cc \
../../Classes/protobuf-lite/google/protobuf/repeated_field.cc \
../../Classes/protobuf-lite/google/protobuf/wire_format_lite.cc \
../../Classes/protobuf-lite/google/protobuf/io/zero_copy_stream.cc \
../../Classes/protobuf-lite/google/protobuf/io/zero_copy_stream_impl_lite.cc \
../../Classes/protobuf-lite/google/protobuf/stubs/stringprintf.cc \
../../Classes/runtime/Landscape_png.cpp \ ../../Classes/runtime/Landscape_png.cpp \
../../Classes/runtime/PlayDisable_png.cpp \ ../../Classes/runtime/PlayDisable_png.cpp \
../../Classes/runtime/PlayEnable_png.cpp \ ../../Classes/runtime/PlayEnable_png.cpp \
@ -22,15 +33,15 @@ lua/main.cpp
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../Classes \ $(LOCAL_PATH)/../../Classes/protobuf-lite \
$(LOCAL_PATH)/../../Classes/runtime $(LOCAL_PATH)/../../Classes/runtime \
$(LOCAL_PATH)/../../Classes
LOCAL_STATIC_LIBRARIES := curl_static_prebuilt LOCAL_STATIC_LIBRARIES := curl_static_prebuilt
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_lua_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos_lua_static
LOCAL_WHOLE_STATIC_LIBRARIES += protobuf-lite_static
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
$(call import-module,scripting/lua-bindings) $(call import-module,scripting/lua-bindings)
$(call import-module,protobuf-lite/prebuilt/android)