Skip to content

Commit 233de0e

Browse files
doing vs br build
1 parent daeb03f commit 233de0e

15 files changed

Lines changed: 91 additions & 47 deletions

File tree

art/icon16.png

398 Bytes
Loading

art/icon32.png

-1.94 KB
Binary file not shown.

art/icon64.png

-5.04 KB
Binary file not shown.

art/iconOG.png

-64.4 KB
Loading

project.xml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22
<project>
33
<!-- _________________________ Application Settings _________________________ -->
44
<app
5-
title="Friday Night Funkin' - Codename Engine" main="funkin.backend.system.Main"
6-
file="CodenameEngine" packageName="com.yoshman29.codenameengine"
7-
package="com.yoshman29.codenameengine"
8-
version="0.1.0" company="Yoshman29" />
5+
title="fnf vs br" main="funkin.backend.system.Main"
6+
file="VsBrRetoasted" packageName="com.thebrcrew.codenameengine"
7+
package="com.thebrcrew.codenameengine"
8+
version="0.1.0" company="TheBrCrew" />
99

1010
<!--
1111
CHANGE THE SAVE PATH & NAME FOR YOUR MOD HERE!
1212
-->
13-
<app save-path="YoshiCrafter29/CodenameEngine" save-name="save-default" mod-saves="true" />
14-
15-
<!--Switch Export with Unique ApplicationID and Icon-->
16-
<set name="APP_ID" value="0x0100f6c013bbc000" />
13+
<app save-path="TheBrCrew/VsBr" save-name="save-vsbr" mod-saves="true" />
1714

1815
<!-- DO NOT REMOVE!! ALLOWS ME TO DO REGIONS LIKE IN C# AND KEEP CODE ORGANIZED. REMOVING IT WOULD BREAK THE ENGINE -->
1916
<haxedef name="REGION" />
@@ -38,10 +35,7 @@
3835
<window if="mac" allow-high-dpi="true" />
3936

4037
<!--Mobile-specific-->
41-
<window if="mobile" orientation="landscape" fullscreen="true" width="0" height="0" resizable="false"/>
42-
43-
<!--Switch-specific-->
44-
<window if="switch" orientation="landscape" fullscreen="true" width="0" height="0" resizable="true" />
38+
<window if="mobile" orientation="landscape" fullscreen="true" width="1280" height="720" resizable="false"/>
4539

4640
<!-- _____________________________ Path Settings ____________________________ -->
4741

@@ -85,12 +79,13 @@
8579
<!-- _________________________________ Custom _______________________________ -->
8680

8781
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
82+
<icon path="art/icon16.png" size='8'/>
8883
<icon path="art/icon16.png" size='16'/>
89-
<icon path="art/icon32.png" size='24'/>
90-
<icon path="art/icon32.png" size='32'/>
91-
<icon path="art/icon64.png" size='40'/>
92-
<icon path="art/icon64.png" size='48'/>
93-
<icon path="art/icon64.png" size='64'/>
84+
<icon path="art/iconOG.png" size='24'/>
85+
<icon path="art/iconOG.png" size='32'/>
86+
<icon path="art/iconOG.png" size='40'/>
87+
<icon path="art/iconOG.png" size='48'/>
88+
<icon path="art/iconOG.png" size='64'/>
9489
<icon path="art/iconOG.png" size='96' />
9590
<icon path="art/iconOG.png" size='128' />
9691
<icon path="art/iconOG.png" size='196' />
@@ -122,7 +117,7 @@
122117
<define name="CUSTOM_CLASSES" />
123118

124119
<!-- Comment this out to disable multithreading !-->
125-
<haxedef name="ALLOW_MULTITHREADING" unless="web || flash" />
120+
<haxedef name="ALLOW_MULTITHREADING" unless="web || mobile || flash" />
126121

127122
<!-- Comment this out to disable titlescreen.xml !-->
128123
<haxedef name="TITLESCREEN_XML" />
@@ -140,7 +135,7 @@
140135
<haxedef name="USE_ADAPTED_ASSETS" unless="web" />
141136

142137
<!-- Comment this out to disable support for custom ndlls. !-->
143-
<haxedef name="NDLLS_SUPPORTED" unless="web || iphonesim || hl" />
138+
<haxedef name="NDLLS_SUPPORTED" unless="web || iphonesim || hl || mobile" />
144139

145140
<!-- Comment this out to disable support for Away3D Flixel Intergration (reduces compile times)-->
146141
<define name="THREE_D_SUPPORT" />
@@ -162,6 +157,8 @@
162157
<!-- Disable a optimization, to allow reflection to use more functions -->
163158
<define name="FLX_NO_GENERIC" />
164159

160+
<haxedef name="VSBR_BUILD" />
161+
165162
<haxedef name="VIDEO_CUTSCENES" if="VIDEO_CUTSCENES" />
166163
<haxedef name="UPDATE_CHECKING" if="UPDATE_CHECKING" />
167164
<haxedef name="DISCORD_RPC" if="DISCORD_RPC" />
@@ -192,6 +189,7 @@
192189
<haxelib name="hscript-improved" />
193190
<haxelib name="hxdiscord_rpc" if="DISCORD_RPC"/>
194191
<haxelib name="markdown" />
192+
<haxelib name="extension-androidtools" if="android" />
195193

196194
<!-- _________________________________ Additional stuff _______________________________ -->
197195

source/funkin/backend/chart/FNFLegacyParser.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class FNFLegacyParser {
5151
continue; // Yoshi Engine charts crash fix
5252
}
5353

54+
// Update beatsPerMeasure based on sectionBeats (this was never done before and sectionBeats was entirely unused -other nex)
55+
beatsPerMeasure = section.sectionBeats != null ? section.sectionBeats : data.beatsPerMeasure.getDefault(4);
56+
5457
if (camFocusedBF != (camFocusedBF = section.mustHitSection)) {
5558
result.events.push({
5659
time: curTime,

source/funkin/backend/system/Main.hx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package funkin.backend.system;
22

3+
#if android
4+
import android.content.Context;
5+
#elseif ios
6+
import lime.system.System;
7+
#end
38
import funkin.editors.SaveWarning;
49
import funkin.backend.assets.AssetsLibraryList;
510
import funkin.backend.system.framerate.SystemInfo;
@@ -65,6 +70,12 @@ class Main extends Sprite
6570
{
6671
super();
6772

73+
#if android
74+
Sys.setCwd(Context.getExternalFilesDir() + '/');
75+
#elseif ios
76+
Sys.setCwd(System.applicationStorageDirectory);
77+
#end
78+
6879
instance = this;
6980

7081
CrashHandler.init();

source/funkin/backend/system/framerate/CodenameBuildField.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CodenameBuildField extends TextField {
1111
defaultTextFormat = Framerate.textFormat;
1212
autoSize = LEFT;
1313
multiline = wordWrap = false;
14-
text = 'Codename Engine ${Main.releaseCycle}\nCommit ${GitCommitMacro.commitNumber} (${GitCommitMacro.commitHash})';
14+
text = 'Vs. br: Retoasted v1.0 DEV/PLAYTESTER BUILD\nCodename Engine ${Main.releaseCycle}\npls dont leak pls dont leak';
1515
selectable = false;
1616
}
1717
}

source/funkin/editors/character/CharacterEditor.hx

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import funkin.editors.ui.UIContextMenu.UIContextMenuOption;
99
import funkin.game.Character;
1010

1111
class CharacterEditor extends UIState {
12-
static var __character:String;
12+
public static var __character:String;
1313
public var character:Character;
1414

1515
public var ghosts:CharacterGhostsHandler;
@@ -177,6 +177,11 @@ class CharacterEditor extends UIState {
177177
onSelect: _offsets_extra_right,
178178
},
179179
null,
180+
{
181+
label: "Drag Offsets",
182+
onSelect: _offsets_drag_toggle,
183+
icon: Options.characterDragOffsets ? 1 : 0
184+
},
180185
{
181186
label: "Clear Offsets",
182187
keybind: [CONTROL, R],
@@ -274,6 +279,7 @@ class CharacterEditor extends UIState {
274279
//private var camDragSpeed:Float = 1.2;
275280

276281
private var nextScroll:FlxPoint = FlxPoint.get(0,0);
282+
private var prevDragOffsets:FlxPoint = FlxPoint.get(0,0);
277283

278284
public override function update(elapsed:Float) {
279285
super.update(elapsed);
@@ -287,19 +293,25 @@ class CharacterEditor extends UIState {
287293
characterPropertiresWindow.characterInfo.text = '${character.getNameList().length} Animations\nFlipped: ${character.flipX}\nSprite: ${character.sprite}\nAnim: ${character.getAnimName()}\nOffset: (${character.frameOffset.x}, ${character.frameOffset.y})';
288294

289295
if (!(characterPropertiresWindow.hovered || characterAnimsWindow.hovered) && !characterAnimsWindow.dragging) {
290-
if (FlxG.mouse.wheel != 0) {
291-
zoom += 0.25 * FlxG.mouse.wheel;
292-
__camZoom = Math.pow(2, zoom);
293-
}
294-
295-
if (FlxG.mouse.justReleasedRight) {
296-
closeCurrentContextMenu();
297-
openContextMenu(topMenu[2].childs);
296+
if (Options.characterDragOffsets)
297+
{
298+
if (FlxG.mouse.justPressed)
299+
prevDragOffsets = character.animOffsets.get(character.getAnimName()).clone();
300+
301+
if (FlxG.mouse.justReleased)
302+
{
303+
var curOffsets = character.animOffsets.get(character.getAnimName()).clone();
304+
var difference = curOffsets - prevDragOffsets;
305+
undos.addToUndo(CChangeOffset(character.getAnimName(), difference));
306+
}
298307
}
299308
if (FlxG.mouse.pressed) {
300-
nextScroll.set(nextScroll.x - FlxG.mouse.deltaScreenX, nextScroll.y - FlxG.mouse.deltaScreenY);
309+
if (!Options.characterDragOffsets)
310+
nextScroll.set(nextScroll.x - FlxG.mouse.deltaScreenX, nextScroll.y - FlxG.mouse.deltaScreenY);
311+
else
312+
changeOffset(character.getAnimName(), FlxPoint.get(Math.floor(FlxG.mouse.deltaScreenX / character.scale.x * (character.playerOffsets ? 1 : -1)), -Math.floor(FlxG.mouse.deltaScreenY / character.scale.y)), false);
301313
currentCursor = HAND;
302-
} else
314+
} else
303315
currentCursor = ARROW;
304316
} else if (!FlxG.mouse.pressed)
305317
currentCursor = ARROW;
@@ -577,6 +589,10 @@ class CharacterEditor extends UIState {
577589
changeOffset(character.getAnimName(), FlxPoint.get(!character.isFlippedOffsets() ? -5 : 5, 0));
578590
}
579591

592+
function _offsets_drag_toggle(t) {
593+
t.icon = (Options.characterDragOffsets = !Options.characterDragOffsets) ? 1 : 0;
594+
}
595+
580596
function _offsets_clear(_) {
581597
clearOffsets();
582598
}

source/funkin/editors/charter/Charter.hx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ class Charter extends UIState {
117117
{
118118
label: "File",
119119
childs: [
120-
{
121-
label: "New"
122-
},
123-
null,
124120
{
125121
label: "Save",
126122
keybind: [CONTROL, S],

0 commit comments

Comments
 (0)