mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Merge pull request #1697 from Kurausukun/bpm
Use Floats and Round Correctly in Tempo Calculation
This commit is contained in:
commit
06c9e0eb99
@ -18,6 +18,7 @@
|
|||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -503,7 +504,7 @@ void PrintAgbTrack(std::vector<Event>& events)
|
|||||||
ResetTrackVars();
|
ResetTrackVars();
|
||||||
break;
|
break;
|
||||||
case EventType::Tempo:
|
case EventType::Tempo:
|
||||||
PrintByte("TEMPO , %u*%s_tbs/2", 60000000 / event.param2, g_asmLabel.c_str());
|
PrintByte("TEMPO , %u*%s_tbs/2", static_cast<int>(round(60000000.0f / static_cast<float>(event.param2))), g_asmLabel.c_str());
|
||||||
PrintWait(event.time);
|
PrintWait(event.time);
|
||||||
break;
|
break;
|
||||||
case EventType::InstrumentChange:
|
case EventType::InstrumentChange:
|
||||||
|
Loading…
Reference in New Issue
Block a user