Capitalize namespacing structs
This helps to avoid name clashes when breaking up modules into packages.
This commit is contained in:
1 parent
a423cdf1b1
commit
25ee1775f0
16 files changed
+86
-86
No files matched your search
+12
-12
@@ -6,7 +6,7 @@ module hulk.console;
|
||||
import hulk.fb;
|
||||
import hulk.kfont;
|
||||
|
||||
struct console
|
||||
struct Console
|
||||
{
|
||||
/** Console width in text columns. */
|
||||
private static __gshared size_t m_width;
|
||||
@@ -25,8 +25,8 @@ struct console
|
||||
*/
|
||||
public static void initialize()
|
||||
{
|
||||
m_width = fb.width / kfont.advance;
|
||||
m_height = fb.height / kfont.line_height;
|
||||
m_width = Fb.width / Kfont.advance;
|
||||
m_height = Fb.height / Kfont.line_height;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,7 +34,7 @@ struct console
|
||||
*/
|
||||
public static void clear()
|
||||
{
|
||||
fb.clear();
|
||||
Fb.clear();
|
||||
m_x = 0u;
|
||||
m_y = 0u;
|
||||
}
|
||||
@@ -64,10 +64,10 @@ struct console
|
||||
if (m_y == m_height)
|
||||
{
|
||||
m_y--;
|
||||
fb.copy_rows_up(fb_y(m_height - 1u),
|
||||
(m_height - 1u) * kfont.line_height,
|
||||
kfont.line_height);
|
||||
fb.rect(0u, fb_y(m_height - 1u), fb_x(m_width), kfont.line_height, 0u);
|
||||
Fb.copy_rows_up(fb_y(m_height - 1u),
|
||||
(m_height - 1u) * Kfont.line_height,
|
||||
Kfont.line_height);
|
||||
Fb.rect(0u, fb_y(m_height - 1u), fb_x(m_width), Kfont.line_height, 0u);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@ struct console
|
||||
*/
|
||||
private static void render_char(size_t x, size_t y, char ch)
|
||||
{
|
||||
const(CharInfo) * ci = &kfont.chars[ch];
|
||||
fb.blit_alpha_bitmap(fb_x(x) + ci.left, fb_y(y) + ci.top - ci.height, ci.bitmap, ci.width, ci.height);
|
||||
const(CharInfo) * ci = &Kfont.chars[ch];
|
||||
Fb.blit_alpha_bitmap(fb_x(x) + ci.left, fb_y(y) + ci.top - ci.height, ci.bitmap, ci.width, ci.height);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ struct console
|
||||
*/
|
||||
private static size_t fb_x(size_t x)
|
||||
{
|
||||
return x * kfont.advance;
|
||||
return x * Kfont.advance;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,6 +97,6 @@ struct console
|
||||
*/
|
||||
private static size_t fb_y(size_t y)
|
||||
{
|
||||
return fb.height - ((y + 1u) * kfont.line_height);
|
||||
return Fb.height - ((y + 1u) * Kfont.line_height);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user