summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlunarsoap5 <justindakotacarter@gmail.com>2021-08-05 16:00:33 -0500
committerlunarsoap5 <justindakotacarter@gmail.com>2021-08-05 16:00:33 -0500
commit9a1843ab8a2ddb12b219dfef8333f3d836c9df13 (patch)
treeb0a842520c55a6c43efaf6d4c885b6d79a28dcfc
parent152d38271ee9c72bdd6b665c4cdf886194572901 (diff)
Added function definitions for multiple functions to be used by getLayerNo_common_common.
Also updated function definitions for onEventBit and offEventBit as we know their structure now.
-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.h23
3 files changed, 46 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..ec374a1 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( uint32_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.
+ */
+ uint32_t getLayerNo_common_common(const char *stageName, uint8_t roomId, uint32_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..b098062 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,35 @@ 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 twilightNode The twilight instance to be checked.
+ */
+ bool isDarkClearLV( uint8_t twilightNode );
+
+ /**
+ * @brief Checks whether or not Link has been transformed into wolf by a twilight CS
+ *
+ * @param twilightEvent The twilight cutscene event to be checked.
+ */
+ bool isTransformLV( uint8_t twilightEvent );
+
+ extern uint16_t saveBitLabels[0x338]; //saveBitLabels__16dSv_event_flag_c
}
} // namespace libtp::tp::d_save
#endif \ No newline at end of file