本文整理汇总了C++中read_title函数的典型用法代码示例。如果您正苦于以下问题:C++ read_title函数的具体用法?C++ read_title怎么用?C++ read_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了read_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mmd3_test
static int mmd3_test(HIO_HANDLE *f, char *t, const int start)
{
char id[4];
uint32 offset, len;
if (hio_read(id, 1, 4, f) < 4)
return -1;
if (memcmp(id, "MMD2", 4) && memcmp(id, "MMD3", 4))
return -1;
hio_seek(f, 28, SEEK_CUR);
offset = hio_read32b(f); /* expdata_offset */
if (offset) {
hio_seek(f, start + offset + 44, SEEK_SET);
offset = hio_read32b(f);
len = hio_read32b(f);
hio_seek(f, start + offset, SEEK_SET);
read_title(f, t, len);
} else {
read_title(f, t, 0);
}
return 0;
}
示例2: pt3_test
static int pt3_test(FILE *f, char *t, const int start)
{
if (read32b(f) != MAGIC_FORM)
return -1;
read32b(f); /* skip size */
if (read32b(f) != MAGIC_MODL)
return -1;
if (read32b(f) != MAGIC_VERS)
return -1;
read32b(f); /* skip size */
fseek(f, 10, SEEK_CUR);
if (read32b(f) == MAGIC_INFO) {
read32b(f); /* skip size */
read_title(f, t, 32);
} else {
read_title(f, t, 0);
}
return 0;
}
示例3: mod_test
static int mod_test(HIO_HANDLE *f, char *t, const int start)
{
int i;
char buf[4];
hio_seek(f, start + 1080, SEEK_SET);
if (hio_read(buf, 1, 4, f) < 4)
return -1;
if (!strncmp(buf + 2, "CH", 2) && isdigit((int)buf[0]) && isdigit((int)buf[1])) {
i = (buf[0] - '0') * 10 + buf[1] - '0';
if (i > 0 && i <= 32) {
goto found;
}
}
if (!strncmp(buf + 1, "CHN", 3) && isdigit((int)*buf)) {
if (*buf >= '0' && *buf <='9') {
goto found;
}
}
if (memcmp(buf, "M.K.", 4))
return -1;
found:
hio_seek(f, start + 0, SEEK_SET);
read_title(f, t, 20);
return 0;
}
示例4: med3_test
static int med3_test(HIO_HANDLE *f, char *t, const int start)
{
if (hio_read32b(f) != MAGIC_MED3)
return -1;
read_title(f, t, 0);
return 0;
}
示例5: no_test
static int no_test(HIO_HANDLE *f, char *t, const int start)
{
if (hio_read32b(f) != 0x4e4f0000) /* NO 0x00 0x00 */
return -1;
read_title(f, t, hio_read8(f));
return 0;
}
示例6: dtt_test
static int dtt_test(FILE *f, char *t, const int start)
{
if (read32b(f) != MAGIC_DskT)
return -1;
read_title(f, t, 64);
return 0;
}
示例7: med4_test
static int med4_test(xmp_file f, char *t, const int start)
{
if (read32b(f) != MAGIC_MED4)
return -1;
read_title(f, t, 0);
return 0;
}
示例8: stim_test
static int stim_test(FILE *f, char *t, const int start)
{
if (read32b(f) != MAGIC_STIM)
return -1;
read_title(f, t, 0);
return 0;
}
示例9: it_test
static int it_test(HIO_HANDLE *f, char *t, const int start)
{
if (hio_read32b(f) != MAGIC_IMPM)
return -1;
read_title(f, t, 26);
return 0;
}
示例10: far_test
static int far_test(FILE *f, char *t, const int start)
{
if (read32b(f) != MAGIC_FAR)
return -1;
read_title(f, t, 40);
return 0;
}
示例11: dmf_test
static int dmf_test(xmp_file f, char *t, const int start)
{
if (read32b(f) != MAGIC_DDMF)
return -1;
xmp_fseek(f, 9, SEEK_CUR);
read_title(f, t, 30);
return 0;
}
示例12: dmf_test
static int dmf_test(HIO_HANDLE * f, char *t, const int start)
{
if (hio_read32b(f) != MAGIC_DDMF)
return -1;
hio_seek(f, 9, SEEK_CUR);
read_title(f, t, 30);
return 0;
}
示例13: dbm_test
static int dbm_test(FILE * f, char *t, const int start)
{
if (read32b(f) != MAGIC_DBM0)
return -1;
fseek(f, 12, SEEK_CUR);
read_title(f, t, 44);
return 0;
}
示例14: mdl_test
static int mdl_test(FILE *f, char *t, const int start)
{
uint16 id;
if (read32b(f) != MAGIC_DMDL)
return -1;
read8(f); /* version */
id = read16b(f);
if (id == 0x494e) { /* IN */
read32b(f);
read_title(f, t, 32);
} else {
read_title(f, t, 0);
}
return 0;
}
示例15: s3m_test
static int s3m_test(HIO_HANDLE *f, char *t, const int start)
{
hio_seek(f, start + 44, SEEK_SET);
if (hio_read32b(f) != MAGIC_SCRM)
return -1;
hio_seek(f, start + 0, SEEK_SET);
read_title(f, t, 28);
return 0;
}