游戏图片移植问题!DDS转PVR

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/u013274257/article/details/18306965

折腾了两天,PS转PNG脚本无法批处理执行,Texturepacker PNG转PVR保存文件无效果。

最后还是用了神器PVRTexTool+BAT解决

首先下载:http://ishare.iask.sina.com.cn/f/18008068.html?from=like

配置好环境变量,右键点击我的电脑>属性>高级>环境变量,双击Path变量在最后的位置添加字段:F:\PVRTexTool\PVRTexToolCL\Windows_x86_32;

最后有个;的,记得按照你自己的路径修改

最后写批处理命令,新建一个.txt文件,输入以下内容:

for %%i in (*.dds) do PVRTexTool.exe -f PVRTC2 -i %%i
Pause

PVRTC2可以修改成ETC PVRTC4等,根据自己需要修改,Pause也可以去掉,如果需要把PNG转成PVR直接把.dds修改成.png即可!

最后保存文件,把文件名后缀改为.bat

直接把.bat放到需要转换格式的目录下,双击执行即可每个文件夹都需执行一遍!15004个图片终于解脱了!

展开阅读全文

游戏移植,SDL与framebuffer

07-25

rnrn移植了一个游戏到ARM92-EJS,通过X(export DISPLAY=:0)是可以运行的,但是游戏速度有点慢,16位游戏。想直接走framebuffer!但是export SDL_VIDEODRIVER=FBCONrnrn“root@xxxx:/# export SDL_VIDEODRIVER=FBCONrnroot@xxxx:/# ./snes9x ./snes9x_roms/course.zip rn/dev/dsp: No such file or directoryrnSound device open failedrnCould not initialize SDL(No available video device)rnrn。rnrn如果直接进入ROOTFS,不进行DISPLAY的设置,也不进行export SDL_VIDEODRIVER=FBCON,错误是下面这样的(我加了debug信息。)。我的屏幕是:480x272.rnrnroot@xxxx:/# ./snes9x ./snes9x_roms/course.zip rn/dev/dsp: No such file or directoryrnSound device open failedrnChecked mode 1152x864 at 8 bpp, got mode 1152x864 at 8 bpprnAdding mode 1152x864 at 1 bytes per pixelrnChecked mode 1024x768 at 8 bpp, got mode 1024x768 at 8 bpprnAdding mode 1024x768 at 1 bytes per pixelrnChecked mode 960x720 at 8 bpp, got mode 960x720 at 8 bpprnAdding mode 960x720 at 1 bytes per pixelrnChecked mode 800x600 at 8 bpp, got mode 800x600 at 8 bpprnAdding mode 800x600 at 1 bytes per pixelrnChecked mode 768x576 at 8 bpp, got mode 768x576 at 8 bpprnAdding mode 768x576 at 1 bytes per pixelrnChecked mode 720x576 at 8 bpp, got mode 720x576 at 8 bpprnNo valid timing line for mode 720x576rnChecked mode 720x480 at 8 bpp, got mode 720x480 at 8 bpprnNo valid timing line for mode 720x480rnChecked mode 640x480 at 8 bpp, got mode 640x480 at 8 bpprnAdding mode 640x480 at 1 bytes per pixelrnChecked mode 640x400 at 8 bpp, got mode 640x400 at 8 bpprnAdding mode 640x400 at 1 bytes per pixelrnChecked mode 512x384 at 8 bpp, got mode 512x384 at 8 bpprnAdding mode 512x384 at 1 bytes per pixelrnChecked mode 320x240 at 8 bpp, got mode 320x240 at 8 bpprnAdding mode 320x240 at 1 bytes per pixelrnChecked mode 320x200 at 8 bpp, got mode 320x200 at 8 bpprnAdding mode 320x200 at 1 bytes per pixelrnChecked mode 800x600 at 16 bpp, got mode 800x600 at 16 bpprnAdding mode 800x600 at 2 bytes per pixelrnChecked mode 768x576 at 16 bpp, got mode 768x576 at 16 bpprnAdding mode 768x576 at 2 bytes per pixelrnChecked mode 720x576 at 16 bpp, got mode 720x576 at 16 bpprnNo valid timing line for mode 720x576rnChecked mode 720x480 at 16 bpp, got mode 720x480 at 16 bpprnNo valid timing line for mode 720x480rnChecked mode 640x480 at 16 bpp, got mode 640x480 at 16 bpprnAdding mode 640x480 at 2 bytes per pixelrnChecked mode 640x400 at 16 bpp, got mode 640x400 at 16 bpprnAdding mode 640x400 at 2 bytes per pixelrnChecked mode 512x384 at 16 bpp, got mode 512x384 at 16 bpprnAdding mode 512x384 at 2 bytes per pixelrnNo valid timing line for mode 480x272rnChecked mode 320x240 at 16 bpp, got mode 320x240 at 16 bpprnAdding mode 320x240 at 2 bytes per pixelrnChecked mode 320x200 at 16 bpp, got mode 320x200 at 16 bpprnAdding mode 320x200 at 2 bytes per pixelrnChecked mode 640x400 at 32 bpp, got mode 640x400 at 32 bpprnAdding mode 640x400 at 4 bytes per pixelrnChecked mode 512x384 at 32 bpp, got mode 512x384 at 32 bpprnAdding mode 512x384 at 4 bytes per pixelrnChecked mode 320x240 at 32 bpp, got mode 320x240 at 32 bpprnAdding mode 320x240 at 4 bytes per pixelrnChecked mode 320x200 at 32 bpp, got mode 320x200 at 32 bpprnAdding mode 320x200 at 4 bytes per pixelrnALSA lib confmisc.c:768:(parse_card) cannot find card '0'rnALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_card_driver returned error: No such devicernALSA lib confmisc.c:392:(snd_func_concat) error evaluating stringsrnALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_concat returned error: No such devicernALSA lib confmisc.c:1251:(snd_func_refer) error evaluating namernALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_refer returned error: No such devicernALSA lib conf.c:3982:(snd_config_expand) Evaluate error: No such devicernALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM defaultrnPrinting original vinfo:rnPrinting vinfo:rn xres: 480rn yres: 272rn xres_virtual: 480rn yres_virtual: 272rn xoffset: 0rn yoffset: 0rn bits_per_pixel: 16rn grayscale: 0rn nonstd: 0rn activate: 0rn height: -1rn width: -1rn accel_flags: 0rn pixclock: 39721rn left_margin: 40rn right_margin: 24rn upper_margin: 32rn lower_margin: 11rn hsync_len: 96rn vsync_len: 2rn sync: 0rn vmode: 0rn red: 5/11rn green: 6/5rn blue: 5/0rn alpha: 0/0rnUsing VESA timings for 320x240rnPrinting wanted vinfo:rnPrinting vinfo:rn xres: 320rn yres: 240rn xres_virtual: 320rn yres_virtual: 480rn xoffset: 0rn yoffset: 0rn bits_per_pixel: 16rn grayscale: 0rn nonstd: 0rn activate: 0rn height: -1rn width: -1rn accel_flags: 0rn pixclock: 63492rn left_margin: 16rn right_margin: 16rn upper_margin: 16rn lower_margin: 4rn hsync_len: 48rn vsync_len: 2rn sync: 0rn vmode: 2rn red: 0/0rn green: 0/0rn blue: 0/0rn alpha: 0/0rnCouldn't set video mode: Couldn't set console screen infornrnrn 论坛

没有更多推荐了,返回首页