1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-06-02 00:41:40 +00:00
millfork/include/x16_mouse.mfk

16 lines
287 B
Plaintext
Raw Normal View History

import x16_kernal
import mouse
void read_mouse() {
byte btn
mouse_scan()
btn = mouse_get(0)
mouse_x = kernal_registers[0]
mouse_y = kernal_registers[1]
mouse_lbm = btn & 1 != 0
mouse_rbm = btn & 2 != 0
#if USE_MOUSE_MBM
mouse_mbm = btn & 4 != 0
#endif
}