Skip to content

Commit

Permalink
Merge branch 'develop' into revert-2629-bugfix/cwd-preloader-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NotHyper-474 committed Oct 8, 2024
2 parents 2cf32db + e66290c commit 991fb7b
Show file tree
Hide file tree
Showing 27 changed files with 547 additions and 437 deletions.
2 changes: 1 addition & 1 deletion .github/changed-lines-count-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ medium:
min: 10
max: 99

# Add 'large' to any changes for more than 100 lines
# Add 'large' to any changes of at least 100 lines
large:
min: 100
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Add Documentation tag to PR's changing markdown files, or anyhting in the docs folder
# Add Documentation tag to PR's changing markdown files, or anything in the docs folder
Documentation:
- changed-files:
- any-glob-to-any-file:
- docs/*
- '**/*.md'

# Adds Haxe tag to PR's changing haxe code files
# Add Haxe tag to PR's changing haxe code files
Haxe:
- changed-files:
- any-glob-to-any-file: '**/*.hx'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.5.2] - 2024-10-??
### Fixed
- Fixed an issue where exiting the Chart Editor would sometimes crash the game.
- Fixed an issue where holding down a direction key then selecting a character would select the locked character and crash the game (community fix by ACrazyTown)
- Fixed an issue where the player and girlfriend would disappear or overlap themselves in Character Select (community fix by gamerbross)
- Fixed an issue where the game would show the wrong girlfriend in Character Select (community fix by gamerbross)
Expand Down
6 changes: 3 additions & 3 deletions CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Code style is enforced using Visual Studio Code extensions.

## .hx
Formatting is handled by the `nadako.vshaxe` extension, which includes Haxe Formatter.
Haxe Formatter automatically resolves issues such as intentation style and line breaks, and can be configured in `hxformat.json`.
Haxe Formatter automatically resolves issues such as indentation style and line breaks, and can be configured in `hxformat.json`.

Code Quality is handled by the `vshaxe.haxe-checkstyle` extension, which includes Haxe Checkstyle.

### Haxe Checkstyle Notes
* Checks can be escalated to display as different serverities in the Problems window.
* Checks can be escalated to display as different severities in the Problems window.
* Checks can be disabled by setting the severity to `IGNORE`.
* `IndentationCharacter` checks what is used to indent, `Indentation` checks how deep the intentation is.
* `IndentationCharacter` checks what is used to indent, `Indentation` checks how deep the indentation is.
* `CommentedOutCode` check is in place because old code should be retrieved via Git history.
* TODO items: Enable these one-by-one and fix them to improve the overall code quality.
- Reconfigure `MethodLength`
Expand Down
3 changes: 2 additions & 1 deletion docs/COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ There are several useful build flags you can add to a build to affect how it wor
- `-DGITHUB_BUILD` will enable in-game debug functions (such as the ability to time travel in a song by pressing `PgUp`/`PgDn`), without enabling the other stuff
- `-DFEATURE_POLYMOD_MODS` or `-DNO_FEATURE_POLYMOD_MODS` to forcibly enable or disable modding support.
- `-DREDIRECT_ASSETS_FOLDER` or `-DNO_REDIRECT_ASSETS_FOLDER` to forcibly enable or disable asset redirection.
- This feature causes the game to load exported assets from the project's assets folder rather than the exported one. Great for fast iteration, but the game
- This feature causes the game to load exported assets from the project's assets folder rather than the exported one. Great for fast iteration, but the game will break if you try to zip it up and send it to someone, so it's disabled for release builds.
- `-DFEATURE_DISCORD_RPC` or `-DNO_FEATURE_DISCORD_RPC` to forcibly enable or disable support for Discord Rich Presence.
- `-DFEATURE_VIDEO_PLAYBACK` or `-DNO_FEATURE_VIDEO_PLAYBACK` to forcibly enable or disable video cutscene support.
- `-DFEATURE_CHART_EDITOR` or `-DNO_FEATURE_CHART_EDITOR` to forcibly enable or disable the chart editor in the Debug menu.
- `-DFEATURE_SCREENSHOTS` or `-DNO_FEATURE_SCREENSHOTS` to forcibly enable or disable the screenshots feature.
- `-DFEATURE_STAGE_EDITOR` to forcibly enable the experimental stage editor.
- `-DFEATURE_GHOST_TAPPING` to forcibly enable an experimental gameplay change to the anti-mash system.

Expand Down
6 changes: 3 additions & 3 deletions docs/Funkin' Debug Hotkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Most of this functionality is only available on debug builds of the game!
- `2`: ***GAIN HEALTH***: Debug function, add 10% to the player's health.
- `3`: ***LOSE HEALTH***: Debug function, subtract 5% to the player's health.
- `9`: NEATO!
- `PAGEUP` (MacOS: `Fn-Up`): ***FORWARDS TIME TRAVEL****: Move forward by 2 sections. Hold SHIFT to move forward by 20 sections instead.
- `PAGEDOWN` (MacOS: `Fn-Down`): ***BACKWARDS TIME TRAVEL****: Move backward by 2 sections. Hold SHIFT to move backward by 20 sections instead.
- `PAGEUP` (MacOS: `Fn-Up`): ***FORWARDS TIME TRAVEL***: Move forward by 2 sections. Hold SHIFT to move forward by 20 sections instead.
- `PAGEDOWN` (MacOS: `Fn-Down`): ***BACKWARDS TIME TRAVEL***: Move backward by 2 sections. Hold SHIFT to move backward by 20 sections instead.

## **Freeplay State**
- `F` (Freeplay Menu) - Move to Favorites
Expand All @@ -27,5 +27,5 @@ Most of this functionality is only available on debug builds of the game!
- `Y` - WOAH

## **Main Menu**
- `~`: ***DEBUG****: Opens a menu to access the Chart Editor and other work-in-progress editors. Rebindable in the options menu.
- `~`: ***DEBUG***: Opens a menu to access the Chart Editor and other work-in-progress editors. Rebindable in the options menu.
- `CTRL-ALT-SHIFT-W`: ***ALL ACCESS***: Unlocks all songs in Freeplay. Only available on debug builds.
File renamed without changes.
6 changes: 3 additions & 3 deletions hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
"name": "haxeui-core",
"type": "git",
"dir": null,
"ref": "c9d96b168ea2a19274ad7c766ab1a34b57baa793",
"ref": "51c23588614397089a5ce182cddea729f0be6fa0",
"url": "https://github.com/haxeui/haxeui-core"
},
{
"name": "haxeui-flixel",
"type": "git",
"dir": null,
"ref": "013b9d4e56bfe9a034e028a8d685f0b274cb73c4",
"ref": "da27e833947f32ef007ed11f523aa5524f5a5d54",
"url": "https://github.com/haxeui/haxeui-flixel"
},
{
Expand Down Expand Up @@ -205,4 +205,4 @@
"url": "https://github.com/fponticelli/thx.semver"
}
]
}
}
12 changes: 12 additions & 0 deletions source/funkin/graphics/FunkinSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ class FunkinSprite extends FlxSprite
return true;
}

/**
* @param id The animation ID to check.
* @return Whether the animation is dynamic (has multiple frames). `false` for static, one-frame animations.
*/
public function isAnimationDynamic(id:String):Bool
{
if (this.animation == null) return false;
var animData = this.animation.getByName(id);
if (animData == null) return false;
return animData.numFrames > 1;
}

/**
* Acts similarly to `makeGraphic`, but with improved memory usage,
* at the expense of not being able to paint onto the resulting sprite.
Expand Down
1 change: 1 addition & 0 deletions source/funkin/modding/PolymodHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ class PolymodHandler
Polymod.blacklistImport('openfl.utils.Assets');
Polymod.blacklistImport('openfl.Lib');
Polymod.blacklistImport('openfl.system.ApplicationDomain');
Polymod.blacklistImport('funkin.util.FunkinTypeResolver');

// `openfl.desktop.NativeProcess`
// Can load native processes on the host operating system.
Expand Down
6 changes: 2 additions & 4 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2562,8 +2562,8 @@ class PlayState extends MusicBeatSubState
healthChange = Constants.HEALTH_BAD_BONUS;
isComboBreak = Constants.JUDGEMENT_BAD_COMBO_BREAK;
case 'shit':
isComboBreak = Constants.JUDGEMENT_SHIT_COMBO_BREAK;
healthChange = Constants.HEALTH_SHIT_BONUS;
isComboBreak = Constants.JUDGEMENT_SHIT_COMBO_BREAK;
}

// Send the note hit event.
Expand Down Expand Up @@ -2633,8 +2633,6 @@ class PlayState extends MusicBeatSubState
}
vocals.playerVolume = 0;

if (Highscore.tallies.combo != 0) if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0);

applyScore(-10, 'miss', healthChange, true);

if (playSound)
Expand Down Expand Up @@ -2853,7 +2851,7 @@ class PlayState extends MusicBeatSubState
}
}
comboPopUps.displayRating(daRating);
if (combo >= 10 || combo == 0) comboPopUps.displayCombo(combo);
if (combo >= 10) comboPopUps.displayCombo(combo);

vocals.playerVolume = 1;
}
Expand Down
41 changes: 31 additions & 10 deletions source/funkin/play/notes/StrumlineNote.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,46 @@ package funkin.play.notes;

import funkin.play.notes.notestyle.NoteStyle;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.FlxSprite;
import funkin.graphics.FunkinSprite;
import funkin.play.notes.NoteSprite;

/**
* The actual receptor that you see on screen.
*/
class StrumlineNote extends FlxSprite
class StrumlineNote extends FunkinSprite
{
/**
* Whether this strumline note is on the player's side or the opponent's side.
*/
public var isPlayer(default, null):Bool;

/**
* The direction which this strumline note is facing.
*/
public var direction(default, set):NoteDirection;

var confirmHoldTimer:Float = -1;

static final CONFIRM_HOLD_TIME:Float = 0.1;

function set_direction(value:NoteDirection):NoteDirection
{
this.direction = value;
return this.direction;
}

/**
* Set this flag to `true` to disable performance optimizations that cause
* the Strumline note sprite to ignore `velocity` and `acceleration`.
*/
public var forceActive:Bool = false;

/**
* How long to continue the hold note animation after a note is pressed.
*/
static final CONFIRM_HOLD_TIME:Float = 0.1;

/**
* How long the hold note animation has been playing after a note is pressed.
*/
var confirmHoldTimer:Float = -1;

public function new(noteStyle:NoteStyle, isPlayer:Bool, direction:NoteDirection)
{
super(0, 0);
Expand All @@ -41,7 +59,10 @@ class StrumlineNote extends FlxSprite
this.active = true;
}

function onAnimationFrame(name:String, frameNumber:Int, frameIndex:Int):Void {}
function onAnimationFrame(name:String, frameNumber:Int, frameIndex:Int):Void
{
// Do nothing.
}

function onAnimationFinished(name:String):Void
{
Expand Down Expand Up @@ -103,19 +124,19 @@ class StrumlineNote extends FlxSprite

public function playStatic():Void
{
this.active = false;
this.active = (forceActive || isAnimationDynamic('static'));
this.playAnimation('static', true);
}

public function playPress():Void
{
this.active = true;
this.active = (forceActive || isAnimationDynamic('press'));
this.playAnimation('press', true);
}

public function playConfirm():Void
{
this.active = true;
this.active = (forceActive || isAnimationDynamic('confirm'));
this.playAnimation('confirm', true);
}

Expand Down
Loading

0 comments on commit 991fb7b

Please sign in to comment.