fix rounding bug for bonus time

This commit is contained in:
RandomityGuy 2022-12-19 19:49:11 +05:30
parent 3437c09fdc
commit 180883a0f2
5 changed files with 7946 additions and 5 deletions

10
compile-js-rel.hxml Normal file
View file

@ -0,0 +1,10 @@
-cp src
-lib heaps
-lib stb_ogg_sound
-lib zip
-lib uglifyjs
--js marblegame.js
-D windowSize=1280x720
-D js-es=6
--dce full
--main Main

View file

@ -1 +1 @@
by17:font%2FExpo50.fntaoy3:veri1y4:timei1626163037y4:hashy40:f2bb3df897a1cbe1bc70650168d9ecf7de1195f1y3:outy24:tmp%2Ffont%2FExpo50.bfntghy17:font%2FExpo32.fntaoR1i1R2i1626163037R3y40:d3397b6efedac7bfa90be848901a0167dfd32e7eR5y24:tmp%2Ffont%2FExpo32.bfntghy24:font%2FDomCasual32px.fntaoR1i1R2i1626163037R3y40:f9ae7ff4e7b94f78bd6a050e51a9f92fbfdbb40cR5y31:tmp%2Ffont%2FDomCasual32px.bfntghy24:font%2FDomCasual24px.fntaoR1i1R2i1626163037R3y40:f5f86d351ba84a7e1a5f1a459463a4eaf66ca893R5y31:tmp%2Ffont%2FDomCasual24px.bfntghy24:font%2FArialBold14px.fntaoR1i1R2i1626163037R3y40:4f58a547a119d447806129c12b660d267212a382R5y31:tmp%2Ffont%2FArialBold14px.bfntghy18:font%2FArial14.fntaoR1i1R2i1626163037R3y40:5433840b11f487315b7372dd95a79eda5986d558R5y25:tmp%2Ffont%2FArial14.bfntghh
by16:font%2Farial.fntaoy3:veri1y4:timei1659272757y4:hashy40:dc7f069d72e0d1b6b7edfd5b9e6af9c22f9c641cy3:outy23:tmp%2Ffont%2Farial.bfntghy21:font%2FMarkerFelt.fntaoR1i1R2i1668693206R3y40:e4058d0003f9c91e9322426f3923c2f5dd95ed17R5y28:tmp%2Ffont%2FMarkerFelt.bfntghy17:font%2FExpo50.fntaoR1i1R2i1626163037R3y40:f2bb3df897a1cbe1bc70650168d9ecf7de1195f1R5y24:tmp%2Ffont%2FExpo50.bfntghy17:font%2FExpo32.fntaoR1i1R2i1626163037R3y40:d3397b6efedac7bfa90be848901a0167dfd32e7eR5y24:tmp%2Ffont%2FExpo32.bfntghy16:font%2FEXPON.fntaoR1i1R2i1659272757R3y40:ba8ecd55d9475ee0f9d20c9a5189fe6a9c9ff727R5y23:tmp%2Ffont%2FEXPON.bfntghy21:font%2FDomCasualD.fntaoR1i1R2i1659272757R3y40:ea40ffbf969a51d3e653a3d09b450143a814c7eeR5y28:tmp%2Ffont%2FDomCasualD.bfntghy24:font%2FDomCasual32px.fntaoR1i1R2i1626163037R3y40:f9ae7ff4e7b94f78bd6a050e51a9f92fbfdbb40cR5y31:tmp%2Ffont%2FDomCasual32px.bfntghy24:font%2FDomCasual24px.fntaoR1i1R2i1626163037R3y40:f5f86d351ba84a7e1a5f1a459463a4eaf66ca893R5y31:tmp%2Ffont%2FDomCasual24px.bfntghy24:font%2FArialBold14px.fntaoR1i1R2i1626163037R3y40:4f58a547a119d447806129c12b660d267212a382R5y31:tmp%2Ffont%2FArialBold14px.bfntghy18:font%2FArial14.fntaoR1i1R2i1626163037R3y40:5433840b11f487315b7372dd95a79eda5986d558R5y25:tmp%2Ffont%2FArial14.bfntghy23:font%2FArial%20Bold.fntaoR1i1R2i1659272757R3y40:dce4a5edf92262f9ea5540d55271f8423683d064R5y30:tmp%2Ffont%2FArial%20Bold.bfntghh

7931
replay_pid19048.log Normal file

File diff suppressed because one or more lines are too long

View file

@ -268,9 +268,9 @@ class Util {
public static function formatTime(time:Float) {
var et = time * 1000;
var thousandth = Math.floor(et % 10);
var hundredth = Math.floor((et % 1000) / 10);
var totalSeconds = Math.floor(et / 1000);
var thousandth = Std.int(et % 10);
var hundredth = Std.int((et % 1000) / 10);
var totalSeconds = Std.int(et / 1000);
var seconds = totalSeconds % 60;
var minutes = (totalSeconds - seconds) / 60;

View file

@ -130,7 +130,7 @@ class EndGameGui extends GuiControl {
pg.addChild(leftColumn);
var elapsedTime = Math.max(timeState.currentAttemptTime - 3.5, 0);
var bonusTime = Math.max(0, elapsedTime - timeState.gameplayClock);
var bonusTime = Math.max(0, Std.int((elapsedTime - timeState.gameplayClock) * 1000) / 1000);
var rightColumn = new GuiMLText(domcasual32, mlFontLoader);
rightColumn.text.lineSpacing = 5;