summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Henke <maurice@henke.gg>2021-09-20 13:45:26 +0200
committerGitHub <noreply@github.com>2021-09-20 13:45:26 +0200
commitc26396a37e3117b37076ba609edecc2cf3f909dc (patch)
tree0d6ae5787d3243cec8fb30671612a7b33fb4b451
parent6e5b2a626ab58159c7159723ee1c07d5446ca376 (diff)
parentd57e0aa04c11523b2838b091856b547904aaf545 (diff)
Merge pull request #8 from zsrtp/getLayerNo_common_common
Added function definitions for multiple functions to be used by getLayerNo_common_common.
-rw-r--r--include/tp/d_a_alink.h8
-rw-r--r--include/tp/d_com_inf_game.h17
-rw-r--r--include/tp/d_save.h25
3 files changed, 48 insertions, 2 deletions
diff --git a/include/tp/d_a_alink.h b/include/tp/d_a_alink.h
index 1fc8945..6865c60 100644
--- a/include/tp/d_a_alink.h
+++ b/include/tp/d_a_alink.h
@@ -6,6 +6,7 @@
*
* @author AECX
* @author Zephiles
+ * @author Lunar Soap
* @bug No known bugs.
*/
#ifndef TP_D_A_ALINK_H
@@ -145,6 +146,13 @@ namespace libtp::tp::d_a_alink
*/
bool procGanonFinish( void* d_a_alink );
+ /**
+ * @brief Checks to see if an eventBit for the currently active save is set.
+ *
+ * @param flag Offset+Flag
+ */
+ bool dComIfGs_isEventBit( uint16_t flag );
+
extern ClimbVars climbVars;
extern LinkStatus* linkStatus;
}
diff --git a/include/tp/d_com_inf_game.h b/include/tp/d_com_inf_game.h
index bccef8f..b8bd382 100644
--- a/include/tp/d_com_inf_game.h
+++ b/include/tp/d_com_inf_game.h
@@ -6,6 +6,7 @@
*
* @author Zephiles
* @author AECX
+ * @author Lunar Soap
* @bug No known bugs.
*/
#ifndef TP_D_COM_INF_GAME_H
@@ -124,6 +125,22 @@ namespace libtp::tp::d_com_inf_game
extern "C"
{
extern GameInfo dComIfG_gameInfo;
+
+ /**
+ * @brief Checks the current time and sets the proper layer based on the current layer.
+ *
+ * @param pLayer The pointer to the current layer.
+ */
+ void dComIfG_get_timelayer( int32_t* pLayer );
+
+ /**
+ * @brief Returns the layer for the current stage after checking the appropriate flags.
+ *
+ * @param stageName The current stage.
+ * @param roomId The current room.
+ * @param layerOverride The initial layer to be returned.
+ */
+ int32_t getLayerNo_common_common(const char* stageName, int32_t roomId, int32_t layerOverride);
}
} // namespace libtp::tp::d_com_inf_game
#endif \ No newline at end of file
diff --git a/include/tp/d_save.h b/include/tp/d_save.h
index c8e93d4..e14536c 100644
--- a/include/tp/d_save.h
+++ b/include/tp/d_save.h
@@ -2,6 +2,7 @@
* @brief Holds symbols of the d_save field
*
* @author AECX
+* @author Lunar Soap
* @bug No known bugs.
*/
#ifndef TP_D_SAVE_H
@@ -55,17 +56,37 @@ namespace libtp::tp::d_save
/**
* @brief Sets an eventBit for the currently active save
*
+ * @param eventPtr The pointer to the event bits.
* @param flag Offset+Flag
*/
- void onEventBit( uint16_t flag );
+ void onEventBit( uint8_t* eventPtr, uint16_t flag );
/**
* @brief Unsets an eventBit for the currently active save
*
+ * @param eventPtr The pointer to the event bits.
* @param flag Offset+Flag
*/
- void offEventBit( uint16_t flag );
+ void offEventBit( uint8_t* eventPtr, uint16_t flag );
+
+ /**
+ * @brief Checks whether the player has cleared the specified twilight.
+ *
+ * @param playerStatusPtr The pointer to the PlayerStatus struct.
+ * @param twilightNode The twilight instance to be checked.
+ */
+ bool isDarkClearLV( void* playerStatusPtr, int32_t twilightNode );
+
+ /**
+ * @brief Checks whether or not Link has been transformed into wolf by a twilight CS
+ *
+ * @param playerStatusPtr The pointer to the PlayerStatus struct.
+ * @param twilightEvent The twilight cutscene event to be checked.
+ */
+ bool isTransformLV( void* playerStatusPtr, int32_t twilightEvent );
+
+ extern uint16_t saveBitLabels[0x336]; //saveBitLabels__16dSv_event_flag_c
}
} // namespace libtp::tp::d_save
#endif \ No newline at end of file