François Gautrais 8 éve
szülő
commit
a9722bda01

+ 9 - 6
app/src/main/AndroidManifest.xml

@@ -31,24 +31,27 @@
             android:label="@string/title_activity_resource_list" />
         <activity
             android:name=".MenuActivity"
-            android:label="@string/title_activity_menu"></activity>
+            android:label="@string/title_activity_menu" />
         <activity
             android:name=".SettingsActivity"
             android:label="@string/title_activity_settings" />
         <activity android:name=".TransferActivity" />
         <activity android:name=".EndActivity" />
         <activity android:name=".NewMenuActivity">
+        </activity>
+
+        <activity
+            android:name=".PuzzleActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:label="@string/title_activity_puzzle"
+            android:theme="@style/FullscreenTheme" />
+        <activity android:name=".PermissionActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity
-            android:name=".PuzzleActivity"
-            android:configChanges="orientation|keyboardHidden|screenSize"
-            android:label="@string/title_activity_puzzle"
-            android:theme="@style/FullscreenTheme"></activity>
     </application>
 
 </manifest>

+ 52 - 50
app/src/main/java/app/brest/testmin3d/NewMenuActivity.java

@@ -120,57 +120,59 @@ public class NewMenuActivity extends Activity implements View.OnClickListener{
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_new_menu);
-        mRootLayout = (RelativeLayout)findViewById(R.id.menu_root);
+            System.out.println( " == " + (mGame == null) );
+
+            setContentView(R.layout.activity_new_menu);
+            mRootLayout = (RelativeLayout) findViewById(R.id.menu_root);
+
+
+            Game g = Game.load(this);
+            System.out.println( (g != null) + " == " + (mGame == null) );
+            if (g != null && mGame == null) {
+                mGame = g;
+                Game.setGame(mGame);
+                mGame.newSensorManager(this);
+                Toast.makeText(this, "Chargement", Toast.LENGTH_LONG).show();
+            } else if (mGame == null) {
+                mGame = new Game("game_medium", this);
+                Game.setGame(mGame);
+                Toast.makeText(this, "Nouveau Jeu", Toast.LENGTH_LONG).show();
+            } else if (mGame == null) {
+                Toast.makeText(this, "Erreur", Toast.LENGTH_LONG).show();
+                throw new Error("Le jeu n'est pas sauvegardé");
+            }
+
+            updateSize();
+            Settings.setSettings(mGame.getmSettings());
+
+            mIbScanner = new Button(this);
+            //mIbScanner.setImageResource(R.drawable.scanner);
+            //mIbScanner.setScaleType(ImageView.ScaleType.FIT_CENTER);
+            mRootLayout.addView(mIbScanner);
+            mIbScanner.setBackgroundResource(R.drawable.uibuttoncircle);
+            mIbScanner.setText("Scanner");
+            mIbScanner.setTextColor(getResources().getColor(R.color.dull_4));
+            mIbScanner.setTextSize(22);
+            mIbScanner.setOnClickListener(this);
+
+            moveView(mIbScanner, mWidth / 2 - mHeight / 8, mHOffset + mHeight / 2 - mHeight / 8, mHeight / 4, mHeight / 4);
+
+            mBBriefing = newButton("Briefing");
+            mBInvotory = newButton("Inventaire");
+            mBMap = newButton("Carte");
+            mBOptions = newButton("Options");
+            mBMenu = newButton("Menu Principal");
+            mBMenu.setBackgroundResource(R.drawable.title);
+            mBSend = newButton("Envoyer les données");
+            Resources r = getResources();
+            float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 70, r.getDisplayMetrics());
+            moveView(mBMenu, 0, 0, mWidth, (int) px);
+            //mBSend = newButton("Envoyer");
+
+
+            setUpStyle();
+            mCustomHandler.postDelayed(updateTimerThread, 10);
 
-        Game g = Game.load(this);
-
-        if (g!= null && mGame==null) {
-            mGame = g;
-            Game.setGame(mGame);
-            mGame.newSensorManager(this);
-            Toast.makeText(this, "Chargement", Toast.LENGTH_LONG).show();
-        }
-        else if( mGame==null)
-        {
-            mGame = new Game("game_medium", this);
-            Game.setGame(mGame);
-            Toast.makeText(this, "Nouveau Jeu", Toast.LENGTH_LONG).show();
-        }else if( mGame==null)
-        {
-            Toast.makeText(this, "Erreur", Toast.LENGTH_LONG).show();
-            throw new Error("Le jeu n'est pas sauvegardé");
-        }
-        updateSize();
-        Settings.setSettings(mGame.getmSettings());
-
-        mIbScanner = new Button(this);
-        //mIbScanner.setImageResource(R.drawable.scanner);
-        //mIbScanner.setScaleType(ImageView.ScaleType.FIT_CENTER);
-        mRootLayout.addView(mIbScanner);
-        mIbScanner.setBackgroundResource(R.drawable.uibuttoncircle);
-        mIbScanner.setText("Scanner");
-        mIbScanner.setTextColor(getResources().getColor(R.color.dull_4));
-        mIbScanner.setTextSize(22);
-        mIbScanner.setOnClickListener(this);
-
-        moveView(mIbScanner, mWidth/2-mHeight/8, mHOffset+mHeight/2-mHeight/8, mHeight/4, mHeight/4);
-
-        mBBriefing = newButton("Briefing");
-        mBInvotory = newButton("Inventaire");
-        mBMap = newButton("Carte");
-        mBOptions = newButton("Options");
-        mBMenu = newButton("Menu Principal");
-        mBMenu.setBackgroundResource(R.drawable.title);
-        mBSend = newButton("Envoyer les données");
-        Resources r = getResources();
-        float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 70, r.getDisplayMetrics());
-        moveView(mBMenu, 0, 0, mWidth, (int)px);
-        //mBSend = newButton("Envoyer");
-
-
-        setUpStyle();
-        mCustomHandler.postDelayed(updateTimerThread, 10);
 /*
         mGame.pickResource("aa");
         mGame.pickResource("ab");

+ 80 - 0
app/src/main/java/app/brest/testmin3d/PermissionActivity.java

@@ -0,0 +1,80 @@
+package app.brest.testmin3d;
+
+import android.Manifest;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.location.LocationManager;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.Toast;
+
+public class PermissionActivity extends AppCompatActivity {
+    private int m_nPerm=3;
+    static final int PERM_FINE_LOCATION=1337;
+    static final int PERM_CAMERA=1338;
+    static final int PERM_COARSE_LOCATION=1339;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_permission);
+
+
+
+
+
+
+        if (ContextCompat.checkSelfPermission(this,   Manifest.permission.ACCESS_FINE_LOCATION)
+                != PackageManager.PERMISSION_GRANTED) {
+            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},   PERM_FINE_LOCATION);
+        } else m_nPerm--;
+
+
+        if (ContextCompat.checkSelfPermission(this,   Manifest.permission.CAMERA)
+                != PackageManager.PERMISSION_GRANTED) {
+            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, PERM_CAMERA);
+        } else m_nPerm--;
+
+
+        if (ContextCompat.checkSelfPermission(this,   Manifest.permission.ACCESS_COARSE_LOCATION)
+                != PackageManager.PERMISSION_GRANTED) {
+            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERM_COARSE_LOCATION);
+        } else m_nPerm--;
+
+        if(m_nPerm==0)
+        {
+            Intent intent = new Intent(this, NewMenuActivity.class);
+            startActivity(intent);
+        }
+
+    }
+
+    public void onRequestPermissionsResult(int requestCode,
+                                           String permissions[], int[] grantResults) {
+        switch (requestCode) {
+            case PERM_FINE_LOCATION:
+                if (grantResults.length > 0  && grantResults[0] == PackageManager.PERMISSION_GRANTED)
+                    m_nPerm--;
+                else finish();
+                break;
+            case PERM_CAMERA:
+                if (grantResults.length > 0  && grantResults[0] == PackageManager.PERMISSION_GRANTED)
+                    m_nPerm--;
+                else finish();
+                break;
+            case PERM_COARSE_LOCATION:
+                if (grantResults.length > 0  && grantResults[0] == PackageManager.PERMISSION_GRANTED)
+                    m_nPerm--;
+                else finish();
+                break;
+        }
+
+        if(m_nPerm==0) {
+            Intent intent = new Intent(this, NewMenuActivity.class);
+            startActivity(intent);
+        }
+    }
+
+}

+ 4 - 0
app/src/main/java/app/brest/utils/app/brest/game/Resource.java

@@ -6,6 +6,7 @@ import android.util.Log;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.io.InputStream;
 import java.io.Serializable;
 
 import app.brest.utils.JSONLoader;
@@ -32,6 +33,9 @@ public class Resource implements Serializable {
 
     protected void loadResourceData(Activity act)
     {
+        System.out.println("Loading ressource res/raw/"+mName+"_res");
+        int id = act.getResources().getIdentifier(mName+"_res","raw", act.getPackageName());
+        InputStream inputStream = act.getResources().openRawResource(id);
         JSONObject obj = JSONLoader.load(act, mName+"_res");
         try {
             mComment=obj.getString("comment");

+ 63 - 0
app/src/main/java/app/brest/utils/files/FileManager.java

@@ -0,0 +1,63 @@
+package app.brest.utils.files;
+
+import android.app.Activity;
+import android.content.res.AssetManager;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.concurrent.ExecutionException;
+
+/**
+ * Created by ptitcois on 27/03/17.
+ */
+public class FileManager {
+    protected static AssetManager m_asset=null;
+    protected static Activity m_act = null;
+
+    public static void init(Activity a)
+    {
+        m_act=a;
+        m_asset=a.getAssets();
+    }
+
+    public static boolean isInit() throws Exception {
+        if(m_asset==null)
+        {
+            throw new Exception("Erreur FileManager non initialisee");
+        }
+        return true;
+    }
+
+    public static InputStream openFile(String path) throws Exception {
+        isInit();
+        InputStream is = null;
+        try {
+            is = m_asset.open(path);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return is;
+    }
+
+    public static Bitmap openImage(String path) throws Exception {
+        isInit();
+        InputStream is = null;
+        Bitmap bitmap = null;
+        try {
+            is = m_asset.open(path);
+            bitmap = BitmapFactory.decodeStream(is);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return bitmap;
+    }
+
+    public static Uri getUri(String path) throws Exception {
+        isInit();
+        return Uri.parse("file:///android_asset/"+path);
+    }
+
+}

+ 47 - 0
app/src/main/java/app/brest/utils/files/JSONAssetsManager.java

@@ -0,0 +1,47 @@
+package app.brest.utils.files;
+
+import android.app.Activity;
+import android.content.res.AssetManager;
+import android.util.Log;
+
+import org.json.JSONObject;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+/**
+ * Created by ptitcois on 27/03/17.
+ */
+public class JSONAssetsManager {
+        public static JSONObject load(Activity context, String name)
+        {
+            int id = context.getResources().getIdentifier(name,"raw", context.getPackageName());
+
+
+
+            InputStream inputStream = context.getResources().openRawResource(id);
+            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+
+            int ctr;
+            try {
+                ctr = inputStream.read();
+                while (ctr != -1) {
+                    byteArrayOutputStream.write(ctr);
+                    ctr = inputStream.read();
+                }
+                inputStream.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            Log.v("Text Data", byteArrayOutputStream.toString());
+            try {
+                // Parse the data into jsonobject to get original data in form of json.
+                JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());
+                return jObject;
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return null;
+        }
+
+}

+ 12 - 0
app/src/main/res/layout/activity_permission.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    tools:context="app.brest.testmin3d.PermissionActivity">
+
+</RelativeLayout>

+ 9 - 9
app/src/main/res/raw/aa_res

@@ -3,21 +3,21 @@
 	"name" : "aa",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Vue de Recouvrance",

+ 9 - 9
app/src/main/res/raw/ab_res

@@ -3,21 +3,21 @@
 	"name" : "ab",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Carte de Brest",

+ 9 - 9
app/src/main/res/raw/ac_res

@@ -3,21 +3,21 @@
 	"name" : "ac",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Plan de Brest \"même\"",

+ 9 - 9
app/src/main/res/raw/ad_res

@@ -3,21 +3,21 @@
 	"name" : "ad",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Vue de Brest \"même\"",

+ 9 - 9
app/src/main/res/raw/ae_res

@@ -3,21 +3,21 @@
 	"name" : "ae",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Le tramway à Brest !",

+ 9 - 9
app/src/main/res/raw/af_res

@@ -3,21 +3,21 @@
 	"name" : "af",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Photo aérienne",

+ 9 - 9
app/src/main/res/raw/ag_res

@@ -3,21 +3,21 @@
 	"name" : "ag",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Photo de Recouvrance",

+ 9 - 9
app/src/main/res/raw/ah_res

@@ -3,21 +3,21 @@
 	"name" : "ah",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 1,
 	"title" : "Indice: Plan de recouvrance",

+ 6 - 6
app/src/main/res/raw/ai_res

@@ -3,15 +3,15 @@
 	"name" : "ai",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		180
+		0.0,
+		0.0,
+		180.0
 	],
 	"scale" : 
 	[

+ 9 - 9
app/src/main/res/raw/ba_res

@@ -3,21 +3,21 @@
 	"name" : "ba",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Photo d'une tour",

+ 9 - 9
app/src/main/res/raw/bb_res

@@ -3,21 +3,21 @@
 	"name" : "bb",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Carte de Recouvrance",

+ 9 - 9
app/src/main/res/raw/bc_res

@@ -3,21 +3,21 @@
 	"name" : "bc",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Photo du chateau",

+ 9 - 9
app/src/main/res/raw/bd_res

@@ -3,21 +3,21 @@
 	"name" : "bd",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Photo de Brest \"même\"",

+ 9 - 9
app/src/main/res/raw/be_res

@@ -3,21 +3,21 @@
 	"name" : "be",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Photo prise du pont",

+ 9 - 9
app/src/main/res/raw/bf_res

@@ -3,21 +3,21 @@
 	"name" : "bf",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Photo aérienne de Brest \"même\"",

+ 9 - 9
app/src/main/res/raw/bg_res

@@ -3,21 +3,21 @@
 	"name" : "bg",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 2,
 	"title" : "Indice: Photo aérienne de Brest",

+ 6 - 6
app/src/main/res/raw/bh_res

@@ -3,15 +3,15 @@
 	"name" : "bh",
 	"position" : 
 	[
-		0,
-		0,
-		-30
+		0.0,
+		0.0,
+		-30.0
 	],
 	"rotation" : 
 	[
-		180,
-		90,
-		180
+		180.0,
+		90.0,
+		180.0
 	],
 	"scale" : 
 	[

+ 6 - 6
app/src/main/res/raw/ca_res

@@ -3,15 +3,15 @@
 	"name" : "ca",
 	"position" : 
 	[
-		0,
-		0,
-		-5
+		0.0,
+		0.0,
+		-5.0
 	],
 	"rotation" : 
 	[
-		30,
-		0,
-		0
+		30.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[

+ 6 - 6
app/src/main/res/raw/cb_res

@@ -3,15 +3,15 @@
 	"name" : "cb",
 	"position" : 
 	[
-		0,
-		0,
-		-10
+		0.0,
+		0.0,
+		-10.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[

+ 9 - 9
app/src/main/res/raw/cc_res

@@ -3,21 +3,21 @@
 	"name" : "cc",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		180
+		0.0,
+		0.0,
+		180.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 3,
 	"title" : "Cône",

+ 9 - 9
app/src/main/res/raw/cd_res

@@ -3,21 +3,21 @@
 	"name" : "cd",
 	"position" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 3,
 	"title" : "Volant",

+ 9 - 9
app/src/main/res/raw/ce_res

@@ -3,21 +3,21 @@
 	"name" : "ce",
 	"position" : 
 	[
-		0,
-		0,
-		-15
+		0.0,
+		0.0,
+		-15.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 3,
 	"title" : "Mâchoires",

+ 9 - 9
app/src/main/res/raw/cf_res

@@ -3,21 +3,21 @@
 	"name" : "cf",
 	"position" : 
 	[
-		0,
-		-5,
-		-10
+		0.0,
+		-5.0,
+		-10.0
 	],
 	"rotation" : 
 	[
-		30,
-		0,
-		0
+		30.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 3,
 	"title" : "Roues dentées",

+ 9 - 9
app/src/main/res/raw/cg_res

@@ -3,21 +3,21 @@
 	"name" : "cg",
 	"position" : 
 	[
-		-5,
-		-6,
-		-30
+		-5.0,
+		-6.0,
+		-30.0
 	],
 	"rotation" : 
 	[
-		0,
-		0,
-		0
+		0.0,
+		0.0,
+		0.0
 	],
 	"scale" : 
 	[
-		1,
-		1,
-		1
+		1.0,
+		1.0,
+		1.0
 	],
 	"stage" : 3,
 	"title" : "Verrou",

+ 72 - 72
app/src/main/res/raw/game_medium

@@ -25,14 +25,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4931449890136719,
 						48.385330200195312
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -66,14 +66,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4907364845275879,
 						48.382221221923828
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -103,14 +103,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.49114990234375,
 						48.381580352783203
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -144,14 +144,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.5009450912475586,
 						48.381233215332031
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -181,14 +181,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4994001388549805,
 						48.381622314453125
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -218,14 +218,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.5000972747802734,
 						48.382930755615234
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -255,14 +255,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4998936653137207,
 						48.386207580566406
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -292,14 +292,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4993090629577637,
 						48.384357452392578
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -329,14 +329,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4981074333190918,
 						48.383739471435547
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -366,14 +366,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4940624237060547,
 						48.385536193847656
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -407,14 +407,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.493462085723877,
 						48.385055541992188
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -444,14 +444,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4920401573181152,
 						48.383201599121094
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -481,14 +481,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4926247596740723,
 						48.381889343261719
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -522,14 +522,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4973726272583008,
 						48.383068084716797
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -559,14 +559,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4977583885192871,
 						48.383926391601562
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -596,14 +596,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4936871528625488,
 						48.383296966552734
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -633,14 +633,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.494781494140625,
 						48.384475708007812
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -678,14 +678,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.494443416595459,
 						48.385124206542969
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -715,14 +715,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4940090179443359,
 						48.384235382080078
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -752,14 +752,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4926571846008301,
 						48.383560180664062
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -789,14 +789,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.492711067199707,
 						48.382659912109375
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -826,14 +826,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.497227668762207,
 						48.383514404296875
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -863,14 +863,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4956669807434082,
 						48.384307861328125
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],
@@ -900,14 +900,14 @@
 			"points" : 
 			[
 				{
-					"angle" : 180,
+					"angle" : 180.0,
 					"coordinates" : 
 					[
 						-4.4979734420776367,
 						48.384464263916016
 					],
-					"field" : 90,
-					"radius" : 5,
+					"field" : 90.0,
+					"radius" : 5.0,
 					"useAngle" : false
 				}
 			],