Skip to content

Commit 65e0335

Browse files
committed
decomp: UpdateNodeReservationState family (ov210/ov211/ov282)
Node reservation-state transition: clears target on state 0x12 (returns 1), else marks target 0x11 when the node flag is set and state is in {2,9,a,c,d}. Combines double-negation, shared-epilogue branch, and bitfield idioms. Byte-exact across 3 overlays.
1 parent d2a92aa commit 65e0335

3 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
typedef struct { unsigned char flag : 1; } BitByte;
2+
3+
int func_ov210_020d06b4(char *obj) {
4+
char *node = *(char **)*(char **)(obj + 0x214);
5+
signed char state = *(signed char *)(node + 0x1c6);
6+
if (state == 0x12) {
7+
*(char *)(node + 0x1c7) = 0;
8+
return 1;
9+
}
10+
if (*(signed char *)(node + 0x1c7) != 0x11 && state != 0x11) {
11+
if (((BitByte *)(node + 0x17a))->flag) {
12+
if (!(state != 2 && state != 9 && state != 0xa && state != 0xc && state != 0xd))
13+
*(char *)(node + 0x1c7) = 0x11;
14+
}
15+
}
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
typedef struct { unsigned char flag : 1; } BitByte;
2+
3+
int func_ov211_020d24d4(char *obj) {
4+
char *node = *(char **)*(char **)(obj + 0x214);
5+
signed char state = *(signed char *)(node + 0x1c6);
6+
if (state == 0x12) {
7+
*(char *)(node + 0x1c7) = 0;
8+
return 1;
9+
}
10+
if (*(signed char *)(node + 0x1c7) != 0x11 && state != 0x11) {
11+
if (((BitByte *)(node + 0x17a))->flag) {
12+
if (!(state != 2 && state != 9 && state != 0xa && state != 0xc && state != 0xd))
13+
*(char *)(node + 0x1c7) = 0x11;
14+
}
15+
}
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
typedef struct { unsigned char flag : 1; } BitByte;
2+
3+
int func_ov282_020d06c0(char *obj) {
4+
char *node = *(char **)*(char **)(obj + 0x214);
5+
signed char state = *(signed char *)(node + 0x1c6);
6+
if (state == 0x12) {
7+
*(char *)(node + 0x1c7) = 0;
8+
return 1;
9+
}
10+
if (*(signed char *)(node + 0x1c7) != 0x11 && state != 0x11) {
11+
if (((BitByte *)(node + 0x17a))->flag) {
12+
if (!(state != 2 && state != 9 && state != 0xa && state != 0xc && state != 0xd))
13+
*(char *)(node + 0x1c7) = 0x11;
14+
}
15+
}
16+
return 0;
17+
}

0 commit comments

Comments
 (0)