Skip to content

Commit

Permalink
fixes & new crash handler
Browse files Browse the repository at this point in the history
now in a seperate folder, using haxeui, much better.

oh and custom animation controller finally added from psych

oh and this repo is gonna become the alleyway engine repo instead of vs foxa's but i cant get rid of the mod's folder itself cuz my computers being fucky rn, so uhhh just figure it out for now
  • Loading branch information
charlesisfeline committed Apr 6, 2024
1 parent 13a3ce6 commit 62b08fa
Show file tree
Hide file tree
Showing 44 changed files with 333 additions and 2,097 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ art/test_x64-debug-officialrelease.bat

### Haxe
export/*
crash-handler/build/*
.haxelib/

### Visual Studio
Expand Down
7 changes: 4 additions & 3 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<project>
<!-- _________________________ Application Settings _________________________ -->

<app file="VsFoxa" packageName="com.vsfoxateam.vsfoxa" package="com.vsfoxateam.vsfoxa" main="Main" version="0.2.8" company="VsFoxaTeam" />
<app packageName="com.vsfoxateam.vsfoxa" package="com.vsfoxateam.vsfoxa" main="Main" version="0.2.8" company="VsFoxaTeam" />

<app title="Friday Night Funkin': Vs. Foxa" unless="STORY_EDITION" />
<app title="Friday Night Funkin': Vs. Foxa: Story Edition" if="STORY_EDITION" />
<!--<app title="Friday Night Funkin': Vs. Foxa" unless="STORY_EDITION" file="VsFoxa"/>-->
<app title="Friday Night Funkin': Alleyway Engine" unless="STORY_EDITION" file="AlleywayEngine"/>-
<app title="Friday Night Funkin': Vs. Foxa: Story Edition" if="STORY_EDITION" file="VsFoxaStoryEdition"/>

<!--<define name="STORY_EDITION" />--> <!-- nah bad idea -->

Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# Friday Night Funkin' - Vs. Foxa / Alleyway Engine
# Friday Night Funkin' - Alleyway Engine
Not a Psych fork again...

Yeah, Alleyway Engine, your average Psych fork, but sometimes, it's that and not a fork at the same time, to us, it's such an experience to get this worked on, and like I said, a lot of help would get me appericated as much as you would, oh and the engine was, right now, specifically designed for Vs. Foxa (OG & SE), so when you want to make your own mod using this engine, some major changes at least may be required for. Anyways, see you there when it's finally done!

## Story
You and your girlfriend go down an alleyway, searching for the famous "Whitmore". However, a pink fox blocks your way! She seems to be trying to protect someone... And she does not want you to rap battle him! Sing 5 or more songs with her, maybe even a 6th one too?

## Random notice
![](https://cdn.discordapp.com/attachments/1110759814256148512/1175503013083873471/image.png)
Yeah, Alleyway Engine, your average Psych fork, but sometimes, it's that and not a fork at the same time, to us, it's such an experience to get this worked on, and like I said, a lot of help would get me appericated as much as you would, oh and the engine was, right now, originally designed for Vs. Foxa, but it will still need several changes to be used for other mods. Anyways, see you there when it's finally done!

## License Summary

Expand Down Expand Up @@ -51,7 +45,7 @@ This license agreement is subject to change at any time, and continued use of th

*Do not look at the MainMenuState file, worst mistake of my life.*

Oh and right now, HTML5 ports may not work, we are not responible for them, nor do we maintain them at all.
Oh and right now, HTML5 ports have no guarantee of working, we are not responible for them, nor do we maintain them at all.

Anyway, back to the original Psych README...

Expand All @@ -60,7 +54,7 @@ Engine originally used on [Mind Games Mod](https://gamebanana.com/mods/301107),

## Installation:'

You must have [Haxe 4.2.5](https://haxe.org/download/), installed in order to move on to these next steps.
You must have [Haxe 4.3.x](https://haxe.org/download/), installed in order to move on to these next steps.

------------------

Expand Down Expand Up @@ -124,7 +118,7 @@ If you want to just play the mod and not compile, just use the action builds (ei

if you wish to disable things like *Lua Scripts* or *Video Cutscenes*, you can read over to `Project.xml`

inside `Project.xml`, you will find several variables to customize Vs. Foxa / Alleyway Engine to your liking
inside `Project.xml`, you will find several variables to customize Alleyway Engine to your liking

to start you off, disabling Videos should be simple, simply Delete the line `"VIDEOS_ALLOWED"` or comment it out by wrapping the line in XML-like comments, like this `<!-- YOUR_LINE_HERE -->`

Expand Down
Binary file added assets/fonts/FNFont-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Funkin-Bold.otf
Binary file not shown.
42 changes: 21 additions & 21 deletions assets/shared/images/gfDanceTitle.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"titlex":-150,
"titley":-100,
"startx":100,
"starty":576,
"gfx":545,
"gfy":40,
"gfscalex":1,
"gfscaley":1,
"gfantialiasing":true,
"backgroundSprite":"",
"bpm":102,
"versiontext":"Friday Night Funkin': Vs. Foxa 3.0",
"friday":"FNF",
"night":"Vs",
"funkin":"Foxa",
"ngtext":"newgrounds",
"noAssociate":true,
"logoHover":true,
"showThanks":true
}
{
"titlex": -150,
"titley": -100,
"startx": 100,
"starty": 576,
"gfx": 545,
"gfy": 40,
"gfscalex": 1,
"gfscaley": 1,
"gfantialiasing": true,
"backgroundSprite": "",
"bpm": 102,
"versiontext": "Friday Night Funkin': Vs. Foxa 3.0",
"friday": "FNF",
"night": "Vs",
"funkin": "Foxa",
"ngtext": "newgrounds",
"noAssociate": true,
"logoHover": true,
"showThanks": true
}
Binary file added assets/shared/images/icons/icon-noone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions assets/shared/images/mainmenu/mainMenuShits.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"fridayAchieve":"friday_night_play",
"discordLink":"https://www.youtube.com/@foxatheartist/featured",
"checkboard":true,
"versionText":"FNF Vs. Foxa 3.0"
}
{
"fridayAchieve": "friday_night_play",
"discordLink": "https://www.youtube.com/@foxatheartist/featured",
"checkboard": true,
"showEditorsMenu": true,
"versionText": "FNF Vs. Foxa 3.0"
}
Binary file added crash-handler/assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crash-handler/assets/iconOG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions crash-handler/assets/main-view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<vbox width="500">
<!-- <box width="500" height="100" style="background-color: red; border:1px solid red; background-opacity: .5" /> -->
<image resource="assets/banner.png" />
<vbox style="padding: 5px;" width="100%">
<label id="message-label" text="Message" width="100%" textAlign="center" />
<label text="Call stack:" />
<scrollview width="100%" height="200" contentWidth="100%">
<vbox style="padding: 2px;" width="100%">
<label text="Call Stack" id="call-stack-label" />
</vbox>
</scrollview>
<label text="Crash Reason" id="crash-reason-label" />
<box width="100%">
<button horizontalAlign="left" id="view-crash-dump-button" text="View Crash Dump" />
<button horizontalAlign="center" id="restart-button" text="Restart" />
<button horizontalAlign="right" id="close-button" text="Close" />
</box>
</vbox>
</vbox>
15 changes: 15 additions & 0 deletions crash-handler/hxformat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"lineEnds": {
"leftCurly": "both",
"rightCurly": "both",
"objectLiteralCurly": {
"leftCurly": "after"
}
},
"sameLine": {
"ifElse": "next",
"doWhile": "next",
"tryBody": "next",
"tryCatch": "next"
}
}
21 changes: 21 additions & 0 deletions crash-handler/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<meta title="Alleyway Engine Crash Handler" package="CrashDialog" version="1.0.0" company="" />
<app main="CrashDialog" file="AlleywayCrashHandler" path="build/openfl" />

<window background="#FFFFFF" fps="60" resizable="false"/>
<window width="500" height="466" if="desktop" />
<window width="0" height="0" if="html5" />
<!-- shouldn't ever compile to html5 but just in case -->

<!-- classpath, haxe libs -->
<source path="src" />

<haxelib name="openfl" />
<haxelib name="actuate" />

<haxelib name="haxeui-core" />
<haxelib name="haxeui-openfl" />

<icon path="assets/iconOG.png" />
</project>
107 changes: 107 additions & 0 deletions crash-handler/src/CrashDialog.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
package;

import haxe.ui.HaxeUIApp;
import haxe.ui.components.Button;
import haxe.ui.components.Label;
import haxe.ui.core.Component;
import haxe.ui.macros.ComponentMacros;
import sys.io.File;
import sys.io.Process;

class CrashDialog
{
/*
massive thanks to gedehari for the crash dialog code
*/
static final quotes:Array<String> = [
"oops - CharlesCatYT",
"Blueballed. - gedehari",
"bruh lmfao - CharlesCatYT",
"We have come for your errors- GET THE FUCK OUT OF MY CODE - CharlesCatYT",
"i hope you go mooseing and get fucked by a campfire - cyborg henry stickmin",
"Goodbye cruel world - ShadowMario",
"old was better - TheAnimateMan",
"what the actual fuck - cyborg henry stickmin",
"L - Dark",
"You did something, didn't you? - LightyStarOfficial",
"HA! - Dark",
"Ah bueno adios master - ShadowMario",
"Skibidy bah mmm dada *explodes* - ShadowMario",
"you aren't struggling, are you? - CharlesCatYT",
"WHY - CharlesCatYT",
"What have you done, you killed it! - crowplexus",
"Have you checked if the variable exists? - crowplexus",
"Have you even read the wiki before trying that? - crowplexus",
"you like the new crash handler? - CharlesCatYT",
"i love flixel - CharlesCatYT",
"i love openfl - CharlesCatYT",
"i love lime - CharlesCatYT",
"i love lua - CharlesCatYT",
"i love haxe - CharlesCatYT",
"i love hscript - CharlesCatYT",
"check for any semicolon, dude - CharlesCatYT",
"more null object references, okay... - CharlesCatYT",
"gedehari made the crash dialog but what happened? - CharlesCatYT"
];

public static function main()
{
var args:Array<String> = Sys.args();

if (args[0] == null) Sys.exit(1);
else {
var path:String = args[0];
var contents:String = File.getContent(path);
var split:Array<String> = contents.split("\n");

var app = new HaxeUIApp();

app.ready(() -> {
var mainView:Component = ComponentMacros.buildComponent("assets/main-view.xml");
app.addComponent(mainView);

var messageLabel:Label = mainView.findComponent("message-label", Label);
messageLabel.text = quotes[Std.random(quotes.length)] + '\nUnfortunately, Alleyway Engine has crashed hard enough that the in-game crash handler didn\'t catch it.\nSorry about that.';
messageLabel.percentWidth = 100;
messageLabel.textAlign = "center";

var callStackLabel:Label = mainView.findComponent("call-stack-label", Label);
callStackLabel.text = "";
for (i in 0...split.length - 4)
{
if (i == split.length - 5) callStackLabel.text += split[i];
else callStackLabel.text += split[i] + "\n";
}

var crashReasonLabel:Label = mainView.findComponent("crash-reason-label", Label);
crashReasonLabel.text = "";
for (i in split.length - 3...split.length - 1)
{
if (i == split.length - 2) crashReasonLabel.text += split[i];
else crashReasonLabel.text += split[i] + "\n";
}

mainView.findComponent("view-crash-dump-button", Button).onClick = function(_)
{
#if windows
Sys.command("start", [path]);
#elseif linux
Sys.command("xdg-open", [path]);
#end
};

mainView.findComponent("restart-button", Button).onClick = function(_)
{
new Process('${#if linux "./" #else "" #end}AlleywayEngine', []);
Sys.exit(0);
};

mainView.findComponent("close-button", Button).onClick = function(_) {
Sys.exit(0);
};

app.start();
});
}
}
}
13 changes: 13 additions & 0 deletions crash-handler/src/EngineMacro.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package;

import haxe.macro.Expr;

class EngineMacro {
public static macro function getEngineVersion():ExprOf<String> {
/*#if !display
return macro $v{sys.io.File.getContent("../engineVersion.txt")};
#else*/
return macro $v{"1.0.0"}
//#end
}
}
4 changes: 4 additions & 0 deletions crash-handler/src/haxeui-hxwidgets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
haxe.ui.hxwidgets.frame.fit=true
haxe.ui.hxwidgets.frame.title=Alleyway Engine Handler
haxe.ui.hxwidgets.frame.resizable=false
haxe.ui.hxwidgets.frame.maximizable=false
6 changes: 6 additions & 0 deletions crash-handler/src/module.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<module preload="all">
<resources>
<resource path="assets"/>
</resources>
</module>
Binary file added docs/img/WHAT.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 62b08fa

Please sign in to comment.