Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
osecpu072d で追加された新しいキー入力に対応
・新しいキー入力に対応。( editor.ose、othello.ose で動作確認)
・c_blike_01f_linux の最新版 (commit: 83868bb8067f4209f4409e5b2d268b164b7a653e 以降)が別途必須。
Ubuntu13.04 (i686版(32bit環境))で動作確認済み。64bit環境では動作しない。
gcc -D__linux__ osecpu.c `pkg-config blike --cflags --libs` -o osecpu
#if (DRV_OSNUM == 0x0003)
// by takeutch-kemeco, 2013.07.25-
// gcc -D__linux__ osecpu.c `pkg-config blike --cflags --libs` -o osecpu
void __bl_openWin_attach_vram(int, int, int*);
void *__bld_mallocRWE(unsigned int);
void bld_flshWin(int, int, int, int);
void bl_wait(int);
void __bld_set_callback_key_press(void (*f)(void*, const int));
void __bld_set_callback_key_release(void (*f)(void*, const int));
extern int bl_argc;
extern const UCHAR** bl_argv;
static void __drv_bld_callback_key_press(void* a, const int keyval) { if (keyval != -1) putKeybuf(keyval); }
static void __drv_bld_callback_key_release(void* a, const int keyval) { /* putKeybuf(0x0fff); */ }
void *mallocRWE(int bytes) { return __bld_mallocRWE(bytes); }
void drv_openWin(int sx, int sy, UCHAR *buf, char *winClosed) { __bl_openWin_attach_vram(sx, sy, (int*) buf); }
void drv_flshWin(int sx, int sy, int x0, int y0) { bld_flshWin(sx, sy, x0, y0); }
void drv_sleep(int msec) { bl_wait(msec); }
OsecpuMain(bl_argc, bl_argv);
#endif /* (DRV_OSNUM == 0x0003) */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment