Mercurial > vba-clojure
view src/clojure/clojure.cpp @ 54:88218735d220
stepping achieved
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 07 Mar 2012 12:50:44 -0600 |
parents | 9d0ec2614443 |
children | 719d910c90f8 |
line wrap: on
line source
1 #include "com_aurellem_gb_Gb.h"2 #include "../sdl/Drive.h"4 #include <string.h>6 #define UNUSED(x) (void)(x)9 /*10 * Class: com_aurellem_gb_Gb11 * Method: sayHello12 * Signature: ()V13 */14 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_sayHello15 (JNIEnv *env, jclass clazz){16 UNUSED(env);UNUSED(clazz);17 printf("Hello from GB\n");18 }20 /*21 * Class: com_aurellem_gb_Gb22 * Method: startEmulator23 * Signature: (Ljava/lang/String;)V24 */25 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_startEmulator26 (JNIEnv *env, jclass clazz, jstring str){27 UNUSED(env);UNUSED(clazz);UNUSED(str);29 const char *_romName = env->GetStringUTFChars(str, 0);30 size_t len = strlen(_romName);32 char romName[len + 1];34 strcpy(romName, _romName);36 char* arguments[] = {"vba-rlm", romName};37 runVBA(2, arguments);38 }40 /*41 * Class: com_aurellem_gb_Gb42 * Method: step43 * Signature: ()V44 */45 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_step46 (JNIEnv *env, jclass clazz){47 step();48 }50 /*51 * Class: com_aurellem_gb_Gb52 * Method: shutdown53 * Signature: ()V54 */55 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_shutdown56 (JNIEnv *env, jclass clazz){57 shutdown();58 }