Update 3d reader for compatible with cocosstudio 3.1.2 version csd file

Update easing default speed
This commit is contained in:
XiaoFeng 2015-06-23 11:31:16 +08:00
parent a14fd25436
commit 375e80bd70
5 changed files with 16 additions and 14 deletions

View File

@ -1791,7 +1791,7 @@ inline flatbuffers::Offset<ListViewOptions> CreateListViewOptions(flatbuffers::F
struct ProjectNodeOptions : private flatbuffers::Table {
const WidgetOptions *nodeOptions() const { return GetPointer<const WidgetOptions *>(4); }
const flatbuffers::String *fileName() const { return GetPointer<const flatbuffers::String *>(6); }
float innerActionSpeed() const { return GetField<float>(8, 1.0); }
float innerActionSpeed() const { return GetField<float>(8, 0); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* nodeOptions */) &&
@ -1808,7 +1808,7 @@ struct ProjectNodeOptionsBuilder {
flatbuffers::uoffset_t start_;
void add_nodeOptions(flatbuffers::Offset<WidgetOptions> nodeOptions) { fbb_.AddOffset(4, nodeOptions); }
void add_fileName(flatbuffers::Offset<flatbuffers::String> fileName) { fbb_.AddOffset(6, fileName); }
void add_innerActionSpeed(float innerActionSpeed) { fbb_.AddElement<float>(8, innerActionSpeed, 1.0); }
void add_innerActionSpeed(float innerActionSpeed) { fbb_.AddElement<float>(8, innerActionSpeed, 0); }
ProjectNodeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
ProjectNodeOptionsBuilder &operator=(const ProjectNodeOptionsBuilder &);
flatbuffers::Offset<ProjectNodeOptions> Finish() {
@ -1820,7 +1820,7 @@ struct ProjectNodeOptionsBuilder {
inline flatbuffers::Offset<ProjectNodeOptions> CreateProjectNodeOptions(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<WidgetOptions> nodeOptions = 0,
flatbuffers::Offset<flatbuffers::String> fileName = 0,
float innerActionSpeed = 1.0) {
float innerActionSpeed = 0) {
ProjectNodeOptionsBuilder builder_(_fbb);
builder_.add_innerActionSpeed(innerActionSpeed);
builder_.add_fileName(fileName);

View File

@ -24,6 +24,8 @@
#define NULL ((void *)0)
#endif
#endif
#elif defined(_SHARED_)
#define CC_STUDIO_DLL __attribute__((visibility("default")))
#else
#define CC_STUDIO_DLL
#endif

View File

@ -85,15 +85,15 @@ namespace cocostudio
attriname = attribute->Name();
std::string value = attribute->Value();
if (attriname == "ValueX")
if (attriname == "X")
{
ret.x = atof(value.c_str());
}
else if (attriname == "ValueY")
else if (attriname == "Y")
{
ret.y = atof(value.c_str());
}
else if(attriname == "ValueZ")
else if(attriname == "Z")
{
ret.z = atof(value.c_str());
}
@ -196,11 +196,11 @@ namespace cocostudio
attriname = attribute->Name();
std::string value = attribute->Value();
if (attriname == "ValueX")
if (attriname == "X")
{
position.x = atof(value.c_str());
}
else if (attriname == "ValueY")
else if (attriname == "Y")
{
position.y = atof(value.c_str());
}
@ -217,11 +217,11 @@ namespace cocostudio
attriname = attribute->Name();
std::string value = attribute->Value();
if (attriname == "ValueX")
if (attriname == "X")
{
scale.x = atof(value.c_str());
}
else if (attriname == "ValueY")
else if (attriname == "Y")
{
scale.y = atof(value.c_str());
}

View File

@ -85,11 +85,11 @@ namespace cocostudio
attriname = attribute->Name();
std::string value = attribute->Value();
if (attriname == "ValueX")
if (attriname == "X")
{
ret.x = atof(value.c_str());
}
else if (attriname == "ValueY")
else if (attriname == "Y")
{
ret.y = atof(value.c_str());
}

View File

@ -84,11 +84,11 @@ namespace cocostudio
attriname = attribute->Name();
std::string value = attribute->Value();
if (attriname == "ValueX")
if (attriname == "X")
{
ret.x = atof(value.c_str());
}
else if (attriname == "ValueY")
else if (attriname == "Y")
{
ret.y = atof(value.c_str());
}