Skip to content

Commit

Permalink
more bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
UmbratheUmbreon committed Mar 11, 2023
1 parent 7d41d14 commit 02a52ba
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 37 deletions.
2 changes: 1 addition & 1 deletion assets/preload/update/tracking/GitVer.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0a
0.8.0b
1 change: 0 additions & 1 deletion gitVersion.txt

This file was deleted.

16 changes: 0 additions & 16 deletions hxformat.json

This file was deleted.

2 changes: 1 addition & 1 deletion source/HUD.hx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class HUD extends FlxSpriteGroup {
timeBar.createGradientBar([0xFF0a0a0a], [color = FlxColor.fromRGB(PlayState.instance.dad.healthColorArray[0].red, PlayState.instance.dad.healthColorArray[0].green, PlayState.instance.dad.healthColorArray[0].blue), FlxColor.subtract(color, 0x00333333)], blockyness, 90);
} catch(e) {
timeBar.createGradientBar([0xFF0a0a0a], [color = FlxColor.fromRGB(255,255,255), FlxColor.subtract(color, 0x00333333)], blockyness, 90);
trace('exception: ' + e);
FlxG.log.add('Error: ' + e + ' at HUD.hx (78-80)');
}
if (ClientPrefs.settings.get("lowQuality") || PlayState.isPixelStage)
timeBar.numDivisions = Std.int((timeBar.width)/4);
Expand Down
9 changes: 8 additions & 1 deletion source/HealthBar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ class HealthBar extends flixel.ui.FlxBar
public function splitColor(filled:Bool = false, colors:Array<FlxColor>):HealthBar
{
//TODO: Make this function not use a switch and be able to be any amount
var pixelData:BitmapData = FlxG.bitmap.get((filled ? _filledKey : _emptyKey)).bitmap;
var pixelData:BitmapData;
try {
pixelData = FlxG.bitmap.get((filled ? _filledKey : _emptyKey)).bitmap;
} catch(e) {
FlxG.log.add('Error: ' + e + ' at Healthbar.hx (12-14)');
return this;
}

final height:Int = pixelData.height;
switch (colors.length) {
case 1:
Expand Down
2 changes: 1 addition & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Main extends Sprite
*
* Use `debugVersion` to get the version with build date.
*/
public static final denpaEngineVersion:GameVersion = new GameVersion(0, 8, 0, 'a');
public static final denpaEngineVersion:GameVersion = new GameVersion(0, 8, 0, 'b');

public static var fpsCounter:FramerateDisplay;
public static var ramCount:DebugDisplay;
Expand Down
2 changes: 1 addition & 1 deletion source/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ class Paths
if (FileSystem.exists('mods/data/stages')) {
for (a in FileSystem.readDirectory('mods/data/stages')) {
if (!a.endsWith('.json')) continue;
characterMap.set(a.substr(0, a.length - 5), '');
stageMap.set(a.substr(0, a.length - 5), '');
}
}
if (FileSystem.exists('mods/images/icons')) {
Expand Down
2 changes: 1 addition & 1 deletion source/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ class TitleState extends MusicBeatState
titleText.animation.play('press');
}

if (!ClientPrefs.settings.get("lowQuality")) {
if (!ClientPrefs.settings.get("lowQuality") && swagShader != null) {
swagShader.hue = 0;
swagShader.brightness = 0;
}
Expand Down
31 changes: 17 additions & 14 deletions source/options/BaseOptionsMenu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -156,24 +156,27 @@ class BaseOptionsMenu extends MusicBeatSubstate
var nextAccept:Int = 5;
var holdTime:Float = 0;
var holdValue:Float = 0;
var stopLerping:Bool = false;
override function update(elapsed:Float)
{
final lerpVal:Float = CoolUtil.clamp(elapsed * 9.6, 0, 1);
for (i=>item in grpOptions.members) {
@:privateAccess {
if (lerpList[i]) {
item.y = FlxMath.lerp(item.y, (item.scaledY * item.yMult) + (FlxG.height * 0.48) + item.yAdd, lerpVal);
if(item.forceX != Math.NEGATIVE_INFINITY) {
item.x = item.forceX;
} else {
item.x = FlxMath.lerp(item.x, (item.isBold ? 30 : 15) + item.alignAdd, lerpVal);
}
} else {
item.y = ((item.scaledY * item.yMult) + (FlxG.height * 0.48) + item.yAdd);
if(item.forceX != Math.NEGATIVE_INFINITY) {
item.x = item.forceX;
if (!stopLerping) {
for (i=>item in grpOptions.members) {
@:privateAccess {
if (lerpList[i]) {
item.y = FlxMath.lerp(item.y, (item.scaledY * item.yMult) + (FlxG.height * 0.48) + item.yAdd, lerpVal);
if(item.forceX != Math.NEGATIVE_INFINITY) {
item.x = item.forceX;
} else {
item.x = FlxMath.lerp(item.x, (item.isBold ? 30 : 15) + item.alignAdd, lerpVal);
}
} else {
item.x = ((item.isBold ? 30 : 15) + item.alignAdd);
item.y = ((item.scaledY * item.yMult) + (FlxG.height * 0.48) + item.yAdd);
if(item.forceX != Math.NEGATIVE_INFINITY) {
item.x = item.forceX;
} else {
item.x = ((item.isBold ? 30 : 15) + item.alignAdd);
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions source/options/OptionsSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,7 @@ class MiscSettingsSubState extends BaseOptionsMenu
}

function openCrossfadeOptions() {
stopLerping = true;
for (option in grpOptions) {
if (option.text != 'CrossFade Options') {
option.align = 'none';
Expand Down

0 comments on commit 02a52ba

Please sign in to comment.