Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2db8cad
wip shadow subeditor
GreenColdTea Sep 17, 2025
5cf9a19
wip shadow subeditor
GreenColdTea Sep 17, 2025
bdb0f48
blyat
GreenColdTea Sep 17, 2025
5058236
blyat
GreenColdTea Sep 17, 2025
c8f2e85
Merge branch 'main' into dev
GreenColdTea Sep 17, 2025
dd0860b
chart editor mem leak fixes
GreenColdTea Sep 19, 2025
4f9adcb
fuck it
GreenColdTea Sep 20, 2025
2cb60f0
loading screen update
GreenColdTea Sep 21, 2025
c780521
lol
GreenColdTea Sep 21, 2025
e142d99
this too
GreenColdTea Sep 21, 2025
767710e
lol
GreenColdTea Sep 23, 2025
aa39cb1
another update
GreenColdTea Sep 23, 2025
6025101
fps counter update
GreenColdTea Sep 24, 2025
d11ca82
another fix
GreenColdTea Sep 24, 2025
e9c5f7d
scripting fixes and vsync
GreenColdTea Sep 28, 2025
4ced6bd
oops
GreenColdTea Sep 29, 2025
84c3f90
yep nahui
GreenColdTea Oct 1, 2025
233f495
modchart system lessgooo
GreenColdTea Oct 2, 2025
d0f8a4b
lol
GreenColdTea Oct 2, 2025
41fe0f7
bleh
GreenColdTea Oct 2, 2025
07ba659
middle scroll fix
GreenColdTea Oct 3, 2025
9ca39ff
yey
GreenColdTea Oct 7, 2025
98f5259
mods system remake
GreenColdTea Oct 8, 2025
83e3990
i forgor
GreenColdTea Oct 8, 2025
aed8842
fuh
GreenColdTea Oct 8, 2025
9d0b8fe
fixed mod system and separating lua funcs
GreenColdTea Oct 9, 2025
c08bedf
+ bug fixes
GreenColdTea Oct 10, 2025
363ad17
lol
GreenColdTea Oct 10, 2025
b6dd96b
idk lol
GreenColdTea Oct 14, 2025
749ae68
oops i forgor
GreenColdTea Oct 14, 2025
7167978
and this
GreenColdTea Oct 14, 2025
b2468fd
bruh
GreenColdTea Oct 14, 2025
e7bb097
nessecary imports
GreenColdTea Oct 14, 2025
c2247f8
peam
GreenColdTea Oct 14, 2025
3d15223
fixes for global scripts for mods
GreenColdTea Oct 14, 2025
fd1682b
Mobile ahh preprocessor
GreenColdTea Oct 15, 2025
45d2092
bruh
GreenColdTea Oct 15, 2025
021374d
fix
GreenColdTea Oct 16, 2025
11f72c2
gyatt
GreenColdTea Oct 16, 2025
992ab83
stfu
GreenColdTea Oct 16, 2025
99ffb7f
preprocessors
GreenColdTea Oct 16, 2025
5c09943
added "setShaderCamera" lua function
GreenColdTea Oct 16, 2025
0eb8e5b
lol
GreenColdTea Oct 16, 2025
1f00778
bug fixes in character editor
GreenColdTea Oct 19, 2025
5094e8b
hmmmm
GreenColdTea Oct 19, 2025
f371c8e
song sync fixes
GreenColdTea Oct 21, 2025
7ae9baf
main menu rewrite
GreenColdTea Oct 21, 2025
b7019aa
menus rewriting
GreenColdTea Oct 21, 2025
e186ba3
blah blah blah
GreenColdTea Oct 21, 2025
c4e625f
more luaDebugMode
GreenColdTea Oct 21, 2025
c20eaf3
ok
GreenColdTea Oct 21, 2025
4b1f197
a lil bit of fixing
GreenColdTea Oct 22, 2025
683f0ee
grrr
GreenColdTea Oct 23, 2025
beb140d
chart editor bug fixes
GreenColdTea Oct 23, 2025
a913930
another bug fixes
GreenColdTea Oct 26, 2025
ea7bc01
oopsie
GreenColdTea Oct 27, 2025
b14bce6
some lil stuff
GreenColdTea Oct 28, 2025
ad7f95d
added separated cameras for substates and pause menu, fixed some crit…
GreenColdTea Oct 28, 2025
2b59be9
hxopus support
GreenColdTea Oct 30, 2025
1f7ae76
that one fucking symbol
GreenColdTea Oct 30, 2025
e2b5b71
added flixel-waveform
GreenColdTea Nov 2, 2025
ec334ad
moved to hxluajit and "unlimited" fps option
GreenColdTea Nov 2, 2025
e9812f2
now this is truly unlimited fps moment
GreenColdTea Nov 3, 2025
7664037
new lua boolean variable 'luaDebugPropertyTraces'
GreenColdTea Nov 3, 2025
4a53db5
smth for cameraFlash
GreenColdTea Nov 3, 2025
3703bfa
bruh
GreenColdTea Nov 3, 2025
0db04d5
some fixes and prepare for 0.3.0
GreenColdTea Nov 3, 2025
7d7456d
peam
GreenColdTea Nov 3, 2025
9460153
sustain note clipRect fix for non MODCHART_ALLOWED flag
GreenColdTea Nov 3, 2025
9a0a8ee
lol
GreenColdTea Nov 3, 2025
2353a6e
bom bom kla
GreenColdTea Nov 3, 2025
75aa65d
yep
GreenColdTea Nov 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 30 additions & 26 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->

<app title="Friday Night Funkin': CorruptCore Engine" file="CorruptCore" packageName="com.justin.corruptcore" package="com.justin.corruptcore" main="Main" version="0.2.0" company="JustX" />
<app title="Friday Night Funkin': CorruptCore Engine" file="CorruptCore" packageName="com.justin.corruptcore" package="com.justin.corruptcore" main="Main" version="0.3.0" company="JustX" />

<!--Switch Export with Unique ApplicationID and Icon-->
<set name="APP_ID" value="0x0100f6c013bbc000" />
Expand All @@ -21,10 +21,10 @@
<!-- ____________________________ Window Settings ___________________________ -->

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

<!--HTML5-specific-->
<window if="html5" resizable="true" />
<window if="html5" resizable="true" vsync="true" />

<!--Desktop-specific-->
<window if="desktop" orientation="landscape" fullscreen="false" resizable="true" vsync="false"/>
Expand All @@ -33,7 +33,7 @@
<window if="mobile" orientation="landscape" fullscreen="true" width="1280" height="720" resizable="false" allow-shaders="true" require-shaders="true"/>

<!--Switch-specific-->
<window if="switch" orientation="landscape" fullscreen="true" width="0" height="0" resizable="true" />
<window if="switch" orientation="landscape" fullscreen="true" width="1280" height="720" resizable="true" />

<!-- _____________________________ Path Settings ____________________________ -->

Expand All @@ -56,12 +56,12 @@
<define name="MODS_ALLOWED" if="desktop" />
<define name="LUA_ALLOWED" if="cpp" />
<define name="HSCRIPT_ALLOWED" />
<!--<define name="MODCHART_ALLOWED" />--> <!-- disabled for now-->
<define name="DISCORD_ALLOWED" if="desktop" unless="hl"/>
<define name="ACHIEVEMENTS_ALLOWED" />
<define name="VIDEOS_ALLOWED" if="desktop || mobile" unless="hl"/>
<define name="MODCHART_ALLOWED" />
<define name="DISCORD_ALLOWED" if="desktop cpp" />
<!--<define name="ACHIEVEMENTS_ALLOWED" />--> <!-- Not neccesary -->
<define name="VIDEOS_ALLOWED" if="cpp" />
<define name="TITLE_SCREEN_EASTER_EGG" if="officialBuild" /> <!-- DELETE THE if="officialBuild" for enabling this on an unofficial build -->
<define name="CRASH_HANDLER" unless="debug" />
<define name="CRASH_HANDLER" />

<section if="HSCRIPT_ALLOWED">
<define name="SCRIPTABLE_STATES" /> <!-- Adds haxe scripting support to the menus (need to enable HSCRIPT_ALLOWED)! -->
Expand All @@ -73,6 +73,7 @@

<assets path="assets/preload" rename="assets" exclude="*.ogg" if="web"/>
<assets path="assets/preload" rename="assets" exclude="*.mp3" unless="web"/>

<section if="TITLE_SCREEN_EASTER_EGG">
<assets path="assets/secrets" rename="assets" exclude="*.ogg" if="web"/>
<assets path="assets/secrets" rename="assets" exclude="*.mp3" unless="web"/>
Expand Down Expand Up @@ -102,12 +103,14 @@
<assets path="assets/shared" library="shared" exclude="*.ogg" if="web"/>
<assets path="assets/shared" library="shared" exclude="*.mp3" unless="web"/>

<assets path="assets/week6_sfx" rename="assets" exclude="*.ogg" if="web"/>
<assets path="assets/week6_sfx" rename="assets" exclude="*.mp3" unless="web"/>

<section if="MODS_ALLOWED">
<assets path='contents_file' rename='contents' embed='false'/>
</section>

<section if="INCLUDE_BASE_GAME">
<assets path="base_game" rename="contents/base_game" exclude="*.ogg" if="web"/>
<assets path="base_game" rename="contents/base_game" exclude="*.mp3" unless="web"/>
</section>
<!-- <template path='mods' /> -->

<assets path="psych-ui" library="psych-ui" rename="assets/psych-ui" embed="true" />
Expand All @@ -124,7 +127,7 @@
<assets path="assets/embed/sounds" rename="assets/sounds" embed='true'/>
<!-- _______________________________ Libraries ______________________________ -->

<haxelib name="flixel" version="6.1.0"/>
<haxelib name="flixel" version="6.1.1"/>
<haxedev set='webgl'/>

<!--<haxelib name="flixel-ui" /> fuck this shit ass creation-->
Expand All @@ -134,7 +137,8 @@
<haxelib name="tjson" />

<!--In case you want to use the ui package-->
<haxelib name="linc_luajit" if="LUA_ALLOWED"/>
<haxelib name="hxluajit" if="LUA_ALLOWED"/>
<haxelib name="hxluajit-wrapper" if="LUA_ALLOWED"/>
<haxelib name="hxvlc" if="VIDEOS_ALLOWED"/>
<haxelib name="hxdiscord_rpc" if="DISCORD_ALLOWED"/>
<haxelib name="faxe" if="switch"/>
Expand All @@ -145,16 +149,18 @@
<haxedef name="hscriptPos" />

<haxelib name="flixel-animate"/>
<haxelib name="flxsoundfilters" unless="flash || html5 || hl"/>
<haxelib name="flixel-waveform"/>
<haxelib name="flxsoundfilters" if="cpp"/>
<haxelib name="flxgif"/>
<haxelib name="hxcpp"/>

<haxelib name="away3d" />

<section if="cpp">
<haxelib name="sl-windows-api" if="windows" />
<haxelib name="hxopus" />
</section>

<haxelib name="funkin-modchart" if="MODCHART_ALLOWED"/>

<!-- Disable Discord IO Thread -->
<haxedef name="DISCORD_DISABLE_IO_THREAD" if="hxdiscord_rpc" />
<haxedef name="NO_PRECOMPILED_HEADERS" if="linux" />
Expand All @@ -179,16 +185,11 @@
<haxedef name="HXVLC_OPENAL" />
</section>

<section if="funkin-modchart">
<haxedef name="FM_ENGINE" value="PSYCH"/>
<haxedef name="FM_ENGINE_VERSION" value="0.6"/>

<haxeflag name="--macro" value="modchart.backend.macros.Macro.includeFiles()"/>
</section>

<!-- Basically Allows Videos To Render In Higher Quality On Higher Resoluttions -->
<haxedef name="openfl_dpi_aware" unless="web" />

<haxedef name='lime_disable_assets_version'/>

<!--Enable the Flixel core recording system-->
<!--<haxedef name="FLX_RECORD" />-->

Expand Down Expand Up @@ -234,6 +235,9 @@

<haxeflag name="--macro" value="game.backend.utils.MacroUtil.addScriptResources()" />

<!-- Disable Dead Code Elimination, because it breaks some stuff for scripting -->
<haxeflag name="-dce" value="no" if="HSCRIPT_ALLOWED || LUA_ALLOWED"/>

<!-- _________________________________ Custom _______________________________ -->

<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
Expand All @@ -245,10 +249,10 @@

<!--Code Cleanup and Full Compile of Classes-->
<haxeflag name="--macro" value="allowPackage('flash')" />
<haxeflag name="--macro" value="include('hxvlc')" />
<haxeflag name="--macro" value="include('hxvlc')" if="VIDEOS_ALLOWED"/>

<!--Analyzer Optimization-->
<haxedef name="analyzer-optimize" />
<haxedef name="analyzer-optimize" unless="HSCRIPT_ALLOWED || LUA_ALLOWED"/>

<haxedef name='no-deprecation-warnings' />

Expand Down
Binary file modified art/flashFiles/FNF_main_menu_assets.fla
Binary file not shown.
192 changes: 192 additions & 0 deletions art/unused stuff/FunkinText.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
package game.objects;

import flixel.text.FlxText;
import flixel.FlxCamera;
import flixel.math.FlxPoint;
import flixel.util.FlxColor;

/**
* Enhanced FlxText with fixes for character clipping and rendering issues
*/
class FunkinText extends FlxText
{
/**
* Enable pixel-perfect alignment to prevent sub-pixel positioning artifacts
*/
public var pixelPerfect:Bool = true;

/**
* Additional font metrics correction for fonts with unusual character bounds
*/
public var fontMetricsCorrection:Float = 0;

/**
* Horizontal gutter to prevent character clipping on sides
*/
static inline var HORIZONTAL_GUTTER:Int = 4;

/**
* Vertical gutter to prevent character clipping on top/bottom
*/
static inline var VERTICAL_GUTTER:Int = 8;

/**
* Creates a new FunkinText object with enhanced rendering
*
* @param X The x position of the text
* @param Y The y position of the text
* @param FieldWidth The width of the text object
* @param Text The actual text to display initially
* @param Size The font size for this text object
* @param EmbeddedFont Whether this text field uses embedded fonts
*/
public function new(X:Float = 0, Y:Float = 0, FieldWidth:Float = 0, ?Text:String, Size:Int = 8, EmbeddedFont:Bool = true)
{
super(X, Y, FieldWidth, Text, Size, EmbeddedFont);

// Apply additional horizontal padding by default
if (FieldWidth > 0)
{
this.fieldWidth = FieldWidth + HORIZONTAL_GUTTER;
}
}

/**
* Regenerate the text graphic with applied fixes
*/
override function regenGraphic():Void
{
// Apply font metrics correction before regeneration
if (fontMetricsCorrection != 0 && _autoHeight && textField != null)
{
textField.height = textField.textHeight + fontMetricsCorrection;
}

super.regenGraphic();
}

/**
* Override drawSimple to apply pixel-perfect positioning
*/
override function drawSimple(camera:FlxCamera):Void
{
getScreenPosition(_point, camera).subtract(offset).subtract(_graphicOffset);

if (pixelPerfect && isPixelPerfectRender(camera))
{
_point.x = Math.floor(_point.x);
_point.y = Math.floor(_point.y);
}

_point.copyTo(_flashPoint);
camera.copyPixels(_frame, framePixels, _flashRect, _flashPoint, colorTransform, blend, antialiasing);
}

/**
* Override drawComplex to apply pixel-perfect positioning
*/
override function drawComplex(camera:FlxCamera):Void
{
_frame.prepareMatrix(_matrix, ANGLE_0, checkFlipX(), checkFlipY());
_matrix.translate(-origin.x, -origin.y);
_matrix.scale(scale.x, scale.y);

if (bakedRotationAngle <= 0)
{
updateTrig();

if (angle != 0)
_matrix.rotateWithTrig(_cosAngle, _sinAngle);
}

getScreenPosition(_point, camera).subtract(offset).subtract(_graphicOffset);
_point.add(origin.x, origin.y);
_matrix.translate(_point.x, _point.y);

if (pixelPerfect && isPixelPerfectRender(camera))
{
_matrix.tx = Math.floor(_matrix.tx);
_matrix.ty = Math.floor(_matrix.ty);
}

camera.drawPixels(_frame, framePixels, _matrix, colorTransform, blend, antialiasing, shader);
}

/**
* Apply preset configurations for different font types
*
* @param preset The font preset to apply
* @return This FunkinText instance (for chaining)
*/
public function setFontPreset(preset:FontPreset):FunkinText
{
switch(preset)
{
case PIXEL:
// Optimal for pixel fonts - disable antialiasing, enable pixel perfection
pixelPerfect = true;
fontMetricsCorrection = 2;

case SMOOTH:
// Optimal for smooth vector fonts - enable antialiasing, disable pixel perfection
pixelPerfect = false;
fontMetricsCorrection = 0;

case CLEAR:
// Balanced preset - enable both antialiasing and pixel perfection
pixelPerfect = true;
fontMetricsCorrection = 1;
}
_regen = true;
return this;
}

/**
* Set custom gutters for precise control over text padding
*
* @param horizontal Horizontal gutter size
* @param vertical Vertical gutter size
* @return This FunkinText instance (for chaining)
*/
public function setCustomGutters(horizontal:Int, vertical:Int):FunkinText
{
// Note: This would require overriding more internal methods to take effect
// For now, it serves as a reminder for future enhancements
return this;
}

/**
* Enable or disable pixel-perfect rendering
*
* @param value Whether to enable pixel-perfect rendering
* @return This FunkinText instance (for chaining)
*/
public function setPixelPerfect(value:Bool):FunkinText
{
pixelPerfect = value;
return this;
}

/**
* Set font metrics correction value
*
* @param correction Additional height correction for problematic fonts
* @return This FunkinText instance (for chaining)
*/
public function setFontMetricsCorrection(correction:Float):FunkinText
{
fontMetricsCorrection = correction;
_regen = true;
return this;
}
}

/**
* Font presets for different rendering requirements
*/
enum FontPreset
{
PIXEL; // For pixel fonts - crisp rendering without antialiasing
SMOOTH; // For smooth vector fonts - best quality with antialiasing
CLEAR; // Balanced preset - good for most use cases
}
Loading
Loading