summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdflyer <jdflyer10@gmail.com>2021-07-10 10:32:43 -0700
committerjdflyer <jdflyer10@gmail.com>2021-07-10 10:32:43 -0700
commitcd479e703c3c1b7374f5088d9e20300946631b91 (patch)
treebe2f661712e47a9b61e3e82be3ca5700a2b7519c
parent53a9bb6ebee0070a7dc03dd53bc3ab5bbf69b11b (diff)
clang format
-rw-r--r--include/tools.h4
-rw-r--r--include/tp/Z2SceneMgr.h22
-rw-r--r--include/tp/Z2SeqMgr.h12
-rw-r--r--source/tools.cpp11
4 files changed, 31 insertions, 18 deletions
diff --git a/include/tools.h b/include/tools.h
index 78dd683..805408a 100644
--- a/include/tools.h
+++ b/include/tools.h
@@ -56,9 +56,9 @@ namespace libtp::tools
/**
* @brief Generates a random number based on a seed and a maximum number
- *
+ *
* @param seed A reference to the seed that's being used
* @param max The maximum number to be generated by the function
*/
- uint32_t getRandom(uint64_t* seed,uint32_t max);
+ uint32_t getRandom( uint64_t* seed, uint32_t max );
} // namespace libtp::tools \ No newline at end of file
diff --git a/include/tp/Z2SceneMgr.h b/include/tp/Z2SceneMgr.h
index 0d8a775..4d84f5a 100644
--- a/include/tp/Z2SceneMgr.h
+++ b/include/tp/Z2SceneMgr.h
@@ -2,7 +2,7 @@
* @file Z2SceneMgr.h
* @author jdflyer
* @brief Provides a funciton definition for the sceneChange function
- *
+ *
* @bug No known bugs
*/
@@ -11,22 +11,32 @@
#include <cstdint>
-namespace libtp::tp::z2audiolib::z2scenemgr {
+namespace libtp::tp::z2audiolib::z2scenemgr
+{
struct Z2SceneMgr;
/**
*@todo Move JAISoundID to its own file
*/
- struct JAISoundID {
+ struct JAISoundID
+ {
uint32_t id;
};
- extern "C" {
+ extern "C"
+ {
/**
* @brief sceneChange is called when the game changes the BGM playing
*/
- void sceneChange(Z2SceneMgr* sceneMgr, JAISoundID id,uint8_t SeWave1,uint8_t SeWave2,uint8_t BgmWave1,uint8_t BgmWave2,uint8_t DemoWave,bool param_7);
+ void sceneChange( Z2SceneMgr* sceneMgr,
+ JAISoundID id,
+ uint8_t SeWave1,
+ uint8_t SeWave2,
+ uint8_t BgmWave1,
+ uint8_t BgmWave2,
+ uint8_t DemoWave,
+ bool param_7 );
};
-} //namespace libtp::tp::z2audiolib::z2scenemgr
+} // namespace libtp::tp::z2audiolib::z2scenemgr
#endif \ No newline at end of file
diff --git a/include/tp/Z2SeqMgr.h b/include/tp/Z2SeqMgr.h
index b76871a..3e0b497 100644
--- a/include/tp/Z2SeqMgr.h
+++ b/include/tp/Z2SeqMgr.h
@@ -2,7 +2,7 @@
* @file Z2SeqMgr.h
* @author jdflyer
* @brief Provides the definition for the funciton that starts the enemy BGM
- *
+ *
* @bug No known bugs
*/
#ifndef TP_Z2SEQMGR_H
@@ -10,12 +10,14 @@
#include <cstdint>
-namespace libtp::tp::z2audiolib::z2seqmgr {
+namespace libtp::tp::z2audiolib::z2seqmgr
+{
struct Z2SeqMgr;
- extern "C" {
- void startBattleBgm(Z2SeqMgr* seqMgr, bool param_1);
+ extern "C"
+ {
+ void startBattleBgm( Z2SeqMgr* seqMgr, bool param_1 );
}
-} // namespace libtp::tp::z2audiolib::z2seqmgr
+} // namespace libtp::tp::z2audiolib::z2seqmgr
#endif \ No newline at end of file
diff --git a/source/tools.cpp b/source/tools.cpp
index dd5895b..08f519f 100644
--- a/source/tools.cpp
+++ b/source/tools.cpp
@@ -134,11 +134,12 @@ namespace libtp::tools
return result;
}
- uint32_t getRandom(uint64_t* seed,uint32_t max){
- uint64_t z = (*seed += 0x9e3779b97f4a7c15);
- z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9;
- z = (z ^ (z >> 27)) * 0x94d049bb133111eb;
+ uint32_t getRandom( uint64_t* seed, uint32_t max )
+ {
+ uint64_t z = ( *seed += 0x9e3779b97f4a7c15 );
+ z = ( z ^ ( z >> 30 ) ) * 0xbf58476d1ce4e5b9;
+ z = ( z ^ ( z >> 27 ) ) * 0x94d049bb133111eb;
- return (z % max);
+ return ( z % max );
}
} // namespace libtp::tools \ No newline at end of file