本章主要介绍testResource.h与tests.h,当中tests.h主要是存放全部用到的头文件、与菜单相相应的宏定义以及菜单数组,testResource.h主要用是资源文件定义。

//tests.h

#ifndef _TESTS_H_
#define _TESTS_H_
//下面是46个用到的头文件
#include "ActionsTest/ActionsTest.h"
#include "TransitionsTest/TransitionsTest.h"
#include "ActionsProgressTest/ActionsProgressTest.h"
#include "EffectsTest/EffectsTest.h"
#include "ClickAndMoveTest/ClickAndMoveTest.h"
#include "RotateWorldTest/RotateWorldTest.h"
#include "ParticleTest/ParticleTest.h"
#include "ActionsEaseTest/ActionsEaseTest.h"
#include "MotionStreakTest/MotionStreakTest.h"
#include "DrawPrimitivesTest/DrawPrimitivesTest.h"
#include "TouchesTest/TouchesTest.h"
#include "MenuTest/MenuTest.h"
#include "ActionManagerTest/ActionManagerTest.h"
#include "LayerTest/LayerTest.h"
#include "SceneTest/SceneTest.h"
#include "ParallaxTest/ParallaxTest.h"
#include "TileMapTest/TileMapTest.h"
#include "IntervalTest/IntervalTest.h"
#include "LabelTest/LabelTest.h"
#include "TextInputTest/TextInputTest.h"
#include "SpriteTest/SpriteTest.h"
#include "SchedulerTest/SchedulerTest.h"
#include "RenderTextureTest/RenderTextureTest.h"
#include "Box2DTest/Box2dTest.h"
#include "Box2DTestBed/Box2dView.h"
#include "EffectsAdvancedTest/EffectsAdvancedTest.h"
#include "AccelerometerTest/AccelerometerTest.h"
#include "KeypadTest/KeypadTest.h"
#include "PerformanceTest/PerformanceTest.h"
#include "ZwoptexTest/ZwoptexTest.h"
#include "CocosDenshionTest/CocosDenshionTest.h"
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
// bada don't support libcurl
#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA)
#include "CurlTest/CurlTest.h"
#endif
#endif
#include "UserDefaultTest/UserDefaultTest.h"
#include "BugsTest/BugsTest.h"
#include "Texture2dTest/Texture2dTest.h"
#include "FontTest/FontTest.h"
#include "CurrentLanguageTest/CurrentLanguageTest.h"
#include "TextureCacheTest/TextureCacheTest.h"
#include "NodeTest/NodeTest.h"
#include "ShaderTest/ShaderTest.h"
#include "ExtensionsTest/ExtensionsTest.h"
#include "MutiTouchTest/MutiTouchTest.h"
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
#include "ClippingNodeTest/ClippingNodeTest.h"
#include "ChipmunkTest/ChipmunkTest.h"
#endif
#include "FileUtilsTest/FileUtilsTest.h"
#include "SpineTest/SpineTest.h"
//下面是一个枚举变量的定义,最后TESTS_COUNT用于定义菜单数组
enum
{
TEST_ACTIONS = 0,
TEST_TRANSITIONS,
TEST_PROGRESS_ACTIONS,
TEST_EFFECTS,
TEST_CLICK_AND_MOVE,
TEST_ROTATE_WORLD,
TEST_PARTICLE,
TEST_EASE_ACTIONS,
TEST_MOTION_STREAK,
TEST_DRAW_PRIMITIVES,
TEST_COCOSNODE,
TEST_TOUCHES,
TEST_MENU,
TEST_ACTION_MANAGER,
TEST_LAYER,
TEST_SCENE,
TEST_PARALLAX,
TEST_TILE_MAP,
TEST_INTERVAL,
TEST_LABEL,
TEST_TEXT_INPUT,
TEST_SPRITE,
TEST_SCHEDULER,
TEST_RENDERTEXTURE,
TEST_TEXTURE2D,
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
TEST_CHIPMUNK,
#endif
TEST_BOX2D,
TEST_BOX2DBED,
TEST_EFFECT_ADVANCE,
TEST_ACCELEROMRTER,
TEST_KEYPAD,
TEST_COCOSDENSHION,
TEST_PERFORMANCE,
TEST_ZWOPTEX,
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA)
TEST_CURL,
#endif
#endif
TEST_USERDEFAULT,
TEST_BUGS,
TEST_FONTS,
TEST_CURRENT_LANGUAGE,
TEST_TEXTURECACHE,
TEST_EXTENSIONS,
TEST_SHADER,
TEST_MUTITOUCH,
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
TEST_CLIPPINGNODE,
#endif
TEST_FILEUTILS,
TEST_SPINE,
TESTS_COUNT,
};
//此string数组用于存放菜单
const std::string g_aTestNames[TESTS_COUNT] = {
"ActionsTest",
"TransitionsTest",
"ActionsProgressTest",
"EffectsTest",
"ClickAndMoveTest",
"RotateWorldTest",
"ParticleTest",
"ActionsEaseTest",
"MotionStreakTest",
"DrawPrimitivesTest",
"NodeTest",
"TouchesTest",
"MenuTest",
"ActionManagerTest",
"LayerTest",
"SceneTest",
"ParallaxTest",
"TileMapTest",
"IntervalTest",
"LabelTest",
"TextInputTest",
"SpriteTest",
"SchedulerTest",
"RenderTextureTest",
"Texture2DTest",
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
"ChipmunkTest",
#endif
"Box2dTest",
"Box2dTestBed",
"EffectAdvancedTest",
"Accelerometer",
"KeypadTest",
"CocosDenshionTest",
"PerformanceTest",
"ZwoptexTest",
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA)
"CurlTest",
#endif
#endif
"UserDefaultTest",
"BugsTest",
"FontTest",
"CurrentLanguageTest",
"TextureCacheTest",
"ExtensionsTest",
"ShaderTest",
"MutiTouchTest",
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
"ClippingNodeTest",
#endif
"FileUtilsTest",
"SpineTest"
}; #endif

//testResource.h
#ifndef _TEST_RESOURCE_H_
#define _TEST_RESOURCE_H_
//编译器会自己主动从项目根文件夹下的Resource寻找资源文件。仅仅需正确表述资源在Resource下的路径就可以
static const char s_pPathGrossini[] = "Images/grossini.png"; //项目根文件夹下Resource文件夹下的Imagers下的图片资源
static const char s_pPathSister1[] = "Images/grossinis_sister1.png";
static const char s_pPathSister2[] = "Images/grossinis_sister2.png";
static const char s_pPathB1[] = "Images/b1.png";
static const char s_pPathB2[] = "Images/b2.png";
static const char s_pPathR1[] = "Images/r1.png";
static const char s_pPathR2[] = "Images/r2.png";
static const char s_pPathF1[] = "Images/f1.png";
static const char s_pPathF2[] = "Images/f2.png";
static const char s_pPathBlock[] = "Images/blocks.png";
static const char s_back[] = "Images/background.png";
static const char s_back1[] = "Images/background1.png";
static const char s_back2[] = "Images/background2.png";
static const char s_back3[] = "Images/background3.png";
static const char s_stars1[] = "Images/stars.png";
static const char s_stars2[] = "Images/stars2.png";
static const char s_fire[] = "Images/fire.png";
static const char s_snow[] = "Images/snow.png";
static const char s_streak[] = "Images/streak.png";
static const char s_PlayNormal[] = "Images/btn-play-normal.png";
static const char s_PlaySelect[] = "Images/btn-play-selected.png";
static const char s_AboutNormal[] = "Images/btn-about-normal.png";
static const char s_AboutSelect[] = "Images/btn-about-selected.png";
static const char s_HighNormal[] = "Images/btn-highscores-normal.png";
static const char s_HighSelect[] = "Images/btn-highscores-selected.png";
static const char s_Ball[] = "Images/ball.png";
static const char s_Paddle[] = "Images/paddle.png";
static const char s_pPathClose[] = "Images/close.png";
static const char s_MenuItem[] = "Images/menuitemsprite.png";
static const char s_SendScore[] = "Images/SendScoreButton.png";
static const char s_PressSendScore[] = "Images/SendScoreButtonPressed.png";
static const char s_Power[] = "Images/powered.png";
static const char s_AtlasTest[] = "Images/atlastest.png"; // tilemaps resource
static const char s_TilesPng[] = "TileMaps/tiles.png";
static const char s_LevelMapTga[] = "TileMaps/levelmap.tga"; #endif

Cocos2d-x学习笔记(20)(TestCpp源代码分析-4)的更多相关文章

  1. Hadoop学习笔记—20.网站日志分析项目案例

    1.1 项目来源 本次要实践的数据日志来源于国内某技术学习论坛,该论坛由某培训机构主办,汇聚了众多技术学习者,每天都有人发帖.回帖,如图1所示. 图1 项目来源网站-技术学习论坛 本次实践的目的就在于 ...

  2. Hadoop学习笔记—20.网站日志分析项目案例(三)统计分析

    网站日志分析项目案例(一)项目介绍:http://www.cnblogs.com/edisonchou/p/4449082.html 网站日志分析项目案例(二)数据清洗:http://www.cnbl ...

  3. Hadoop学习笔记—20.网站日志分析项目案例(一)项目介绍

    网站日志分析项目案例(一)项目介绍:当前页面 网站日志分析项目案例(二)数据清洗:http://www.cnblogs.com/edisonchou/p/4458219.html 网站日志分析项目案例 ...

  4. Hadoop学习笔记—20.网站日志分析项目案例(二)数据清洗

    网站日志分析项目案例(一)项目介绍:http://www.cnblogs.com/edisonchou/p/4449082.html 网站日志分析项目案例(二)数据清洗:当前页面 网站日志分析项目案例 ...

  5. Ext.Net学习笔记20:Ext.Net FormPanel 复杂用法

    Ext.Net学习笔记20:Ext.Net FormPanel 复杂用法 在上一篇笔记中我们介绍了Ext.Net的简单用法,并创建了一个简单的登录表单.今天我们将看一下如何更好是使用FormPanel ...

  6. SQL反模式学习笔记20 明文密码

    目标:恢复或重置密码 反模式:使用明文存储密码 1.存储密码 使用明文存储密码或者在网络上传递密码是不安全的. 如果攻击者截取到你用来插入(或者修改)密码的sql语句,就可以获得密码.     黑客获 ...

  7. golang学习笔记20 一道考察对并发多协程操作一个共享变量的面试题

    golang学习笔记20 一道考察对并发多协程操作一个共享变量的面试题 下面这个程序运行的能num结果是什么? package main import ( "fmt" " ...

  8. SPSS学习笔记之——Kaplan-Meier生存分析

    SPSS学习笔记之--Kaplan-Meier生存分析 一.概述 关于生存分析的相关概念,Kaplan-Meier用于估计生存函数,允许有一个分组变量进行生存率的组间比较,还容许一个分层变量.若不考虑 ...

  9. C++基础 学习笔记之一:源代码的格式化

    C++基础 学习笔记之一:源代码的格式化 1. 源代码中的标记与空白 C++中的语句是以分号表示语句的结束.在C++中空格和回车以及制表符均为相同作用,即三者通常可以互相替代. 例如可以将一个简单的m ...

  10. Cocos2d-x学习笔记(17)(TestCpp源代码分析-1)

    TestCpp源代码基于Cocos2d-x2.1.3版本号,部分资源来自红孩儿的游戏编程之路CSDN博客地址http://blog.csdn.net/honghaier/article/details ...

随机推荐

  1. Mysql优化理论知识

    参考文章 http://blog.51cto.com/lizhenliang/2095526 ()硬件优化 如果有条件一定要SSD固态硬盘代替SAS机械硬盘,将RAID级别调整为RAID1+,相对于R ...

  2. 请问这个git上开源的node项目怎样才能在windows用Npm跑起来

    这个项目https://github.com/wechaty/we...以前都是用人家弄好的手脚架搞得es6,搞了2天搞起了es6还报错,错误信息在下面,然后我想请教大神:1我到底应该怎么弄才能在wi ...

  3. mysql语句判断一天操作记录的个数

    话说有一文章表article,存储文章的添加文章的时间是add_time字段,该字段为int(5)类型的,现需要查询今天添加的文章总数并且按照时间从大到小排序,则查询语句如下: 1    select ...

  4. Audio / Video Playback

    For Developers‎ > ‎Design Documents‎ > ‎ Audio / Video Playback Interested in helping out?  Ch ...

  5. Division Game UVA - 11859 Nim

    Code: #include<cstdio> #include<algorithm> using namespace std; #define maxn 10005 int n ...

  6. bzoj 3408 热浪 最短路

    一道最短路的模板题,就当练习一下SPFA和dijkstra了 SPFA #include<bits/stdc++.h> using namespace std; struct edge{ ...

  7. MPI对道路车辆情况的Nagel-Schreckenberg 模型进行蒙特卡洛模拟

    平台Ubuntu 16.04,Linux下MPI环境的安装见链接:https://blog.csdn.net/lusongno1/article/details/61709460 据 Nagel-Sc ...

  8. 入门python:《Python编程从入门到实践》中文PDF+英文PDF+代码学习

    入门python推荐学习久负盛名的python入门书籍<Python编程从入门到实践>. 书中涵盖的内容是比较精简的,没有艰深晦涩的概念,最重要的是每个小结都附带有"动手试一试& ...

  9. C# 字符串 分割 反转 Base64

    "; //字符串 ToBase64 byte[] bytes = Encoding.Default.GetBytes(pwd); pwd = Convert.ToBase64String(b ...

  10. CJOI 05新年好 (最短路+枚举)

    CJOI 05新年好 (最短路+枚举) 重庆城里有n个车站,m条双向公路连接其中的某些车站.每两个车站最多用一条公路连接,从任何一个车站出发都可以经过一条或者多条公路到达其他车站,但不同的路径需要花费 ...