第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

初始化時(shí),文件報(bào)錯(cuò)!

初始化時(shí),文件報(bào)錯(cuò)!

Ogre::ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName); //加載這個(gè)“SdkTrays.zip”文件時(shí)報(bào)錯(cuò)
查看完整描述

1 回答

?
BIG陽(yáng)

TA貢獻(xiàn)1859條經(jīng)驗(yàn) 獲得超6個(gè)贊

Ogre 本身是支持的 Zip 包的, 但Zip 包不具要資源保護(hù)的特性, 隨便用個(gè)winrar 就可以把資源打開(kāi)并導(dǎo)出, 這樣就失去了數(shù)據(jù)保護(hù)的意義?,F(xiàn)在假設(shè)你的操作資源包的 API 已經(jīng)完成, 下一步需要集成到OGRE 中去, 那么該怎么做呢,大致機(jī)械式的列出下面幾步, 照著做一般就不會(huì)錯(cuò)。
1. 繼承Ogre: : Archive 派生出新的, 假設(shè)派生出 Ogre: : XXXArchive 
2. Ogre: : XXXArchive 中實(shí)現(xiàn)下面的虛函數(shù)bool isCaseSensitive(void) void load() void unload() DataStreamPtr open(const String& filename) StringVectorPtr list(bool recursive = true ) FileInfoListPtr listFileInfo(bool recursive = true ) StringVectorPtr find(const String& pattern, bool recursive = true) FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true) bool exists(const String& filename) 
3. 繼承Ogre: : DataStream 派生出新的, 假設(shè)派生出 Ogre: : XXXDataStream 
4. Ogre: : XXXDataStream 中實(shí)現(xiàn)下面的虛函數(shù) size_t read(void* buf, size_t count) ; void skip(long count) ; void seek( size_t pos ) ; size_t tell(void) const; bool eof(void) const; void close(void) ; 
5. 繼承 Ogre: : ArchiveFactory 派生出新的, 假設(shè)派生出 Ogre: : XXXArchiveFactory 
6. Ogre: : XXXArchiveFactory 中實(shí)現(xiàn)下面虛函數(shù) const String& getType(void) const Archive* createInstance( const String& name ) 
7. 在OgreRoot. h 中注冊(cè)我們新的資源包的加載 在private 成員中加入一個(gè)新的變量 ArchiveFactory *mXXXArchiveFactory; 代表你新的資源包的創(chuàng)建工廠 
8. 在OgreRoot. cpp 中加入相關(guān)代碼在 mZipArchiveFactory = new ZipArchiveFactory() ; ArchiveManager: : getSingleton() . addArchiveFactory( mZipArchiveFactory ) ; 兩句代碼的下面加上, 注冊(cè)我們資源包的代碼 mXXXArchiveFactory = new XXXArchiveFactory() ; ArchiveManager: : getSingleton() . addArchiveFactory( mXXXArchiveFactory ) ;


查看完整回答
反對(duì) 回復(fù) 2023-01-10
  • 1 回答
  • 0 關(guān)注
  • 123 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)