NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ut_DvdFileStream.h
1#ifndef NW4R_UT_DVD_FILE_STREAM_H
2#define NW4R_UT_DVD_FILE_STREAM_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/ut/ut_FileStream.h>
6
7#include <revolution/DVD.h>
8
9namespace nw4r {
10namespace ut {
11
12class DvdFileStream : public FileStream {
13public:
14 NW4R_UT_RTTI_DECL(DvdFileStream);
15
16public:
17 explicit DvdFileStream(s32 entrynum);
18 DvdFileStream(const DVDFileInfo* pInfo, bool close);
19 virtual ~DvdFileStream(); // at 0xC
20
21 bool Open(s32 entrynum);
22 bool Open(const DVDFileInfo* pInfo, bool close);
23
24 void SetPriority(s32 priority) {
25 mPriority = priority;
26 }
27
28 virtual void Close(); // at 0x10
29
30 virtual s32 Read(void* pDst, ulong size); // at 0x14
31 virtual bool ReadAsync(void* pDst, ulong size, StreamCallback pCallback,
32 void* pCallbackArg); // at 0x18
33
34 virtual s32 Peek(void* pDst, ulong size); // at 0x5C
35 virtual bool PeekAsync(void* pDst, ulong size, StreamCallback pCallback,
36 void* pCallbackArg); // at 0x60
37
38 virtual void Seek(s32 offset, ulong origin); // at 0x44
39
40 virtual void Cancel(); // at 0x48
41 virtual bool CancelAsync(StreamCallback pCallback,
42 void* pCallbackArg); // at 0x4C
43
44 virtual bool IsBusy() const {
45 return mIsBusy;
46 } // at 0x24
47
48 virtual ulong Tell() const {
49 return mFilePosition.Tell();
50 } // at 0x58
51 virtual ulong GetSize() const {
52 return mFilePosition.GetFileSize();
53 } // at 0x40
54
55 virtual bool CanAsync() const {
56 return true;
57 } // at 0x28
58 virtual bool CanSeek() const {
59 return true;
60 } // at 0x50
61 virtual bool CanRead() const {
62 return true;
63 } // at 0x2C
64 virtual bool CanWrite() const {
65 return false;
66 } // at 0x30
67 virtual bool CanCancel() const {
68 return true;
69 } // at 0x54
70
71 virtual ulong GetOffsetAlign() const {
72 return 4;
73 } // at 0x34
74 virtual ulong GetSizeAlign() const {
75 return 32;
76 } // at 0x38
77 virtual ulong GetBufferAlign() const {
78 return 32;
79 } // at 0x3C
80
81private:
83 DVDFileInfo dvdInfo; // at 0x0
84 DvdFileStream* stream; // at 0x3C
85 };
86
87private:
88 static void DvdAsyncCallback_(s32 result, DVDFileInfo* pInfo);
89 static void DvdCBAsyncCallback_(s32 result, DVDCommandBlock* pBlock);
90
91 void Initialize_();
92 ulong AdjustReadLength_(ulong len);
93
94private:
95 FilePosition mFilePosition; // at 0x14
96 StreamCallback mCancelCallback; // at 0x1C
97 void* mCancelArg; // at 0x20
98 volatile bool mIsCanceling; // at 0x24
99 DvdFileStreamInfo mFileInfo; // at 0x28
100 s32 mPriority; // at 0x68
101 volatile bool mIsBusy; // at 0x6C
102 bool mCloseOnDestroyFlg; // at 0x6D
103 bool mCloseEnableFlg; // at 0x6E
104};
105
106} // namespace ut
107} // namespace nw4r
108#endif
Debugging library which includes various utilities used by the rest of nw4r.
Definition ut_list.cpp:4