MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / iFileOpen

Function iFileOpen

src/SB/Core/gc/iFile.cpp:67–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67U32 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
101S32 iFileSeek(tag_xFile* file, S32 offset, S32 whence)
102{

Callers 5

iCSFileOpenFunction · 0.70
PlayFMVFunction · 0.70
iFileLoadFunction · 0.70
iFileFindFunction · 0.70
BFD_openFunction · 0.50

Calls 4

DVDConvertPathToEntrynumFunction · 0.85
DVDFastOpenFunction · 0.85
iFileFullPathFunction · 0.70
iFileSeekFunction · 0.70

Tested by

no test coverage detected