Добавил mpcore

This commit is contained in:
2025-04-06 20:23:24 +03:00
parent ea29c5a3fc
commit 6dd4612a88
24 changed files with 280 additions and 456 deletions
@@ -0,0 +1,24 @@
package nfs.mod.mpcore
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("nfs.mod.mpcore.test", appContext.packageName)
}
}
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
+12
View File
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.22.1)
project("mpcore")
add_library(${CMAKE_PROJECT_NAME} SHARED
main.cpp
util/util.cpp
util/armhook.cpp)
target_link_libraries(${CMAKE_PROJECT_NAME}
android
log)
@@ -0,0 +1,7 @@
package nfs.mod.mpcore
object MultiplayerCore {
fun loadCore() = System.loadLibrary("mpcore")
}
@@ -0,0 +1,17 @@
package nfs.mod.mpcore
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}