pvr 在 cocos2d 3.2 版本中翻转:从 2.1 移植时的困境困境、版本、cocos2d、pvr

由网友(可爱又迷人的小妖精吖)分享简介:我目前正在将一个游戏从 cocos2d 的 2.1 版本移植到 3.2 版本.我们有超过 3600 个未翻转的 pvr.gz 文件,例如在 2.1 下生成和工作.我们使用 TexturePacker 测试了 pvr 图像的翻转选项,并且确实足够的代码和动画可以正常工作.I am currently porting a...

我目前正在将一个游戏从 cocos2d 的 2.1 版本移植到 3.2 版本.我们有超过 3600 个未翻转的 pvr.gz 文件,例如在 2.1 下生成和工作.我们使用 TexturePacker 测试了 pvr 图像的翻转选项,并且确实足够的代码和动画可以正常工作.

I am currently porting a game from version 2.1 to 3.2 of cocos2d. We have over 3600 pvr.gz files that are NOT flipped, eg were produced and working under 2.1. We tested out with TexturePacker the option to flipY for pvr images, and sure enough code and animations work fine.

现在,我们可以手动为所有文件执行此操作,但是...有没有办法可以说服 3.2 版本使用旧"pvr 规则.这是一个港口,我们所有的资产都已经生产出来了.

Now, we can go and do this manually for all our files, but ... is there a way i could convince verions 3.2 to use the 'old' pvr rules. This is a port, all our assets have been produced already.

或者,我可以使用任何命令行实用程序/工具,并在我的资源文件夹中递归地编写 pvr 转换脚本:)

Alternately, any command-line utility/tool i could use and script recursively the pvr conversion in my Resources folder :)

非常感谢任何帮助.tia.

any help greatly appreciated. tia.

推荐答案

好的,非常感谢 cocos2d 的 Scott Lembcke 为我指明了正确的方向.对于后代,希望这可以帮助那里的人.PVRTexToolCLI 为我完成了这项工作(来自 ImgTech.com).免费下载,免费使用,您必须在他们的网站上注册.

ok, many thanks to Scott Lembcke of cocos2d for pointing me in the right direction. For posterity, hope this helps someone out there. PVRTexToolCLI did the job for me (from ImgTech.com). Free to download, free to use, you must register on their site.

这里是语法(对于这个游戏的资产策略)

here is the syntax (for this game's assets strategy)

PVRTexToolCLI -i old_magie_cleanse-hd.pvr -o magie_cleanse-hd.pvr -flip y,flag -f r8g8b8a8 -legacypvr

注释:

我仍在使用 pvr v2 格式,只是因为我喜欢一次更改一个.运行测试后,我会将所有纹理切换到 pvr v3.Cocos2d 3.2 支持 pvr v2 和 pvr v3,不知道能支持多久.在我们的例子中格式是 rgb8888,你必须弄清楚你自己的格式.您可以使用 PVRTextToolGUI 并将现有纹理之一拖入其中以计算当前的编码/压缩.如果您有压缩纹理,请使用-q pvrtcbest"来防止伪影.速度慢,占用大量 CPU,但值得.
阅读全文

相关推荐

最新文章