diff --git a/Asuro.iso b/Asuro.iso index de53d204..27cadcaf 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index 8df90bb8..39bc7199 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index 8df90bb8..39bc7199 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index b0fed1f2..58096312 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/console.o b/lib/console.o index cd0a68da..ac64bd78 100644 Binary files a/lib/console.o and b/lib/console.o differ diff --git a/lib/console.ppu b/lib/console.ppu index 161e07dd..39177de1 100644 Binary files a/lib/console.ppu and b/lib/console.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index fe1c1551..34e53910 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index db8e6368..9bfc9332 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index dad09532..a4c56d56 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/src/console.pas b/src/console.pas index 7b2c1a96..499d1e45 100644 --- a/src/console.pas +++ b/src/console.pas @@ -210,6 +210,8 @@ type TVideoMemory = Array[0..1999] of TCharacter; PVideoMemory = ^TVideoMemory; + TMask = Array[0..63] of Array[0..159] of uint32; + T2DVideoMemory = Array[0..63] of Array[0..159] of TCharacter; P2DVideoMemory = ^T2DVideoMemory; @@ -283,6 +285,7 @@ var mouse_dirt : TMouseDirt; //Character Cell(s) the mouse occupies, these need to be rewritten on mouse move. Window_Border : TCharacter; Default_Char : TCharacter; + WindowTitleMask : TMask; function registerEventHandler(WND : HWND; Event : TEventType; Handler : void) : boolean; begin @@ -403,6 +406,16 @@ begin end; end; +function MouseYToTile(Y : uint32) : uint32; +begin + MouseYToTile:= Y div 16; +end; + +function MouseXToTile(X : uint32) : uint32; +begin + MouseXToTile:= X div 8; +end; + procedure drawMouse; var x, y : uint32; @@ -496,6 +509,7 @@ begin STARTP:= MIDP - (StringSize(WindowManager.Windows[w]^.WND_NAME) div 2) - 1; for x:=WXL to WXR do begin Console_Matrix[WYL][x]:= Window_Border; + WindowTitleMask[WYL][x]:= w; if (x >= STARTP) and (STRC < StringSize(WindowManager.Windows[w]^.WND_NAME)) then begin Console_Matrix[WYL][x].character:= WindowManager.Windows[w]^.WND_NAME[STRC]; inc(STRC); @@ -513,10 +527,15 @@ begin for x:=WindowManager.Windows[w]^.WND_X to WindowManager.Windows[w]^.WND_X + WindowManager.Windows[w]^.WND_W do begin if x > 159 then break; Console_Matrix[y][x]:= WindowManager.Windows[w]^.buffer[y - WindowManager.Windows[w]^.WND_Y][x - WindowManager.Windows[w]^.WND_X]; + WindowTitleMask[y][x]:= 0; end; end; end; if WindowManager.Windows[w]^.Closed then _closeWindow(w); + if WindowTitleMask[MouseYToTile(WindowManager.MousePrev.Y)][MouseXToTile(WindowManager.MousePrev.X)] <> 0 then begin + writestring('Mouse Window: '); + writeintln(WindowTitleMask[MouseYToTile(WindowManager.MousePrev.Y)][MouseXToTile(WindowManager.MousePrev.X)]); + end; end; end; redrawMatrix;