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

gamejolt support #2

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/build-game-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
haxelib install hmm --quiet
haxelib run hmm install --quiet
haxelib run lime rebuild hxcpp
haxelib run lime rebuild systools linux

- name: Compile
run: haxelib run lime build linux
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-game-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
haxelib install hmm --quiet
haxelib run hmm install --quiet
haxelib run lime rebuild hxcpp
haxelib run lime rebuild systools mac
- name: Compile
run: haxelib run lime build mac
- name: Upload Artifact
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-game-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
haxelib run hmm install --quiet
haxelib run lime rebuild hxcpp
haxelib run lime rebuild cpp
haxelib run lime rebuild systools windows

- name: Compile
run: haxelib run lime build windows -32 -release -D 32bits
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-game-windows-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
haxelib install hmm --quiet
haxelib run hmm install --quiet
haxelib run lime rebuild hxcpp
haxelib run lime rebuild systools windows

- name: Compile
run: haxelib run lime build windows -debug
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-game-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
haxelib install hmm --quiet
haxelib run hmm install --quiet
haxelib run lime rebuild hxcpp
haxelib run lime rebuild systools windows

- name: Compile
run: haxelib run lime build windows
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ libs/
lib/
.vs/
APIStuff.hx
GJKeys.hx
dump/
export/
RECOVER_*.fla
Expand Down
2 changes: 1 addition & 1 deletion assets/preload/data/credits.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
},
{
"header": "Charles would like to specially thank",
"body": [{ "line": "JustKolosaki" }, { "line": "anysad" }]
"body": [{ "line": "JustKolosaki" }, { "line": "anysad" }, { "line": "GamerPablito" }]
}
]
}
14 changes: 14 additions & 0 deletions hmm.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,20 @@
"ref": null,
"url": "https://github.com/MaybeMaru/moonchart"
},
{
"name": "tentools",
"type": "git",
"dir": null,
"ref": "6a8077182dfb949ed64e11075cda641687231379",
"url": "https://github.com/TentaRJ/tentools"
},
{
"name": "systools",
"type": "git",
"dir": null,
"ref": "2055163b700afeaf8f566c32442148cdbc429e44",
"url": "https://github.com/haya3218/retools"
},
{
"name": "openfl",
"type": "git",
Expand Down
15 changes: 15 additions & 0 deletions project.hxp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,10 @@ class Project extends HXProject {

addHaxelib('moonchart'); // Funny chart support

addHaxelib('tentools'); // idk
addHaxelib('systools'); // idk
addNdll('systools', 'systools'); // i had to add this function just for systools lol

if (isDebug()) {
addHaxelib('hxcpp-debug-server'); // VSCode debug support
}
Expand Down Expand Up @@ -867,6 +871,17 @@ class Project extends HXProject {
this.haxelibs.push(new Haxelib(name, version));
}

/**
* Add a NDLL to the project.
* NEEDED FOR SYSTOOLS!!!!
* @param name The name of the NDLL to add.
* @param version The name for the library that the NDLL uses.
*/
public function addNdll(name:String, haxelib:Null<hxp.Haxelib> = null):Void {
this.ndlls.push(new NDLL(name, haxelib));
}


/**
* Add a `haxeflag` to the project.
*/
Expand Down
12 changes: 11 additions & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import flixel.FlxG;
import flixel.FlxGame;
import flixel.FlxState;
import flixel.tweens.FlxTween;
#if systools
import funkin.api.gamejolt.GameJolt;
#end
import funkin.Preferences;
#if desktop
import funkin.audio.ALSoftConfig; // Just to make sure DCE doesn't remove this, since it's not directly referenced anywhere else.
Expand Down Expand Up @@ -59,6 +62,10 @@ class Main extends Sprite
public static var lightMode:Bool = false;
#end

#if systools
public static var gjToastManager:GJToastManager;
#end

// You can pretty much ignore everything from here on - your code should go in your states.
// [ * -- INTERNAL VARIABLES - PLS DONT TOUCH THEM! -- * ] //
@:dox(hide)
Expand Down Expand Up @@ -170,6 +177,10 @@ class Main extends Sprite
game._customSoundTray = funkin.ui.options.FunkinSoundTray;

addChild(game);
#if systools
gjToastManager = new GJToastManager();
addChild(gjToastManager);
#end

#if FEATURE_DEBUG_FUNCTIONS
game.debugger.interaction.addTool(new funkin.util.TrackerToolButtonUtil());
Expand All @@ -182,7 +193,6 @@ class Main extends Sprite
addChild(fpsCounter);
#end
*/

#if hxcpp_debug_server
trace('hxcpp_debug_server is enabled! You can now connect to the game with a debugger.');
#else
Expand Down
8 changes: 8 additions & 0 deletions source/funkin/InitState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ class InitState extends FlxState
NGio.init();
#end

//
// GAMEJOLT API SETUP
//
#if systools
GameJoltAPI.connect();
GameJoltAPI.authDaUser(Save.instance.gjUser, Save.instance.gjToken);
#end

//
// DISCORD API SETUP
//
Expand Down
Loading