diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..36de7ba
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..4c7a50f
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
+
+
+ EngineWrapper
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..f755666
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/back_btn.png b/assets/back_btn.png
new file mode 100644
index 0000000..4176c8b
Binary files /dev/null and b/assets/back_btn.png differ
diff --git a/assets/ball.png b/assets/ball.png
new file mode 100644
index 0000000..4a2cfc5
Binary files /dev/null and b/assets/ball.png differ
diff --git a/assets/ball_glow.png b/assets/ball_glow.png
new file mode 100644
index 0000000..5fc1138
Binary files /dev/null and b/assets/ball_glow.png differ
diff --git a/assets/block1.png b/assets/block1.png
new file mode 100644
index 0000000..8cd98ae
Binary files /dev/null and b/assets/block1.png differ
diff --git a/assets/block2.png b/assets/block2.png
new file mode 100644
index 0000000..d38c770
Binary files /dev/null and b/assets/block2.png differ
diff --git a/assets/block3.png b/assets/block3.png
new file mode 100644
index 0000000..2faf8e7
Binary files /dev/null and b/assets/block3.png differ
diff --git a/assets/bonus_floor.png b/assets/bonus_floor.png
new file mode 100644
index 0000000..58648e9
Binary files /dev/null and b/assets/bonus_floor.png differ
diff --git a/assets/bonus_gothrough.png b/assets/bonus_gothrough.png
new file mode 100644
index 0000000..a7eb20c
Binary files /dev/null and b/assets/bonus_gothrough.png differ
diff --git a/assets/bonus_multiplier.png b/assets/bonus_multiplier.png
new file mode 100644
index 0000000..4efbc80
Binary files /dev/null and b/assets/bonus_multiplier.png differ
diff --git a/assets/brickshader_fragment.txt b/assets/brickshader_fragment.txt
new file mode 100644
index 0000000..ab2ef56
--- /dev/null
+++ b/assets/brickshader_fragment.txt
@@ -0,0 +1,15 @@
+precision mediump float;
+uniform sampler2D Texture;
+uniform float Transparency;
+uniform vec4 BrickColor;
+varying vec2 texCoord;
+
+void main()
+{
+ vec4 color = BrickColor * texture2D(Texture,texCoord).rgba;
+
+ gl_FragColor = vec4(color.rgb, color.a * Transparency);
+
+
+
+}
\ No newline at end of file
diff --git a/assets/brickshader_vertex.txt b/assets/brickshader_vertex.txt
new file mode 100644
index 0000000..72d9f46
--- /dev/null
+++ b/assets/brickshader_vertex.txt
@@ -0,0 +1,12 @@
+attribute vec3 vPosition;
+attribute vec2 vTexCoord;
+varying vec2 texCoord;
+
+uniform mat4 ProjectionMatrix;
+
+void main()
+{
+ //480x320
+ gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
+ texCoord = vTexCoord;
+}
\ No newline at end of file
diff --git a/assets/console_bkg.bmp b/assets/console_bkg.bmp
new file mode 100644
index 0000000..d32ee4c
Binary files /dev/null and b/assets/console_bkg.bmp differ
diff --git a/assets/credits.png b/assets/credits.png
new file mode 100644
index 0000000..6debee7
Binary files /dev/null and b/assets/credits.png differ
diff --git a/assets/droid_sans14_font_bitmap.png b/assets/droid_sans14_font_bitmap.png
new file mode 100644
index 0000000..b7d1985
Binary files /dev/null and b/assets/droid_sans14_font_bitmap.png differ
diff --git a/assets/droid_sans14_font_charmap.txt b/assets/droid_sans14_font_charmap.txt
new file mode 100644
index 0000000..f17cd0b
--- /dev/null
+++ b/assets/droid_sans14_font_charmap.txt
@@ -0,0 +1,95 @@
+32 0.00976562 0.0195312 0 0.0546875 0 0 0.0078125
+49 0.0195312 0.0195312 0.00390625 0.015625 0.0078125 0.0390625 0.015625
+50 0.0371094 0.0195312 0.00195312 0.015625 0.0136719 0.0390625 0.015625
+51 0.0605469 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+52 0.0820312 0.0195312 0.00195312 0.015625 0.0136719 0.0390625 0.015625
+53 0.105469 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+54 0.126953 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+55 0.148438 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+56 0.169922 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+57 0.191406 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+48 0.212891 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+97 0.234375 0.0195312 0.00195312 0.0234375 0.00976562 0.03125 0.0136719
+98 0.253906 0.0195312 0.00195312 0.0117188 0.0117188 0.0429688 0.015625
+99 0.275391 0.0195312 0.00195312 0.0234375 0.00976562 0.03125 0.0136719
+100 0.294922 0.0195312 0.00195312 0.0117188 0.0117188 0.0429688 0.015625
+101 0.316406 0.0195312 0.00195312 0.0234375 0.0117188 0.03125 0.015625
+102 0.337891 0.0195312 0 0.0117188 0.00976562 0.0429688 0.0078125
+103 0.357422 0.0195312 0.00195312 0.0234375 0.0136719 0.0429688 0.0136719
+104 0.380859 0.0195312 0.00195312 0.0117188 0.0117188 0.0429688 0.015625
+105 0.402344 0.0195312 0 0.0117188 0.00585938 0.0429688 0.0078125
+106 0.417969 0.0195312 -0.00195312 0.0117188 0.0078125 0.0546875 0.0078125
+107 0.435547 0.0195312 0.00195312 0.0117188 0.0136719 0.0429688 0.0136719
+108 0.458984 0.0195312 0.00195312 0.0117188 0.00390625 0.0429688 0.0078125
+109 0.472656 0.0195312 0.00195312 0.0234375 0.0214844 0.03125 0.0253906
+110 0.503906 0.0195312 0.00195312 0.0234375 0.0117188 0.03125 0.015625
+111 0.525391 0.0195312 0.00195312 0.0234375 0.0117188 0.03125 0.015625
+112 0.546875 0.0195312 0.00195312 0.0234375 0.0117188 0.0429688 0.015625
+113 0.568359 0.0195312 0.00195312 0.0234375 0.0117188 0.0429688 0.015625
+114 0.589844 0.0195312 0.00195312 0.0234375 0.0078125 0.03125 0.00976562
+115 0.607422 0.0195312 0 0.0234375 0.0117188 0.03125 0.0136719
+116 0.628906 0.0195312 0 0.015625 0.00976562 0.0390625 0.00976562
+117 0.648438 0.0195312 0.00195312 0.0234375 0.0117188 0.03125 0.015625
+118 0.669922 0.0195312 -0.00195312 0.0234375 0.0175781 0.03125 0.0136719
+119 0.697266 0.0195312 -0.00195312 0.0234375 0.0234375 0.03125 0.0195312
+120 0.730469 0.0195312 0 0.0234375 0.0136719 0.03125 0.0136719
+121 0.753906 0.0195312 -0.00195312 0.0234375 0.0175781 0.0429688 0.0136719
+122 0.78125 0.0195312 0.00195312 0.0234375 0.0117188 0.03125 0.0136719
+65 0.802734 0.0195312 -0.00195312 0.015625 0.0214844 0.0390625 0.0175781
+66 0.833984 0.0195312 0.00195312 0.015625 0.0136719 0.0390625 0.0175781
+67 0.857422 0.0195312 0.00195312 0.015625 0.0136719 0.0390625 0.015625
+68 0.880859 0.0195312 0.00195312 0.015625 0.015625 0.0390625 0.0195312
+69 0.90625 0.0195312 0.00195312 0.015625 0.00976562 0.0390625 0.0136719
+70 0.925781 0.0195312 0.00195312 0.015625 0.0117188 0.0390625 0.0136719
+71 0.947266 0.0195312 0.00195312 0.015625 0.015625 0.0390625 0.0195312
+72 0.00976562 0.09375 0.00195312 0.015625 0.015625 0.0390625 0.0195312
+73 0.0351562 0.09375 0 0.015625 0.00976562 0.0390625 0.00976562
+74 0.0546875 0.09375 -0.00390625 0.015625 0.00976562 0.0507812 0.00585938
+75 0.0742188 0.09375 0.00195312 0.015625 0.015625 0.0390625 0.015625
+76 0.0996094 0.09375 0.00195312 0.015625 0.0117188 0.0390625 0.0136719
+77 0.121094 0.09375 0.00195312 0.015625 0.0195312 0.0390625 0.0234375
+78 0.150391 0.09375 0.00195312 0.015625 0.015625 0.0390625 0.0195312
+79 0.175781 0.09375 0.00195312 0.015625 0.0175781 0.0390625 0.0214844
+80 0.203125 0.09375 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+81 0.224609 0.09375 0.00195312 0.015625 0.0175781 0.046875 0.0214844
+82 0.251953 0.09375 0.00195312 0.015625 0.0136719 0.0390625 0.015625
+83 0.275391 0.09375 0 0.015625 0.0136719 0.0390625 0.0136719
+84 0.298828 0.09375 0 0.015625 0.0136719 0.0390625 0.0136719
+85 0.322266 0.09375 0.00195312 0.015625 0.015625 0.0390625 0.0195312
+86 0.347656 0.09375 -0.00195312 0.015625 0.0195312 0.0390625 0.015625
+87 0.376953 0.09375 -0.00195312 0.015625 0.0292969 0.0390625 0.0253906
+88 0.416016 0.09375 -0.00195312 0.015625 0.0195312 0.0390625 0.015625
+89 0.445312 0.09375 -0.00195312 0.015625 0.0175781 0.0390625 0.0136719
+90 0.472656 0.09375 0.00195312 0.015625 0.0117188 0.0390625 0.015625
+46 0.494141 0.09375 0.00195312 0.046875 0.00390625 0.0078125 0.0078125
+44 0.507812 0.09375 0.00195312 0.046875 0.00390625 0.0117188 0.0078125
+58 0.521484 0.09375 0.00195312 0.0234375 0.00390625 0.03125 0.0078125
+59 0.535156 0.09375 0.00195312 0.0234375 0.00390625 0.0351562 0.0078125
+64 0.548828 0.09375 0.00195312 0.015625 0.0195312 0.0429688 0.0234375
+35 0.578125 0.09375 0 0.015625 0.015625 0.0390625 0.0175781
+36 0.603516 0.09375 0.00195312 0.0117188 0.0117188 0.046875 0.015625
+37 0.625 0.09375 0.00195312 0.015625 0.0195312 0.0390625 0.0234375
+94 0.654297 0.09375 0 0.015625 0.0136719 0.0234375 0.0136719
+38 0.677734 0.09375 0.00195312 0.015625 0.0175781 0.0390625 0.0195312
+42 0.705078 0.09375 0 0.0117188 0.0136719 0.0234375 0.015625
+33 0.728516 0.09375 0.00195312 0.015625 0.00390625 0.0390625 0.0078125
+63 0.742188 0.09375 0 0.015625 0.00976562 0.0390625 0.0117188
+40 0.761719 0.09375 0.00195312 0.015625 0.0078125 0.046875 0.0078125
+41 0.779297 0.09375 0 0.015625 0.00585938 0.046875 0.0078125
+91 0.794922 0.09375 0.00195312 0.015625 0.00585938 0.046875 0.0078125
+93 0.810547 0.09375 0 0.015625 0.00585938 0.046875 0.0078125
+123 0.826172 0.09375 0 0.015625 0.00976562 0.046875 0.00976562
+125 0.845703 0.09375 0 0.015625 0.00976562 0.046875 0.00976562
+60 0.865234 0.09375 0.00195312 0.0234375 0.0117188 0.0273438 0.015625
+62 0.886719 0.09375 0.00195312 0.0234375 0.0117188 0.0273438 0.015625
+95 0.908203 0.09375 0 0.0585938 0.0117188 0.00390625 0.0117188
+45 0.929688 0.09375 0.00195312 0.0390625 0.00585938 0.0078125 0.00976562
+43 0.945312 0.09375 0 0.0234375 0.0136719 0.0273438 0.015625
+61 0.00976562 0.167969 0 0.0273438 0.0136719 0.0195312 0.015625
+124 0.0332031 0.167969 0.00585938 0.0117188 0.00390625 0.0546875 0.0136719
+92 0.046875 0.167969 -0.00195312 0.015625 0.0136719 0.0390625 0.00976562
+47 0.0703125 0.167969 -0.00195312 0.015625 0.0136719 0.0390625 0.00976562
+126 0.09375 0.167969 0.00195312 0.03125 0.0117188 0.0117188 0.015625
+96 0.115234 0.167969 0.00585938 0.0117188 0.00585938 0.0078125 0.015625
+34 0.130859 0.167969 0.00195312 0.015625 0.00976562 0.015625 0.0117188
+39 0.150391 0.167969 0.00195312 0.015625 0.00390625 0.015625 0.00585938
\ No newline at end of file
diff --git a/assets/frameshader_fragment.txt b/assets/frameshader_fragment.txt
new file mode 100644
index 0000000..2781075
--- /dev/null
+++ b/assets/frameshader_fragment.txt
@@ -0,0 +1,12 @@
+precision mediump float;
+uniform sampler2D Texture;
+uniform float Brightness;
+varying vec2 texCoord;
+
+void main()
+{
+ vec3 color = texture2D(Texture,texCoord).rgb;
+
+ gl_FragColor = vec4(color * Brightness, 1.0);
+
+}
\ No newline at end of file
diff --git a/assets/frameshader_vertex.txt b/assets/frameshader_vertex.txt
new file mode 100644
index 0000000..72d9f46
--- /dev/null
+++ b/assets/frameshader_vertex.txt
@@ -0,0 +1,12 @@
+attribute vec3 vPosition;
+attribute vec2 vTexCoord;
+varying vec2 texCoord;
+
+uniform mat4 ProjectionMatrix;
+
+void main()
+{
+ //480x320
+ gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
+ texCoord = vTexCoord;
+}
\ No newline at end of file
diff --git a/assets/game_end.png b/assets/game_end.png
new file mode 100644
index 0000000..e7fb288
Binary files /dev/null and b/assets/game_end.png differ
diff --git a/assets/level1.txt b/assets/level1.txt
new file mode 100644
index 0000000..4098cd8
--- /dev/null
+++ b/assets/level1.txt
@@ -0,0 +1,33 @@
+0, 255, 255, 255
+0, 0, 0, 255
+255, 0, 0, 255
+255, 40, 40, 255
+255, 128, 128, 255
+Colormap
+111111111111
+111111111111
+111111111111
+222222222222
+222222222222
+222222222222
+222222222222
+333333333333
+333333333333
+333333333333
+000000000000
+000000000000
+000000000000
+Brickmap
+111111111111
+111111111111
+111111111111
+000000000000
+111111111111
+111111111111
+000000000000
+111111111111
+111111111111
+000000000000
+000000000000
+000000000000
+000000000000
diff --git a/assets/level10.txt b/assets/level10.txt
new file mode 100644
index 0000000..85caa92
--- /dev/null
+++ b/assets/level10.txt
@@ -0,0 +1,32 @@
+0, 255, 255, 255
+0, 0, 0, 255
+255, 0, 190, 255
+255, 0, 255, 255
+Colormap
+002222222200
+002222222200
+000222222000
+000022220000
+111002200111
+111100001111
+011110011110
+001111111100
+000111111000
+000011110000
+000001100000
+000000000000
+000000000000
+Brickmap
+002111111200
+002211112200
+000221122000
+000022220000
+111002200111
+221100001122
+022110011220
+002211112200
+000221122000
+000022220000
+000002200000
+000000000000
+000000000000
diff --git a/assets/level11.txt b/assets/level11.txt
new file mode 100644
index 0000000..e9570db
--- /dev/null
+++ b/assets/level11.txt
@@ -0,0 +1,33 @@
+255, 255, 255, 255
+0, 0, 0, 255
+0, 237, 255, 255
+0, 144, 255, 255
+0, 59, 255, 255
+Colormap
+333333333333
+333333333333
+333333333333
+000000000000
+222220022222
+222220022222
+222220022222
+000000000000
+111110011111
+111110011111
+111110011111
+000000000000
+000000000000
+Brickmap
+111111111111
+111111111111
+222222222222
+000000000000
+111110011111
+111110011111
+222220022222
+000000000000
+111110011111
+111110011111
+333330033333
+000000000000
+000000000000
diff --git a/assets/level12.txt b/assets/level12.txt
new file mode 100644
index 0000000..3284830
--- /dev/null
+++ b/assets/level12.txt
@@ -0,0 +1,32 @@
+255, 128, 128, 255
+0, 0, 0, 255
+159, 240, 255, 255
+0, 148, 255, 255
+Colormap
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+Brickmap
+000311113000
+000311113000
+333311113333
+111111111111
+111111111111
+222221122222
+333321123333
+000321123000
+000321123000
+000322223000
+000333333000
+000000000000
+000000000000
diff --git a/assets/level1ogg.ogg b/assets/level1ogg.ogg
new file mode 100644
index 0000000..ce86d31
Binary files /dev/null and b/assets/level1ogg.ogg differ
diff --git a/assets/level2.txt b/assets/level2.txt
new file mode 100644
index 0000000..c1bd395
--- /dev/null
+++ b/assets/level2.txt
@@ -0,0 +1,32 @@
+255, 0, 0, 255
+0, 0, 0, 255
+0, 255, 255, 255
+7, 255, 189, 255
+Colormap
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+111111111111
+222222222222
+000000000000
+Brickmap
+111011110111
+111011110111
+222022220222
+000000000000
+111011110111
+222022220222
+000000000000
+111000000111
+222000000222
+000000000000
+222222222222
+000000000000
+000000000000
diff --git a/assets/level3.txt b/assets/level3.txt
new file mode 100644
index 0000000..8a9521e
--- /dev/null
+++ b/assets/level3.txt
@@ -0,0 +1,33 @@
+0, 255, 255, 255
+0, 0, 0, 255
+0, 151, 113, 255
+7, 255, 189, 255
+128, 143, 128, 255
+Colormap
+000000000000
+033333333330
+031111111130
+031111111130
+033333333330
+000000000000
+033330033330
+032230032230
+032230032230
+033330033330
+000000000000
+000000000000
+000000000000
+Brickmap
+000000000000
+022222222220
+021111111120
+021111111120
+022222222220
+000000000000
+022220022220
+021120021120
+021120021120
+022220022220
+000000000000
+000000000000
+000000000000
diff --git a/assets/level4.txt b/assets/level4.txt
new file mode 100644
index 0000000..7c83fc1
--- /dev/null
+++ b/assets/level4.txt
@@ -0,0 +1,33 @@
+255, 0, 0, 255
+0, 0, 0, 255
+101, 97, 255, 255
+5, 186, 255, 255
+105, 201, 255, 255
+Colormap
+000000333333
+000003333333
+000033311111
+333333133333
+333331333333
+333313333333
+111133311111
+333333100000
+333331000000
+333310000000
+111100000000
+000000000000
+000000000000
+Brickmap
+000000111111
+000001111111
+000011133333
+111111311111
+111113111111
+111131111111
+333311133333
+111111300000
+111113000000
+111130000000
+333300000000
+000000000000
+000000000000
diff --git a/assets/level5.txt b/assets/level5.txt
new file mode 100644
index 0000000..1a5d7c4
--- /dev/null
+++ b/assets/level5.txt
@@ -0,0 +1,32 @@
+255, 0, 255, 255
+0, 0, 0, 255
+163, 255, 198, 255
+0, 255, 182, 255
+Colormap
+000022220000
+000222222000
+000022220000
+111000000111
+111100001111
+111110011111
+111111111111
+111111111111
+111111111111
+111111111111
+000000000000
+000000000000
+000000000000
+Brickmap
+000033330000
+000311113000
+000033330000
+111000000111
+111100001111
+111110011111
+111111111111
+111111111111
+111111111111
+222222222222
+000000000000
+000000000000
+000000000000
diff --git a/assets/level6.txt b/assets/level6.txt
new file mode 100644
index 0000000..cf32e5e
--- /dev/null
+++ b/assets/level6.txt
@@ -0,0 +1,33 @@
+255, 255, 255, 255
+0, 0, 0, 255
+255, 200, 5, 255
+255, 153, 0, 255
+255, 97, 0, 255
+Colormap
+000000000000
+000333000333
+000333000333
+000333000333
+222000222000
+222000222000
+222000222000
+000111000111
+000111000111
+000111000111
+000000000000
+000000000000
+000000000000
+Brickmap
+000000000000
+000222000222
+000212000212
+000222000222
+222000222000
+212000212000
+222000222000
+000222000222
+000212000212
+000222000222
+000000000000
+000000000000
+000000000000
diff --git a/assets/level7.txt b/assets/level7.txt
new file mode 100644
index 0000000..5a11037
--- /dev/null
+++ b/assets/level7.txt
@@ -0,0 +1,33 @@
+255, 255, 0, 255
+0, 0, 0, 255
+230, 230, 230, 255
+195, 195, 195, 255
+150, 150, 150, 255
+Colormap
+333333333333
+030030030030
+030030030030
+030030030030
+222222222222
+020020020020
+020020020020
+010010010010
+010010010010
+020020020020
+000000000000
+000000000000
+000000000000
+Brickmap
+111111111111
+010010010010
+010010010010
+010010010010
+222222222222
+010010010010
+010010010010
+010010010010
+010010010010
+020020020020
+000000000000
+000000000000
+000000000000
diff --git a/assets/level8.txt b/assets/level8.txt
new file mode 100644
index 0000000..8e97e38
--- /dev/null
+++ b/assets/level8.txt
@@ -0,0 +1,32 @@
+0, 255, 255, 255
+0, 0, 0, 255
+217, 56, 62, 255
+132, 56, 62, 255
+Colormap
+111111111111
+111111111111
+222211112222
+000211112000
+000211112000
+022211112220
+021111111120
+021111111120
+021111111120
+022222222220
+000000000000
+000000000000
+000000000000
+Brickmap
+111111111111
+111111111111
+222211112222
+000211112000
+000211112000
+022211112220
+021111111120
+021111111120
+021111111120
+033333333330
+000000000000
+000000000000
+000000000000
diff --git a/assets/level9.txt b/assets/level9.txt
new file mode 100644
index 0000000..e698b59
--- /dev/null
+++ b/assets/level9.txt
@@ -0,0 +1,32 @@
+0, 255, 0, 255
+0, 0, 0, 255
+255, 221, 0, 255
+255, 0, 0, 255
+Colormap
+222220022222
+222220022222
+222220022222
+222220022222
+000000000000
+111111111111
+111111111111
+000000000000
+111111111111
+111111111111
+000000000000
+000000000000
+000000000000
+Brickmap
+111110011111
+111110011111
+111110011111
+222220022222
+000000000000
+111111111111
+333333333333
+000000000000
+111111111111
+222222222222
+000000000000
+000000000000
+000000000000
diff --git a/assets/levelshot1.png b/assets/levelshot1.png
new file mode 100644
index 0000000..48471ef
Binary files /dev/null and b/assets/levelshot1.png differ
diff --git a/assets/levelshot10.png b/assets/levelshot10.png
new file mode 100644
index 0000000..de464ec
Binary files /dev/null and b/assets/levelshot10.png differ
diff --git a/assets/levelshot11.png b/assets/levelshot11.png
new file mode 100644
index 0000000..96bf193
Binary files /dev/null and b/assets/levelshot11.png differ
diff --git a/assets/levelshot12.png b/assets/levelshot12.png
new file mode 100644
index 0000000..4696264
Binary files /dev/null and b/assets/levelshot12.png differ
diff --git a/assets/levelshot2.png b/assets/levelshot2.png
new file mode 100644
index 0000000..a9872d8
Binary files /dev/null and b/assets/levelshot2.png differ
diff --git a/assets/levelshot3.png b/assets/levelshot3.png
new file mode 100644
index 0000000..02e5a20
Binary files /dev/null and b/assets/levelshot3.png differ
diff --git a/assets/levelshot4.png b/assets/levelshot4.png
new file mode 100644
index 0000000..f17800d
Binary files /dev/null and b/assets/levelshot4.png differ
diff --git a/assets/levelshot5.png b/assets/levelshot5.png
new file mode 100644
index 0000000..a80ca69
Binary files /dev/null and b/assets/levelshot5.png differ
diff --git a/assets/levelshot6.png b/assets/levelshot6.png
new file mode 100644
index 0000000..a21edcc
Binary files /dev/null and b/assets/levelshot6.png differ
diff --git a/assets/levelshot7.png b/assets/levelshot7.png
new file mode 100644
index 0000000..3875a7a
Binary files /dev/null and b/assets/levelshot7.png differ
diff --git a/assets/levelshot8.png b/assets/levelshot8.png
new file mode 100644
index 0000000..6f99af8
Binary files /dev/null and b/assets/levelshot8.png differ
diff --git a/assets/levelshot9.png b/assets/levelshot9.png
new file mode 100644
index 0000000..4fd00ec
Binary files /dev/null and b/assets/levelshot9.png differ
diff --git a/assets/loading.png b/assets/loading.png
new file mode 100644
index 0000000..482d602
Binary files /dev/null and b/assets/loading.png differ
diff --git a/assets/logo_small.png b/assets/logo_small.png
new file mode 100644
index 0000000..4596028
Binary files /dev/null and b/assets/logo_small.png differ
diff --git a/assets/main_menu_bkg_left.png b/assets/main_menu_bkg_left.png
new file mode 100644
index 0000000..afd94ec
Binary files /dev/null and b/assets/main_menu_bkg_left.png differ
diff --git a/assets/main_menu_bkg_right.png b/assets/main_menu_bkg_right.png
new file mode 100644
index 0000000..066d439
Binary files /dev/null and b/assets/main_menu_bkg_right.png differ
diff --git a/assets/reflector.png b/assets/reflector.png
new file mode 100644
index 0000000..6d3bcd2
Binary files /dev/null and b/assets/reflector.png differ
diff --git a/assets/select_level.png b/assets/select_level.png
new file mode 100644
index 0000000..9e2ee25
Binary files /dev/null and b/assets/select_level.png differ
diff --git a/assets/shader1fragment.txt b/assets/shader1fragment.txt
new file mode 100644
index 0000000..523790e
--- /dev/null
+++ b/assets/shader1fragment.txt
@@ -0,0 +1,14 @@
+precision mediump float;
+uniform sampler2D Texture;
+uniform float Transparency;
+varying vec2 texCoord;
+
+void main()
+{
+ vec4 color = texture2D(Texture,texCoord).rgba;
+
+ gl_FragColor = vec4(color.rgb, color.a * Transparency);
+
+
+
+}
\ No newline at end of file
diff --git a/assets/shader1vertex.txt b/assets/shader1vertex.txt
new file mode 100644
index 0000000..72d9f46
--- /dev/null
+++ b/assets/shader1vertex.txt
@@ -0,0 +1,12 @@
+attribute vec3 vPosition;
+attribute vec2 vTexCoord;
+varying vec2 texCoord;
+
+uniform mat4 ProjectionMatrix;
+
+void main()
+{
+ //480x320
+ gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
+ texCoord = vTexCoord;
+}
\ No newline at end of file
diff --git a/assets/shutterstock1.png b/assets/shutterstock1.png
new file mode 100644
index 0000000..a9f949a
Binary files /dev/null and b/assets/shutterstock1.png differ
diff --git a/assets/shutterstock10.png b/assets/shutterstock10.png
new file mode 100644
index 0000000..e028dd6
Binary files /dev/null and b/assets/shutterstock10.png differ
diff --git a/assets/shutterstock11.png b/assets/shutterstock11.png
new file mode 100644
index 0000000..51f626e
Binary files /dev/null and b/assets/shutterstock11.png differ
diff --git a/assets/shutterstock12.png b/assets/shutterstock12.png
new file mode 100644
index 0000000..badbbe0
Binary files /dev/null and b/assets/shutterstock12.png differ
diff --git a/assets/shutterstock2.png b/assets/shutterstock2.png
new file mode 100644
index 0000000..c6ffbb5
Binary files /dev/null and b/assets/shutterstock2.png differ
diff --git a/assets/shutterstock3.png b/assets/shutterstock3.png
new file mode 100644
index 0000000..22b11ba
Binary files /dev/null and b/assets/shutterstock3.png differ
diff --git a/assets/shutterstock4.png b/assets/shutterstock4.png
new file mode 100644
index 0000000..5756d84
Binary files /dev/null and b/assets/shutterstock4.png differ
diff --git a/assets/shutterstock5.png b/assets/shutterstock5.png
new file mode 100644
index 0000000..fcb63f7
Binary files /dev/null and b/assets/shutterstock5.png differ
diff --git a/assets/shutterstock6.png b/assets/shutterstock6.png
new file mode 100644
index 0000000..40b1b3a
Binary files /dev/null and b/assets/shutterstock6.png differ
diff --git a/assets/shutterstock7.png b/assets/shutterstock7.png
new file mode 100644
index 0000000..12e82a6
Binary files /dev/null and b/assets/shutterstock7.png differ
diff --git a/assets/shutterstock8.png b/assets/shutterstock8.png
new file mode 100644
index 0000000..dba9cbe
Binary files /dev/null and b/assets/shutterstock8.png differ
diff --git a/assets/shutterstock9.png b/assets/shutterstock9.png
new file mode 100644
index 0000000..33ce46f
Binary files /dev/null and b/assets/shutterstock9.png differ
diff --git a/assets/slide_up_btn.png b/assets/slide_up_btn.png
new file mode 100644
index 0000000..fb26969
Binary files /dev/null and b/assets/slide_up_btn.png differ
diff --git a/assets/tap_to_continue_btn.png b/assets/tap_to_continue_btn.png
new file mode 100644
index 0000000..b9b51c1
Binary files /dev/null and b/assets/tap_to_continue_btn.png differ
diff --git a/assets/wall_bonus.png b/assets/wall_bonus.png
new file mode 100644
index 0000000..7f94f41
Binary files /dev/null and b/assets/wall_bonus.png differ
diff --git a/assets/wall_left.png b/assets/wall_left.png
new file mode 100644
index 0000000..9baad70
Binary files /dev/null and b/assets/wall_left.png differ
diff --git a/assets/wall_right.png b/assets/wall_right.png
new file mode 100644
index 0000000..ab50ea3
Binary files /dev/null and b/assets/wall_right.png differ
diff --git a/assets/wall_up.png b/assets/wall_up.png
new file mode 100644
index 0000000..c14e614
Binary files /dev/null and b/assets/wall_up.png differ
diff --git a/ios/Icon.png b/ios/Icon.png
new file mode 100644
index 0000000..b6880bf
Binary files /dev/null and b/ios/Icon.png differ
diff --git a/ios/Splash-landscape.png b/ios/Splash-landscape.png
new file mode 100644
index 0000000..61dbcaa
Binary files /dev/null and b/ios/Splash-landscape.png differ
diff --git a/ios/doublehitballs.xcodeproj/project.pbxproj b/ios/doublehitballs.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..5f98e95
--- /dev/null
+++ b/ios/doublehitballs.xcodeproj/project.pbxproj
@@ -0,0 +1,556 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 4C49B2BE15B0991B003512CD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C49B2BD15B0991B003512CD /* UIKit.framework */; };
+ 4C49B2C015B0991B003512CD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C49B2BF15B0991B003512CD /* Foundation.framework */; };
+ 4C49B2C215B0991B003512CD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C49B2C115B0991B003512CD /* CoreGraphics.framework */; };
+ 4C49B2C415B0991B003512CD /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C49B2C315B0991B003512CD /* GLKit.framework */; };
+ 4C49B2C615B0991B003512CD /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C49B2C515B0991B003512CD /* OpenGLES.framework */; };
+ 4C49B2CC15B0991B003512CD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C49B2CA15B0991B003512CD /* InfoPlist.strings */; };
+ 4C49B2CE15B0991B003512CD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C49B2CD15B0991B003512CD /* main.m */; };
+ 4C49B2D215B0991B003512CD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C49B2D115B0991B003512CD /* AppDelegate.m */; };
+ 4C49B2D915B0991B003512CD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C49B2D815B0991B003512CD /* ViewController.m */; };
+ 4C49B2DC15B0991B003512CD /* ViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C49B2DA15B0991B003512CD /* ViewController_iPhone.xib */; };
+ 4C49B2DF15B0991B003512CD /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C49B2DD15B0991B003512CD /* ViewController_iPad.xib */; };
+ 4C4C807515BA8F460037C6CE /* libsquirrel.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C4C807415BA8F460037C6CE /* libsquirrel.a */; };
+ 4C4C807715BA8F5B0037C6CE /* libz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C4C807615BA8F5B0037C6CE /* libz.a */; };
+ 4C4C807B15BAA33F0037C6CE /* Splash-landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C4C807A15BAA33F0037C6CE /* Splash-landscape.png */; };
+ 4C4C807D15BAA3550037C6CE /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C4C807C15BAA3550037C6CE /* Icon.png */; };
+ 4C51D30615BB261E0077EF6A /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 4C51D30515BB261E0077EF6A /* iTunesArtwork */; };
+ 4C6EB44515C3CFD300316CB6 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C6EB44415C3CFD300316CB6 /* libpng.a */; };
+ 4C77831315BABD68003D5142 /* libvorbis-tremor-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C77831215BABD68003D5142 /* libvorbis-tremor-ios.a */; };
+ 4C77831815BABE26003D5142 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C77831415BABD8B003D5142 /* AudioToolbox.framework */; };
+ 4C77831915BABE26003D5142 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C77831515BABD8B003D5142 /* OpenAL.framework */; };
+ 4C7AD44C15B1D77700A599F6 /* ios_api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7AD44B15B1D77700A599F6 /* ios_api.cpp */; };
+ 4C7FBF53165C1CDF008C1538 /* libboost.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7FBF52165C1CDF008C1538 /* libboost.a */; };
+ 4CCC0ECC15B30D6B005432FB /* CustomGLKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCC0ECB15B30D6B005432FB /* CustomGLKView.m */; };
+ 4CE6A9D015B2F879006A3965 /* libHalibut Engine.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CE6A9C515B2F774006A3965 /* libHalibut Engine.a */; };
+ 4CE6A9D215B2F979006A3965 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 4CE6A9D115B2F979006A3965 /* assets */; };
+ 4CE6A9DE15B2F99F006A3965 /* creditscode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A9D315B2F99F006A3965 /* creditscode.cpp */; };
+ 4CE6A9DF15B2F99F006A3965 /* gamecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A9D615B2F99F006A3965 /* gamecode.cpp */; };
+ 4CE6A9E015B2F99F006A3965 /* loadingcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A9D815B2F99F006A3965 /* loadingcode.cpp */; };
+ 4CE6A9E115B2F99F006A3965 /* main_code.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A9DA15B2F99F006A3965 /* main_code.cpp */; };
+ 4CE6A9E215B2F99F006A3965 /* menucode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A9DC15B2F99F006A3965 /* menucode.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 4CE6A9C415B2F774006A3965 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 4CE6A9BD15B2F773006A3965 /* Halibut Engine.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 4C8CE90215B0A0F400078175;
+ remoteInfo = "Halibut Engine";
+ };
+ 4CE6A9CE15B2F7EE006A3965 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 4CE6A9BD15B2F773006A3965 /* Halibut Engine.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = 4C8CE90115B0A0F400078175;
+ remoteInfo = "Halibut Engine";
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 4C49B2B915B0991B003512CD /* doublehitballs.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = doublehitballs.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4C49B2BD15B0991B003512CD /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 4C49B2BF15B0991B003512CD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 4C49B2C115B0991B003512CD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 4C49B2C315B0991B003512CD /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
+ 4C49B2C515B0991B003512CD /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+ 4C49B2C915B0991B003512CD /* doublehitballs-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "doublehitballs-Info.plist"; sourceTree = ""; };
+ 4C49B2CB15B0991B003512CD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
+ 4C49B2CD15B0991B003512CD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 4C49B2CF15B0991B003512CD /* doublehitballs-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "doublehitballs-Prefix.pch"; sourceTree = ""; };
+ 4C49B2D015B0991B003512CD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 4C49B2D115B0991B003512CD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+ 4C49B2D715B0991B003512CD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
+ 4C49B2D815B0991B003512CD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
+ 4C49B2DB15B0991B003512CD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPhone.xib; sourceTree = ""; };
+ 4C49B2DE15B0991B003512CD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPad.xib; sourceTree = ""; };
+ 4C4C807415BA8F460037C6CE /* libsquirrel.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsquirrel.a; path = "../../libs/SQUIRREL2_1_1_sqplus/build-ios/ios-device/libsquirrel.a"; sourceTree = ""; };
+ 4C4C807615BA8F5B0037C6CE /* libz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libz.a; path = "../../libs/zlib-1.2.7/build-ios/ios-device/libz.a"; sourceTree = ""; };
+ 4C4C807A15BAA33F0037C6CE /* Splash-landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Splash-landscape.png"; sourceTree = ""; };
+ 4C4C807C15BAA3550037C6CE /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; };
+ 4C51D30515BB261E0077EF6A /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; path = iTunesArtwork; sourceTree = ""; };
+ 4C6EB44415C3CFD300316CB6 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../../libs/libpng-1.5.12/build-ios/ios-simulator/libpng.a"; sourceTree = ""; };
+ 4C77831215BABD68003D5142 /* libvorbis-tremor-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libvorbis-tremor-ios.a"; path = "../../libs/vorbis-tremor-ios/build-ios/ios-device/libvorbis-tremor-ios.a"; sourceTree = ""; };
+ 4C77831415BABD8B003D5142 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ 4C77831515BABD8B003D5142 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
+ 4C7AD44B15B1D77700A599F6 /* ios_api.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ios_api.cpp; sourceTree = ""; };
+ 4C7C584A15C31E6500CAE4F4 /* libboost.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libboost.a; path = "../../libs/boost_1_47_0/build-ios/ios-simulator/libboost.a"; sourceTree = ""; };
+ 4C7FBF52165C1CDF008C1538 /* libboost.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libboost.a; path = "../../../libs/boost_1_52_0/build-ios/ios-device/libboost.a"; sourceTree = ""; };
+ 4CCC0ECA15B30D6A005432FB /* CustomGLKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGLKView.h; sourceTree = ""; };
+ 4CCC0ECB15B30D6B005432FB /* CustomGLKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomGLKView.m; sourceTree = ""; };
+ 4CCC0ECD15B310FB005432FB /* ios_api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios_api.h; sourceTree = ""; };
+ 4CE6A9BD15B2F773006A3965 /* Halibut Engine.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Halibut Engine.xcodeproj"; path = "../../Engine/iOS/Halibut Engine/Halibut Engine.xcodeproj"; sourceTree = ""; };
+ 4CE6A9D115B2F979006A3965 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../assets; sourceTree = ""; };
+ 4CE6A9D315B2F99F006A3965 /* creditscode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = creditscode.cpp; path = ../../jni/creditscode.cpp; sourceTree = ""; };
+ 4CE6A9D415B2F99F006A3965 /* creditscode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = creditscode.h; path = ../../jni/creditscode.h; sourceTree = ""; };
+ 4CE6A9D515B2F99F006A3965 /* game_area_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = game_area_interface.h; path = ../../jni/game_area_interface.h; sourceTree = ""; };
+ 4CE6A9D615B2F99F006A3965 /* gamecode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = gamecode.cpp; path = ../../jni/gamecode.cpp; sourceTree = ""; };
+ 4CE6A9D715B2F99F006A3965 /* gamecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gamecode.h; path = ../../jni/gamecode.h; sourceTree = ""; };
+ 4CE6A9D815B2F99F006A3965 /* loadingcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = loadingcode.cpp; path = ../../jni/loadingcode.cpp; sourceTree = ""; };
+ 4CE6A9D915B2F99F006A3965 /* loadingcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = loadingcode.h; path = ../../jni/loadingcode.h; sourceTree = ""; };
+ 4CE6A9DA15B2F99F006A3965 /* main_code.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main_code.cpp; path = ../../jni/main_code.cpp; sourceTree = ""; };
+ 4CE6A9DB15B2F99F006A3965 /* main_code.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = main_code.h; path = ../../jni/main_code.h; sourceTree = ""; };
+ 4CE6A9DC15B2F99F006A3965 /* menucode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = menucode.cpp; path = ../../jni/menucode.cpp; sourceTree = ""; };
+ 4CE6A9DD15B2F99F006A3965 /* menucode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = menucode.h; path = ../../jni/menucode.h; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 4C49B2B615B0991B003512CD /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4C77831815BABE26003D5142 /* AudioToolbox.framework in Frameworks */,
+ 4C77831915BABE26003D5142 /* OpenAL.framework in Frameworks */,
+ 4CE6A9D015B2F879006A3965 /* libHalibut Engine.a in Frameworks */,
+ 4C49B2BE15B0991B003512CD /* UIKit.framework in Frameworks */,
+ 4C49B2C015B0991B003512CD /* Foundation.framework in Frameworks */,
+ 4C49B2C215B0991B003512CD /* CoreGraphics.framework in Frameworks */,
+ 4C49B2C415B0991B003512CD /* GLKit.framework in Frameworks */,
+ 4C49B2C615B0991B003512CD /* OpenGLES.framework in Frameworks */,
+ 4C4C807515BA8F460037C6CE /* libsquirrel.a in Frameworks */,
+ 4C4C807715BA8F5B0037C6CE /* libz.a in Frameworks */,
+ 4C77831315BABD68003D5142 /* libvorbis-tremor-ios.a in Frameworks */,
+ 4C6EB44515C3CFD300316CB6 /* libpng.a in Frameworks */,
+ 4C7FBF53165C1CDF008C1538 /* libboost.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 4C49B2AE15B0991B003512CD = {
+ isa = PBXGroup;
+ children = (
+ 4C7FBF52165C1CDF008C1538 /* libboost.a */,
+ 4C7B819515C40F770024D61A /* libs */,
+ 4CE6A9BD15B2F773006A3965 /* Halibut Engine.xcodeproj */,
+ 4CC1FC3415B200130025C6F7 /* Resources */,
+ 4C49B2C715B0991B003512CD /* doublehitballs */,
+ 4C49B2BC15B0991B003512CD /* Frameworks */,
+ 4C49B2BA15B0991B003512CD /* Products */,
+ );
+ sourceTree = "";
+ };
+ 4C49B2BA15B0991B003512CD /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 4C49B2B915B0991B003512CD /* doublehitballs.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 4C49B2BC15B0991B003512CD /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 4C77831415BABD8B003D5142 /* AudioToolbox.framework */,
+ 4C77831515BABD8B003D5142 /* OpenAL.framework */,
+ 4C49B2BD15B0991B003512CD /* UIKit.framework */,
+ 4C49B2BF15B0991B003512CD /* Foundation.framework */,
+ 4C49B2C115B0991B003512CD /* CoreGraphics.framework */,
+ 4C49B2C315B0991B003512CD /* GLKit.framework */,
+ 4C49B2C515B0991B003512CD /* OpenGLES.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 4C49B2C715B0991B003512CD /* doublehitballs */ = {
+ isa = PBXGroup;
+ children = (
+ 4CE6A9E315B2F9A4006A3965 /* DoubleHitBalls */,
+ 4CCC0ECD15B310FB005432FB /* ios_api.h */,
+ 4C7AD44B15B1D77700A599F6 /* ios_api.cpp */,
+ 4C49B2D015B0991B003512CD /* AppDelegate.h */,
+ 4C49B2D115B0991B003512CD /* AppDelegate.m */,
+ 4C49B2D715B0991B003512CD /* ViewController.h */,
+ 4C49B2D815B0991B003512CD /* ViewController.m */,
+ 4C49B2DA15B0991B003512CD /* ViewController_iPhone.xib */,
+ 4C49B2DD15B0991B003512CD /* ViewController_iPad.xib */,
+ 4C49B2C815B0991B003512CD /* Supporting Files */,
+ 4CCC0ECA15B30D6A005432FB /* CustomGLKView.h */,
+ 4CCC0ECB15B30D6B005432FB /* CustomGLKView.m */,
+ );
+ path = doublehitballs;
+ sourceTree = "";
+ };
+ 4C49B2C815B0991B003512CD /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 4C49B2C915B0991B003512CD /* doublehitballs-Info.plist */,
+ 4C49B2CA15B0991B003512CD /* InfoPlist.strings */,
+ 4C49B2CD15B0991B003512CD /* main.m */,
+ 4C49B2CF15B0991B003512CD /* doublehitballs-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+ 4C7B819515C40F770024D61A /* libs */ = {
+ isa = PBXGroup;
+ children = (
+ 4C6EB44415C3CFD300316CB6 /* libpng.a */,
+ 4C7C584A15C31E6500CAE4F4 /* libboost.a */,
+ 4C77831215BABD68003D5142 /* libvorbis-tremor-ios.a */,
+ 4C4C807615BA8F5B0037C6CE /* libz.a */,
+ 4C4C807415BA8F460037C6CE /* libsquirrel.a */,
+ );
+ name = libs;
+ sourceTree = "";
+ };
+ 4CC1FC3415B200130025C6F7 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 4C51D30515BB261E0077EF6A /* iTunesArtwork */,
+ 4C4C807C15BAA3550037C6CE /* Icon.png */,
+ 4C4C807A15BAA33F0037C6CE /* Splash-landscape.png */,
+ 4CE6A9D115B2F979006A3965 /* assets */,
+ );
+ name = Resources;
+ sourceTree = "";
+ };
+ 4CE6A9BE15B2F773006A3965 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 4CE6A9C515B2F774006A3965 /* libHalibut Engine.a */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 4CE6A9E315B2F9A4006A3965 /* DoubleHitBalls */ = {
+ isa = PBXGroup;
+ children = (
+ 4CE6A9D315B2F99F006A3965 /* creditscode.cpp */,
+ 4CE6A9D415B2F99F006A3965 /* creditscode.h */,
+ 4CE6A9D515B2F99F006A3965 /* game_area_interface.h */,
+ 4CE6A9D615B2F99F006A3965 /* gamecode.cpp */,
+ 4CE6A9D715B2F99F006A3965 /* gamecode.h */,
+ 4CE6A9D815B2F99F006A3965 /* loadingcode.cpp */,
+ 4CE6A9D915B2F99F006A3965 /* loadingcode.h */,
+ 4CE6A9DA15B2F99F006A3965 /* main_code.cpp */,
+ 4CE6A9DB15B2F99F006A3965 /* main_code.h */,
+ 4CE6A9DC15B2F99F006A3965 /* menucode.cpp */,
+ 4CE6A9DD15B2F99F006A3965 /* menucode.h */,
+ );
+ name = DoubleHitBalls;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 4C49B2B815B0991B003512CD /* doublehitballs */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4C49B2E215B0991B003512CD /* Build configuration list for PBXNativeTarget "doublehitballs" */;
+ buildPhases = (
+ 4C49B2B515B0991B003512CD /* Sources */,
+ 4C49B2B615B0991B003512CD /* Frameworks */,
+ 4C49B2B715B0991B003512CD /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 4CE6A9CF15B2F7EE006A3965 /* PBXTargetDependency */,
+ );
+ name = doublehitballs;
+ productName = doublehitballs;
+ productReference = 4C49B2B915B0991B003512CD /* doublehitballs.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 4C49B2B015B0991B003512CD /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = 4C49B2B315B0991B003512CD /* Build configuration list for PBXProject "doublehitballs" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 4C49B2AE15B0991B003512CD;
+ productRefGroup = 4C49B2BA15B0991B003512CD /* Products */;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 4CE6A9BE15B2F773006A3965 /* Products */;
+ ProjectRef = 4CE6A9BD15B2F773006A3965 /* Halibut Engine.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ 4C49B2B815B0991B003512CD /* doublehitballs */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ 4CE6A9C515B2F774006A3965 /* libHalibut Engine.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libHalibut Engine.a";
+ remoteRef = 4CE6A9C415B2F774006A3965 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 4C49B2B715B0991B003512CD /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4C49B2CC15B0991B003512CD /* InfoPlist.strings in Resources */,
+ 4C49B2DC15B0991B003512CD /* ViewController_iPhone.xib in Resources */,
+ 4C49B2DF15B0991B003512CD /* ViewController_iPad.xib in Resources */,
+ 4CE6A9D215B2F979006A3965 /* assets in Resources */,
+ 4C4C807B15BAA33F0037C6CE /* Splash-landscape.png in Resources */,
+ 4C4C807D15BAA3550037C6CE /* Icon.png in Resources */,
+ 4C51D30615BB261E0077EF6A /* iTunesArtwork in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 4C49B2B515B0991B003512CD /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4C49B2CE15B0991B003512CD /* main.m in Sources */,
+ 4C49B2D215B0991B003512CD /* AppDelegate.m in Sources */,
+ 4C49B2D915B0991B003512CD /* ViewController.m in Sources */,
+ 4C7AD44C15B1D77700A599F6 /* ios_api.cpp in Sources */,
+ 4CE6A9DE15B2F99F006A3965 /* creditscode.cpp in Sources */,
+ 4CE6A9DF15B2F99F006A3965 /* gamecode.cpp in Sources */,
+ 4CE6A9E015B2F99F006A3965 /* loadingcode.cpp in Sources */,
+ 4CE6A9E115B2F99F006A3965 /* main_code.cpp in Sources */,
+ 4CE6A9E215B2F99F006A3965 /* menucode.cpp in Sources */,
+ 4CCC0ECC15B30D6B005432FB /* CustomGLKView.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 4CE6A9CF15B2F7EE006A3965 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = "Halibut Engine";
+ targetProxy = 4CE6A9CE15B2F7EE006A3965 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 4C49B2CA15B0991B003512CD /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 4C49B2CB15B0991B003512CD /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "";
+ };
+ 4C49B2DA15B0991B003512CD /* ViewController_iPhone.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 4C49B2DB15B0991B003512CD /* en */,
+ );
+ name = ViewController_iPhone.xib;
+ sourceTree = "";
+ };
+ 4C49B2DD15B0991B003512CD /* ViewController_iPad.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 4C49B2DE15B0991B003512CD /* en */,
+ );
+ name = ViewController_iPad.xib;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 4C49B2E015B0991B003512CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 4C49B2E115B0991B003512CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 4C49B2E315B0991B003512CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "doublehitballs/doublehitballs-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ TARGET_IOS,
+ TARGET_HALIBUT,
+ DEBUG,
+ "$(inherited)",
+ BOOST_NO_CXX11_NUMERIC_LIMITS,
+ );
+ "GCC_THUMB_SUPPORT[arch=armv6]" = "";
+ HEADER_SEARCH_PATHS = (
+ "$(SalmonEnginePath)",
+ "$(LibsPath)/lpng1510",
+ "$(LibsPath)/sqplus/sqplus",
+ "$(LibsPath)/sqplus/include",
+ "$(LibsPath)/boost_1_52_0",
+ ../jni,
+ "$(LibsPath)/vorbis-tremor-ios/vorbis",
+ );
+ INFOPLIST_FILE = "doublehitballs/doublehitballs-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../libs/boost_1_52_0/build-ios/ios-simulator\"",
+ "\"$(SRCROOT)/../../../libs/boost_1_52_0/build-ios/ios-device\"",
+ );
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = (
+ "$(LibsPath)/lpng1510/build-ios/ios-device",
+ "$(LibsPath)/boost_1_52_0/build-ios/ios-device",
+ "$(LibsPath)/sqplus/build-ios/ios-device",
+ "$(LibsPath)/zlib-1.2.6/build-ios/ios-device",
+ "$(LibsPath)/vorbis-tremor-ios/build-ios/ios-device",
+ );
+ "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]" = (
+ "$(LibsPath)/lpng1510/build-ios/ios-simulator",
+ "$(LibsPath)/sqplus/build-ios/ios-simulator",
+ "$(LibsPath)/boost_1_52_0/build-ios/ios-simulator",
+ "$(LibsPath)/zlib-1.2.6/build-ios/ios-simulator",
+ "$(LibsPath)/vorbis-tremor-ios/build-ios/ios-simulator",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SYMROOT = build;
+ TARGETED_DEVICE_FAMILY = 1;
+ USER_HEADER_SEARCH_PATHS = "";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 4C49B2E415B0991B003512CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "doublehitballs/doublehitballs-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ TARGET_IOS,
+ TARGET_HALIBUT,
+ BOOST_NO_CXX11_NUMERIC_LIMITS,
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ "GCC_THUMB_SUPPORT[arch=armv6]" = "";
+ HEADER_SEARCH_PATHS = (
+ "$(SalmonEnginePath)",
+ "$(LibsPath)/lpng1510",
+ "$(LibsPath)/sqplus/sqplus",
+ "$(LibsPath)/sqplus/include",
+ "$(LibsPath)/boost_1_52_0",
+ ../jni,
+ "$(LibsPath)/vorbis-tremor-ios/vorbis",
+ );
+ INFOPLIST_FILE = "doublehitballs/doublehitballs-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../libs/boost_1_52_0/build-ios/ios-simulator\"",
+ "\"$(SRCROOT)/../../../libs/boost_1_52_0/build-ios/ios-device\"",
+ );
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*]" = (
+ "$(LibsPath)/l1510/build-ios/ios-device",
+ "$(LibsPath)/boost_1_52_0/build-ios/ios-device",
+ "$(LibsPath)/sqplus/build-ios/ios-device",
+ "$(LibsPath)/zlib-1.2.6/build-ios/ios-device",
+ "$(LibsPath)/vorbis-tremor-ios/build-ios/ios-device",
+ );
+ "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]" = (
+ "$(LibsPath)/lpng1510/build-ios/ios-simulator",
+ "$(LibsPath)/sqplus/build-ios/ios-simulator",
+ "$(LibsPath)/boost_1_52_0/build-ios/ios-simulator",
+ "$(LibsPath)/zlib-1.2.6/build-ios/ios-simulator",
+ "$(LibsPath)/vorbis-tremor-ios/build-ios/ios-simulator",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TARGETED_DEVICE_FAMILY = 1;
+ USER_HEADER_SEARCH_PATHS = "";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4C49B2B315B0991B003512CD /* Build configuration list for PBXProject "doublehitballs" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4C49B2E015B0991B003512CD /* Debug */,
+ 4C49B2E115B0991B003512CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 4C49B2E215B0991B003512CD /* Build configuration list for PBXNativeTarget "doublehitballs" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4C49B2E315B0991B003512CD /* Debug */,
+ 4C49B2E415B0991B003512CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 4C49B2B015B0991B003512CD /* Project object */;
+}
diff --git a/ios/doublehitballs/AppDelegate.h b/ios/doublehitballs/AppDelegate.h
new file mode 100644
index 0000000..4237984
--- /dev/null
+++ b/ios/doublehitballs/AppDelegate.h
@@ -0,0 +1,19 @@
+//
+// AppDelegate.h
+// doublehitballs
+//
+// Created by vvv ооо on 13.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import
+
+@class ViewController;
+
+@interface AppDelegate : UIResponder
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) ViewController *viewController;
+
+@end
diff --git a/ios/doublehitballs/AppDelegate.m b/ios/doublehitballs/AppDelegate.m
new file mode 100644
index 0000000..1283115
--- /dev/null
+++ b/ios/doublehitballs/AppDelegate.m
@@ -0,0 +1,59 @@
+//
+// AppDelegate.m
+// doublehitballs
+//
+// Created by vvv ооо on 13.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+#import "ViewController.h"
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];
+ } else {
+ self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
+ }
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
diff --git a/ios/doublehitballs/CustomGLKView.h b/ios/doublehitballs/CustomGLKView.h
new file mode 100644
index 0000000..59184d3
--- /dev/null
+++ b/ios/doublehitballs/CustomGLKView.h
@@ -0,0 +1,17 @@
+//
+// CustomGLKView.h
+// doublehitballs
+//
+// Created by vvv ооо on 15.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import
+
+@interface CustomGLKView : GLKView
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
+
+@end
diff --git a/ios/doublehitballs/CustomGLKView.m b/ios/doublehitballs/CustomGLKView.m
new file mode 100644
index 0000000..130b654
--- /dev/null
+++ b/ios/doublehitballs/CustomGLKView.m
@@ -0,0 +1,68 @@
+//
+// CustomGLKView.m
+// doublehitballs
+//
+// Created by vvv ооо on 15.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "CustomGLKView.h"
+#import "ios_api.h"
+
+bool touchMoved = false;
+CGPoint prev_loc;
+
+
+@implementation CustomGLKView
+
+- (id)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ // Initialization code
+ }
+ return self;
+}
+
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+{
+
+ CGPoint location = [[[touches allObjects] objectAtIndex:0] locationInView:self];
+
+ prev_loc = location;
+
+ touchMoved = false;
+
+ AppOnTapDown(location.x, self.bounds.size.height - location.y);
+
+}
+
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ CGPoint location = [[[touches allObjects] objectAtIndex:0] locationInView:self];
+
+ CGPoint prevLocation = [[[touches allObjects] objectAtIndex:0] previousLocationInView:self];
+
+ if (abs(prev_loc.x - location.x) > 10 || abs(prev_loc.y - location.y) > 10)
+ {
+ touchMoved = true;
+ }
+
+ AppOnScroll(prevLocation.x - location.x, prevLocation.y - location.y);
+}
+
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ CGPoint location = [[[touches allObjects] objectAtIndex:0] locationInView:self];
+
+ if (!touchMoved)
+ {
+ AppOnTapUp(location.x, self.bounds.size.height - location.y);
+ }
+}
+
+
+
+
+@end
diff --git a/ios/doublehitballs/ViewController.h b/ios/doublehitballs/ViewController.h
new file mode 100644
index 0000000..e7f9748
--- /dev/null
+++ b/ios/doublehitballs/ViewController.h
@@ -0,0 +1,14 @@
+//
+// ViewController.h
+// doublehitballs
+//
+// Created by vvv ооо on 13.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import
+#import
+
+@interface ViewController : GLKViewController
+
+@end
diff --git a/ios/doublehitballs/ViewController.m b/ios/doublehitballs/ViewController.m
new file mode 100644
index 0000000..b04f1d3
--- /dev/null
+++ b/ios/doublehitballs/ViewController.m
@@ -0,0 +1,106 @@
+//
+// ViewController.m
+// doublehitballs
+//
+// Created by vvv ооо on 13.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "ViewController.h"
+#import "ios_api.h"
+
+@interface ViewController () {
+}
+
+@property (strong, nonatomic) EAGLContext *context;
+@property (strong, nonatomic) GLKBaseEffect *effect;
+
+- (void)setupGL;
+- (void)tearDownGL;
+
+@end
+
+@implementation ViewController
+
+@synthesize context = _context;
+@synthesize effect = _effect;
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+
+ if (!self.context) {
+ NSLog(@"Failed to create ES context");
+ }
+
+ GLKView *view = (GLKView *)self.view;
+ view.context = self.context;
+ view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
+
+
+ [self setupGL];
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+
+ [self tearDownGL];
+
+ if ([EAGLContext currentContext] == self.context) {
+ [EAGLContext setCurrentContext:nil];
+ }
+ self.context = nil;
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Release any cached data, images, etc. that aren't in use.
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ /*
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+ } else {
+ return YES;
+ }*/
+ return UIInterfaceOrientationIsLandscape(interfaceOrientation);
+}
+
+- (void)setupGL
+{
+ [EAGLContext setCurrentContext:self.context];
+
+ AppInit();
+ }
+
+- (void)tearDownGL
+{
+ [EAGLContext setCurrentContext:self.context];
+
+ AppDeinit();
+
+}
+
+#pragma mark - GLKView and GLKViewController delegate methods
+
+- (void)update
+{
+
+ AppUpdate(self.timeSinceLastUpdate * 1000);
+}
+
+- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect
+{
+
+ AppDraw();
+
+}
+
+
+@end
diff --git a/ios/doublehitballs/doublehitballs-Info.plist b/ios/doublehitballs/doublehitballs-Info.plist
new file mode 100644
index 0000000..2e15839
--- /dev/null
+++ b/ios/doublehitballs/doublehitballs-Info.plist
@@ -0,0 +1,50 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ 2x Hit Balls
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIconFile
+ Icon.png
+ CFBundleIdentifier
+ fishrungames.doublehitballs
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ${PRODUCT_NAME}
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ LSRequiresIPhoneOS
+
+ UILaunchImageFile
+ Splash-landscape.png
+ UIPrerenderedIcon
+
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UIStatusBarHidden
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/ios/doublehitballs/doublehitballs-Prefix.pch b/ios/doublehitballs/doublehitballs-Prefix.pch
new file mode 100644
index 0000000..cd479f5
--- /dev/null
+++ b/ios/doublehitballs/doublehitballs-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'doublehitballs' target in the 'doublehitballs' project
+//
+
+#import
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import
+ #import
+#endif
diff --git a/ios/doublehitballs/en.lproj/InfoPlist.strings b/ios/doublehitballs/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..0f167df
--- /dev/null
+++ b/ios/doublehitballs/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/ios/doublehitballs/en.lproj/ViewController_iPad.xib b/ios/doublehitballs/en.lproj/ViewController_iPad.xib
new file mode 100644
index 0000000..eb81e88
--- /dev/null
+++ b/ios/doublehitballs/en.lproj/ViewController_iPad.xib
@@ -0,0 +1,133 @@
+
+
+
+ 1296
+ 11E53
+ 2182
+ 1138.47
+ 569.00
+
+
+ IBProxyObject
+ IBUIView
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+
+
+
+
+
+
+ view
+
+
+
+ 3
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+ -1
+
+
+ File's Owner
+
+
+ -2
+
+
+
+
+
+
+ ViewController
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ UIResponder
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ CustomGLKView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+ 3
+
+
+
+
+ CustomGLKView
+ GLKView
+
+ IBProjectSource
+ ./Classes/CustomGLKView.h
+
+
+
+ ViewController
+ GLKViewController
+
+ IBProjectSource
+ ./Classes/ViewController.h
+
+
+
+
+ 0
+ IBIPadFramework
+
+ com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
+
+
+ YES
+ 3
+ 1181
+
+
diff --git a/ios/doublehitballs/en.lproj/ViewController_iPhone.xib b/ios/doublehitballs/en.lproj/ViewController_iPhone.xib
new file mode 100644
index 0000000..96a4a92
--- /dev/null
+++ b/ios/doublehitballs/en.lproj/ViewController_iPhone.xib
@@ -0,0 +1,111 @@
+
+
+
+ 1296
+ 11E53
+ 2182
+ 1138.47
+ 569.00
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ 1181
+
+
+ IBProxyObject
+ IBUIView
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+ PluginDependencyRecalculationVersion
+
+
+
+
+ IBFilesOwner
+ IBCocoaTouchFramework
+
+
+ IBFirstResponder
+ IBCocoaTouchFramework
+
+
+
+ 274
+ {320, 460}
+
+
+ 3
+ MQA
+
+ 2
+
+
+ NO
+ IBCocoaTouchFramework
+
+
+
+
+
+
+ view
+
+
+
+ 3
+
+
+
+
+
+ 0
+
+
+
+
+
+ -1
+
+
+ File's Owner
+
+
+ -2
+
+
+
+
+ 2
+
+
+
+
+
+
+ ViewController
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ UIResponder
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ CustomGLKView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+ 4
+
+
+ 0
+ IBCocoaTouchFramework
+
+ com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
+
+
+ YES
+ 3
+ 1181
+
+
diff --git a/ios/doublehitballs/ios_api.cpp b/ios/doublehitballs/ios_api.cpp
new file mode 100644
index 0000000..1c7ce18
--- /dev/null
+++ b/ios/doublehitballs/ios_api.cpp
@@ -0,0 +1,48 @@
+#include "include/Engine.h"
+#include "main_code.h"
+
+TAndroidApplication* App = NULL;
+
+
+extern "C" void AppInit()
+{
+ App = new TAndroidApplication;
+ //App->OuterInit(320, 480, 320, 480);
+ App->OuterInit(480, 320, 480, 320);
+}
+
+
+extern "C" void AppDeinit()
+{
+ App->OuterDeinit();
+ delete App;
+}
+
+
+extern "C" void AppUpdate(int dt)
+{
+ App->OuterUpdate(dt);
+}
+
+
+
+extern "C" void AppDraw()
+{
+ App->OuterDraw();
+}
+
+extern "C" void AppOnTapDown(int posx, int posy)
+{
+ App->OuterOnTapDown(vec2(posx, posy));
+}
+
+extern "C" void AppOnTapUp(int posx, int posy)
+{
+ App->OuterOnTapUp(vec2(posx, posy));
+}
+
+extern "C" void AppOnScroll(int shiftx, int shifty)
+{
+ App->OuterOnMove(vec2(shiftx, shifty));
+}
+
diff --git a/ios/doublehitballs/ios_api.h b/ios/doublehitballs/ios_api.h
new file mode 100644
index 0000000..66b7e7f
--- /dev/null
+++ b/ios/doublehitballs/ios_api.h
@@ -0,0 +1,15 @@
+//
+// Header.h
+// doublehitballs
+//
+// Created by vvv ооо on 15.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+void AppInit();
+void AppDeinit();
+void AppUpdate(int dt);
+void AppDraw();
+void AppOnTapDown(int posx, int posy);
+void AppOnTapUp(int posx, int posy);
+void AppOnScroll(int shiftx, int shifty);
\ No newline at end of file
diff --git a/ios/doublehitballs/main.m b/ios/doublehitballs/main.m
new file mode 100644
index 0000000..f8b2c00
--- /dev/null
+++ b/ios/doublehitballs/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// doublehitballs
+//
+// Created by vvv ооо on 13.07.12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/ios/iTunesArtwork b/ios/iTunesArtwork
new file mode 100644
index 0000000..876e97d
Binary files /dev/null and b/ios/iTunesArtwork differ
diff --git a/jni/Android.mk b/jni/Android.mk
new file mode 100644
index 0000000..4b26ef4
--- /dev/null
+++ b/jni/Android.mk
@@ -0,0 +1,76 @@
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+LPATH := $(call my-dir)
+
+ENGINE_PATH = $(SalmonEnginePathCygwin)
+
+#BOOST_PATH = $(LibsPathCygwin)/boost_1_47_0
+BOOST_PATH = $(LibsPathCygwin)/boost_1_52_0
+
+OGG_PATH = $(LibsPathCygwin)/libogg-1.3.0
+
+VORBIS_PATH = $(LibsPathCygwin)/libvorbis-1.3.2
+
+SQUIRREL_PATH = $(LibsPathCygwin)/sqplus
+
+LIBPNG_PATH = $(LibsPathCygwin)/libpng_1.4.1_android
+
+ZIP_PATH = $(LibsPathCygwin)/julienr-libzip-android/jni
+
+#====== ENGINE AND LIBS =====================
+
+include $(ENGINE_PATH)/Android_Engine.mk
+
+#================= THE GAME =======================
+
+
+LOCAL_PATH:= $(LPATH)
+
+include $(CLEAR_VARS)
+
+LOCAL_CFLAGS := -DTARGET_ANDROID -DTARGET_HALIBUT -std=gnu++11
+LOCAL_STATIC_LIBRARIES := boost
+LOCAL_STATIC_LIBRARIES += squirrel
+LOCAL_STATIC_LIBRARIES += png_lib
+LOCAL_STATIC_LIBRARIES += zip
+LOCAL_SHARED_LIBRARIES := HalibutEngine
+LOCAL_C_INCLUDES := $(ENGINE_PATH)
+LOCAL_C_INCLUDES += $(BOOST_PATH)
+LOCAL_C_INCLUDES += $(VORBIS_PATH)/include
+LOCAL_C_INCLUDES += $(VORBIS_PATH)/include/vorbis
+LOCAL_C_INCLUDES += $(VORBIS_PATH)/lib
+LOCAL_C_INCLUDES += $(VORBIS_PATH)/lib/books
+LOCAL_C_INCLUDES += $(VORBIS_PATH)/lib/modes
+LOCAL_C_INCLUDES += $(OGG_PATH)/include
+LOCAL_C_INCLUDES += $(OGG_PATH)/include/ogg
+LOCAL_C_INCLUDES += $(SQUIRREL_PATH)/include
+LOCAL_C_INCLUDES += $(SQUIRREL_PATH)/sqplus
+LOCAL_C_INCLUDES += $(SQUIRREL_PATH)/squirrel
+LOCAL_C_INCLUDES += $(SQUIRREL_PATH)/sqstdlib
+LOCAL_C_INCLUDES += $(LIBPNG_PATH)
+LOCAL_C_INCLUDES += $(ZIP_PATH)
+LOCAL_MODULE := gl2jni
+LOCAL_SRC_FILES := main_code.cpp
+LOCAL_SRC_FILES += android_api.cpp
+LOCAL_SRC_FILES += menucode.cpp
+LOCAL_SRC_FILES += gamecode.cpp
+LOCAL_SRC_FILES += loadingcode.cpp
+LOCAL_SRC_FILES += creditscode.cpp
+LOCAL_LDLIBS := -lGLESv2
+LOCAL_LDLIBS += -llog -Wl,-s
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/Application.mk b/jni/Application.mk
new file mode 100644
index 0000000..824acab
--- /dev/null
+++ b/jni/Application.mk
@@ -0,0 +1,3 @@
+APP_STL := gnustl_static
+APP_CPPFLAGS += -fexceptions
+APP_CPPFLAGS += -frtti
\ No newline at end of file
diff --git a/jni/DoubleHitBalls.dev b/jni/DoubleHitBalls.dev
new file mode 100644
index 0000000..c7e6fb9
--- /dev/null
+++ b/jni/DoubleHitBalls.dev
@@ -0,0 +1,179 @@
+[Project]
+FileName=DoubleHitBalls.dev
+Name=DoubleHitBalls
+UnitCount=13
+Type=1
+Ver=1
+ObjFiles=
+Includes=C:\Workplace\Projects\Engine;C:\Workplace\android-ndk-r6b\platforms\android-8\arch-arm\usr\include;C:\Workplace\libs\boost_1_47_0;C:\Workplace\libs\openal;C:\Workplace\libs\libvorbis-1.3.2\include;C:\Workplace\libs\libogg-1.3.0\include
+Libs=
+PrivateResource=
+ResourceIncludes=
+MakeIncludes=
+Compiler=-DTARGET_ANDROID_@@_
+CppCompiler=-DTARGET_ANDROID_@@_
+Linker=
+IsCpp=1
+Icon=
+ExeOutput=
+ObjectOutput=
+OverrideOutput=0
+OverrideOutputName=DoubleHitBalls.exe
+HostApplication=
+Folders=
+CommandLine=
+UseCustomMakefile=0
+CustomMakefile=
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000000000000000
+
+[Unit1]
+FileName=main_code.cpp
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit2]
+FileName=main_code.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit3]
+FileName=menucode.cpp
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit4]
+FileName=menucode.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=
+FileDescription=Developed using the Dev-C++ IDE
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=
+AutoIncBuildNr=0
+
+[Unit5]
+FileName=gamecode.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit6]
+FileName=gamecode.cpp
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit7]
+FileName=game_area_interface.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit8]
+FileName=creditscode.cpp
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit9]
+FileName=creditscode.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit10]
+FileName=loadingcode.cpp
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit11]
+FileName=loadingcode.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit12]
+FileName=android_api.cpp
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit13]
+FileName=android_api.h
+CompileCpp=1
+Folder=DoubleHitBalls
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
diff --git a/jni/android_api.cpp b/jni/android_api.cpp
new file mode 100644
index 0000000..900eb3b
--- /dev/null
+++ b/jni/android_api.cpp
@@ -0,0 +1,177 @@
+#include "android_api.h"
+
+#include "main_code.h"
+
+boost::shared_ptr App(new TAndroidApplication);
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Init(JNIEnv * env, jobject obj, jint width, jint height)
+{
+ try
+ {
+ App->OuterInit(width, height, 480.f, 320.f);
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_StopSounds(JNIEnv * env, jobject obj)
+{
+ try
+ {
+ App->OuterDeinit(); //Clean up what is left at previous launch (if applicable)
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Update(JNIEnv * env, jobject obj, long dt)
+{
+ try
+ {
+
+ if (!App->IsInited())
+ {
+ return;
+ }
+ App->OuterDraw();
+ App->OuterUpdate(dt);
+
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+JNIEXPORT int JNICALL Java_fishrungames_doublehitballs_JniWrapper_IsInited(JNIEnv * env, jobject obj)
+{
+ try
+ {
+ if (App->IsInited())
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Destroy(JNIEnv * env, jobject obj)
+{
+ try
+ {
+ *Console<<"Destroy!!!\n";
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnTapDown(JNIEnv * env, jobject obj, float x, float y, long time)
+{
+ try
+ {
+ if (!App->IsInited())
+ {
+ return;
+ }
+
+ x = x * 480.f / Renderer->GetScreenWidth();
+ y = y * 320.f / Renderer->GetScreenHeight();
+
+ //*Console<<"Tap down "<GetScreenHeight())<<" "<IsInited())
+ {
+ return;
+ }
+
+ x = x * 480.f / Renderer->GetScreenWidth();
+ y = y * 320.f / Renderer->GetScreenHeight();
+
+ OnTapUpSignal(vec2(x, y));
+
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnTapMove(JNIEnv * env, jobject obj, float x, float y, long time)
+{
+}
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnFling(JNIEnv * env, jobject obj, jfloat velocityX, jfloat velocityY, long time)
+{
+
+ try
+ {
+
+ if (!App->IsInited())
+ {
+ return;
+ }
+
+ velocityX = velocityX * 480.f / Renderer->GetScreenWidth();
+ velocityY = velocityY * 320.f / Renderer->GetScreenHeight();
+
+ OnFlingSignal(vec2(velocityX, velocityY));
+
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+}
+
+JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnScroll(JNIEnv * env, jobject obj, jfloat distanceX, jfloat distanceY, long time)
+{
+ try
+ {
+ if (!App->IsInited())
+ {
+ return;
+ }
+
+ distanceX = distanceX * 480.f / Renderer->GetScreenWidth();
+ distanceY = distanceY * 320.f / Renderer->GetScreenHeight();
+ OnScrollSignal(vec2(distanceX, distanceY));
+
+ }
+ catch (ErrorCommon e)
+ {
+ throw;
+ }
+
+}
+
diff --git a/jni/android_api.h b/jni/android_api.h
new file mode 100644
index 0000000..9e7395e
--- /dev/null
+++ b/jni/android_api.h
@@ -0,0 +1,34 @@
+#ifndef ANDROID_API_H_INCLUDED
+#define ANDROID_API_H_INCLUDED
+
+#include
+#include
+
+#include
+#include
+#include
+
+#include "boost/shared_ptr.hpp"
+
+using namespace SE;
+
+
+class TAndroidApplication;
+extern boost::shared_ptr App;
+
+
+extern "C" {
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Init(JNIEnv * env, jobject obj, jint width, jint height);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_StopSounds(JNIEnv * env, jobject obj);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Update(JNIEnv * env, jobject obj, long dt);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Destroy(JNIEnv * env, jobject obj);
+ JNIEXPORT int JNICALL Java_fishrungames_doublehitballs_JniWrapper_IsInited(JNIEnv * env, jobject obj);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnTapDown(JNIEnv * env, jobject obj, jfloat x, jfloat y, long time);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnTapUp(JNIEnv * env, jobject obj, jfloat x, jfloat y, long time);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnTapMove(JNIEnv * env, jobject obj, jfloat x, jfloat y, long time);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnFling(JNIEnv * env, jobject obj, jfloat velocityX, jfloat velocityY, long time);
+ JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_OnScroll(JNIEnv * env, jobject obj, jfloat distanceX, jfloat distanceY, long time);
+};
+
+
+#endif
diff --git a/jni/creditscode.cpp b/jni/creditscode.cpp
new file mode 100644
index 0000000..8561096
--- /dev/null
+++ b/jni/creditscode.cpp
@@ -0,0 +1,79 @@
+#include "creditscode.h"
+#include "include/Engine.h"
+
+#include "main_code.h"
+
+const int TGameCredits::CONST_STATE_APPEARING = 0;
+const int TGameCredits::CONST_STATE_APPEARED = 1;
+const int TGameCredits::CONST_STATE_DISAPPEARING = 2;
+const int TGameCredits::CONST_STATE_DISAPPEARED = 3;
+
+const float TGameCredits::CONST_APPEAR_TIME = 150.f;
+
+TGameCredits::TGameCredits()
+ : TGameAreaAncestor()
+ , StateTimer(0)
+ , State(CONST_STATE_DISAPPEARED)
+{
+}
+
+void TGameCredits::Draw()
+{
+
+ float transparency = StateTimer/CONST_APPEAR_TIME;
+
+
+ RenderUniform1f("Transparency", transparency);
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList["main_menu_bkg_left"]);
+ Renderer->DrawRect(vec2(0, 0.f), vec2(480.f, 320.f));
+
+ const vec2 creditsPos(140.f, 130.f);
+
+ const vec2 creditsHalfSize(128.f, 128.f);
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_CREDITS_TEXTURE]);
+ Renderer->DrawRect(creditsPos-creditsHalfSize, creditsPos+creditsHalfSize);
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_LOGO_SMALL_TEXTURE]);
+ Renderer->DrawRect(vec2(240.f-128.f+15.f, 320.f-64.f), vec2(240.f+128.f+15.f, 320.f));
+
+ CheckGlError("Draw TGameCredits");
+}
+
+void TGameCredits::Update(cardinal dt)
+{
+ if (State == CONST_STATE_APPEARING)
+ {
+ StateTimer += dt;
+ if (StateTimer >= CONST_APPEAR_TIME)
+ {
+ StateTimer = CONST_APPEAR_TIME;
+ State = CONST_STATE_APPEARED;
+ }
+ }
+ else if (State == CONST_STATE_DISAPPEARING)
+ {
+ StateTimer -= dt;
+ if (StateTimer <= 0.f)
+ {
+ StateTimer = 0.f;
+ State = CONST_STATE_DISAPPEARED;
+ }
+ }
+}
+
+void TGameCredits::OnTapDown(vec2 p)
+{
+ App->GoFromCreditsToMenu();
+}
+
+void TGameCredits::StartAppear()
+{
+ State = CONST_STATE_APPEARING;
+}
+
+void TGameCredits::StartDisappear()
+{
+ State = CONST_STATE_DISAPPEARING;
+}
diff --git a/jni/creditscode.h b/jni/creditscode.h
new file mode 100644
index 0000000..47b866a
--- /dev/null
+++ b/jni/creditscode.h
@@ -0,0 +1,34 @@
+#ifndef CREDITSCODE_H_INCLUDED
+#define CREDITSCODE_H_INCLUDED
+
+#include "game_area_interface.h"
+
+using namespace SE;
+
+
+class TGameCredits : public TGameAreaAncestor
+{
+ static const int CONST_STATE_APPEARING;
+ static const int CONST_STATE_APPEARED;
+ static const int CONST_STATE_DISAPPEARING;
+ static const int CONST_STATE_DISAPPEARED;
+ static const float CONST_APPEAR_TIME;
+
+
+ int State;
+ float StateTimer;
+
+public:
+
+ TGameCredits();
+
+ virtual void Draw();
+ virtual void Update(cardinal dt);
+ virtual void OnTapDown(vec2 p);
+
+ void StartAppear();
+ void StartDisappear();
+};
+
+
+#endif
diff --git a/jni/game_area_interface.h b/jni/game_area_interface.h
new file mode 100644
index 0000000..7ae5fdb
--- /dev/null
+++ b/jni/game_area_interface.h
@@ -0,0 +1,23 @@
+#ifndef GAME_AREA_INTERFACE_H_INCLUDED
+#define GAME_AREA_INTERFACE_H_INCLUDED
+
+#include "include/Engine.h"
+
+using namespace SE;
+
+
+class TGameAreaAncestor
+{
+public:
+ virtual void Draw() { }
+ virtual void Update(cardinal) { }
+ virtual void OnTapUp(vec2) { }
+ virtual void OnTapDown(vec2) { }
+ virtual void OnFling(vec2) { }
+ virtual void OnScroll(vec2) { }
+
+ virtual ~TGameAreaAncestor() { } //By default destructor is not virtual
+};
+
+
+#endif
diff --git a/jni/gamecode.cpp b/jni/gamecode.cpp
new file mode 100644
index 0000000..26b345f
--- /dev/null
+++ b/jni/gamecode.cpp
@@ -0,0 +1,1589 @@
+#include "gamecode.h"
+#include "main_code.h"
+
+const int CONST_LEVELSTATE_STANDBY = 0;
+const int CONST_LEVELSTATE_PLAYING = 1;
+const int CONST_LEVELSTATE_GO_TO_PAUSE = 2;
+const int CONST_LEVELSTATE_PAUSE = 3;
+const int CONST_LEVELSTATE_LOADING = 4;
+const int CONST_LEVELSTATE_NODRAW = 5;
+const int CONST_LEVELSTATE_FINISH_FREEZE = 6;
+const int CONST_LEVELSTATE_FINISHED = 7;
+
+const float CONST_TIMER_LOADING = 150.f;
+
+const float CONST_PAUSE_APPEAR_TIME = 150.f;
+
+const float CONST_FINISH_FREEZE_TIME = 1000.f;
+const float CONST_FINISHING_TIME = 250.f;
+
+const float CONST_BALL_VELOCITY = 200.f;
+
+const vec2 CONST_SLIDE_UP_POS(240.f, 64.f);
+
+const vec2 CONST_TAP_TO_CONTINUE_POS(240.f, 200.f);
+
+bool operator<(const PairColorTexture& p1, const PairColorTexture& p2)
+{
+ if (p1.second == p2.second)
+ {
+ if (p1.first.v[0] == p2.first.v[0])
+ {
+ if (p1.first.v[1] == p2.first.v[1])
+ {
+ if (p1.first.v[2] == p2.first.v[2])
+ {
+ return p1.first.v[3] < p2.first.v[3];
+ }
+ else
+ {
+ return p1.first.v[2] < p2.first.v[2];
+ }
+ }
+ else
+ {
+ return p1.first.v[1] < p2.first.v[1];
+ }
+ }
+ else
+ {
+ return p1.first.v[0] < p2.first.v[0];
+ }
+ }
+
+ return (p1.second < p2.second);
+}
+
+
+TBrick::TBrick()
+ : State(CONST_BRICKSTATE_VISIBLE)
+ , StateTimer(0.f)
+ , Color(vec4(0.f, 0.f, 0.f, 1.f))
+ , Locked(0)
+ , InitialLocked(0)
+{
+}
+
+void TBrick::SetVisible(vec4 color, int locked)
+{
+ State = CONST_BRICKSTATE_VISIBLE;
+ Color = color;
+ InitialLocked = locked;
+ Locked = InitialLocked;
+}
+
+void TBrick::SetInvisible()
+{
+ State = CONST_BRICKSTATE_INVISIBLE;
+}
+
+void TBrick::TryDrawAppear(int ipos, int jpos)
+{
+ vec2 centerPos = GetPosFrom(ipos, jpos);
+
+ vec2 blockHalfSize = vec2(0.5f*CONST_BRICK_WIDTH, 0.5f*CONST_BRICK_HEIGHT);
+
+ std::string texName;
+ if (Locked == 2)
+ {
+ texName = CONST_BLOCK_TEXTURE3;
+ }
+ else if (Locked == 1)
+ {
+ texName = CONST_BLOCK_TEXTURE2;
+ }
+ else
+ {
+ texName = CONST_BLOCK_TEXTURE1;
+ }
+
+ if (State == CONST_BRICKSTATE_DISAPPEAR)
+ {
+
+ RenderUniform1f("Transparency", StateTimer/CONST_BRICK_DISAPPEAR_TIME);
+ RenderUniform4fv("BrickColor", Color.v);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[texName]);
+ Renderer->DrawRect(centerPos - blockHalfSize, centerPos + blockHalfSize);
+ }
+ else if (State == CONST_BRICKSTATE_APPEAR)
+ {
+
+ RenderUniform1f("Transparency", 1.f - StateTimer/CONST_BRICK_APPEAR_TIME);
+ RenderUniform4fv("BrickColor", Color.v);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[texName]);
+ Renderer->DrawRect(centerPos - blockHalfSize, centerPos + blockHalfSize);
+ }
+}
+
+void TBrick::Update(cardinal dt)
+{
+ if (State == CONST_BRICKSTATE_DISAPPEAR)
+ {
+ StateTimer -= dt;
+ if (StateTimer < 0.f)
+ {
+ StateTimer = 0.f;
+ State = CONST_BRICKSTATE_INVISIBLE;
+ }
+ }
+
+ if (State == CONST_BRICKSTATE_APPEAR)
+ {
+ StateTimer -= dt;
+ if (StateTimer < 0.f)
+ {
+ StateTimer = 0.f;
+ State = CONST_BRICKSTATE_VISIBLE;
+ }
+ }
+}
+
+vec4 TBrick::GetColor()
+{
+ return Color;
+}
+
+vec2 TBrick::GetPosFrom(int ipos, int jpos)
+{
+ const vec2 BorderShift(CONST_BRICK_SHIFT_X, CONST_BRICK_SHIFT_Y);
+
+ return BorderShift+vec2(CONST_BRICK_WIDTH*ipos + 0.5f*CONST_BRICK_WIDTH, 320.f - CONST_BRICK_HEIGHT*(jpos)-0.5f*CONST_BRICK_HEIGHT);
+
+}
+
+void TBrick::Disappear()
+{
+ StateTimer = CONST_BRICK_DISAPPEAR_TIME;
+ State = CONST_BRICKSTATE_DISAPPEAR;
+}
+
+void TBrick::Hit()
+{
+ if (Locked == 0)
+ {
+ Disappear();
+ }
+ else
+ {
+ Locked--;
+ }
+}
+
+void TBrick::Appear(vec4 color, int locked)
+{
+ StateTimer = CONST_BRICK_APPEAR_TIME;
+ State = CONST_BRICKSTATE_APPEAR;
+ Color = color;
+ InitialLocked = locked;
+ Locked = InitialLocked;
+}
+
+void TBrick::Appear()
+{
+ Appear(Color, InitialLocked);
+}
+
+int TBrick::GetLocked()
+{
+ return Locked;
+}
+
+bool TBrick::CanReact()
+{
+ return (State == CONST_BRICKSTATE_VISIBLE) || (State == CONST_BRICKSTATE_APPEAR);
+}
+
+//===========================================
+//===========================================
+//===========================================
+
+TBonusFalling::TBonusFalling(vec2 pos)
+ : BonusType(rand() % 3)
+ , Pos(pos)
+ , Lifetime(0.f)
+{
+
+ if (BonusType == 0)
+ {
+ TexName = CONST_BONUS_MULTIPLIER_TEXTURE;
+ }
+
+ if (BonusType == 1)
+ {
+ TexName = CONST_BONUS_GOTHROUGH_TEXTURE;
+ }
+
+ if (BonusType == 2)
+ {
+ TexName = CONST_BONUS_FLOOR_TEXTURE;
+ }
+
+}
+
+vec2 TBonusFalling::GetPos()
+{
+ return Pos;
+}
+
+int TBonusFalling::GetType()
+{
+ return BonusType;
+}
+
+
+void TBonusFalling::Draw()
+{
+ vec2 BonusHalfSize = vec2(16.f, 16.f);
+
+ float transparency = min(Lifetime/CONST_BONUS_APPEAR_TIME , 1.f);
+
+ RenderUniform4fv("BrickColor", vec4(1.0f, 1.0f, 1.0f, 1.0f).v);
+ RenderUniform1f("Transparency", transparency);
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[TexName]);
+ Renderer->DrawRect(Pos - BonusHalfSize, Pos + BonusHalfSize);
+
+}
+
+
+void TBonusFalling::Update(cardinal dt)
+{
+ Lifetime += dt;
+ Pos.v[1] -= dt * CONST_BONUS_FALL_SPEED / 1000.f;
+}
+
+//===========================================
+//===========================================
+//===========================================
+
+
+TBall::TBall(vec2 pos, vec2 velocity, vec4 color)
+ : Pos(pos)
+ , Velocity(velocity)
+ , Color(color)
+{
+ //must be 5
+ TalePos.push_back(Pos);
+ TalePos.push_back(Pos);
+ TalePos.push_back(Pos);
+ TalePos.push_back(Pos);
+ TalePos.push_back(Pos);
+}
+
+vec2 TBall::GetPos()
+{
+ return Pos;
+}
+
+vec2 TBall::GetVelocityVector()
+{
+ return Velocity;
+}
+
+void TBall::Go()
+{
+ Velocity = Normalize(vec2(2.f, 1.f));
+}
+
+void TBall::ReflectToLeft()
+{
+ if (Velocity.v[0] > 0.f)
+ {
+ Velocity.v[0] = - Velocity.v[0];
+ }
+}
+
+void TBall::ReflectToRight()
+{
+ if (Velocity.v[0] < 0.f)
+ {
+ Velocity.v[0] = - Velocity.v[0];
+ }
+}
+
+void TBall::ReflectToUp()
+{
+ if (Velocity.v[1] < 0.f)
+ {
+ Velocity.v[1] = - Velocity.v[1];
+ }
+}
+
+void TBall::ReflectToDown()
+{
+ if (Velocity.v[1] > 0.f)
+ {
+ Velocity.v[1] = - Velocity.v[1];
+ }
+}
+
+//function for reflector surface.
+float ReflectorPlaneFunction(float shift)
+{
+ /* _______
+ / \
+ | |
+ Something like this
+
+ */
+
+ if (shift>=-70.f && shift < -40.f)
+ {
+ float t = (shift+70.f)/30.f; //0 to 1
+ return 9.f + 21.f * t;
+ }
+
+ if (shift>=-40.f && shift < 40.f)
+ {
+ return 30.f;
+ }
+
+
+ if (shift >= 40.f && shift <= 70.f)
+ {
+ float t = (70.f - shift)/30.f; //1 to 0
+ return 9.f + 21.f * t;
+ }
+
+ return 0.f;
+}
+
+void TBall::TryReflectOnReflector(vec2 refPos)
+{
+ const float reflectionShiftY = 13.f;
+ const float reflectionMaxHeight = 30.f;
+
+
+
+ if ((Pos.v[1] < reflectionMaxHeight + reflectionShiftY) && Pos.v[1] > 0.0f && Velocity.v[1] < 0)
+ {
+ float dy = ReflectorPlaneFunction(Pos.v[0] - refPos.v[0]);
+
+ if (dy > 0 && (dy + reflectionShiftY > Pos.v[1]))
+ {
+ float shift = (Pos.v[0] - refPos.v[0]) / 128.f;
+ shift = min(shift, 0.5f);
+ shift = max(shift, -0.5f);
+ vec2 n = Normalize(vec2(shift, 1.0f));
+
+ Velocity = Velocity - n * 2.f * (Velocity.v[0]*n.v[0] + Velocity.v[1]*n.v[1]);
+ if ((Velocity.v[1] <= 0) || (fabs(Velocity.v[0]/Velocity.v[1]) > 4.f))
+ {
+ Velocity.v[0] = 4.f*sign(Velocity.v[0]);
+ Velocity.v[1] = 1.f;
+ Velocity = Normalize(Velocity);
+ }
+ }
+ }
+}
+
+
+void TBall::Update(cardinal dt)
+{
+ Pos += Velocity * (CONST_BALL_VELOCITY * dt / 1000.f);
+
+ TalePos.push_back(Pos);
+
+ if (TalePos.size() > 4)
+ {
+ TalePos.erase(TalePos.begin());
+ }
+}
+
+//===========================================
+//===========================================
+//===========================================
+
+
+TGameLevel::TGameLevel()
+{
+
+ BkgTexture = "bkg";
+
+ RenderBufferReady = false;
+ PrevLevelStateIsStandby = false;
+
+ OutScale = 1.f;
+ OutScaleVelocity = 0.f;
+
+ StateTimer = 0.f;
+
+ LevelState = CONST_LEVELSTATE_NODRAW;
+
+ BallColor = vec4(0.2f, 0.8f, 1.0f, 1.0f);
+
+ BonusFloorPosY = 0.f;
+
+}
+
+TGameLevel::~TGameLevel()
+{
+}
+
+
+
+void TGameLevel::ReloadBlockInstansingList()
+{
+ std::map ConstTextureBlockMap = boost::assign::map_list_of (0,CONST_BLOCK_TEXTURE1) (1,CONST_BLOCK_TEXTURE2) (2,CONST_BLOCK_TEXTURE3);
+
+ std::pair tempPair;
+ BlockInstansingList.ColorBlockList.clear();
+ /*
+ vec2 tex1 = vec2(0, 0);
+ vec2 tex2 = vec2(0, 1);
+ vec2 tex3 = vec2(1, 1);
+ vec2 tex4 = vec2(1, 0);
+ */
+
+ for (int i=0; i>::iterator itr = BlockInstansingList.ColorBlockList.end();
+
+ for (auto i = BlockInstansingList.ColorBlockList.begin(); i != BlockInstansingList.ColorBlockList.end(); ++i)
+ {
+ if (i->first == tempPair)
+ {
+ itr = i;
+ }
+ }
+
+ if (itr == BlockInstansingList.ColorBlockList.end())
+ {
+ BlockInstansingList.ColorBlockList.push_back(std::pair(tempPair, TTriangleList()));
+ itr = BlockInstansingList.ColorBlockList.end();
+
+ itr--;
+ }
+
+ vec2 posFrom = BlockMatrix[i][j].GetPosFrom(i,j) + vec2(-0.5f*CONST_BRICK_WIDTH, -0.5f*CONST_BRICK_HEIGHT);
+ vec2 posTo = BlockMatrix[i][j].GetPosFrom(i,j) + vec2(+0.5f*CONST_BRICK_WIDTH, +0.5f*CONST_BRICK_HEIGHT);
+
+ itr->second.Data += MakeDataTriangleList(posFrom, posTo);
+
+ /*
+ itr->second.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(vec3(pos1, 0));
+ itr->second.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(vec3(pos2, 0));
+ itr->second.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(vec3(pos3, 0));
+
+ itr->second.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(vec3(pos3, 0));
+ itr->second.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(vec3(pos4, 0));
+ itr->second.Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(vec3(pos1, 0));
+
+ itr->second.Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(tex1);
+ itr->second.Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(tex2);
+ itr->second.Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(tex3);
+
+ itr->second.Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(tex3);
+ itr->second.Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(tex4);
+ itr->second.Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(tex1);
+ */
+ }
+ }
+ }
+
+ for (auto it = BlockInstansingList.ColorBlockList.begin(); it != BlockInstansingList.ColorBlockList.end(); ++it)
+ {
+ it->second.RefreshBuffer();
+ }
+
+}
+
+vec2 TGameLevel::GetBlock(const vec2& pos)
+{
+
+ int x = static_cast((pos.v[0] - CONST_BRICK_SHIFT_X) / CONST_BRICK_WIDTH);
+ int y = static_cast((320.0f + CONST_BRICK_SHIFT_Y - pos.v[1]) / CONST_BRICK_HEIGHT);
+
+ if (x < 0)
+ x = 0;
+
+ if (x > CONST_BRICKMATRIX_WIDTH-1)
+ x = CONST_BRICKMATRIX_WIDTH-1;
+
+ if (y < 0)
+ y = 0;
+
+ if (y > CONST_BRICKMATRIX_HEIGHT-1)
+ y = CONST_BRICKMATRIX_HEIGHT-1;
+
+ return vec2(x, y);
+}
+
+bool TGameLevel::TapInBackBtnArea(const vec2& pos)
+{
+ return (pos.v[1] > 320.f - 64.f) && (pos.v[0]>=240.f-75.f) && (pos.v[0]<=240.f+75.f);
+}
+
+void TGameLevel::SetFinishFreeze()
+{
+ StateTimer = CONST_FINISH_FREEZE_TIME;
+
+ LevelState = CONST_LEVELSTATE_FINISH_FREEZE;
+
+}
+
+void TGameLevel::SetFinished()
+{
+ StateTimer = CONST_FINISHING_TIME;
+
+ LevelState = CONST_LEVELSTATE_FINISHED;
+
+ OutScale = 1.f;
+}
+
+vec4 TGameLevel::ParseColor(const std::string& s)
+{
+ vec4 r;
+ std::string ss(s);
+
+ int i = ss.find(", ");
+ int c = toint(ss.substr(0, i));
+ ss.erase(0, i+2);
+ r.v[0] = c / 255.f;
+
+ i = ss.find(", ");
+ c = toint(ss.substr(0, i));
+ ss.erase(0, i+2);
+ r.v[1] = c / 255.f;
+
+ i = ss.find(", ");
+ c = toint(ss.substr(0, i));
+ ss.erase(0, i+2);
+ r.v[2] = c / 255.f;
+
+ c = toint(ss);
+ r.v[3] = c / 255.f;
+
+ return r;
+}
+
+void TGameLevel::ReloadLevel()
+{
+ cardinal byteCount;
+ boost::shared_array file = CreateMemFromFile(LevelFileName, byteCount);
+ std::string fileString(&file[0]);
+ char c;
+ //int n = 0;
+
+
+ std::vector rows;
+ int rowLen;
+ while (fileString.size() > 0)
+ {
+ rowLen = fileString.find(fendl);
+ rows.push_back(fileString.substr(0, rowLen));
+ fileString.erase(0, rowLen+2);
+ }
+
+ std::vector::iterator rowIterator = rows.begin();
+ BallColor = ParseColor(*rowIterator);
+ ++rowIterator;
+
+ std::vector colors;
+
+ vec4 tc;
+
+ while (*rowIterator != "Colormap")
+ {
+ tc = ParseColor(*rowIterator);
+ colors.push_back(tc);
+ ++rowIterator;
+ }
+
+ std::vector::iterator rowColorIterator;
+ std::vector::iterator rowLockIterator;
+
+ rowColorIterator = rowIterator + 1;
+
+ rowLockIterator = rowColorIterator + 14;
+
+
+
+ for (int j=0; jBallInBlock = GetBlock(ballPos);
+ BallList.begin()->PrevBallInBlock = BallList.begin()->BallInBlock;
+
+ BonusGothroughTimer = 0.f;
+ BonusFloorTimer = 0.f;
+
+ BonusFallingList.clear();
+
+ RenderBufferReady = false;
+
+ ReloadBallInstancingList();
+
+ BonusFloorPosY = 0.f;
+
+}
+
+bool TGameLevel::IsLoaded()
+{
+ return (LevelState == CONST_LEVELSTATE_STANDBY);
+}
+
+void TGameLevel::Draw()
+{
+
+ if (LevelState == CONST_LEVELSTATE_NODRAW)
+ {
+ CheckGlError();
+ return;
+ }
+
+ if (LevelState == CONST_LEVELSTATE_LOADING)
+ {
+ Renderer->PushMatrix();
+ float scale = 1.f - 0.5f*StateTimer/CONST_TIMER_LOADING;
+ if (scale < 0.5f)
+ scale = 0.5f;
+
+ if (scale > 1.f)
+ scale = 1.f;
+
+ Renderer->TranslateMatrix(vec3(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
+ Renderer->ScaleMatrix(scale);
+ Renderer->TranslateMatrix(-vec3(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[LevelScreenTexture]);
+ Renderer->DrawRect(vec2(0, 0), vec2(480.f, 320.f));
+ Renderer->PopMatrix();
+ CheckGlError();
+ return;
+ }
+
+
+ bool mustShowButtons = ((LevelState == CONST_LEVELSTATE_PAUSE) || (LevelState == CONST_LEVELSTATE_GO_TO_PAUSE));
+
+ bool pause = (mustShowButtons || (LevelState == CONST_LEVELSTATE_FINISHED));
+
+
+ bool renderBufferReady = RenderBufferReady;
+
+ if (pause && renderBufferReady)
+ {
+
+ //See also below (same method)
+ Renderer->PushMatrix();
+ Renderer->TranslateMatrix(vec3(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
+ Renderer->ScaleMatrix(OutScale);
+ Renderer->TranslateMatrix(-vec3(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
+ DrawBuffer();
+
+ if (mustShowButtons)
+ {
+ DrawPauseButtons();
+ }
+ Renderer->PopMatrix();
+ CheckGlError();
+ return;
+ }
+
+ if (pause && !renderBufferReady)
+ {
+
+ Renderer->SwitchToFrameBuffer("LevelBuffer");
+ Renderer->SetProjectionMatrix(480.f, 320.f);
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
+ CheckGlError();
+ }
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[BkgTexture]);
+ Renderer->DrawRect(vec2(0, 0), vec2(480.f, 320.f));
+
+ std::list::iterator iBall;
+
+ Renderer->PushShader("BrickShader");
+
+
+ for (int i=0; i>::iterator colorBlockIterator;
+ for (colorBlockIterator = BlockInstansingList.ColorBlockList.begin(); colorBlockIterator != BlockInstansingList.ColorBlockList.end(); ++colorBlockIterator)
+ {
+ RenderUniform4fv("BrickColor", colorBlockIterator->first.first.v);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[colorBlockIterator->first.second]);
+
+ Renderer->DrawTriangleList(colorBlockIterator->second);
+ }
+
+ std::list::iterator iBonus;
+
+ for (iBonus = BonusFallingList.begin(); iBonus != BonusFallingList.end(); ++iBonus)
+ {
+ iBonus->Draw();
+ }
+
+ DrawBallInstancingList();
+
+ Renderer->PopShader();
+
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_REFLECTOR_TEXTURE]);
+ Renderer->DrawRect(vec2(-128.f, -16.f)+ReflectorPos, vec2(128.f, 16.f)+ReflectorPos);
+
+
+ const vec2 wallUpPos1(240.f-256.f, 320.f-64.f);
+ const vec2 wallUpPos2(240.f+256.f, 320.f);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_UP_TEXTURE]);
+ Renderer->DrawRect(wallUpPos1, wallUpPos2);
+
+ const vec2 wallLeftPos1(0.f, 320.f - 512.f);
+ const vec2 wallLeftPos2(32.f, 320.f);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_LEFT_TEXTURE]);
+ Renderer->DrawRect(wallLeftPos1, wallLeftPos2);
+
+ const vec2 wallRightPos1(480.f-32.f, 320.f - 512.f);
+ const vec2 wallRightPos2(480.f, 320.f);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_RIGHT_TEXTURE]);
+ Renderer->DrawRect(wallRightPos1, wallRightPos2);
+
+
+ if (BonusFloorTimer>0.f)
+ {
+
+ const vec2 wallDownPos(240.f, BonusFloorPosY);
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_BONUS_TEXTURE]);
+
+ Renderer->DrawRect(vec2(-256.f, -16.f)+wallDownPos, vec2(256.f, 16.f)+wallDownPos);
+ }
+
+
+ if (!pause)
+ {
+ RenderUniform1f("Transparency", 1.f);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_BACK_BTN_TEXTURE]);
+ const vec2 BackBtnPos(240.f, 320.f - 32.f - 20.f);
+ Renderer->DrawRect(vec2(-128.f, -32.f)+BackBtnPos, vec2(128.f, 32.f)+BackBtnPos);
+ }
+
+ if (pause && !renderBufferReady)
+ {
+
+ //ololo
+ //See also above (same method)
+ Renderer->SwitchToScreen();
+
+ Renderer->PushMatrix();
+ //Renderer->LoadIdentity();
+ Renderer->TranslateMatrix(vec3(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
+ Renderer->ScaleMatrix(OutScale);
+ Renderer->TranslateMatrix(-vec3(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
+ DrawBuffer();
+ if (mustShowButtons)
+ {
+ DrawPauseButtons();
+ }
+ Renderer->PopMatrix();
+ RenderBufferReady = true;
+ CheckGlError();
+ }
+ CheckGlError();
+}
+
+void TGameLevel::DrawPauseButtons()
+{
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_SLIDE_UP_BTN_TEXTURE]);
+ Renderer->DrawRect(vec2(-128.f, -64.f)+CONST_SLIDE_UP_POS, vec2(128.f, 64.f)+CONST_SLIDE_UP_POS);
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_TAP_TO_CONTINUE_BTN_TEXTURE]);
+ Renderer->DrawRect(vec2(-128.f, -128.f)+CONST_TAP_TO_CONTINUE_POS, vec2(128.f, 128.f)+CONST_TAP_TO_CONTINUE_POS);
+
+}
+
+void TGameLevel::DrawBallInstancingList()
+{
+ RenderUniform1f("Transparency", 1.f);
+ RenderUniform4fv("BrickColor", BallColor.v);
+
+ if (BonusGothroughTimer > 0.f)
+ {
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_BALLGLOW_TEXTURE]);
+
+ Renderer->DrawTriangleList(BallInstancingList.BallAndGlowList[1]);
+ }
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_BALL_TEXTURE]);
+
+ Renderer->DrawTriangleList(BallInstancingList.BallAndGlowList[0]);
+
+}
+
+void TGameLevel::DrawBuffer()
+{
+
+ Renderer->PushShader("FrameShader");
+ float brightness;
+ if (CONST_LEVELSTATE_GO_TO_PAUSE)
+ {
+ brightness = 0.3f + 0.7f * StateTimer / CONST_PAUSE_APPEAR_TIME;
+ }
+ else
+ {
+ brightness = 0.3f;
+ }
+
+ RenderUniform1f("Brightness", brightness);
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->FrameManager.GetFrameTexture("LevelBuffer"));
+
+ //Matrix switched to identity
+ //vec2 RectPos = vec2(-1, -1);
+ //vec2 RectSize = vec2(2, 2);
+ vec2 RectPos = vec2(240.f, 160.f);
+ vec2 RectSize = vec2(240.f, 160.f);
+
+ Renderer->DrawRect(RectPos-RectSize, RectPos+RectSize);
+
+ Renderer->PopShader();
+
+ CheckGlError();
+}
+
+void TGameLevel::SetPause()
+{
+ OutScaleVelocity = 0.f;
+ OutScale = 1.f;
+ RenderBufferReady = false;
+ LevelState = CONST_LEVELSTATE_GO_TO_PAUSE;
+ StateTimer = CONST_PAUSE_APPEAR_TIME;
+ App->MarkSetGameLevelPause();
+}
+
+void TGameLevel::ReleasePause()
+{
+ RenderBufferReady = false;
+
+ if (PrevLevelStateIsStandby)
+ {
+ LevelState = CONST_LEVELSTATE_STANDBY;
+ PrevLevelStateIsStandby = false;
+ }
+ else
+ {
+ LevelState = CONST_LEVELSTATE_PLAYING;
+ }
+ App->MarkReleaseGameLevelPause();
+}
+
+bool TGameLevel::IsPaused()
+{
+ return ((LevelState == CONST_LEVELSTATE_PAUSE) || (LevelState == CONST_LEVELSTATE_GO_TO_PAUSE) || (LevelState == CONST_LEVELSTATE_FINISHED));
+}
+
+void TGameLevel::Update(cardinal dt)
+{
+
+ if (LevelState == CONST_LEVELSTATE_NODRAW)
+ {
+ return;
+ }
+
+ if (LevelState == CONST_LEVELSTATE_GO_TO_PAUSE)
+ {
+ StateTimer -= dt;
+ if (StateTimer <= 0.f)
+ {
+ StateTimer = 0.f;
+ LevelState = CONST_LEVELSTATE_PAUSE;
+ }
+
+ return;
+ }
+
+ if (LevelState == CONST_LEVELSTATE_PAUSE)
+ {
+ OutScale += OutScaleVelocity * dt;
+ TryGoToMenu();
+ CheckGlError();
+ return;
+ }
+
+ if (LevelState == CONST_LEVELSTATE_FINISHED)
+ {
+ StateTimer -= dt;
+
+ OutScale = StateTimer/CONST_FINISHING_TIME;
+
+ if (StateTimer <= 0.f)
+ {
+ TryGoToMenu();
+ }
+ CheckGlError();
+ return;
+ }
+
+
+ if (LevelState == CONST_LEVELSTATE_LOADING)
+ {
+ StateTimer -= dt;
+ if (StateTimer <= 0.f)
+ {
+ StateTimer = 0.f;
+ RenderBufferReady = false;
+ LevelState = CONST_LEVELSTATE_STANDBY;
+ }
+ }
+
+ if (LevelState == CONST_LEVELSTATE_FINISH_FREEZE)
+ {
+ StateTimer -= dt;
+
+ if (StateTimer <= 0.f)
+ {
+ SetFinished();
+ CheckGlError();
+ return;
+ }
+
+ //To make the whole scene like freeze
+ dt = static_cast(dt / max((CONST_FINISH_FREEZE_TIME-StateTimer)/100.f, 1.f));
+
+ }
+
+ if (BonusGothroughTimer > 0.f)
+ {
+ BonusGothroughTimer -= dt;
+ BonusGothroughTimer = max(BonusGothroughTimer, 0.f);
+ }
+
+ if (BonusFloorTimer > 0.f)
+ {
+ BonusFloorTimer -= dt;
+ BonusFloorTimer = max(BonusFloorTimer, 0.f);
+ }
+
+ UpdateBallList(dt);
+
+
+ for (int i=0; i::iterator iBonus = BonusFallingList.begin();
+
+ while (iBonus != BonusFallingList.end())
+ {
+ iBonus->Update(dt);
+
+ if ((fabs(ReflectorPos.v[0] - iBonus->GetPos().v[0])GetPos().v[1])GetType();
+ iBonus = BonusFallingList.erase(iBonus);
+
+
+ if (bonusType == CONST_BONUS_TYPE_GOTHROUGH)
+ {
+ BonusGothroughTimer = CONST_BONUS_GOTHROUGH_TIME;
+ }
+ else if (bonusType == CONST_BONUS_TYPE_MULTIPLIER)
+ {
+ vec2 pos = BallList.begin()->GetPos();
+ vec2 velocity = BallList.begin()->GetVelocityVector();
+ MultiplyBalls(pos, velocity);
+ }
+ else if (bonusType == CONST_BONUS_TYPE_FLOOR)
+ {
+ BonusFloorTimer = CONST_BONUS_FLOOR_TIME;
+ }
+
+ }
+ else if (iBonus->GetPos().v[1] < -15.f)
+ {
+ iBonus = BonusFallingList.erase(iBonus);
+ }
+
+ if (iBonus != BonusFallingList.end())
+ {
+ ++iBonus;
+ }
+ }
+
+ //Bonus floor pos
+ if (BonusFloorTimer/CONST_BONUS_GOTHROUGH_TIME < 0.2f)
+ {
+ //Bonus must go down until 0.f
+ if (BonusFloorPosY > 0.f)
+ {
+ BonusFloorPosY -= CONST_BONUS_FLOOR_APPEAR_SPEED * dt / 1000.f;
+ BonusFloorPosY = max(BonusFloorPosY, 0.f);
+ }
+
+ }
+ else
+ {
+ //Bonus must go up until 16.f
+ if (BonusFloorPosY < 16.f)
+ {
+ BonusFloorPosY += CONST_BONUS_FLOOR_APPEAR_SPEED * dt / 1000.f;
+ BonusFloorPosY = min(BonusFloorPosY, 16.f);
+ }
+ }
+
+
+ bool noMoreBlocks = true;
+
+ for (int i=0; iOpenNextLevel();
+ App->MarkSetGameLevelPause();
+ SetFinishFreeze();
+ CheckGlError();
+
+ }
+
+ if (BallList.size() == 0 && LevelState != CONST_LEVELSTATE_FINISH_FREEZE)
+ {
+ SetStandBy();
+ }
+
+}
+
+
+
+void TGameLevel::ReloadBallInstancingList()
+{
+ //Changing this function? Don't forget to change next one!
+
+ BallInstancingList.BallAndGlowList.clear();
+
+ std::list::iterator i;
+ /*
+ vec3 p1;
+ vec3 p2;
+ vec3 p3;
+ vec3 p4;
+
+ vec2 t1 = vec2(0.0f, 0.0f);
+ vec2 t2 = vec2(0.0f, 1.0f);
+ vec2 t3 = vec2(1.0f, 1.0f);
+ vec2 t4 = vec2(1.0f, 0.0f);
+ */
+
+
+ for (i = BallList.begin(); i != BallList.end(); ++i)
+ {
+ /*
+ p1 = vec3(i->Pos, 0.f) + vec3(-8.f, -8.f, 0.f);
+ p2 = vec3(i->Pos, 0.f) + vec3(-8.f, +8.f, 0.f);
+ p3 = vec3(i->Pos, 0.f) + vec3(+8.f, +8.f, 0.f);
+ p4 = vec3(i->Pos, 0.f) + vec3(+8.f, -8.f, 0.f);
+
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p1);
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p2);
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p3);
+
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p3);
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p4);
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p1);
+
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t1);
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t2);
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t3);
+
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t3);
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t4);
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t1);
+ */
+
+ BallInstancingList.BallAndGlowList[0].Data += MakeDataTriangleList(i->Pos + vec2(-8.f, -8.f), i->Pos + vec2(8.f, 8.f));
+
+ //Replace6PointsInTriangleList(BallInstancingList.BallAndGlowList[0].Data, n, i->Pos + vec2(-8.f, -8.f), i->Pos + vec2(8.f, 8.f));
+
+ //n += 6;
+ }
+
+ std::list::iterator j;
+
+ for (i = BallList.begin(); i != BallList.end(); ++i)
+ {
+ for (j = i->TalePos.begin(); j != i->TalePos.end(); ++j)
+ {
+ /*
+ p1 = vec3(*j, 0.f) + vec3(-16.f, -16.f, 0.f);
+ p2 = vec3(*j, 0.f) + vec3(-16.f, +16.f, 0.f);
+ p3 = vec3(*j, 0.f) + vec3(+16.f, +16.f, 0.f);
+ p4 = vec3(*j, 0.f) + vec3(+16.f, -16.f, 0.f);
+
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p1);
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p2);
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p3);
+
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p3);
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p4);
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB].push_back(p1);
+
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t1);
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t2);
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t3);
+
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t3);
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t4);
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB].push_back(t1);
+ */
+ BallInstancingList.BallAndGlowList[1].Data += MakeDataTriangleList(*j + vec2(-16.f, -16.f), *j + vec2(16.f, 16.f));
+ //Replace6PointsInTriangleList(BallInstancingList.BallAndGlowList[1].Data, n, *j + vec2(-16.f, -16.f), *j + vec2(16.f, 16.f));
+
+ //n += 6;
+ }
+ }
+
+ //std::map::iterator it;
+
+ auto it = BallInstancingList.BallAndGlowList.begin();
+
+ for (; it != BallInstancingList.BallAndGlowList.end(); ++it)
+ //for (auto it = BallInstancingList.BallAndGlowList.begin(); it != BallInstancingList.BallAndGlowList.end(); ++it)
+
+ {
+ it->second.RefreshBuffer();
+ }
+
+}
+
+void TGameLevel::RefreshBallInstancingList()
+{
+ //Changing this function? Don't forget to change previous one!
+ /*
+ vec3 p1;
+ vec3 p2;
+ vec3 p3;
+ vec3 p4;
+
+ vec2 t1 = vec2(0.0f, 0.0f);
+ vec2 t2 = vec2(0.0f, 1.0f);
+ vec2 t3 = vec2(1.0f, 1.0f);
+ vec2 t4 = vec2(1.0f, 0.0f);
+ */
+ int n = 0;
+ int m = 0;
+
+ std::list::iterator i;
+
+ for (i = BallList.begin(); i != BallList.end(); ++i)
+ {
+ /*
+ p1 = vec3(i->Pos, 0.f) + vec3(-8.f, -8.f, 0.f);
+ p2 = vec3(i->Pos, 0.f) + vec3(-8.f, +8.f, 0.f);
+ p3 = vec3(i->Pos, 0.f) + vec3(+8.f, +8.f, 0.f);
+ p4 = vec3(i->Pos, 0.f) + vec3(+8.f, -8.f, 0.f);
+
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p1;
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p2;
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p3;
+
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p3;
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p4;
+ BallInstancingList.BallAndGlowList[0].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p1;
+
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t1;
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t2;
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t3;
+
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t3;
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t4;
+ BallInstancingList.BallAndGlowList[0].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t1;
+ */
+
+ Replace6PointsInTriangleList(BallInstancingList.BallAndGlowList[0].Data, n, i->Pos + vec2(-8.f, -8.f), i->Pos + vec2(8.f, 8.f));
+
+ n += 6;
+ }
+
+ std::list::iterator j;
+
+ n = 0;
+ m = 0;
+
+ for (i = BallList.begin(); i != BallList.end(); ++i)
+ {
+ for (j = i->TalePos.begin(); j != i->TalePos.end(); ++j)
+ {
+ /*
+ p1 = vec3(*j, 0.f) + vec3(-16.f, -16.f, 0.f);
+ p2 = vec3(*j, 0.f) + vec3(-16.f, +16.f, 0.f);
+ p3 = vec3(*j, 0.f) + vec3(+16.f, +16.f, 0.f);
+ p4 = vec3(*j, 0.f) + vec3(+16.f, -16.f, 0.f);
+
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p1;
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p2;
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p3;
+
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p3;
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p4;
+ BallInstancingList.BallAndGlowList[1].Vec3CoordArr[CONST_STRING_POSITION_ATTRIB][n++] = p1;
+
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t1;
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t2;
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t3;
+
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t3;
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t4;
+ BallInstancingList.BallAndGlowList[1].Vec2CoordArr[CONST_STRING_TEXCOORD_ATTRIB][m++] = t1;*/
+ //BallInstancingList.BallAndGlowList[1].Data += MakeDataTriangleList();
+
+ Replace6PointsInTriangleList(BallInstancingList.BallAndGlowList[1].Data, n, *j + vec2(-16.f, -16.f), *j + vec2(16.f, 16.f));
+
+ n += 6;
+
+ }
+ }
+
+ std::map::iterator it;
+
+ for (it = BallInstancingList.BallAndGlowList.begin(); it != BallInstancingList.BallAndGlowList.end(); ++it)
+ {
+ it->second.RefreshBuffer();
+ }
+
+}
+
+
+void TGameLevel::UpdateBallList(cardinal dt)
+{
+ std::list::iterator iBall;
+
+ bool mustReloadBalls = false;
+
+ //If not loaded - force load
+ if (BallInstancingList.BallAndGlowList.size() == 0)
+ {
+ mustReloadBalls = true;
+ }
+
+ if (BonusFloorTimer == 0.f)
+ {
+ vec2 ballPos;
+
+ iBall = BallList.begin();
+
+ while (iBall != BallList.end())
+ {
+ ballPos = iBall->GetPos();
+
+ if (ballPos.v[1]<0.f)
+ {
+ iBall = BallList.erase(iBall);
+ mustReloadBalls = true;
+ }
+
+ if (iBall != BallList.end())
+ {
+ ++iBall;
+ }
+ }
+
+ }
+
+ bool blockListChanged = false;
+
+ for (iBall = BallList.begin(); iBall != BallList.end(); ++iBall)
+ {
+
+
+ iBall->Update(dt);
+
+ vec2 ballPos = iBall->GetPos();
+
+
+ if (ballPos.v[0] > 480.f-15.f)
+ {
+ iBall->ReflectToLeft();
+ }
+
+ if (ballPos.v[0] < 15.f)
+ {
+ iBall->ReflectToRight();
+ }
+
+ if (ballPos.v[1] > 320.0f-16.f)
+ {
+ iBall->ReflectToDown();
+ }
+
+ if (BonusFloorTimer > 0.f)
+ {
+ if (ballPos.v[1] < 13.0f)
+ {
+ iBall->ReflectToUp();
+ }
+ }
+
+ iBall->TryReflectOnReflector(ReflectorPos);
+
+ vec2 ipos = GetBlock(ballPos);
+ if (!(ipos == iBall->BallInBlock))
+ {
+ iBall->PrevBallInBlock = iBall->BallInBlock;
+ iBall->BallInBlock = ipos;
+
+ int i = static_cast(iBall->BallInBlock.v[0]);
+ int j = static_cast(iBall->BallInBlock.v[1]);
+
+ int iprev = static_cast(iBall->PrevBallInBlock.v[0]);
+ int jprev = static_cast(iBall->PrevBallInBlock.v[1]);
+
+
+ if (BlockMatrix[i][j].CanReact())
+ {
+ bool canThrowBonus;
+
+ blockListChanged = true;
+
+ if (BonusGothroughTimer > 0.f)
+ {
+ BlockMatrix[i][j].Disappear();
+ canThrowBonus = true;
+
+ }
+ else
+ {
+ canThrowBonus = (BlockMatrix[i][j].GetLocked() == 0);
+
+ BlockMatrix[i][j].Hit();
+
+ }
+
+ vec2 blockPos = BlockMatrix[i][j].GetPosFrom(i, j);
+
+
+ if (canThrowBonus && rand() % 20 == 0)
+ {
+ BonusFallingList.push_back(TBonusFalling(blockPos));
+ }
+
+
+ if (BonusGothroughTimer == 0.f)
+ {
+ if (j < jprev)
+ {
+ iBall->ReflectToDown();
+ }
+ else
+ if (j > jprev)
+ {
+ iBall->ReflectToUp();
+ }
+ else
+ if (i < iprev)
+ {
+ iBall->ReflectToRight();
+ }
+ else
+ if (i > iprev)
+ {
+ iBall->ReflectToLeft();
+ }
+ }
+
+
+ }
+
+ }
+
+ }
+
+ if (blockListChanged)
+ {
+ ReloadBlockInstansingList();
+ }
+
+ if (mustReloadBalls)
+ {
+ ReloadBallInstancingList();
+ }
+ else
+ {
+ RefreshBallInstancingList();
+ }
+}
+
+void TGameLevel::MultiplyBalls(vec2 pos, vec2 velocity)
+{
+ mat2 r;
+ vec2 v;
+
+ for (int i = -2; i<=2; i++)
+ {
+ r = mat2(i*pi/4.f);
+ v = r*velocity;
+
+ v.v[1] = max(static_cast(fabs(v.v[1])), 0.2f) * sign(v.v[1]); //Prevent velocityY from being ~= 0
+
+ BallList.push_back(TBall(pos, v, BallColor));
+ }
+
+ ReloadBallInstancingList();
+}
+
+
+void TGameLevel::OnTapDown(vec2 pos)
+{
+ if (LevelState == CONST_LEVELSTATE_STANDBY)
+ {
+ if (TapInBackBtnArea(pos))
+ {
+ SetPause();
+ PrevLevelStateIsStandby = true;
+ }
+ else
+ {
+
+ LevelState = CONST_LEVELSTATE_PLAYING;
+ BallList.begin()->Go();
+ }
+ }
+ else if (LevelState == CONST_LEVELSTATE_PLAYING)
+ {
+
+
+ if (TapInBackBtnArea(pos))
+ {
+ SetPause();
+ }
+ else if (fabs(ReflectorPos.v[0] - pos.v[0])>64.f)
+ {
+ ReflectorPos.v[0] = pos.v[0];
+ }
+
+ }
+ else if (LevelState == CONST_LEVELSTATE_PAUSE)
+ {
+ if (pos.v[1] > 128.f)
+ {
+ ReleasePause();
+ }
+ }
+}
+
+void TGameLevel::OnTapUp(vec2 pos)
+{
+}
+
+void TGameLevel::OnFling(vec2 slideSpeed)
+{
+ if (LevelState == CONST_LEVELSTATE_PAUSE)
+ {
+ OutScaleVelocity = slideSpeed.v[1]/320.f;
+ }
+}
+
+void TGameLevel::OnScroll(vec2 shift)
+{
+ const float CONST_SCROLL_SCALE = 1.1f;
+ if (LevelState == CONST_LEVELSTATE_PLAYING || LevelState == CONST_LEVELSTATE_STANDBY)
+ {
+ ReflectorPos.v[0] -= CONST_SCROLL_SCALE*shift.v[0];
+ }
+ else if (LevelState == CONST_LEVELSTATE_PAUSE)
+ {
+
+#ifdef TARGET_WIN32
+ OutScale += shift.v[1]/320.f;
+#else
+ OutScale -= shift.v[1]/320.f;
+#endif
+ TryGoToMenu();
+ }
+}
+
+void TGameLevel::TryGoToMenu()
+{
+ if (OutScale < 0.5f)
+ {
+ OutScale = 0.5f;
+ LevelState = CONST_LEVELSTATE_NODRAW;
+ App->GoFromGameToMenu();
+ }
+ if (OutScale > 1.f)
+ {
+ OutScale = 1.f;
+ }
+}
diff --git a/jni/gamecode.h b/jni/gamecode.h
new file mode 100644
index 0000000..48c7c1f
--- /dev/null
+++ b/jni/gamecode.h
@@ -0,0 +1,205 @@
+#ifndef GAMECODE_H_INCLUDED
+#define GAMECODE_H_INCLUDED
+
+#include "include/Engine.h"
+#include "game_area_interface.h"
+
+#include
+
+using namespace SE;
+
+
+const int CONST_BRICKSTATE_VISIBLE = 3;
+const int CONST_BRICKSTATE_DISAPPEAR = 2;
+const int CONST_BRICKSTATE_INVISIBLE = 1;
+const int CONST_BRICKSTATE_APPEAR = 0;
+
+const float CONST_BRICK_DISAPPEAR_TIME = 200.f;
+const float CONST_BRICK_APPEAR_TIME = 200.f;
+
+const int CONST_BRICKMATRIX_WIDTH = 12;
+const int CONST_BRICKMATRIX_HEIGHT = 13;
+const float CONST_BRICK_WIDTH = 37.5f;
+const float CONST_BRICK_HEIGHT = 0.5f*CONST_BRICK_WIDTH;
+const float CONST_BRICK_SHIFT_X = 15.f;
+const float CONST_BRICK_SHIFT_Y = -16.f;
+
+const float CONST_BONUS_APPEAR_TIME = 400.f;
+const float CONST_BONUS_FALL_SPEED = 100.f;
+const float CONST_BONUS_GOTHROUGH_TIME = 8000.f;
+const float CONST_BONUS_CATCH_DISTANCE_X = 65.f;
+const float CONST_BONUS_CATCH_DISTANCE_Y = 20.f;
+
+const float CONST_BONUS_FLOOR_TIME = 8000.f;
+const float CONST_BONUS_FLOOR_APPEAR_SPEED = 50.f;
+
+const int CONST_BONUS_TYPE_MULTIPLIER = 0;
+const int CONST_BONUS_TYPE_GOTHROUGH = 1;
+const int CONST_BONUS_TYPE_FLOOR = 2;
+
+
+class TBrick
+{
+protected:
+ int InitialLocked;
+ int Locked; //0, 1 or 2
+ int State;
+ float StateTimer;
+ vec4 Color;
+public:
+ TBrick();
+ void SetVisible(vec4 color, int locked);
+ void SetInvisible();
+ void TryDrawAppear(int ipos, int jpos);
+ void Update(cardinal dt);
+ vec2 GetPosFrom(int ipos, int jpos);
+ vec4 GetColor();
+ void Appear(vec4 color, int locked);
+ void Appear();
+ void Hit();
+ void Disappear();
+ int GetLocked();
+ bool CanReact();
+};
+
+class TBonusFalling
+{
+protected:
+ float Lifetime;
+ vec2 Pos;
+ std::string TexName;
+ int BonusType; //0 - multiplier, 1 - Go-through, 2 - floor
+public:
+ TBonusFalling(vec2 pos);
+ vec2 GetPos();
+ int GetType();
+ void Draw();
+ void Update(cardinal dt);
+};
+
+struct TBall
+{
+ vec2 Pos;
+ vec2 Velocity;
+ vec4 Color;
+ std::list TalePos;
+
+ vec2 BallInBlock;
+ vec2 PrevBallInBlock;
+
+ TBall(vec2 pos, vec2 velocity, vec4 color);
+ vec2 GetPos();
+ vec2 GetVelocityVector();
+
+ void Go();
+
+ void ReflectToLeft();
+ void ReflectToRight();
+ void ReflectToUp();
+ void ReflectToDown();
+
+ void TryReflectOnReflector(vec2 refPos);
+
+ void Update(cardinal dt);
+};
+
+typedef std::pair PairColorTexture;
+
+struct TBlockInstansingList
+{
+ //color-texture ---> and list of triangles for this color
+ std::list> ColorBlockList;
+};
+
+
+struct TBallInstancingList
+{
+ std::map BallAndGlowList;
+};
+
+class TGameLevel : public TGameAreaAncestor
+{
+protected:
+ std::string BkgTexture;
+ std::string LevelScreenTexture;
+ std::string LevelFileName;
+
+ vec2 ReflectorPos;
+
+ int LevelState;
+ bool PrevLevelStateIsStandby;
+ float StateTimer;
+
+ TBrick BlockMatrix[CONST_BRICKMATRIX_WIDTH][CONST_BRICKMATRIX_HEIGHT];
+ TBlockInstansingList BlockInstansingList;
+
+ bool TapInBackBtnArea(const vec2& pos);
+
+ void ReloadBlockInstansingList();
+ void SetFinished();
+ void SetFinishFreeze();
+
+ void DrawBuffer();
+ void DrawPauseButtons();
+
+ void DrawBallInstancingList();
+
+ bool RenderBufferReady;
+
+ float OutScale;
+
+ float OutScaleVelocity;
+
+ void TryGoToMenu();
+
+ std::list BonusFallingList;
+
+ std::list BallList;
+
+ TBallInstancingList BallInstancingList;
+
+ vec4 BallColor;
+
+ void ReloadBallInstancingList();
+ void RefreshBallInstancingList();
+
+
+ void UpdateBallList(cardinal dt);
+ void MultiplyBalls(vec2 pos, vec2 velocity);
+
+ vec2 GetBlock(const vec2& pos);
+ void InitLevel();
+
+ float BonusGothroughTimer;
+ float BonusFloorTimer;
+ float BonusFloorPosY;
+
+ vec4 ParseColor(const std::string& s);
+ void ReloadLevel();
+
+public:
+ TGameLevel();
+ ~TGameLevel();
+
+ void FillWithFile(const std::string& filename);
+
+ void SetStandBy();
+ void SetLoading(const std::string& bkg, const std::string& levelscreen);
+ bool IsLoaded();
+
+ virtual void Draw();
+
+ void SetPause();
+ bool IsPaused();
+ void ReleasePause();
+
+ virtual void Update(cardinal dt);
+ virtual void OnTapDown(vec2 pos);
+ virtual void OnTapUp(vec2 pos);
+ virtual void OnFling(vec2 slideSpeed);
+ virtual void OnScroll(vec2 shift);
+};
+
+
+
+#endif
diff --git a/jni/loadingcode.cpp b/jni/loadingcode.cpp
new file mode 100644
index 0000000..deab538
--- /dev/null
+++ b/jni/loadingcode.cpp
@@ -0,0 +1,14 @@
+#include "loadingcode.h"
+#include "include/Engine.h"
+#include "main_code.h"
+
+void TGameLoading::Draw()
+{
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_LOADING_TEXTURE]);
+ Renderer->DrawRect(vec2(240.f - 128.f, 10.f), vec2(240.f + 128.f, 10.f + 64.f));
+
+ glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_LOGO_SMALL_TEXTURE]);
+ Renderer->DrawRect(vec2(480.f - 256.f+50.f, 320.f - 64.f), vec2(480.f+50.f, 320.f));
+
+ CheckGlError();
+}
diff --git a/jni/loadingcode.h b/jni/loadingcode.h
new file mode 100644
index 0000000..afa632e
--- /dev/null
+++ b/jni/loadingcode.h
@@ -0,0 +1,15 @@
+#ifndef LOADINGCODE_H_INCLUDED
+#define LOADINGCODE_H_INCLUDED
+
+#include "game_area_interface.h"
+
+using namespace SE;
+
+class TGameLoading : public TGameAreaAncestor
+{
+public:
+ virtual void Draw();
+};
+
+
+#endif
diff --git a/jni/main_code.cpp b/jni/main_code.cpp
new file mode 100644
index 0000000..77060e6
--- /dev/null
+++ b/jni/main_code.cpp
@@ -0,0 +1,488 @@
+#include "main_code.h"
+
+#include
+#include
+#include
+#include
+
+#include "include/Engine.h"
+
+#include "menucode.h"
+
+#include "main_code.h"
+
+boost::signal OnTapUpSignal;
+boost::signal OnTapDownSignal;
+boost::signal OnFlingSignal;
+boost::signal OnScrollSignal;
+
+boost::signal OnDrawSignal;
+
+
+const std::string CONST_BLOCK_TEXTURE1 = "block1";
+const std::string CONST_BLOCK_TEXTURE2 = "block2";
+const std::string CONST_BLOCK_TEXTURE3 = "block3";
+
+const std::string CONST_BONUS_GOTHROUGH_TEXTURE = "bonus_gothrough";
+const std::string CONST_BONUS_MULTIPLIER_TEXTURE = "bonus_multiplier";
+const std::string CONST_BONUS_FLOOR_TEXTURE = "bonus_floor";
+
+const std::string CONST_BALL_TEXTURE = "ball";
+const std::string CONST_BALLGLOW_TEXTURE = "ball_glow";
+
+const std::string CONST_REFLECTOR_TEXTURE = "reflector";
+
+const std::string CONST_WALL_LEFT_TEXTURE = "wall_left";
+const std::string CONST_WALL_RIGHT_TEXTURE = "wall_right";
+const std::string CONST_WALL_UP_TEXTURE = "wall_up";
+const std::string CONST_WALL_BONUS_TEXTURE = "wall_bonus";
+
+const std::string CONST_BACK_BTN_TEXTURE = "back_btn";
+const std::string CONST_SLIDE_UP_BTN_TEXTURE = "slide_up_btn";
+const std::string CONST_TAP_TO_CONTINUE_BTN_TEXTURE = "tap_to_continue_btn";
+const std::string CONST_LOADING_TEXTURE = "loading";
+const std::string CONST_LOGO_SMALL_TEXTURE = "logo_small";
+const std::string CONST_CREDITS_TEXTURE = "credits";
+
+const float CONST_CREDITS_SHOW_TIME = 150.f;
+
+void TAndroidApplication::InnerInit()
+{
+
+#ifdef TARGET_WIN32
+#ifdef NDEBUG
+ ResourceManager->PathToResources = "resources/";
+#else
+ ResourceManager->PathToResources = "../../../assets/";
+#endif
+#endif
+
+#ifdef TARGET_IOS
+ ResourceManager->PathToResources = "assets/";
+#endif
+
+ if (Console != NULL)
+ {
+ *Console<<"APP INIT\n";
+ }
+ srand (static_cast(time(NULL)));
+ GameState = CONST_GAMESTATE_PRELOADING;
+ StateTimer = 0.f;
+
+ ResourceManager->ShaderManager.AddShader("TestShader", "shader1vertex.txt", "shader1fragment.txt");
+ ResourceManager->ShaderManager.AddShader("FrameShader", "frameshader_vertex.txt", "frameshader_fragment.txt");
+ ResourceManager->ShaderManager.AddShader("BrickShader", "brickshader_vertex.txt", "brickshader_fragment.txt");
+ Renderer->PushShader("TestShader");
+
+ ResourceManager->TexList.AddTexture(CONST_LOADING_TEXTURE + ".png", CONST_LOADING_TEXTURE);
+ ResourceManager->TexList.AddTexture(CONST_LOGO_SMALL_TEXTURE + ".png", CONST_LOGO_SMALL_TEXTURE);
+
+ ResourceManager->TexList.AddTexture("console_bkg.bmp");
+
+ ResourceManager->FrameManager.AddFrameRenderBuffer("LevelBuffer", 512, 512);
+
+ OnDrawSignal.connect(boost::bind(&TGameLoading::Draw, boost::ref(GameLoading)));
+ Inited = true;
+
+#ifndef TARGET_IOS
+ Renderer->SwitchToScreen();
+#endif
+}
+
+void TAndroidApplication::InnerDeinit()
+{
+ Inited = false;
+ Loaded = false;
+ if (Console != NULL)
+ {
+ *Console<<"APP DEINIT\n";
+ }
+
+ OnTapUpSignal.disconnect(boost::bind(&TGameLevel::OnTapUp, boost::ref(GameLevel), _1));
+ OnTapUpSignal.disconnect(boost::bind(&TGameMenu::OnTapUp, boost::ref(Menu), _1));
+
+ OnFlingSignal.disconnect(boost::bind(&TGameLevel::OnFling, boost::ref(GameLevel), _1));
+ OnFlingSignal.disconnect(boost::bind(&TGameMenu::OnFling, boost::ref(Menu), _1));
+
+ OnScrollSignal.disconnect(boost::bind(&TGameLevel::OnScroll, boost::ref(GameLevel), _1));
+ OnScrollSignal.disconnect(boost::bind(&TGameMenu::OnScroll, boost::ref(Menu), _1));
+
+ OnTapDownSignal.disconnect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1));
+ OnTapDownSignal.disconnect(boost::bind(&TGameMenu::OnTapDown, boost::ref(Menu), _1));
+ OnTapDownSignal.disconnect(boost::bind(&TGameCredits::OnTapDown, boost::ref(GameCredits), _1));
+
+
+ OnDrawSignal.disconnect(boost::bind(&TGameLoading::Draw, boost::ref(GameLoading)));
+ OnDrawSignal.disconnect(boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+ OnDrawSignal.disconnect(boost::bind(&TGameLevel::Draw, boost::ref(GameLevel)));
+ OnDrawSignal.disconnect(boost::bind(&TGameCredits::Draw, boost::ref(GameCredits)));
+
+}
+
+#ifdef TARGET_WIN32
+
+void TAndroidApplication::InnerOnTapDown(vec2 p)
+{
+ OnTapDownSignal(vec2(p.v[0], p.v[1]));
+}
+
+void TAndroidApplication::InnerOnTapUp(vec2 p)
+{
+ OnTapUpSignal(vec2(p.v[0], p.v[1]));
+}
+
+void TAndroidApplication::InnerOnMove(vec2 shift)
+{
+ OnScrollSignal(shift);
+}
+
+void TAndroidApplication::OnFling(vec2 v)
+{
+}
+
+#endif
+
+#ifdef TARGET_IOS
+
+void TAndroidApplication::InnerOnTapDown(vec2 p)
+{
+ OnTapDownSignal(vec2(p.v[0], p.v[1]));
+}
+
+void TAndroidApplication::InnerOnTapUp(vec2 p)
+{
+ OnTapUpSignal(vec2(p.v[0], p.v[1]));
+}
+
+void TAndroidApplication::InnerOnMove(vec2 shift)
+{
+ OnScrollSignal(shift);
+}
+
+void TAndroidApplication::OnFling(vec2 v)
+{
+}
+
+#endif
+
+void TAndroidApplication::ApplySignalsToMenu()
+{
+
+ OnTapUpSignal.connect(boost::bind(&TGameMenu::OnTapUp, boost::ref(Menu), _1));
+ OnFlingSignal.connect(boost::bind(&TGameMenu::OnFling, boost::ref(Menu), _1));
+ OnScrollSignal.connect(boost::bind(&TGameMenu::OnScroll, boost::ref(Menu), _1));
+ OnTapDownSignal.connect(boost::bind(&TGameMenu::OnTapDown, boost::ref(Menu), _1));
+
+}
+
+
+void TAndroidApplication::DisapplySignalsToMenu()
+{
+ OnTapUpSignal.disconnect(boost::bind(&TGameMenu::OnTapUp, boost::ref(Menu), _1));
+ OnFlingSignal.disconnect(boost::bind(&TGameMenu::OnFling, boost::ref(Menu), _1));
+ OnScrollSignal.disconnect(boost::bind(&TGameMenu::OnScroll, boost::ref(Menu), _1));
+ OnTapDownSignal.disconnect(boost::bind(&TGameMenu::OnTapDown, boost::ref(Menu), _1));
+}
+
+void TAndroidApplication::ApplySignalsToGame()
+{
+
+ OnTapUpSignal.connect(boost::bind(&TGameLevel::OnTapUp, boost::ref(GameLevel), _1));
+ OnFlingSignal.connect(boost::bind(&TGameLevel::OnFling, boost::ref(GameLevel), _1));
+ OnScrollSignal.connect(boost::bind(&TGameLevel::OnScroll, boost::ref(GameLevel), _1));
+ OnTapDownSignal.connect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1));
+
+}
+
+void TAndroidApplication::DisapplySignalsToGame()
+{
+ OnTapUpSignal.disconnect(boost::bind(&TGameLevel::OnTapUp, boost::ref(GameLevel), _1));
+ OnFlingSignal.disconnect(boost::bind(&TGameLevel::OnFling, boost::ref(GameLevel), _1));
+ OnScrollSignal.disconnect(boost::bind(&TGameLevel::OnScroll, boost::ref(GameLevel), _1));
+ OnTapDownSignal.disconnect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1));
+
+}
+
+void TAndroidApplication::ApplySignalsToCredits()
+{
+ OnTapDownSignal.connect(boost::bind(&TGameCredits::OnTapDown, boost::ref(GameCredits), _1));
+}
+
+
+void TAndroidApplication::DisapplySignalsToCredits()
+{
+ OnTapDownSignal.disconnect(boost::bind(&TGameCredits::OnTapDown, boost::ref(GameCredits), _1));
+}
+
+void TAndroidApplication::LoadResources()
+{
+
+ TextureNamesToLoad.clear();
+
+ TextureNamesToLoad.push_back(std::pair("main_menu_bkg_left.png", "main_menu_bkg_left"));
+ TextureNamesToLoad.push_back(std::pair("main_menu_bkg_right.png", "main_menu_bkg_right"));
+ TextureNamesToLoad.push_back(std::pair("select_level.png", "select_level"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock1.png", "shutterstock1"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock2.png", "shutterstock2"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock3.png", "shutterstock3"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock4.png", "shutterstock4"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock5.png", "shutterstock5"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock6.png", "shutterstock6"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock7.png", "shutterstock7"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock8.png", "shutterstock8"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock9.png", "shutterstock9"));
+
+ TextureNamesToLoad.push_back(std::pair("shutterstock10.png", "shutterstock10"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock11.png", "shutterstock11"));
+ TextureNamesToLoad.push_back(std::pair("shutterstock12.png", "shutterstock12"));
+ TextureNamesToLoad.push_back(std::pair("levelshot1.png", "levelshot1"));
+ TextureNamesToLoad.push_back(std::pair("levelshot2.png", "levelshot2"));
+ TextureNamesToLoad.push_back(std::pair("levelshot3.png", "levelshot3"));
+ TextureNamesToLoad.push_back(std::pair("levelshot4.png", "levelshot4"));
+ TextureNamesToLoad.push_back(std::pair("levelshot5.png", "levelshot5"));
+ TextureNamesToLoad.push_back(std::pair("levelshot6.png", "levelshot6"));
+ TextureNamesToLoad.push_back(std::pair("levelshot7.png", "levelshot7"));
+ TextureNamesToLoad.push_back(std::pair("levelshot8.png", "levelshot8"));
+ TextureNamesToLoad.push_back(std::pair("levelshot9.png", "levelshot9"));
+ TextureNamesToLoad.push_back(std::pair("levelshot10.png", "levelshot10"));
+ TextureNamesToLoad.push_back(std::pair("levelshot11.png", "levelshot11"));
+ TextureNamesToLoad.push_back(std::pair("levelshot12.png", "levelshot12"));
+ TextureNamesToLoad.push_back(std::pair("game_end.png", "game_end"));
+
+ TextureNamesToLoad.push_back(std::pair(CONST_BLOCK_TEXTURE1 + ".png", CONST_BLOCK_TEXTURE1));
+ TextureNamesToLoad.push_back(std::pair(CONST_BLOCK_TEXTURE2 + ".png", CONST_BLOCK_TEXTURE2));
+ TextureNamesToLoad.push_back(std::pair(CONST_BLOCK_TEXTURE3 + ".png", CONST_BLOCK_TEXTURE3));
+ TextureNamesToLoad.push_back(std::pair(CONST_BONUS_GOTHROUGH_TEXTURE + ".png", CONST_BONUS_GOTHROUGH_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_BONUS_MULTIPLIER_TEXTURE + ".png", CONST_BONUS_MULTIPLIER_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_BONUS_FLOOR_TEXTURE + ".png", CONST_BONUS_FLOOR_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_BALL_TEXTURE + ".png", CONST_BALL_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_BALLGLOW_TEXTURE + ".png", CONST_BALLGLOW_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_WALL_LEFT_TEXTURE + ".png", CONST_WALL_LEFT_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_WALL_RIGHT_TEXTURE + ".png", CONST_WALL_RIGHT_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_WALL_UP_TEXTURE + ".png", CONST_WALL_UP_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_WALL_BONUS_TEXTURE + ".png", CONST_WALL_BONUS_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_REFLECTOR_TEXTURE + ".png", CONST_REFLECTOR_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_BACK_BTN_TEXTURE + ".png", CONST_BACK_BTN_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_SLIDE_UP_BTN_TEXTURE + ".png", CONST_SLIDE_UP_BTN_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_TAP_TO_CONTINUE_BTN_TEXTURE + ".png", CONST_TAP_TO_CONTINUE_BTN_TEXTURE));
+ TextureNamesToLoad.push_back(std::pair(CONST_CREDITS_TEXTURE + ".png", CONST_CREDITS_TEXTURE));
+
+#ifdef TARGET_IOS
+ ResourceManager->SoundManager.LoadMusicLooped("level1ogg.ogg");
+#else
+ ResourceManager->SoundManager.LoadMusic("level1ogg.ogg");
+#endif
+
+ ResourceManager->FontManager.AddFont("droid_sans14", "droid_sans14_font_bitmap.png", "droid_sans14_font_charmap.txt");
+ ResourceManager->FontManager.PushFont("droid_sans14");
+
+ TryLoadSavedGame();
+
+}
+
+void TAndroidApplication::TryLoadSavedGame()
+{
+
+ std::string fileName = GetFilePathUserData("progress.txt");
+
+ FILE* file = fopen(fileName.c_str(), "r");
+ if (file != NULL)
+ {
+ char line[100];
+ char* r;
+ r = fgets(line, 100, file);
+ if (r != NULL)
+ {
+ Menu.SetMenuItemCount(toint(r));
+ }
+ fclose(file);
+ }
+}
+
+void TAndroidApplication::TrySaveGame()
+{
+
+ std::string fileName = GetFilePathUserData("progress.txt");
+
+ std::string s = tostr(Menu.GetMenuItemCount());
+ FILE* file = fopen(fileName.c_str(), "w");
+ if (file != NULL)
+ {
+ fputs(s.c_str(), file);
+ fflush(file);
+ fclose(file);
+ }
+
+}
+
+
+
+void TAndroidApplication::InnerDraw()
+{
+
+ OnDrawSignal();
+}
+
+
+void TAndroidApplication::InnerUpdate(cardinal dt)
+{
+
+ if (GameState == CONST_GAMESTATE_PRELOADING)
+ {
+ StateTimer += dt/1000.f;
+ if (StateTimer >= 1.f)
+ {
+ LoadResources();
+ GameState = CONST_GAMESTATE_LOADING;
+ StateTimer = 0.f;
+ }
+ }
+ else if (GameState == CONST_GAMESTATE_LOADING)
+ {
+ StateTimer += dt/1000.f;
+ if (StateTimer >= 1.f)
+ {
+ StateTimer -= 1.f;
+ }
+
+ if (TextureNamesToLoad.size() != 0)
+ {
+ ResourceManager->TexList.AddTexture(TextureNamesToLoad.begin()->first, TextureNamesToLoad.begin()->second);
+ TextureNamesToLoad.erase(TextureNamesToLoad.begin());
+ }
+ else
+ {
+ GameState = CONST_GAMESTATE_MENU;
+ ApplySignalsToMenu();
+ OnDrawSignal.disconnect(boost::bind(&TGameLoading::Draw, boost::ref(GameLoading)));
+ OnDrawSignal.connect(0, boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+ StateTimer = 0.f;
+ Loaded = true;
+ }
+ }
+ else if (GameState == CONST_GAMESTATE_LEVEL)
+ {
+ GameLevel.Update(dt);
+ }
+ else if (GameState == CONST_GAMESTATE_MENU)
+ {
+ Menu.Update(dt);
+ }
+ else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_LEVEL)
+ {
+ GameLevel.Update(dt);
+ if (GameLevel.IsLoaded())
+ {
+ GameState = CONST_GAMESTATE_LEVEL;
+ OnDrawSignal.disconnect(boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+ //CONNECT SLOT
+ DisapplySignalsToMenu();
+ ApplySignalsToGame();
+ }
+ }
+ else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_CREDITS)
+ {
+ Menu.Update(dt);
+ GameCredits.Update(dt);
+ StateTimer -= dt;
+ if (StateTimer <= 0.f)
+ {
+ GameState = CONST_GAMESTATE_CREDITS;
+ OnDrawSignal.disconnect(boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+ ApplySignalsToCredits();
+ StateTimer = 0.f;
+ }
+ }
+ else if (GameState == CONST_GAMESTATE_CREDITS)
+ {
+ GameCredits.Update(dt);
+ }
+ else if (GameState == CONST_GAMESTATE_FROM_CREDITS_TO_MENU)
+ {
+ Menu.Update(dt);
+ GameCredits.Update(dt);
+ StateTimer -= dt;
+ if (StateTimer <= 0.f)
+ {
+ GameState = CONST_GAMESTATE_MENU;
+ StateTimer = 0.f;
+ ApplySignalsToMenu();
+ OnDrawSignal.disconnect(boost::bind(&TGameCredits::Draw, boost::ref(GameCredits)));
+ }
+ }
+}
+
+
+void TAndroidApplication::GoFromMenuToGame(int level)
+{
+ //#ifndef TARGET_IOS
+ ResourceManager->SoundManager.PlayMusicLooped("level1ogg.ogg");
+
+//#endif
+ GameLevel.FillWithFile(ResourceManager->PathToResources + "level"+tostr(level+1)+".txt");
+ GameLevel.SetLoading("shutterstock" + tostr(level+1), "levelshot"+tostr(level+1));
+ GameState = CONST_GAMESTATE_FROM_MENU_TO_LEVEL;
+ OnDrawSignal.connect(1, boost::bind(&TGameLevel::Draw, boost::ref(GameLevel)));
+
+ DisapplySignalsToMenu();
+
+}
+
+void TAndroidApplication::GoFromGameToMenu()
+{
+ //#ifndef TARGET_IOS
+ ResourceManager->SoundManager.StopMusic("level1ogg.ogg");
+//#endif
+ TrySaveGame();
+ DisapplySignalsToGame();
+ ApplySignalsToMenu();
+ GameState = CONST_GAMESTATE_MENU;
+ OnDrawSignal.disconnect(boost::bind(&TGameLevel::Draw, boost::ref(GameLevel)));
+}
+
+void TAndroidApplication::GoFromMenuToCredits()
+{
+ GameState = CONST_GAMESTATE_FROM_MENU_TO_CREDITS;
+ StateTimer = CONST_CREDITS_SHOW_TIME;
+ GameCredits.StartAppear();
+ OnDrawSignal.connect(1, boost::bind(&TGameCredits::Draw, boost::ref(GameCredits)));
+ DisapplySignalsToMenu();
+
+}
+
+void TAndroidApplication::GoFromCreditsToMenu()
+{
+
+ GameState = CONST_GAMESTATE_FROM_CREDITS_TO_MENU;
+ StateTimer = CONST_CREDITS_SHOW_TIME;
+ GameCredits.StartDisappear();
+ OnDrawSignal.connect(0, boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+
+ DisapplySignalsToCredits();
+}
+
+void TAndroidApplication::MarkSetGameLevelPause()
+{
+ OnDrawSignal.connect(0, boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+}
+
+void TAndroidApplication::MarkReleaseGameLevelPause()
+{
+ OnDrawSignal.disconnect(boost::bind(&TGameMenu::Draw, boost::ref(Menu)));
+}
+
+
+void TAndroidApplication::OpenNextLevel()
+{
+ Menu.OpenNextLevel();
+}
+
+bool TAndroidApplication::IsLoaded()
+{
+ return Loaded;
+}
+
+bool TAndroidApplication::IsInited()
+{
+ return Inited;
+}
diff --git a/jni/main_code.h b/jni/main_code.h
new file mode 100644
index 0000000..159861b
--- /dev/null
+++ b/jni/main_code.h
@@ -0,0 +1,172 @@
+#ifndef GL_CODE_H_INCLUDED
+#define GL_CODE_H_INCLUDED
+
+#ifdef TARGET_ANDROID
+#include "android_api.h"
+#endif
+
+#ifdef TARGET_WIN32
+#define NOMINMAX 1
+#include
+#undef NOMINMAX
+#endif
+
+#include
+#include
+#include
+
+#include "boost/shared_ptr.hpp"
+#include "boost/thread/thread.hpp"
+#include "boost/assign.hpp"
+#include "boost/bind.hpp"
+
+#include "include/Engine.h"
+
+#include "boost/signal.hpp"//Signal must be included after asio
+
+#include "gamecode.h"
+#include "menucode.h"
+#include "creditscode.h"
+#include "loadingcode.h"
+
+using namespace SE;
+
+
+#ifdef TARGET_WIN32
+class TAndroidApplication;
+extern TAndroidApplication* App;
+#endif
+
+#ifdef TARGET_IOS
+class TAndroidApplication;
+extern TAndroidApplication* App;
+#endif
+
+extern boost::signal OnTapUpSignal;
+extern boost::signal OnTapDownSignal;
+extern boost::signal OnFlingSignal;
+extern boost::signal OnScrollSignal;
+
+extern boost::signal OnDrawSignal;
+
+extern const std::string CONST_BLOCK_TEXTURE1;
+extern const std::string CONST_BLOCK_TEXTURE2;
+extern const std::string CONST_BLOCK_TEXTURE3;
+
+extern const std::string CONST_BONUS_GOTHROUGH_TEXTURE;
+extern const std::string CONST_BONUS_MULTIPLIER_TEXTURE;
+extern const std::string CONST_BONUS_FLOOR_TEXTURE;
+
+extern const std::string CONST_BALL_TEXTURE;
+extern const std::string CONST_BALLGLOW_TEXTURE;
+
+extern const std::string CONST_WALL_LEFT_TEXTURE;
+extern const std::string CONST_WALL_RIGHT_TEXTURE;
+extern const std::string CONST_WALL_UP_TEXTURE;
+extern const std::string CONST_WALL_BONUS_TEXTURE;
+
+
+extern const std::string CONST_REFLECTOR_TEXTURE;
+
+extern const std::string CONST_BACK_BTN_TEXTURE;
+
+extern const std::string CONST_SLIDE_UP_BTN_TEXTURE;
+extern const std::string CONST_TAP_TO_CONTINUE_BTN_TEXTURE;
+
+extern const std::string CONST_BACK_BTN_TEXTURE;
+extern const std::string CONST_SLIDE_UP_BTN_TEXTURE;
+extern const std::string CONST_TAP_TO_CONTINUE_BTN_TEXTURE;
+extern const std::string CONST_LOADING_TEXTURE;
+extern const std::string CONST_LOGO_SMALL_TEXTURE;
+extern const std::string CONST_CREDITS_TEXTURE;
+
+
+
+const int CONST_GAMESTATE_LEVEL = 1;
+const int CONST_GAMESTATE_MENU = 0;
+const int CONST_GAMESTATE_FROM_MENU_TO_LEVEL = 2;
+const int CONST_GAMESTATE_FROM_MENU_TO_CREDITS = 3;
+const int CONST_GAMESTATE_CREDITS = 4;
+const int CONST_GAMESTATE_FROM_CREDITS_TO_MENU = 5;
+const int CONST_GAMESTATE_LOADING = 6;
+const int CONST_GAMESTATE_PRELOADING = 7;
+
+
+class TAndroidApplication : public TApplication
+{
+protected:
+ TGameMenu Menu;
+ TGameLevel GameLevel;
+ TGameCredits GameCredits;
+ TGameLoading GameLoading;
+
+ int GameState;
+ float StateTimer;
+
+ void TryLoadSavedGame();
+ void TrySaveGame();
+
+ bool Inited;
+
+ std::vector > TextureNamesToLoad;
+
+ void ApplySignalsToMenu();
+ void DisapplySignalsToMenu();
+ void ApplySignalsToGame();
+ void DisapplySignalsToGame();
+ void ApplySignalsToCredits();
+ void DisapplySignalsToCredits();
+
+public:
+ bool Loaded;
+
+ TAndroidApplication() : TApplication(), Loaded(false), Inited(false) { }
+
+ virtual void InnerInit();
+
+ virtual void InnerDeinit();
+
+ virtual void InnerDraw();
+
+ virtual void InnerUpdate(cardinal dt);
+
+ void GoFromMenuToGame(int level);
+ void GoFromGameToMenu();
+ void GoFromMenuToCredits();
+ void GoFromCreditsToMenu();
+ void MarkSetGameLevelPause();
+ void MarkReleaseGameLevelPause();
+
+ void OpenNextLevel();
+
+ bool IsLoaded();
+
+ bool IsInited();
+
+ void LoadResources();
+
+#ifdef TARGET_WIN32
+
+ virtual void InnerOnTapDown(vec2 p);
+
+ virtual void InnerOnTapUp(vec2 p);
+
+ virtual void InnerOnMove(vec2 shift);
+
+ virtual void OnFling(vec2 v);
+#endif
+#ifdef TARGET_IOS
+
+ virtual void InnerOnTapDown(vec2 p);
+
+ virtual void InnerOnTapUp(vec2 p);
+
+ virtual void InnerOnMove(vec2 shift);
+
+ virtual void OnFling(vec2 v);
+#endif
+};
+
+
+
+#endif
diff --git a/jni/menucode.cpp b/jni/menucode.cpp
new file mode 100644
index 0000000..24d1192
--- /dev/null
+++ b/jni/menucode.cpp
@@ -0,0 +1,207 @@
+#include "menucode.h"
+#include "main_code.h"
+
+const float CONST_SPEED_NEG_ACCELERATION_K = 0.03f;
+
+const float CONST_MENU_POS_K = 0.25f;
+
+const float CONST_MENU_WINDOW_DISTANCE = 240.f + 40.f;
+
+const float CONST_SHIFT_ON_SIDE = 0.f;
+
+TGameMenu::TGameMenu()
+ : MenuSpeed(0)
+ , MenuPos(0)
+ , HoldToTap(false)
+ , MenuItemCount(1)
+ , SelectedGame(-1)
+{
+}
+
+
+void TGameMenu::Draw()
+{
+ CheckGlError("Draw TGameMenu");
+ RenderUniform1i("sel", 0);
+ RenderUniform1f("Transparency", 1.f);
+ float bkgShift = MenuPos*0.1f - 100.f;
+ glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["main_menu_bkg_left"]);
+ Renderer->DrawRect(vec2(bkgShift,0.f), vec2(480.f+bkgShift,320.f));
+ glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["main_menu_bkg_right"]);
+ Renderer->DrawRect(vec2(480.f+bkgShift,0.f), vec2(960.f+bkgShift,320.f));
+
+
+ if (SelectedGame == 0)
+ {
+ RenderUniform1i("sel", 1);
+ }
+ else
+ {
+ RenderUniform1i("sel", 0);
+ }
+
+ for (int i=0; iTexList["levelshot"+tostr(i+1)]);
+ Renderer->DrawRect(vec2(160.f+MenuPos+CONST_MENU_WINDOW_DISTANCE*i,80.f), vec2(160.f+240.f+MenuPos+CONST_MENU_WINDOW_DISTANCE*i, 240.f));
+ }
+
+ if (MenuItemCount == 12)
+ {
+ glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["game_end"]);
+ Renderer->DrawRect(vec2(160.f+MenuPos+CONST_MENU_WINDOW_DISTANCE*12,160.f - 64.f), vec2(160.f+256.f+MenuPos+CONST_MENU_WINDOW_DISTANCE*12, 160.f + 64.f));
+
+ }
+
+
+
+ glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["select_level"]);
+ Renderer->DrawRect(vec2(240.f-128.f, 241.f), vec2(240.f+128.f, 305.f));
+
+ glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["logo_small"]);
+ Renderer->DrawRect(vec2(240.f-128.f+15.f, 0.f), vec2(240.f+128.f+15.f, 64.f));
+
+ CheckGlError("Draw TGameMenu 2");
+
+
+}
+
+void TGameMenu::Update(cardinal dt)
+{
+ if (HoldToTap)
+ return;
+
+ float k;
+
+ MenuPos = MenuPos + MenuSpeed*dt/1000.f;
+
+ int menuItemToShowCount;
+
+ if (MenuItemCount == 12)
+ {
+ menuItemToShowCount = 13;
+ }
+ else
+ {
+ menuItemToShowCount = MenuItemCount;
+ }
+
+ float acc;
+
+ if (MenuItemCount == 1)
+ {
+ k = 3;
+ }
+ else
+ {
+ k = fabs( - MenuPos - ((menuItemToShowCount-1)*CONST_MENU_WINDOW_DISTANCE*0.5f)) / ((MenuItemCount-1)*CONST_MENU_WINDOW_DISTANCE*0.5f);
+ }
+
+ acc = -MenuSpeed * CONST_SPEED_NEG_ACCELERATION_K * k;
+
+
+ float xleft = (- MenuPos + CONST_SHIFT_ON_SIDE - (menuItemToShowCount-1)*CONST_MENU_WINDOW_DISTANCE);
+
+ if (xleft < 0)
+ {
+ xleft = 0;
+ }
+
+ acc += xleft*CONST_MENU_POS_K;
+
+ float xright = (MenuPos - CONST_SHIFT_ON_SIDE);
+
+ if (xright < 0)
+ {
+ xright = 0;
+ }
+
+ acc -= xright*CONST_MENU_POS_K;
+
+ if ((MenuSpeed + acc*dt) * MenuSpeed < 0) //Check if MenuSpeed changes direction
+ {
+ MenuSpeed = 0;
+ }
+ else
+ {
+ MenuSpeed += acc*dt;
+ }
+
+
+}
+
+void TGameMenu::OnTapDown(vec2 pos)
+{
+
+ if (pos.v[1]<64.f && pos.v[0]>=265.f-128.f && pos.v[0]<=265.f+128.f)
+ {
+ App->GoFromMenuToCredits();
+ return;
+ }
+
+ vec2 realPos = pos - vec2(MenuPos, 0);
+
+ if (realPos.v[1] >= 80.f && realPos.v[1] <= 240.f)
+ {
+ float x = realPos.v[0] - 160.f;
+
+ int p = 0;
+ while (x >280.f)
+ {
+ x -= 280.f;
+ p++;
+ }
+
+ if (x <= 240.f && x >= 0.f && (pGoFromMenuToGame(SelectedGame);
+ SelectedGame = -1;
+ }
+}
+
+
+void TGameMenu::OnFling(vec2 slideSpeed)
+{
+ HoldToTap = false;
+ MenuSpeed = slideSpeed.v[0];
+}
+
+void TGameMenu::OnScroll(vec2 shift)
+{
+ MenuPos = MenuPos - shift.v[0];
+}
+
+void TGameMenu::OpenNextLevel()
+{
+ if (MenuItemCount < 12)
+ {
+ MenuItemCount++;
+ }
+}
+
+int TGameMenu::GetMenuItemCount()
+{
+ return MenuItemCount;
+}
+
+void TGameMenu::SetMenuItemCount(int menuItemCount)
+{
+ MenuItemCount = menuItemCount;
+}
diff --git a/jni/menucode.h b/jni/menucode.h
new file mode 100644
index 0000000..f5594ac
--- /dev/null
+++ b/jni/menucode.h
@@ -0,0 +1,40 @@
+#ifndef MENUCODE_H_INCLUDED
+#define MENUCODE_H_INCLUDED
+
+#include "include/Engine.h"
+#include "game_area_interface.h"
+
+using namespace SE;
+
+
+class TGameMenu : public TGameAreaAncestor
+{
+protected:
+ float MenuSpeed;
+ float MenuPos;
+
+ bool HoldToTap;
+
+ int MenuItemCount;
+
+ int SelectedGame;
+
+
+public:
+ TGameMenu();
+ virtual void Draw();
+ virtual void Update(cardinal dt);
+ virtual void OnTapDown(vec2 pos);
+ virtual void OnTapUp(vec2 pos);
+ virtual void OnFling(vec2 slideSpeed);
+ virtual void OnScroll(vec2 shift);
+
+ void OpenNextLevel();
+ int GetMenuItemCount();
+ void SetMenuItemCount(int menuItemCount);
+
+};
+
+
+
+#endif
diff --git a/res/drawable-hdpi/ic_menu_template.png b/res/drawable-hdpi/ic_menu_template.png
new file mode 100644
index 0000000..1e28f93
Binary files /dev/null and b/res/drawable-hdpi/ic_menu_template.png differ
diff --git a/res/drawable-ldpi/ic_menu_template.png b/res/drawable-ldpi/ic_menu_template.png
new file mode 100644
index 0000000..6a93cf2
Binary files /dev/null and b/res/drawable-ldpi/ic_menu_template.png differ
diff --git a/res/drawable-mdpi/ic_menu_template.png b/res/drawable-mdpi/ic_menu_template.png
new file mode 100644
index 0000000..7c1cab2
Binary files /dev/null and b/res/drawable-mdpi/ic_menu_template.png differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644
index 0000000..e3f7331
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+ GL2JNI
+
+
+
diff --git a/src/fishrungames/doublehitballs/GL2JNIActivity.java b/src/fishrungames/doublehitballs/GL2JNIActivity.java
new file mode 100644
index 0000000..8beda17
--- /dev/null
+++ b/src/fishrungames/doublehitballs/GL2JNIActivity.java
@@ -0,0 +1,158 @@
+package fishrungames.doublehitballs;
+
+import fishrungames.engine.FileWrapper;
+
+//Deprecated
+//import fishrungames.doublehitballs.R;
+
+import android.app.Activity;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.Bundle;
+import android.view.GestureDetector;
+import android.view.GestureDetector.SimpleOnGestureListener;
+import android.view.MotionEvent;
+
+//Deprecated
+//import java.lang.reflect.Field;
+
+
+public class GL2JNIActivity extends Activity
+{
+
+ GLView mView;
+
+ boolean IsScrolling = false;
+
+ private GestureDetector gestureDetector;
+
+ @Override
+ protected void onCreate(Bundle icicle)
+ {
+
+ super.onCreate(icicle);
+
+ gestureDetector = new GestureDetector(new MyGestureListener());
+
+ FileWrapper.LoadHalibutEngineLibrary();
+ FileWrapper.SetActivityInstance(this);
+ FileWrapper.SetupEnviroment();
+ /*
+ * Deprecated
+ try
+
+ {
+ for (Field f : R.raw.class.getFields())
+ {
+ FileWrapper.AddToFileMap(f.getName(), f.getInt(null));
+ }
+
+ } catch (IllegalArgumentException e)
+ {
+ FileWrapper.ConsoleOut("IllegalArgumentException\n");
+ onStop();
+ } catch (IllegalAccessException e)
+ {
+ FileWrapper.ConsoleOut("IllegalAccessException\n");
+ onStop();
+ }*/
+
+ String apkFilePath = null;
+ ApplicationInfo appInfo = null;
+ PackageManager packMgmr = this.getPackageManager();
+ try {
+ appInfo = packMgmr.getApplicationInfo("fishrungames.doublehitballs", 0);
+ } catch (NameNotFoundException e) {
+
+ e.printStackTrace();
+ throw new RuntimeException("Unable to locate assets, aborting...");
+ }
+ apkFilePath = appInfo.sourceDir;
+
+ FileWrapper.SetupApkFilePath(apkFilePath);
+
+ mView = new GLView(getApplication());
+
+ setContentView(mView);
+
+ }
+
+ @Override
+ protected void onPause()
+ {
+ FileWrapper.ConsoleOut("OnPause\n");
+ JniWrapper.StopSounds();
+ super.onPause();
+ mView.onPause();
+ }
+
+ @Override
+ protected void onResume()
+ {
+ super.onResume();
+ mView.onResume();
+ }
+
+ @Override
+ protected void onStop()
+ {
+
+ //FileWrapper.ConsoleOut("OnStop\n");
+ //StopSounds();
+ super.onStop();
+ }
+
+ public boolean onTouchEvent (MotionEvent event)
+ {
+ if (gestureDetector.onTouchEvent(event))
+ {
+ return true;
+ }
+
+ if (event.getAction() == MotionEvent.ACTION_UP)
+ {
+ float x = event.getX();
+ float y = (float)mView.getHeight()-event.getY();
+
+ if(IsScrolling)
+ {
+ IsScrolling = false;
+ }
+
+ JniWrapper.OnTapUp(x, y, event.getEventTime());
+
+ }
+ return true;
+ }
+
+ class MyGestureListener extends SimpleOnGestureListener
+ {
+ @Override
+ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
+ {
+ JniWrapper.OnFling(velocityX, velocityY, e2.getEventTime());
+ return true;
+ }
+
+ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
+ {
+ JniWrapper.OnScroll(distanceX, distanceY, e2.getEventTime());
+ IsScrolling = true;
+ return true;
+ }
+
+ public boolean onDown(MotionEvent event)
+ {
+
+ float x = event.getX();
+ float y = (float)mView.getHeight()-event.getY();
+
+ JniWrapper.OnTapDown(x, y, event.getEventTime());
+
+ return true;
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/fishrungames/doublehitballs/GLView.java b/src/fishrungames/doublehitballs/GLView.java
new file mode 100644
index 0000000..d56efea
--- /dev/null
+++ b/src/fishrungames/doublehitballs/GLView.java
@@ -0,0 +1,72 @@
+package fishrungames.doublehitballs;
+
+
+import java.util.Calendar;
+
+import android.content.Context;
+import android.opengl.GLSurfaceView;
+
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
+import fishrungames.engine.GLViewAncestor;
+
+class GLView extends GLViewAncestor
+{
+ static long lastTimeStamp;
+ static boolean gameIsInited = false;
+
+ public GLView(Context context)
+ {
+ //Change this method? Don't forget to change method below!
+ super(context);
+ init(false, 0, 0);
+ }
+
+ public GLView(Context context, boolean translucent, int depth, int stencil)
+ {
+ //Change this method? Don't forget to change method above!
+ super(context);
+ init(translucent, depth, stencil);
+ }
+
+ public void init(boolean translucent, int depth, int stencil)
+ {
+ super.init(translucent, depth, stencil);
+ setRenderer(new Renderer());
+ Calendar c = Calendar.getInstance();
+ lastTimeStamp = c.getTimeInMillis();
+ gameIsInited = true;
+ }
+
+ private static class Renderer implements GLSurfaceView.Renderer
+ {
+ public void onDrawFrame(GL10 gl)
+ {
+ if (gameIsInited)
+ {
+ Calendar c = Calendar.getInstance();
+
+ long currentTimeStamp = c.getTimeInMillis();
+
+ JniWrapper.Update(currentTimeStamp - lastTimeStamp);
+
+ lastTimeStamp = currentTimeStamp;
+ }
+ }
+
+ public void onSurfaceChanged(GL10 gl, int width, int height)
+ {
+ if (JniWrapper.IsInited() == 1)
+ {
+ JniWrapper.Destroy();
+ }
+ JniWrapper.Init(width,height);
+ }
+
+ public void onSurfaceCreated(GL10 gl, EGLConfig config)
+ {
+ //Do nothing.
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/fishrungames/doublehitballs/JniWrapper.java b/src/fishrungames/doublehitballs/JniWrapper.java
new file mode 100644
index 0000000..7c7dd5c
--- /dev/null
+++ b/src/fishrungames/doublehitballs/JniWrapper.java
@@ -0,0 +1,21 @@
+package fishrungames.doublehitballs;
+
+public class JniWrapper
+{
+ static {
+ System.loadLibrary("gl2jni");
+ }
+
+
+ public static native void Init(int width, int height);
+ public static native void Update(long dt);
+ public static native void StopSounds();
+ public static native void Destroy();
+ public static native int IsInited();
+ public static native void OnTapDown(float x, float y, long time);
+ public static native void OnTapUp(float x, float y, long time);
+ public static native void OnTapMove(float x, float y, long time);
+
+ public static native void OnFling(float velocityX, float velocityY, long time);
+ public static native void OnScroll(float distanceX, float distanceY, long time);
+}
\ No newline at end of file
diff --git a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe
new file mode 100644
index 0000000..676a8f5
Binary files /dev/null and b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exe differ
diff --git a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp
new file mode 100644
index 0000000..c7eba18
Binary files /dev/null and b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.exp differ
diff --git a/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib
new file mode 100644
index 0000000..5208c3d
Binary files /dev/null and b/windows/DoubleHitBalls-win/Debug/DoubleHitBalls-win.lib differ
diff --git a/windows/DoubleHitBalls-win/Debug/log.txt b/windows/DoubleHitBalls-win/Debug/log.txt
new file mode 100644
index 0000000..9b15766
--- /dev/null
+++ b/windows/DoubleHitBalls-win/Debug/log.txt
@@ -0,0 +1,121 @@
+Log started
+OpenGL Window created
+Sound thread finally over. Let's go!
+Render::OpenGL glVersion = 4.0.10318 Compatibility Profile Context
+Render::OpenGL glVersion above 2.0 ok
+Render::OpenGL GL_ARB_framebuffer_object supported ok
+Render::OpenGL GL_ARB_uniform_buffer_object supported ok
+APP INIT
+Prepare to add shader TestShader
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader deleting
+Buffer thread go!
+Sound thread go!
+No more music and no sounds. Lock sound thread!
+ResourceManager::ShaderManager::Shader Vertex shader was successfully compiled to run on hardware.
+
+ResourceManager::ShaderManager::Shader Fragment shader was successfully compiled to run on hardware.
+ WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+
+ResourceManager::ShaderManager::Shader Fragment shader(s) linked, vertex shader(s) linked.
+WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+WARNING: warning(#276) Symbol 'texCoord' usage doesn't match between two stages
+WARNING: warning(#276) Symbol 'texCoord' usage do
+ResourceManager::ShaderManager shader loaded: TestShader
+Prepare to add shader FrameShader
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader Vertex shader was successfully compiled to run on hardware.
+
+ResourceManager::ShaderManager::Shader Fragment shader was successfully compiled to run on hardware.
+ WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+
+ResourceManager::ShaderManager::Shader Fragment shader(s) linked, vertex shader(s) linked.
+WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+WARNING: warning(#276) Symbol 'texCoord' usage doesn't match between two stages
+WARNING: warning(#276) Symbol 'texCoord' usage do
+ResourceManager::ShaderManager shader loaded: FrameShader
+Prepare to add shader BrickShader
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader Vertex shader was successfully compiled to run on hardware.
+
+ResourceManager::ShaderManager::Shader Fragment shader was successfully compiled to run on hardware.
+ WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+
+ResourceManager::ShaderManager::Shader Fragment shader(s) linked, vertex shader(s) linked.
+WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+WARNING: warning(#276) Symbol 'texCoord' usage doesn't match between two stages
+WARNING: warning(#276) Symbol 'texCoord' usage do
+ResourceManager::ShaderManager shader loaded: BrickShader
+ResourceManager::TexList Texture added: loading.bmp with id = 1
+ResourceManager::TexList Texture added: logo_small.bmp32 with id = 2
+FrameManager:: frame buffer added: LevelBuffer
+OggStream created successfully
+ResourceManager::TexList Texture added: main_menu_bkg_left.bmp with id = 4
+ResourceManager::TexList Texture added: main_menu_bkg_right.bmp with id = 5
+ResourceManager::TexList Texture added: select_level.bmp32 with id = 6
+ResourceManager::TexList Texture added: shutterstock1.bmp with id = 7
+ResourceManager::TexList Texture added: shutterstock2.bmp with id = 8
+ResourceManager::TexList Texture added: shutterstock3.bmp with id = 9
+ResourceManager::TexList Texture added: shutterstock4.bmp with id = 10
+ResourceManager::TexList Texture added: shutterstock5.bmp with id = 11
+ResourceManager::TexList Texture added: shutterstock6.bmp with id = 12
+ResourceManager::TexList Texture added: shutterstock7.bmp with id = 13
+ResourceManager::TexList Texture added: shutterstock8.bmp with id = 14
+ResourceManager::TexList Texture added: shutterstock9.bmp with id = 15
+ResourceManager::TexList Texture added: shutterstock10.bmp with id = 16
+ResourceManager::TexList Texture added: shutterstock11.bmp with id = 17
+ResourceManager::TexList Texture added: shutterstock12.bmp with id = 18
+ResourceManager::TexList Texture added: levelshot1.bmp with id = 19
+ResourceManager::TexList Texture added: levelshot2.bmp with id = 20
+ResourceManager::TexList Texture added: levelshot3.bmp with id = 21
+ResourceManager::TexList Texture added: levelshot4.bmp with id = 22
+ResourceManager::TexList Texture added: levelshot5.bmp with id = 23
+ResourceManager::TexList Texture added: levelshot6.bmp with id = 24
+ResourceManager::TexList Texture added: levelshot7.bmp with id = 25
+ResourceManager::TexList Texture added: levelshot8.bmp with id = 26
+ResourceManager::TexList Texture added: levelshot9.bmp with id = 27
+ResourceManager::TexList Texture added: levelshot10.bmp with id = 28
+ResourceManager::TexList Texture added: levelshot11.bmp with id = 29
+ResourceManager::TexList Texture added: levelshot12.bmp with id = 30
+ResourceManager::TexList Texture added: game_end.bmp32 with id = 31
+ResourceManager::TexList Texture added: block1.bmp32 with id = 32
+ResourceManager::TexList Texture added: block2.bmp32 with id = 33
+ResourceManager::TexList Texture added: block3.bmp32 with id = 34
+ResourceManager::TexList Texture added: bonus_gothrough.bmp32 with id = 35
+ResourceManager::TexList Texture added: bonus_multiplier.bmp32 with id = 36
+ResourceManager::TexList Texture added: bonus_floor.bmp32 with id = 37
+ResourceManager::TexList Texture added: ball.bmp32 with id = 38
+ResourceManager::TexList Texture added: ball_glow.bmp32 with id = 39
+ResourceManager::TexList Texture added: wall_left.bmp32 with id = 40
+ResourceManager::TexList Texture added: wall_right.bmp32 with id = 41
+ResourceManager::TexList Texture added: wall_up.bmp32 with id = 42
+ResourceManager::TexList Texture added: wall_bonus.bmp32 with id = 43
+ResourceManager::TexList Texture added: reflector.bmp32 with id = 44
+ResourceManager::TexList Texture added: back_btn.bmp32 with id = 45
+ResourceManager::TexList Texture added: slide_up_btn.bmp32 with id = 46
+ResourceManager::TexList Texture added: tap_to_continue_btn.bmp32 with id = 47
+ResourceManager::TexList Texture added: credits.bmp32 with id = 48
+Projection:
+ 0.00416667 0 0 0 0 0.00625 0 0 0 0 -1 0 -1 -1 0 1
+Modelview:
+ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
+ProjectonModelview:
+ 0.00416667 0 0 0 0 0.00625 0 0 0 0 -1 0 -1 -1 0 1
+Program prepares to quit
+APP DEINIT
+Deinit Sound Manager!
+Buffer thread over!
+Unlock processSoundListMutex to destroy buffering thread!
+No more music and no sounds. Lock sound thread!
+Sound thread over!
+Unlock SoundThreadMutex to destroy sound thread!
+ResourceManager::FrameManager deleting
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager::Shader deleting
+ResourceManager::ShaderManager deleting
+ResourceManager::TexList cleared
+ResourceManager::TexList deleting
+HalibutRender::deleting
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win.sln b/windows/DoubleHitBalls-win/DoubleHitBalls-win.sln
new file mode 100644
index 0000000..8f6e84f
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DoubleHitBalls-win", "DoubleHitBalls-win\DoubleHitBalls-win.vcxproj", "{1CC98EEE-BBCB-4D79-B6D7-8511789172C5}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1CC98EEE-BBCB-4D79-B6D7-8511789172C5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1CC98EEE-BBCB-4D79-B6D7-8511789172C5}.Debug|Win32.Build.0 = Debug|Win32
+ {1CC98EEE-BBCB-4D79-B6D7-8511789172C5}.Release|Win32.ActiveCfg = Release|Win32
+ {1CC98EEE-BBCB-4D79-B6D7-8511789172C5}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj
new file mode 100644
index 0000000..d5b6be9
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj
@@ -0,0 +1,106 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {1CC98EEE-BBCB-4D79-B6D7-8511789172C5}
+ Win32Proj
+ DoubleHitBallswin
+
+
+
+ Application
+ true
+ NotSet
+
+
+ Application
+ false
+ true
+ NotSet
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(SalmonEnginePath)include
+ $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(SalmonEnginePath)$(Configuration)
+
+
+ false
+ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(SalmonEnginePath)include
+ $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(SalmonEnginePath)$(Configuration)
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;TARGET_WIN32;TARGET_HALIBUT;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)
+ $(SalmonEnginePath);$(LibsPath)\boost_1_52_0;$(LibsPath)\libogg-1.3.0\include;$(LibsPath)\libvorbis-1.3.2\include;$(LibsPath)\sqplus\sqplus;$(LibsPath)\sqplus\include;$(LibsPath)\DirectXsdk\Include;$(LibsPath)\lpng1510;$(SolutionDir)\..\..\jni;
+
+
+ Windows
+ true
+ $(LibsPath)\boost_1_52_0\boost_windows\libs_engine\$(Configuration);$(LibsPath)\libogg-1.3.0\win32\VS2010\Win32\$(Configuration);$(LibsPath)\libvorbis-1.3.2\win32\VS2010\Win32\$(Configuration);$(LibsPath)\sqplus\lib;$(LibsPath)\DirectXsdk\Lib\x86;$(LibsPath)\lpng1510\projects\vstudio\Debug Library
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;opengl32.lib;glu32.lib;Halibut Engine.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;zlib.lib;libpng15.lib;dsound.lib;dxguid.lib;sqplusD.lib;squirrelD.lib;sqdbglibD.lib;sqstdlibD.lib
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;TARGET_HALIBUT;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)
+ $(SalmonEnginePath);$(LibsPath)\boost_1_52_0;$(LibsPath)\libogg-1.3.0\include;$(LibsPath)\libvorbis-1.3.2\include;$(LibsPath)\sqplus\sqplus;$(LibsPath)\sqplus\include;$(LibsPath)\DirectXsdk\Include;$(LibsPath)\lpng1510;$(SolutionDir)\..\..\jni;
+
+
+ Windows
+ true
+ true
+ true
+ $(LibsPath)\boost_1_52_0\boost_windows\libs_engine\$(Configuration);$(LibsPath)\libogg-1.3.0\win32\VS2010\Win32\$(Configuration);$(LibsPath)\libvorbis-1.3.2\win32\VS2010\Win32\$(Configuration);$(LibsPath)\sqplus\lib;$(LibsPath)\DirectXsdk\Lib\x86;$(LibsPath)\lpng1510\projects\vstudio\Release Library
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;opengl32.lib;glu32.lib;Halibut Engine.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;zlib.lib;libpng15.lib;dsound.lib;dxguid.lib;sqplus.lib;squirrel.lib;sqdbglib.lib;sqstdlib.lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj.filters b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj.filters
new file mode 100644
index 0000000..1782884
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj.filters
@@ -0,0 +1,60 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Файлы исходного кода
+
+
+ Файлы исходного кода
+
+
+ Файлы исходного кода
+
+
+ Файлы исходного кода
+
+
+ Файлы исходного кода
+
+
+ Файлы исходного кода
+
+
+
+
+ Заголовочные файлы
+
+
+ Заголовочные файлы
+
+
+ Заголовочные файлы
+
+
+ Заголовочные файлы
+
+
+ Заголовочные файлы
+
+
+ Заголовочные файлы
+
+
+ Заголовочные файлы
+
+
+
\ No newline at end of file
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/log.txt b/windows/DoubleHitBalls-win/DoubleHitBalls-win/log.txt
new file mode 100644
index 0000000..6ca1568
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/log.txt
@@ -0,0 +1,113 @@
+2012-Dec-10 00:12:14: Log started
+2012-Dec-10 00:12:18: OpenGL Window created
+2012-Dec-10 00:12:18: Script manager ready
+2012-Dec-10 00:12:20: Render::OpenGL glVersion = 4.0.10318 Compatibility Profile Context
+2012-Dec-10 00:12:20: Render::OpenGL glVersion above 2.0 ok
+2012-Dec-10 00:12:20: Render::OpenGL GL_ARB_framebuffer_object supported ok
+2012-Dec-10 00:12:20: Bind basic functions
+2012-Dec-10 00:12:20: APP INIT
+
+2012-Dec-10 00:12:20: Prepare to add shader TestShader
+2012-Dec-10 00:12:21: ResourceManager::ShaderManager::Shader Vertex shader was successfully compiled to run on hardware.
+
+2012-Dec-10 00:12:22: ResourceManager::ShaderManager::Shader Fragment shader was successfully compiled to run on hardware.
+ WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+
+2012-Dec-10 00:12:22: Shader program is - 3
+2012-Dec-10 00:12:22: ResourceManager::ShaderManager::Shader Fragment shader(s) linked, vertex shader(s) linked.
+WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+WARNING: warning(#276) Symbol 'texCoord' usage doesn't match between two stages
+WARNING: warning(#276) Symbol 'texCoord' usage do
+2012-Dec-10 00:12:22: ResourceManager::ShaderManager shader loaded: TestShader
+2012-Dec-10 00:12:22: Prepare to add shader FrameShader
+2012-Dec-10 00:12:22: ResourceManager::ShaderManager::Shader Vertex shader was successfully compiled to run on hardware.
+
+2012-Dec-10 00:12:22: ResourceManager::ShaderManager::Shader Fragment shader was successfully compiled to run on hardware.
+ WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+
+2012-Dec-10 00:12:22: Shader program is - 6
+2012-Dec-10 00:12:23: ResourceManager::ShaderManager::Shader Fragment shader(s) linked, vertex shader(s) linked.
+WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+WARNING: warning(#276) Symbol 'texCoord' usage doesn't match between two stages
+WARNING: warning(#276) Symbol 'texCoord' usage do
+2012-Dec-10 00:12:23: ResourceManager::ShaderManager shader loaded: FrameShader
+2012-Dec-10 00:12:23: Prepare to add shader BrickShader
+2012-Dec-10 00:12:23: ResourceManager::ShaderManager::Shader Vertex shader was successfully compiled to run on hardware.
+
+2012-Dec-10 00:12:23: ResourceManager::ShaderManager::Shader Fragment shader was successfully compiled to run on hardware.
+ WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+
+2012-Dec-10 00:12:23: Shader program is - 9
+2012-Dec-10 00:12:23: ResourceManager::ShaderManager::Shader Fragment shader(s) linked, vertex shader(s) linked.
+WARNING: 0:1: warning(#260) Keyword 'precision' is supported in GLSL 1.3
+WARNING: warning(#276) Symbol 'texCoord' usage doesn't match between two stages
+WARNING: warning(#276) Symbol 'texCoord' usage do
+2012-Dec-10 00:12:23: ResourceManager::ShaderManager shader loaded: BrickShader
+2012-Dec-10 00:12:24: ResourceManager::TexList Texture added: loading with id = 1
+2012-Dec-10 00:12:24: ResourceManager::TexList Texture added: logo_small with id = 2
+2012-Dec-10 00:12:24: ResourceManager::TexList Texture added: console_bkg.bmp with id = 3
+2012-Dec-10 00:12:24: FrameManager:: frame buffer added: LevelBuffer
+2012-Dec-10 00:12:24: Halibut Render OpenGL init
+
+2012-Dec-10 00:12:25: ResourceManager::TexList Texture added: droid_sans14_font_bitmap.png with id = 5
+2012-Dec-10 00:12:26: ResourceManager::TexList Texture added: main_menu_bkg_left with id = 6
+2012-Dec-10 00:12:27: ResourceManager::TexList Texture added: main_menu_bkg_right with id = 7
+2012-Dec-10 00:12:27: ResourceManager::TexList Texture added: select_level with id = 8
+2012-Dec-10 00:12:27: ResourceManager::TexList Texture added: shutterstock1 with id = 9
+2012-Dec-10 00:12:29: ResourceManager::TexList Texture added: shutterstock2 with id = 10
+2012-Dec-10 00:12:29: ResourceManager::TexList Texture added: shutterstock3 with id = 11
+2012-Dec-10 00:12:30: ResourceManager::TexList Texture added: shutterstock4 with id = 12
+2012-Dec-10 00:12:31: ResourceManager::TexList Texture added: shutterstock5 with id = 13
+2012-Dec-10 00:12:31: ResourceManager::TexList Texture added: shutterstock6 with id = 14
+2012-Dec-10 00:12:32: ResourceManager::TexList Texture added: shutterstock7 with id = 15
+2012-Dec-10 00:12:32: ResourceManager::TexList Texture added: shutterstock8 with id = 16
+2012-Dec-10 00:12:33: ResourceManager::TexList Texture added: shutterstock9 with id = 17
+2012-Dec-10 00:12:33: ResourceManager::TexList Texture added: shutterstock10 with id = 18
+2012-Dec-10 00:12:34: ResourceManager::TexList Texture added: shutterstock11 with id = 19
+2012-Dec-10 00:12:35: ResourceManager::TexList Texture added: shutterstock12 with id = 20
+2012-Dec-10 00:12:35: ResourceManager::TexList Texture added: levelshot1 with id = 21
+2012-Dec-10 00:12:35: ResourceManager::TexList Texture added: levelshot2 with id = 22
+2012-Dec-10 00:12:36: ResourceManager::TexList Texture added: levelshot3 with id = 23
+2012-Dec-10 00:12:36: ResourceManager::TexList Texture added: levelshot4 with id = 24
+2012-Dec-10 00:12:36: ResourceManager::TexList Texture added: levelshot5 with id = 25
+2012-Dec-10 00:12:37: ResourceManager::TexList Texture added: levelshot6 with id = 26
+2012-Dec-10 00:12:37: ResourceManager::TexList Texture added: levelshot7 with id = 27
+2012-Dec-10 00:12:38: ResourceManager::TexList Texture added: levelshot8 with id = 28
+2012-Dec-10 00:12:38: ResourceManager::TexList Texture added: levelshot9 with id = 29
+2012-Dec-10 00:12:38: ResourceManager::TexList Texture added: levelshot10 with id = 30
+2012-Dec-10 00:12:38: ResourceManager::TexList Texture added: levelshot11 with id = 31
+2012-Dec-10 00:12:38: ResourceManager::TexList Texture added: levelshot12 with id = 32
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: game_end with id = 33
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: block1 with id = 34
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: block2 with id = 35
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: block3 with id = 36
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: bonus_gothrough with id = 37
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: bonus_multiplier with id = 38
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: bonus_floor with id = 39
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: ball with id = 40
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: ball_glow with id = 41
+2012-Dec-10 00:12:39: ResourceManager::TexList Texture added: wall_left with id = 42
+2012-Dec-10 00:12:40: ResourceManager::TexList Texture added: wall_right with id = 43
+2012-Dec-10 00:12:40: ResourceManager::TexList Texture added: wall_up with id = 44
+2012-Dec-10 00:12:40: ResourceManager::TexList Texture added: wall_bonus with id = 45
+2012-Dec-10 00:12:40: ResourceManager::TexList Texture added: reflector with id = 46
+2012-Dec-10 00:12:40: ResourceManager::TexList Texture added: back_btn with id = 47
+2012-Dec-10 00:12:40: ResourceManager::TexList Texture added: slide_up_btn with id = 48
+2012-Dec-10 00:12:41: ResourceManager::TexList Texture added: tap_to_continue_btn with id = 49
+2012-Dec-10 00:12:41: ResourceManager::TexList Texture added: credits with id = 50
+2012-Dec-10 00:13:19: Program prepares to quit
+2012-Dec-10 00:13:19: APP DEINIT
+
+2012-Dec-10 00:13:19: HalibutAnimationManager deleting...
+2012-Dec-10 00:13:19: TFontManager deleting...
+2012-Dec-10 00:13:19: ResourceManager::FrameManager deleting
+2012-Dec-10 00:13:19: GUI Manager deleting...
+2012-Dec-10 00:13:20: Script manager shutdown
+2012-Dec-10 00:13:20: ResourceManager::ShaderManager::Shader deleting
+2012-Dec-10 00:13:20: ResourceManager::ShaderManager::Shader deleting
+2012-Dec-10 00:13:20: ResourceManager::ShaderManager::Shader deleting
+2012-Dec-10 00:13:20: ResourceManager::ShaderManager cleared
+2012-Dec-10 00:13:20: ResourceManager::ShaderManager deleting
+2012-Dec-10 00:13:20: ResourceManager::TexList cleared
+2012-Dec-10 00:13:20: ResourceManager::TexList deleting
+2012-Dec-10 00:13:20: HalibutRender::deleting
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/main.cpp b/windows/DoubleHitBalls-win/DoubleHitBalls-win/main.cpp
new file mode 100644
index 0000000..34523a8
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/main.cpp
@@ -0,0 +1,19 @@
+#include "main.h"
+#include "main_code.h"
+
+TAndroidApplication* App = NULL;
+
+int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst,
+ LPSTR lpszCmdLine, int nCmdShow)
+{
+ //Create application
+
+ TAndroidApplication Application;
+ Application.Width = 480;
+ Application.Height = 320;
+
+ App = &Application;
+
+ //Start application
+ return MainLoop(Application);
+}
\ No newline at end of file
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/main.h b/windows/DoubleHitBalls-win/DoubleHitBalls-win/main.h
new file mode 100644
index 0000000..60aa989
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/main.h
@@ -0,0 +1,6 @@
+#pragma once
+#include
+
+#define NOMINMAX 1
+#include
+#undef NOMINMAX
\ No newline at end of file
diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/progress.txt b/windows/DoubleHitBalls-win/DoubleHitBalls-win/progress.txt
new file mode 100644
index 0000000..f11c82a
--- /dev/null
+++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/progress.txt
@@ -0,0 +1 @@
+9
\ No newline at end of file