Skip to content

Commit 6c0bc7f

Browse files
PurSnakeMAJigsaw77
andcommitted
Polish
allowGPU -> allowUncompressedTextures + new argument for funkin.Assets.getBitmapData func Co-Authored-By: Mihai Alexandru <[email protected]>
1 parent 246e996 commit 6c0bc7f

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

source/funkin/Preferences.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Preferences
3434
{
3535
#if desktop
3636
Save.instance.options.vramCaching = value;
37-
openfl.utils.Assets.allowGPU = FunkinMemory.allowVRAMCaching = value;
37+
openfl.utils.Assets.allowUncompressedTextures = FunkinMemory.allowVRAMCaching = value;
3838
Save.instance.flush();
3939
return value;
4040
#else
@@ -542,7 +542,7 @@ class Preferences
542542
#end
543543

544544
#if desktop
545-
openfl.utils.Assets.allowGPU = FunkinMemory.allowVRAMCaching = Preferences.vramCaching;
545+
openfl.utils.Assets.allowUncompressedTextures = FunkinMemory.allowVRAMCaching = Preferences.vramCaching;
546546
#end
547547
}
548548

source/funkin/ui/debug/charting/ChartEditorState.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
26352635
playheadBlock.y = -PLAYHEAD_HEIGHT / 2;
26362636
gridPlayhead.add(playheadBlock);
26372637

2638-
openfl.utils.Assets.allowGPU = false;
2638+
openfl.utils.Assets.allowUncompressedTextures = false;
26392639
// Character icons.
26402640
healthIconDad = new HealthIcon(currentSongMetadata.playData.characters.opponent);
26412641
healthIconDad.autoUpdate = false;
@@ -2650,7 +2650,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
26502650
add(healthIconBF);
26512651
healthIconBF.zIndex = 30;
26522652

2653-
openfl.utils.Assets.allowGPU = FunkinMemory.allowVRAMCaching;
2653+
openfl.utils.Assets.allowUncompressedTextures = FunkinMemory.allowVRAMCaching;
26542654
add(audioWaveforms);
26552655
}
26562656

@@ -5673,7 +5673,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
56735673
{
56745674
if (healthIconsDirty)
56755675
{
5676-
openfl.utils.Assets.allowGPU = false;
5676+
openfl.utils.Assets.allowUncompressedTextures = false;
56775677
var charDataBF = CharacterDataParser.fetchCharacterData(currentSongMetadata.playData.characters.player);
56785678
var charDataDad = CharacterDataParser.fetchCharacterData(currentSongMetadata.playData.characters.opponent);
56795679
if (healthIconBF != null)
@@ -5698,7 +5698,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
56985698
healthIconsDirty = false;
56995699
}
57005700

5701-
openfl.utils.Assets.allowGPU = FunkinMemory.allowVRAMCaching;
5701+
openfl.utils.Assets.allowUncompressedTextures = FunkinMemory.allowVRAMCaching;
57025702
// Right align, and visibly center, the BF health icon.
57035703
if (healthIconBF != null)
57045704
{

source/funkin/ui/debug/charting/dialogs/ChartEditorCharacterIconSelectorMenu.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ChartEditorCharacterIconSelectorMenu extends ChartEditorBaseMenu
4646

4747
function initialize(charType:CharacterType, lockPosition:Bool)
4848
{
49-
openfl.utils.Assets.allowGPU = false;
49+
openfl.utils.Assets.allowUncompressedTextures = false;
5050
currentCharId = switch (charType)
5151
{
5252
case BF: chartEditorState.currentSongMetadata.playData.characters.player;
@@ -137,7 +137,7 @@ class ChartEditorCharacterIconSelectorMenu extends ChartEditorBaseMenu
137137
}
138138

139139
charIconName.text = defaultText;
140-
openfl.utils.Assets.allowGPU = FunkinMemory.allowVRAMCaching;
140+
openfl.utils.Assets.allowUncompressedTextures = FunkinMemory.allowVRAMCaching;
141141
}
142142

143143
public static function build(chartEditorState:ChartEditorState, charType:CharacterType, lockPosition:Bool = false):ChartEditorCharacterIconSelectorMenu

source/funkin/ui/freeplay/backcards/BackingCard.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ class BackingCard extends FlxSpriteGroup implements IBPMSyncedScriptedClass impl
4545

4646
this.currentCharacter = currentCharacter;
4747

48-
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/cardGlow'), false), FreeplayState.CUTOUT_WIDTH);
48+
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/cardGlow'), false, false), FreeplayState.CUTOUT_WIDTH);
4949
cardGlow = new FlxSprite(-30, -30).loadGraphic(bitmap);
5050

5151
confirmGlow = new FlxSprite((FreeplayState.CUTOUT_WIDTH * FreeplayState.DJ_POS_MULTI) + -30, 240).loadGraphic(Paths.image('freeplay/confirmGlow'));
5252
confirmTextGlow = new FlxSprite((FreeplayState.CUTOUT_WIDTH * FreeplayState.DJ_POS_MULTI) + -8, 115).loadGraphic(Paths.image('freeplay/glowingText'));
5353

54-
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/pinkBack'), false), FreeplayState.CUTOUT_WIDTH);
54+
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/pinkBack'), false, false), FreeplayState.CUTOUT_WIDTH);
5555
pinkBack = new FunkinSprite();
5656
pinkBack.loadGraphic(bitmap);
5757

source/funkin/ui/freeplay/backcards/NewCharacterCard.hx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class NewCharacterCard extends BackingCard
130130
friendFoe2 = new BGScrollingText(0, 402, 'COULD IT BE A NEW FRIEND? OR FOE??', FlxG.width, true, 43);
131131
newUnlock3 = new BGScrollingText(0, 458, 'NEW UNLOCK!', FlxG.width / 2, true, 80);
132132

133-
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/darkback'), false),
133+
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/darkback'), false, false),
134134
FreeplayState.CUTOUT_WIDTH);
135135
darkBg = new FlxSprite(0, 0).loadGraphic(bitmap);
136136
add(darkBg);
@@ -159,7 +159,7 @@ class NewCharacterCard extends BackingCard
159159
newUnlock3.speed = 2;
160160
add(newUnlock3);
161161

162-
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/multiplyBar'), false),
162+
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/multiplyBar'), false, false),
163163
FreeplayState.CUTOUT_WIDTH);
164164
multiplyBar = new FlxSprite(-10, 440).loadGraphic(bitmap);
165165
multiplyBar.blend = BlendMode.MULTIPLY;
@@ -170,7 +170,8 @@ class NewCharacterCard extends BackingCard
170170
lightLayer.blend = BlendMode.ADD;
171171
add(lightLayer);
172172

173-
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/red'), false), FreeplayState.CUTOUT_WIDTH);
173+
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/red'), false, false),
174+
FreeplayState.CUTOUT_WIDTH);
174175
multiply1 = new FlxSprite(-15, -125).loadGraphic(bitmap);
175176
multiply1.blend = BlendMode.MULTIPLY;
176177
add(multiply1);
@@ -184,7 +185,7 @@ class NewCharacterCard extends BackingCard
184185
lightLayer2.blend = BlendMode.ADD;
185186
add(lightLayer2);
186187

187-
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/yellow bg piece'), false),
188+
var bitmap = BitmapUtil.scalePartByWidth(Assets.getBitmapData(Paths.image('freeplay/backingCards/newCharacter/yellow bg piece'), false, false),
188189
FreeplayState.CUTOUT_WIDTH);
189190
yellow = new FlxSprite(0, 0).loadGraphic(bitmap);
190191
yellow.blend = BlendMode.MULTIPLY;

0 commit comments

Comments
 (0)