1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-25 06:29:17 +00:00
millfork/include/x16_mouse.mfk
2020-05-01 15:19:25 +02:00

16 lines
287 B
Plaintext

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
}