資源簡介
支持csb文件反編譯成csd資源:
csb2csd原資源地址:https://github.com/lyzz0612/csb2csd
但是這個地址上的有些小問題,會出現屬性找不到的問題,我這個版本對屬性找不到的問題進行了優化,現在基本上都能反編譯,親測可用,但是發現一些小問題,不過可以自己手動修改,問題不大,
1.button的按下狀態顯示的是一個白色的默認資源,自己手動修改一下

代碼片段和文件信息
import?flatbuffers?as?Parser
import?os
import?string
import?random
import?shutil
import?json
import?sys
reload(sys)
sys.setdefaultencoding(‘utf8‘)
ENGINE_VERSION?=?“3.10.0.0“
script_path?=?os.path.split(os.path.realpath(sys.argv[0]))[0]
targetOut?=?os.path.join(script_path?“csd“)
with?open(os.path.join(script_path?“header_rule.json“)?“r“)?as?fileObj:
HeaderRules?=?json.load(fileObj)
fileObj.close()
with?open(os.path.join(script_path?“child_rule.json“)?“r“)?as?fileObj:
ChildRules?=?json.load(fileObj)
fileObj.close()
if?not?os.path.exists(targetOut):
os.mkdir(targetOut)
csdPath?=?““
def?writeFile(text):
global?csdPath
with?open(csdPath?“a“)?as?fileObj:
fileObj.write(text)
fileObj.close()
def?writeHeader(groupName):
global?ENGINE_VERSION?csdPath
if?os.path.exists(csdPath):
os.remove(csdPath)
randomId?=?random.sample(string.ascii_lowercase?+?“-“?+?string.digits?36)
randomId?=?““.join(randomId)
text?=?‘‘
text?=?text?+?‘\n‘
text?=?text?+?‘??yer“?ID=“%s“?Version=“%s“?/>\n‘?%(groupName?randomId?ENGINE_VERSION)
text?=?text?+?‘??\n‘
text?=?text?+?‘????\n‘
writeFile(text)
def?writeFooter():
text?=?‘‘
text?=?text?+?‘???? \n‘
text?=?text?+?‘?? \n‘
text?=?text?+?‘ \n‘
writeFile(text)
def?getImageOption(childKey?resourceData):
fileType?=?“Default“
if?resourceData.ResourceType()?==?0:
fileType?=?“Normal“
elif?resourceData.ResourceType()?==?1:
fileType?=?“PlistSubImage“
path?=?resourceData.Path()
plistFile?=?resourceData.PlistFile()
if?path?==?““?and?plistFile?==?““:
return?‘??<%s?/>\n‘?%(childKey)
text?=?‘??<%s?Type=“%s“?Path=“%s“?Plist=“%s“?/>\n‘?%(childKey?fileType?path?plistFile)
return?text
def?getEasingText(easingData):
easingType?=?easingData.Type()
if?easingType?==?-1:
return?““
else:
return?‘???????????? \n‘?%(easingType)
def?getframeText(frameData?property):
text?=?““
if?property?==?“VisibleForframe“:
realframe?=?frameData.Boolframe()
text?=?text?+?‘??????????ame?frameIndex=“%d“?Tween=“%s“?Value=“%s“?/>\n‘?%(realframe.frameIndex()?realframe.Tween()?realframe.Value())
elif?property?==?“Position“:
realframe?=?frameData.Pointframe()
text?=?text?+?‘??????????ame?frameIndex=“%d“?X=“%f“?Y=“%f“>\n‘?%(realframe.frameIndex()?realframe.Position().X()?realframe.Position().Y())
text?=?text?+?getEasingText(realframe.EasingData())
text?=?text?+?‘?????????? ame>\n‘
elif?property?==?“Scale“:
realframe?=?frameData.Scaleframe()
text?=?text?+?‘??????????ame?frameIndex=“%d“?X=“%f“?Y=“%f“>\n‘?%(realframe.frameIndex()?realframe.Scale().ScaleX()?realframe.Scale().ScaleX())
text?=?text?+?getEasingText(realframe.EasingData())
text?=?text?+?‘?????????? ame>\n‘
elif?property?==?“RotationSkew“:
realframe?=?frameData.Scaleframe()
text?=?text?+?‘??????????ame?frameIndex=“%d“?X=“%f“?Y=
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????187??2018-12-27?09:44??csb2csd-master\.gitattributes
?????文件???????3410??2018-12-27?09:44??csb2csd-master\child_rule.json
?????文件??????13120??2019-02-25?10:10??csb2csd-master\convert.py
?????文件???????9776??2018-12-27?09:44??csb2csd-master\CSParseBinary.fbs
?????文件????????776??2018-12-27?09:44??csb2csd-master\flatbuffers\AnchorPoint.py
?????文件???????1419??2019-02-22?17:20??csb2csd-master\flatbuffers\AnchorPoint.pyc
?????文件???????1651??2018-12-27?09:44??csb2csd-master\flatbuffers\AnimationInfo.py
?????文件???????2961??2019-02-22?17:20??csb2csd-master\flatbuffers\AnimationInfo.pyc
?????文件???????2251??2018-12-27?09:44??csb2csd-master\flatbuffers\Blendfr
?????文件???????3702??2019-02-22?17:20??csb2csd-master\flatbuffers\Blendfr
?????文件????????740??2018-12-27?09:44??csb2csd-master\flatbuffers\BlendFunc.py
?????文件???????1387??2019-02-22?17:20??csb2csd-master\flatbuffers\BlendFunc.pyc
?????文件???????1985??2018-12-27?09:44??csb2csd-master\flatbuffers\BoneNodeOptions.py
?????文件???????3289??2019-02-22?17:20??csb2csd-master\flatbuffers\BoneNodeOptions.pyc
?????文件???????1937??2018-12-27?09:44??csb2csd-master\flatbuffers\BoneOptions.py
?????文件???????3417??2018-12-27?09:44??csb2csd-master\flatbuffers\BoneOptions.pyc
?????文件???????2092??2018-12-27?09:44??csb2csd-master\flatbuffers\Boolfr
?????文件???????3556??2019-02-22?17:20??csb2csd-master\flatbuffers\Boolfr
?????文件??????23931??2018-12-27?09:44??csb2csd-master\flatbuffers\builder.py
?????文件??????24894??2019-02-22?17:20??csb2csd-master\flatbuffers\builder.pyc
?????文件??????10032??2018-12-27?09:44??csb2csd-master\flatbuffers\ButtonOptions.py
?????文件??????14224??2019-02-22?17:20??csb2csd-master\flatbuffers\ButtonOptions.pyc
?????文件???????1151??2018-12-27?09:44??csb2csd-master\flatbuffers\CapInsets.py
?????文件???????1895??2019-02-22?17:20??csb2csd-master\flatbuffers\CapInsets.pyc
?????文件???????4756??2018-12-27?09:44??csb2csd-master\flatbuffers\CheckBoxOptions.py
?????文件???????6612??2019-02-22?17:20??csb2csd-master\flatbuffers\CheckBoxOptions.pyc
?????文件???????1078??2018-12-27?09:44??csb2csd-master\flatbuffers\Color.py
?????文件???????1833??2019-02-22?17:20??csb2csd-master\flatbuffers\Color.pyc
?????文件???????2222??2018-12-27?09:44??csb2csd-master\flatbuffers\Colorfr
?????文件???????3689??2019-02-22?17:20??csb2csd-master\flatbuffers\Colorfr
............此處省略135個文件信息
- 上一篇:基于單片機的智能豆漿機設計
- 下一篇:北京交通大學數據結構大綱考試重點.doc
評論
共有 條評論