Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JSUInputStream.h
Go to the documentation of this file.
1#ifndef JSUINPUTSTREAM_H
2#define JSUINPUTSTREAM_H
3
5
7 JSUStreamSeekFrom_SET = 0, // absolute
8 JSUStreamSeekFrom_CUR = 1, // relative
9 JSUStreamSeekFrom_END = 2, // relative to end
10};
11
16class JSUInputStream : public JSUIosBase {
17public:
19 virtual ~JSUInputStream();
20
21 /* vt[3] */ virtual s32 getAvailable() const = 0;
22 /* vt[4] */ virtual s32 skip(s32);
23 /* vt[5] */ virtual u32 readData(void*, s32) = 0;
24
26 u32 val;
27 this->read(&val, sizeof(val));
28 return val;
29 }
30
32 u32 val;
33 this->read(&val, sizeof(val));
34 return val;
35 }
36
38 s32 val;
39 this->read(&val, sizeof(val));
40 return val;
41 }
42
44 s16 val;
45 this->read(&val, sizeof(val));
46 return val;
47 }
48
50 u16 val;
51 this->read(&val, sizeof(val));
52 return val;
53 }
54
56 u8 val;
57 this->read(&val, sizeof(val));
58 return val;
59 }
60
62 u8 val;
63 this->read(&val, sizeof(val));
64 return val;
65 }
66
68 u16 val;
69 this->read(&val, sizeof(val));
70 return val;
71 }
72
74 read(&dest, 1);
75 return this;
76 }
77
79 read(&dest, 2);
80 return this;
81 }
82
83 // TODO: return value probably wrong
84 /* 802DC298 */ s32 read(void*, s32);
85}; // Size = 0x8
86
87// move?
92template <typename T>
93T* JSUConvertOffsetToPtr(const void*, const void*);
94
95#endif /* JSUINPUTSTREAM_H */
JSUStreamSeekFrom
Definition JSUInputStream.h:6
@ JSUStreamSeekFrom_END
Definition JSUInputStream.h:9
@ JSUStreamSeekFrom_SET
Definition JSUInputStream.h:7
@ JSUStreamSeekFrom_CUR
Definition JSUInputStream.h:8
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JSUInputStream.h:16
s16 readS16()
Definition JSUInputStream.h:43
JSUInputStream()
Definition JSUInputStream.h:18
JSUInputStream * operator>>(s16 &dest)
Definition JSUInputStream.h:78
s32 readS32()
Definition JSUInputStream.h:37
virtual ~JSUInputStream()
Definition JSUInputStream.cpp:41
u16 readU16()
Definition JSUInputStream.h:49
u16 read16b()
Definition JSUInputStream.h:67
JSUInputStream * operator>>(u8 &dest)
Definition JSUInputStream.h:73
virtual s32 getAvailable() const =0
virtual s32 skip(s32)
Definition JSUInputStream.cpp:53
u32 read32b()
Definition JSUInputStream.h:31
u8 read8b()
Definition JSUInputStream.h:61
u8 readU8()
Definition JSUInputStream.h:55
s32 read(void *, s32)
Definition JSUInputStream.cpp:44
u32 readU32()
Definition JSUInputStream.h:25
virtual u32 readData(void *, s32)=0
Definition JSUIosBase.h:14
T * JSUConvertOffsetToPtr(const void *, const void *)
Definition JSupport.h:24
static const double T[]
Definition k_tan.c:106
unsigned long u32
Definition types.h:10
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8