19 */ |
19 */ |
20 |
20 |
21 package org.hedgewars.hedgeroid.EngineProtocol; |
21 package org.hedgewars.hedgeroid.EngineProtocol; |
22 |
22 |
23 public class PascalExports { |
23 public class PascalExports { |
24 public static Object engineMutex = new Object(); |
24 public static Object engineMutex = new Object(); |
25 |
25 |
26 static{ |
26 static{ |
27 System.loadLibrary("SDL"); |
27 System.loadLibrary("SDL"); |
28 System.loadLibrary("SDL_image"); |
28 System.loadLibrary("SDL_image"); |
29 System.loadLibrary("mikmod"); |
29 System.loadLibrary("mikmod"); |
30 System.loadLibrary("SDL_net"); |
30 System.loadLibrary("SDL_net"); |
31 System.loadLibrary("SDL_mixer"); |
31 System.loadLibrary("SDL_mixer"); |
32 System.loadLibrary("SDL_ttf"); |
32 System.loadLibrary("SDL_ttf"); |
33 System.loadLibrary("lua5.1"); |
33 System.loadLibrary("lua5.1"); |
34 System.loadLibrary("physfs"); |
34 System.loadLibrary("physfs"); |
35 System.loadLibrary("physlayer"); |
35 System.loadLibrary("physlayer"); |
36 System.loadLibrary("hwengine"); |
36 System.loadLibrary("hwengine"); |
37 } |
37 } |
38 |
38 |
39 public static native int HWgetMaxNumberOfTeams(); |
39 public static native int HWgetMaxNumberOfTeams(); |
40 private static native void HWGenLandPreview(int port); |
40 private static native void HWGenLandPreview(int port); |
41 |
41 |
42 public static void synchronizedGenLandPreview(int port) { |
42 public static void synchronizedGenLandPreview(int port) { |
43 synchronized(engineMutex) { |
43 synchronized(engineMutex) { |
44 HWGenLandPreview(port); |
44 HWGenLandPreview(port); |
45 } |
45 } |
46 } |
46 } |
47 |
47 |
48 } |
48 } |