資源的總入口
-----
àinitializeresourcevariables( )
mapjtbl(jump table )
mmidatatype.h :resource table
1.加到
resource_base_enum
#ifdef __mmi_anda_dsm__
#endif
這個巨集展開是這樣的:
ap_id,
resource_base_##id = ap_id,
resource_base_##id##_end = ap_id + count – 1 所以
不需要在其他地方定義,這裡本身就在定義了!
2.(加到陣列
g_mmi_resource_base_table中)
#ifdef __mmi_anda_dsm__
#endif 3.
有了上面兩步,就可以在自己應用的
h檔案中定義需要的資源
id了,如
typedef enum
resourceinfo;
| |
setstringwithdisplay(stringid, string, display, #stringid, __file__); |
|resprtonerecord
resprtonerecord(fp, nimgid, data, enum_value, resfile)
將陣列中某些資料的格式化輸出到
string_resource_usage.txt
中。具體過程是:
1.getoffsetfromresourcebase(nimgid)
從g_mmi_resource_base_table
中找到此
id所在的應用的索引,即為
offset
,演算法很簡單已知道每個
的min max
只要此id
在此範圍即可確定
string_resource_usage.txt
各列對應的資料分別是這個函式的引數,其中
fp指的是檔名
修改全域性變數的值如:
currmaxstringid++;
strispopulate[nstrid] = 1;
strenum[nstrid] = penum_value;
str[nstrid] = pstring;
image
最終resgen
後生成陣列的位置:
custimgdatahw.h
是放置一般的的地方,但是後來
mtk把開機
logo
、開關機動畫、牆紙的放到
custimgdatahwext.h
裡面去了,還有乙個很特別的就是載入nand時顯示的進度條,這是開機lcd顯示的第一張,放在custnfbprogressimg.c中,不過一般公司都會修改此張,可能不再是進度條,但是入口不會改變,在nfb_loader.c中用巨集nfb_displayprogressbar(x)進行封裝。(順便說一下mtk開機lcd顯示過程,一般是:nand載入-->開機logo-->開機動畫)。
AssetBundle載入資源的過程
參考 1 載入總manifest檔案 2 獲取相關依賴檔案列表 3 載入所有相關依賴檔案 4 載入目標資源 5 解除安裝所有相關依賴檔案。ienumerator loadasset else 載入我們需要的檔案 www www new www bundleurl cube.unity3d yield...
VS生成過程的管理
msbuild 的管理,其語法為 echo off c windows microsoft.net framework 解決方案名稱.sln t build toolsversion 2.0 p configuration debug p outdir d bin pause 另外還有一種命令 de...
選舉生成樹的過程
選舉生成樹的過程 1.選舉根網橋 2.選舉根埠 3.選舉指定埠 4.確定非指定埠 選舉根埠規則 比較路徑成本 從非根網橋埠到根網橋累計成本。如果非根網橋上有多個埠可以到達根網橋。哪個埠到達根網橋的成本最低,哪個埠就成為根埠。比較網橋id 比較埠途經的網橋id。哪個埠途經的網橋id最小,哪個埠就成為根...