Skip to content

Commit aee16c7

Browse files
StrumLines Fix
1 parent cd9a008 commit aee16c7

File tree

2 files changed

+21
-51
lines changed

2 files changed

+21
-51
lines changed

.github/workflows/builds.yaml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -29,49 +29,6 @@ jobs:
2929
pre_build_commands:
3030
artifact_path: export/32bit/windows/bin
3131

32-
- platform: Nintendo Switch
33-
os: ubuntu-latest
34-
haxe_setup: |
35-
apt-get update
36-
apt-get install -y wget git neko libgc-dev
37-
38-
wget https://github.com/HaxeFoundation/haxe/releases/download/4.3.4/haxe-4.3.4-linux64.tar.gz
39-
mkdir haxe_temp
40-
tar -xf haxe-4.3.4-linux64.tar.gz -C haxe_temp
41-
cp -r haxe_temp/haxe_*/* /usr/local/bin/
42-
43-
mkdir -p ~/haxelib
44-
haxelib --always --quiet setup ~/haxelib
45-
haxelib --global --always --quiet update haxelib
46-
build_cmd: haxelib run lime build Project.xml switch --app-version="4.0.0-${{ github.run_id}}" -D officialBuild
47-
extra_libs: |
48-
dkp-pacman -Sy --noconfirm
49-
50-
dkp-pacman -S --needed --noconfirm \
51-
52-
switch-bzip2 switch-cmake switch-curl switch-flac \
53-
switch-freetype switch-glad switch-glm switch-harfbuzz \
54-
switch-libdrm_nouveau switch-libjpeg-turbo switch-libmodplug \
55-
switch-libogg switch-libopus switch-libpng switch-libvorbis \
56-
switch-libvorbisidec switch-libwebp switch-mesa switch-mpg123 \
57-
switch-openal-soft switch-opusfile switch-pkg-config switch-sdl2 \
58-
switch-sdl2_gfx switch-sdl2_image switch-sdl2_mixer \
59-
switch-sdl2_net switch-sdl2_ttf switch-tools switch-zlib \
60-
switch-liblua51
61-
62-
haxelib --always --quiet install format
63-
haxelib --always --quiet install hxp
64-
haxelib --always --quiet git lime https://github.com/Slushi-Github/lime-nx.git
65-
haxelib --always --quiet git hxcpp https://github.com/Slushi-Github/hxcpp-nx.git
66-
haxelib --always --quiet git hx_libnx https://github.com/Slushi-Github/hx_libnx.git
67-
pre_build_commands: |
68-
cd ~/haxelib/hxcpp/git/tools/hxcpp
69-
haxe compile.hxml
70-
cd -
71-
72-
haxelib run lime rebuild switch
73-
artifact_path: export/release/switch/bin/*.nro
74-
7532
- platform: Linux
7633
os: ubuntu-22.04
7734
haxe_setup:

source/funkin/visuals/game/StrumLine.hx

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class StrumLine extends FlxSpriteGroup
3939

4040
public var scrollSpeed:Float = 1;
4141

42-
public var inputMap:IntMap<Int> = new IntMap();
42+
public var inputMap:IntMap<Array<Int>> = new IntMap();
4343

4444
public final totalStrums:Int;
4545

@@ -108,8 +108,15 @@ class StrumLine extends FlxSpriteGroup
108108
}
109109

110110
for (arrayIndex => array in inputsArray)
111+
{
111112
for (key in array)
112-
inputMap.set(key, arrayIndex);
113+
{
114+
if (!inputMap.exists(key))
115+
inputMap.set(key, []);
116+
117+
inputMap.get(key).push(arrayIndex);
118+
}
119+
}
113120

114121
x = chartData.rightToLeft ? data.position.x : FlxG.width - data.position.x - (data.strums.length - 1) * data.space - strums.members[strums.members.length - 1].width;
115122
y = ClientPrefs.data.downScroll ? FlxG.height - data.position.y - strumHeight : data.position.y;
@@ -201,12 +208,15 @@ class StrumLine extends FlxSpriteGroup
201208
if (botplay)
202209
return;
203210

204-
var strumIndex:Null<Int> = inputMap.get(key);
211+
var strumIndex:Null<Array<Null<Int>>> = inputMap.get(key);
205212

206213
if (strumIndex != null)
207214
{
208-
keyPressed[strumIndex] = true;
209-
keyJustPressed[strumIndex] = true;
215+
for (indices in strumIndex)
216+
{
217+
keyPressed[indices] = true;
218+
keyJustPressed[indices] = true;
219+
}
210220
}
211221
}
212222

@@ -215,12 +225,15 @@ class StrumLine extends FlxSpriteGroup
215225
if (botplay)
216226
return;
217227

218-
var strumIndex:Null<Int> = inputMap.get(key);
228+
var strumIndex:Null<Array<Null<Int>>> = inputMap.get(key);
219229

220230
if (strumIndex != null)
221231
{
222-
keyPressed[strumIndex] = false;
223-
keyJustReleased[strumIndex] = true;
232+
for (indices in strumIndex)
233+
{
234+
keyPressed[indices] = false;
235+
keyJustReleased[indices] = true;
236+
}
224237
}
225238
}
226239

0 commit comments

Comments
 (0)