funny 2.0 release

24rhfkiqekjgetbwgfbdrsfdv
This commit is contained in:
CyndaquilDAC 2021-05-04 17:55:25 -05:00 committed by GitHub
commit a85c3a792b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 289 additions and 82 deletions

View File

@ -4,7 +4,7 @@
**Also note**: you should be familiar with the commandline. If not, read this [quick guide by ninjamuffin](https://ninjamuffin99.newgrounds.com/news/post/1090480).
**Also also note**: To build for *Windows*, you need to be on *Windows*. To build for *Linux*, you need to be on *Linux*. You can build for html5/browsers on any platform.
**Also also note**: To build for *Windows*, you need to be on *Windows*. To build for *Linux*, you need to be on *Linux*. Same goes for macOS. You can build for html5/browsers on any platform.
## Dependencies
1. [Install Haxe 4.1.5](https://haxe.org/download/version/4.1.5/). You should use 4.1.5 instead of the latest version because the latest version has some problems with Friday Night Funkin': Kade Engine.
@ -46,6 +46,11 @@ If you are planning to build for Windows, you also need to install **Visual Stud
This will install about 22 GB of crap, but is necessary to build for Windows.
### macOS-only dependencies (these are required for building on macOS at all, including html5.)
If you are running macOS, you'll need to install Xcode. You can download it from the macOS App Store or from the [Xcode website](https://developer.apple.com/xcode/).
If you get an error telling you that you need a newer macOS version, you need to download an older version of Xcode from the [More Software Downloads](https://developer.apple.com/download/more/) section of the Apple Developer website. (You can check which version of Xcode you need for your macOS version on [Wikipedia's comparison table (in the `min macOS to run` column)](https://en.wikipedia.org/wiki/Xcode#Version_comparison_table).)
## Cloning the repository
Since you already installed `git` in a previous step, we'll use it to clone the repository.
1. `cd` to where you want to store the source code (i.e. `C:\Users\username\Desktop` or `~/Desktop`)

View File

@ -1,8 +1,8 @@
![Kade Engine logo](https://user-images.githubusercontent.com/26305836/110529589-4b4eb600-80ce-11eb-9c44-e899118b0bf0.png)
[![AppVeyor](https://img.shields.io/appveyor/build/KadeDev/Kade-Engine-Windows?label=windows%20build)](https://ci.appveyor.com/project/KadeDev/kade-engine-windows/build/artifacts) [![AppVeyor](https://img.shields.io/appveyor/build/KadeDev/Kade-Engine-Linux?label=linux%20build)](https://ci.appveyor.com/project/KadeDev/kade-engine-linux/build/artifacts) [![Discord](https://img.shields.io/discord/808039740464300104?label=discord)](https://discord.gg/MG6GQFh52U) [![GitHub issues](https://img.shields.io/github/issues/KadeDev/Kade-Engine)](https://github.com/KadeDev/Kade-Engine/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/KadeDev/Kade-Engine)](https://github.com/KadeDev/Kade-Engine/pulls) []() []()
[![AppVeyor](https://img.shields.io/appveyor/build/KadeDev/Kade-Engine-Windows?label=windows%20build)](https://ci.appveyor.com/project/KadeDev/kade-engine-windows/build/artifacts) [![AppVeyor](https://img.shields.io/appveyor/build/KadeDev/Kade-Engine-Macos?label=macOS%20build)](https://ci.appveyor.com/project/KadeDev/kade-engine-macos/build/artifacts) [![AppVeyor](https://img.shields.io/appveyor/build/KadeDev/Kade-Engine-Linux?label=linux%20build)](https://ci.appveyor.com/project/KadeDev/kade-engine-linux/build/artifacts) [![AppVeyor](https://img.shields.io/appveyor/build/daniel11420/KadeEngineWeb?label=html5&20build)](https://ci.appveyor.com/project/daniel11420/KadeEngineWeb) [![Discord](https://img.shields.io/discord/808039740464300104?label=discord)](https://discord.gg/MG6GQFh52U) [![GitHub issues](https://img.shields.io/github/issues/KadeDev/Kade-Engine)](https://github.com/KadeDev/Kade-Engine/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/KadeDev/Kade-Engine)](https://github.com/KadeDev/Kade-Engine/pulls) []() []()
![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/KadeDev/Kade-Engine/latest) ![GitHub repo size](https://img.shields.io/github/repo-size/KadeDev/Kade-Engine) ![Lines of code](https://img.shields.io/tokei/lines/github/KadeDev/Kade-Engine) ![Supported platforms](https://img.shields.io/badge/supported%20platforms-windows%2C%20linux%2C%20html5-blue) ![GitHub all releases](https://img.shields.io/github/downloads/KadeDev/Kade-Engine/total) ![GitHub](https://img.shields.io/github/license/KadeDev/Kade-Engine) ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/KadeDev/Kade-Engine?include_prereleases&label=latest%20version)
![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/KadeDev/Kade-Engine/latest) ![GitHub repo size](https://img.shields.io/github/repo-size/KadeDev/Kade-Engine) ![Lines of code](https://img.shields.io/tokei/lines/github/KadeDev/Kade-Engine) ![Supported platforms](https://img.shields.io/badge/supported%20platforms-windows%2C%20macOS%2C%20linux%2C%20html5-blue) ![GitHub all releases](https://img.shields.io/github/downloads/KadeDev/Kade-Engine/total) ![GitHub](https://img.shields.io/github/license/KadeDev/Kade-Engine) ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/KadeDev/Kade-Engine?include_prereleases&label=latest%20version)
# Friday Night Funkin': Kade Engine
## Friday Night Funkin'
@ -14,11 +14,11 @@ Links: **[itch.io page](https://ninja-muffin24.itch.io/funkin) ⋅ [Newgrounds](
## Kade Engine
**Kade Engine** is a mod for Friday Night Funkin', including a full engine rework, replays, and more.
Links: **[GameBanana mod page](https://gamebanana.com/gamefiles/16761) ⋅ [play in browser](https://funkin.puyo.xyz) ⋅ [latest stable release](https://github.com/KadeDev/Kade-Engine/releases/latest) ⋅ [latest development build (windows)](https://ci.appveyor.com/project/KadeDev/kade-engine-windows/build/artifacts) ⋅ [latest development build (linux)](https://ci.appveyor.com/project/KadeDev/kade-engine-linux/build/artifacts)**
Links: **[GameBanana mod page](https://gamebanana.com/gamefiles/16761) ⋅ [play in browser](https://funkin.puyo.xyz) ⋅ [latest stable release](https://github.com/KadeDev/Kade-Engine/releases/latest) ⋅ [latest development build (windows)](https://ci.appveyor.com/project/KadeDev/kade-engine-windows/build/artifacts) ⋅ [latest development build (macOS)](https://ci.appveyor.com/project/KadeDev/kade-engine-macos/build/artifacts)** ⋅ **[latest development build (linux)](https://ci.appveyor.com/project/KadeDev/kade-engine-linux/build/artifacts)**
**REMEMBER**: This is a **mod**. This is not the vanilla game and should be treated as a **modification**. This is not and probably will never be official, so don't get confused.
# Screenshots ([skip](#Features))
# Screenshots ([skip](#features))
![Tutorial (Hard) on Downscroll](https://user-images.githubusercontent.com/15311104/113989685-fa5aea80-9850-11eb-9180-f5819a774c79.gif) ![Milf (Hard) on Downscroll](https://user-images.githubusercontent.com/15311104/113990845-2c208100-9852-11eb-8e6d-f1c9e8439871.gif)

43
appveyor-macos.yml Normal file
View File

@ -0,0 +1,43 @@
version: '{build}'
image: macos
environment:
global:
HAXELIB_ROOT: /Users/appveyor/haxelib
HAXE_INSTALLDIR: /Users/appveyor/haxe_bin
install:
- cd /Users/appveyor
- brew install neko
- brew install gnu-tar
- brew install wget
- wget "https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-osx.tar.gz"
- mkdir $HAXE_INSTALLDIR
- tar -xf haxe-4.1.5-osx.tar.gz -C $HAXE_INSTALLDIR
- export PATH=$PATH:$HAXE_INSTALLDIR/haxe_20201231082044_5e33a78aa
- mkdir $HAXELIB_ROOT && haxelib setup $HAXELIB_ROOT
- haxelib install lime 7.9.0
- haxelib install openfl
- haxelib install flixel
- haxelib run lime setup flixel
- haxelib run lime setup
- haxelib install flixel-tools
- haxelib install flixel-addons
- haxelib install flixel-ui
- haxelib install hscript
- haxelib install newgrounds
- haxelib git faxe https://github.com/uhrobots/faxe
- haxelib git polymod https://github.com/larsiusprime/polymod.git
- haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
- haxelib install linc_luajit
- haxelib list
- cd /Users/appveyor/projects/kade-engine-macos
build_script:
- haxelib run lime build mac
after_build:
- gtar -cvf funkin-ke.tar -C /Users/appveyor/projects/kade-engine-macos/export/release/macos/bin .
artifacts:
- path: funkin-ke.tar
name: macOS build idk

View File

@ -162,9 +162,9 @@ class ChartingState extends MusicBeatState
add(dummyArrow);
var tabs = [
{name: "Song", label: 'Song'},
{name: "Section", label: 'Section'},
{name: "Note", label: 'Note'},
{name: "Song", label: 'Song Data'},
{name: "Section", label: 'Section Data'},
{name: "Note", label: 'Note Data'},
{name: "Assets", label: 'Assets'}
];
@ -227,7 +227,7 @@ class ChartingState extends MusicBeatState
});
var restart = new FlxButton(10,140,"Reset", function()
var restart = new FlxButton(10,140,"Reset Chart", function()
{
for (ii in 0..._song.notes.length)
{
@ -245,10 +245,14 @@ class ChartingState extends MusicBeatState
stepperSpeed.value = _song.speed;
stepperSpeed.name = 'song_speed';
var stepperSpeedLabel = new FlxText(74,80,'Scroll Speed');
var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 0.1, 1, 1.0, 5000.0, 1);
stepperBPM.value = Conductor.bpm;
stepperBPM.name = 'song_bpm';
var stepperBPMLabel = new FlxText(74,65,'BPM');
var characters:Array<String> = CoolUtil.coolTextFile(Paths.txt('characterList'));
var gfVersions:Array<String> = CoolUtil.coolTextFile(Paths.txt('gfVersionList'));
var stages:Array<String> = CoolUtil.coolTextFile(Paths.txt('stageList'));
@ -260,30 +264,39 @@ class ChartingState extends MusicBeatState
});
player1DropDown.selectedLabel = _song.player1;
var player1Label = new FlxText(10,80,64,'Player 1');
var player2DropDown = new FlxUIDropDownMenu(140, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String)
{
_song.player2 = characters[Std.parseInt(character)];
});
player2DropDown.selectedLabel = _song.player2;
var player2Label = new FlxText(140,80,64,'Player 2');
var gfVersionDropDown = new FlxUIDropDownMenu(10, 200, FlxUIDropDownMenu.makeStrIdLabelArray(gfVersions, true), function(gfVersion:String)
{
_song.gfVersion = gfVersions[Std.parseInt(gfVersion)];
});
gfVersionDropDown.selectedLabel = _song.gfVersion;
gfVersionDropDown.selectedLabel = _song.gfVersion;
var gfVersionLabel = new FlxText(10,180,64,'Girlfriend');
var stageDropDown = new FlxUIDropDownMenu(140, 200, FlxUIDropDownMenu.makeStrIdLabelArray(stages, true), function(stage:String)
{
_song.stage = stages[Std.parseInt(stage)];
});
stageDropDown.selectedLabel = _song.stage;
stageDropDown.selectedLabel = _song.stage;
var stageLabel = new FlxText(140,180,64,'Stage');
var noteStyleDropDown = new FlxUIDropDownMenu(10, 300, FlxUIDropDownMenu.makeStrIdLabelArray(noteStyles, true), function(noteStyle:String)
{
_song.noteStyle = noteStyles[Std.parseInt(noteStyle)];
});
noteStyleDropDown.selectedLabel = _song.noteStyle;
noteStyleDropDown.selectedLabel = _song.noteStyle;
var noteStyleLabel = new FlxText(10,280,64,'Note Skin');
var tab_group_song = new FlxUI(null, UI_box);
tab_group_song.name = "Song";
@ -296,15 +309,22 @@ class ChartingState extends MusicBeatState
tab_group_song.add(reloadSongJson);
tab_group_song.add(loadAutosaveBtn);
tab_group_song.add(stepperBPM);
tab_group_song.add(stepperBPMLabel);
tab_group_song.add(stepperSpeed);
tab_group_song.add(stepperSpeedLabel);
var tab_group_assets = new FlxUI(null, UI_box);
tab_group_assets.name = "Assets";
tab_group_assets.add(noteStyleDropDown);
tab_group_assets.add(noteStyleLabel);
tab_group_assets.add(gfVersionDropDown);
tab_group_assets.add(gfVersionLabel);
tab_group_assets.add(stageDropDown);
tab_group_assets.add(stageLabel);
tab_group_assets.add(player1DropDown);
tab_group_assets.add(player2DropDown);
tab_group_assets.add(player1Label);
tab_group_assets.add(player2Label);
UI_box.addGroup(tab_group_song);
UI_box.addGroup(tab_group_assets);
@ -328,20 +348,23 @@ class ChartingState extends MusicBeatState
stepperLength.value = _song.notes[curSection].lengthInSteps;
stepperLength.name = "section_length";
var stepperLengthLabel = new FlxText(74,10,'Section Length (in steps)');
stepperSectionBPM = new FlxUINumericStepper(10, 80, 1, Conductor.bpm, 0, 999, 0);
stepperSectionBPM.value = Conductor.bpm;
stepperSectionBPM.name = 'section_bpm';
var stepperCopy:FlxUINumericStepper = new FlxUINumericStepper(110, 130, 1, 1, -999, 999, 0);
var stepperCopy:FlxUINumericStepper = new FlxUINumericStepper(110, 132, 1, 1, -999, 999, 0);
var stepperCopyLabel = new FlxText(174,132,'sections back');
var copyButton:FlxButton = new FlxButton(10, 130, "Copy last section", function()
{
copySection(Std.int(stepperCopy.value));
});
var clearSectionButton:FlxButton = new FlxButton(10, 150, "Clear", clearSection);
var clearSectionButton:FlxButton = new FlxButton(10, 150, "Clear Section", clearSection);
var swapSection:FlxButton = new FlxButton(10, 170, "Swap section", function()
var swapSection:FlxButton = new FlxButton(10, 170, "Swap Section", function()
{
for (i in 0..._song.notes[curSection].sectionNotes.length)
{
@ -351,21 +374,22 @@ class ChartingState extends MusicBeatState
updateGrid();
}
});
check_mustHitSection = new FlxUICheckBox(10, 30, null, null, "Must hit section", 100);
check_mustHitSection = new FlxUICheckBox(10, 30, null, null, "Camera Points to P1?", 100);
check_mustHitSection.name = 'check_mustHit';
check_mustHitSection.checked = true;
// _song.needsVoices = check_mustHit.checked;
check_altAnim = new FlxUICheckBox(10, 400, null, null, "Alt Animation", 100);
check_altAnim = new FlxUICheckBox(10, 400, null, null, "Alternate Animation", 100);
check_altAnim.name = 'check_altAnim';
check_changeBPM = new FlxUICheckBox(10, 60, null, null, 'Change BPM', 100);
check_changeBPM.name = 'check_changeBPM';
tab_group_section.add(stepperLength);
tab_group_section.add(stepperLengthLabel);
tab_group_section.add(stepperSectionBPM);
tab_group_section.add(stepperCopy);
tab_group_section.add(stepperCopyLabel);
tab_group_section.add(check_mustHitSection);
tab_group_section.add(check_altAnim);
tab_group_section.add(check_changeBPM);
@ -392,10 +416,13 @@ class ChartingState extends MusicBeatState
stepperSusLength.value = 0;
stepperSusLength.name = 'note_susLength';
var applyLength:FlxButton = new FlxButton(100, 10, 'Apply');
var stepperSusLengthLabel = new FlxText(74,10,'Note Sustain Length');
var applyLength:FlxButton = new FlxButton(10, 100, 'Apply Data');
tab_group_note.add(writingNotesText);
tab_group_note.add(stepperSusLength);
tab_group_note.add(stepperSusLengthLabel);
tab_group_note.add(applyLength);
UI_box.addGroup(tab_group_note);

View File

@ -20,9 +20,6 @@ class KadeEngineData
if (FlxG.save.data.offset == null)
FlxG.save.data.offset = 0;
if (FlxG.save.data.offset == null)
FlxG.save.data.offset = 0;
if (FlxG.save.data.songPosition == null)
FlxG.save.data.songPosition = false;

72
source/LuaShader.hx Normal file
View File

@ -0,0 +1,72 @@
/*import flixel.system.FlxAssets.FlxShader;
class LuaShader extends FlxShader
{
// SHADER SHIT FOR LUA CODE
public function new(frag,vert)
{
glFragmentSource = '
#pragma header
varying float openfl_Alphav;
varying vec4 openfl_ColorMultiplierv;
varying vec4 openfl_ColorOffsetv;
varying vec2 openfl_TextureCoordv;
uniform bool openfl_HasColorTransform;
uniform vec2 openfl_TextureSize;
uniform sampler2D bitmap;
uniform bool hasTransform;
uniform bool hasColorTransform;
uniform vec3 iResolution; // viewport resolution (in pixels)
uniform float iTime; // shader playback time (in seconds)
uniform float iTimeDelta; // render time (in seconds)
uniform int iFrame; // shader playback frame
uniform float iChannelTime[4]; // channel playback time (in seconds)
uniform vec3 iChannelResolution[4]; // channel resolution (in pixels)
uniform vec4 iMouse; // mouse pixel coords. xy: current, zw: click
uniform samplerXX iChannel0..3; // input channel. XX = 2D/Cube
uniform vec4 iDate; // (year, month, day, time in seconds)
uniform float iSampleRate; // sound sample rate (i.e., 44100)
vec4 flixel_texture2D(sampler2D bitmap, vec2 coord)
{
vec4 color = texture2D(bitmap, coord);
if (!hasTransform)
{
return color;
}
if (color.a == 0.0)
{
return vec4(0.0, 0.0, 0.0, 0.0);
}
if (!hasColorTransform)
{
return color * openfl_Alphav;
}
color = vec4(color.rgb / color.a, color.a);
mat4 colorMultiplier = mat4(0);
colorMultiplier[0][0] = openfl_ColorMultiplierv.x;
colorMultiplier[1][1] = openfl_ColorMultiplierv.y;
colorMultiplier[2][2] = openfl_ColorMultiplierv.z;
colorMultiplier[3][3] = openfl_ColorMultiplierv.w;
color = clamp(openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);
if (color.a > 0.0)
{
return vec4(0.0, 0.0, 0.0, 0.0);
}
' + frag;
iResolution
super();
}
}*/

View File

@ -3,6 +3,7 @@
// Lua
#if windows
import flixel.tweens.FlxEase;
import openfl.filters.ShaderFilter;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import openfl.geom.Matrix;
@ -19,7 +20,7 @@ import flixel.FlxG;
class ModchartState
{
//public static var shaders:Array<LuaShader> = null;
public static var lua:State = null;
@ -170,7 +171,11 @@ class ModchartState
}
// lua objects or what ever
if (luaSprites.get(id) == null)
{
if (Std.parseInt(id) == null)
return Reflect.getProperty(PlayState.instance,id);
return PlayState.PlayState.strumLineNotes.members[Std.parseInt(id)];
}
return luaSprites.get(id);
}
@ -237,13 +242,15 @@ class ModchartState
function new()
{
trace('opening a lua state (because we are cool :))');
trace('opening a lua state (because we are cool :))');
lua = LuaL.newstate();
LuaL.openlibs(lua);
trace("Lua version: " + Lua.version());
trace("LuaJIT version: " + Lua.versionJIT());
Lua.init_callbacks(lua);
//shaders = new Array<LuaShader>();
var result = LuaL.dofile(lua, Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart")); // execute le file
if (result != 0)
@ -484,100 +491,156 @@ class ModchartState
// tweens
Lua_helper.add_callback(lua,"tweenCameraPos", function(toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {x: toX, y: toY}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
FlxTween.tween(FlxG.camera, {x: toX, y: toY}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraAngle", function(toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {angle:toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
FlxTween.tween(FlxG.camera, {angle:toAngle}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraZoom", function(toZoom:Float, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {zoom:toZoom}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
FlxTween.tween(FlxG.camera, {zoom:toZoom}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudPos", function(toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {x: toX, y: toY}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
FlxTween.tween(PlayState.instance.camHUD, {x: toX, y: toY}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudAngle", function(toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {angle:toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
FlxTween.tween(PlayState.instance.camHUD, {angle:toAngle}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudZoom", function(toZoom:Float, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {zoom:toZoom}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
FlxTween.tween(PlayState.instance.camHUD, {zoom:toZoom}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenPos", function(id:String, toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {x: toX, y: toY}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
FlxTween.tween(getActorByName(id), {x: toX, y: toY}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenPosXAngle", function(id:String, toX:Int, toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {x: toX, angle: toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
FlxTween.tween(getActorByName(id), {x: toX, angle: toAngle}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenPosYAngle", function(id:String, toY:Int, toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {y: toY, angle: toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
FlxTween.tween(getActorByName(id), {y: toY, angle: toAngle}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenAngle", function(id:String, toAngle:Int, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {angle: toAngle}, time, {ease: FlxEase.linear, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraPosOut", function(toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {x: toX, y: toY}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraAngleOut", function(toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {angle:toAngle}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraZoomOut", function(toZoom:Float, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {zoom:toZoom}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudPosOut", function(toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {x: toX, y: toY}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudAngleOut", function(toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {angle:toAngle}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudZoomOut", function(toZoom:Float, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {zoom:toZoom}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenPosOut", function(id:String, toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {x: toX, y: toY}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenPosXAngleOut", function(id:String, toX:Int, toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {x: toX, angle: toAngle}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenPosYAngleOut", function(id:String, toY:Int, toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {y: toY, angle: toAngle}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenAngleOut", function(id:String, toAngle:Int, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {angle: toAngle}, time, {ease: FlxEase.cubeOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraPosIn", function(toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {x: toX, y: toY}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraAngleIn", function(toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {angle:toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenCameraZoomIn", function(toZoom:Float, time:Float, onComplete:String) {
FlxTween.tween(FlxG.camera, {zoom:toZoom}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudPosIn", function(toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {x: toX, y: toY}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudAngleIn", function(toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {angle:toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenHudZoomIn", function(toZoom:Float, time:Float, onComplete:String) {
FlxTween.tween(PlayState.instance.camHUD, {zoom:toZoom}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,["camera"]);}}});
});
Lua_helper.add_callback(lua,"tweenPosIn", function(id:String, toX:Int, toY:Int, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {x: toX, y: toY}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenPosXAngleIn", function(id:String, toX:Int, toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {x: toX, angle: toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenPosYAngleIn", function(id:String, toY:Int, toAngle:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {y: toY, angle: toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenAngleIn", function(id:String, toAngle:Int, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {angle: toAngle}, time, {ease: FlxEase.cubeIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenFadeIn", function(id:String, toAlpha:Int, time:Float, onComplete:String) {
Lua_helper.add_callback(lua,"tweenFadeIn", function(id:String, toAlpha:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {alpha: toAlpha}, time, {ease: FlxEase.circIn, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
Lua_helper.add_callback(lua,"tweenFadeOut", function(id:String, toAlpha:Int, time:Float, onComplete:String) {
Lua_helper.add_callback(lua,"tweenFadeOut", function(id:String, toAlpha:Float, time:Float, onComplete:String) {
FlxTween.tween(getActorByName(id), {alpha: toAlpha}, time, {ease: FlxEase.circOut, onComplete: function(flxTween:FlxTween) { if (onComplete != '' && onComplete != null) {callLua(onComplete,[id]);}}});
});
//forgot and accidentally commit to master branch
// shader
/*Lua_helper.add_callback(lua,"createShader", function(frag:String,vert:String) {
var shader:LuaShader = new LuaShader(frag,vert);
/*Lua_helper.add_callback(lua,"setRenderedNoteWiggle", function(id:Int, effectType:String, waveSpeed:Int, waveFrequency:Int) {
trace('call');
var wiggleEffect = new WiggleEffect();
switch(effectType.toLowerCase())
{
case 'dreamy':
wiggleEffect.effectType = WiggleEffectType.DREAMY;
case 'wavy':
wiggleEffect.effectType = WiggleEffectType.WAVY;
case 'heat_wave_horizontal':
wiggleEffect.effectType = WiggleEffectType.HEAT_WAVE_HORIZONTAL;
case 'heat_wave_vertical':
wiggleEffect.effectType = WiggleEffectType.HEAT_WAVE_VERTICAL;
case 'flag':
wiggleEffect.effectType = WiggleEffectType.FLAG;
}
wiggleEffect.waveFrequency = waveFrequency;
wiggleEffect.waveSpeed = waveSpeed;
wiggleEffect.shader.uTime.value = [(strumLine.y - Note.swagWidth * 4) / FlxG.height]; // from 4mbr0s3 2
notes.members[id].shader = wiggleEffect.shader;
luaWiggles.push(wiggleEffect);
trace(shader.glFragmentSource);
shaders.push(shader);
// if theres 1 shader we want to say theres 0 since 0 index and length returns a 1 index.
return shaders.length == 1 ? 0 : shaders.length;
});
Lua_helper.add_callback(lua,"setActorWiggle", function(id:String, effectType:String, waveSpeed:Int, waveFrequency:Int) {
trace('call');
var wiggleEffect = new WiggleEffect();
switch(effectType.toLowerCase())
{
case 'dreamy':
wiggleEffect.effectType = WiggleEffectType.DREAMY;
case 'wavy':
wiggleEffect.effectType = WiggleEffectType.WAVY;
case 'heat_wave_horizontal':
wiggleEffect.effectType = WiggleEffectType.HEAT_WAVE_HORIZONTAL;
case 'heat_wave_vertical':
wiggleEffect.effectType = WiggleEffectType.HEAT_WAVE_VERTICAL;
case 'flag':
wiggleEffect.effectType = WiggleEffectType.FLAG;
}
wiggleEffect.waveFrequency = waveFrequency;
wiggleEffect.waveSpeed = waveSpeed;
wiggleEffect.shader.uTime.value = [(strumLine.y - Note.swagWidth * 4) / FlxG.height]; // from 4mbr0s3 2
getActorByName(id).shader = wiggleEffect.shader;
luaWiggles.push(wiggleEffect);
Lua_helper.add_callback(lua,"setFilterHud", function(shaderIndex:Int) {
PlayState.instance.camHUD.setFilters([new ShaderFilter(shaders[shaderIndex])]);
});
Lua_helper.add_callback(lua,"setFilterCam", function(shaderIndex:Int) {
FlxG.camera.setFilters([new ShaderFilter(shaders[shaderIndex])]);
});*/
// default strums
for (i in 0...PlayState.strumLineNotes.length) {
var member = PlayState.strumLineNotes.members[i];
trace(PlayState.strumLineNotes.members[i].x + " " + PlayState.strumLineNotes.members[i].y + " " + PlayState.strumLineNotes.members[i].angle + " | strum" + i);
@ -601,4 +664,4 @@ class ModchartState
return new ModchartState();
}
}
#end
#end

View File

@ -383,15 +383,15 @@ class StoryMenuState extends MusicBeatState
var stringThing:Array<String> = weekData[curWeek];
for (i in stringThing)
{
txtTracklist.text += "\n" + i;
}
txtTracklist.text = txtTracklist.text.toUpperCase();
txtTracklist.screenCenter(X);
txtTracklist.x -= FlxG.width * 0.35;
txtTracklist.text += "\n";
#if !switch
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
#end