Skip to content

Commit

Permalink
what the sigma?
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Oct 26, 2024
1 parent 7b5db8f commit 80d5bd2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<!-- ____________________________ Window Settings ___________________________ -->

<!--These window settings apply to all targets-->
<window width="1280" height="720" fps="" background="#000000" hardware="true" vsync="false" />
<window width="1280" height="720" fps="69" background="#000000" hardware="true" vsync="false" />

<!--HTML5-specific-->
<window if="html5" resizable="true" />
Expand Down
18 changes: 4 additions & 14 deletions source/funkin/backend/funkinLua/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1949,28 +1949,18 @@ class FunkinLua
var killMe:Array<String> = obj.split('.');
spr = LuaUtils.getObjectDirectly(killMe[0]);
if (killMe.length > 1)
{
spr = LuaUtils.getVarInArray(LuaUtils.getPropertyLoopThingWhatever(killMe), killMe[killMe.length - 1]);
}
}

if (spr != null)
{
switch (pos.trim().toLowerCase())
{
case 'x':
spr.screenCenter(X);
return;
case 'y':
spr.screenCenter(Y);
return;
default:
spr.screenCenter(XY);
return;
}
final i = ObjectUtils.convertFlxAxes(pos.trim());
spr.screenCenter(i);
return;
}
luaTrace("screenCenter: Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
});

Lua_helper.add_callback(lua, "objectsOverlap", function(obj1:String, obj2:String)
{
var namesArray:Array<String> = [obj1, obj2];
Expand Down
28 changes: 24 additions & 4 deletions source/funkin/backend/utils/ObjectUtils.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package funkin.backend.utils;
class ObjectUtils
{
/**
* Center Object On A Sprite
* @param spr Sprite You Want to center.
* @param spr2 Sprite you want your sprite to be centered on.
* @return Converted Sprite
* Center Object On A Sprite
* @param spr Sprite You Want to center.
* @param spr2 Sprite you want your sprite to be centered on.
* @return Converted Sprite
**/
public static function centerOnObject(spr:flixel.FlxObject, spr2:flixel.FlxObject, axes:flixel.util.FlxAxes):flixel.FlxObject
{
Expand All @@ -17,4 +17,24 @@ class ObjectUtils

return spr;
}

/**
* Converts string to a FlxAxes.
* @param thing1 String in question.
* @return FlxAxes
**/
public static function convertFlxAxes(thing1:String):flixel.util.FlxAxes
{
return switch (thing1.toLowerCase())
{
case 'x':
return flixel.util.FlxAxes.X;
case 'y':
return flixel.util.FlxAxes.Y;
case 'xy':
return flixel.util.FlxAxes.XY;
default:
return NONE;
}
}
}
4 changes: 3 additions & 1 deletion source/funkin/game/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Init extends flixel.FlxState

#if VIDEOS_ALLOWED hxvlc.util.Handle.init(#if (hxvlc >= "1.8.0") ['--no-lua'] #end);#end

#if beta owoWatermark(); #end
#if WATERMARK owoWatermark(); #end

funkin.game.objects.Alphabet.AlphaCharacter.loadAlphabetData();

Expand All @@ -52,6 +52,7 @@ class Init extends flixel.FlxState
funkin.game.states.StoryMenuState.weekCompleted = FlxG.save.data.weekCompleted;
}

#if WATERMARK
private function owoWatermark():Void {

// uhh tester text lmao
Expand All @@ -67,6 +68,7 @@ class Init extends flixel.FlxState

Lib.current.addChild(owoTxt);
}
#end
}

class Volume
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/game/options/GameplaySettingsSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class GameplaySettingsSubState extends BaseOptionsMenu
option.changeValue = 0.1;
addOption(option);

var option:Option = new Option('Furry Stuff',
var option:Option = new Option('Weird Stuff',
'erm, owo?',
'gayFurryStuff',
'bool',
Expand Down

0 comments on commit 80d5bd2

Please sign in to comment.