Skip to content

Commit

Permalink
0.7.0b
Browse files Browse the repository at this point in the history
  • Loading branch information
UmbratheUmbreon committed Nov 8, 2022
1 parent 87b6232 commit 6f42a91
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 195 deletions.
5 changes: 5 additions & 0 deletions assets/preload/images/title/newgroundsSprite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sprite": "penis_2",
"textArray": ["Say hello", "to", "penis (2).png"],
"height": 0.48
}
2 changes: 1 addition & 1 deletion gitVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0
0.7.0b
3 changes: 0 additions & 3 deletions source/DenpaState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class DenpaState extends MusicBeatState
var logo:FlxSprite;
var jonScare:FlxSprite;

public static var errorFixer:Bool = false;

var chooseYerIntroMate:Int = FlxG.random.int(0,9);

override public function create():Void
Expand Down Expand Up @@ -87,7 +85,6 @@ class DenpaState extends MusicBeatState

new FlxTimer().start(0.01, function(tmr:FlxTimer)
{
errorFixer = true;
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
switch (chooseYerIntroMate){
Expand Down
67 changes: 6 additions & 61 deletions source/InitState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,67 +30,7 @@ class InitState extends MusicBeatState
super.update(elapsed);
}

public static function init(?transfer:Bool = null) {
Paths.clearStoredMemory();
Paths.clearUnusedMemory();

FlxG.game.focusLostFramerate = 60;
FlxG.sound.muteKeys = muteKeys;
FlxG.sound.volumeDownKeys = volumeDownKeys;
FlxG.sound.volumeUpKeys = volumeUpKeys;
FlxG.keys.preventDefaultKeys = [TAB];

PlayerSettings.init();

FlxG.save.bind('funkin', 'ninjamuffin99');

#if !html5
if (FlxG.save.data.fullscreen != null) {
FlxG.fullscreen = FlxG.save.data.fullscreen;
} else {
FlxG.fullscreen = false;
}

if (FlxG.save.data.autoPause != null) {
FlxG.autoPause = FlxG.save.data.autoPause;
} else {
FlxG.autoPause = true;
}
#end

ClientPrefs.loadPrefs();

Highscore.load();

if (FlxG.save.data.weekCompleted != null)
{
StoryMenuState.weekCompleted = FlxG.save.data.weekCompleted;
}

FlxG.mouse.visible = false;

#if desktop
Application.current.window.borderless = true;
#end

#if desktop
if (!DiscordClient.isInitialized)
{
DiscordClient.initialize();
Application.current.onExit.add (function (exitCode) {
DiscordClient.shutdown();
});
//trace('initialized discord client');
}
#end
if(transfer == null) {
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
MusicBeatState.switchState(new DenpaState());
}
}

private function localInit(?transfer:Bool = null) {
private inline function localInit(?transfer:Bool = null) {
Paths.clearStoredMemory();
Paths.clearUnusedMemory();

Expand Down Expand Up @@ -143,6 +83,11 @@ class InitState extends MusicBeatState
//trace('initialized discord client');
}
#end

//Prevent crash on charter -AT
CoolUtil.difficulties = ["Normal"];
PlayState.storyDifficulty = 0;

if(transfer == null) {
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
Expand Down
7 changes: 5 additions & 2 deletions source/LoadingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ class LoadingState extends MusicBeatState
];
override function create()
{
var bg:FlxSprite = new FlxSprite(0, 0).makeGraphic(FlxG.width, FlxG.height, 0xffcaff4d);
add(bg);
//clear assets before just for good measure??? -AT
Paths.clearStoredMemory();
Paths.clearUnusedMemory();
/*var bg:FlxSprite = new FlxSprite(0, 0).makeGraphic(FlxG.width, FlxG.height, 0xffcaff4d);
add(bg);*/

var loading:FlxSprite = new FlxSprite(0, 0).loadGraphic(Paths.image('loadingscreen'));
add(loading);
Expand Down
4 changes: 2 additions & 2 deletions source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ using StringTools;
class MainMenuState extends MusicBeatState
{
#if !debug
public static var denpaEngineVersion:String = '0.7.0'; //This is also used for Discord RPC
public static var denpaEngineVersion:String = '0.7.0b'; //This is also used for Discord RPC
#else
public static var denpaEngineVersion:String = '0.7.0 Nightly'; //For declaring "HEY THIS ISNT FINAL"
public static var denpaEngineVersion:String = '0.7.0b Nightly'; //For declaring "HEY THIS ISNT FINAL"
#end
public static var baseVersion:String = '0.5.2h'; //For those wondering what this engine is based on
public static var curSelected:Int = 0;
Expand Down
1 change: 1 addition & 0 deletions source/PatchState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class PatchState extends MusicBeatState

var pisspoop:Array<Array<String>> = [ //Ver - Icon name - Update Ver - Update Name - Description - Link - BG Color
['Denpa Engine'],
['0.7.0b', 'iidol', "0.7.0b", "", 'Press ' + InputFormatter.getKeyName(ClientPrefs.getKeyThing(ClientPrefs.keyBinds.get('accept'))) + ' or ' + InputFormatter.getKeyName(ClientPrefs.getKeyThing(ClientPrefs.keyBinds.get('accept'), 1)) + ' to view.', 'https://docs.google.com/document/d/1FYPeiyaO2OSlejfHyqvg8VlNH2PbRCJ2PTIDohbZmUI/edit?usp=sharing', '6FD2D2'],
['0.7.0', 'iidol', "0.7.0", "", 'Press ' + InputFormatter.getKeyName(ClientPrefs.getKeyThing(ClientPrefs.keyBinds.get('accept'))) + ' or ' + InputFormatter.getKeyName(ClientPrefs.getKeyThing(ClientPrefs.keyBinds.get('accept'), 1)) + ' to view.', 'https://docs.google.com/document/d/1FYPeiyaO2OSlejfHyqvg8VlNH2PbRCJ2PTIDohbZmUI/edit?usp=sharing', '6FD2D2'],
['0.5.1', 'waidol', "0.5.1", "", 'A-Freeplay Sections, A-Dynamic Icons, A-Volume Controllers per Song, A-Option to Toggle Old Score Popup, I-Modcharts, I-Chart Editor, I-Song Credits, I-Kade Engine Score Display, I-CrossFade Auto Colouring, I-Stage Layering, F-Duet Notes, F-Minor GF Section Icon Bug, O-Stepper Code In Chara Editor, R-Deprecated Pulse Shader Code, R-Winning Icons Option, RFV-0.5.1', '', '3B4CB7'],
['0.5.0d', 'waidol', "0.5.0d", "", 'A-NPS, A-Bopeebo and Fresh Insanity Charts, U-Credits, I-Modcharts, I-Kade Score Display, I-Title Screen, I-Chart Editor Position Display, F-Third Strum Bug, F-Multikey Input Bug, F-Crash Handler Not Showing Up, F-Null Bitmap Reference in Offset Editor, F-Invalid JSON Detector, F-Title Screen Sync, F-Invalid Song Detector, F-Incorrect BPMs When Changing Menus, RFV-0.5.0d', '', '3B4CB7'],
Expand Down
6 changes: 6 additions & 0 deletions source/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class Paths
'assets/shared/music/tea-time.$SOUND_EXT',
];
/// haya I love you for the base cache dump I took to the max
/**
* CLEARS ALL UNUSED ASSETS. USE OFTEN!!
*/
public static function clearUnusedMemory() {
// clear non local assets in the tracked assets list
for (key in currentTrackedAssets.keys()) {
Expand All @@ -75,6 +78,9 @@ class Paths

// define the locally tracked assets
public static var localTrackedAssets:Array<String> = [];
/**
* CLEARS ALL ASSETS. LITERALLY ALL OF THEM. DO NOT USE OUTSIDE OF CREATE!!!
*/
public static function clearStoredMemory(?cleanUnused:Bool = false) {
// clear anything not in the tracked assets list
@:privateAccess
Expand Down
6 changes: 5 additions & 1 deletion source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3574,7 +3574,7 @@ class PlayState extends MusicBeatState
addCharacterToList(newCharacter, charType);

case 'Philly Glow':
blammedLightsBlack = new FlxSprite().makeGraphic(FlxG.width*2, FlxG.height*2, FlxColor.BLACK);
blammedLightsBlack = new FlxSprite().makeGraphic(Std.int(FlxG.width/defaultCamZoom*1.1), Std.int(FlxG.height/defaultCamZoom*1.1), FlxColor.BLACK);
blammedLightsBlack.visible = false;
blammedLightsBlack.scrollFactor.set();
blammedLightsBlack.screenCenter();
Expand Down Expand Up @@ -4934,7 +4934,10 @@ class PlayState extends MusicBeatState

case 'Philly Glow':
var lightId:Int = Std.parseInt(value1);
var colorInt:Int = Std.parseInt(value2);
trace (colorInt); //??
if(Math.isNaN(lightId)) lightId = 0;
if(Math.isNaN(colorInt) || colorInt == 0) colorInt = 1;

var doFlash:Void->Void = function() {
var color:FlxColor = FlxColor.WHITE;
Expand Down Expand Up @@ -4972,6 +4975,7 @@ class PlayState extends MusicBeatState
case 1: //turn on
curLightEvent = FlxG.random.int(0, phillyLightsColors.length-1, [curLightEvent]);
var color:FlxColor = phillyLightsColors[curLightEvent];
if (colorInt != 1) color = FlxColor.fromInt(colorInt);

if(!phillyGlowGradient.visible)
{
Expand Down
23 changes: 16 additions & 7 deletions source/SoundTestState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@ import flixel.FlxSprite;
import flixel.FlxCamera;
import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.display.FlxBackdrop;
import flixel.effects.FlxFlicker;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.text.FlxText;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import lime.app.Application;
import flixel.input.keyboard.FlxKey;

using StringTools;

typedef AlbumData =
{
tracks:Array<TrackData>
}
typedef TrackData =
{
file:String,
name:String,
rgb:Array<Int>,
bpm:Int
}
/**
* State used to play and select songs for the menus.
*/
Expand Down Expand Up @@ -456,6 +462,8 @@ class SoundTestState extends MusicBeatState
case 33:
setTrackThing('tdm3/33', 'Ending', 255,255,255, 86);
}
default:
//add stuff
}
tweenColor();
setColor = true;
Expand Down Expand Up @@ -549,7 +557,7 @@ class SoundTestState extends MusicBeatState
function tweenTexts(supaDirection)
{
if (supaDirection == 'up') {
FlxTween.tween(diskTxt, {y: (FlxG.height * -1) - 100}, 0.1, {
FlxTween.tween(diskTxt, {y: (-FlxG.height) - 100}, 0.1, {
ease: FlxEase.quadInOut,
onComplete: function(twn:FlxTween)
{
Expand All @@ -559,7 +567,7 @@ class SoundTestState extends MusicBeatState
});
}
});
FlxTween.tween(trackTxt, {y: (FlxG.height * -1) - 66}, 0.1, {
FlxTween.tween(trackTxt, {y: (-FlxG.height) - 66}, 0.1, {
ease: FlxEase.quadInOut,
onComplete: function(twn:FlxTween)
{
Expand Down Expand Up @@ -642,6 +650,7 @@ class SoundTestState extends MusicBeatState
}

function setTrackThing(music:String = '', track:String = '', r:Int = 255, g:Int = 255, b:Int = 255, bpm:Float = 100, ?loopStart:Float = null, ?loopEnd:Float = null, ?stream:Bool = false) {
Paths.clearUnusedMemory();
if (!stream) {
FlxG.sound.playMusic(Paths.music(music), 0);
} else {
Expand Down
Loading

0 comments on commit 6f42a91

Please sign in to comment.