BAN: Add math to its own namespace
This commit is contained in:
@@ -113,7 +113,6 @@ _start:
|
||||
orl $0x80000000, %ecx
|
||||
movl %ecx, %cr0
|
||||
|
||||
xchgw %bx, %bx
|
||||
# call global constuctors
|
||||
call _init
|
||||
|
||||
@@ -121,6 +120,7 @@ _start:
|
||||
call kernel_main
|
||||
|
||||
system_halt:
|
||||
xchgw %bx, %bx
|
||||
cli
|
||||
1: hlt
|
||||
jmp 1b
|
||||
|
||||
@@ -282,8 +282,8 @@ namespace Kernel
|
||||
{
|
||||
m_mouse_pos.exists = true;
|
||||
m_tty->RenderFromBuffer(m_mouse_pos.x, m_mouse_pos.y);
|
||||
m_mouse_pos.x = clamp<int32_t>(m_mouse_pos.x + event.dx, 0, m_tty->Width() - 1);
|
||||
m_mouse_pos.y = clamp<int32_t>(m_mouse_pos.y - event.dy, 0, m_tty->Height() - 1);
|
||||
m_mouse_pos.x = Math::clamp<int32_t>(m_mouse_pos.x + event.dx, 0, m_tty->Width() - 1);
|
||||
m_mouse_pos.y = Math::clamp<int32_t>(m_mouse_pos.y - event.dy, 0, m_tty->Height() - 1);
|
||||
VESA::PutBitmapAt(s_pointer, m_mouse_pos.x, m_mouse_pos.y, VESA::Color::BRIGHT_WHITE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user