Merge branch 'main' into translations-system

This commit is contained in:
Ne_Eo
2025-01-09 20:26:29 +01:00
119 changed files with 1207 additions and 416 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ function postCreate() {
}
var toAdd:Bool = true; // Using this just to make sure
function update(elpased) {
function update(elapsed) {
if(toAdd) {
toAdd = false;
PlayState.instance.insert(PlayState.instance.members.indexOf(self), trail);
@@ -1,4 +1,4 @@
var loopedTimah:FlxTimer; // Hey! a man has fallen into the river in lego city! and if youre asking why this is here, you shall disappear! - Nex
var loopedTimer:FlxTimer; // Hey! a man has fallen into the river in lego city! and if youre asking why this is here, you shall disappear! - Nex
var bgFade:FlxSprite;
var hand:FlxSprite;
@@ -9,7 +9,7 @@ function postCreate() {
bgFade.alpha = 0;
cutscene.insert(0, bgFade);
loopedTimah = new FlxTimer().start(0.83, function(tmr:FlxTimer)
loopedTimer = new FlxTimer().start(0.83, function(tmr:FlxTimer)
{
bgFade.alpha += (1 / 5) * 0.7;
if (bgFade.alpha > 0.7)
@@ -30,8 +30,8 @@ function close(event) {
cutscene.curMusic?.fadeOut(1, 0);
for(c in cutscene.charMap) c.visible = false;
loopedTimah.cancel();
loopedTimah = new FlxTimer().start(0.2, function(tmr:FlxTimer)
loopedTimer.cancel();
loopedTimer = new FlxTimer().start(0.2, function(tmr:FlxTimer)
{
if (tmr.elapsedLoops <= 5) {
cutscene.dialogueBox.alpha -= 1 / 5;
+1 -1
View File
@@ -11,7 +11,7 @@ function create() {
}
var adder:Int = 0;
function postUpdate(elapsed:Float) { // Doing it like this so at least the red bump doesnt look too much instant
function postUpdate(elapsed:Float) { // Doing it like this so at least the red bump doesn't look too much instant
var toAdd:Int = lerp(adder, 0, elapsed);
idk.amount = camGame.zoom * camHUD.zoom + toAdd;
idk.strength = (camGame.zoom - camHUD.zoom + toAdd) * 5;
+1 -1
View File
@@ -16,7 +16,7 @@
antialiasing="false" scale="4.797" scroll="0.9" updateHitbox="true" type="loop"/>
<sprite name="bgTrees" x="-590" y="-800" sprite="weebTrees" antialiasing="false" scale="5.102" scroll="0.85" updateHitbox="true" type="loop">
<!-- Frame 19 isnt used in og -->
<!-- Frame 19 isn't used in og -->
<anim name="trees" anim="trees" indices="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19" fps="12" loop="true"/>
</sprite>
+1 -1
View File
@@ -16,7 +16,7 @@ public function lightningStrikeShit():Void
lightningStrikeBeat = curBeat;
lightningOffset = FlxG.random.int(8, 24);
boyfriend.playAnim('scared', true, "SING"); // SING so that they dont get indefinitely looped
boyfriend.playAnim('scared', true, "SING"); // SING so that they don't get indefinitely looped
gf.playAnim('scared', true, "SING");
}
+1 -1
View File
@@ -25,7 +25,7 @@
<dad x="20" y="160"/>
<boyfriend x="810"/>
<!-- FOREGROUND TANKMANS -->
<!-- FOREGROUND TANKMENs -->
<high-memory>
<sprite name="tank0" x="-500" y="650" sprite="tank0" scrollx="1.7" scrolly="1.5" type="onbeat" zoomfactor="1.25"/>
+1 -1
View File
@@ -1,4 +1,4 @@
# THIS FILE ISNT NECESSARY,
# THIS FILE ISN'T NECESSARY,
# BUT YOU CAN USE IT TO SORT WEEKS
tutorial
+2 -2
View File
@@ -1,4 +1,4 @@
## Here are guides on common mistakes and advices for writting shaders for flixel and openfl.
## Here are guides on common mistakes and advices for writing shaders for flixel and openfl.
It's important to follow this guide as most shader coders make these mistakes a lot and end up with shaders that only work on certain devices.
@@ -51,7 +51,7 @@ We will show each step to converting this shader into an usable openfl/flixel sh
1. replace ``void mainImage( out vec4 fragColor, in vec2 fragCoord )`` with a simple ``void main()`` (flixel and openfl do not have any parameters since the coords are defined outside the function)
2. replace ``vec2 uv = fragCoord/iResolution.xy;`` with ``vec2 uv = openfl_TextureCoordv`` (or in some cases, add ``vec2 fragCoord = openfl_TextureCoordv*openfl_TextureSize.xy`` before it and replace `iResolution.xy` with ``openfl_TextureSize.xy`` (if the uv value is different than usual))
3. replace ``vec4 col = texture(iChannel0, uv);`` with ``vec4 col = texture2D(bitmap, uv);`` or ``vec4 col = flixel_texture2D(bitmap, uv);`` (keep in mind bitmap is the pixels of the camera/sprite the shader is aplied to)
3. replace ``vec4 col = texture(iChannel0, uv);`` with ``vec4 col = texture2D(bitmap, uv);`` or ``vec4 col = flixel_texture2D(bitmap, uv);`` (keep in mind bitmap is the pixels of the camera/sprite the shader is applied to)
4. finally, replace ``fragColor = col;`` with ``gl_FragColor = col;``
###### Keep in mind that this covers the most basic on how to convert a shader from shadertoy.com, complex shaders will need more expertise with handling shaders before converting those.
+19 -19
View File
@@ -5,8 +5,8 @@
const vec3 gradient1 = vec3(114.0/255.0, 81.0/255.0, 135.0/255.0);
const vec3 gradient2 = vec3(144.0/255.0, 80.0/255.0, 186.0/255.0);
const vec4 outlinecolor = vec4(0.1);
const vec3 lowdetailcol = vec3(0.0, 0.0, 1.0);
const vec4 outlineColor = vec4(0.1);
const vec3 lowDetailCol = vec3(0.0, 0.0, 1.0);
uniform vec2 textureRes;
uniform float pixelOffset;
@@ -21,7 +21,7 @@ uniform bool lowDetail;
float getAmplitude(vec2 pixel) {
float pixelID = floor((pixel.y+pixelOffset)/3.0);
// TODO: INVESTIGATE THE 1.+ AND WHY IT WORKS (SRSLY I GOT NO CLUE) -lunar
// TODO: INVESTIGATE THE 1.+ AND WHY IT WORKS (SERIOUSLY I GOT NO CLUE) -lunar
vec2 wavePixel = vec2(mod(pixelID, waveformSize.x), 1.0+floor(pixelID/waveformSize.x));
vec4 waveData = texture2D(waveformTexture, wavePixel / waveformSize);
@@ -41,28 +41,28 @@ bool inWaveForm(vec2 pixel, float width) {
return pixel.x > widthdiv2 && pixel.x < textureRes.x-widthdiv2;
}
float getHightlight(float ampwidth) {
float remapCoord = (ampwidth/textureRes.x)/2.0;
float getHighlight(float ampWidth) {
float remapCoord = (ampWidth/textureRes.x)/2.0;
float mappedCoord = map(openfl_TextureCoordv.x, remapCoord, 1.0-remapCoord, 0.0, 1.0);
return 1.0-(abs(mappedCoord-0.5)*2.0);
}
void outlineWaveform(vec2 pixel, vec2 offset) {
float amplitude = getAmplitude(pixel - offset);
float ampwidth = (1.0-amplitude) * textureRes.x;
float ampWidth = (1.0-amplitude) * textureRes.x;
if (!inWaveForm(pixel, ampwidth))
gl_FragColor -= outlinecolor*mix(0.5, 0.8, amplitude);
if (!inWaveForm(pixel, ampWidth))
gl_FragColor -= outlineColor*mix(0.5, 0.8, amplitude);
}
void highDetailWaveform(vec2 pixel, float amplitude, float ampwidth) {
void highDetailWaveform(vec2 pixel, float amplitude, float ampWidth) {
vec3 gradientColor = mix(gradient1, gradient2, openfl_TextureCoordv.x);
gradientColor *= pixel.y+pixelOffset>playerPosition ? 0.7 : 1.0;
gradientColor = mix(gradientColor, gradientColor * vec3(1.8), map(getHightlight(amplitude), 0.0, 1.0, 0.5, 1.0));
gradientColor = mix(gradientColor, gradientColor * vec3(1.8), map(getHighlight(amplitude), 0.0, 1.0, 0.5, 1.0));
float ampwidthHighlight = getAmpWidth(amplitude/3.0);
if (inWaveForm(pixel, ampwidthHighlight))
gradientColor = mix(gradientColor, gradientColor * vec3(1.8), map(getHightlight(ampwidthHighlight), 0.0, 1.0, 0.5, 1.0));
float ampWidthHighlight = getAmpWidth(amplitude/3.0);
if (inWaveForm(pixel, ampWidthHighlight))
gradientColor = mix(gradientColor, gradientColor * vec3(1.8), map(getHighlight(ampWidthHighlight), 0.0, 1.0, 0.5, 1.0));
gl_FragColor = vec4(vec3(gradientColor * mix(0.5, 0.8, amplitude))*openfl_Alphav, openfl_Alphav);
@@ -70,19 +70,19 @@ void highDetailWaveform(vec2 pixel, float amplitude, float ampwidth) {
outlineWaveform(pixel, vec2(0.0, 1.0));
}
void lowDetailWaveform(vec2 pixel, float amplitude, float ampwidth) {
gl_FragColor = vec4(lowdetailcol * (pixel.y+pixelOffset>playerPosition ? 0.7 : 1.0), 1.0);
void lowDetailWaveform(vec2 pixel, float amplitude, float ampWidth) {
gl_FragColor = vec4(lowDetailCol * (pixel.y+pixelOffset>playerPosition ? 0.7 : 1.0), 1.0);
}
void main()
{
vec2 pixel = openfl_TextureCoordv * textureRes;
float amplitude = getAmplitude(pixel);
float ampwidth = getAmpWidth(amplitude);
float ampWidth = getAmpWidth(amplitude);
gl_FragColor = vec4(0.0);
if (!inWaveForm(pixel, ampwidth)) return;
if (!inWaveForm(pixel, ampWidth)) return;
if (lowDetail) lowDetailWaveform(pixel, amplitude, ampwidth);
else highDetailWaveform(pixel, amplitude, ampwidth);
if (lowDetail) lowDetailWaveform(pixel, amplitude, ampWidth);
else highDetailWaveform(pixel, amplitude, ampWidth);
}