wtf am i doing

This commit is contained in:
George FunBook 2021-02-15 11:43:51 -06:00
parent 605d222174
commit 994d46a6d0
10 changed files with 912 additions and 185 deletions

View File

@ -48,7 +48,7 @@ haxelib git polymod https://github.com/larsiusprime/polymod.git
### Ignored files
I gitignore the API keys for the game, so that no one can nab them and post fake highscores on the leaderboards. But because of that the game
doesn't compile without it.
doesn't compile without it. Below is a version of APIStuff that points at a debug NG project for the game.
Just make a file in `/source` and call it `APIStuff.hx`, and copy paste this into it
@ -57,8 +57,9 @@ package;
class APIStuff
{
public static var API:String = "";
public static var EncKey:String = "";
inline public static var API:String = "51348:TtzK0rZ8";
inline public static var EncKey:String = "5NqKsSVSNKHbF9fPgZPqPg==";
inline public static var SESSION:String = null;
}
```

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,587 @@
{"frames": {
"donate basic0000":
{
"frame": {"x":0,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0001":
{
"frame": {"x":0,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0002":
{
"frame": {"x":0,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0003":
{
"frame": {"x":444,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0004":
{
"frame": {"x":444,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0005":
{
"frame": {"x":444,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0006":
{
"frame": {"x":888,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0007":
{
"frame": {"x":888,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate basic0008":
{
"frame": {"x":888,"y":0,"w":444,"h":117},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":444,"h":117},
"sourceSize": {"w":444,"h":117}
},
"donate white0000":
{
"frame": {"x":1332,"y":0,"w":590,"h":157},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":2,"w":590,"h":159},
"sourceSize": {"w":590,"h":159}
},
"donate white0001":
{
"frame": {"x":0,"y":157,"w":587,"h":154},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":1,"y":5,"w":590,"h":159},
"sourceSize": {"w":590,"h":159}
},
"donate white0002":
{
"frame": {"x":587,"y":157,"w":585,"h":155},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":3,"y":0,"w":590,"h":159},
"sourceSize": {"w":590,"h":159}
},
"freeplay basic0000":
{
"frame": {"x":1172,"y":157,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0001":
{
"frame": {"x":1172,"y":157,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0002":
{
"frame": {"x":1172,"y":157,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0003":
{
"frame": {"x":0,"y":312,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0004":
{
"frame": {"x":0,"y":312,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0005":
{
"frame": {"x":0,"y":312,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0006":
{
"frame": {"x":484,"y":312,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0007":
{
"frame": {"x":484,"y":312,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay basic0008":
{
"frame": {"x":484,"y":312,"w":484,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":484,"h":122},
"sourceSize": {"w":484,"h":122}
},
"freeplay white0000":
{
"frame": {"x":968,"y":312,"w":627,"h":169},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":635,"h":174},
"sourceSize": {"w":635,"h":174}
},
"freeplay white0001":
{
"frame": {"x":0,"y":481,"w":632,"h":170},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":3,"y":1,"w":635,"h":174},
"sourceSize": {"w":635,"h":174}
},
"freeplay white0002":
{
"frame": {"x":632,"y":481,"w":629,"h":173},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":4,"y":1,"w":635,"h":174},
"sourceSize": {"w":635,"h":174}
},
"login basic0000":
{
"frame": {"x":1261,"y":481,"w":359,"h":109},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0001":
{
"frame": {"x":1261,"y":481,"w":359,"h":109},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0002":
{
"frame": {"x":1261,"y":481,"w":359,"h":109},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0003":
{
"frame": {"x":1620,"y":481,"w":359,"h":109},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0004":
{
"frame": {"x":1620,"y":481,"w":359,"h":109},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0005":
{
"frame": {"x":1620,"y":481,"w":359,"h":109},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0006":
{
"frame": {"x":0,"y":654,"w":358,"h":109},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0007":
{
"frame": {"x":0,"y":654,"w":358,"h":109},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login basic0008":
{
"frame": {"x":0,"y":654,"w":358,"h":109},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":359,"h":109},
"sourceSize": {"w":359,"h":109}
},
"login white0000":
{
"frame": {"x":358,"y":654,"w":449,"h":137},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":449,"h":137},
"sourceSize": {"w":449,"h":137}
},
"login white0001":
{
"frame": {"x":807,"y":654,"w":449,"h":137},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":449,"h":137},
"sourceSize": {"w":449,"h":137}
},
"login white0002":
{
"frame": {"x":1256,"y":654,"w":448,"h":137},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":449,"h":137},
"sourceSize": {"w":449,"h":137}
},
"logout basic0000":
{
"frame": {"x":0,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0001":
{
"frame": {"x":0,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0002":
{
"frame": {"x":0,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0003":
{
"frame": {"x":428,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0004":
{
"frame": {"x":428,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0005":
{
"frame": {"x":428,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0006":
{
"frame": {"x":856,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0007":
{
"frame": {"x":856,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout basic0008":
{
"frame": {"x":856,"y":791,"w":428,"h":110},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":428,"h":110},
"sourceSize": {"w":428,"h":110}
},
"logout white0000":
{
"frame": {"x":1284,"y":791,"w":537,"h":138},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":538,"h":138},
"sourceSize": {"w":538,"h":138}
},
"logout white0001":
{
"frame": {"x":0,"y":929,"w":538,"h":138},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":538,"h":138},
"sourceSize": {"w":538,"h":138}
},
"logout white0002":
{
"frame": {"x":538,"y":929,"w":536,"h":138},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":1,"y":0,"w":538,"h":138},
"sourceSize": {"w":538,"h":138}
},
"options basic0000":
{
"frame": {"x":1074,"y":929,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0001":
{
"frame": {"x":1074,"y":929,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0002":
{
"frame": {"x":1074,"y":929,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0003":
{
"frame": {"x":1561,"y":929,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0004":
{
"frame": {"x":1561,"y":929,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0005":
{
"frame": {"x":1561,"y":929,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0006":
{
"frame": {"x":0,"y":1067,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0007":
{
"frame": {"x":0,"y":1067,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options basic0008":
{
"frame": {"x":0,"y":1067,"w":487,"h":112},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":487,"h":112},
"sourceSize": {"w":487,"h":112}
},
"options white0000":
{
"frame": {"x":487,"y":1067,"w":607,"h":155},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":1,"y":1,"w":609,"h":163},
"sourceSize": {"w":609,"h":163}
},
"options white0001":
{
"frame": {"x":1094,"y":1067,"w":606,"h":158},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":3,"y":1,"w":609,"h":163},
"sourceSize": {"w":609,"h":163}
},
"options white0002":
{
"frame": {"x":0,"y":1225,"w":609,"h":163},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":609,"h":163},
"sourceSize": {"w":609,"h":163}
},
"story mode basic0000":
{
"frame": {"x":609,"y":1225,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0001":
{
"frame": {"x":609,"y":1225,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0002":
{
"frame": {"x":609,"y":1225,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0003":
{
"frame": {"x":1224,"y":1225,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0004":
{
"frame": {"x":1224,"y":1225,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0005":
{
"frame": {"x":1224,"y":1225,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0006":
{
"frame": {"x":0,"y":1388,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0007":
{
"frame": {"x":0,"y":1388,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode basic0008":
{
"frame": {"x":0,"y":1388,"w":615,"h":122},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":615,"h":122},
"sourceSize": {"w":615,"h":122}
},
"story mode white0000":
{
"frame": {"x":615,"y":1388,"w":796,"h":173},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":3,"w":796,"h":181},
"sourceSize": {"w":796,"h":181}
},
"story mode white0001":
{
"frame": {"x":0,"y":1561,"w":794,"h":174},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":2,"w":796,"h":181},
"sourceSize": {"w":796,"h":181}
},
"story mode white0002":
{
"frame": {"x":794,"y":1561,"w":794,"h":181},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":796,"h":181},
"sourceSize": {"w":796,"h":181}
}},
"meta": {
"app": "Adobe Animate",
"version": "19.2.1.408",
"image": "FNF_main_menu_assets.png",
"format": "RGBA8888",
"size": {"w":2048,"h":2048},
"scale": "1"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

After

Width:  |  Height:  |  Size: 366 KiB

View File

@ -1,53 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="FNF_main_menu_assets.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- Created with Adobe Animate version 19.2.1.408 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="donate basic0000" x="0" y="0" width="444" height="117"/>
<SubTexture name="donate basic0001" x="0" y="0" width="444" height="117"/>
<SubTexture name="donate basic0002" x="0" y="0" width="444" height="117"/>
<SubTexture name="donate basic0003" x="454" y="0" width="444" height="117"/>
<SubTexture name="donate basic0004" x="454" y="0" width="444" height="117"/>
<SubTexture name="donate basic0005" x="454" y="0" width="444" height="117"/>
<SubTexture name="donate basic0006" x="908" y="0" width="444" height="117"/>
<SubTexture name="donate basic0007" x="908" y="0" width="444" height="117"/>
<SubTexture name="donate basic0008" x="908" y="0" width="444" height="117"/>
<SubTexture name="donate white0000" x="1362" y="0" width="590" height="157" frameX="0" frameY="-2" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0001" x="0" y="167" width="587" height="154" frameX="-1" frameY="-5" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0002" x="597" y="167" width="585" height="155" frameX="-3" frameY="0" frameWidth="590" frameHeight="159"/>
<SubTexture name="freeplay basic0000" x="1192" y="167" width="484" height="122"/>
<SubTexture name="freeplay basic0001" x="1192" y="167" width="484" height="122"/>
<SubTexture name="freeplay basic0002" x="1192" y="167" width="484" height="122"/>
<SubTexture name="freeplay basic0003" x="0" y="332" width="484" height="122"/>
<SubTexture name="freeplay basic0004" x="0" y="332" width="484" height="122"/>
<SubTexture name="freeplay basic0005" x="0" y="332" width="484" height="122"/>
<SubTexture name="freeplay basic0006" x="494" y="332" width="484" height="122"/>
<SubTexture name="freeplay basic0007" x="494" y="332" width="484" height="122"/>
<SubTexture name="freeplay basic0008" x="494" y="332" width="484" height="122"/>
<SubTexture name="freeplay white0000" x="988" y="332" width="627" height="169" frameX="0" frameY="0" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0001" x="0" y="511" width="632" height="170" frameX="-3" frameY="-1" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0002" x="642" y="511" width="629" height="173" frameX="-4" frameY="-1" frameWidth="635" frameHeight="174"/>
<SubTexture name="options basic0000" x="1281" y="511" width="487" height="111"/>
<SubTexture name="options basic0001" x="1281" y="511" width="487" height="111"/>
<SubTexture name="options basic0002" x="1281" y="511" width="487" height="111"/>
<SubTexture name="options basic0003" x="0" y="694" width="487" height="111"/>
<SubTexture name="options basic0004" x="0" y="694" width="487" height="111"/>
<SubTexture name="options basic0005" x="0" y="694" width="487" height="111"/>
<SubTexture name="options basic0006" x="497" y="694" width="487" height="111"/>
<SubTexture name="options basic0007" x="497" y="694" width="487" height="111"/>
<SubTexture name="options basic0008" x="497" y="694" width="487" height="111"/>
<SubTexture name="options white0000" x="994" y="694" width="606" height="155" frameX="-2" frameY="-1" frameWidth="610" frameHeight="163"/>
<SubTexture name="options white0001" x="0" y="859" width="607" height="158" frameX="-3" frameY="-1" frameWidth="610" frameHeight="163"/>
<SubTexture name="options white0002" x="617" y="859" width="610" height="163"/>
<SubTexture name="story mode basic0000" x="1237" y="859" width="615" height="122"/>
<SubTexture name="story mode basic0001" x="1237" y="859" width="615" height="122"/>
<SubTexture name="story mode basic0002" x="1237" y="859" width="615" height="122"/>
<SubTexture name="story mode basic0003" x="0" y="1032" width="615" height="122"/>
<SubTexture name="story mode basic0004" x="0" y="1032" width="615" height="122"/>
<SubTexture name="story mode basic0005" x="0" y="1032" width="615" height="122"/>
<SubTexture name="story mode basic0006" x="625" y="1032" width="615" height="122"/>
<SubTexture name="story mode basic0007" x="625" y="1032" width="615" height="122"/>
<SubTexture name="story mode basic0008" x="625" y="1032" width="615" height="122"/>
<SubTexture name="story mode white0000" x="1250" y="1032" width="796" height="173" frameX="0" frameY="-3" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0001" x="0" y="1215" width="794" height="174" frameX="-2" frameY="-2" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0002" x="804" y="1215" width="794" height="181" frameX="0" frameY="0" frameWidth="796" frameHeight="181"/>
<SubTexture name="donate basic0003" x="444" y="0" width="444" height="117"/>
<SubTexture name="donate basic0004" x="444" y="0" width="444" height="117"/>
<SubTexture name="donate basic0005" x="444" y="0" width="444" height="117"/>
<SubTexture name="donate basic0006" x="888" y="0" width="444" height="117"/>
<SubTexture name="donate basic0007" x="888" y="0" width="444" height="117"/>
<SubTexture name="donate basic0008" x="888" y="0" width="444" height="117"/>
<SubTexture name="donate white0000" x="1332" y="0" width="590" height="157" frameX="0" frameY="-2" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0001" x="0" y="157" width="587" height="154" frameX="-1" frameY="-5" frameWidth="590" frameHeight="159"/>
<SubTexture name="donate white0002" x="587" y="157" width="585" height="155" frameX="-3" frameY="0" frameWidth="590" frameHeight="159"/>
<SubTexture name="freeplay basic0000" x="1172" y="157" width="484" height="122"/>
<SubTexture name="freeplay basic0001" x="1172" y="157" width="484" height="122"/>
<SubTexture name="freeplay basic0002" x="1172" y="157" width="484" height="122"/>
<SubTexture name="freeplay basic0003" x="0" y="312" width="484" height="122"/>
<SubTexture name="freeplay basic0004" x="0" y="312" width="484" height="122"/>
<SubTexture name="freeplay basic0005" x="0" y="312" width="484" height="122"/>
<SubTexture name="freeplay basic0006" x="484" y="312" width="484" height="122"/>
<SubTexture name="freeplay basic0007" x="484" y="312" width="484" height="122"/>
<SubTexture name="freeplay basic0008" x="484" y="312" width="484" height="122"/>
<SubTexture name="freeplay white0000" x="968" y="312" width="627" height="169" frameX="0" frameY="0" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0001" x="0" y="481" width="632" height="170" frameX="-3" frameY="-1" frameWidth="635" frameHeight="174"/>
<SubTexture name="freeplay white0002" x="632" y="481" width="629" height="173" frameX="-4" frameY="-1" frameWidth="635" frameHeight="174"/>
<SubTexture name="login basic0000" x="1261" y="481" width="359" height="109"/>
<SubTexture name="login basic0001" x="1261" y="481" width="359" height="109"/>
<SubTexture name="login basic0002" x="1261" y="481" width="359" height="109"/>
<SubTexture name="login basic0003" x="1620" y="481" width="359" height="109"/>
<SubTexture name="login basic0004" x="1620" y="481" width="359" height="109"/>
<SubTexture name="login basic0005" x="1620" y="481" width="359" height="109"/>
<SubTexture name="login basic0006" x="0" y="654" width="358" height="109" frameX="0" frameY="0" frameWidth="359" frameHeight="109"/>
<SubTexture name="login basic0007" x="0" y="654" width="358" height="109" frameX="0" frameY="0" frameWidth="359" frameHeight="109"/>
<SubTexture name="login basic0008" x="0" y="654" width="358" height="109" frameX="0" frameY="0" frameWidth="359" frameHeight="109"/>
<SubTexture name="login white0000" x="358" y="654" width="449" height="137"/>
<SubTexture name="login white0001" x="807" y="654" width="449" height="137"/>
<SubTexture name="login white0002" x="1256" y="654" width="448" height="137" frameX="0" frameY="0" frameWidth="449" frameHeight="137"/>
<SubTexture name="logout basic0000" x="0" y="791" width="428" height="110"/>
<SubTexture name="logout basic0001" x="0" y="791" width="428" height="110"/>
<SubTexture name="logout basic0002" x="0" y="791" width="428" height="110"/>
<SubTexture name="logout basic0003" x="428" y="791" width="428" height="110"/>
<SubTexture name="logout basic0004" x="428" y="791" width="428" height="110"/>
<SubTexture name="logout basic0005" x="428" y="791" width="428" height="110"/>
<SubTexture name="logout basic0006" x="856" y="791" width="428" height="110"/>
<SubTexture name="logout basic0007" x="856" y="791" width="428" height="110"/>
<SubTexture name="logout basic0008" x="856" y="791" width="428" height="110"/>
<SubTexture name="logout white0000" x="1284" y="791" width="537" height="138" frameX="0" frameY="0" frameWidth="538" frameHeight="138"/>
<SubTexture name="logout white0001" x="0" y="929" width="538" height="138"/>
<SubTexture name="logout white0002" x="538" y="929" width="536" height="138" frameX="-1" frameY="0" frameWidth="538" frameHeight="138"/>
<SubTexture name="options basic0000" x="1074" y="929" width="487" height="112"/>
<SubTexture name="options basic0001" x="1074" y="929" width="487" height="112"/>
<SubTexture name="options basic0002" x="1074" y="929" width="487" height="112"/>
<SubTexture name="options basic0003" x="1561" y="929" width="487" height="112"/>
<SubTexture name="options basic0004" x="1561" y="929" width="487" height="112"/>
<SubTexture name="options basic0005" x="1561" y="929" width="487" height="112"/>
<SubTexture name="options basic0006" x="0" y="1067" width="487" height="112"/>
<SubTexture name="options basic0007" x="0" y="1067" width="487" height="112"/>
<SubTexture name="options basic0008" x="0" y="1067" width="487" height="112"/>
<SubTexture name="options white0000" x="487" y="1067" width="607" height="155" frameX="-1" frameY="-1" frameWidth="609" frameHeight="163"/>
<SubTexture name="options white0001" x="1094" y="1067" width="606" height="158" frameX="-3" frameY="-1" frameWidth="609" frameHeight="163"/>
<SubTexture name="options white0002" x="0" y="1225" width="609" height="163"/>
<SubTexture name="story mode basic0000" x="609" y="1225" width="615" height="122"/>
<SubTexture name="story mode basic0001" x="609" y="1225" width="615" height="122"/>
<SubTexture name="story mode basic0002" x="609" y="1225" width="615" height="122"/>
<SubTexture name="story mode basic0003" x="1224" y="1225" width="615" height="122"/>
<SubTexture name="story mode basic0004" x="1224" y="1225" width="615" height="122"/>
<SubTexture name="story mode basic0005" x="1224" y="1225" width="615" height="122"/>
<SubTexture name="story mode basic0006" x="0" y="1388" width="615" height="122"/>
<SubTexture name="story mode basic0007" x="0" y="1388" width="615" height="122"/>
<SubTexture name="story mode basic0008" x="0" y="1388" width="615" height="122"/>
<SubTexture name="story mode white0000" x="615" y="1388" width="796" height="173" frameX="0" frameY="-3" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0001" x="0" y="1561" width="794" height="174" frameX="-2" frameY="-2" frameWidth="796" frameHeight="181"/>
<SubTexture name="story mode white0002" x="794" y="1561" width="794" height="181" frameX="0" frameY="0" frameWidth="796" frameHeight="181"/>
</TextureAtlas>

View File

@ -1,5 +1,8 @@
package;
import flixel.util.FlxTimer;
import flixel.FlxState;
import cpp.abi.Abi;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.FlxSprite;
@ -14,19 +17,13 @@ import flixel.util.FlxColor;
import io.newgrounds.NG;
import lime.app.Application;
import ui.MenuItemList;
using StringTools;
class MainMenuState extends MusicBeatState
{
var curSelected:Int = 0;
var menuItems:FlxTypedGroup<FlxSprite>;
#if !switch
var optionShit:Array<String> = ['story mode', 'freeplay', 'donate'];
#else
var optionShit:Array<String> = ['story mode', 'freeplay'];
#end
var menuItems:MenuItemList;
var magenta:FlxSprite;
var camFollow:FlxObject;
@ -67,23 +64,38 @@ class MainMenuState extends MusicBeatState
add(magenta);
// magenta.scrollFactor.set();
menuItems = new FlxTypedGroup<FlxSprite>();
menuItems = new MenuItemList('FNF_main_menu_assets');
add(menuItems);
var tex = Paths.getSparrowAtlas('FNF_main_menu_assets');
for (i in 0...optionShit.length)
menuItems.onChange.add(onMenuItemChange);
menuItems.onAcceptPress.add(function(_)
{
var menuItem:FlxSprite = new FlxSprite(0, 60 + (i * 160));
menuItem.frames = tex;
menuItem.animation.addByPrefix('idle', optionShit[i] + " basic", 24);
menuItem.animation.addByPrefix('selected', optionShit[i] + " white", 24);
menuItem.animation.play('idle');
menuItem.ID = i;
menuItem.screenCenter(X);
menuItems.add(menuItem);
menuItem.scrollFactor.set();
menuItem.antialiasing = true;
FlxFlicker.flicker(magenta, 1.1, 0.15, false, true);
});
var hasPopupBlocker = #if web true #else false #end;
menuItems.addItem('story mode', function () startExitState(new StoryMenuState()));
menuItems.addItem('freeplay', function () startExitState(new FreeplayState()));
// addMenuItem('options', function () startExitState(new OptionMenu()));
#if (!switch)
menuItems.addItem('donate', selectDonate, hasPopupBlocker);
#end
#if newgrounds
if (NG.core.loggedIn)
menuItems.addItem("logout", selectLogout);
else
menuItems.addItem("login", selectLogin, hasPopupBlocker);
#end
// center vertically
var spacing = 160;
var top = (FlxG.height - (spacing * (menuItems.length - 1))) / 2;
for (i in 0...menuItems.length)
{
var menuItem = menuItems.members[i];
menuItem.x = FlxG.width / 2;
menuItem.y = top + spacing * i;
}
FlxG.camera.follow(camFollow, null, 0.06);
@ -95,12 +107,48 @@ class MainMenuState extends MusicBeatState
// NG.core.calls.event.logEvent('swag').send();
changeItem();
super.create();
}
var selectedSomethin:Bool = false;
function onMenuItemChange(selected:MenuItem)
{
camFollow.setPosition(selected.getGraphicMidpoint().x, selected.getGraphicMidpoint().y);
}
function selectDonate()
{
#if linux
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
#else
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
#end
}
function selectLogin()
{
}
function selectLogout()
{
}
function startExitState(state:FlxState)
{
var duration = 0.4;
menuItems.forEach(function(item)
{
if (menuItems.selectedIndex != item.ID)
{
FlxTween.tween(item, {alpha: 0}, duration, { ease: FlxEase.quadOut });
}
else
{
item.visible = false;
}
});
new FlxTimer().start(duration, function(_) FlxG.switchState(state));
}
override function update(elapsed:Float)
{
@ -109,108 +157,9 @@ class MainMenuState extends MusicBeatState
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
}
if (!selectedSomethin)
{
if (controls.UP_P)
{
FlxG.sound.play(Paths.sound('scrollMenu'));
changeItem(-1);
}
if (controls.DOWN_P)
{
FlxG.sound.play(Paths.sound('scrollMenu'));
changeItem(1);
}
if (controls.BACK)
{
FlxG.switchState(new TitleState());
}
if (controls.ACCEPT)
{
if (optionShit[curSelected] == 'donate')
{
#if linux
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
#else
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
#end
}
else
{
selectedSomethin = true;
FlxG.sound.play(Paths.sound('confirmMenu'));
FlxFlicker.flicker(magenta, 1.1, 0.15, false);
menuItems.forEach(function(spr:FlxSprite)
{
if (curSelected != spr.ID)
{
FlxTween.tween(spr, {alpha: 0}, 0.4, {
ease: FlxEase.quadOut,
onComplete: function(twn:FlxTween)
{
spr.kill();
}
});
}
else
{
FlxFlicker.flicker(spr, 1, 0.06, false, false, function(flick:FlxFlicker)
{
var daChoice:String = optionShit[curSelected];
switch (daChoice)
{
case 'story mode':
FlxG.switchState(new StoryMenuState());
trace("Story Menu Selected");
case 'freeplay':
FlxG.switchState(new FreeplayState());
trace("Freeplay Menu Selected");
case 'options':
FlxG.switchState(new OptionsMenu());
}
});
}
});
}
}
}
if (menuItems.active && controls.BACK)
FlxG.switchState(new TitleState());
super.update(elapsed);
menuItems.forEach(function(spr:FlxSprite)
{
spr.screenCenter(X);
});
}
function changeItem(huh:Int = 0)
{
curSelected += huh;
if (curSelected >= menuItems.length)
curSelected = 0;
if (curSelected < 0)
curSelected = menuItems.length - 1;
menuItems.forEach(function(spr:FlxSprite)
{
spr.animation.play('idle');
if (spr.ID == curSelected)
{
spr.animation.play('selected');
camFollow.setPosition(spr.getGraphicMidpoint().x, spr.getGraphicMidpoint().y);
}
spr.updateHitbox();
});
}
}

View File

@ -4,6 +4,7 @@ import flixel.FlxG;
import flixel.util.FlxSignal;
import flixel.util.FlxTimer;
import io.newgrounds.NG;
import io.newgrounds.NGLite;
import io.newgrounds.components.ScoreBoardComponent.Period;
import io.newgrounds.objects.Medal;
import io.newgrounds.objects.Score;
@ -43,7 +44,7 @@ class NGio
{
var call = NG.core.calls.app.getCurrentVersion(GAME_VER).addDataHandler(function(response:Response<GetCurrentVersionResult>)
{
GAME_VER = response.result.data.current_version;
GAME_VER = response.result.data.currentVersion;
trace('CURRENT NG VERSION: ' + GAME_VER);
gotOnlineVer = true;
});
@ -53,18 +54,28 @@ class NGio
}
}
public function new(api:String, encKey:String, ?sessionId:String)
public function new(api:String, encKey:String)
{
trace("connecting to newgrounds");
NG.createAndCheckSession(api, sessionId);
var sessionId:String = NGLite.getSessionId();
if (sessionId != null)
trace("found web session id");
#if (debug)
if (sessionId == null && APIStuff.SESSION != null)
{
sessionId = APIStuff.SESSION;
trace("using debug session id");
}
#end
NG.create(api, sessionId);
NG.core.verbose = true;
// Set the encryption cipher/format to RC4/Base64. AES128 and Hex are not implemented yet
NG.core.initEncryption(encKey); // Found in you NG project view
trace(NG.core.attemptingLogin);
if (NG.core.attemptingLogin)
{
/* a session_id was found in the loadervars, this means the user is playing on newgrounds.com
@ -73,6 +84,7 @@ class NGio
trace("attempting login");
NG.core.onLogin.add(onNGLogin);
}
//GK: taking out auto login, adding a login button to the main menu
else
{
/* They are NOT playing on newgrounds.com, no session id was found. We must start one manually, if we want to.

154
source/ui/MenuItemList.hx Normal file
View File

@ -0,0 +1,154 @@
package ui;
import flixel.util.typeLimit.OneOfTwo;
import flixel.math.FlxPoint;
import flixel.FlxG;
import flixel.effects.FlxFlicker;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.group.FlxGroup;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.util.FlxSignal;
typedef ItemAsset = OneOfTwo<String, FlxAtlasFrames>
class MenuItemList extends MenuTypedItemList<MenuItem>
{
public function addItem(x = 0.0, y = 0.0, name, callback, fireInstantly = false)
{
var i = length;
var menuItem = new MenuItem(name, tex, callback, x, y);
menuItem.fireInstantly = fireInstantly;
menuItem.ID = i;
add(menuItem);
if (i == selectedIndex)
menuItem.select();
return menuItem;
}
}
class MenuTypedItemList<T:MenuItem> extends FlxTypedGroup<T>
{
public var tex:FlxAtlasFrames;
public var selectedIndex = 0;
public var onChange(default, null) = new FlxTypedSignal<T->Void>();
public var onAcceptPress(default, null) = new FlxTypedSignal<T->Void>();
public function new (asset:ItemAsset)
{
super();
if (Std.is(asset, String))
tex = Paths.getSparrowAtlas(cast asset);
else
tex = cast asset;
}
override function update(elapsed:Float)
{
super.update(elapsed);
var controls = PlayerSettings.player1.controls;
if (controls.UP_P)
prev();
if (controls.DOWN_P)
next();
if (controls.ACCEPT)
accept();
}
public function accept()
{
var selected = members[selectedIndex];
if (selected.fireInstantly)
selected.callback();
else
{
active = false;
FlxG.sound.play(Paths.sound('confirmMenu'));
FlxFlicker.flicker(selected, 1, 0.06, true, false, function(_)
{
selected.callback();
active = true;
});
}
}
inline function prev() changeItem(-1);
inline function next() changeItem(1);
function changeItem(amount:Int)
{
FlxG.sound.play(Paths.sound('scrollMenu'));
members[selectedIndex].idle();
selectedIndex += amount;
if (selectedIndex >= length)
selectedIndex = 0;
else if (selectedIndex < 0)
selectedIndex = length - 1;
var selected = members[selectedIndex];
selected.select();
onChange.dispatch(selected);
}
override function destroy()
{
super.destroy();
tex = null;
}
}
class MenuItem extends flixel.FlxSprite
{
public var callback:Void->Void;
/**
* Set to true for things like opening URLs otherwise, it may it get blocked.
*/
public var fireInstantly = false;
public function new (name, tex, callback, x = 0.0, y = 0.0)
{
super(x, y);
frames = tex;
setItem(name, callback);
}
public function setItem(name:String, callback:Void->Void)
{
this.callback = callback;
animation.addByPrefix('idle', '$name basic', 24);
animation.addByPrefix('selected', '$name white', 24);
idle();
scrollFactor.set();
antialiasing = true;
}
function updateSize()
{
updateHitbox();
centerOrigin();
offset.copyFrom(origin);
}
public function idle()
{
animation.play('idle');
updateSize();
}
public function select()
{
animation.play('selected');
updateSize();
}
}