git-svn-id: https://spexeah.com:8443/svn/Asuro@646 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron
2018-05-01 20:14:38 +00:00
parent 581a374a71
commit 96025771fe
70 changed files with 101 additions and 4 deletions

View File

@ -193,6 +193,8 @@ procedure bordersEnabled(WND : HWND; enabled : boolean);
procedure SetShellWindow(WND : HWND; b : boolean);
function getWindowName(WND : HWND) : pchar;
procedure mouseEnabled(b : boolean);
procedure _MouseDown();
procedure _MouseUp();
procedure _MouseClick(left : boolean);
@ -311,7 +313,12 @@ var
MovingWindow : uint32;
UnhandledClick : Boolean = false;
UnhandledClickLeft : Boolean = false;
MouseCursorEnabled : Boolean = true;
procedure mouseEnabled(b : boolean);
begin
MouseCursorEnabled:= b;
end;
procedure _MouseDown();
begin
@ -674,7 +681,7 @@ begin
end;
end;
end;
outputCharToScreenSpace(char(0), WindowManager.MousePrev.x, WindowManager.MousePrev.y, $FFFF);
if MouseCursorEnabled then outputCharToScreenSpace(char(0), WindowManager.MousePrev.x, WindowManager.MousePrev.y, $FFFF);
end;
procedure setMousePosition(x : uint32; y : uint32);

View File

@ -3,11 +3,11 @@ unit asuro;
interface
const
VERSION = '1.0.0-642a';
VERSION = '1.0.0-645a';
VERSION_MAJOR = '1';
VERSION_MINOR = '0';
VERSION_SUB = '0';
REVISION = '642';
REVISION = '645';
RELEASE = 'a';
implementation

View File

@ -47,7 +47,8 @@ uses
RTC,
serial,
shell,
memview;
memview,
splash;
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
@ -216,6 +217,9 @@ begin
shell.init();
memview.init();
{ Init Splash }
splash.init();
//console.writehexln(uint32(multibootinfo^.framebuffer_addr));
//tracer.push_trace('kmain.KEYHOOK');
//keyboard.hook(@temphook);

86
src/prog/splash.pas Normal file
View File

@ -0,0 +1,86 @@
unit splash;
interface
uses
console, keyboard;
procedure init();
implementation
var
Splash_Handle : HWND;
Tick : uint32;
Colors : uint32;
Loops : uint32 = 0;
procedure quit();
begin
closeWindow(Splash_Handle);
mouseEnabled(true);
end;
procedure keypress(info : TKeyInfo);
begin
quit();
end;
procedure animate();
var
Delta : uint32;
begin
inc(Tick);
Delta:= Tick div 100;
Delta:= Delta mod 15;
ClearWNDEx(Splash_Handle, Colors);
if Delta > 1 then begin
setCursorPosWND(45, 27, Splash_Handle);
writestringExWND(' db ', Colors, Splash_Handle);
end;
if Delta > 2 then begin
setCursorPosWND(45, 28, Splash_Handle);
writestringExWND(' d88b ', Colors, Splash_Handle);
end;
if Delta > 3 then begin
setCursorPosWND(45, 29, Splash_Handle);
writestringExWND(' d8''`8b ', Colors, Splash_Handle);
end;
if Delta > 4 then begin
setCursorPosWND(45, 30, Splash_Handle);
writestringExWND(' d8'' `8b ,adPPYba, 88 88 8b,dPPYba, ,adPPYba,', Colors, Splash_Handle);
end;
if Delta > 5 then begin
setCursorPosWND(45, 31, Splash_Handle);
writestringExWND(' d8YaaaaY8b I8[ "" 88 88 88P'' "Y8 a8" "8a', Colors, Splash_Handle);
end;
if Delta > 6 then begin
setCursorPosWND(45, 32, Splash_Handle);
writestringExWND(' d8""""""""8b `"Y8ba, 88 88 88 8b d8', Colors, Splash_Handle);
end;
if Delta > 7 then begin
setCursorPosWND(45, 33, Splash_Handle);
writestringExWND(' d8'' `8b aa ]8I "8a, ,a88 88 "8a, ,a8"', Colors, Splash_Handle);
end;
if Delta > 8 then begin
setCursorPosWND(45, 34, Splash_Handle);
writestringExWND('d8'' `8b `"YbbdP"'' `"YbbdP''Y8 88 `"YbbdP"''', Colors, Splash_Handle);
end;
if Tick > 2100 then begin
quit();
end;
end;
procedure init();
begin
Colors:= combineColors($FFFF, $5CDE);
Splash_Handle:= newWindow(0, 0, 159, 63, 'SPLASH');
SetShellWindow(Splash_Handle, false);
BordersEnabled(Splash_Handle, false);
registerEventHandler(Splash_Handle, EVENT_DRAW, void(@animate));
registerEventHandler(Splash_Handle, EVENT_KEY_PRESSED, void(@keypress));
mouseEnabled(false);
end;
end.