Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blacklist openfl.system.ApplicationDomain from scripts #3555

Closed
wants to merge 87 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e113efe
Add a new option to put a transparent background on the strumline
EliteMasterEric Jul 1, 2024
2680b90
Refined the ghost tapping system.
EliteMasterEric Jul 25, 2024
b17f3fb
Convert from Project.hx to Project.hxp
EliteMasterEric Jul 29, 2024
a80f347
Merge branch 'feature/album-art-swap' into develop
EliteMasterEric Aug 2, 2024
45e0bc4
Merge branch 'gamerbross/animation-editor' into develop
EliteMasterEric Aug 2, 2024
90680ca
Merge branch 'feature/pico-playable-christmas' into develop
EliteMasterEric Aug 2, 2024
046ace4
Merge branch 'feature/strumline-background' into develop
EliteMasterEric Aug 2, 2024
08baecf
Merge branch 'feature/instrumental-select-hud' into develop
EliteMasterEric Aug 2, 2024
e5bc927
Merge branch 'anysad/custom-countdowns' into develop
EliteMasterEric Aug 2, 2024
be5f17c
Merge remote-tracking branch 'secret/haxelib-updates' into develop
EliteMasterEric Aug 2, 2024
8a1a813
Merge remote-tracking branch 'secret/project-hxp' into develop
EliteMasterEric Aug 2, 2024
56ad74b
Merge remote-tracking branch 'secret/applehair/storymode-valid-variat…
EliteMasterEric Aug 2, 2024
ce5156f
Merge remote-tracking branch 'secret/70ltan/char-path-fix' into develop
EliteMasterEric Aug 2, 2024
782ce83
Merge remote-tracking branch 'secret/applehair/freeplay-stack-overflo…
EliteMasterEric Aug 2, 2024
d7e92f8
Develop fixes.
EliteMasterEric Aug 5, 2024
f125b5e
hscript git update
ninjamuffin99 Aug 6, 2024
e6fb9cd
use scripting-updates polymod branch
ninjamuffin99 Aug 6, 2024
38f8f3a
Fix an issue with feature flags
EliteMasterEric Aug 7, 2024
bbdaa78
Update the version number, d'oh!
EliteMasterEric Aug 8, 2024
e08ead8
Merge branch 'project-hxp' into develop
EliteMasterEric Aug 8, 2024
497addf
Perform several fixes related to HXP
EliteMasterEric Aug 10, 2024
441c0dd
Update HXP to correctly add assets to libraries
EliteMasterEric Aug 10, 2024
709f5da
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 10, 2024
1244508
custom popups and countdowns yay!!!
anysad Jul 13, 2024
36ba5f8
remove trace
anysad Jul 13, 2024
ea72d0c
cache textures at their new locations!
anysad Jul 13, 2024
715b806
how the hell did I miss these?
anysad Jul 13, 2024
0cec53b
goodbye scripts, hello notestyles!
anysad Jul 16, 2024
f5dfa8b
welcome fallback note styles!
anysad Jul 17, 2024
53b17eb
hopefully final polish?
anysad Jul 18, 2024
0647041
Custom coutndown, judgements, and combo count now use the note style …
EliteMasterEric Jul 28, 2024
a2af688
new stage names
FabsTheFabs Jul 18, 2024
489ce4a
adjust color shader
FabsTheFabs Jul 18, 2024
2fbf018
merged rain shader stuff from 'feature/week2-erect-bg-rain'
FabsTheFabs Jul 18, 2024
4413d30
add stage names to registry + chart editor
FabsTheFabs Jul 31, 2024
55757ed
Better character animation offsets handling.
Sword352 May 8, 2024
e48c29a
did the requested changes
Sword352 May 8, 2024
b7b2e10
Use `animOffsets` directly.
Sword352 May 8, 2024
ea834e8
Some more fixes for offsets handling and stuffs
EliteMasterEric Jul 13, 2024
1a1b365
openfl hmm commit to dev-funkin
ninjamuffin99 Aug 5, 2024
a96ec69
hxcpp bump
ninjamuffin99 Aug 7, 2024
a71dd02
Fix for switching to old icon on isPixel levels
ninjamuffin99 Aug 6, 2024
c2eae41
perhaps use funkin versions of haxelib and hmm?
ninjamuffin99 Aug 10, 2024
dbb86a4
use --always when installing funkin-patches versions of haxelib and hmm
ninjamuffin99 Aug 10, 2024
374a6c8
Perform several fixes related to HXP
EliteMasterEric Aug 10, 2024
3717b8c
Update HXP to correctly add assets to libraries
EliteMasterEric Aug 10, 2024
4ff1e2b
Fixed an issue where the chart editor was unavailable
EliteMasterEric Aug 12, 2024
081baa5
Merge branch 'project-hxp' into develop
EliteMasterEric Aug 12, 2024
d60f831
Merge branch 'feature/ghost-tapping' into develop
EliteMasterEric Aug 12, 2024
26cb7fb
Merge remote-tracking branch 'secret/gamerbross/animation-editor' int…
EliteMasterEric Aug 14, 2024
23bac90
Fix a whole batch of bugs
EliteMasterEric Aug 14, 2024
a8a29f0
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 14, 2024
11518fa
Merge branch 'feature/more-pico-songs' into develop
EliteMasterEric Aug 14, 2024
3978169
Merge branch '2-erect-songs' into develop
EliteMasterEric Aug 14, 2024
da19606
A couple more develop fixes
EliteMasterEric Aug 14, 2024
d6d17fc
Fixes to assets submodule
EliteMasterEric Aug 14, 2024
d2b5257
Fix a bunch of warnings and errors with FlxAtlasSprite
EliteMasterEric Aug 15, 2024
2af3496
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 17, 2024
0250bfa
Fixes for HTML5
EliteMasterEric Aug 19, 2024
7acd0de
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 20, 2024
6e0363b
Implement Pico's loss animation.
EliteMasterEric Aug 21, 2024
5290306
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 21, 2024
0b46112
Update haxelibs
EliteMasterEric Aug 21, 2024
617337a
Use git fork of HScript (adds support for "is" and "?.")
EliteMasterEric Aug 21, 2024
cd5bb07
Character select tweaks (starting to move stuff to the JSON data)
EliteMasterEric Aug 21, 2024
9419985
Add BF new character animation
EliteMasterEric Aug 21, 2024
9f66b7a
Botplay can never miss now.
EliteMasterEric Aug 21, 2024
506c7e8
Re-exported Nene and corrected Pico death animation offsets.
EliteMasterEric Aug 21, 2024
1e45cb9
Add Pico Tutorial
EliteMasterEric Aug 21, 2024
6a12ebf
Merge remote-tracking branch 'secret/hscript-git' into develop
EliteMasterEric Aug 23, 2024
cd600a6
Merge remote-tracking branch 'secret/completion-server-null-fix' into…
EliteMasterEric Aug 23, 2024
8161221
Merge remote-tracking branch 'secret/feature/charSelect' into develop
EliteMasterEric Aug 23, 2024
3caa88c
Update FunkVis
EliteMasterEric Aug 23, 2024
96c151c
Update assets
EliteMasterEric Aug 23, 2024
8a8ddbf
Use FunkinCamera on Char Select state.
EliteMasterEric Aug 26, 2024
86283bc
Fall back to idle animation if character doesn't have NewUnlock
EliteMasterEric Aug 26, 2024
b837aa0
Disable spamming TAB
EliteMasterEric Aug 26, 2024
235f502
Re-export Boyfriend Freeplay
EliteMasterEric Aug 26, 2024
e8ed5ff
Update loop behavior
EliteMasterEric Aug 26, 2024
29aa714
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 26, 2024
a0a3b95
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 26, 2024
ecdd697
Merge branch 'art-repo-update' into develop
EliteMasterEric Aug 27, 2024
0e81cdb
Merge branch 'feature/project-hxp' into develop
EliteMasterEric Aug 27, 2024
39686d0
Merge branch 'bugfix/week-4-boppers' into develop
EliteMasterEric Aug 27, 2024
6be586d
Merge remote-tracking branch 'secret/rewrite/master' into develop
EliteMasterEric Aug 28, 2024
ee7d50b
Updated assets submodule
EliteMasterEric Aug 28, 2024
6a42c8f
Blacklist two additional Polymod classes
EliteMasterEric Oct 3, 2024
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
2 changes: 1 addition & 1 deletion assets
2 changes: 0 additions & 2 deletions hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
"type": "git",
"dir": null,
"ref": "22b1ce089dd924f15cdc4632397ef3504d464e90",

"url": "https://github.com/FunkinCrew/funkVis"

},
{
"name": "grig.audio",
Expand Down
2 changes: 1 addition & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Main extends Sprite
var framerate:Int = 60; // How many frames per second the game should run at.
#else
// TODO: This should probably be in the options menu?
var framerate:Int = 144; // How many frames per second the game should run at.
var framerate:Int = 60; // How many frames per second the game should run at.
#end
var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.
var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets
Expand Down
20 changes: 20 additions & 0 deletions source/funkin/Preferences.hx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,26 @@ class Preferences
return value;
}

/**
* If >0, the game will display a semi-opaque background under the notes.
* `0` for no background, `100` for solid black if you're freaky like that
* @default `0`
*/
public static var strumlineBackgroundOpacity(get, set):Int;

static function get_strumlineBackgroundOpacity():Int
{
return (Save?.instance?.options?.strumlineBackgroundOpacity ?? 0);
}

static function set_strumlineBackgroundOpacity(value:Int):Int
{
var save:Save = Save.instance;
save.options.strumlineBackgroundOpacity = value;
save.flush();
return value;
}

/**
* Loads the user's preferences from the save data and apply them.
*/
Expand Down
89 changes: 89 additions & 0 deletions source/funkin/data/freeplay/player/PlayerData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ class PlayerData
@:optional
public var freeplayDJ:Null<PlayerFreeplayDJData> = null;

/**
* Data for displaying this character in the Character Select menu.
* If null, exclude from Character Select.
*/
@:optional
public var charSelect:Null<PlayerCharSelectData> = null;

public var results:Null<PlayerResultsData> = null;

/**
Expand Down Expand Up @@ -97,6 +104,9 @@ class PlayerFreeplayDJData
@:optional
var cartoon:Null<PlayerFreeplayDJCartoonData>;

@:optional
var fistPump:Null<PlayerFreeplayDJFistPumpData>;

public function new()
{
animationMap = new Map();
Expand Down Expand Up @@ -183,6 +193,58 @@ class PlayerFreeplayDJData
{
return cartoon?.channelChangeFrame ?? 60;
}

public function getFistPumpIntroStartFrame():Int
{
return fistPump?.introStartFrame ?? 0;
}

public function getFistPumpIntroEndFrame():Int
{
return fistPump?.introEndFrame ?? 0;
}

public function getFistPumpLoopStartFrame():Int
{
return fistPump?.loopStartFrame ?? 0;
}

public function getFistPumpLoopEndFrame():Int
{
return fistPump?.loopEndFrame ?? 0;
}

public function getFistPumpIntroBadStartFrame():Int
{
return fistPump?.introBadStartFrame ?? 0;
}

public function getFistPumpIntroBadEndFrame():Int
{
return fistPump?.introBadEndFrame ?? 0;
}

public function getFistPumpLoopBadStartFrame():Int
{
return fistPump?.loopBadStartFrame ?? 0;
}

public function getFistPumpLoopBadEndFrame():Int
{
return fistPump?.loopBadEndFrame ?? 0;
}
}

class PlayerCharSelectData
{
/**
* A zero-indexed number for the character's preferred position in the grid.
* 0 = top left, 4 = center, 8 = bottom right
* In the event of a conflict, the first character alphabetically gets it,
* and others get shifted over.
*/
@:optional
public var position:Null<Int>;
}

typedef PlayerResultsData =
Expand Down Expand Up @@ -242,3 +304,30 @@ typedef PlayerFreeplayDJCartoonData =
var loopFrame:Int;
var channelChangeFrame:Int;
}

typedef PlayerFreeplayDJFistPumpData =
{
@:default(0)
var introStartFrame:Int; // ":0,

@:default(4)
var introEndFrame:Int; // ":4,

@:default(4)
var loopStartFrame:Int; // ":4,

@:default(-1)
var loopEndFrame:Int; // ":-1,

@:default(0)
var introBadStartFrame:Int; // ":0,

@:default(4)
var introBadEndFrame:Int; // ":4,

@:default(4)
var loopBadStartFrame:Int; // ":4,

@:default(-1)
var loopBadEndFrame:Int; // ":-1
};
36 changes: 36 additions & 0 deletions source/funkin/data/freeplay/player/PlayerRegistry.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package funkin.data.freeplay.player;
import funkin.data.freeplay.player.PlayerData;
import funkin.ui.freeplay.charselect.PlayableCharacter;
import funkin.ui.freeplay.charselect.ScriptedPlayableCharacter;
import funkin.save.Save;

class PlayerRegistry extends BaseRegistry<PlayableCharacter, PlayerData>
{
Expand Down Expand Up @@ -53,6 +54,41 @@ class PlayerRegistry extends BaseRegistry<PlayableCharacter, PlayerData>
log('Loaded ${countEntries()} playable characters with ${ownedCharacterIds.size()} associations.');
}

public function countUnlockedCharacters():Int
{
var count = 0;

for (charId in listEntryIds())
{
var player = fetchEntry(charId);
if (player == null) continue;

if (player.isUnlocked()) count++;
}

return count;
}

public function hasNewCharacter():Bool
{
var characters = Save.instance.charactersSeen.clone();

for (charId in listEntryIds())
{
var player = fetchEntry(charId);
if (player == null) continue;

if (!player.isUnlocked()) continue;
if (characters.contains(charId)) continue;

// This character is unlocked but we haven't seen them in Freeplay yet.
return true;
}

// Fallthrough case.
return false;
}

/**
* Get the playable character associated with a given stage character.
* @param characterId The stage character ID.
Expand Down
1 change: 1 addition & 0 deletions source/funkin/data/song/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.2.4]
### Added
- Added `offsets.altVocals` field to apply vocal offsets when alternate instrumentals are used.
- Added `playData.characters.opponentVocals` to specify which vocal track(s) to play for the opponent.
- If the value isn't present, it will use the `playData.characters.opponent`, but if it is present, it will be used (even if it's empty, in which case no vocals will be used for the opponent)
- Added `playData.characters.playerVocals` to specify which vocal track(s) to play for the player.
Expand Down
31 changes: 24 additions & 7 deletions source/funkin/data/song/SongData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,27 @@ class SongOffsets implements ICloneable<SongOffsets>
public var altInstrumentals:Map<String, Float>;

/**
* The offset, in milliseconds, to apply to the song's vocals, relative to the chart.
* The offset, in milliseconds, to apply to the song's vocals, relative to the song's base instrumental.
* These are applied ON TOP OF the instrumental offset.
*/
@:optional
@:default([])
public var vocals:Map<String, Float>;

public function new(instrumental:Float = 0.0, ?altInstrumentals:Map<String, Float>, ?vocals:Map<String, Float>)
/**
* The offset, in milliseconds, to apply to the songs vocals, relative to each alternate instrumental.
* This is useful for the circumstance where, for example, an alt instrumental has a few seconds of lead in before the song starts.
*/
@:optional
@:default([])
public var altVocals:Map<String, Map<String, Float>>;

public function new(instrumental:Float = 0.0, ?altInstrumentals:Map<String, Float>, ?vocals:Map<String, Float>, ?altVocals:Map<String, Map<String, Float>>)
{
this.instrumental = instrumental;
this.altInstrumentals = altInstrumentals == null ? new Map<String, Float>() : altInstrumentals;
this.vocals = vocals == null ? new Map<String, Float>() : vocals;
this.altVocals = altVocals == null ? new Map<String, Map<String, Float>>() : altVocals;
}

public function getInstrumentalOffset(?instrumental:String):Float
Expand All @@ -293,11 +302,19 @@ class SongOffsets implements ICloneable<SongOffsets>
return value;
}

public function getVocalOffset(charId:String):Float
public function getVocalOffset(charId:String, ?instrumental:String):Float
{
if (!this.vocals.exists(charId)) return 0.0;

return this.vocals.get(charId);
if (instrumental == null)
{
if (!this.vocals.exists(charId)) return 0.0;
return this.vocals.get(charId);
}
else
{
if (!this.altVocals.exists(instrumental)) return 0.0;
if (!this.altVocals.get(instrumental).exists(charId)) return 0.0;
return this.altVocals.get(instrumental).get(charId);
}
}

public function setVocalOffset(charId:String, value:Float):Float
Expand All @@ -320,7 +337,7 @@ class SongOffsets implements ICloneable<SongOffsets>
*/
public function toString():String
{
return 'SongOffsets(${this.instrumental}ms, ${this.altInstrumentals}, ${this.vocals})';
return 'SongOffsets(${this.instrumental}ms, ${this.altInstrumentals}, ${this.vocals}, ${this.altVocals})';
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/funkin/data/song/SongRegistry.hx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SongRegistry extends BaseRegistry<Song, SongMetadata>
* Handle breaking changes by incrementing this value
* and adding migration to the `migrateStageData()` function.
*/
public static final SONG_METADATA_VERSION:thx.semver.Version = "2.2.3";
public static final SONG_METADATA_VERSION:thx.semver.Version = "2.2.4";

public static final SONG_METADATA_VERSION_RULE:thx.semver.VersionRule = "2.2.x";

Expand Down
49 changes: 27 additions & 22 deletions source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import flixel.util.FlxSignal.FlxTypedSignal;
import flxanimate.FlxAnimate;
import flxanimate.FlxAnimate.Settings;
import flxanimate.frames.FlxAnimateFrames;
import haxe.extern.EitherType;
import flixel.graphics.frames.FlxFrame;
import flixel.system.FlxAssets.FlxGraphicAsset;
import openfl.display.BitmapData;
Expand Down Expand Up @@ -104,23 +105,6 @@ class FlxAtlasSprite extends FlxAnimate
return this.currentAnimation;
}

/**
* `anim.finished` always returns false on looping animations,
* but this function will return true if we are on the last frame of the looping animation.
*/
public function isLoopFinished():Bool
{
if (this.anim == null) return false;
if (!this.anim.isPlaying) return false;

// Reverse animation finished.
if (this.anim.reversed && this.anim.curFrame == 0) return true;
// Forward animation finished.
if (!this.anim.reversed && this.anim.curFrame >= (this.anim.length - 1)) return true;

return false;
}

/**
* Plays an animation.
* @param id A string ID of the animation to play.
Expand All @@ -133,7 +117,7 @@ class FlxAtlasSprite extends FlxAnimate
public function playAnimation(id:String, restart:Bool = false, ignoreOther:Bool = false, loop:Bool = false, startFrame:Int = 0):Void
{
// Skip if not allowed to play animations.
if ((!canPlayOtherAnims && !ignoreOther)) return;
if ((!canPlayOtherAnims && !ignoreOther) || (anim == null)) return;

if (id == null || id == '') id = this.currentAnimation;

Expand Down Expand Up @@ -178,10 +162,17 @@ class FlxAtlasSprite extends FlxAnimate
if (ignoreOther) canPlayOtherAnims = false;

// Move to the first frame of the animation.
// goToFrameLabel(id);
trace('Playing animation $id');
this.anim.play(id, restart, false, startFrame);
goToFrameLabel(id);
// FlxG.log.notice('Playing animation $id');
if (this.anim.symbolDictionary.exists(id) || (this.anim.getByName(id) != null))
{
this.anim.play(id, restart, false, startFrame);
}
if (getFrameLabelNames().indexOf(id) != -1)
{
goToFrameLabel(id);
}
anim.curFrame += startFrame;
this.currentAnimation = id;
}

Expand All @@ -205,6 +196,8 @@ class FlxAtlasSprite extends FlxAnimate
*/
public function isLoopComplete():Bool
{
if (this.anim == null) return false;
if (!this.anim.isPlaying) return false;
return (anim.reversed && anim.curFrame == 0 || !(anim.reversed) && (anim.curFrame) >= (anim.length - 1));
}

Expand All @@ -231,6 +224,18 @@ class FlxAtlasSprite extends FlxAnimate
this.anim.goToFrameLabel(label);
}

function getFrameLabelNames(?layer:EitherType<Int, String> = null)
{
var labels = this.anim.getFrameLabels(layer);
var array = [];
for (label in labels)
{
array.push(label.name);
}

return array;
}

function getNextFrameLabel(label:String):String
{
return listAnimations()[(getLabelIndex(label) + 1) % listAnimations().length];
Expand Down Expand Up @@ -301,7 +306,7 @@ class FlxAtlasSprite extends FlxAnimate

public function getBasePosition():Null<FlxPoint>
{
var stagePos = new FlxPoint(anim.stageInstance.matrix.tx, anim.stageInstance.matrix.ty);
// var stagePos = new FlxPoint(anim.stageInstance.matrix.tx, anim.stageInstance.matrix.ty);
var instancePos = new FlxPoint(anim.curInstance.matrix.tx, anim.curInstance.matrix.ty);
var firstElement = anim.curSymbol.timeline?.get(0)?.get(0)?.get(0);
if (firstElement == null) return instancePos;
Expand Down
Loading