Import backup from 2004-03-09

This commit is contained in:
josh committed 2017-07-25 22:23:46 -04:00
1 parent 8d0e6de040
commit 7f886e44e1
12 files changed
+211 -119

No files matched your search

+6 -6
View File
@@ -25,8 +25,8 @@ void mouse_init()
outportb(0x64, 0xD4); //send command to mouse, not kbd
outportb(0x60, 0xF4); //enable data reporting
mouse_x = video_mode.XResolution >> 1;
mouse_y = video_mode.YResolution >> 1;
mouse_x = video_getWidth() >> 1;
mouse_y = video_getHeight() >> 1;
//outportb(0x64, 0xD4);
//outportb(0x60, 0xE7); //scaling 2:1
@@ -50,12 +50,12 @@ void isr_mouse()
mouse_y -= adjy; //-= because screen y coordinates are opposite mouse y coordinates
if (mouse_x < 0)
mouse_x = 0;
if (mouse_x >= video_mode.XResolution)
mouse_x = video_mode.XResolution - 1;
if (mouse_x >= video_getWidth())
mouse_x = video_getWidth() - 1;
if (mouse_y < 0)
mouse_y = 0;
if (mouse_y >= video_mode.YResolution)
mouse_y = video_mode.YResolution - 1;
if (mouse_y >= video_getHeight())
mouse_y = video_getHeight() - 1;
if (mouse_inbuffer[0] & 0x01) //left button
video_pset(mouse_x, mouse_y, 0x00FF8800);
else