two more methods (nn_setArchitecture, nn_addSupportedArchitecture) for the big '26
This commit is contained in:
@@ -173,11 +173,49 @@ JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1create
|
||||
JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1getComputerState
|
||||
(JNIEnv * env, jclass, jobject computer) {
|
||||
nn_Computer* nnPC = (nn_Computer*) Carbon::PointerBacked::GetPointer(env, computer);
|
||||
NULLPTR_CHECK(nnPC, nn_Component);
|
||||
NULLPTR_CHECK(nnPC, nn_Computer);
|
||||
return Carbon::Map::To_nn_ComputerState(env, nn_getComputerState(nnPC));
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_getLuaArch
|
||||
(JNIEnv * env, jclass) {
|
||||
return Carbon::Map::To_nn_Architecture(env, getLuaArch());
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1setCallBudget
|
||||
(JNIEnv * env, jclass, jobject computer, jdouble budget) {
|
||||
nn_Computer* nnPC = (nn_Computer*) Carbon::PointerBacked::GetPointer(env, computer);
|
||||
NULLPTR_CHECKNR(nnPC, nn_Computer);
|
||||
nn_setCallBudget(nnPC, budget);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1setTotalEnergy
|
||||
(JNIEnv * env, jclass, jobject computer, jdouble maxEnergy) {
|
||||
nn_Computer* nnPC = (nn_Computer*) Carbon::PointerBacked::GetPointer(env, computer);
|
||||
NULLPTR_CHECKNR(nnPC, nn_Computer);
|
||||
nn_setTotalEnergy(nnPC, maxEnergy);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1setArchitecture
|
||||
(JNIEnv * env, jclass, jobject computer, jobject arch) {
|
||||
nn_Computer* nnPC = (nn_Computer*) Carbon::PointerBacked::GetPointer(env, computer);
|
||||
nn_Architecture* nnArch = (nn_Architecture*) Carbon::PointerBacked::GetPointer(env, arch);
|
||||
NULLPTR_CHECKNR(nnPC, nn_Computer);
|
||||
NULLPTR_CHECKNR(nnArch, nn_Architecture);
|
||||
|
||||
nn_setArchitecture(nnPC, nnArch);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1addSupportedArchitecture
|
||||
(JNIEnv * env, jclass, jobject computer, jobject arch) {
|
||||
nn_Computer* nnPC = (nn_Computer*) Carbon::PointerBacked::GetPointer(env, computer);
|
||||
nn_Architecture* nnArch = (nn_Architecture*) Carbon::PointerBacked::GetPointer(env, arch);
|
||||
NULLPTR_CHECKNR(nnPC, nn_Computer);
|
||||
NULLPTR_CHECKNR(nnArch, nn_Architecture);
|
||||
|
||||
nn_addSupportedArchitecture(nnPC, nnArch);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1setTmpAddress
|
||||
(JNIEnv *, jclass, jobject computer, jstring address) {
|
||||
// TODO
|
||||
}
|
||||
Reference in New Issue
Block a user