秦殇的res00.lib 相关信息

res00.lib 所存储的为sprite帧动画。

文件的前十六字节仍为lib文件的头信息
00000000 4c 69 62 20 31 2e 30 31 00 cc cc cc cc cc cc cc |Lib 1.01........|

第二行的前四个字节为所存储的数量
00000010 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |0...............|

文件头信息一共占用256个字节,除了上述数据外的空间用0填充
之后的数据为索引文件
00000100 80 52 00 00 14 10 00 00 94 62 00 00 e4 03 00 00 |.R.......b......|
00000110 78 66 00 00 84 07 00 00 fc 6d 00 00 84 02 00 00 |xf.......m......|
00000120 80 70 00 00 04 12 00 00 84 82 00 00 84 0f 00 00 |.p..............|
00000130 08 92 00 00 84 02 00 00 8c 94 00 00 a4 24 00 00 |.............$..|
00000140 30 b9 00 00 44 01 00 00 74 ba 00 00 a4 24 00 00 |0...D...t....$..|
00000150 18 df 00 00 44 01 00 00 5c e0 00 00 60 01 00 00 |....D......`...|
00000160 bc e1 00 00 fc 00 00 00 b8 e2 00 00 fc 00 00 00 |................|

格式为四字节的地址,四字节的数据大小。

以第一个索引为例:
数据起始位置为 5280,数据长度为1014

00005280 10 00 00 00 08 00 00 00 04 00 00 00 07 00 00 00 |................|
00005290 00 00 00 00 04 00 00 00 4e 01 20 00 00 00 00 00 |........N. .....|
000052a0 00 00 00 00 10 00 00 00 0e 00 00 00 00 00 00 00 |................|
000052b0 04 00 00 00 4f 01 20 00 00 00 00 00 00 00 00 00 |....O. .........|
000052c0 10 00 00 00 0e 00 00 00 00 00 00 00 04 00 00 00 |................|
000052d0 50 01 20 00 00 00 00 00 00 00 00 00 10 00 00 00 |P. .............|
000052e0 14 00 00 00 00 00 00 00 04 00 00 00 51 01 20 00 |............Q. .|
000052f0 00 00 00 00 00 00 00 00 10 00 00 00 14 00 00 00 |................|
00005300 00 00 00 00 04 00 00 00 52 01 20 00 00 00 00 00 |........R. .....|

其中,前四个字节为精灵数量(这里是10,也就是16个),之后开始为数据段
数据段的前三个字节为每块的描述。
DWORD numFrame; //帧数量
DWORD wAverageSpeed; //速度
DWORD wFrameScriptSize; //脚本大小
每个数据段的大小为:numFramewFrameScriptSize4 + 34
3
4 就是每块的描述所占用的空间 也就是numFrame + wAverageSpeed + wFrameScriptSize

这里wFrameScriptSize应该是固定大小的,值为7
数据描述为:
DWORD dwFrameType; //帧类型,一般为0
DWORD wFrameSpeed; //帧率
DWORD id; //资源id,也就是pic_id, 是全局的图片id
int xOffet;
int yOffet;
int xCenter;
int yCenter;

秦殇的res00.lib 相关信息

上一篇:django01_环境搭建和创建django项目


下一篇:立方数差