Lines Matching refs:ent
294 CardUtilDirent* ent; in DoErase() local
296 for (ent = CardControl.directory; in DoErase()
297 ent < &CardControl.directory[CardControl.numFiles]; in DoErase()
298 ++ent) in DoErase()
300 if (ent->fileNo == fileNo) in DoErase()
303 … memmove(ent, ent + 1, (u32) &CardControl.directory[CardControl.numFiles] - (u32) (ent + 1)); in DoErase()
305 … DCStoreRange(ent, (u32) &CardControl.directory[CardControl.numFiles] - (u32) ent); in DoErase()
370 CardUtilDirent* ent = &directory[CardControl.numFiles]; in DoList() local
373 if (CARDGetStatus(slot, fileNo, &ent->stat) < 0 || in DoList()
374 memcmp(ent->stat.gameName, diskID->gameName, sizeof(diskID->gameName)) != 0 || in DoList()
375 memcmp(ent->stat.company, diskID->company, sizeof(diskID->company)) != 0) in DoList()
381 if (ent->stat.fileName[0] == '~') in DoList()
386 strncpy(tempName, ent->stat.fileName, CARD_FILENAME_MAX); in DoList()
391 … if (ent->stat.commentAddr <= ent->stat.length - CARD_COMMENT_SIZE && // Comment available? in DoList()
409 memset(ent->comment, 0, CARD_COMMENT_SIZE); in DoList()
410 if (ent->stat.commentAddr <= ent->stat.length - CARD_COMMENT_SIZE) in DoList()
418 offset = (s32) ent->stat.commentAddr & ~(CARD_READ_SIZE - 1); in DoList()
419 length = (s32) (ent->stat.commentAddr + CARD_COMMENT_SIZE - offset); in DoList()
421 result = CARDRead(&fileInfo, ent, length, offset); in DoList()
428 offset = (s32) (ent->stat.commentAddr & (CARD_READ_SIZE - 1)); in DoList()
429 memmove(ent->comment, (u8*) ent + offset, CARD_COMMENT_SIZE); in DoList()
433 if ((ent->stat.bannerFormat || ent->stat.iconFormat) && in DoList()
434 ent->stat.offsetData <= ent->stat.length && in DoList()
435 ent->stat.iconAddr < ent->stat.offsetData) in DoList()
443 offset = (s32) ent->stat.iconAddr & ~(CARD_READ_SIZE - 1); in DoList()
444 length = (s32) (ent->stat.offsetData - offset); in DoList()
446 result = CARDRead(&fileInfo, ent, length, offset); in DoList()
453 offset = (s32) (ent->stat.iconAddr & (CARD_READ_SIZE - 1)); in DoList()
454 memmove(ent, (u8*) ent + offset, ent->stat.offsetData - ent->stat.iconAddr); in DoList()
455 DCFlushRange(ent, ent->stat.offsetData - ent->stat.iconAddr); in DoList()
458 ent->cFrame = 0; in DoList()
461 speed = CARDGetIconSpeed(&ent->stat, cIcon); in DoList()
466 ent->nFrame[j] = ent->cFrame; in DoList()
467 ent->cFrame += 4 * speed; in DoList()
468 if (CARDGetIconFormat(&ent->stat, cIcon) != CARD_STAT_ICON_NONE) in DoList()
470 ent->iIcon[j] = cIcon; in DoList()
475 ent->iIcon[j] = 0; in DoList()
478 if (CARDGetIconFormat(&ent->stat, i) != CARD_STAT_ICON_NONE) in DoList()
480 ent->iIcon[j] = i; in DoList()
486 if (CARDGetIconAnim(&ent->stat) == CARD_STAT_ANIM_BOUNCE && 2 < cIcon) in DoList()
490 speed = CARDGetIconSpeed(&ent->stat, i); in DoList()
492 ent->nFrame[j] = ent->cFrame; in DoList()
493 ent->iIcon[j] = ent->iIcon[i]; in DoList()
494 ent->cFrame += 4 * speed; in DoList()
499 ent->fileNo = fileNo; in DoList()
557 CardUtilDirent* ent; in DoSave() local
647 ent = &CardControl.directory[CardControl.numFiles]; in DoSave()
652 for (ent = CardControl.directory; in DoSave()
653 ent < &CardControl.directory[CardControl.numFiles]; in DoSave()
654 ++ent) in DoSave()
656 if (ent->fileNo == oldNo) in DoSave()
661 if (ent == &CardControl.directory[CardControl.numFiles]) in DoSave()
669 memset(ent->comment, 0, CARD_COMMENT_SIZE); in DoSave()
672 memmove(ent->comment, (u8*) buffer + stat->commentAddr, CARD_COMMENT_SIZE); in DoSave()
676 ent->cFrame = 0; in DoSave()
687 memmove(ent, (u8*) buffer + stat->iconAddr, stat->offsetData - stat->iconAddr); in DoSave()
688 DCFlushRange(ent, stat->offsetData - stat->iconAddr); in DoSave()
698 ent->nFrame[j] = ent->cFrame; in DoSave()
699 ent->iIcon[j] = i; in DoSave()
700 ent->cFrame += 4 * speed; in DoSave()
712 ent->nFrame[j] = ent->cFrame; in DoSave()
713 ent->iIcon[j] = ent->iIcon[i]; in DoSave()
714 ent->cFrame += 4 * speed; in DoSave()
719 memcpy(&ent->stat, stat, sizeof(CARDStat)); in DoSave()
720 ent->fileNo = fileNo; in DoSave()
1101 void CardUtilDrawAnimatedIcon(CardUtilDirent* ent, int x, int y, int size) in CardUtilDrawAnimatedIcon() argument
1106 if (ent->cFrame) in CardUtilDrawAnimatedIcon()
1108 curr = VIGetRetraceCount() % ent->cFrame; in CardUtilDrawAnimatedIcon()
1111 if (curr < ent->nFrame[i]) in CardUtilDrawAnimatedIcon()
1116 i = ent->iIcon[i]; in CardUtilDrawAnimatedIcon()
1117 if (CARDGetIconFormat(&ent->stat, i) != CARD_STAT_ICON_NONE) in CardUtilDrawAnimatedIcon()
1120 (u8*) ent + ent->stat.offsetIcon[i] - ent->stat.iconAddr, in CardUtilDrawAnimatedIcon()
1121 (u8*) ent + ent->stat.offsetIconTlut - ent->stat.iconAddr, in CardUtilDrawAnimatedIcon()
1123 CARDGetIconFormat(&ent->stat, i)); in CardUtilDrawAnimatedIcon()