[Mammoth] Move most classes to the mmth namespace.

This commit is contained in:
Drew Galbraith 2023-11-22 14:59:41 -08:00
parent 5f8d577948
commit 8d730c67c1
42 changed files with 130 additions and 60 deletions

View file

@ -3,8 +3,8 @@
Framebuffer::Framebuffer(const FramebufferInfo& info)
: fb_info_(info), cursor_pos_(0) {
uint64_t buff_size_bytes = fb_info_.height() * fb_info_.pitch();
fb_memory_ = OwnedMemoryRegion::DirectPhysical(fb_info_.address_phys(),
buff_size_bytes);
fb_memory_ = mmth::OwnedMemoryRegion::DirectPhysical(fb_info_.address_phys(),
buff_size_bytes);
fb_ = reinterpret_cast<uint32_t*>(fb_memory_.vaddr());
}

View file

@ -19,7 +19,7 @@ class Framebuffer {
// don't have to store a reference here.
const FramebufferInfo& fb_info_;
OwnedMemoryRegion fb_memory_;
mmth::OwnedMemoryRegion fb_memory_;
uint32_t* fb_;
uint32_t cursor_pos_;
};

View file

@ -9,7 +9,7 @@ const uint32_t kMagic = 0x864AB572;
}
Psf::Psf(OwnedMemoryRegion&& psf_file)
Psf::Psf(mmth::OwnedMemoryRegion&& psf_file)
: psf_file_(glcr::Move(psf_file)),
header_(reinterpret_cast<PsfHeader*>(psf_file_.vaddr())) {
EnsureValid();

View file

@ -15,7 +15,7 @@ struct PsfHeader {
class Psf {
public:
Psf(OwnedMemoryRegion&& psf_file);
Psf(mmth::OwnedMemoryRegion&& psf_file);
void DumpHeader();
@ -29,7 +29,7 @@ class Psf {
}
private:
OwnedMemoryRegion psf_file_;
mmth::OwnedMemoryRegion psf_file_;
PsfHeader* header_;
void EnsureValid();