summaryrefslogtreecommitdiff
path: root/include/unk_810c3a4.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-05-09 09:26:21 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-05-09 09:26:21 -0400
commitd850ef92c66080733746a4a8253d384603e064f5 (patch)
tree3423ad6d586ee1a495805feb6fe40db782673621 /include/unk_810c3a4.h
parent0035d25cfc4c2b9a0d9d427ccfad322037ef8464 (diff)
decomp unk_810C3A4 as part of vs_seeker
Diffstat (limited to 'include/unk_810c3a4.h')
-rw-r--r--include/unk_810c3a4.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/unk_810c3a4.h b/include/unk_810c3a4.h
index 3f85ab00f..11a91b5ef 100644
--- a/include/unk_810c3a4.h
+++ b/include/unk_810c3a4.h
@@ -1,6 +1,25 @@
#ifndef GUARD_UNK_810C3A4_H
#define GUARD_UNK_810C3A4_H
+#define GET_VS_SEEKER_COUNTER_0() (gSaveBlock1Ptr->trainerRematch.stepCounter & 0xFF)
+#define GET_VS_SEEKER_COUNTER_1() (gSaveBlock1Ptr->trainerRematch.stepCounter >> 8)
+#define SET_VS_SEEKER_COUNTER_0(x) ({\
+ gSaveBlock1Ptr->trainerRematch.stepCounter &= 0xFF00;\
+ gSaveBlock1Ptr->trainerRematch.stepCounter |= (x);\
+})
+#define SET_VS_SEEKER_COUNTER_1(x) ({\
+ gSaveBlock1Ptr->trainerRematch.stepCounter &= 0x00FF;\
+ gSaveBlock1Ptr->trainerRematch.stepCounter |= ((x) << 8);\
+})
+#define INC_VS_SEEKER_COUNTER_0() ({\
+ u8 x = GET_VS_SEEKER_COUNTER_0();\
+ if (x < 100) gSaveBlock1Ptr->trainerRematch.stepCounter++;\
+})
+#define INC_VS_SEEKER_COUNTER_1() ({\
+ u8 x = GET_VS_SEEKER_COUNTER_1();\
+ if (x < 100) {x++; SET_VS_SEEKER_COUNTER_1(x);}\
+})
+
void sub_810C604(void);
void sub_810C640(void);