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

Stable #1 (Modding API) #2

Draft
wants to merge 3 commits into
base: stable
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
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_STORE
RECOVER_*.fla

.haxelib/
.vs/
.vscode/

!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json

export/
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"openfl.lime-vscode-extension",
"redhat.vscode-xml"
]
}
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Build + Debug",
"type": "lime",
"request": "launch"
},
{
"name": "Debug",
"type": "lime",
"request": "launch",
"preLaunchTask": null
},
{
"name": "Macro",
"type": "haxe-eval",
"request": "launch"
}
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"search.exclude": {
"export/**/*.*": true
},
"[haxe]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.codeActionsOnSave": {
"source.sortImports": "explicit"
}
},
"haxe.enableExtendedIndentation": true
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "lime",
"command": "test",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
132 changes: 132 additions & 0 deletions Project.hxp
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
package;

import hxp.*;
import lime.tools.*;

using StringTools;

/**
* This is the main project file for TechNotDrip Engine.
*
* This works exactly like an Project.xml but in Haxe Syntax.
*/
class Project extends HXProject
{
public function new()
{
super();

setupApplicationSettings();
setupWindowSettings();
setupPathSettings();
setupHaxelibs();
setupHaxeDefines();
setupHaxeFlags();
}

public function setupApplicationSettings():Void
{
meta.title = 'Friday Night Funkin\': TechNotDrip Engine';
app.file = 'TechNotDrip';
app.main = 'Main';
meta.version = '0.1.0';
meta.company = 'TilNotDrip';
app.preloader = 'flixel.system.FlxPreloader';
app.swfVersion = 11.8;
}

public function setupWindowSettings():Void
{
window.width = 1280;
window.height = 720;
window.background = 0;
window.hardware = true;
window.vsync = false;

if (platformType == WEB)
{
window.resizable = true;
}

if (platformType == DESKTOP)
{
window.orientation = LANDSCAPE;
window.fullscreen = false;
window.resizable = true;
}

if (platformType == MOBILE)
{
window.orientation = LANDSCAPE;
window.fullscreen = false;
window.width = 0;
window.height = 0;
}
}

public function setupPathSettings():Void
{
app.path = getBuildDirectory();

var excludeList:Array<String> = [];
excludeList.push((platformType == WEB) ? 'ogg' : 'mp3');

// TODO: Maybe scan the entire assets folder instead like base fnf.
includeAssets("assets", "assets", ['*'], excludeList);

icons.push(new Icon('extras/appicons/icon16.png', 16));
icons.push(new Icon('extras/appicons/icon32.png', 32));
icons.push(new Icon('extras/appicons/icon64.png', 64));
icons.push(new Icon('extras/appicons/icon.png'));

sources.push('src');
}

public function setupHaxelibs():Void
{
haxelibs.push(new Haxelib('lime', '8.2.1'));
haxelibs.push(new Haxelib('openfl', '9.4.0'));
haxelibs.push(new Haxelib('flixel', '5.8.0'));
haxelibs.push(new Haxelib('flixel-addons', '3.2.3'));

if (debug)
haxelibs.push(new Haxelib('hxcpp-debug-server', '1.2.4'));
}

public function setupHaxeDefines():Void
{
if (!debug)
haxedefs.set('FLX_NO_DEBUG', '');

haxedefs.set('FLX_NO_HEALTH', '');

if (platformType == MOBILE)
{
haxedefs.set('FLX_NO_KEYBOARD', '');
haxedefs.set('FLX_NO_MOUSE', '');
}

if (platformType == DESKTOP)
{
haxedefs.set('FLX_NO_TOUCH', '');
}

haxedefs.set('message.reporting', 'pretty');

if (!debug)
haxedefs.set('NAPE_RELEASE_BUILD', '');
}

public function setupHaxeFlags():Void
{
haxeflags.push('-dce no');
haxeflags.push("--macro include('funkin')");
haxeflags.push("--macro addMetadata('@:build(funkin.macros.ZProperty.build())', 'flixel.FlxBasic')");
}

function getBuildDirectory():String
{
var buildDir:String = 'export/' + ((debug) ? 'debug' : 'release');
return buildDir;
}
}
139 changes: 139 additions & 0 deletions checkstyle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"defaultSeverity": "INFO",
"checks": [
{
"props": {},
"type": "AvoidStarImport"
},
{
"props": {
"thresholdSimilar": 100,
"thresholdIdentical": 60
},
"type": "CodeSimilarity"
},
{
"props": {},
"type": "CommentedOutCode"
},
{
"props": {
"allowSingleline": true,
"policy": "aligned"
},
"type": "ConditionalCompilation"
},
{
"props": {
"format": "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$",
"tokens": ["INLINE"]
},
"type": "ConstantName"
},
{
"props": {},
"type": "DefaultComesLast"
},
{
"props": {
"option": "empty",
"tokens": [
"ABSTRACT_DEF",
"CATCH",
"CLASS_DEF",
"ENUM_DEF",
"FOR",
"FUNCTION",
"IF",
"INTERFACE_DEF",
"OBJECT_DECL",
"SWITCH",
"TRY",
"TYPEDEF_DEF",
"WHILE"
]
},
"type": "EmptyBlock"
},
{
"props": {
"enforceEmptyPackage": true
},
"type": "EmptyPackage"
},
{
"props": {
"excludeNames": ["new", "toString"],
"fieldType": "BOTH",
"ignoreOverride": true,
"modifier": "PUBLIC",
"requireParams": true,
"requireReturn": true,
"tokens": [
"ABSTRACT_DEF",
"CLASS_DEF",
"ENUM_DEF",
"INTERFACE_DEF"
]
},
"type": "FieldDocComment"
},
{
"props": {
"modifiers": [
"OVERRIDE",
"PUBLIC_PRIVATE",
"STATIC",
"EXTERN",
"MACRO",
"INLINE",
"DYNAMIC",
"FINAL"
]
},
"type": "ModifierOrder"
},
{
"props": {},
"type": "SimplifyBooleanExpression"
},
{
"props": {},
"type": "SimplifyBooleanReturn"
},
{
"props": {
"spaceIfCondition": "should",
"spaceAroundBinop": true,
"spaceForLoop": "should",
"ignoreRangeOperator": true,
"spaceWhileLoop": "should",
"spaceCatch": "should",
"spaceSwitchCase": "should",
"noSpaceAroundUnop": true
},
"type": "Spacing"
},
{
"props": {},
"type": "TrailingWhitespace"
},
{
"props": {},
"type": "UnusedLocalVar"
},
{
"props": {
"typeHintPolicy": "enforce_all"
},
"type": "VarTypeHint"
},
{
"props": {
"allowTrailingComma": false,
"tokens": [",", ";"]
},
"type": "WhitespaceAfter"
}
]
}
File renamed without changes.
Binary file added extras/appicons/icon.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 extras/appicons/icon16.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 extras/appicons/icon32.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 extras/appicons/icon64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions 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"
}
}
Loading