diff --git a/src/SetPlazaFlag.ld b/src/SetPlazaFlag.ld new file mode 100644 index 0000000..feb2df1 --- /dev/null +++ b/src/SetPlazaFlag.ld @@ -0,0 +1,2 @@ +$$ = 0; +$C2$.SetPlazaFlag = 0x70 + TMarDirector.setupObjects; diff --git a/src/SetPlazaFlag.s b/src/SetPlazaFlag.s new file mode 100644 index 0000000..4d686dd --- /dev/null +++ b/src/SetPlazaFlag.s @@ -0,0 +1,20 @@ +.SetPlazaFlag: +## orig + lwz r3, TFlagManager.smInstance$r13(r13) +## check plaza number +### r29 = &curArea + lbz r12, 0x1(r29) +### OR 0x2 bit from 0x8 bit +### i.e. map 0x8, 0x9 to 0x2, 0x3 + rlwinm r11, r12, 32-2, 0x2 + or r12, r12, r11 +### 4 bit for each entry + rlwinm r12, r12, 2, 0x1C +### magic +#### @2345 6701 +#### =FFF3 FF01 + lis r11, 0xFFF3 + ori r11, r11, 0xFF01 + rlwnm r11, r11, r12, 0xF0 +### set BH/RH/GB flag + stb r11, 0x70(r3)