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

This commit is contained in:
kieron
2018-04-14 22:46:34 +00:00
parent 2feff08097
commit b626d8c207
65 changed files with 193 additions and 65 deletions

View File

@ -15,7 +15,8 @@ uses
util,
bios_data_area,
multiboot,
fonts;
fonts,
tracer;
type
TColor = ( Black = $0,
@ -96,6 +97,8 @@ procedure _safeincrement_x();
procedure _newline();
procedure outputChar(c : char; x : uint8; y : uint8; fgcolor : uint16; bgcolor : uint16);
function getPixel(x : uint32; y : uint32) : uint16;
procedure drawPixel(x : uint32; y : uint32; color : uint16);
implementation
@ -131,6 +134,32 @@ var
Console_Cursor : TCoord;
Ready : Boolean = false;
function getPixel(x : uint32; y : uint32) : uint16;
var
dest : puint16;
begin
//push_trace('console.getPixel');
if not ready then exit;
dest:= puint16(multibootinfo^.framebuffer_addr);
dest:= dest + (y * 1280) + x;
getPixel:= dest^;
//pop_trace;
end;
procedure drawPixel(x : uint32; y : uint32; color : uint16);
var
dest : puint16;
begin
//push_trace('console.drawPixel');
if not ready then exit;
dest:= puint16(multibootinfo^.framebuffer_addr);
dest:= dest + (y * 1280) + x;
dest^:= color;
//pop_trace;
end;
procedure outputChar(c : char; x : uint8; y : uint8; fgcolor : uint16; bgcolor : uint16);
var
dest : puint16;