From 3884c48cd85907adcf7ea069320930c20364454a Mon Sep 17 00:00:00 2001
From: Halzyn
Date: Thu, 23 Apr 2015 16:06:45 +0200
Subject: Background music & sound for being unable to move
---
app/src/main/res/raw/cantmove.wav | Bin 0 -> 325838 bytes
app/src/main/res/raw/rushhourtune.ogg | Bin 0 -> 1115897 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 app/src/main/res/raw/cantmove.wav
create mode 100644 app/src/main/res/raw/rushhourtune.ogg
(limited to 'app/src/main/res/raw')
diff --git a/app/src/main/res/raw/cantmove.wav b/app/src/main/res/raw/cantmove.wav
new file mode 100644
index 0000000..71e13e6
Binary files /dev/null and b/app/src/main/res/raw/cantmove.wav differ
diff --git a/app/src/main/res/raw/rushhourtune.ogg b/app/src/main/res/raw/rushhourtune.ogg
new file mode 100644
index 0000000..af78588
Binary files /dev/null and b/app/src/main/res/raw/rushhourtune.ogg differ
--
cgit v1.2.3
From 1398210f264e53ec37fdac528a97f96d381c3db0 Mon Sep 17 00:00:00 2001
From: Halzyn
Date: Thu, 23 Apr 2015 16:25:11 +0200
Subject: Replaced audio file with smaller one
---
app/src/main/res/raw/rushhourtune.mp3 | Bin 0 -> 879456 bytes
app/src/main/res/raw/rushhourtune.ogg | Bin 1115897 -> 0 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 app/src/main/res/raw/rushhourtune.mp3
delete mode 100644 app/src/main/res/raw/rushhourtune.ogg
(limited to 'app/src/main/res/raw')
diff --git a/app/src/main/res/raw/rushhourtune.mp3 b/app/src/main/res/raw/rushhourtune.mp3
new file mode 100644
index 0000000..a11c342
Binary files /dev/null and b/app/src/main/res/raw/rushhourtune.mp3 differ
diff --git a/app/src/main/res/raw/rushhourtune.ogg b/app/src/main/res/raw/rushhourtune.ogg
deleted file mode 100644
index af78588..0000000
Binary files a/app/src/main/res/raw/rushhourtune.ogg and /dev/null differ
--
cgit v1.2.3
From 3b6810652184d8efbe93a5964aba4a961bccb61e Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Thu, 23 Apr 2015 16:43:07 +0200
Subject: Background music
---
.idea/libraries/appcompat_v7_22_0_0.xml | 2 +-
.idea/libraries/support_v4_22_0_0.xml | 2 +-
.idea/misc.xml | 101 +++++
.idea/vcs.xml | 1 +
.idea/workspace.xml | 415 +++++++++++++++------
RushHour.iml | 19 -
app/app.iml | 93 -----
.../camilstaps/rushhour/FullscreenActivity.java | 15 +-
app/src/main/res/raw/tune.wav | Bin 0 -> 879488 bytes
gradlew.bat | 0
10 files changed, 403 insertions(+), 245 deletions(-)
delete mode 100644 RushHour.iml
delete mode 100644 app/app.iml
create mode 100644 app/src/main/res/raw/tune.wav
mode change 100644 => 100755 gradlew.bat
(limited to 'app/src/main/res/raw')
diff --git a/.idea/libraries/appcompat_v7_22_0_0.xml b/.idea/libraries/appcompat_v7_22_0_0.xml
index d8a9f53..d59dc81 100644
--- a/.idea/libraries/appcompat_v7_22_0_0.xml
+++ b/.idea/libraries/appcompat_v7_22_0_0.xml
@@ -4,8 +4,8 @@
-
+
diff --git a/.idea/libraries/support_v4_22_0_0.xml b/.idea/libraries/support_v4_22_0_0.xml
index f5c469c..495c01b 100644
--- a/.idea/libraries/support_v4_22_0_0.xml
+++ b/.idea/libraries/support_v4_22_0_0.xml
@@ -1,8 +1,8 @@
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 58ff01f..fdbc761 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,11 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ localhost
+ 5050
+
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index def6a6a..9d32e50 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,6 +2,7 @@
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d00696e..37113f8 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -17,7 +17,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -42,20 +52,28 @@
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -63,6 +81,9 @@
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+ Abstraction issues
+
+
+
+
+
+
-
+
@@ -1357,33 +1394,31 @@
-
+
+
-
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
@@ -1399,6 +1434,10 @@
+
+
+
+
@@ -1444,6 +1483,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1460,6 +1603,12 @@
+
+
+
+
+
+
@@ -1638,7 +1787,6 @@
-
@@ -1660,6 +1808,7 @@
+
@@ -1685,17 +1834,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
@@ -1704,10 +1890,6 @@
-
-
-
-
@@ -1715,7 +1897,6 @@
-
@@ -1723,7 +1904,6 @@
-
@@ -1732,12 +1912,10 @@
-
-
-
-
-
-
+
+
+
+
@@ -1746,10 +1924,6 @@
-
-
-
-
@@ -1757,7 +1931,6 @@
-
@@ -1765,7 +1938,6 @@
-
@@ -1774,12 +1946,10 @@
-
-
-
-
-
-
+
+
+
+
@@ -1788,10 +1958,6 @@
-
-
-
-
@@ -1799,7 +1965,6 @@
-
@@ -1807,7 +1972,6 @@
-
@@ -1816,12 +1980,10 @@
-
-
-
-
-
-
+
+
+
+
@@ -1837,10 +1999,6 @@
-
-
-
-
@@ -1848,7 +2006,6 @@
-
@@ -1856,7 +2013,6 @@
-
@@ -1865,12 +2021,10 @@
-
-
-
-
-
-
+
+
+
+
@@ -1886,10 +2040,6 @@
-
-
-
-
@@ -1897,7 +2047,6 @@
-
@@ -1905,7 +2054,6 @@
-
@@ -1913,7 +2061,6 @@
-
@@ -1921,7 +2068,6 @@
-
@@ -1929,7 +2075,6 @@
-
@@ -1937,7 +2082,6 @@
-
@@ -1945,7 +2089,6 @@
-
@@ -1953,7 +2096,6 @@
-
@@ -1961,7 +2103,6 @@
-
@@ -1969,26 +2110,23 @@
-
-
-
-
-
+
+
+
-
@@ -1996,51 +2134,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 1.7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/RushHour.iml b/RushHour.iml
deleted file mode 100644
index 0bb6048..0000000
--- a/RushHour.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/app.iml b/app/app.iml
deleted file mode 100644
index 9819463..0000000
--- a/app/app.iml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/java/com/camilstaps/rushhour/FullscreenActivity.java b/app/src/main/java/com/camilstaps/rushhour/FullscreenActivity.java
index 495c996..d3e717d 100644
--- a/app/src/main/java/com/camilstaps/rushhour/FullscreenActivity.java
+++ b/app/src/main/java/com/camilstaps/rushhour/FullscreenActivity.java
@@ -22,8 +22,7 @@ import com.camilstaps.rushhour.util.SystemUiHider;
public class FullscreenActivity extends Activity {
private SoundPool soundPool;
- private boolean soundBackgroundLoaded = false;
- private int soundBackgroundId;
+ private int soundBackgroundId, soundCarDriveId;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -49,10 +48,14 @@ public class FullscreenActivity extends Activity {
soundPool.setOnLoadCompleteListener(new SoundPool.OnLoadCompleteListener() {
@Override
public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {
- soundBackgroundLoaded = true;
+ Log.d("FA", "Loaded: " + sampleId);
+ if (sampleId == soundBackgroundId) {
+ soundPool.play(soundBackgroundId, 1, 1, 2, -1, 1);
+ }
}
});
- soundBackgroundId = soundPool.load(this, R.raw.car_drive, 1);
+ soundCarDriveId = soundPool.load(this, R.raw.car_drive, 1);
+ soundBackgroundId = soundPool.load(this, R.raw.tune, 2);
final RelativeLayout boardLayout = (RelativeLayout) findViewById(R.id.board);
ViewTreeObserver vto = boardLayout.getViewTreeObserver();
@@ -67,9 +70,7 @@ public class FullscreenActivity extends Activity {
board.setDriveListener(new DriveListener() {
@Override
public void onDrive() {
- if (soundBackgroundLoaded) {
- soundPool.play(soundBackgroundId, 1, 1, 1, 0, 1f);
- }
+ soundPool.play(soundCarDriveId, 1, 1, 1, 0, 1);
}
});
}
diff --git a/app/src/main/res/raw/tune.wav b/app/src/main/res/raw/tune.wav
new file mode 100644
index 0000000..42b5a42
Binary files /dev/null and b/app/src/main/res/raw/tune.wav differ
diff --git a/gradlew.bat b/gradlew.bat
old mode 100644
new mode 100755
--
cgit v1.2.3