zoukankan      html  css  js  c++  java
  • 批处理处理美术资源(cocos2d)

    @echo off
    color 0a
    
    rmdir /s /q /f ..\fonts\atlas
    
    rmdir /s /q 2X
    mkdir 2X
    mkdir 2X\icons
    mkdir 2X\icons\item
    mkdir 2X\icons\spell
    mkdir 2X\fonts
    mkdir 2X\fonts\atlas
    del /s /q /f "..\common\*.png"
    
    rmdir /s /q /f ..\icons
    mkdir ..\icons
    mkdir ..\icons\Item
    mkdir ..\icons\spell
    
    rmdir /s /q /f ..\fonts\atlas
    mkdir ..\fonts
    mkdir ..\fonts\atlas
    :: 面板
    del /f /s tmp.txt
    dir /b /a 界面\面框\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\面框\%%i" "2X\ui_panel_%%i" /y
    )
    
    :: 按钮
    del /f /s tmp.txt
    dir /b /a 界面\按钮\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\按钮\%%i" "2X\ui_btn_%%i" /y
    )
    
    :: 条
    del /f /s tmp.txt
    dir /b /a 界面\条\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\条\%%i" "2X\ui_progress_%%i" /y
    )
    
    :: 字体文件
    del /f /s tmp.txt
    dir /b /a 界面\字体文件\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\字体文件\%%i" "2X\fonts\atlas\font_atlas_%%i" /y
    )
    
    :: 字体图像
    del /f /s tmp.txt
    dir /b /a 界面\字体\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\字体\%%i" "2X\ui_font_img_%%i" /y
    )
    
    :: 道具图标
    del /f /s tmp.txt
    dir /b /a 界面\图标\item_icon\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\图标\item_icon\%%i" "2X\Icons\Item\icon_item_%%i" /y
    )
    
    :: 技能图标
    del /f /s tmp.txt
    dir /b /a 界面\图标\spell_icon\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\图标\spell_icon\%%i" "2X\Icons\Spell\icon_spell_%%i" /y
    )
    
    :: 幻兽图标
    del /f /s tmp.txt
    dir /b /a 界面\图标\pet_icon\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\图标\pet_icon\%%i" "2X\ui_icon_pet_%%i" /y
    )
    
    :: 系统图标
    del /f /s tmp.txt
    dir /b /a 界面\图标\system_icon\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\图标\system_icon\%%i" "2X\ui_icon_system_%%i" /y
    )
    
    :: 方块图标
    del /f /s tmp.txt
    dir /b /a 界面\图标\normal_icon\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    copy "界面\图标\normal_icon\%%i" "2X\ui_icon_normal_%%i" /y
    )
    
    
    
    :: 压缩
    
    :: 字体
    del /s /q /f tmp.txt
    dir /b /a 2X\fonts\atlas\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    @echo 正在将'%%i'压缩到Iphone目录
    convert 2X\fonts\atlas\%%i -resize "50%%x50%%" "..\fonts\atlas\%%i"
    )
    :: 道具图标
    del /s /q /f tmp.txt
    dir /b /a 2X\Icons\Item\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    @echo 正在将'%%i'压缩到Iphone目录
    convert 2X\Icons\Item\%%i -resize "50%%x50%%" "..\icons\Item\%%i"
    )
    :: 技能图标
    del /s /q /f tmp.txt
    dir /b /a 2X\Icons\Spell\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    @echo 正在将'%%i'压缩到Iphone目录
    convert 2X\Icons\Spell\%%i -resize "50%%x50%%" "..\icons\Spell\%%i"
    )
    :: 其它
    del /s /q /f tmp.txt
    dir /b /a 2X\*.png >> tmp.txt
    for /f %%i in (tmp.txt) do (
    @echo 正在将'%%i'压缩到Iphone目录
    convert 2X\%%i -resize "50%%x50%%" "..\common\%%i"
    )
    del /s /q /f tmp.txt
    rmdir /s /q 2X
    pause


  • 相关阅读:
    一行代码搞定Dubbo接口调用
    测试周期内测试进度报告规范
    jq 一个强悍的json格式化查看工具
    浅析Docker容器的应用场景
    HDU 4432 Sum of divisors (水题,进制转换)
    HDU 4431 Mahjong (DFS,暴力枚举,剪枝)
    CodeForces 589B Layer Cake (暴力)
    CodeForces 589J Cleaner Robot (DFS,或BFS)
    CodeForces 589I Lottery (暴力,水题)
    CodeForces 589D Boulevard (数学,相遇)
  • 原文地址:https://www.cnblogs.com/iapp/p/3631728.html
Copyright © 2011-2022 走看看