blob: 31104045142da89a1afb65e6eef0a189543bed9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
//
// Generated by dtk
// Translation Unit: binary.cpp
//
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JGadget/binary.h"
#include "dolphin/types.h"
namespace JGadget {
namespace binary {
/* 802BFA48-802BFAAC .text parseVariableUInt_16_32_following__Q27JGadget6binaryFPCvPUlPUlPQ37JGadget6binary5TEBit */
const void* parseVariableUInt_16_32_following(const void* buffer, u32* param_1, u32* param_2, TEBit* bit) {
JGadget::binary::TEBit temp;
if (bit == NULL) {
bit = &temp;
}
u32 uVar1 = *(u16*)buffer;
if ((uVar1 & 0x8000) == 0) {
bit->value = 0x10;
*param_1 = uVar1;
*param_2 = *(u16*)((u8*)buffer + 2);
return (u8*)buffer + 4;
}
bit->value = 0x20;
uVar1 <<= 16;
uVar1 &= 0x7fff0000;
uVar1 |= *(u16*)((u8*)buffer + 2);
*param_1 = uVar1;
*param_2 = *(u32*)((u8*)buffer + 4);
return (u8*)buffer + 8;
}
/* 802BFAAC-802BFAF4 .text __dt__Q37JGadget6binary19TParse_header_blockFv */
TParse_header_block::~TParse_header_block() {}
/* 802BFAF4-802BFC00 .text parse_next__Q37JGadget6binary19TParse_header_blockFPPCvUl */
bool TParse_header_block::parse_next(const void** ptrLocation, u32 idx) {
u32 headerEnd, blockEnd;
if ((ptrLocation == NULL) || (*ptrLocation == NULL)) {
return false;
}
bool check, checkLastBlock;
checkLastBlock = check = false;
check = checkNext(ptrLocation, &headerEnd, idx);
checkLastBlock = check;
if (!(idx & 1) && (check == false)) {
return check;
}
while (headerEnd > 0) {
check = false;
if (parseBlock_next(ptrLocation, &blockEnd, idx) && checkLastBlock) {
check = true;
}
checkLastBlock = check;
if (((idx & 2) == 0) && (check == false)) {
return check;
}
headerEnd--;
}
return checkLastBlock;
}
} // namespace binary
} // namespace JGadget
|