1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-09-05 05:07:39 +00:00

Compare commits

...

6 commits

Author SHA1 Message Date
Lasercar abd9af89fc
Merge a3dbe990a8 into 54ad34e5d0 2025-08-31 02:06:55 +10:00
MAJigsaw77 54ad34e5d0 Fix the app icon not working on Linux. 2025-08-27 14:57:20 -07:00
Cameron Taylor f6fb11de4c hardcode 'touch here to play' graphic to be scaled at 0.5x instead FUNK-2710 2025-08-28 03:25:53 +08:00
MoonDroid 83aa45a318 4x4 Compression for all of pico's results animations 2025-08-28 01:19:11 +08:00
MoonDroid 65186a336d Update Mobile build number 2025-08-28 00:40:24 +08:00
Lasercar a3dbe990a8 Freeplay results screen 2025-08-03 21:05:47 +10:00
6 changed files with 113 additions and 11 deletions

View file

@ -9,6 +9,18 @@
"asset": "asset/shared/images/resultScreen/results-pico/resultsPERFECT/spritemap1.png",
"blocksize": "4x4"
},
{
"asset": "asset/shared/images/resultScreen/results-pico/resultsGREAT/spritemap1.png",
"blocksize": "4x4"
},
{
"asset": "asset/shared/images/resultScreen/results-pico/resultsGOOD/spritemap1.png",
"blocksize": "4x4"
},
{
"asset": "asset/shared/images/resultScreen/results-pico/resultsSHIT/spritemap1.png",
"blocksize": "4x4"
},
{
"asset": "assets/preload/images/NOTE_assets.png",
"blocksize": "4x4"

View file

@ -37,7 +37,7 @@ class Project extends HXProject
* The build's number and version code.
* Used when publishing the game to mobile app stores. Should increment with each patch.
*/
static final BUILD_NUMBER:Int = 2;
static final BUILD_NUMBER:Int = 51;
/**
* The game's name. Used as the default window title.
@ -489,7 +489,11 @@ class Project extends HXProject
configureHaxelibs();
configureASTCTextures();
configureAssets();
configureIcons();
if (!isLinux())
{
configureIcons();
}
if (FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this))
{

View file

@ -62,6 +62,7 @@ class Controls extends FlxActionSet
var _freeplay_char_select = new FunkinAction(Action.FREEPLAY_CHAR_SELECT);
var _freeplay_jump_to_top = new FunkinAction(Action.FREEPLAY_JUMP_TO_TOP);
var _freeplay_jump_to_bottom = new FunkinAction(Action.FREEPLAY_JUMP_TO_BOTTOM);
var _freeplay_results_screen = new FunkinAction(Action.FREEPLAY_RESULTS_SCREEN);
var _cutscene_advance = new FunkinAction(Action.CUTSCENE_ADVANCE);
#if FEATURE_DEBUG_MENU
var _debug_menu = new FunkinAction(Action.DEBUG_MENU);
@ -283,6 +284,11 @@ class Controls extends FlxActionSet
inline function get_FREEPLAY_JUMP_TO_BOTTOM()
return _freeplay_jump_to_bottom.check();
public var FREEPLAY_RESULTS_SCREEN(get, never):Bool;
inline function get_FREEPLAY_RESULTS_SCREEN()
return _freeplay_results_screen.check();
public var CUTSCENE_ADVANCE(get, never):Bool;
inline function get_CUTSCENE_ADVANCE()
@ -348,6 +354,7 @@ class Controls extends FlxActionSet
add(_freeplay_char_select);
add(_freeplay_jump_to_top);
add(_freeplay_jump_to_bottom);
add(_freeplay_results_screen);
add(_cutscene_advance);
#if FEATURE_DEBUG_MENU add(_debug_menu); #end
#if FEATURE_CHART_EDITOR add(_debug_chart); #end
@ -476,6 +483,7 @@ class Controls extends FlxActionSet
case FREEPLAY_CHAR_SELECT: _freeplay_char_select;
case FREEPLAY_JUMP_TO_TOP: _freeplay_jump_to_top;
case FREEPLAY_JUMP_TO_BOTTOM: _freeplay_jump_to_bottom;
case FREEPLAY_RESULTS_SCREEN: _freeplay_results_screen;
case CUTSCENE_ADVANCE: _cutscene_advance;
#if FEATURE_DEBUG_MENU case DEBUG_MENU: _debug_menu; #end
#if FEATURE_CHART_EDITOR case DEBUG_CHART: _debug_chart; #end
@ -559,6 +567,8 @@ class Controls extends FlxActionSet
func(_freeplay_jump_to_top, JUST_PRESSED);
case FREEPLAY_JUMP_TO_BOTTOM:
func(_freeplay_jump_to_bottom, JUST_PRESSED);
case FREEPLAY_RESULTS_SCREEN:
func(_freeplay_results_screen, JUST_PRESSED);
case CUTSCENE_ADVANCE:
func(_cutscene_advance, JUST_PRESSED);
#if FEATURE_DEBUG_MENU
@ -786,6 +796,7 @@ class Controls extends FlxActionSet
bindKeys(Control.FREEPLAY_CHAR_SELECT, getDefaultKeybinds(scheme, Control.FREEPLAY_CHAR_SELECT));
bindKeys(Control.FREEPLAY_JUMP_TO_TOP, getDefaultKeybinds(scheme, Control.FREEPLAY_JUMP_TO_TOP));
bindKeys(Control.FREEPLAY_JUMP_TO_BOTTOM, getDefaultKeybinds(scheme, Control.FREEPLAY_JUMP_TO_BOTTOM));
bindKeys(Control.FREEPLAY_RESULTS_SCREEN, getDefaultKeybinds(scheme, Control.FREEPLAY_RESULTS_SCREEN));
bindKeys(Control.CUTSCENE_ADVANCE, getDefaultKeybinds(scheme, Control.CUTSCENE_ADVANCE));
#if FEATURE_DEBUG_MENU
bindKeys(Control.DEBUG_MENU, getDefaultKeybinds(scheme, Control.DEBUG_MENU));
@ -828,6 +839,7 @@ class Controls extends FlxActionSet
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
case Control.FREEPLAY_JUMP_TO_TOP: return [HOME];
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [END];
case Control.FREEPLAY_RESULTS_SCREEN: return [R];
case Control.CUTSCENE_ADVANCE: return [Z, ENTER];
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return [GRAVEACCENT]; #end
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
@ -859,6 +871,7 @@ class Controls extends FlxActionSet
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
case Control.FREEPLAY_JUMP_TO_TOP: return [HOME];
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [END];
case Control.FREEPLAY_RESULTS_SCREEN: return [R];
case Control.CUTSCENE_ADVANCE: return [G, Z];
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return [GRAVEACCENT]; #end
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
@ -890,6 +903,7 @@ class Controls extends FlxActionSet
case Control.FREEPLAY_CHAR_SELECT: return [];
case Control.FREEPLAY_JUMP_TO_TOP: return [];
case Control.FREEPLAY_JUMP_TO_BOTTOM: return [];
case Control.FREEPLAY_RESULTS_SCREEN: return [];
case Control.CUTSCENE_ADVANCE: return [ENTER];
#if FEATURE_DEBUG_MENU case Control.DEBUG_MENU: return []; #end
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
@ -984,6 +998,7 @@ class Controls extends FlxActionSet
Control.FREEPLAY_CHAR_SELECT => getDefaultGamepadBinds(Control.FREEPLAY_CHAR_SELECT),
Control.FREEPLAY_JUMP_TO_TOP => getDefaultGamepadBinds(Control.FREEPLAY_JUMP_TO_TOP),
Control.FREEPLAY_JUMP_TO_BOTTOM => getDefaultGamepadBinds(Control.FREEPLAY_JUMP_TO_BOTTOM),
Control.FREEPLAY_RESULTS_SCREEN => getDefaultGamepadBinds(Control.FREEPLAY_RESULTS_SCREEN),
Control.VOLUME_UP => getDefaultGamepadBinds(Control.VOLUME_UP),
Control.VOLUME_DOWN => getDefaultGamepadBinds(Control.VOLUME_DOWN),
Control.VOLUME_MUTE => getDefaultGamepadBinds(Control.VOLUME_MUTE),
@ -1047,6 +1062,8 @@ class Controls extends FlxActionSet
return [RIGHT_STICK_DIGITAL_UP];
case Control.FREEPLAY_JUMP_TO_BOTTOM:
return [RIGHT_STICK_DIGITAL_DOWN];
case Control.FREEPLAY_RESULTS_SCREEN:
return [];
case Control.VOLUME_UP:
[];
case Control.VOLUME_DOWN:
@ -1471,6 +1488,7 @@ enum Control
FREEPLAY_CHAR_SELECT;
FREEPLAY_JUMP_TO_TOP;
FREEPLAY_JUMP_TO_BOTTOM;
FREEPLAY_RESULTS_SCREEN;
// WINDOW
#if FEATURE_SCREENSHOTS WINDOW_SCREENSHOT; #end
WINDOW_FULLSCREEN;
@ -1530,6 +1548,7 @@ enum abstract Action(String) to String from String
var FREEPLAY_CHAR_SELECT = "freeplay_char_select";
var FREEPLAY_JUMP_TO_TOP = "freeplay_jump_to_top";
var FREEPLAY_JUMP_TO_BOTTOM = "freeplay_jump_to_bottom";
var FREEPLAY_RESULTS_SCREEN = "freeplay_results_screen";
// VOLUME
var VOLUME_UP = "volume_up";
var VOLUME_DOWN = "volume_down";

View file

@ -1718,6 +1718,12 @@ class FreeplayState extends MusicBeatSubState
{
currentCapsule.onConfirm();
}
if (intendedScore > 0 && controls.FREEPLAY_RESULTS_SCREEN && controls.active)
{
controls.active = false;
moveToResultsScreen();
}
}
}
function handleDirectionalInput(elapsed:Float):Void
@ -2851,6 +2857,53 @@ class FreeplayState extends MusicBeatSubState
return result;
}
@:nullSafety(Off) // This shouldn't cause any issues, right?
function moveToResultsScreen():Void
{
var save = Save.instance;
var song = save.getSongScore(rememberedSongId, currentDifficulty);
if (song != null)
{
// Ok, so there's actually a score for this song on this difficulty
var songEntry = SongRegistry.instance.fetchEntry(rememberedSongId);
var songName = songEntry.songName;
var songArtist = songEntry.songArtist;
var songScore = song.score;
// persistentUpdate = false;
var talliesToUse = song.tallies;
var res:funkin.play.ResultState = new funkin.play.ResultState(
{
storyMode: false,
songId: rememberedSongId,
difficultyId: currentDifficulty,
characterId: rememberedCharacterId,
title: ('${songName} by ${songArtist}'),
prevScoreData: song,
scoreData:
{
score: songScore,
tallies:
{
sick: talliesToUse.sick,
good: talliesToUse.good,
bad: talliesToUse.bad,
shit: talliesToUse.shit,
missed: talliesToUse.missed,
combo: talliesToUse.combo,
maxCombo: talliesToUse.maxCombo,
totalNotesHit: talliesToUse.totalNotesHit,
totalNotes: talliesToUse.totalNotes,
},
},
isNewHighscore: false
});
// this.persistentDraw = false;
openSubState(res);
}
}
function favoriteSong():Void
{
var selectedCapsule = currentCapsule;

View file

@ -250,7 +250,7 @@ class FunkinPreloader extends FlxBasePreloader
touchHereToPlay = createBitmap(TouchHereToPlayImage, function(bmp:Bitmap) {
// Scale and center the touch to start image.
// We have to do this inside the async call, after the image size is known.
bmp.scaleX = bmp.scaleY = ratio;
bmp.scaleX = bmp.scaleY = ratio * 0.5;
bmp.x = (this._width - bmp.width) / 2;
bmp.y = (this._height - bmp.height) / 2;
});
@ -803,16 +803,12 @@ class FunkinPreloader extends FlxBasePreloader
#if FEATURE_TOUCH_HERE_TO_PLAY
function overTouchHereToPlay(e:MouseEvent):Void
{
touchHereToPlay.scaleX = touchHereToPlay.scaleY = ratio * 1.1;
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
scaleAndCenter(touchHereToPlay, ratio * 1.1 * 0.5);
}
function outTouchHereToPlay(e:MouseEvent):Void
{
touchHereToPlay.scaleX = touchHereToPlay.scaleY = ratio * 1;
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
scaleAndCenter(touchHereToPlay, ratio * 0.5);
}
function mouseDownTouchHereToPlay(e:MouseEvent):Void
@ -822,8 +818,7 @@ class FunkinPreloader extends FlxBasePreloader
function onTouchHereToPlay(e:MouseEvent):Void
{
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
scaleAndCenter(touchHereToPlay, ratio * 0.5);
removeEventListener(MouseEvent.CLICK, onTouchHereToPlay);
touchHereSprite.removeEventListener(MouseEvent.MOUSE_OVER, overTouchHereToPlay);
@ -833,6 +828,13 @@ class FunkinPreloader extends FlxBasePreloader
// This is the actual thing that makes the game load.
immediatelyStartGame();
}
function scaleAndCenter(bmp:Bitmap, scale:Float)
{
bmp.scaleX = bmp.scaleY = scale;
bmp.x = (this._width - bmp.width) / 2;
bmp.y = (this._height - bmp.height) / 2;
}
#end
public static final TOTAL_STEPS:Int = 11;

View file

@ -6,6 +6,11 @@ import haxe.macro.Context;
import haxe.macro.Expr;
#end
#if (linux && !macro)
@:image('art/icons/iconOG.png')
class ApplicationIcon extends lime.graphics.Image {}
#end
@:access(lime.app.Application)
@:access(lime.system.System)
@:access(openfl.display.Stage)
@ -31,6 +36,13 @@ class ApplicationMain
{
var app = new openfl.display.Application();
#if linux
app.onCreateWindow.add(function(window:lime.ui.Window):Void
{
window.setIcon(new ApplicationIcon());
});
#end
#if !disable_preloader_assets
ManifestResources.init(config);
#end