project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Netplay.java
equal
deleted
inserted
replaced
37 import org.hedgewars.hedgeroid.Datastructures.Schemes; |
37 import org.hedgewars.hedgeroid.Datastructures.Schemes; |
38 import org.hedgewars.hedgeroid.Datastructures.TeamInGame; |
38 import org.hedgewars.hedgeroid.Datastructures.TeamInGame; |
39 import org.hedgewars.hedgeroid.Datastructures.TeamIngameAttributes; |
39 import org.hedgewars.hedgeroid.Datastructures.TeamIngameAttributes; |
40 import org.hedgewars.hedgeroid.Datastructures.Weaponset; |
40 import org.hedgewars.hedgeroid.Datastructures.Weaponset; |
41 import org.hedgewars.hedgeroid.Datastructures.Weaponsets; |
41 import org.hedgewars.hedgeroid.Datastructures.Weaponsets; |
42 import org.hedgewars.hedgeroid.frontlib.Flib; |
|
43 import org.hedgewars.hedgeroid.netplay.ThreadedNetConnection.ToNetMsgType; |
42 import org.hedgewars.hedgeroid.netplay.ThreadedNetConnection.ToNetMsgType; |
44 import org.hedgewars.hedgeroid.util.ObservableTreeMap; |
43 import org.hedgewars.hedgeroid.util.ObservableTreeMap; |
45 |
44 |
46 import android.annotation.SuppressLint; |
45 import android.annotation.SuppressLint; |
47 import android.content.Context; |
46 import android.content.Context; |
196 * @param applicationContext |
195 * @param applicationContext |
197 * @return |
196 * @return |
198 */ |
197 */ |
199 public static Netplay getAppInstance(Context applicationContext) { |
198 public static Netplay getAppInstance(Context applicationContext) { |
200 if(instance == null) { |
199 if(instance == null) { |
201 // We'll just do it here and never quit it again... |
|
202 if(Flib.INSTANCE.flib_init() != 0) { |
|
203 throw new RuntimeException("Unable to start frontlib"); |
|
204 } |
|
205 |
|
206 // We will need some default values for rooms, best load them here |
200 // We will need some default values for rooms, best load them here |
207 Scheme defaultScheme = null; |
201 Scheme defaultScheme = null; |
208 Weaponset defaultWeaponset = null; |
202 Weaponset defaultWeaponset = null; |
209 try { |
203 try { |
210 List<Scheme> schemes = Schemes.loadBuiltinSchemes(applicationContext); |
204 List<Scheme> schemes = Schemes.loadBuiltinSchemes(applicationContext); |