git-svn-id: https://spexeah.com:8443/svn/Asuro@613 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
58bf1ae93d
commit
3c6565a929
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
Binary file not shown.
BIN
lib/asuro.ppu
BIN
lib/asuro.ppu
Binary file not shown.
BIN
lib/console.o
BIN
lib/console.o
Binary file not shown.
BIN
lib/console.ppu
BIN
lib/console.ppu
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/libpsystem.a
BIN
lib/libpsystem.a
Binary file not shown.
@ -210,6 +210,8 @@ type
|
|||||||
TVideoMemory = Array[0..1999] of TCharacter;
|
TVideoMemory = Array[0..1999] of TCharacter;
|
||||||
PVideoMemory = ^TVideoMemory;
|
PVideoMemory = ^TVideoMemory;
|
||||||
|
|
||||||
|
TMask = Array[0..63] of Array[0..159] of uint32;
|
||||||
|
|
||||||
T2DVideoMemory = Array[0..63] of Array[0..159] of TCharacter;
|
T2DVideoMemory = Array[0..63] of Array[0..159] of TCharacter;
|
||||||
P2DVideoMemory = ^T2DVideoMemory;
|
P2DVideoMemory = ^T2DVideoMemory;
|
||||||
|
|
||||||
@ -283,6 +285,7 @@ var
|
|||||||
mouse_dirt : TMouseDirt; //Character Cell(s) the mouse occupies, these need to be rewritten on mouse move.
|
mouse_dirt : TMouseDirt; //Character Cell(s) the mouse occupies, these need to be rewritten on mouse move.
|
||||||
Window_Border : TCharacter;
|
Window_Border : TCharacter;
|
||||||
Default_Char : TCharacter;
|
Default_Char : TCharacter;
|
||||||
|
WindowTitleMask : TMask;
|
||||||
|
|
||||||
function registerEventHandler(WND : HWND; Event : TEventType; Handler : void) : boolean;
|
function registerEventHandler(WND : HWND; Event : TEventType; Handler : void) : boolean;
|
||||||
begin
|
begin
|
||||||
@ -403,6 +406,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
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;
|
procedure drawMouse;
|
||||||
var
|
var
|
||||||
x, y : uint32;
|
x, y : uint32;
|
||||||
@ -496,6 +509,7 @@ begin
|
|||||||
STARTP:= MIDP - (StringSize(WindowManager.Windows[w]^.WND_NAME) div 2) - 1;
|
STARTP:= MIDP - (StringSize(WindowManager.Windows[w]^.WND_NAME) div 2) - 1;
|
||||||
for x:=WXL to WXR do begin
|
for x:=WXL to WXR do begin
|
||||||
Console_Matrix[WYL][x]:= Window_Border;
|
Console_Matrix[WYL][x]:= Window_Border;
|
||||||
|
WindowTitleMask[WYL][x]:= w;
|
||||||
if (x >= STARTP) and (STRC < StringSize(WindowManager.Windows[w]^.WND_NAME)) then begin
|
if (x >= STARTP) and (STRC < StringSize(WindowManager.Windows[w]^.WND_NAME)) then begin
|
||||||
Console_Matrix[WYL][x].character:= WindowManager.Windows[w]^.WND_NAME[STRC];
|
Console_Matrix[WYL][x].character:= WindowManager.Windows[w]^.WND_NAME[STRC];
|
||||||
inc(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
|
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;
|
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];
|
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;
|
end;
|
||||||
end;
|
end;
|
||||||
if WindowManager.Windows[w]^.Closed then _closeWindow(w);
|
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;
|
||||||
end;
|
end;
|
||||||
redrawMatrix;
|
redrawMatrix;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user