Last active
December 31, 2015 09:49
-
-
Save sdkfz181tiger/7969607 to your computer and use it in GitHub Desktop.
Cocos2d-xでのコンテンツ暗号化(お手軽) ref: http://qiita.com/sdkfz181tiger@github/items/5c850c7e78c2927aae0d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
詳細↓ | |
http://qiita.com/sdkfz181tiger@github/items/5c850c7e78c2927aae0d | |
*/ | |
// ZipUtils.hを読み込む | |
#include "support/zip_support/ZipUtils.h" | |
// 復号キー | |
ZipUtils::ccSetPvrEncryptionKeyPart(0, 0xaaaaaaaa); | |
ZipUtils::ccSetPvrEncryptionKeyPart(1, 0xbbbbbbbb); | |
ZipUtils::ccSetPvrEncryptionKeyPart(2, 0xcccccccc); | |
ZipUtils::ccSetPvrEncryptionKeyPart(3, 0xdddddddd); | |
// あとは普通に使うだけ | |
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("hogehoge.plist", "hogehoge.pvr.ccz"); | |
auto eSprite = Sprite::createWithSpriteFrameName("gacya.png"); | |
this->addChild(eSprite); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment