mirror of
https://github.com/NoelFB/blah.git
synced 2025-07-18 19:41:52 +08:00
fix typos
This commit is contained in:
@ -14,7 +14,7 @@ using namespace Blah;
|
||||
|
||||
#define BLAH_ASSERT_RUNNING() BLAH_ASSERT(app_is_running, "The App is not running (call App::run)")
|
||||
|
||||
// Interal Platform Pointer
|
||||
// Internal Platform Pointer
|
||||
Platform* App::Internal::platform = nullptr;
|
||||
|
||||
// Internal Renderer Pointer
|
||||
|
@ -53,12 +53,12 @@ void Aseprite::parse(Stream& stream)
|
||||
stream.read_u16(Endian::Little); // Speed (deprecated)
|
||||
stream.read_u32(Endian::Little); // Should be 0
|
||||
stream.read_u32(Endian::Little); // Should be 0
|
||||
stream.read_u8(Endian::Little); // Palette entry
|
||||
stream.seek(stream.position() + 3); // Ignore these bytes
|
||||
stream.read_u8(Endian::Little); // Palette entry
|
||||
stream.seek(stream.position() + 3); // Ignore these bytes
|
||||
stream.read_u16(Endian::Little); // Number of colors (0 means 256 for old sprites)
|
||||
stream.read_i8(Endian::Little); // Pixel width
|
||||
stream.read_i8(Endian::Little); // Pixel height
|
||||
stream.seek(stream.position() + 92); // For Future
|
||||
stream.read_i8(Endian::Little); // Pixel width
|
||||
stream.read_i8(Endian::Little); // Pixel height
|
||||
stream.seek(stream.position() + 92); // For Future
|
||||
}
|
||||
|
||||
frames.resize(frame_count);
|
||||
|
@ -160,7 +160,7 @@ bool Font::get_image(const Font::Character& ch, Color* pixels) const
|
||||
if (ch.has_glyph)
|
||||
{
|
||||
// we actually use the image buffer as our temporary buffer, and fill the pixels out backwards after
|
||||
// kinda weird but it works & saves creating more memory
|
||||
// kinda weird, but it works & saves creating more memory
|
||||
auto* src = (unsigned char*)pixels;
|
||||
stbtt_MakeGlyphBitmap((stbtt_fontinfo*)m_font.get(), src, ch.width, ch.height, ch.width, ch.scale, ch.scale, ch.glyph);
|
||||
|
||||
|
@ -230,7 +230,6 @@ MeshRef Mesh::create()
|
||||
return MeshRef();
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
int blah_calc_uniform_size(const UniformInfo& uniform)
|
||||
|
@ -256,7 +256,7 @@ bool Image::save_jpg(Stream& stream, int quality) const
|
||||
|
||||
void Image::get_pixels(Color* dest, const Point& dest_pos, const Point& dest_size, Recti source_rect) const
|
||||
{
|
||||
// can't be outside of the source image
|
||||
// can't be outside the source image
|
||||
if (source_rect.x < 0) source_rect.x = 0;
|
||||
if (source_rect.y < 0) source_rect.y = 0;
|
||||
if (source_rect.x + source_rect.w > width) source_rect.w = width - source_rect.x;
|
||||
|
@ -423,7 +423,6 @@ StickBindingRef Input::register_binding(const StickBinding& binding_data)
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
ButtonBinding::TriggerBind::TriggerBind(Axis axis)
|
||||
: axis(axis)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ namespace Blah
|
||||
// Gets the Desktop Content Scale. Gui should be scaled by this value
|
||||
virtual float get_content_scale() = 0;
|
||||
|
||||
// Returns the absoluate path to the directory that the application was started from
|
||||
// Returns the absolute path to the directory that the application was started from
|
||||
virtual const char* app_path() = 0;
|
||||
|
||||
// Returns the absolute path to the user directory where save data and settings should be stored
|
||||
|
@ -439,7 +439,7 @@ void SDL2_Platform::present()
|
||||
SDL_GL_SwapWindow(window);
|
||||
|
||||
// display the window
|
||||
// this avoids a short black screen on macoS
|
||||
// this avoids a short black screen on macOS
|
||||
if (!displayed)
|
||||
{
|
||||
SDL_ShowWindow(window);
|
||||
|
@ -36,7 +36,7 @@ namespace Blah
|
||||
virtual void set_app_flags(u32 flags) { }
|
||||
|
||||
// Optional implementation to get the drawable backbuffer size in pixels.
|
||||
// Not all implementations will use this so it can be up to the Platform.
|
||||
// Not all implementations will use this, so it can be up to the Platform.
|
||||
virtual bool get_draw_size(int* w, int* h) { return false; }
|
||||
|
||||
// Performs a draw call
|
||||
|
@ -785,7 +785,7 @@ namespace Blah
|
||||
flags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||
#endif
|
||||
|
||||
// Create D3D device & context & swap cahin
|
||||
// Create D3D device & context & swap chain
|
||||
D3D_FEATURE_LEVEL feature_level;
|
||||
HRESULT hr = D3D11CreateDeviceAndSwapChain(
|
||||
NULL,
|
||||
@ -1625,7 +1625,7 @@ namespace Blah
|
||||
case Compare::LessOrEqual: desc.DepthFunc = D3D11_COMPARISON_LESS_EQUAL; break;
|
||||
case Compare::Greater: desc.DepthFunc = D3D11_COMPARISON_GREATER; break;
|
||||
case Compare::NotEqual: desc.DepthFunc = D3D11_COMPARISON_NOT_EQUAL; break;
|
||||
case Compare::GreatorOrEqual: desc.DepthFunc = D3D11_COMPARISON_GREATER_EQUAL; break;
|
||||
case Compare::GreaterOrEqual: desc.DepthFunc = D3D11_COMPARISON_GREATER_EQUAL; break;
|
||||
}
|
||||
|
||||
ID3D11DepthStencilState* result;
|
||||
|
@ -1448,7 +1448,7 @@ namespace Blah
|
||||
case Compare::Greater:
|
||||
renderer->gl.DepthFunc(GL_GREATER);
|
||||
break;
|
||||
case Compare::GreatorOrEqual:
|
||||
case Compare::GreaterOrEqual:
|
||||
renderer->gl.DepthFunc(GL_GEQUAL);
|
||||
break;
|
||||
case Compare::Less:
|
||||
|
Reference in New Issue
Block a user