Skip to content

Commit 0bbbdb4

Browse files
committed
yay the osu menu works now
like 999 percent of it anyway but hey at least it works now to make it archipelago compatible
1 parent 710ee12 commit 0bbbdb4

File tree

16 files changed

+462
-120
lines changed

16 files changed

+462
-120
lines changed
1.62 KB
Loading
7.55 KB
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<TextureAtlas imagePath="freeplayFlame.png">
3+
<SubTexture name="fire loop full instance 10000" x="0" y="0" width="109" height="129" frameX="0" frameY="-70" frameWidth="109" frameHeight="199" />
4+
<SubTexture name="fire loop full instance 10001" x="115" y="0" width="38" height="173" frameX="-42" frameY="0" frameWidth="109" frameHeight="199" />
5+
<SubTexture name="fire loop full instance 10002" x="55" y="135" width="48" height="116" frameX="-34" frameY="-54" frameWidth="109" frameHeight="199" />
6+
<SubTexture name="fire loop full instance 10003" x="0" y="135" width="49" height="114" frameX="-36" frameY="-53" frameWidth="109" frameHeight="199" />
7+
<SubTexture name="fire loop full instance 10004" x="57" y="257" width="52" height="101" frameX="-31" frameY="-68" frameWidth="109" frameHeight="199" />
8+
<SubTexture name="fire loop full instance 10005" x="0" y="257" width="51" height="107" frameX="-34" frameY="-53" frameWidth="109" frameHeight="199" />
9+
<SubTexture name="fire loop full instance 10006" x="57" y="364" width="43" height="121" frameX="-35" frameY="-40" frameWidth="109" frameHeight="199" />
10+
<SubTexture name="fire loop full instance 10007" x="0" y="370" width="48" height="102" frameX="-37" frameY="-55" frameWidth="109" frameHeight="199" />
11+
<SubTexture name="fire loop full instance 10008" x="115" y="179" width="39" height="113" frameX="-40" frameY="-48" frameWidth="109" frameHeight="199" />
12+
<SubTexture name="fire loop full instance 10009" x="106" y="364" width="43" height="120" frameX="-43" frameY="-45" frameWidth="109" frameHeight="199" />
13+
</TextureAtlas>

assets/shared/images/freeplay/freeplayStars/Animation.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

assets/shared/images/freeplay/freeplayStars/spritemap1.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
-2.03 KB
Binary file not shown.

assets/shared/shaders/hsv.frag

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#pragma header
2+
3+
uniform float _hue;
4+
uniform float _sat;
5+
uniform float _val;
6+
7+
vec3 normalizeColor(vec3 color)
8+
{
9+
return vec3(
10+
color[0] / 255.0,
11+
color[1] / 255.0,
12+
color[2] / 255.0
13+
);
14+
}
15+
16+
vec3 rgb2hsv(vec3 c)
17+
{
18+
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
19+
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
20+
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
21+
float d = q.x - min(q.w, q.y);
22+
float e = 1.0e-10;
23+
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
24+
}
25+
26+
vec3 hsv2rgb(vec3 c)
27+
{
28+
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
29+
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
30+
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
31+
}
32+
33+
void main() {
34+
vec4 color = flixel_texture2D(bitmap, openfl_TextureCoordv);
35+
vec4 swagColor = vec4(rgb2hsv(vec3(color[0], color[1], color[2])), color[3]);
36+
swagColor.x *= _hue;
37+
swagColor.y *= _sat;
38+
swagColor.z *= _val;
39+
// approximate "lightness" changing!!
40+
swagColor.z *= (_hue * 0.5) + 0.5;
41+
color = vec4(hsv2rgb(vec3(swagColor[0], swagColor[1], swagColor[2])), swagColor[3]);
42+
gl_FragColor = color;
43+
}
44+
9.03 KB
Binary file not shown.

source/backend/Paths.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,11 @@ class Paths
983983
//trace(animationJson);
984984
spr.loadAtlasEx(folderOrImg, spriteJson, animationJson);
985985
}
986+
987+
public static function animateAtlas(path:String, ?library:String):String
988+
{
989+
return getLibraryPath('images/$path', library);
990+
}
986991
#end
987992

988993
public static function file(file:String, type:AssetType = TEXT, ?library:String):String {

source/backend/animation/FlxAtlasSprite.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class FlxAtlasSprite extends FlxAnimate
8989
FlxG.log.error('FlxAtlasSprite does not have its main symbol!');
9090
return [];
9191
}
92-
return mainSymbol.getFrameLabels().map(keyFrame -> keyFrame.name).filterNull();
92+
return mainSymbol.getFrameLabels().map(keyFrame -> keyFrame.name);
9393
}
9494

9595
/**

0 commit comments

Comments
 (0)