Skip to content

Commit 44b29ea

Browse files
Merge branch 'alpha' into pr/silver984/17
2 parents 59920c3 + ba0b18a commit 44b29ea

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
text=auto

Project.hxp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ class Project extends HXProject
3939
*/
4040
public final FUNKIN_GIT_DETAILS:FeatureFlag = 'FUNKIN_GIT_DETAILS';
4141

42+
/**
43+
* `-DFUNKIN_ASSETS_FORWARDING`
44+
* Whether the game should forward its asset fetching to the root of the repository.
45+
* Developers can set this by checking the flag above.
46+
*/
47+
public final FUNKIN_ASSETS_FORWARDING:FeatureFlag = 'FUNKIN_ASSETS_FORWARDING';
48+
4249
public var GIT_HASH:String = null;
4350

4451
public var GIT_BRANCH:String = null;
@@ -127,6 +134,7 @@ class Project extends HXProject
127134
FUNKIN_DISCORD_RPC.apply(this, platformType == DESKTOP && haxedefs.get('cpp')); // Will be enabled if its on desktop (windows, linux, mac)!
128135
FUNKIN_DOX_GENERATION.apply(this, false); // Will always be false unless you wanna make a documentation website.
129136
FUNKIN_GIT_DETAILS.apply(this, !['stable', 'main', 'master', null].contains(getGitBranch().toLowerCase())); // Will show if it isn't the main branch!
137+
FUNKIN_ASSETS_FORWARDING.apply(this, platformType == DESKTOP && debug);
130138
}
131139

132140
public function setupHaxelibs():Void
@@ -149,7 +157,7 @@ class Project extends HXProject
149157
public function setupHaxeDefines():Void
150158
{
151159
addHaxeDefine('doc-gen', FUNKIN_DOX_GENERATION.isEnabled(this));
152-
addHaxeDefine('FLX_CUSTOM_ASSETS_DIRECTORY', 'assets', platformType == DESKTOP && debug);
160+
addHaxeDefine('FLX_CUSTOM_ASSETS_DIRECTORY', 'assets', FUNKIN_ASSETS_FORWARDING.isEnabled(this));
153161
addHaxeDefine('FLX_NO_DEBUG', !debug);
154162
addHaxeDefine('FLX_NO_FOCUS_LOST_SCREEN');
155163
addHaxeDefine('FLX_NO_HEALTH');

src/funkin/objects/gameplay/strumline/Strumline.hx

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -219,36 +219,27 @@ class Strumline extends FlxSpriteGroup
219219

220220
override public function update(elapsed:Float):Void
221221
{
222-
while (true)
222+
while (noteDataLeft.length > 0)
223223
{
224-
if (noteDataLeft.length > 0)
225-
{
226-
renderingSquare.x = x;
227-
renderingSquare.y = calculateNoteYPos(noteDataLeft[0].time);
228-
229-
if (!renderingSquare.isOnScreen())
230-
break;
231-
232-
var noteSprite:NoteSprite = notes.recycle(NoteSprite);
233-
noteSprite.setupNoteSprite(noteDataLeft[0]);
224+
renderingSquare.x = this.x;
225+
renderingSquare.y = calculateNoteYPos(noteDataLeft[0].time);
234226

235-
if ((noteDataLeft[0].length ?? 0) > 0)
236-
{
237-
var sustainNoteSprite:SustainNoteSprite = sustainNotes.recycle(SustainNoteSprite);
238-
sustainNoteSprite.setupSustainSprite(noteDataLeft[0], scrollSpeed);
227+
if (!renderingSquare.isOnScreen() && (noteDataLeft[0].time - conductorInUse.time) > 0)
228+
break;
239229

240-
noteSprite.sustainSprite = sustainNoteSprite;
241-
}
230+
var noteSprite:NoteSprite = notes.recycle(NoteSprite);
231+
noteSprite.setupNoteSprite(noteDataLeft[0]);
242232

243-
// FlxG.log.add('Rendered note at ${noteDataLeft[0].time}');
244-
noteDataLeft.shift();
245-
}
246-
else
233+
if ((noteDataLeft[0].length ?? 0) > 0)
247234
{
248-
// doesnt need to be used anymore!
249-
renderingSquare = FlxDestroyUtil.destroy(renderingSquare);
250-
break;
235+
var sustainNoteSprite:SustainNoteSprite = sustainNotes.recycle(SustainNoteSprite);
236+
sustainNoteSprite.setupSustainSprite(noteDataLeft[0], scrollSpeed);
237+
238+
noteSprite.sustainSprite = sustainNoteSprite;
251239
}
240+
241+
// FlxG.log.add('Rendered note at ${noteDataLeft[0].time}');
242+
noteDataLeft.shift();
252243
}
253244

254245
for (note in notes.members)

0 commit comments

Comments
 (0)