Merge branch 'master' of github.com:ninjamuffin99/Funkin-secret into nitpix

This commit is contained in:
MtH 2021-05-15 23:28:17 +02:00
commit d49858217e
7 changed files with 165 additions and 54 deletions

View file

@ -98,8 +98,7 @@
<!-- <assets path='example_mods' rename='mods' embed='false'/> -->
<template path="example_mods" rename="mods" />
<assets path='example_mods' rename='mods' embed='false'/>
<assets path='art/readme.txt' rename='do NOT readme.txt' />
<!-- <template path='mods' /> -->
@ -128,6 +127,11 @@
<haxelib name="newgrounds"/>
<haxelib name="hxcpp-debug-server" if="desktop debug"/>
<!-- swf stufffff -->
<haxelib name="swf"/>
<library path="assets/tanky.swf" preload="true"/>
<library path="assets/tankBG.swf" preload="true"/>
<!-- <haxelib name="flixel-animate" /> -->
<!-- <haxelib name="spinehaxe" /> -->
<!-- https://github.com/ninjamuffin99/Flixel-Animate-Atlas-Player -->

Binary file not shown.

After

(image error) Size: 65 KiB

View file

View file

@ -1,6 +1,5 @@
package;
import animate.FlxAnimate;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
@ -9,10 +8,13 @@ import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.math.FlxPoint;
import flixel.text.FlxText;
import flixel.util.FlxColor;
import openfl.Assets;
import openfl.display.BitmapData;
import openfl.display.MovieClip;
import openfl.display.Timeline;
import openfl.geom.Matrix;
import openfl.geom.Rectangle;
// import animateAtlasPlayer.assets.AssetManager;
// import animateAtlasPlayer.core.Animation;
class CutsceneAnimTestState extends FlxState
{
var cutsceneGroup:CutsceneCharacter;
@ -20,6 +22,9 @@ class CutsceneAnimTestState extends FlxState
var curSelected:Int = 0;
var debugTxt:FlxText;
var funnySprite:FlxSprite = new FlxSprite();
var clip:MovieClip;
public function new()
{
super();
@ -32,50 +37,45 @@ class CutsceneAnimTestState extends FlxState
debugTxt.color = FlxColor.BLUE;
add(debugTxt);
var animated:FlxAnimate = new FlxAnimate(600, 200);
add(animated);
clip = Assets.getMovieClip("tanky:");
// clip.x = FlxG.width/2;
// clip.y = FlxG.height/2;
FlxG.stage.addChild(clip);
// createCutscene(0);
// createCutscene(1);
// createCutscene(2);
// createCutscene(3);
// createCutscene(4);
var swagShit:MovieClip = Assets.getMovieClip('tankBG:');
// swagShit.scaleX = 5;
FlxG.stage.addChild(swagShit);
swagShit.gotoAndStop(13);
var swfMountain = new BitmapData(FlxG.width, FlxG.height, true, 0x00000000);
swfMountain.draw(swagShit, swagShit.transform.matrix);
var mountains:FlxSprite = new FlxSprite().loadGraphic(swfMountain);
// add(mountains);
FlxG.stage.removeChild(swagShit);
funnySprite.x = FlxG.width / 2;
funnySprite.y = FlxG.height / 2;
add(funnySprite);
}
override function update(elapsed:Float)
{
/* if (FlxG.keys.pressed.SHIFT)
{
if (FlxG.keys.justPressed.UP)
curSelected -= 1;
if (FlxG.keys.justPressed.DOWN)
curSelected += 1;
if (curSelected < 0)
curSelected = cutsceneGroup.members.length - 1;
if (curSelected >= cutsceneGroup.members.length)
curSelected = 0;
}
else
{
var valueMulti:Float = 1;
if (FlxG.keys.pressed.SPACE)
valueMulti = 10;
if (FlxG.keys.justPressed.UP)
cutsceneGroup.members[curSelected].y -= valueMulti;
if (FlxG.keys.justPressed.DOWN)
cutsceneGroup.members[curSelected].y += valueMulti;
if (FlxG.keys.justPressed.LEFT)
cutsceneGroup.members[curSelected].x -= valueMulti;
if (FlxG.keys.justPressed.RIGHT)
cutsceneGroup.members[curSelected].x += valueMulti;
}
debugTxt.text = curSelected + " : " + cutsceneGroup.members[curSelected].getPosition();
*/
super.update(elapsed);
// jam sprite into top left corner
var drawMatrix:Matrix = clip.transform.matrix;
var bounds:Rectangle = clip.getBounds(null);
drawMatrix.tx = -bounds.x;
drawMatrix.ty = -bounds.y;
// make bitmapdata only as big as it needs to be
var funnyBmp:BitmapData = new BitmapData(Math.ceil(bounds.width), Math.ceil(bounds.height), true, 0x00000000);
funnyBmp.draw(clip, drawMatrix, true);
funnySprite.loadGraphic(funnyBmp);
// jam sprite back into place lol
funnySprite.offset.x = -bounds.x;
funnySprite.offset.y = -bounds.y;
}
}

View file

@ -40,6 +40,31 @@ class Main extends Sprite
{
super();
#if polymod
polymod.Polymod.init({
modRoot: "mods",
dirs: ['testing123'],
frameworkParams: {
assetLibraryPaths: [
"songs" => "songs", "shared" => "shared", "tutorial" => "tutorial", "week1" => "week1", "week2" => "week2", "week3" => "week3",
"week4" => "week4", "week5" => "week5", "week6" => "week6", "week7" => "week7", "tanky" => "tanky", "tankBG" => "tankBG"
]
},
framework: OPENFL,
errorCallback: function(error:polymod.Polymod.PolymodError)
{
trace("POLYMOD ERROR! code = "
+ error.code
+ " severity = "
+ error.severity
+ " origin = "
+ error.origin
+ " message = "
+ error.message);
}
});
#end
if (stage != null)
{
init();

View file

@ -2,6 +2,7 @@ package;
import flixel.FlxG;
import flixel.FlxGame;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
import flixel.addons.transition.FlxTransitionableState;
@ -48,6 +49,7 @@ import sys.thread.Thread;
class TitleState extends MusicBeatState
{
public static var initialized:Bool = false;
var startedIntro:Bool;
var blackScreen:FlxSprite;
@ -69,11 +71,6 @@ class TitleState extends MusicBeatState
override public function create():Void
{
#if polymod
polymod.Polymod.init({modRoot: "mods", dirs: ['introMod'], framework: OPENFL});
// FlxG.bitmap.clearCache();
#end
startedIntro = false;
FlxG.game.focusLostFramerate = 60;
@ -84,6 +81,7 @@ class TitleState extends MusicBeatState
FlxG.sound.muteKeys = [ZERO];
curWacky = FlxG.random.getObject(getIntroTextShit());
FlxG.sound.cache(Paths.music('freakyMenu'));
// DEBUG BULLSHIT
@ -305,10 +303,28 @@ class TitleState extends MusicBeatState
credTextShit.visible = false;
ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic(Paths.image('newgrounds_logo'));
ngSpr = new FlxSprite(0, FlxG.height * 0.52);
if (FlxG.random.bool(1))
{
ngSpr.loadGraphic(Paths.image('newgrounds_logo_classic'));
}
else if (FlxG.random.bool(30))
{
ngSpr.loadGraphic(Paths.image('newgrounds_logo_animated'), true, 600);
ngSpr.animation.add('idle', [0, 1], 4);
ngSpr.animation.play('idle');
ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.55));
}
else
{
ngSpr.loadGraphic(Paths.image('newgrounds_logo'));
ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.8));
}
add(ngSpr);
ngSpr.visible = false;
ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.8));
ngSpr.updateHitbox();
ngSpr.screenCenter(X);
ngSpr.antialiasing = true;
@ -467,9 +483,55 @@ class TitleState extends MusicBeatState
if (controls.UI_RIGHT)
swagShader.update(elapsed * 0.1);
if (!cheatActive && skippedIntro)
cheatCodeShit();
super.update(elapsed);
}
var cheatArray:Array<Int> = [0x0001, 0x0010, 0x0001, 0x0010, 0x0100, 0x1000, 0x0100, 0x1000];
var curCheatPos:Int = 0;
var cheatActive:Bool = false;
function cheatCodeShit():Void
{
if (FlxG.keys.justPressed.ANY)
{
if (controls.NOTE_DOWN_P || controls.UI_DOWN_P)
codePress(FlxObject.DOWN);
if (controls.NOTE_UP_P || controls.UI_UP_P)
codePress(FlxObject.UP);
if (controls.NOTE_LEFT_P || controls.UI_LEFT_P)
codePress(FlxObject.LEFT);
if (controls.NOTE_RIGHT_P || controls.UI_RIGHT_P)
codePress(FlxObject.RIGHT);
}
}
function codePress(input:Int)
{
if (input == cheatArray[curCheatPos])
{
curCheatPos += 1;
if (curCheatPos >= cheatArray.length)
startCheat();
}
else
curCheatPos = 0;
trace(input);
}
function startCheat():Void
{
cheatActive = true;
FlxG.sound.playMusic(Paths.music('tutorialTitle'), 1);
Conductor.changeBPM(190);
FlxG.camera.flash(FlxColor.WHITE, 1);
FlxG.sound.play(Paths.sound('confirmMenu'), 0.7);
}
function createCoolText(textArray:Array<String>)
{
for (i in 0...textArray.length)
@ -506,11 +568,11 @@ class TitleState extends MusicBeatState
{
super.beatHit();
if (!startedIntro)
return ;
if (skippedIntro)
{
if (cheatActive && curBeat % 2 == 0)
swagShader.update(0.125);
logoBl.animation.play('bump', true);
danceLeft = !danceLeft;

View file

@ -0,0 +1,20 @@
package ui;
import flixel.FlxSprite;
import flixel.addons.display.FlxGridOverlay;
class StageBuilderState extends MusicBeatState
{
public function new()
{
super();
}
override function create()
{
super.create();
var bg:FlxSprite = FlxGridOverlay.create(10, 10);
add(bg);
}
}