mirror of
https://github.com/KarolS/millfork.git
synced 2024-11-01 05:05:32 +00:00
16 lines
287 B
Plaintext
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
|
|
}
|