summaryrefslogtreecommitdiff
path: root/include
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
parent0035d25cfc4c2b9a0d9d427ccfad322037ef8464 (diff)
decomp unk_810C3A4 as part of vs_seeker
Diffstat (limited to 'include')
-rw-r--r--include/global.h8
-rw-r--r--include/map_obj_80688E4.h1
-rw-r--r--include/map_obj_lock.h1
-rw-r--r--include/unk_810c3a4.h19
4 files changed, 28 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h
index 60185af00..461402f1f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -692,6 +692,12 @@ struct TrainerTowerLog
u8 unkA_6:2;
};
+struct TrainerRematchState
+{
+ u16 stepCounter;
+ u8 rematches[100];
+};
+
struct SaveBlock1
{
/*0x0000*/ struct Coords16 pos;
@@ -719,7 +725,7 @@ struct SaveBlock1
/*0x05F8*/ u8 seen1[DEX_FLAGS_NO];
/*0x062C*/ u16 berryBlenderRecords[3]; // unused
/*0x0632*/ u8 field_632[6]; // unused?
- /*0x0638*/ u8 trainerRematchStepCounter;
+ /*0x0638*/ u16 trainerRematchStepCounter;
/*0x063A*/ u8 ALIGNED(2) trainerRematches[100];
/*0x06A0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT];
/*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64];
diff --git a/include/map_obj_80688E4.h b/include/map_obj_80688E4.h
index 9ab76646d..de871fd64 100644
--- a/include/map_obj_80688E4.h
+++ b/include/map_obj_80688E4.h
@@ -4,5 +4,6 @@
#include "global.h"
void player_bitmagic(void);
+void FreezeMapObject(struct MapObject *);
#endif //GUARD_MAP_OBJ_80688E4_H
diff --git a/include/map_obj_lock.h b/include/map_obj_lock.h
index 2927ca26d..0d130973b 100644
--- a/include/map_obj_lock.h
+++ b/include/map_obj_lock.h
@@ -10,5 +10,6 @@ void LockSelectedMapObject(void);
void sub_8098630(void);
bool8 sub_8098734(void);
void sub_80696C0(void);
+bool8 walkrun_is_standing_still(void);
#endif // GUARD_MAP_OBJ_LOCK_H
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);