Skip to content

Commit 9e6cac1

Browse files
Switch port
1 parent db79946 commit 9e6cac1

File tree

13 files changed

+390
-6
lines changed

13 files changed

+390
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# A Square Astray
22
A Square Astray is a mobile Android and iOS game. It was built using libgdx, Tiled, and Box2D.
3+
Ported to Switch using [SwitchGDX](https://github.com/TheLogicMaster/switch-gdx).
34

45
### Trailer
56
https://www.youtube.com/watch?v=N2-r2TNHG7A
223 KB
Binary file not shown.

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ allprojects {
2424
version = '1.0'
2525
ext {
2626
appName = "A Square Astray"
27-
gdxVersion = '1.9.10'
27+
gdxVersion = '1.11.0'
2828
roboVMVersion = '2.3.11'
2929
box2DLightsVersion = '1.4'
3030
ashleyVersion = '1.7.0'
3131
aiVersion = '1.8.0'
3232
robopodsVersion = '2.2.3'
3333
gdxPayVersion = '1.3.0'
34+
clearwingVersion = '50a2ddc1cf'
35+
switchGdxVersion = '03f85d000a'
3436
}
3537

3638
repositories {

core/src/com/tendersaucer/asquareastray/AudioManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class AudioManager implements ISettingsChangeListener, IAdListener {
2929
public final Sound teleportSound;
3030
public final Sound gravitySwitchSound;
3131
public final Sound unlockLevelSound;
32+
public final Sound successSound;
33+
public final Sound failureSound;
3234

3335
// These should be treated as sounds
3436
public final Music successMusic;
@@ -57,6 +59,8 @@ public AudioManager() {
5759
teleportSound = AssetManager.getInstance().getSound("teleport");
5860
gravitySwitchSound = AssetManager.getInstance().getSound("gravity_switch");
5961
unlockLevelSound = AssetManager.getInstance().getSound("unlock_level");
62+
successSound = AssetManager.getInstance().getSound("success");
63+
failureSound = AssetManager.getInstance().getSound("failure");
6064

6165
successMusic = AssetManager.getInstance().getMusic("success");
6266
failureMusic = AssetManager.getInstance().getMusic("failure");

core/src/com/tendersaucer/asquareastray/Strings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class Strings {
1313
private I18NBundle bundle;
1414

1515
private Strings() {
16+
I18NBundle.setSimpleFormatter(true);
1617
FileHandle fileHandle = Gdx.files.internal("bundles/bundle");
1718
bundle = I18NBundle.createBundle(fileHandle);
1819
}

core/src/com/tendersaucer/asquareastray/level/Level.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ public void onLevelStateChange(LevelState oldState, LevelState newState) {
133133
}
134134

135135
if (newState.equals(LevelState.DONE_SUCCESS)) {
136-
AudioManager.playMusic(AudioManager.getInstance().successMusic);
136+
AudioManager.playSound(AudioManager.getInstance().successSound);
137137
saveEarnedStars();
138138
} else {
139-
AudioManager.playMusic(AudioManager.getInstance().failureMusic);
139+
AudioManager.playSound(AudioManager.getInstance().failureSound);
140140
}
141141
} else if (newState.equals(LevelState.COUNTDOWN)) {
142142
scheduleLevelStart(COUNTDOWN_SECONDS);

core/src/com/tendersaucer/asquareastray/screen/MainMenuScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void show() {
9191
buildUI();
9292

9393
AudioManager.playMusic(AudioManager.getInstance().music);
94-
AudioManager.playMusic(AudioManager.getInstance().musicSlow, 0);
94+
// AudioManager.playMusic(AudioManager.getInstance().musicSlow, 0);
9595
}
9696

9797
@Override

core/src/com/tendersaucer/asquareastray/utils/FontGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void dispose() {
107107
texRegions.add(new TextureRegion(tex));
108108
}
109109
BitmapFont font = new BitmapFont((BitmapFont.BitmapFontData) fontData, texRegions, false);
110-
saveFontToFile(font, fontSize, fontName, packer);
110+
// saveFontToFile(font, fontSize, fontName, packer);
111111
generator.dispose();
112112
packer.dispose();
113113
return font;

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include 'desktop', 'android', 'ios', 'core'
1+
include 'desktop', 'android', 'ios', 'core', 'switch'

0 commit comments

Comments
 (0)