Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libopenage/coord/coord_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct TestCoordsRelative : CoordXYRelative<int, TestCoordsAbsolute, TestCoordsR
* test method for the base CoordXY* classes.
*/
void coord() {
// test comparision
// test comparison
TESTEQUALS(TestCoordsAbsolute(3, 4) == TestCoordsAbsolute(3, 4), true);
TESTEQUALS(TestCoordsAbsolute(3, 4) != TestCoordsAbsolute(3, 4), false);
TESTEQUALS(TestCoordsAbsolute(3, 4) == TestCoordsAbsolute(3, 5), false);
Expand Down
2 changes: 1 addition & 1 deletion libopenage/input/input_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class InputManager {
std::vector<std::shared_ptr<InputContext>> active_contexts;

/**
* Map of all available contexts, referencable by an ID.
* Map of all available contexts, referenceable by an ID.
*
* TODO: Move this to cvar manager?
*/
Expand Down
2 changes: 1 addition & 1 deletion libopenage/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class OptionNode {
/**
* A interaface variable which gets monitored by an
* option node allowing reflection, while also
* being directly accessable as a typed member
* being directly accessible as a typed member
*/
template <class T>
class Var : public util::Variable<T> {
Expand Down
2 changes: 1 addition & 1 deletion libopenage/pathfinding/demo/demo_0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ renderer::resources::MeshData RenderManager0::get_flow_field_mesh(const std::sha
auto int_flags = int_field->get_cell(i / resolution, (j - 1) / resolution).flags;
int_surround.push_back(int_flags);
}
// combine the flags of the sorrounding tiles
// combine the flags of the surrounding tiles
auto ff_max_flags = 0;
for (auto &val : ff_surround) {
ff_max_flags |= val & 0xF0;
Expand Down
4 changes: 2 additions & 2 deletions libopenage/pathfinding/grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Grid {
const nodemap_t &get_portal_map();

/**
* Initialize the portal nodes of the grid with neigbouring nodes and distance costs.
* Initialize the portal nodes of the grid with neighbouring nodes and distance costs.
*/
void init_portal_nodes();

Expand All @@ -128,7 +128,7 @@ class Grid {
std::vector<std::shared_ptr<Sector>> sectors;

/**
* maps portal_ids to portal nodes, which store their neigbouring nodes and associated distance costs
* maps portal_ids to portal nodes, which store their neighbouring nodes and associated distance costs
* for pathfinding
*/

Expand Down
2 changes: 1 addition & 1 deletion libopenage/pathfinding/integration_field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ std::vector<size_t> IntegrationField::integrate_los(const std::shared_ptr<CostFi
// Do a preliminary LOS integration wave for targets that have cost > min cost
// This avoids the bresenham's line algorithm calculations
// (which wouldn't return accurate results for blocker == target)
// and makes sure that sorrounding cells that are min cost are considered
// and makes sure that surrounding cells that are min cost are considered
// in line-of-sight.

this->cells[target_idx].flags |= INTEGRATE_FOUND_MASK;
Expand Down
2 changes: 1 addition & 1 deletion libopenage/pathfinding/integration_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class IntegrationField {

private:
/**
* Update a neigbor cell during the cost integration process.
* Update a neighbor cell during the cost integration process.
*
* @param idx Index of the neighbor cell that is updated.
* @param cell_cost Cost of the neighbor cell from the cost field.
Expand Down
2 changes: 1 addition & 1 deletion libopenage/pathfinding/pathfinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class PortalNode : public std::enable_shared_from_this<PortalNode> {


/**
* maps node_t of a neigbhour portal to the distance cost to travel between the portals
* maps node_t of a neighbour portal to the distance cost to travel between the portals
*/
using exits_t = std::map<const node_t, int>;

Expand Down
4 changes: 2 additions & 2 deletions libopenage/pathfinding/portal.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ class Portal {
/**
* Exits in sector 0 reachable from the portal.
*
* TODO: Also store avarage cost to reach each exit.
* TODO: Also store average cost to reach each exit.
*/
std::vector<std::shared_ptr<Portal>> sector0_exits;

/**
* Exits in sector 1 reachable from the portal.
*
* TODO: Also store avarage cost to reach each exit.
* TODO: Also store average cost to reach each exit.
*/
std::vector<std::shared_ptr<Portal>> sector1_exits;

Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/camera/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Eigen::Vector3f Camera::calc_look_at(Eigen::Vector3f target) {
// get x and z offsets
// the camera is pointed diagonally to the negative x and z axis
// a is the length of the diagonal from camera.xz to scene_pos.xz
// so the x and z offest are sides of a square with the same diagonal
// so the x and z offset are sides of a square with the same diagonal
auto side_length = xz_distance / std::numbers::sqrt2;
return Eigen::Vector3f(
target[0] + side_length,
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/demo/demo_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ void RenderManagerDemo6::load_shaders() {
frame_fshader_file.read());
frame_fshader_file.close();

/* Shader for frustrum frame */
/* Shader for frustum frame */
auto frustum_vshader_file = (shaderdir / "demo_6_2d_frustum_frame.vert.glsl").open();
auto frustum_vshader_src = resources::ShaderSource(
resources::shader_lang_t::glsl,
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/font/font_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ std::string FontManager::get_font_filename(const char *family, const char *style
FcResult font_match_result;
FcPattern *font_match = FcFontMatch(nullptr, font_pattern, &font_match_result);

// get attibute FC_FILE (= filename) of best-matched font
// get attribute FC_FILE (= filename) of best-matched font
FcChar8 *font_filename_tmp;
if (FcPatternGetString(font_match, FC_FILE, 0, &font_filename_tmp) != FcResultMatch) {
throw Error(ERR << "Fontconfig could not provide font " << family << " " << style);
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/gui/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class GUI {
*
* @param width Width of the GUI.
* @param height Height of the GUI.
* @param shaderdir Directory containg the shader source files.
* @param shaderdir Directory containing the shader source files.
*/
void initialize_render_pass(size_t width,
size_t height,
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void GlContext::check_error() {
}();

throw Error(
MSG(err) << "An OpenGL error has occured.\n\t"
MSG(err) << "An OpenGL error has occurred.\n\t"
<< "(" << error_state << "): " << msg);
}
}
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class GlContext {
* Store the currently active shader program for this context.
*
* Note that this method does not load the shader in OpenGL. It is merely
* a conveniance function so that the renderer can check which program
* a convenience function so that the renderer can check which program
* is currently used.
*
* @param prog Currently active shader program.
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/framebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GlFramebuffer final : public GlSimpleObject {
*
* @param context OpenGL context used for drawing.
* @param textures Textures targeted by the framebuffer. They are automatically
* attached to the correct attachement points depending on their type.
* attached to the correct attachment points depending on their type.
*/
GlFramebuffer(const std::shared_ptr<GlContext> &context,
std::vector<std::shared_ptr<GlTexture2d>> const &textures);
Expand Down
4 changes: 2 additions & 2 deletions libopenage/renderer/opengl/render_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum class gl_render_target_t {

/**
* Represents an OpenGL target that can be drawn into.
* It can be either a framebuffer with texture attachements or the display (the window).
* It can be either a framebuffer with texture attachments or the display (the window).
*/
class GlRenderTarget final : public RenderTarget {
public:
Expand All @@ -52,7 +52,7 @@ class GlRenderTarget final : public RenderTarget {
* e.g. a depth texture will be set as the depth target.
*
* @param context OpenGL context used for drawing.
* @param textures Texture attachements.
* @param textures Texture attachments.
*/
GlRenderTarget(const std::shared_ptr<GlContext> &context,
std::vector<std::shared_ptr<GlTexture2d>> const &textures);
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ GlShader::GlShader(const std::shared_ptr<GlContext> &context,
// compile shader source
glCompileShader(handle);

// check compiliation result
// check compilation result
GLint status;
glGetShaderiv(handle, GL_COMPILE_STATUS, &status);

Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/shader_program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void GlShaderProgram::update_uniforms(std::shared_ptr<GlUniformInput> const &uni
// TODO: maybe call this at a more appropriate position
glUniform1i(loc, tex_unit_id);
ENSURE(tex_unit_id < this->textures_per_texunits.size(),
"Tried to assign texture to non-existant texture unit at index "
"Tried to assign texture to non-existent texture unit at index "
<< tex_unit_id
<< " (max: " << this->textures_per_texunits.size() << ").");
this->textures_per_texunits[tex_unit_id] = tex;
Expand Down
4 changes: 2 additions & 2 deletions libopenage/renderer/resources/animation/angle_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AngleInfo {
/**
* Create a 2D Angle Info.
*
* @param angle_start Rotation in degress at which the frames are displayed.
* @param angle_start Rotation in degrees at which the frames are displayed.
* @param frames Frame information.
* @param mirror_from Mirror frames from another angle instead of using uniquely
* defined frames.
Expand Down Expand Up @@ -88,7 +88,7 @@ class AngleInfo {

private:
/**
* Starting rotation in degress at which the frames are displayed.
* Starting rotation in degrees at which the frames are displayed.
*/
float angle_start;

Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/hud/render_stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class HudRenderStage {
*
* @param width Width of the FBO.
* @param height Height of the FBO.
* @param shaderdir Directory containg the shader source files.
* @param shaderdir Directory containing the shader source files.
*/
void initialize_render_pass(size_t width,
size_t height,
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/screen/render_stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ScreenRenderStage {
*
* Called during initialization of the screen renderer.
*
* @param shaderdir Directory containg the shader source files.
* @param shaderdir Directory containing the shader source files.
*/
void initialize_render_pass(const util::Path &shaderdir);

Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/screen/screenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ std::string ScreenshotManager::gen_next_filename() {


void ScreenshotManager::save_screenshot() {
// get screenshot image from scren renderer
// get screenshot image from screen renderer
auto pass = this->renderer->get_render_pass();
auto target = pass->get_target();
auto image = target->into_data();
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/skybox/render_stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class SkyboxRenderStage {
*
* @param width Width of the FBO.
* @param height Height of the FBO.
* @param shaderdir Directory containg the shader source files.
* @param shaderdir Directory containing the shader source files.
*/
void initialize_render_pass(size_t width,
size_t height,
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/terrain/render_entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void RenderEntity::update_tile(const util::Vector2s size,
throw Error(MSG(err) << "Cannot update tile: Vertices have not been initialized yet.");
}

// find the postion of the tile in the vertex array
// find the position of the tile in the vertex array
auto left_corner = pos.ne * size[0] + pos.se;

// update the 4 vertices of the tile
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/terrain/render_stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class TerrainRenderStage {
*
* @param width Width of the FBO.
* @param height Height of the FBO.
* @param shaderdir Directory containg the shader source files.
* @param shaderdir Directory containing the shader source files.
*/
void initialize_render_pass(size_t width,
size_t height,
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/stages/world/render_stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class WorldRenderStage {
*
* @param width Width of the FBO.
* @param height Height of the FBO.
* @param shaderdir Directory containg the shader source files.
* @param shaderdir Directory containing the shader source files.
*/
void initialize_render_pass(size_t width, size_t height, const util::Path &shaderdir);

Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Window {

/**
* Force this window to the given size. It's generally not a good idea to use this,
* as it makes the window jump around wierdly.
* as it makes the window jump around weirdly.
*
* @param width Width in pixels.
* @param height Height in pixels.
Expand Down
4 changes: 2 additions & 2 deletions libopenage/util/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace util {
std::string demangle(const char *symbol) {
#ifdef _WIN32
// MSVC's typeid(T).name() already returns a demangled name
// unlike clang and gcc the MSVC demangled name is prefixed with "class " or "stuct "
// unlike clang and gcc the MSVC demangled name is prefixed with "class " or "struct "
// we remove the prefix to match the format of clang and gcc
return strchr(symbol, ' ') + 1;
#else
Expand Down Expand Up @@ -65,7 +65,7 @@ std::optional<std::string> symbol_name_win(const void *addr) {
std::lock_guard<std::mutex> sym_lock_guard{sym_mutex};

// Initialize symbol handler for process, if it has not yet been initialized
// If we are not succesful on the first try, leave it, since MSDN says that searching for symbol files is very time consuming
// If we are not successful on the first try, leave it, since MSDN says that searching for symbol files is very time consuming
if (!initialized_symbol_handler) {
initialized_symbol_handler = true;

Expand Down
2 changes: 1 addition & 1 deletion libopenage/util/compress/bitstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class BitStream {
}

/**
* Aligns the bitstream - that is, _if_ we're currenlty in bitstream mode.
* Aligns the bitstream - that is, _if_ we're currently in bitstream mode.
*
* Otherwise, a no-op.
*/
Expand Down
4 changes: 2 additions & 2 deletions libopenage/util/compress/lzxd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class LZXDStream {
// IO buffering
BitStream<4096> bits;

// huffman code lenghts
// huffman code lengths
HuffmanTable<LZX_PRETREE_MAXSYMBOLS, LZX_PRETREE_TABLEBITS> htpre;
HuffmanTable<LZX_MAINTREE_MAXSYMBOLS, LZX_MAINTREE_TABLEBITS> htmain;
HuffmanTable<LZX_LENGTH_MAXSYMBOLS, LZX_LENGTH_TABLEBITS, true> htlength;
Expand Down Expand Up @@ -879,7 +879,7 @@ void LZXDStream::postprocess_intel_e8(unsigned char *buf, int frame_size) {
return;
}

// search the block for occurances of '0xe8'
// search the block for occurrences of '0xe8'
// the last 10 bytes of the frame are not e8-handled, because reasons.
for (int pos = 0; pos < frame_size - 10; pos++) {
bool is_e8 = (buf[pos] == 0xe8);
Expand Down
2 changes: 1 addition & 1 deletion libopenage/util/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ssize_t File::size() {


std::vector<std::string> File::get_lines() {
// TODO: relay the get_lines to the underlaying filelike
// TODO: relay the get_lines to the underlying filelike
// which may do a better job in getting the lines.
// instead, we read everything and then split up into lines.
std::vector<std::string> result = util::split_newline(this->read());
Expand Down
2 changes: 1 addition & 1 deletion libopenage/util/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Path;

/**
* Generic File implementation, used in our filesystem-like and file-like
* abtraction system. Can be created from Python :)
* abstraction system. Can be created from Python :)
*
* TODO: maybe inherit from std::iostream so we can use it the c++-way
*
Expand Down
2 changes: 1 addition & 1 deletion libopenage/util/strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool string_matches_pattern(const char *str, const char *pattern) {
}

if (*pattern == '\0') {
// comparision done
// comparison done
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion libopenage/util/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Variable : public VariableBase {
}

/**
* accessable typed value
* accessible typed value
*/
T value;
};
Expand Down
2 changes: 1 addition & 1 deletion libopenage/util/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class Vector : public std::array<T, N> {
}

/**
* Euclidian norm aka length
* Euclidean norm aka length
*/
T norm() const {
return std::sqrt(this->dot(*this));
Expand Down
Loading