mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-08-30 10:25:00 +00:00
Compare commits
7 commits
96936694eb
...
12eb372e42
Author | SHA1 | Date | |
---|---|---|---|
|
12eb372e42 | ||
|
54ad34e5d0 | ||
|
f6fb11de4c | ||
|
83aa45a318 | ||
|
65186a336d | ||
|
7114fd91da | ||
|
c62383511f |
|
@ -9,6 +9,18 @@
|
||||||
"asset": "asset/shared/images/resultScreen/results-pico/resultsPERFECT/spritemap1.png",
|
"asset": "asset/shared/images/resultScreen/results-pico/resultsPERFECT/spritemap1.png",
|
||||||
"blocksize": "4x4"
|
"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",
|
"asset": "assets/preload/images/NOTE_assets.png",
|
||||||
"blocksize": "4x4"
|
"blocksize": "4x4"
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Project extends HXProject
|
||||||
* The build's number and version code.
|
* The build's number and version code.
|
||||||
* Used when publishing the game to mobile app stores. Should increment with each patch.
|
* 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.
|
* The game's name. Used as the default window title.
|
||||||
|
@ -489,7 +489,11 @@ class Project extends HXProject
|
||||||
configureHaxelibs();
|
configureHaxelibs();
|
||||||
configureASTCTextures();
|
configureASTCTextures();
|
||||||
configureAssets();
|
configureAssets();
|
||||||
configureIcons();
|
|
||||||
|
if (!isLinux())
|
||||||
|
{
|
||||||
|
configureIcons();
|
||||||
|
}
|
||||||
|
|
||||||
if (FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this))
|
if (FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this))
|
||||||
{
|
{
|
||||||
|
|
|
@ -2070,6 +2070,8 @@ class FreeplayState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
backingCard.beatHit();
|
backingCard.beatHit();
|
||||||
|
|
||||||
|
grpCapsules?.members[0]?.randomiseDisplay();
|
||||||
|
|
||||||
return super.beatHit();
|
return super.beatHit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2941,10 +2943,13 @@ class DifficultySelector extends FlxSprite
|
||||||
|
|
||||||
override function update(elapsed:Float):Void
|
override function update(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
|
Conductor.instance.update();
|
||||||
|
|
||||||
if (!controls.active) return;
|
if (!controls.active) return;
|
||||||
|
|
||||||
if (flipX && controls.UI_RIGHT_P) moveShitDown();
|
if (flipX && controls.UI_RIGHT_P) moveShitDown();
|
||||||
if (!flipX && controls.UI_LEFT_P) moveShitDown();
|
if (!flipX && controls.UI_LEFT_P) moveShitDown();
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -431,6 +431,56 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
updateSelected();
|
updateSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used for the random capsule.
|
||||||
|
* Randomises the BPM and difficulty value until they're different, then updates the display.
|
||||||
|
*/
|
||||||
|
public function randomiseDisplay():Void
|
||||||
|
{
|
||||||
|
// No need to do any of this if the capsule won't actually be visible.
|
||||||
|
if (targetPos.y < -200 || targetPos.y > FlxG.height + 200) return;
|
||||||
|
|
||||||
|
var randomDifficulty:Int = FlxG.random.int(0, 20);
|
||||||
|
var currentDifficulty:Int = 0;
|
||||||
|
var randomBPM:Int = FlxG.random.int(0, 999);
|
||||||
|
var currentBPM:Int = 0;
|
||||||
|
|
||||||
|
// Get the current value so we can keep randomising until we get a different one.
|
||||||
|
for (i in 0...bigNumbers.length)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
currentDifficulty += bigNumbers[i].digit * 10;
|
||||||
|
case 1:
|
||||||
|
currentDifficulty += bigNumbers[i].digit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hopefully this never takes so long that it causes a bit of lag...
|
||||||
|
while (currentDifficulty == randomDifficulty)
|
||||||
|
randomDifficulty = FlxG.random.int(0, 20);
|
||||||
|
|
||||||
|
for (i in 0...smallNumbers.length)
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
randomBPM += smallNumbers[i].digit * 100;
|
||||||
|
case 1:
|
||||||
|
randomBPM += smallNumbers[i].digit * 10;
|
||||||
|
case 2:
|
||||||
|
randomBPM += smallNumbers[i].digit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while (currentBPM == randomBPM)
|
||||||
|
currentBPM = FlxG.random.int(0, 999);
|
||||||
|
|
||||||
|
updateBPM(randomBPM);
|
||||||
|
updateDifficultyRating(randomDifficulty);
|
||||||
|
}
|
||||||
|
|
||||||
function updateDifficultyRating(newRating:Int):Void
|
function updateDifficultyRating(newRating:Int):Void
|
||||||
{
|
{
|
||||||
var ratingPadded:String = newRating < 10 ? '0$newRating' : '$newRating';
|
var ratingPadded:String = newRating < 10 ? '0$newRating' : '$newRating';
|
||||||
|
@ -544,7 +594,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
initData(null, styleData, 1);
|
initData(null, styleData, 1);
|
||||||
y = intendedY(0) + 10;
|
y = intendedY(0) + 10;
|
||||||
targetPos.x = x;
|
targetPos.x = x;
|
||||||
alpha = 0.5;
|
alpha = 1;
|
||||||
songText.visible = false;
|
songText.visible = false;
|
||||||
favIcon.visible = false;
|
favIcon.visible = false;
|
||||||
favIconBlurred.visible = false;
|
favIconBlurred.visible = false;
|
||||||
|
@ -861,7 +911,13 @@ class FreeplayRank extends FlxSpriteGroup
|
||||||
|
|
||||||
class CapsuleNumber extends FlxSprite
|
class CapsuleNumber extends FlxSprite
|
||||||
{
|
{
|
||||||
public var digit(default, set):Int = 0;
|
@:isVar
|
||||||
|
public var digit(get, set):Int = 0;
|
||||||
|
|
||||||
|
function get_digit():Int
|
||||||
|
{
|
||||||
|
return this.digit;
|
||||||
|
}
|
||||||
|
|
||||||
function set_digit(val):Int
|
function set_digit(val):Int
|
||||||
{
|
{
|
||||||
|
@ -869,6 +925,8 @@ class CapsuleNumber extends FlxSprite
|
||||||
|
|
||||||
centerOffsets(false);
|
centerOffsets(false);
|
||||||
|
|
||||||
|
this.digit = val;
|
||||||
|
|
||||||
switch (val)
|
switch (val)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -250,7 +250,7 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
touchHereToPlay = createBitmap(TouchHereToPlayImage, function(bmp:Bitmap) {
|
touchHereToPlay = createBitmap(TouchHereToPlayImage, function(bmp:Bitmap) {
|
||||||
// Scale and center the touch to start image.
|
// Scale and center the touch to start image.
|
||||||
// We have to do this inside the async call, after the image size is known.
|
// 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.x = (this._width - bmp.width) / 2;
|
||||||
bmp.y = (this._height - bmp.height) / 2;
|
bmp.y = (this._height - bmp.height) / 2;
|
||||||
});
|
});
|
||||||
|
@ -803,16 +803,12 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
#if FEATURE_TOUCH_HERE_TO_PLAY
|
#if FEATURE_TOUCH_HERE_TO_PLAY
|
||||||
function overTouchHereToPlay(e:MouseEvent):Void
|
function overTouchHereToPlay(e:MouseEvent):Void
|
||||||
{
|
{
|
||||||
touchHereToPlay.scaleX = touchHereToPlay.scaleY = ratio * 1.1;
|
scaleAndCenter(touchHereToPlay, ratio * 1.1 * 0.5);
|
||||||
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
|
|
||||||
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function outTouchHereToPlay(e:MouseEvent):Void
|
function outTouchHereToPlay(e:MouseEvent):Void
|
||||||
{
|
{
|
||||||
touchHereToPlay.scaleX = touchHereToPlay.scaleY = ratio * 1;
|
scaleAndCenter(touchHereToPlay, ratio * 0.5);
|
||||||
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
|
|
||||||
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseDownTouchHereToPlay(e:MouseEvent):Void
|
function mouseDownTouchHereToPlay(e:MouseEvent):Void
|
||||||
|
@ -822,8 +818,7 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
|
|
||||||
function onTouchHereToPlay(e:MouseEvent):Void
|
function onTouchHereToPlay(e:MouseEvent):Void
|
||||||
{
|
{
|
||||||
touchHereToPlay.x = (this._width - touchHereToPlay.width) / 2;
|
scaleAndCenter(touchHereToPlay, ratio * 0.5);
|
||||||
touchHereToPlay.y = (this._height - touchHereToPlay.height) / 2;
|
|
||||||
|
|
||||||
removeEventListener(MouseEvent.CLICK, onTouchHereToPlay);
|
removeEventListener(MouseEvent.CLICK, onTouchHereToPlay);
|
||||||
touchHereSprite.removeEventListener(MouseEvent.MOUSE_OVER, overTouchHereToPlay);
|
touchHereSprite.removeEventListener(MouseEvent.MOUSE_OVER, overTouchHereToPlay);
|
||||||
|
@ -833,6 +828,13 @@ class FunkinPreloader extends FlxBasePreloader
|
||||||
// This is the actual thing that makes the game load.
|
// This is the actual thing that makes the game load.
|
||||||
immediatelyStartGame();
|
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
|
#end
|
||||||
|
|
||||||
public static final TOTAL_STEPS:Int = 11;
|
public static final TOTAL_STEPS:Int = 11;
|
||||||
|
|
|
@ -6,6 +6,11 @@ import haxe.macro.Context;
|
||||||
import haxe.macro.Expr;
|
import haxe.macro.Expr;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
#if (linux && !macro)
|
||||||
|
@:image('art/icons/iconOG.png')
|
||||||
|
class ApplicationIcon extends lime.graphics.Image {}
|
||||||
|
#end
|
||||||
|
|
||||||
@:access(lime.app.Application)
|
@:access(lime.app.Application)
|
||||||
@:access(lime.system.System)
|
@:access(lime.system.System)
|
||||||
@:access(openfl.display.Stage)
|
@:access(openfl.display.Stage)
|
||||||
|
@ -31,6 +36,13 @@ class ApplicationMain
|
||||||
{
|
{
|
||||||
var app = new openfl.display.Application();
|
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
|
#if !disable_preloader_assets
|
||||||
ManifestResources.init(config);
|
ManifestResources.init(config);
|
||||||
#end
|
#end
|
||||||
|
|
Loading…
Reference in a new issue