Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

Commit c7aba1d

Browse files
committed
1.9.4 pre-2
hope I didn't miss anything lmfao
1 parent a95a28c commit c7aba1d

22 files changed

+380
-281
lines changed

Project.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project>
33
<!-- _________________________ Application Settings _________________________ -->
44

5-
<app title="Kade Engine Community" file="Kade Engine Community" packageName="com.therealjake12.kec" package="com.therealjake12.kec" main="Main" version="1.9.3" company="TheRealJake12" />
5+
<app title="Kade Engine Community" file="Kade Engine Community" packageName="com.therealjake12.kec" package="com.therealjake12.kec" main="Main" version="1.9.4" company="TheRealJake12" />
66

77
<!--Switch Export with Unique ApplicationID and Icon-->
88
<set name="APP_ID" value="0x0100f6c013bbc000" />

source/Init.hx

+5-6
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ class Init extends MusicBeatState
1414
CPPInterface.darkMode();
1515
#end
1616

17-
FlxG.mouse.load(Paths.oldImage('curser'));
18-
1917
FlxG.save.bind('kec' #if (flixel < "5.0.0"), 'therealjake12' #end);
2018

19+
// Gotta run this before any assets get loaded.
20+
kec.backend.modding.ModCore.initialize();
21+
2122
kec.backend.PlayerSettings.init();
2223

2324
kec.backend.KadeEngineData.initSave();
@@ -40,14 +41,12 @@ class Init extends MusicBeatState
4041

4142
Paths.setCurrentLevel('shared');
4243

44+
FlxG.mouse.load(Paths.oldImage('curser'));
45+
4346
kec.states.MusicBeatState.initSave = true;
4447

4548
kec.backend.util.Highscore.load();
4649

47-
// Gotta run this before any assets get loaded.
48-
if (FlxG.save.data.loadMods)
49-
kec.backend.modding.ModCore.initialize();
50-
5150
FlxG.autoPause = FlxG.save.data.autoPause;
5251
FlxG.mouse.visible = true;
5352

source/kec/backend/Debug.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import haxe.PosInfos;
88
import kec.backend.chart.Song.SongData;
99
import kec.backend.chart.Song;
1010
import kec.objects.Character;
11-
import kec.objects.HealthIcon;
11+
import kec.objects.ui.HealthIcon;
1212
import kec.objects.Note;
1313

1414
/**

source/kec/backend/KadeEngineData.hx

+4-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ class KadeEngineData
293293
FlxG.save.data.playHitsoundsE = false;
294294

295295
if (FlxG.save.data.developer == null)
296-
FlxG.save.data.developer = false;
296+
FlxG.save.data.developer = false;
297+
298+
if (FlxG.save.data.maxRatings == null)
299+
FlxG.save.data.maxRatings = 4;
297300

298301
FlxSprite.defaultAntialiasing = FlxG.save.data.antialiasing;
299302
FlxObject.defaultMoves = false;

source/kec/backend/Options.hx

+46
Original file line numberDiff line numberDiff line change
@@ -2926,6 +2926,51 @@ class DeveloperMode extends Option
29262926
}
29272927
}
29282928

2929+
class MaxRatingAmountOption extends Option
2930+
{
2931+
public function new(desc:String)
2932+
{
2933+
super();
2934+
if (OptionsMenu.isInPause)
2935+
{
2936+
blocked = true;
2937+
description = pauseDesc;
2938+
}
2939+
else
2940+
description = desc;
2941+
}
2942+
2943+
public override function right():Bool
2944+
{
2945+
if (OptionsMenu.isInPause)
2946+
return false;
2947+
if (FlxG.save.data.maxRatings >= 30)
2948+
FlxG.save.data.maxRatings = 30;
2949+
else
2950+
FlxG.save.data.maxRatings++;
2951+
display = updateDisplay();
2952+
return true;
2953+
}
2954+
2955+
public override function left():Bool
2956+
{
2957+
if (OptionsMenu.isInPause)
2958+
return false;
2959+
if (FlxG.save.data.maxRatings > 30)
2960+
FlxG.save.data.maxRatings = 30;
2961+
else if (FlxG.save.data.maxRatings < 2)
2962+
FlxG.save.data.maxRatings = 1;
2963+
else
2964+
FlxG.save.data.maxRatings--;
2965+
return true;
2966+
}
2967+
2968+
private override function updateDisplay():String
2969+
{
2970+
return "Rating Cap: < " + FlxG.save.data.maxRatings + " >";
2971+
}
2972+
}
2973+
29292974
class ResetSettings extends Option
29302975
{
29312976
var confirm:Bool = false;
@@ -3014,6 +3059,7 @@ class ResetSettings extends Option
30143059
FlxG.save.data.playHitsounds = null;
30153060
FlxG.save.data.playHitsoundsE = null;
30163061
FlxG.save.data.developer = null;
3062+
FlxG.save.data.maxRatings = null;
30173063

30183064
KadeEngineData.initSave();
30193065
confirm = false;

source/kec/backend/Ratings.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class RatingWindow
203203
var healthBonuses:Array<Float> = [-0.2, -0.06, 0, 0.04, 0.06];
204204
var scoreBonuses:Array<Int> = [-300, 0, 200, 350, 350];
205205
var defaultTimings:Array<Float> = [100.0, 95.0, 75.0, 35.0, 20.0];
206-
var missArray:Array<Bool> = [true, false, false, false, false];
206+
var missArray:Array<Bool> = [false, false, false, false, false];
207207
var splashArray:Array<Bool> = [false, false, false, true, true];
208208
var suffixes:Array<String> = ['s', 's', 's', 's', 's'];
209209
var combos:Array<String> = ['', 'FC', 'GFC', 'PFC', 'MFC'];

source/kec/objects/Note.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Note extends FlxSprite
8989

9090
public var texture(default, set):String = null;
9191

92-
var isPlayer:Bool = true;
92+
public var isPlayer:Bool = true;
9393

9494
// defaults if no noteStyle was found in chart
9595
var noteTypeCheck:String = 'normal';

source/kec/objects/Rating.hx

-58
This file was deleted.

source/kec/objects/StaticArrow.hx

+44-13
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class StaticArrow extends FlxSprite
3030
private var player:Int;
3131
private var noteData:Int = 0;
3232

33+
public var resetAnim:Float = 0;
34+
3335
public var noteTypeCheck:String = 'normal';
3436

3537
private function set_texture(value:String):String
@@ -68,6 +70,7 @@ class StaticArrow extends FlxSprite
6870
texture = skin; // Load texture and anims
6971
updateHitbox();
7072
scrollFactor.set();
73+
playAnim('static');
7174
}
7275

7376
public function reloadNote()
@@ -144,14 +147,47 @@ class StaticArrow extends FlxSprite
144147
angle = localAngle + modAngle;
145148
else
146149
angle = modAngle;
150+
if (resetAnim > 0)
151+
{
152+
resetAnim -= elapsed;
153+
if (resetAnim <= 0)
154+
{
155+
localAngle = 0;
156+
if (!kec.backend.PlayStateChangeables.opponentMode)
157+
{
158+
switch (player)
159+
{
160+
case 0:
161+
playAnim('static');
162+
default:
163+
if (!kec.backend.PlayStateChangeables.botPlay)
164+
playAnim('pressed');
165+
else
166+
playAnim('static');
167+
// VANILLA FRIDAY NIGHT FUNKIN REFERENCE ?!?!??!
168+
}
169+
}
170+
else
171+
{
172+
switch (player)
173+
{
174+
case 1:
175+
playAnim('static');
176+
default:
177+
if (!kec.backend.PlayStateChangeables.botPlay)
178+
playAnim('pressed');
179+
else
180+
playAnim('static');
181+
// VANILLA FRIDAY NIGHT FUNKIN REFERENCE ?!?!??!
182+
}
183+
}
184+
resetAnim = 0;
185+
}
186+
}
147187
super.update(elapsed);
148-
149-
if (FlxG.keys.justPressed.THREE)
150-
localAngle += 10;
151-
152188
bgLane.angle = direction - 90;
153189
if (laneFollowsReceptor)
154-
bgLane.x = (x - 2) - (bgLane.angle / 2);
190+
bgLane.x = (x - 2) - (bgLane.angle * 0.5);
155191

156192
bgLane.alpha = FlxG.save.data.laneTransparency * alpha;
157193
bgLane.visible = visible;
@@ -160,15 +196,10 @@ class StaticArrow extends FlxSprite
160196
public function playAnim(AnimName:String, ?force:Bool = false):Void
161197
{
162198
animation.play(AnimName, force);
163-
164-
updateHitbox();
165-
166-
if (frames != null)
199+
if (animation.curAnim != null)
167200
{
168-
offset.set(frameWidth / 2, frameHeight / 2);
169-
170-
offset.x -= 54;
171-
offset.y -= 56;
201+
centerOffsets();
202+
centerOrigin();
172203
}
173204

174205
angle = localAngle + modAngle;

source/kec/objects/ui/ComboNumber.hx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package kec.objects.ui;
2+
3+
class ComboNumber extends UIComponent
4+
{
5+
public function loadNum(num:Int)
6+
{
7+
loadGraphic(Paths.image('hud/${style.style.toLowerCase()}/num$num'));
8+
setGraphicSize(Std.int(width * style.scale));
9+
updateHitbox();
10+
alpha = 1;
11+
acceleration.y = FlxG.random.int(200, 300);
12+
velocity.y -= FlxG.random.int(140, 160);
13+
velocity.x = FlxG.random.float(-5, 5);
14+
if (style.antialiasing == false)
15+
antialiasing = false;
16+
}
17+
}

source/kec/objects/DialogueBox.hx source/kec/objects/ui/DialogueBox.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package kec.objects;
1+
package kec.objects.ui;
22

33
import flixel.addons.text.FlxTypeText;
44
import flixel.graphics.frames.FlxAtlasFrames;

source/kec/objects/HealthIcon.hx source/kec/objects/ui/HealthIcon.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package kec.objects;
1+
package kec.objects.ui;
22

33
class HealthIcon extends FlxSprite
44
{

source/kec/objects/IntroSprite.hx source/kec/objects/ui/IntroSprite.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package kec.objects;
1+
package kec.objects.ui;
22

33
import kec.backend.chart.Song.StyleData;
44

source/kec/objects/ui/Rating.hx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package kec.objects.ui;
2+
3+
class Rating extends UIComponent
4+
{
5+
public function loadRating(ratingName:String)
6+
{
7+
if (lastName != ratingName)
8+
{
9+
loadGraphic(Paths.image('hud/${style.style.toLowerCase()}/' + ratingName));
10+
setGraphicSize(Std.int(width * style.scale * 0.7));
11+
updateHitbox();
12+
}
13+
lastName = ratingName;
14+
alpha = 1;
15+
if (style.antialiasing == false)
16+
antialiasing = false;
17+
18+
velocity.x -= FlxG.random.int(0, 10);
19+
acceleration.y = 550;
20+
velocity.y -= FlxG.random.int(140, 175);
21+
}
22+
}

source/kec/objects/ui/UIComponent.hx

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package kec.objects.ui;
2+
3+
import kec.backend.chart.Song.StyleData;
4+
/**
5+
* Class Used For UI Components Like Ratings And Combo Numbers.
6+
* Exists Only Because Of Sorting And Recycling.
7+
*/
8+
class UIComponent extends FlxSprite
9+
{
10+
public var startTime:Float;
11+
// Conductor Song Position. The Meat And Potatos Of Sorting.
12+
public var style:StyleData = null;
13+
// The Style. Used For Scaling, Antialiasing, And Image Pathing.
14+
public var lastName:String = null;
15+
// To Avoid Loading The Same Image Multiple Times. lol.
16+
17+
// Handles The Fading Out.
18+
19+
public function new()
20+
{
21+
super();
22+
}
23+
24+
public function setup()
25+
{
26+
velocity.set(0, 0);
27+
acceleration.set(0, 0);
28+
alpha = 0.001;
29+
moves = true;
30+
startTime = Conductor.songPosition;
31+
}
32+
33+
public function fadeOut()
34+
{
35+
PlayState.instance.createTween(this, {alpha: 0}, 0.2, {
36+
startDelay: (Conductor.crochet * Math.pow(PlayState.songMultiplier, 2)) * 0.001,
37+
onComplete: function(t:FlxTween)
38+
{
39+
kill();
40+
}
41+
});
42+
}
43+
}

0 commit comments

Comments
 (0)