📄 libmng_chunk_xs.c
字号:
mng_uint8 *iMovetype,
mng_int32 *iMovex,
mng_int32 *iMovey)
{
mng_datap pData;
mng_movep pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_MOVE, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_movep)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_MOVE)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iFirstid = pChunk->iFirstid; /* fill the fields */
*iLastid = pChunk->iLastid;
*iMovetype = pChunk->iMovetype;
*iMovex = pChunk->iMovex;
*iMovey = pChunk->iMovey;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_MOVE, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_CLIP
mng_retcode MNG_DECL mng_getchunk_clip (mng_handle hHandle,
mng_handle hChunk,
mng_uint16 *iFirstid,
mng_uint16 *iLastid,
mng_uint8 *iCliptype,
mng_int32 *iClipl,
mng_int32 *iClipr,
mng_int32 *iClipt,
mng_int32 *iClipb)
{
mng_datap pData;
mng_clipp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_CLIP, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_clipp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_CLIP)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iFirstid = pChunk->iFirstid; /* fill the fields */
*iLastid = pChunk->iLastid;
*iCliptype = pChunk->iCliptype;
*iClipl = pChunk->iClipl;
*iClipr = pChunk->iClipr;
*iClipt = pChunk->iClipt;
*iClipb = pChunk->iClipb;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_CLIP, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_SHOW
mng_retcode MNG_DECL mng_getchunk_show (mng_handle hHandle,
mng_handle hChunk,
mng_bool *bEmpty,
mng_uint16 *iFirstid,
mng_uint16 *iLastid,
mng_uint8 *iMode)
{
mng_datap pData;
mng_showp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SHOW, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_showp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_SHOW)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*bEmpty = pChunk->bEmpty; /* fill the fields */
*iFirstid = pChunk->iFirstid;
*iLastid = pChunk->iLastid;
*iMode = pChunk->iMode;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SHOW, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_TERM
mng_retcode MNG_DECL mng_getchunk_term (mng_handle hHandle,
mng_handle hChunk,
mng_uint8 *iTermaction,
mng_uint8 *iIteraction,
mng_uint32 *iDelay,
mng_uint32 *iItermax)
{
mng_datap pData;
mng_termp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_TERM, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_termp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_TERM)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iTermaction = pChunk->iTermaction; /* fill the fields */
*iIteraction = pChunk->iIteraction;
*iDelay = pChunk->iDelay;
*iItermax = pChunk->iItermax;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_TERM, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_SAVE
mng_retcode MNG_DECL mng_getchunk_save (mng_handle hHandle,
mng_handle hChunk,
mng_bool *bEmpty,
mng_uint8 *iOffsettype,
mng_uint32 *iCount)
{
mng_datap pData;
mng_savep pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SAVE, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_savep)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_SAVE)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*bEmpty = pChunk->bEmpty; /* fill the fields */
*iOffsettype = pChunk->iOffsettype;
*iCount = pChunk->iCount;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SAVE, MNG_LC_END)
#endif
return MNG_NOERROR;
}
/* ************************************************************************** */
mng_retcode MNG_DECL mng_getchunk_save_entry (mng_handle hHandle,
mng_handle hChunk,
mng_uint32 iEntry,
mng_uint8 *iEntrytype,
mng_uint32arr2 *iOffset,
mng_uint32arr2 *iStarttime,
mng_uint32 *iLayernr,
mng_uint32 *iFramenr,
mng_uint32 *iNamesize,
mng_pchar *zName)
{
mng_datap pData;
mng_savep pChunk;
mng_save_entryp pEntry;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SAVE_ENTRY, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_savep)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_SAVE)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
if (iEntry >= pChunk->iCount) /* valid index ? */
MNG_ERROR (pData, MNG_INVALIDENTRYIX)
pEntry = pChunk->pEntries + iEntry; /* address the entry */
/* fill the fields */
*iEntrytype = pEntry->iEntrytype;
(*iOffset)[0] = pEntry->iOffset[0];
(*iOffset)[1] = pEntry->iOffset[1];
(*iStarttime)[0] = pEntry->iStarttime[0];
(*iStarttime)[1] = pEntry->iStarttime[1];
*iLayernr = pEntry->iLayernr;
*iFramenr = pEntry->iFramenr;
*iNamesize = pEntry->iNamesize;
*zName = pEntry->zName;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SAVE_ENTRY, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_SEEK
mng_retcode MNG_DECL mng_getchunk_seek (mng_handle hHandle,
mng_handle hChunk,
mng_uint32 *iNamesize,
mng_pchar *zName)
{
mng_datap pData;
mng_seekp pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SEEK, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_seekp)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_SEEK)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iNamesize = pChunk->iNamesize; /* fill the fields */
*zName = pChunk->zName;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_SEEK, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_eXPI
mng_retcode MNG_DECL mng_getchunk_expi (mng_handle hHandle,
mng_handle hChunk,
mng_uint16 *iSnapshotid,
mng_uint32 *iNamesize,
mng_pchar *zName)
{
mng_datap pData;
mng_expip pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_EXPI, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_expip)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_eXPI)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iSnapshotid = pChunk->iSnapshotid; /* fill the fields */
*iNamesize = pChunk->iNamesize;
*zName = pChunk->zName;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_EXPI, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_fPRI
mng_retcode MNG_DECL mng_getchunk_fpri (mng_handle hHandle,
mng_handle hChunk,
mng_uint8 *iDeltatype,
mng_uint8 *iPriority)
{
mng_datap pData;
mng_fprip pChunk;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_FPRI, MNG_LC_START)
#endif
MNG_VALIDHANDLE (hHandle) /* check validity handle */
pData = (mng_datap)hHandle; /* and make it addressable */
pChunk = (mng_fprip)hChunk; /* address the chunk */
if (pChunk->sHeader.iChunkname != MNG_UINT_fPRI)
MNG_ERROR (pData, MNG_WRONGCHUNK) /* ouch */
*iDeltatype = pChunk->iDeltatype; /* fill the fields */
*iPriority = pChunk->iPriority;
#ifdef MNG_SUPPORT_TRACE
MNG_TRACE (((mng_datap)hHandle), MNG_FN_GETCHUNK_FPRI, MNG_LC_END)
#endif
return MNG_NOERROR;
}
#endif
/* ************************************************************************** */
#ifndef MNG_SKIPCHUNK_nEED
mng_retcode MNG_DECL mng_getchunk_need (mng_handle hHandle,
mng_handle hChunk,
mng_uint32 *iKeywordssize,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -