example: update mnit examples with android version
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 9 Feb 2014 14:37:01 +0000 (09:37 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 8 Mar 2014 04:20:40 +0000 (23:20 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

examples/mnit_dino/Makefile
examples/mnit_dino/src/dino_android.nit [new file with mode: 0644]
examples/mnit_moles/Makefile
examples/mnit_moles/src/moles_android.nit [new file with mode: 0644]
examples/mnit_simple/Makefile
examples/mnit_simple/src/simple_android.nit [new file with mode: 0644]

index a20273b..0ae0d15 100644 (file)
@@ -4,6 +4,10 @@ linux:
        mkdir -p bin
        ../../bin/nitg --global -o bin/dino src/dino_linux.nit
 
        mkdir -p bin
        ../../bin/nitg --global -o bin/dino src/dino_linux.nit
 
+android:
+       mkdir -p bin
+       ../../bin/nitg --global --no-stacktrace -o bin/dino.apk src/dino_android.nit
+
 doc:
        mkdir -p doc
        ../../bin/nitdoc -d doc/ src/dino.nit src/dino_linux.nit
 doc:
        mkdir -p doc
        ../../bin/nitdoc -d doc/ src/dino.nit src/dino_linux.nit
diff --git a/examples/mnit_dino/src/dino_android.nit b/examples/mnit_dino/src/dino_android.nit
new file mode 100644 (file)
index 0000000..ecf1ea7
--- /dev/null
@@ -0,0 +1,31 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2012-2013 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# 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.
+
+module dino_android
+
+import dino
+
+import mnit_android
+
+redef class ImageSet
+       redef fun start_over_path do return "images/play_again_mobile.png"
+end
+
+redef class SplashScreen
+       redef fun splash_play_path do return "images/splash_play_mobile.png"
+end
+
+super
index 799e70e..27292c5 100644 (file)
@@ -4,5 +4,9 @@ linux:
        mkdir -p bin
        ../../bin/nitg --global -o bin/moles src/moles_linux.nit
 
        mkdir -p bin
        ../../bin/nitg --global -o bin/moles src/moles_linux.nit
 
+android:
+       mkdir -p bin
+       ../../bin/nitg --global --no-stacktrace -o bin/moles.apk src/moles_android.nit
+
 clean:
        rm -rf bin
 clean:
        rm -rf bin
diff --git a/examples/mnit_moles/src/moles_android.nit b/examples/mnit_moles/src/moles_android.nit
new file mode 100644 (file)
index 0000000..e0e92c6
--- /dev/null
@@ -0,0 +1,22 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2012-2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# 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.
+
+module moles_android
+
+import moles
+import mnit_android
+
+super
index 94a928a..14f36b0 100644 (file)
@@ -4,5 +4,9 @@ linux:
        mkdir -p bin
        ../../bin/nitg --global -o bin/simple src/simple_linux.nit
 
        mkdir -p bin
        ../../bin/nitg --global -o bin/simple src/simple_linux.nit
 
+android:
+       mkdir -p bin
+       ../../bin/nitg --global --no-stacktrace -o bin/simple.apk src/simple_android.nit
+
 clean:
        rm -rf bin
 clean:
        rm -rf bin
diff --git a/examples/mnit_simple/src/simple_android.nit b/examples/mnit_simple/src/simple_android.nit
new file mode 100644 (file)
index 0000000..5ac07b2
--- /dev/null
@@ -0,0 +1,22 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2012-2014 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# 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.
+
+module simple_android
+
+import simple
+import mnit_android
+
+super