资源简介
cpp-empty-test.zip
![](http://www.nz998.com/pic/32661.jpg)
代码片段和文件信息
#include “AppDelegate.h“
#include
#include
#include “HelloWorldScene.h“
#include “AppMacros.h“
USING_NS_CC;
using namespace std;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
void AppDelegate::initGLContextAttrs()
{
GLContextAttrs glContextAttrs = {8 8 8 8 24 8};
GLView::setGLContextAttrs(glContextAttrs);
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLViewImpl::create(“Cpp Empty Test“);
director->setOpenGLView(glview);
}
director->setOpenGLView(glview);
// Set the design resolution
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
// a bug in DirectX 11 level9-x on the device prevents ResolutionPolicy::NO_BORDER from working correctly
glview->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height ResolutionPolicy::SHOW_ALL);
#else
glview->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height ResolutionPolicy::NO_BORDER);
#endif
Size frameSize = glview->getframeSize();
vector searchPath;
// In this demo we select resource according to the frame‘s height.
// If the resource size is different from design resolution size you need to set contentScaleFactor.
// We use the ratio of resource‘s height to the height of design resolution
// this can make sure that the resource‘s height could fit for the height of design resolution.
// if the frame‘s height is larger than the height of medium resource size select large resource.
if (frameSize.height > mediumResource.size.height)
{
searchPath.push_back(largeResource.directory);
director->setContentScaleFactor(MIN(largeResource.size.height/designResolutionSize.height largeResource.size.width/designResolutionSize.width));
}
// if the frame‘s height is larger than the height of small resource size select medium resource.
else if (frameSize.height > smallResource.size.height)
{
searchPath.push_back(mediumResource.directory);
director->setContentScaleFactor(MIN(mediumResource.size.height/designResolutionSize.height mediumResource.size.width/designResolutionSize.width));
}
// if the frame‘s height is smaller than the height of medium resource size select small resource.
else
{
searchPath.push_back(smallResource.directory);
director->setContentScaleFactor(MIN(smallResource.size.height/designResolutionSize.height smallResource.size.width/designResolutionSize.width));
}
// set searching path
FileUtils::getInstance()->setSearchPaths(searchPath);
// turn on display FPS
director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don‘t call this
director->setAnimationInterval(1.0 / 60);
// create a scene. it‘s an autorelease object
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-04-18 22:35 cpp-empty-test\
文件 1417 2014-12-12 21:47 cpp-empty-test\.cocos-project.json
目录 0 2015-04-19 01:42 cpp-empty-test\Classes\
文件 3717 2014-12-12 21:47 cpp-empty-test\Classes\AppDelegate.cpp
文件 991 2014-12-12 21:47 cpp-empty-test\Classes\AppDelegate.h
文件 2732 2014-12-12 21:47 cpp-empty-test\Classes\AppMacros.h
文件 3167 2015-04-19 16:04 cpp-empty-test\Classes\HelloWorldScene.cpp
文件 775 2015-04-19 15:37 cpp-empty-test\Classes\HelloWorldScene.h
文件 2387 2014-12-12 21:47 cpp-empty-test\CMakeLists.txt
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\
文件 9042 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\AlignmentGrid.png
文件 3392 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\ApplicationIcon.png
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\
文件 9930 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\FlipCycleTileLarge.png
文件 9070 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\FlipCycleTileMedium.png
文件 3674 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\FlipCycleTileSmall.png
文件 4937 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\IconicTileMediumLarge.png
文件 3724 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\IconicTileSmall.png
文件 8046 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\cpp-empty-test.csproj
文件 344 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\LocalizedStrings.cs
文件 2212 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Package.appxmanifest
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\
文件 201 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\AppManifest.xm
文件 1429 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\AssemblyInfo.cs
文件 1984 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\WMAppManifest.xm
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Resources\
文件 3083 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Resources\AppResources.Designer.cs
文件 5796 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Resources\AppResources.resx
文件 119747 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\SplashScreenImage.jpg
............此处省略126个文件信息
- 上一篇:WoMic手机当做电脑麦克风(安卓机可用)
- 下一篇:火电厂各系统流程图(主系统)
相关资源
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
- 联想启天M4350 BIOS升级文件
- 操作系统教程课后答案华中科技大学
- 用友ERP考试系统练习题库及答案
- 北京邮电大学数据结构历年考研真题
- 真正!!!概率论与数理统计浙江大
- TMS320VC5509A_开发板使用手册
- hxdef100源码、远控、后门
- CentOS-6.7-x86_64-bin-DVD1to2
- 点阵字库显示中英文
- caxa实体设计2019破解补丁
评论
共有 条评论