mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
fix typos
This commit is contained in:
parent
20a6d9411d
commit
634fadcf33
|
@ -63,7 +63,7 @@ namespace Blah
|
|||
AppEventFn on_render = nullptr;
|
||||
|
||||
// Callback when the user has requested the application close.
|
||||
// For example, pressing the Close button, ALT+F4, etc
|
||||
// For example, pressing the Close button, ALT+F4, etc.
|
||||
// By default this calls `App::exit()`
|
||||
AppEventFn on_exit_request = nullptr;
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
namespace Blah
|
||||
{
|
||||
|
||||
// A 2D sprite batcher, used for drawing shapes and textures
|
||||
class Batch
|
||||
{
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace Blah
|
|||
return Vec4f(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
|
||||
}
|
||||
|
||||
// Convers the Color to a u32
|
||||
// Converts the Color to a u32
|
||||
constexpr u32 to_rgba() const
|
||||
{
|
||||
return
|
||||
|
@ -145,7 +145,7 @@ namespace Blah
|
|||
(u32)a;
|
||||
}
|
||||
|
||||
// Convers the Color to a u32
|
||||
// Converts the Color to a u32
|
||||
constexpr u32 to_rgb() const
|
||||
{
|
||||
return
|
||||
|
@ -154,7 +154,7 @@ namespace Blah
|
|||
(u32)b;
|
||||
}
|
||||
|
||||
// Returns a RGBA Color representation of the integer value
|
||||
// Returns an RGBA Color representation of the integer value
|
||||
static constexpr Color from_rgba(u32 value)
|
||||
{
|
||||
return
|
||||
|
@ -166,7 +166,7 @@ namespace Blah
|
|||
};
|
||||
}
|
||||
|
||||
// Returns a RGB Color representation of the integer value, with Alpha = 255
|
||||
// Returns an RGB Color representation of the integer value, with Alpha = 255
|
||||
static constexpr Color from_rgb(u32 value)
|
||||
{
|
||||
return
|
||||
|
@ -191,7 +191,7 @@ namespace Blah
|
|||
);
|
||||
}
|
||||
|
||||
// Mutliplties the Color
|
||||
// Multiples the Color
|
||||
constexpr Color operator*(float multiply) const
|
||||
{
|
||||
return Color(
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace Blah
|
|||
LessOrEqual,
|
||||
Greater,
|
||||
NotEqual,
|
||||
GreatorOrEqual
|
||||
GreaterOrEqual
|
||||
};
|
||||
|
||||
// Cull mode during a draw call
|
||||
|
@ -210,7 +210,7 @@ namespace Blah
|
|||
enum class TextureFormat
|
||||
{
|
||||
None, // Invalid Format
|
||||
R, // Single 8-bit channe;
|
||||
R, // Single 8-bit channel
|
||||
RG, // 2 8-bit channels
|
||||
RGBA, // 4 8-bit channels
|
||||
DepthStencil, // Depth 24, Stencil 8
|
||||
|
@ -317,10 +317,10 @@ namespace Blah
|
|||
// Supported Vertex Index formats
|
||||
enum class IndexFormat
|
||||
{
|
||||
// Indices are 16 bit unsigned integers
|
||||
// Indices are 16-bit unsigned integers
|
||||
UInt16,
|
||||
|
||||
// Indices are 32 bit unsigned integers
|
||||
// Indices are 32-bit unsigned integers
|
||||
UInt32
|
||||
};
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Blah
|
|||
int padding;
|
||||
|
||||
// generated textures. There can be more than one if the packer was
|
||||
// unable to fit all of the provided subtextures into the max_size.
|
||||
// unable to fit all the provided subtextures into the max_size.
|
||||
Vector<Image> pages;
|
||||
|
||||
Packer();
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user