hedgewars/hwLibrary.pas
branchhedgeroid
changeset 6027 302408e45052
parent 6025 cac1d5601d7c
child 6033 6bcc36225162
equal deleted inserted replaced
6025:cac1d5601d7c 6027:302408e45052
    26 // to make these functions available in the C/C++/Objective-C source files
    26 // to make these functions available in the C/C++/Objective-C source files
    27 // (add "#include PascalImports.h" near the top of these files if it's not there yet)
    27 // (add "#include PascalImports.h" near the top of these files if it's not there yet)
    28 uses PascalExports, hwengine{$IFDEF ANDROID}, jni{$ENDIF};
    28 uses PascalExports, hwengine{$IFDEF ANDROID}, jni{$ENDIF};
    29 exports Game, HW_versionInfo;
    29 exports Game, HW_versionInfo;
    30 
    30 
       
    31 {$IFDEF ANDROID}
    31 function JNI_HW_versionInfoNet(env: PJNIEnv; obj: JObject):JInt;cdecl;
    32 function JNI_HW_versionInfoNet(env: PJNIEnv; obj: JObject):JInt;cdecl;
    32 begin
    33 begin
    33     JNI_HW_versionInfoNet := cNetProtoVersion;
    34     JNI_HW_versionInfoNet := cNetProtoVersion;
    34 end;
    35 end;
    35 
    36 
    36 function JNI_HW_versionInfoVersion(env: PJNIEnv; obj: JObject):JString; cdecl;
    37 function JNI_HW_versionInfoVersion(env: PJNIEnv; obj: JObject):JString; cdecl;
    37 begin
    38 begin
    38     JNI_HW_versionInfoVersion := env^.NewStringUTF(env, PChar(cVersionString));
    39     JNI_HW_versionInfoVersion := env^.NewStringUTF(env, PChar(cVersionString));
    39 end;
    40 end;
    40 
    41 
    41 
       
    42 {$IFDEF ANDROID}
       
    43 exports
    42 exports
    44     JNI_HW_versionInfoNet name Java_Prefix+'HWversionInfoNetProto', 
    43     JNI_HW_versionInfoNet name Java_Prefix+'HWversionInfoNetProto', 
    45     JNI_HW_versionInfoVersion name Java_Prefix+'HWversionInfoVersion', 
    44     JNI_HW_versionInfoVersion name Java_Prefix+'HWversionInfoVersion', 
    46     GenLandPreview name Java_Prefix + 'GenLandPreview',
    45     GenLandPreview name Java_Prefix + 'GenLandPreview',
    47     HW_getNumberOfweapons name Java_Prefix + 'HWgetNumberOfWeapons',
    46     HW_getNumberOfweapons name Java_Prefix + 'HWgetNumberOfWeapons',