Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"editor.tabSize": 2
},
"haxe.exclude": ["polymod"],
"haxe.enableExtendedIndentation": true,
"haxe.configurations": [["build/hl/debug.hxml"], ["build/hl/release.hxml"]],

Expand Down
27 changes: 15 additions & 12 deletions hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,39 @@
"dependencies": [
{
"name": "format",
"type": "haxelib",
"version": "3.8.0"
"type": "git",
"dir": null,
"ref": "9d69fb342d030fa120d2deafafbbffad248332b8",
"url": "https://github.com/HaxeFoundation/format"
},
{
"name": "hashlink",
"type": "git",
"dir": "other/haxelib",
"ref": "b44a11a755e85bd04baf5d2bb053dfdbdda8e25d",
"ref": "9b9b9d31572d2bacadf8ea32480c7fb88b4fc662",
"url": "https://github.com/HaxeFoundation/hashlink"
},
{
"name": "heaps",
"type": "git",
"dir": null,
"ref": "e458125e740909b7aedeb1be88d946af57b0b81c",
"ref": "0c5b02f4e601868b9e1d8a9b4bd1c9b3bb2216b4",
"url": "https://github.com/HeapsIO/heaps"
},
{
"name": "hldx",
"path": ".haxelib/hashlink/git/libs/directx",
"type": "dev"
},
{
"name": "hlopenal",
"type": "git",
"dir": "libs/openal",
"ref": "b44a11a755e85bd04baf5d2bb053dfdbdda8e25d",
"url": "https://github.com/HaxeFoundation/hashlink"
"path": ".haxelib/hashlink/git/libs/openal",
"type": "dev"
},
{
"name": "hlsdl",
"type": "git",
"dir": "libs/sdl",
"ref": "b44a11a755e85bd04baf5d2bb053dfdbdda8e25d",
"url": "https://github.com/HaxeFoundation/hashlink"
"path": ".haxelib/hashlink/git/libs/sdl",
"type": "dev"
},
{
"name": "hxcpp",
Expand Down
8 changes: 4 additions & 4 deletions src/funkin/Conductor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Conductor
measureHit = new Signal<Void->Void>();

changeBPM(100);
time = 0;
time = -1;
}

/**
Expand Down Expand Up @@ -325,9 +325,9 @@ class Conductor

function set_time(value:Float):Float
{
var oldStep:Int = curStep;
var oldBeat:Int = curBeat;
var oldMeasure:Int = curMeasure;
final oldStep:Int = curStep;
final oldBeat:Int = curBeat;
final oldMeasure:Int = curMeasure;

time = value;

Expand Down
4 changes: 2 additions & 2 deletions src/funkin/ui/FunkinScene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class FunkinScene extends Scene implements IEventDispatcher

function beatHit():Void
{
final event:ConductorEvent = new ConductorEvent(STEP, Conductor.instance);
final event:ConductorEvent = new ConductorEvent(BEAT, Conductor.instance);
dispatchFunkinEvent(event);
}

function measureHit():Void
{
final event:ConductorEvent = new ConductorEvent(STEP, Conductor.instance);
final event:ConductorEvent = new ConductorEvent(MEASURE, Conductor.instance);
dispatchFunkinEvent(event);
}
}
36 changes: 29 additions & 7 deletions src/funkin/ui/title/TitleScene.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
package funkin.ui.title;

import hxd.Event;
import hxd.Key;

enum TitleState
{
Intro;
Idle;
Begin;
}

class TitleScene extends FunkinScene
{
public var state:TitleState = Intro;

/**
* The sprite containing GF bopping to the beat.
*/
Expand Down Expand Up @@ -46,6 +58,23 @@ class TitleScene extends FunkinScene
titleText.animation.addByPrefix('idle', 'Press Enter to Begin', 24, true);
titleText.animation.play('idle');
addChild(titleText);

state = Idle;

addEventListener(event ->
{
if (event.kind == EKeyDown && event.keyCode == Key.ENTER)
pressEnter();
});
}

public function pressEnter()
{
if (state == Begin)
return;
state = Begin;

trace("entr");
}

override function beatHit():Void
Expand All @@ -64,10 +93,3 @@ class TitleScene extends FunkinScene
super.sync(ctx);
}
}

enum TitleState
{
Intro;
Idle;
Begin;
}
Loading