Added a small example of the frontend still being worked but commited so the downloader now works hedgeroid
authorXeli
Thu, 14 Jul 2011 15:42:54 +0200
branchhedgeroid
changeset 5416 26a36326d199
parent 5414 34663c4743f7
child 5418 9b82f4f9fba6
Added a small example of the frontend still being worked but commited so the downloader now works
project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/MainActivity.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/MainActivity.java	Thu Jul 14 15:42:01 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/MainActivity.java	Thu Jul 14 15:42:54 2011 +0200
@@ -1,5 +1,7 @@
 package org.hedgewars.mobile;
 
+import org.hedgewars.mobile.Downloader.DownloadActivity;
+
 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
@@ -32,7 +34,7 @@
 
 	private OnClickListener startGameClicker = new OnClickListener(){
 		public void onClick(View v){
-			startActivity(new Intent(getApplicationContext(), SDLActivity.class));
+			startActivity(new Intent(getApplicationContext(), StartGameActivity.class));
 		}
 	};
 	
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java	Thu Jul 14 15:42:01 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java	Thu Jul 14 15:42:54 2011 +0200
@@ -237,9 +237,11 @@
 	public void run() {
 		// Runs SDL_main()
 
-		String path = DownloadService.getDownloadPath(SDLActivity.mSingleton) + "Data";
+		EngineProtocolNetwork ipc = new EngineProtocolNetwork(EngineProtocolNetwork.MODE_GAME);
 		
-		SDLActivity.nativeInit(new String[]{ "0", String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), "0", "null", "xeli", "1", "1", "1", "0", "/sdcard/bla.hwd", path});
+		String path = Utils.getDownloadPath(SDLActivity.mSingleton) + "Data";
+		
+		SDLActivity.nativeInit(new String[]{ String.valueOf(ipc.port), String.valueOf(surfaceWidth), String.valueOf(surfaceHeight), "0", "null", "xeli", "1", "1", "1", "0", "", path});
 
 		//Log.v("SDL", "SDL thread terminated");
 	}