| 65 | } |
| 66 | |
| 67 | U32 iFileOpen(const char* name, S32 flags, tag_xFile* file) |
| 68 | { |
| 69 | tag_iFile* ps = &file->ps; |
| 70 | |
| 71 | if (flags & IFILE_OPEN_ABSPATH) |
| 72 | { |
| 73 | strcpy(ps->path, name); |
| 74 | } |
| 75 | else |
| 76 | { |
| 77 | iFileFullPath(name, ps->path); |
| 78 | } |
| 79 | |
| 80 | ps->entrynum = DVDConvertPathToEntrynum(ps->path); |
| 81 | |
| 82 | if (ps->entrynum == -1) |
| 83 | { |
| 84 | return 1; |
| 85 | } |
| 86 | |
| 87 | if (!DVDFastOpen(ps->entrynum, &ps->fileInfo)) |
| 88 | { |
| 89 | ps->entrynum = -1; |
| 90 | return 1; |
| 91 | } |
| 92 | |
| 93 | ps->unkC4 = 0; |
| 94 | ps->flags = 0x1; |
| 95 | |
| 96 | iFileSeek(file, 0, IFILE_SEEK_SET); |
| 97 | |
| 98 | return 0; |
| 99 | } |
| 100 | |
| 101 | S32 iFileSeek(tag_xFile* file, S32 offset, S32 whence) |
| 102 | { |
no test coverage detected