mirror of https://github.com/axmolengine/axmol.git
Fix typos in variable names
This commit is contained in:
parent
662a1636c3
commit
093ef3a14f
|
@ -44,54 +44,54 @@ BillBoard::~BillBoard()
|
||||||
|
|
||||||
BillBoard* BillBoard::createWithTexture(Texture2D *texture, Mode mode)
|
BillBoard* BillBoard::createWithTexture(Texture2D *texture, Mode mode)
|
||||||
{
|
{
|
||||||
BillBoard *billborad = new (std::nothrow) BillBoard();
|
BillBoard *billboard = new (std::nothrow) BillBoard();
|
||||||
if (billborad && billborad->initWithTexture(texture))
|
if (billboard && billboard->initWithTexture(texture))
|
||||||
{
|
{
|
||||||
billborad->_mode = mode;
|
billboard->_mode = mode;
|
||||||
billborad->autorelease();
|
billboard->autorelease();
|
||||||
return billborad;
|
return billboard;
|
||||||
}
|
}
|
||||||
CC_SAFE_DELETE(billborad);
|
CC_SAFE_DELETE(billboard);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BillBoard* BillBoard::create(const std::string& filename, Mode mode)
|
BillBoard* BillBoard::create(const std::string& filename, Mode mode)
|
||||||
{
|
{
|
||||||
BillBoard *billborad = new (std::nothrow) BillBoard();
|
BillBoard *billboard = new (std::nothrow) BillBoard();
|
||||||
if (billborad && billborad->initWithFile(filename))
|
if (billboard && billboard->initWithFile(filename))
|
||||||
{
|
{
|
||||||
billborad->_mode = mode;
|
billboard->_mode = mode;
|
||||||
billborad->autorelease();
|
billboard->autorelease();
|
||||||
return billborad;
|
return billboard;
|
||||||
}
|
}
|
||||||
CC_SAFE_DELETE(billborad);
|
CC_SAFE_DELETE(billboard);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
BillBoard* BillBoard::create(const std::string& filename, const Rect& rect, Mode mode)
|
BillBoard* BillBoard::create(const std::string& filename, const Rect& rect, Mode mode)
|
||||||
{
|
{
|
||||||
BillBoard *billborad = new (std::nothrow) BillBoard();
|
BillBoard *billboard = new (std::nothrow) BillBoard();
|
||||||
if (billborad && billborad->initWithFile(filename, rect))
|
if (billboard && billboard->initWithFile(filename, rect))
|
||||||
{
|
{
|
||||||
billborad->_mode = mode;
|
billboard->_mode = mode;
|
||||||
billborad->autorelease();
|
billboard->autorelease();
|
||||||
return billborad;
|
return billboard;
|
||||||
}
|
}
|
||||||
CC_SAFE_DELETE(billborad);
|
CC_SAFE_DELETE(billboard);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
BillBoard* BillBoard::create(Mode mode)
|
BillBoard* BillBoard::create(Mode mode)
|
||||||
{
|
{
|
||||||
BillBoard *billborad = new (std::nothrow) BillBoard();
|
BillBoard *billboard = new (std::nothrow) BillBoard();
|
||||||
if (billborad && billborad->init())
|
if (billboard && billboard->init())
|
||||||
{
|
{
|
||||||
billborad->_mode = mode;
|
billboard->_mode = mode;
|
||||||
billborad->autorelease();
|
billboard->autorelease();
|
||||||
return billborad;
|
return billboard;
|
||||||
}
|
}
|
||||||
CC_SAFE_DELETE(billborad);
|
CC_SAFE_DELETE(billboard);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,10 +98,10 @@ void getChildMap(std::map<int, std::vector<int> >& map, SkinData* skinData, cons
|
||||||
|
|
||||||
// get transform matrix
|
// get transform matrix
|
||||||
Mat4 transform;
|
Mat4 transform;
|
||||||
const rapidjson::Value& parent_tranform = val[OLDTRANSFORM];
|
const rapidjson::Value& parent_transform = val[OLDTRANSFORM];
|
||||||
for (rapidjson::SizeType j = 0; j < parent_tranform.Size(); j++)
|
for (rapidjson::SizeType j = 0; j < parent_transform.Size(); j++)
|
||||||
{
|
{
|
||||||
transform.m[j] = parent_tranform[j].GetDouble();
|
transform.m[j] = parent_transform[j].GetDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
// set origin matrices
|
// set origin matrices
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class Cocos2dxHandler extends Handler {
|
||||||
Cocos2dxActivity theActivity = this.mActivity.get();
|
Cocos2dxActivity theActivity = this.mActivity.get();
|
||||||
DialogMessage dialogMessage = (DialogMessage)msg.obj;
|
DialogMessage dialogMessage = (DialogMessage)msg.obj;
|
||||||
new AlertDialog.Builder(theActivity)
|
new AlertDialog.Builder(theActivity)
|
||||||
.setTitle(dialogMessage.titile)
|
.setTitle(dialogMessage.title)
|
||||||
.setMessage(dialogMessage.message)
|
.setMessage(dialogMessage.message)
|
||||||
.setPositiveButton("Ok",
|
.setPositiveButton("Ok",
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
|
@ -92,11 +92,11 @@ public class Cocos2dxHandler extends Handler {
|
||||||
// ===========================================================
|
// ===========================================================
|
||||||
|
|
||||||
public static class DialogMessage {
|
public static class DialogMessage {
|
||||||
public String titile;
|
public String title;
|
||||||
public String message;
|
public String message;
|
||||||
|
|
||||||
public DialogMessage(String title, String message) {
|
public DialogMessage(String title, String message) {
|
||||||
this.titile = title;
|
this.title = title;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,15 +389,15 @@ public class Cocos2dxHttpURLConnection
|
||||||
|
|
||||||
private static String str2Seconds(String strTime) {
|
private static String str2Seconds(String strTime) {
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
long millisSecond = 0;
|
long milliseconds = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
c.setTime(new SimpleDateFormat("EEE, dd-MMM-yy hh:mm:ss zzz", Locale.US).parse(strTime));
|
c.setTime(new SimpleDateFormat("EEE, dd-MMM-yy hh:mm:ss zzz", Locale.US).parse(strTime));
|
||||||
millisSecond = c.getTimeInMillis()/1000;
|
milliseconds = c.getTimeInMillis() / 1000;
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
Log.e("URLConnection exception", e.toString());
|
Log.e("URLConnection exception", e.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return Long.toString(millisSecond);
|
return Long.toString(milliseconds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,9 @@ static void accelerometer_sensor_cb(sensor_h _sensor, sensor_event_s *sensor_dat
|
||||||
|
|
||||||
double tmp = _acceleration->x;
|
double tmp = _acceleration->x;
|
||||||
Application *app = Application::getInstance();
|
Application *app = Application::getInstance();
|
||||||
int oritentation = elm_win_rotation_get(app->_win);
|
int orientation = elm_win_rotation_get(app->_win);
|
||||||
|
|
||||||
switch (oritentation)
|
switch (orientation)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
_acceleration->x = _acceleration->y;
|
_acceleration->x = _acceleration->y;
|
||||||
|
|
|
@ -295,7 +295,7 @@ void ListView::addChild(Node* child, int zOrder, const std::string &name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListView::removeChild(cocos2d::Node *child, bool cleaup)
|
void ListView::removeChild(cocos2d::Node *child, bool cleanup)
|
||||||
{
|
{
|
||||||
Widget* widget = dynamic_cast<Widget*>(child);
|
Widget* widget = dynamic_cast<Widget*>(child);
|
||||||
if (nullptr != widget)
|
if (nullptr != widget)
|
||||||
|
@ -316,7 +316,7 @@ void ListView::removeChild(cocos2d::Node *child, bool cleaup)
|
||||||
onItemListChanged();
|
onItemListChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView::removeChild(child, cleaup);
|
ScrollView::removeChild(child, cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListView::removeAllChildren()
|
void ListView::removeAllChildren()
|
||||||
|
|
|
@ -268,7 +268,7 @@ public:
|
||||||
virtual void addChild(Node* child, int zOrder, const std::string &name) override;
|
virtual void addChild(Node* child, int zOrder, const std::string &name) override;
|
||||||
virtual void removeAllChildren() override;
|
virtual void removeAllChildren() override;
|
||||||
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
|
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
|
||||||
virtual void removeChild(Node* child, bool cleaup = true) override;
|
virtual void removeChild(Node* child, bool cleanup = true) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Query the closest item to a specific position in inner container.
|
* @brief Query the closest item to a specific position in inner container.
|
||||||
|
|
|
@ -352,7 +352,7 @@ public:
|
||||||
virtual void addChild(Node* child, int localZOrder, const std::string &name) override;
|
virtual void addChild(Node* child, int localZOrder, const std::string &name) override;
|
||||||
virtual void removeAllChildren() override;
|
virtual void removeAllChildren() override;
|
||||||
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
|
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
|
||||||
virtual void removeChild(Node* child, bool cleaup = true) override;
|
virtual void removeChild(Node* child, bool cleanup = true) override;
|
||||||
virtual Vector<Node*>& getChildren() override;
|
virtual Vector<Node*>& getChildren() override;
|
||||||
virtual const Vector<Node*>& getChildren() const override;
|
virtual const Vector<Node*>& getChildren() const override;
|
||||||
virtual ssize_t getChildrenCount() const override;
|
virtual ssize_t getChildrenCount() const override;
|
||||||
|
|
|
@ -359,13 +359,13 @@ void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) {
|
||||||
void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) {
|
void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) {
|
||||||
if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) {
|
if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) {
|
||||||
|
|
||||||
auto direcrot = cocos2d::Director::getInstance();
|
auto director = cocos2d::Director::getInstance();
|
||||||
auto glView = direcrot->getOpenGLView();
|
auto glView = director->getOpenGLView();
|
||||||
auto frameSize = glView->getFrameSize();
|
auto frameSize = glView->getFrameSize();
|
||||||
|
|
||||||
auto scaleFactor = [static_cast<CCEAGLView *>(glView->getEAGLView()) contentScaleFactor];
|
auto scaleFactor = [static_cast<CCEAGLView *>(glView->getEAGLView()) contentScaleFactor];
|
||||||
|
|
||||||
auto winSize = direcrot->getWinSize();
|
auto winSize = director->getWinSize();
|
||||||
|
|
||||||
auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Vec2::ZERO);
|
auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Vec2::ZERO);
|
||||||
auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Vec2(this->_webView->getContentSize().width, this->_webView->getContentSize().height));
|
auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Vec2(this->_webView->getContentSize().width, this->_webView->getContentSize().height));
|
||||||
|
|
|
@ -259,7 +259,7 @@ public:
|
||||||
|
|
||||||
virtual void removeAllChildren() override;
|
virtual void removeAllChildren() override;
|
||||||
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
|
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
|
||||||
virtual void removeChild(Node* child, bool cleaup = true) override;
|
virtual void removeChild(Node* child, bool cleanup = true) override;
|
||||||
/**
|
/**
|
||||||
* CCActionTweenDelegate
|
* CCActionTweenDelegate
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue