Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 7db76e8
Author: Kolo <[email protected]>
Date:   Fri Dec 13 21:22:42 2024 +0100

    that one loggoman feature

commit 4af76e2
Merge: da6c9e0 0d8e4a5
Author: Kolo <[email protected]>
Date:   Fri Dec 13 20:30:17 2024 +0100

    merge dev branch

commit da6c9e0
Author: Kolo <[email protected]>
Date:   Fri Dec 13 14:44:54 2024 +0100

    cam field for gameplay page cuz i forgot lol

commit a9bd577
Author: Kolo <[email protected]>
Date:   Thu Dec 12 22:22:35 2024 +0100

    some features and bugfixes

commit 649d895
Author: Kolo <[email protected]>
Date:   Tue Dec 10 20:17:46 2024 +0100

    useful utilities

commit ec5439e
Author: Kolo <[email protected]>
Date:   Mon Dec 9 17:22:09 2024 +0100

    music dialog hellyeah

commit 060bdb3
Author: Kolo <[email protected]>
Date:   Sat Dec 7 22:36:05 2024 +0100

    buncha misc stuff before starting results music

    i think we're about 90% done with the editor, hooray!!!

commit 5ad32ad
Author: Kolo <[email protected]>
Date:   Thu Dec 5 22:18:15 2024 +0100

    sparrow + markers in results

commit 7da379e
Author: Kolo <[email protected]>
Date:   Wed Dec 4 18:20:57 2024 +0100

    real time rank anim replacing for atlas

    gonna work on sparrow later i have school work to do

commit c9fc9e1
Author: Kolo <[email protected]>
Date:   Tue Dec 3 22:48:36 2024 +0100

    more rank anims updating work + rank anims export

commit ae2818f
Author: Kolo <[email protected]>
Date:   Sat Nov 30 12:29:32 2024 +0100

    starting proper results anim updating

    good god this took so long

commit 6dabf5e
Author: Kolo <[email protected]>
Date:   Wed Nov 27 20:30:42 2024 +0100

    add pausing animations to results page

commit 6495373
Author: Kolo <[email protected]>
Date:   Tue Nov 26 20:33:31 2024 +0100

    freeplay frame data/delays export

commit 4332853
Author: Kolo <[email protected]>
Date:   Sun Nov 24 22:41:34 2024 +0100

    porting and sorting dialogs + an old bug fixed

commit c5c94ce
Author: Kolo <[email protected]>
Date:   Sun Nov 24 20:22:38 2024 +0100

    add pointers for midpoint, base, and pivot

commit 967fef6
Author: Kolo <[email protected]>
Date:   Sun Nov 24 13:24:48 2024 +0100

    update assets submodule

commit 6194bb5
Author: Kolo <[email protected]>
Date:   Sun Nov 24 12:08:45 2024 +0100

    more works on custom player files

commit 43c1779
Author: Kolo <[email protected]>
Date:   Sat Nov 23 22:37:05 2024 +0100

    starting to get custom zip for player chars implemented

commit 170d1ab
Author: Kolo <[email protected]>
Date:   Fri Nov 22 22:18:47 2024 +0100

    started working on dj anims dialog

commit 5690316
Author: Kolo <[email protected]>
Date:   Fri Nov 22 19:27:59 2024 +0100

    more freeplay DJ functions + dialog reorganization

commit 472fd38
Author: Kolo <[email protected]>
Date:   Thu Nov 21 21:57:51 2024 +0100

    add DJ to freeplay page

commit 662ea78
Author: lemz1 <[email protected]>
Date:   Thu Nov 21 21:10:16 2024 +0100

    Update CharCreatorResultsPage.hx

commit c671faf
Merge: 879160f d332e0a
Author: Kolo <[email protected]>
Date:   Thu Nov 21 20:07:05 2024 +0100

    Merge branch 'char-creator-thing' of https://github.com/KoloInDaCrib/Funkin-Contrib into char-creator-thing

commit 879160f
Merge: e19a761 b959829
Author: Kolo <[email protected]>
Date:   Thu Nov 21 20:04:14 2024 +0100

    Merge branch 'char-creator-thing' of https://github.com/KoloInDaCrib/Funkin-Contrib into char-creator-thing

commit d332e0a
Author: lemz1 <[email protected]>
Date:   Thu Nov 21 20:03:38 2024 +0100

    Revert "update submodule"

    This reverts commit b959829.

commit e19a761
Author: Kolo <[email protected]>
Date:   Thu Nov 21 20:02:03 2024 +0100

    asset submodule fix ty lemz 4 tips

commit b959829
Author: lemz1 <[email protected]>
Date:   Thu Nov 21 20:01:36 2024 +0100

    update submodule

commit 3cc71cc
Author: Kolo <[email protected]>
Date:   Thu Nov 21 17:16:27 2024 +0100

    fistPump in the freeplayDJ dialog and some bugfixes

    this was mostly done as a test to see if I did sub-modules correctly
    if successful, I will migrate some dialog's to .xml files instead of using the @:xml macro

commit ff83fc1
Author: lemz1 <[email protected]>
Date:   Thu Nov 21 14:19:51 2024 +0100

    add animations for score and percent

commit b4a89d4
Author: lemz1 <[email protected]>
Date:   Wed Nov 20 23:03:25 2024 +0100

    remove curRankInt stuff and rather use safeSelectedItem

commit acd85bc
Author: lemz1 <[email protected]>
Date:   Wed Nov 20 22:36:56 2024 +0100

    add "safeSelectedItem" field to DropDown

commit 212883f
Author: lemz1 <[email protected]>
Date:   Wed Nov 20 22:25:52 2024 +0100

    this should be an "and"

commit e1ee1ee
Author: lemz1 <[email protected]>
Date:   Wed Nov 20 22:18:24 2024 +0100

    using datasource instead of extra variable

    im thinking of using a build macro to create a "safeSelectedItem" field to Dropdowns, which just do "dataSource.get(selectedIndex)"

commit 76c3eb2
Author: Kolo <[email protected]>
Date:   Wed Nov 20 22:07:26 2024 +0100

    started getting notifications in

commit 81b1c7b
Author: Kolo <[email protected]>
Date:   Wed Nov 20 21:14:22 2024 +0100

    shuffle a bunch of things around to fix the crash

    we should not use dropdown's selectedIndex as an index for anything, they cause crashes if the parent dialog wasn't opened beforehand

commit aa11de5
Author: lemz1 <[email protected]>
Date:   Wed Nov 20 17:02:56 2024 +0100

    clicking on labelRank leads to a crash

commit 67c7f2a
Author: lemz1 <[email protected]>
Date:   Wed Nov 20 16:16:31 2024 +0100

    delayed music and animation

commit 9bd04a1
Author: Kolo <[email protected]>
Date:   Wed Nov 20 12:40:43 2024 +0100

    play music when switching animations

commit b34df43
Author: lemz1 <[email protected]>
Date:   Tue Nov 19 23:10:59 2024 +0100

    play animations when changing rank

commit ca95bec
Author: lemz1 <[email protected]>
Date:   Tue Nov 19 22:07:23 2024 +0100

    use validatecharacterdata in parse function

commit 54654ea
Author: Kolo <[email protected]>
Date:   Tue Nov 19 21:29:43 2024 +0100

    character metadata dialog + healthicon bug fix

commit 30e4a05
Author: lemz1 <[email protected]>
Date:   Tue Nov 19 18:04:05 2024 +0100

    preview different animations

commit 01f20ba
Author: lemz1 <[email protected]>
Date:   Tue Nov 19 17:29:08 2024 +0100

    replayable animations

commit 02e1a50
Author: lemz1 <[email protected]>
Date:   Mon Nov 18 23:08:12 2024 +0100

    import already existing player animations

commit 9db319b
Author: lemz1 <[email protected]>
Date:   Mon Nov 18 21:35:08 2024 +0100

    rank animation data class

commit 31ce73f
Author: Kolo <[email protected]>
Date:   Mon Nov 18 19:53:45 2024 +0100

    freeplay style export

commit 2be51f8
Author: Kolo <[email protected]>
Date:   Sun Nov 17 22:12:57 2024 +0100

    bug fixes + load button callbacks that i forgot oops

commit 22261f8
Author: lemz1 <[email protected]>
Date:   Sun Nov 17 20:28:08 2024 +0100

    starting to implement resultsanimdialog

commit be131cf
Author: Kolo <[email protected]>
Date:   Sun Nov 17 20:18:02 2024 +0100

    more works on the style dialog

commit 7fc51a0
Author: lemz1 <[email protected]>
Date:   Sun Nov 17 18:30:11 2024 +0100

    add character to results

commit d97bbb1
Author: lemz1 <[email protected]>
Date:   Sun Nov 17 16:49:52 2024 +0100

    background for resultspage

commit a33b144
Author: Kolo <[email protected]>
Date:   Sun Nov 17 15:21:25 2024 +0100

    starting to implement freeplay style dialog

commit 34cee3d
Author: lemz1 <[email protected]>
Date:   Sun Nov 17 12:37:07 2024 +0100

    fix logic error in BGScrollingText

commit 3d8de7b
Author: Kolo <[email protected]>
Date:   Sun Nov 17 11:15:58 2024 +0100

    refresh scrolling text upon textfield update

commit a4f5e94
Author: Kolo <[email protected]>
Date:   Sun Nov 17 10:38:33 2024 +0100

    remove a bunch of unnecessary casts

commit 7b24398
Author: lemz1 <[email protected]>
Date:   Sun Nov 17 01:11:11 2024 +0100

    import bgtext

commit 952056c
Author: Kolo <[email protected]>
Date:   Sat Nov 16 22:39:39 2024 +0100

    random capsule

commit 60d6be4
Author: Kolo <[email protected]>
Date:   Sat Nov 16 20:46:28 2024 +0100

    scrolling text addition

commit 79547dd
Author: lemz1 <[email protected]>
Date:   Sat Nov 16 20:19:55 2024 +0100

    update export for playable character

commit f86b1f8
Author: lemz1 <[email protected]>
Date:   Sat Nov 16 19:52:01 2024 +0100

    add freeplay settings dialog

commit a060b79
Author: Kolo <[email protected]>
Date:   Sat Nov 16 18:10:30 2024 +0100

    freeplay page for freeplay things

commit 214fa00
Author: lemz1 <[email protected]>
Date:   Sat Nov 16 12:58:46 2024 +0100

    background text stuff

    TODO: Move this to FreeplayDJCreator

commit 68e2a80
Author: Kolo <[email protected]>
Date:   Fri Nov 15 23:47:24 2024 +0100

    a lot of cosmetic things

commit 5518835
Author: Kolo <[email protected]>
Date:   Fri Nov 15 20:06:16 2024 +0100

    fix of atlas chars and ability to play anims

commit 956fd23
Author: lemz1 <[email protected]>
Date:   Fri Nov 15 00:42:25 2024 +0100

    ownedCharacters

commit 9704da5
Author: Kolo <[email protected]>
Date:   Thu Nov 14 22:09:29 2024 +0100

    started getting characters in the selectpage

    very buggy though and i have no idea why !!!

commit 250e934
Author: lemz1 <[email protected]>
Date:   Wed Nov 13 21:31:04 2024 +0100

    starting to implement play char settings

commit ca446ab
Author: lemz1 <[email protected]>
Date:   Wed Nov 13 20:19:06 2024 +0100

    reset icon texture when loading pixel icon files

commit 1ef3f56
Author: lemz1 <[email protected]>
Date:   Wed Nov 13 20:05:04 2024 +0100

    reset the scale of the og icon

commit 459992c
Author: Kolo <[email protected]>
Date:   Tue Nov 12 20:47:32 2024 +0100

    buncha new stuff

    - CharSelectIndexSubPage now has a dedicated haxeui button (also exit with BACK keybind lol)
    - Pixel icons are able to be uploaded from files now yuh
    - Some cosmetic stuff in CharSelectIndexSubPage

commit 097a507
Author: Kolo <[email protected]>
Date:   Sun Nov 10 19:35:08 2024 +0100

    starting to work on player data imports

commit 701adfb
Author: lemz1 <[email protected]>
Date:   Sun Nov 10 14:29:21 2024 +0100

    also scale iconTint

commit 60c809e
Author: lemz1 <[email protected]>
Date:   Sun Nov 10 14:19:12 2024 +0100

    simple export

commit 6123419
Author: Kolo <[email protected]>
Date:   Sun Nov 10 13:52:31 2024 +0100

    slightly better system for multisparrow

commit bef8ac2
Author: lemz1 <[email protected]>
Date:   Sun Nov 10 13:40:02 2024 +0100

    starting to implement playable character export

commit b894ddc
Author: lemz1 <[email protected]>
Date:   Sun Nov 10 13:18:40 2024 +0100

    give selected icon a yellow tint

commit 837eaba
Author: lemz1 <[email protected]>
Date:   Sun Nov 10 00:04:32 2024 +0100

    use confirm and denied cursor

commit cecb882
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 23:42:50 2024 +0100

    some fixes

commit f6c82c1
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 23:25:09 2024 +0100

    fix selection

commit b31053f
Author: Kolo <[email protected]>
Date:   Sat Nov 9 23:04:21 2024 +0100

    replace locks with desaturated bf icons

    the boyfriends are plentiful

commit bd3d3cd
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 22:30:26 2024 +0100

    prototype menu for char index

commit cc02f3c
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 21:40:51 2024 +0100

    Update CharCreatorSelectPage.hx

commit 319c163
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 20:47:22 2024 +0100

    Update CharCreatorSelectPage.hx

commit feaf8b2
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 20:30:23 2024 +0100

    icon selection stuff

commit 332c09d
Author: lemz1 <[email protected]>
Date:   Sat Nov 9 16:36:40 2024 +0100

    fix crash when there are no health icon files

commit f7b6fd9
Author: Kolo <[email protected]>
Date:   Sat Nov 9 15:53:15 2024 +0100

    i heart bugfixing

commit 0446f42
Author: Kolo <[email protected]>
Date:   Thu Nov 7 20:17:39 2024 +0100

    starting to work on player data pages

commit f53a4cd
Author: lemz1 <[email protected]>
Date:   Tue Nov 5 22:15:12 2024 +0100

    use versionutil for retrieving entry version

commit a18d1a2
Author: Kolo <[email protected]>
Date:   Mon Nov 4 20:17:08 2024 +0100

    some bug fixes oops

commit 12c19c5
Author: Kolo <[email protected]>
Date:   Mon Nov 4 18:26:19 2024 +0100

    import functionality wip

commit 6837de5
Author: lemz1 <[email protected]>
Date:   Sun Nov 3 22:12:30 2024 +0100

    animate atlas import

commit 13eef9c
Author: lemz1 <[email protected]>
Date:   Sun Nov 3 20:08:59 2024 +0100

    use characterrendertype

commit 3ad47ad
Author: lemz1 <[email protected]>
Date:   Sun Nov 3 17:10:14 2024 +0100

    use char-creator submodule

commit 3ea5fca
Author: Kolo <[email protected]>
Date:   Sun Nov 3 15:55:31 2024 +0100

    health icon saving system

commit 1096b87
Author: lemz1 <[email protected]>
Date:   Sun Nov 3 13:17:00 2024 +0100

    remove animation implementation

commit fd5cd6a
Author: lemz1 <[email protected]>
Date:   Sun Nov 3 03:18:06 2024 +0100

    fix compile error

commit 3d77df0
Author: Kolo <[email protected]>
Date:   Sat Nov 2 20:58:59 2024 +0100

    compilation fix oops

commit b12f0d3
Author: Kolo <[email protected]>
Date:   Sat Nov 2 20:23:27 2024 +0100

    some health icon hijinx

    the dialog xml data is within the dialog class, i am abhorrent at submodules

commit 6ad9d74
Author: lemz1 <[email protected]>
Date:   Sat Nov 2 17:34:32 2024 +0100

    use CharacterRenderType and fix animate atlas ghost and offsets

commit 886c332
Author: lemz1 <[email protected]>
Date:   Sat Nov 2 16:23:00 2024 +0100

    make import export handler

commit 6135565
Author: lemz1 <[email protected]>
Date:   Sat Nov 2 15:30:40 2024 +0100

    export images, etc. as well if necessary

commit 2cd0ae7
Author: lemz1 <[email protected]>
Date:   Sat Nov 2 12:46:13 2024 +0100

    we can export now (although its not finished yet)

commit 2abc94d
Author: lemz1 <[email protected]>
Date:   Sat Nov 2 11:38:11 2024 +0100

    starting to implement export

commit 8b1aa76
Author: lemz1 <[email protected]>
Date:   Sat Nov 2 00:32:39 2024 +0100

    atlas character somewhat works

commit cf7eae8
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 23:44:40 2024 +0100

    use symbolDictionary for atlassprite

commit 6500f17
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 23:26:34 2024 +0100

    override draw function so that atlasCharacter is drawn

commit 09abe61
Merge: c113333 2ebd681
Author: lemz <[email protected]>
Date:   Fri Nov 1 22:24:38 2024 +0100

    Merge pull request #3 from lemz1/feature/multisparrow-rework

    Multisparrow Character "Rework"

commit 2ebd681
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 22:21:36 2024 +0100

    no more animPath text field

commit 9bf898a
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 22:14:58 2024 +0100

    fix some multisparrow stuff

commit d8f3e6a
Merge: e0ab779 c113333
Author: lemz <[email protected]>
Date:   Fri Nov 1 21:35:11 2024 +0100

    Merge branch 'char-creator-thing' into feature/multisparrow-rework

commit e0ab779
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 21:32:57 2024 +0100

    migration is finished

commit c113333
Author: Kolo <[email protected]>
Date:   Fri Nov 1 16:01:02 2024 +0100

    more works on ghost + small bug fixed

commit 5ab7332
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 01:39:26 2024 +0100

    fix some script errors

    still need to implement migration

commit c314864
Author: lemz1 <[email protected]>
Date:   Fri Nov 1 01:23:40 2024 +0100

    character registry and first migration stuff (not yet finished)

commit 34386f4
Author: lemz1 <[email protected]>
Date:   Thu Oct 31 23:28:38 2024 +0100

    Update MultiSparrowCharacter.hx

commit 4defc11
Author: lemz1 <[email protected]>
Date:   Thu Oct 31 23:10:29 2024 +0100

    yay finished multisparrow i think

commit b20e2c8
Author: lemz1 <[email protected]>
Date:   Thu Oct 31 00:29:47 2024 +0100

    multiple asset boxes for multisparrow

commit be8d76c
Author: lemz1 <[email protected]>
Date:   Thu Oct 31 23:18:38 2024 +0100

    compiling: update submodule

commit 9bbec4e
Author: Kolo <[email protected]>
Date:   Thu Oct 31 21:58:20 2024 +0100

    compilation error fix

commit cc7e43c
Author: Kolo <[email protected]>
Date:   Thu Oct 31 21:34:10 2024 +0100

    forgot to export character lol

commit dad258a
Author: Kolo <[email protected]>
Date:   Thu Oct 31 21:29:13 2024 +0100

    ghost/onion skin WIP

commit 74abe1e
Author: lemz1 <[email protected]>
Date:   Wed Oct 30 23:49:57 2024 +0100

    no more xml and txt field

commit 08852be
Author: lemz1 <[email protected]>
Date:   Wed Oct 30 22:34:23 2024 +0100

    fix compiling some stuff

commit 91e574e
Author: Kolo <[email protected]>
Date:   Wed Oct 30 22:16:37 2024 +0100

    char creator assets

commit 62c53aa
Author: Kolo <[email protected]>
Date:   Wed Oct 30 22:10:43 2024 +0100

    add regular files

commit c0b15ec
Author: Hundrec <[email protected]>
Date:   Wed Oct 23 14:30:52 2024 -0700

    [docs] Add missing changes and links to Changelog (FunkinCrew#3655)

    * changelog sweep

    * Resolve a few conflicts

    * Resolve more conflicts

    * DadBattle

    * Re-add @ianharrigan

    * Add links to 0.5.0

    * Add links and contributors to 0.4.1 and 0.4.0

    * Add links to 0.3.3 and finishing touches

    * Add and polish 0.5.3 changes

    * Make spacing consistent

commit 09b42f3
Author: Eric <[email protected]>
Date:   Fri Oct 11 23:56:17 2024 -0400

    Rewrite CHANGELOG.md for v0.5.2
  • Loading branch information
KoloInDaCrib committed Dec 13, 2024
1 parent 0d8e4a5 commit b80144d
Show file tree
Hide file tree
Showing 73 changed files with 7,815 additions and 422 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "assets"]
path = assets
url = https://github.com/FunkinCrew/Funkin.assets
url = https://github.com/FunkinCrew/funkin.assets
[submodule "art"]
path = art
url = https://github.com/FunkinCrew/Funkin.art
225 changes: 138 additions & 87 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets
1 change: 1 addition & 0 deletions project.hxp
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ class Project extends HXProject {
function configureCustomMacros() {
// This macro allows addition of new functionality to existing Flixel. -->
addHaxeMacro("addMetadata('@:build(funkin.util.macro.FlxMacro.buildFlxBasic())', 'flixel.FlxBasic')");
addHaxeMacro("addMetadata('@:build(funkin.util.macro.FlxMacro.buildDropDown())', 'haxe.ui.components.DropDown')");
}

function configureOutputDir() {
Expand Down
6 changes: 3 additions & 3 deletions source/funkin/InitState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import funkin.data.event.SongEventRegistry;
import funkin.data.stage.StageRegistry;
import funkin.data.story.level.LevelRegistry;
import funkin.modding.module.ModuleHandler;
import funkin.play.character.CharacterData.CharacterDataParser;
import funkin.data.character.CharacterRegistry;
import funkin.play.notes.notekind.NoteKindManager;
import funkin.play.PlayStatePlaylist;
import funkin.ui.debug.charting.ChartEditorState;
Expand Down Expand Up @@ -177,9 +177,9 @@ class InitState extends FlxState
AlbumRegistry.instance.loadEntries();
StageRegistry.instance.loadEntries();

// TODO: CharacterDataParser doesn't use json2object, so it's way slower than the other parsers and more prone to syntax errors.
// TODO: CharacterRegistry doesn't use json2object, so it's way slower than the other parsers and more prone to syntax errors.
// Move it to use a BaseRegistry.
CharacterDataParser.loadCharacterCache();
CharacterRegistry.loadCharacterCache();

NoteKindManager.loadScripts();

Expand Down
10 changes: 0 additions & 10 deletions source/funkin/data/animation/AnimationData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class AnimationDataUtil
return {
name: name,
prefix: data.prefix,
assetPath: data.assetPath,
offsets: data.offsets,
looped: data.looped,
flipX: data.flipX,
Expand All @@ -21,7 +20,6 @@ class AnimationDataUtil
{
return {
prefix: data.prefix,
assetPath: data.assetPath,
offsets: data.offsets,
looped: data.looped,
flipX: data.flipX,
Expand Down Expand Up @@ -65,14 +63,6 @@ typedef UnnamedAnimationData =
@:optional
var prefix:String;

/**
* Optionally specify an asset path to use for this specific animation.
* ONLY for use by MultiSparrow characters.
* @default The assetPath of the parent sprite
*/
@:optional
var assetPath:Null<String>;

/**
* Offset the character's position by this amount when playing this animation.
* @default [0, 0]
Expand Down
227 changes: 227 additions & 0 deletions source/funkin/data/character/CharacterData.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
package funkin.data.character;

import funkin.data.animation.AnimationData;

/**
* Describes the available rendering types for a character.
*/
enum abstract CharacterRenderType(String) from String to String
{
/**
* Renders the character using a single spritesheet and XML data.
*/
public var Sparrow = 'sparrow';

/**
* Renders the character using a single spritesheet and TXT data.
*/
public var Packer = 'packer';

/**
* Renders the character using multiple spritesheets and XML data.
*/
public var MultiSparrow = 'multisparrow';

/**
* Renders the character using a spritesheet of symbols and JSON data.
*/
public var AnimateAtlas = 'animateatlas';

/**
* Renders the character using a custom method.
*/
public var Custom = 'custom';
}

/**
* The JSON data schema used to define a character.
*/
typedef CharacterData =
{
/**
* The sematic version number of the character data JSON format.
*/
var version:String;

/**
* The readable name of the character.
*/
var name:String;

/**
* The type of rendering system to use for the character.
* @default sparrow
*/
@:optional
@:default('sparrow')
var renderType:CharacterRenderType;

/**
* Behavior varies by render type:
* - SPARROW: Path to retrieve both the spritesheet and the XML data from.
* - PACKER: Path to retrieve both the spritsheet and the TXT data from.
*/
var assetPaths:Array<String>;

/**
* The scale of the graphic as a float.
* Pro tip: On pixel-art levels, save the sprites small and set this value to 6 or so to save memory.
* @default 1
*/
@:optional
@:default(1.0)
var scale:Null<Float>;

/**
* Optional data about the health icon for the character.
*/
@:optional
var healthIcon:Null<HealthIconData>;

@:optional
var death:Null<DeathData>;

/**
* The global offset to the character's position, in pixels.
* @default [0, 0]
*/
@:optional
@:default([0, 0])
var offsets:Null<Array<Float>>;

/**
* The amount to offset the camera by while focusing on this character.
* Default value focuses on the character directly.
* @default [0, 0]
*/
@:optional
@:default([0, 0])
var cameraOffsets:Array<Float>;

/**
* Setting this to true disables anti-aliasing for the character.
* @default false
*/
@:optional
@:default(false)
var isPixel:Null<Bool>;

/**
* The frequency at which the character will play its idle animation, in beats.
* Increasing this number will make the character dance less often.
* Supports up to `0.25` precision.
* @default `1.0` on characters
*/
@:optional
@:default(1.0)
var danceEvery:Null<Float>;

/**
* The minimum duration that a character will play a note animation for, in beats.
* If this number is too low, you may see the character start playing the idle animation between notes.
* If this number is too high, you may see the the character play the sing animation for too long after the notes are gone.
*
* Examples:
* - Daddy Dearest uses a value of `1.525`.
* @default 8.0
*/
@:optional
@:default(8.0)
var singTime:Null<Float>;

/**
* An optional array of animations which the character can play.
*/
var animations:Array<AnimationData>;

/**
* If animations are used, this is the name of the animation to play first.
* @default idle
*/
@:optional
@:default('idle')
var startingAnimation:Null<String>;

/**
* Whether or not the whole ass sprite is flipped by default.
* Useful for characters that could also be played (Pico)
*
* @default false
*/
@:optional
@:default(false)
var flipX:Null<Bool>;
};

/**
* The JSON data schema used to define the health icon for a character.
*/
typedef HealthIconData =
{
/**
* The ID to use for the health icon.
* @default The character's ID
*/
@:optional
var id:Null<String>;

/**
* The scale of the health icon.
*/
@:optional
@:default(1.0)
var scale:Null<Float>;

/**
* Whether to flip the health icon horizontally.
* @default false
*/
@:optional
@:default(false)
var flipX:Null<Bool>;

/**
* Multiply scale by 6 and disable antialiasing
* @default false
*/
@:optional
@:default(false)
var isPixel:Null<Bool>;

/**
* The offset of the health icon, in pixels.
* @default [0, 25]
*/
@:optional
@:default([0, 25])
var offsets:Null<Array<Float>>;
}

typedef DeathData =
{
/**
* The amount to offset the camera by while focusing on this character as they die.
* Default value focuses on the character's graphic midpoint.
* @default [0, 0]
*/
@:optional
@:default([0, 0])
var ?cameraOffsets:Array<Float>;

/**
* The amount to zoom the camera by while focusing on this character as they die.
* Value is a multiplier of the default camera zoom for the stage.
* @default 1.0
*/
@:optional
@:default(1.0)
var ?cameraZoom:Float;

/**
* Impose a delay between when the character reaches `0` health and when the death animation plays.
* @default 0.0
*/
@:optional
@:default(0.0)
var ?preTransitionDelay:Float;
}
Loading

0 comments on commit b80144d

Please sign in to comment.