Skip to content

Commit 6cd8a6b

Browse files
base cne changes and stuffs
1 parent 49d819b commit 6cd8a6b

13 files changed

Lines changed: 56 additions & 41 deletions

File tree

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Uploading artifact (entire build)
4141
uses: actions/upload-artifact@v4
4242
with:
43-
name: Codename Engine
43+
name: Codename Engine-vsbr
4444
path: CodenameEngine.tar.gz
4545
# - name: Uploading artifact (executable)
4646
# uses: actions/upload-artifact@v4

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Uploading artifact (entire build)
3838
uses: actions/upload-artifact@v4
3939
with:
40-
name: Codename Engine
40+
name: Codename Engine-vsbr
4141
path: CodenameEngine.tar.gz
4242
# - name: Uploading artifact (executable)
4343
# uses: actions/upload-artifact@v4

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Uploading artifact (entire build)
3636
uses: actions/upload-artifact@v4
3737
with:
38-
name: Codename Engine
38+
name: Codename Engine-vsbr
3939
path: export/release/windows/bin
4040
# - name: Uploading artifact (executable)
4141
# uses: actions/upload-artifact@v4

project.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
1919
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
2020
<app preloader="flixel.system.FlxPreloader" />
21-
22-
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
2321
<set name="SWF_VERSION" value="11.8" />
2422

2523
<!-- ____________________________ Window Settings ___________________________ -->
@@ -132,7 +130,7 @@
132130
<haxedef name="SOFTCODED_STATES" />
133131

134132
<!-- Comment this out to use the default OpenFL assets system for the assets/ folder. !-->
135-
<haxedef name="USE_ADAPTED_ASSETS" unless="web" />
133+
<haxedef name="USE_ADAPTED_ASSETS" unless="web || mobile" />
136134

137135
<!-- Comment this out to disable support for custom ndlls. !-->
138136
<haxedef name="NDLLS_SUPPORTED" unless="web || iphonesim || hl || mobile" />
@@ -203,6 +201,8 @@
203201
<!-- Fix compiling issues -->
204202
<setenv name="HAXEPATH" value="./"/>
205203

204+
<haxedef name="NO_PRECOMPILED_HEADERS" if="linux" />
205+
206206
<haxedef name="HXCPP_CHECK_POINTER" if="release" />
207207
<haxedef name="HXCPP_STACK_LINE" if="release" />
208208
<haxedef name="HXCPP_DEBUG_LINK" if="release" />

source/funkin/editors/character/CharacterInfoScreen.hx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ class CharacterInfoScreen extends UISubstateWindow {
152152
if (iconSprite == null) add(iconSprite = new HealthIcon());
153153

154154
iconSprite.setIcon(icon);
155-
iconSprite.scale.set(iconSprite.defaultScale * 0.5, iconSprite.defaultScale * 0.5);
155+
var size = Std.int(150 * 0.5);
156+
iconSprite.setUnstretchedGraphicSize(size, size, true);
156157
iconSprite.updateHitbox();
157-
iconSprite.setPosition(iconTextBox.x + 150 + 8, (iconTextBox.y + 16) - (iconSprite.height/2));
158+
iconSprite.setPosition(iconTextBox.x + iconTextBox.bWidth + 8, iconTextBox.y + (iconTextBox.bHeight / 2) - (iconSprite.height / 2));
159+
iconSprite.scrollFactor.set(1, 1);
158160
}
159161

160162
function saveCharacterInfo() {

source/funkin/editors/charter/ChartCreationScreen.hx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ class CompactCharacterButton extends UIButton {
320320
autoAlpha = false;
321321

322322
charIcon = new HealthIcon(funkin.game.Character.getIconFromCharName(char));
323-
charIcon.scale.set(charIcon.defaultScale * 0.2, charIcon.defaultScale * 0.2);
323+
var size = Std.int(150 * 0.2);
324+
charIcon.setUnstretchedGraphicSize(size, size, true);
324325
charIcon.updateHitbox();
325326
charIcon.setPosition(10, bHeight/2 - charIcon.height / 2);
326327
charIcon.scrollFactor.set(1,1);
@@ -333,7 +334,7 @@ class CompactCharacterButton extends UIButton {
333334
textBox.onChange = function(char:String) {
334335
char = funkin.game.Character.getIconFromCharName(char);
335336
charIcon.setIcon(char);
336-
charIcon.scale.set(charIcon.defaultScale * 0.2, charIcon.defaultScale * 0.2);
337+
charIcon.setUnstretchedGraphicSize(size, size, true);
337338
charIcon.updateHitbox();
338339
charIcon.setPosition(10, bHeight/2 - charIcon.height / 2);
339340
}

source/funkin/editors/charter/CharterMetaDataScreen.hx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ class CharterMetaDataScreen extends UISubstateWindow {
133133
function updateIcon(icon:String) {
134134
if (iconSprite == null) add(iconSprite = new HealthIcon());
135135

136-
iconSprite.setIcon(icon);
137-
iconSprite.scale.set(iconSprite.defaultScale * 0.5, iconSprite.defaultScale * 0.5);
136+
iconSprite.setIcon(icon);var size = Std.int(150 * 0.5);
137+
iconSprite.setUnstretchedGraphicSize(size, size, true);
138138
iconSprite.updateHitbox();
139-
iconSprite.setPosition(iconTextBox.x + 150 + 8, (iconTextBox.y + 16) - (iconSprite.height/2));
139+
iconSprite.setPosition(iconTextBox.x + iconTextBox.bWidth + 8, iconTextBox.y + (iconTextBox.bHeight / 2) - (iconSprite.height / 2));
140+
iconSprite.scrollFactor.set(1, 1);
140141
}
141142

142143
public function saveMeta() {

source/funkin/editors/charter/CharterStrumline.hx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,8 @@ class CharterStrumline extends UISprite {
4343

4444
if(strumLine.visible == null) strumLine.visible = true;
4545

46-
var icons = strumLine.characters != null ? strumLine.characters : [];
47-
4846
healthIcons = new FlxSpriteGroup(x, y);
4947

50-
var maxCol = icons.length < 4 ? icons.length : 4;
51-
var maxRow = Math.floor((icons.length-1) / 4) + 1;
52-
for (i=>icon in icons) {
53-
var healthIcon = new HealthIcon(Character.getIconFromCharName(icon));
54-
var newScale = Math.max((0.6 - (icons.length / 20)), 0.35);
55-
healthIcon.scale.x = healthIcon.scale.y = healthIcon.defaultScale * newScale;
56-
healthIcon.updateHitbox();
57-
58-
healthIcon.x = FlxMath.lerp(0, Math.min(icons.length * 20, 120), (maxCol-1 != 0 ? (i % 4) / (maxCol-1) : 0));
59-
healthIcon.y = (draggable ? 29 : 7) + FlxMath.lerp(0, Math.min(maxRow * 15, 60), (maxRow-1 != 0 ? Math.floor(i / 4) / (maxRow-1) : 0));
60-
healthIcon.alpha = strumLine.visible ? 1 : 0.4;
61-
healthIcons.add(healthIcon);
62-
}
63-
6448
members.push(healthIcons);
6549

6650
draggingSprite = new UISprite();
@@ -74,8 +58,7 @@ class CharterStrumline extends UISprite {
7458
button = new CharterStrumlineOptions(this);
7559
members.push(button);
7660

77-
vocals = strumLine.vocalsSuffix.length > 0 ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : new FlxSound();
78-
vocals.group = FlxG.sound.defaultMusicGroup;
61+
updateInfo();
7962

8063
selectedWaveform = -1;
8164
}
@@ -113,7 +96,8 @@ class CharterStrumline extends UISprite {
11396
for (i=>icon in icons) {
11497
var healthIcon = new HealthIcon(Character.getIconFromCharName(icon));
11598
var newScale = Math.max((0.6 - (icons.length / 20)), 0.35);
116-
healthIcon.scale.x = healthIcon.scale.y = healthIcon.defaultScale * newScale;
99+
var size = Std.int(150 * newScale);
100+
healthIcon.setUnstretchedGraphicSize(size, size, true);
117101
healthIcon.updateHitbox();
118102

119103
healthIcon.x = FlxMath.lerp(0, Math.min(icons.length * 20, 120), (maxCol-1 != 0 ? (i % 4) / (maxCol-1) : 0));

source/funkin/editors/charter/CharterStrumlineScreen.hx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ class CharacterButton extends UIButton {
194194
super(x, y, "", null, 250, 54);
195195

196196
charIcon = new HealthIcon(Character.getIconFromCharName(char));
197-
charIcon.scale.set(charIcon.defaultScale * 0.3, charIcon.defaultScale * 0.3);
197+
var size = Std.int(150 * 0.3);
198+
199+
charIcon.setUnstretchedGraphicSize(size, size, true);
198200
charIcon.updateHitbox();
199201
charIcon.setPosition(x + 10, bHeight/2 - charIcon.height / 2);
200202
charIcon.scrollFactor.set(1,1);
@@ -207,7 +209,7 @@ class CharacterButton extends UIButton {
207209
textBox.onChange = function(char:String) {
208210
char = Character.getIconFromCharName(char);
209211
charIcon.setIcon(char);
210-
charIcon.scale.set(charIcon.defaultScale * 0.3, charIcon.defaultScale * 0.3);
212+
charIcon.setUnstretchedGraphicSize(size, size, true);
211213
charIcon.updateHitbox();
212214
charIcon.setPosition(x + 10, bHeight/2 - charIcon.height / 2);
213215
}

source/funkin/editors/charter/SongCreationScreen.hx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ class SongCreationScreen extends UISubstateWindow {
232232
}
233233

234234
function updateIcon(icon:String) {
235-
if (iconSprite == null) add(iconSprite = new HealthIcon());
235+
if (iconSprite == null) menuDataGroup.add(iconSprite = new HealthIcon());
236236

237237
iconSprite.setIcon(icon);
238-
iconSprite.scale.set(iconSprite.defaultScale * 0.5, iconSprite.defaultScale * 0.5);
238+
var size = Std.int(150 * 0.5);
239+
iconSprite.setUnstretchedGraphicSize(size, size, true);
239240
iconSprite.updateHitbox();
240-
iconSprite.setPosition(iconTextBox.x + 150 + 8, (iconTextBox.y + 16) - (iconSprite.height/2));
241+
iconSprite.setPosition(iconTextBox.x + iconTextBox.bWidth + 8, iconTextBox.y + (iconTextBox.bHeight / 2) - (iconSprite.height / 2));
242+
iconSprite.scrollFactor.set(1, 1);
241243
}
242244

243245
function saveSongInfo() {

0 commit comments

Comments
 (0)