Skip to content

Commit

Permalink
last commit for today
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jul 30, 2024
1 parent 3837a6c commit f8f8411
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 21 deletions.
26 changes: 18 additions & 8 deletions Project.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<!-- _________________________ Application Settings _________________________ -->
<!-- [ Application Settings ] -->

<app title="Rhythmo" file="Rhythmo" main="Main" version="0.2.5" company="Joalor64" />

<!-- ____________________________ Window Settings ___________________________ -->
<!-- [ Window Settings ] -->

<window width="1280" height="720" fps="60" background="#000000" hardware="true" vsync="false" />
<window if="desktop" orientation="landscape" fullscreen="false" resizable="true" />
<window if="mobile" orientation="landscape" fullscreen="true" width="0" height="0" />

<!-- _____________________________ Path Settings ____________________________ -->
<!-- [ Path Settings ] -->

<set name="BUILD_DIR" value="export/debug" if="debug" />
<set name="BUILD_DIR" value="export/release" unless="debug" />

<source path="source" />
<assets path="assets" />

<!-- _______________________________ Libraries ______________________________ -->
<!-- [ Libraries ] -->

<haxelib name="flixel" />
<haxelib name="flixel-addons" />
Expand All @@ -31,22 +31,32 @@
<haxelib name="hscript" />
<haxelib name="hxcpp-debug-server" if="desktop debug" />

<!-- ______________________________ Haxedefines _____________________________ -->
<!-- [ Defines ] -->

<haxedef name="FLX_RECORD" />
<haxedef name="FLX_NO_MOUSE" if="mobile" />
<haxedef name="FLX_NO_KEYBOARD" if="mobile" />
<haxedef name="FLX_NO_TOUCH" if="desktop" />
<haxedef name="FLX_NO_DEBUG" unless="debug" />
<haxedef name="NAPE_RELEASE_BUILD" unless="debug" />
<haxedef name="HXCPP_CHECK_POINTER" if="desktop release" />
<haxedef name="HXCPP_STACK_LINE" if="desktop release" />
<haxedef name="HXCPP_STACK_TRACE" if="desktop release" />
<haxedef name="HXCPP_GC_BIG_BLOCKS" />

<haxedef name="no-deprecation-warnings" />
<haxedef name="message.reporting" value="pretty" />

<!-- [ Flags ] -->

<haxeflag name="--macro" value="allowPackage('flash')" />
<haxeflag name="--macro" value="include('my.pack')" />

<haxedef name="no-deprecation-warnings" />
<haxedef name="message.reporting" value="pretty" />
<!-- [ Icons ] -->

<icon path="icon.png" />

<!-- _________________________________ Miscellaneous _______________________________ -->
<!-- [ Miscellaneous ] -->

<target id="haxe" tool="linker" if="linux">
<lib name="/usr/lib64/libX11.so" if="HXCPP_M64" /> <!-- linux support -->
Expand Down
2 changes: 1 addition & 1 deletion assets/data/songList.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"songs": [
{"name": "Test", "diff": "Easy"}
{"name": "Test", "diff": "★★"}
]
}
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/states/ControlsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ControlsState extends ExtendableState {
add(bg);

var grid:CustomBackdrop = new CustomBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 0);
grid.velocity.set(40, 40);
grid.setOscillation(2, 10);
add(grid);

Expand Down
7 changes: 6 additions & 1 deletion source/states/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MenuState extends ExtendableState {
add(bg);

var grid:CustomBackdrop = new CustomBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 0);
grid.velocity.set(40, 40);
grid.setOscillation(2, 10);
add(grid);

Expand Down Expand Up @@ -63,6 +63,11 @@ class MenuState extends ExtendableState {
});
}
}

if (Input.is("exit")) {
ExtendableState.switchState(new TitleState());
FlxG.sound.play(Paths.sound('cancel'));
}
}

function changeSelection(change:Int = 0) {
Expand Down
2 changes: 1 addition & 1 deletion source/states/OptionsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OptionsState extends ExtendableState {
add(bg);

var grid:CustomBackdrop = new CustomBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 0);
grid.velocity.set(40, 40);
grid.setOscillation(2, 10);
add(grid);

Expand Down
2 changes: 1 addition & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class PlayState extends ExtendableState {
return false;
}
ExtendableState.switchState(new SongSelectState());
FlxG.sound.playMusic(Paths.music('Basically_Professionally_Musically'));
FlxG.sound.playMusic(Paths.music('Basically_Professionally_Musically'), 0.75);
HighScore.saveScore(song.song, score);
canPause = false;
return true;
Expand Down
9 changes: 5 additions & 4 deletions source/states/SongSelectState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ class SongSelectState extends ExtendableState {
titleTxt.screenCenter(X);
add(titleTxt);

var arrowL:FlxSprite = new FlxSprite(-FlxG.width + 280, 0).loadGraphic(Paths.image('selector/arrow'));
var arrowL:FlxSprite = new FlxSprite(-FlxG.width + 280, FlxG.height / 2).loadGraphic(Paths.image('selector/arrow'));
arrowL.scrollFactor.set();
arrowL.screenCenter(X);
arrowL.scale.set(0.5, 0.5);
arrowL.flipX = true;
add(arrowL);

var arrowR:FlxSprite = new FlxSprite(FlxG.width - 280, 0).loadGraphic(Paths.image('selector/arrow'));
var arrowR:FlxSprite = new FlxSprite(FlxG.width - 280, FlxG.height / 2).loadGraphic(Paths.image('selector/arrow'));
arrowR.scrollFactor.set();
arrowR.screenCenter(X);
arrowR.scale.set(0.5, 0.5);
add(arrowR);

changeSelection();
Expand All @@ -116,6 +116,7 @@ class SongSelectState extends ExtendableState {
if (Input.is("accept")) {
PlayState.song = Song.loadSongfromJson(Paths.formatToSongPath(songListData.songs[currentIndex].name));
ExtendableState.switchState(new PlayState());
FlxG.sound.music.stop();
}
}

Expand Down
7 changes: 3 additions & 4 deletions source/states/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ class TitleState extends ExtendableState {
super.create();

FlxG.mouse.visible = true;
FlxG.sound.playMusic(Paths.music('Basically_Professionally_Musically'));
FlxG.sound.playMusic(Paths.music('Basically_Professionally_Musically'), 0.75);

var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('title/title_bg'));
add(bg);

var grid:CustomBackdrop = new CustomBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 0);
grid.velocity.set(40, 40);
grid.setOscillation(2, 10);
add(grid);

Expand All @@ -28,8 +28,7 @@ class TitleState extends ExtendableState {

FlxTween.tween(logo, {y: logo.y + 50}, 0.6, {ease: FlxEase.quadInOut, type: PINGPONG});

new FlxTimer().start(0.01, (timer) ->
{
new FlxTimer().start(0.01, (tmr:FlxTimer) -> {
if (logo.angle == -4)
FlxTween.angle(logo, logo.angle, 4, 4, {ease: FlxEase.quartInOut});
if (logo.angle == 4)
Expand Down

0 comments on commit f8f8411

Please sign in to comment.