2014-06-06 17:33:27 +08:00
|
|
|
#ifndef _TILEMAP_TEST_NEW_H_
|
|
|
|
#define _TILEMAP_TEST_NEW_H_
|
|
|
|
|
|
|
|
#include "../BaseTest.h"
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
DEFINE_TEST_SUITE(FastTileMapTests);
|
|
|
|
|
|
|
|
class TileDemoNew : public TestCase
|
2014-06-06 17:33:27 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
TileDemoNew();
|
|
|
|
virtual ~TileDemoNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onExit() override;
|
2014-06-06 17:33:27 +08:00
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
2014-06-06 17:33:27 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class TileMapTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TileMapTestNew);
|
|
|
|
TileMapTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TileMapEditTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TileMapEditTestNew);
|
|
|
|
TileMapEditTestNew ();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
void updateMap(float dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoTestNew);
|
|
|
|
TMXOrthoTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoTest2New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoTest2New);
|
|
|
|
TMXOrthoTest2New();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoTest3New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoTest3New);
|
|
|
|
TMXOrthoTest3New();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoTest4New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoTest4New);
|
|
|
|
TMXOrthoTest4New();
|
2014-06-06 17:33:27 +08:00
|
|
|
void removeSprite(float dt);
|
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXReadWriteTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
unsigned int _gid;
|
|
|
|
unsigned int _gid2;
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXReadWriteTestNew);
|
|
|
|
TMXReadWriteTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
void removeSprite(Node* sender);
|
|
|
|
void updateCol(float dt);
|
|
|
|
void repaintWithGID(float dt);
|
|
|
|
void removeTiles(float dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXHexTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXHexTestNew);
|
|
|
|
TMXHexTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoTestNew);
|
|
|
|
TMXIsoTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoTest1New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoTest1New);
|
|
|
|
TMXIsoTest1New();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoTest2New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoTest2New);
|
|
|
|
TMXIsoTest2New();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXUncompressedTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXUncompressedTestNew);
|
|
|
|
TMXUncompressedTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXTilesetTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXTilesetTestNew);
|
|
|
|
TMXTilesetTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoObjectsTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoObjectsTestNew);
|
|
|
|
TMXOrthoObjectsTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoObjectsTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoObjectsTestNew);
|
|
|
|
TMXIsoObjectsTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXResizeTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXResizeTestNew);
|
|
|
|
TMXResizeTestNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoZorderNew : public TileDemoNew
|
|
|
|
{
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Sprite* _tamara;
|
2014-06-06 17:33:27 +08:00
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoZorderNew);
|
|
|
|
TMXIsoZorderNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2015-04-03 14:31:03 +08:00
|
|
|
virtual void onExit();
|
2014-06-06 17:33:27 +08:00
|
|
|
|
|
|
|
~TMXIsoZorderNew();
|
|
|
|
void repositionSprite(float dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoZorderNew : public TileDemoNew
|
|
|
|
{
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Sprite* _tamara;
|
2014-06-06 17:33:27 +08:00
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoZorderNew);
|
|
|
|
TMXOrthoZorderNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
virtual ~TMXOrthoZorderNew();
|
|
|
|
void repositionSprite(float dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoVertexZNew : public TileDemoNew
|
|
|
|
{
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Sprite* _tamara;
|
2014-06-06 17:33:27 +08:00
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoVertexZNew);
|
|
|
|
TMXIsoVertexZNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
~TMXIsoVertexZNew();
|
|
|
|
void repositionSprite(float dt);
|
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoVertexZNew : public TileDemoNew
|
|
|
|
{
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Sprite* _tamara;
|
2014-06-06 17:33:27 +08:00
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoVertexZNew);
|
|
|
|
TMXOrthoVertexZNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
~TMXOrthoVertexZNew();
|
|
|
|
void repositionSprite(float dt);
|
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXIsoMoveLayerNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXIsoMoveLayerNew);
|
|
|
|
TMXIsoMoveLayerNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoMoveLayerNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoMoveLayerNew);
|
|
|
|
TMXOrthoMoveLayerNew();
|
2014-06-06 17:33:27 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXTilePropertyTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXTilePropertyTestNew);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXTilePropertyTestNew();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoFlipTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoFlipTestNew);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXOrthoFlipTestNew();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoFlipRunTimeTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoFlipRunTimeTestNew);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXOrthoFlipRunTimeTestNew();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
void flipIt(float dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoFromXMLTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoFromXMLTestNew);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXOrthoFromXMLTestNew();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXOrthoXMLFormatTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXOrthoXMLFormatTestNew);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXOrthoXMLFormatTestNew();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXBug987New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXBug987New);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXBug987New();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXBug787New : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXBug787New);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXBug787New();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TMXGIDObjectsTestNew : public TileDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TMXGIDObjectsTestNew);
|
2014-06-06 17:33:27 +08:00
|
|
|
TMXGIDObjectsTestNew();
|
|
|
|
virtual std::string title() const override;
|
2014-09-11 15:39:56 +08:00
|
|
|
virtual std::string subtitle() const override;
|
2014-06-06 17:33:27 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|