Skip to content

Commit

Permalink
Fix typos. (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Dec 6, 2023
1 parent 896abaf commit ff0fd5e
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/Systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ Sync points are moments during the frame where all commands are flushed to the s

Because Flecs can't see inside the implementation of a system, pipelines can't know for which components a system could insert commands. This means that by default a pipeline assumes that systems insert no commands / that it is OK for commands to be merged at the end of the frame. To get commands to merge sooner, systems must be annotated with the components they write.

A pipeline tracks on a per-component basis whether commands could have been inserted for it, and when a component is being read. When a pipeline sees a read for a component for which commmands could have been inserted, a sync point is inserted before the system that reads. This ensures that sync points are only inserted when necessary:
A pipeline tracks on a per-component basis whether commands could have been inserted for it, and when a component is being read. When a pipeline sees a read for a component for which commands could have been inserted, a sync point is inserted before the system that reads. This ensures that sync points are only inserted when necessary:

- Multiple systems that enqueue commands can run before a sync point, possibly combining commands for multiple reads
- When a system is inactive (e.g. it doesn't match any entities) or is disabled, it will be ignored for sync point insertion
Expand Down
8 changes: 4 additions & 4 deletions flecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ FLECS_DBG_API
void flecs_bitset_init(
ecs_bitset_t *bs);

/** Deinialize bitset. */
/** Deinitialize bitset. */
FLECS_DBG_API
void flecs_bitset_fini(
ecs_bitset_t *bs);
Expand Down Expand Up @@ -625,7 +625,7 @@ typedef struct ecs_table_event_t {
/* Event match */
ecs_entity_t event;

/* If the nubmer of fields gets out of hand, this can be turned into a union
/* If the number of fields gets out of hand, this can be turned into a union
* but since events are very temporary objects, this works for now and makes
* initializing an event a bit simpler. */
} ecs_table_event_t;
Expand Down Expand Up @@ -12062,7 +12062,7 @@ ecs_iter_t ecs_term_iter(
* they don't get overwritten by flecs_iter_validate.
*
* Note: the reason the term iterator doesn't use the iterator cache itself
* (which could easily accomodate a single term) is that the filter iterator
* (which could easily accommodate a single term) is that the filter iterator
* is built on top of the term iterator. The private cache of the term
* iterator keeps the filter iterator code simple, as it doesn't need to
* worry about the term iter overwriting the iterator fields. */
Expand Down Expand Up @@ -13901,7 +13901,7 @@ bool ecs_worker_next(

/**
* @file misc.c
* @brief Miscallaneous functions.
* @brief Miscellaneous functions.
*/

#include <time.h>
Expand Down
30 changes: 15 additions & 15 deletions flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ typedef struct ecs_os_api_t {
ecs_os_api_thread_new_t task_new_;
ecs_os_api_thread_join_t task_join_;

/* Atomic incremenet / decrement */
/* Atomic increment / decrement */
ecs_os_api_ainc_t ainc_;
ecs_os_api_ainc_t adec_;
ecs_os_api_lainc_t lainc_;
Expand Down Expand Up @@ -5137,7 +5137,7 @@ ecs_entity_t ecs_new_low_id(

/** Create new entity with (component) id.
* This operation creates a new entity with an optional (component) id. When 0
* is passed to the id paramter, no component is added to the new entity.
* is passed to the id parameter, no component is added to the new entity.
*
* @param world The world.
* @param id The component id to initialize the new entity with.
Expand Down Expand Up @@ -10663,7 +10663,7 @@ ecs_ftime_t ecs_get_timeout(
ecs_entity_t tick_source);

/** Set timer interval.
* This operation will continously invoke systems associated with the timer
* This operation will continuously invoke systems associated with the timer
* after the interval period expires. If the entity contains an existing timer,
* the interval value will be reset.
*
Expand Down Expand Up @@ -10732,7 +10732,7 @@ void ecs_reset_timer(
ecs_entity_t tick_source);

/** Enable randomizing initial time value of timers.
* Intializes timers with a random time value, which can improve scheduling as
* Initializes timers with a random time value, which can improve scheduling as
* systems/timers for the same interval don't all happen on the same tick.
*
* @param world The world.
Expand Down Expand Up @@ -11149,14 +11149,14 @@ typedef struct ecs_system_desc_t {
/** Rate at which the system should run */
int32_t rate;

/** External tick soutce that determines when system ticks */
/** External tick source that determines when system ticks */
ecs_entity_t tick_source;

/** If true, system will be ran on multiple threads */
bool multi_threaded;

/** If true, system will have access to actuall world. Cannot be true at the
* same time as multi_threaded. */
/** If true, system will have access to the actual world. Cannot be true at
* the same time as multi_threaded. */
bool no_readonly;
} ecs_system_desc_t;

Expand Down Expand Up @@ -12812,7 +12812,7 @@ typedef struct ecs_iter_to_json_desc_t {

/** Serialize iterator into JSON string.
* This operation will iterate the contents of the iterator and serialize them
* to JSON. The function acccepts iterators from any source.
* to JSON. The function accepts iterators from any source.
*
* @param world The world.
* @param iter The iterator to serialize to JSON.
Expand Down Expand Up @@ -14276,7 +14276,7 @@ extern "C" {
*
* @param out The string to write the character to.
* @param in The input character.
* @param delimiter The delimiiter used (for example '"')
* @param delimiter The delimiter used (for example '"')
* @return Pointer to the character after the last one written.
*/
FLECS_API
Expand All @@ -14302,7 +14302,7 @@ const char* ecs_chrparse(
* argument for 'out', and use the returned size to allocate a string that is
* large enough.
*
* @param out Pointer to output string (msut be).
* @param out Pointer to output string (must be).
* @param size Maximum number of characters written to output.
* @param delimiter The delimiter used (for example '"').
* @param in The input string.
Expand Down Expand Up @@ -14677,7 +14677,7 @@ int ecs_meta_from_desc(

/* Private API */

/* Utilities to switch beteen IMPL, DECLARE and EXTERN variants */
/* Utilities to switch between IMPL, DECLARE and EXTERN variants */
#define ECS_META_IMPL_CALL_INNER(base, impl, name, type_desc)\
base ## impl(name, type_desc)

Expand Down Expand Up @@ -14913,7 +14913,7 @@ void FlecsScriptImport(
* @brief Rule query engine addon.
*
* Rules are advanced queries that in addition to the capabilities of regular
* queries and filters have the folllowing features:
* queries and filters have the following features:
*
* - query for all components of an entity (vs. all entities for a component)
* - query for all relationship pairs of an entity
Expand Down Expand Up @@ -15047,7 +15047,7 @@ const char* ecs_rule_var_name(
* Internally the rule engine has entity variables and table variables. When
* iterating through rule variables (by using ecs_rule_variable_count) only
* the values for entity variables are accessible. This operation enables an
* appliction to check if a variable is an entity variable.
* application to check if a variable is an entity variable.
*
* @param rule The rule.
* @param var_id The variable id.
Expand Down Expand Up @@ -15104,7 +15104,7 @@ char* ecs_rule_str(

/** Convert rule to string with profile.
* To use this you must set the EcsIterProfile flag on an iterator before
* starting uteration:
* starting iteration:
* it.flags |= EcsIterProfile
*
* @param rule The rule.
Expand All @@ -15117,7 +15117,7 @@ char* ecs_rule_str_w_profile(

/** Populate variables from key-value string.
* Convenience function to set rule variables from a key-value string separated
* by comma's. The string must have the followig format:
* by comma's. The string must have the following format:
* var_a: value, var_b: value
*
* The key-value list may optionally be enclosed in parenthesis.
Expand Down
2 changes: 1 addition & 1 deletion include/flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,7 @@ ecs_entity_t ecs_new_low_id(

/** Create new entity with (component) id.
* This operation creates a new entity with an optional (component) id. When 0
* is passed to the id paramter, no component is added to the new entity.
* is passed to the id parameter, no component is added to the new entity.
*
* @param world The world.
* @param id The component id to initialize the new entity with.
Expand Down
4 changes: 2 additions & 2 deletions include/flecs/addons/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern "C" {
*
* @param out The string to write the character to.
* @param in The input character.
* @param delimiter The delimiiter used (for example '"')
* @param delimiter The delimiter used (for example '"')
* @return Pointer to the character after the last one written.
*/
FLECS_API
Expand All @@ -84,7 +84,7 @@ const char* ecs_chrparse(
* argument for 'out', and use the returned size to allocate a string that is
* large enough.
*
* @param out Pointer to output string (msut be).
* @param out Pointer to output string (must be).
* @param size Maximum number of characters written to output.
* @param delimiter The delimiter used (for example '"').
* @param in The input string.
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/addons/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ typedef struct ecs_iter_to_json_desc_t {

/** Serialize iterator into JSON string.
* This operation will iterate the contents of the iterator and serialize them
* to JSON. The function acccepts iterators from any source.
* to JSON. The function accepts iterators from any source.
*
* @param world The world.
* @param iter The iterator to serialize to JSON.
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/addons/meta_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int ecs_meta_from_desc(

/* Private API */

/* Utilities to switch beteen IMPL, DECLARE and EXTERN variants */
/* Utilities to switch between IMPL, DECLARE and EXTERN variants */
#define ECS_META_IMPL_CALL_INNER(base, impl, name, type_desc)\
base ## impl(name, type_desc)

Expand Down
8 changes: 4 additions & 4 deletions include/flecs/addons/rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @brief Rule query engine addon.
*
* Rules are advanced queries that in addition to the capabilities of regular
* queries and filters have the folllowing features:
* queries and filters have the following features:
*
* - query for all components of an entity (vs. all entities for a component)
* - query for all relationship pairs of an entity
Expand Down Expand Up @@ -137,7 +137,7 @@ const char* ecs_rule_var_name(
* Internally the rule engine has entity variables and table variables. When
* iterating through rule variables (by using ecs_rule_variable_count) only
* the values for entity variables are accessible. This operation enables an
* appliction to check if a variable is an entity variable.
* application to check if a variable is an entity variable.
*
* @param rule The rule.
* @param var_id The variable id.
Expand Down Expand Up @@ -194,7 +194,7 @@ char* ecs_rule_str(

/** Convert rule to string with profile.
* To use this you must set the EcsIterProfile flag on an iterator before
* starting uteration:
* starting iteration:
* it.flags |= EcsIterProfile
*
* @param rule The rule.
Expand All @@ -207,7 +207,7 @@ char* ecs_rule_str_w_profile(

/** Populate variables from key-value string.
* Convenience function to set rule variables from a key-value string separated
* by comma's. The string must have the followig format:
* by comma's. The string must have the following format:
* var_a: value, var_b: value
*
* The key-value list may optionally be enclosed in parenthesis.
Expand Down
4 changes: 2 additions & 2 deletions include/flecs/addons/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ typedef struct ecs_system_desc_t {
/** Rate at which the system should run */
int32_t rate;

/** External tick soutce that determines when system ticks */
/** External tick source that determines when system ticks */
ecs_entity_t tick_source;

/** If true, system will be ran on multiple threads */
bool multi_threaded;

/** If true, system will have access to actuall world. Cannot be true at the
/** If true, system will have access to the actual world. Cannot be true at the
* same time as multi_threaded. */
bool no_readonly;
} ecs_system_desc_t;
Expand Down
4 changes: 2 additions & 2 deletions include/flecs/addons/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ecs_ftime_t ecs_get_timeout(
ecs_entity_t tick_source);

/** Set timer interval.
* This operation will continously invoke systems associated with the timer
* This operation will continuously invoke systems associated with the timer
* after the interval period expires. If the entity contains an existing timer,
* the interval value will be reset.
*
Expand Down Expand Up @@ -168,7 +168,7 @@ void ecs_reset_timer(
ecs_entity_t tick_source);

/** Enable randomizing initial time value of timers.
* Intializes timers with a random time value, which can improve scheduling as
* Initializes timers with a random time value, which can improve scheduling as
* systems/timers for the same interval don't all happen on the same tick.
*
* @param world The world.
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/os_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ typedef struct ecs_os_api_t {
ecs_os_api_thread_new_t task_new_;
ecs_os_api_thread_join_t task_join_;

/* Atomic incremenet / decrement */
/* Atomic increment / decrement */
ecs_os_api_ainc_t ainc_;
ecs_os_api_ainc_t adec_;
ecs_os_api_lainc_t lainc_;
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/private/bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FLECS_DBG_API
void flecs_bitset_init(
ecs_bitset_t *bs);

/** Deinialize bitset. */
/** Deinitialize bitset. */
FLECS_DBG_API
void flecs_bitset_fini(
ecs_bitset_t *bs);
Expand Down
2 changes: 2 additions & 0 deletions include/flecs/private/vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef FLECS_VEC_H
#define FLECS_VEC_H

#include "flecs/private/api_defines.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ ecs_iter_t ecs_term_iter(
* they don't get overwritten by flecs_iter_validate.
*
* Note: the reason the term iterator doesn't use the iterator cache itself
* (which could easily accomodate a single term) is that the filter iterator
* (which could easily accommodate a single term) is that the filter iterator
* is built on top of the term iterator. The private cache of the term
* iterator keeps the filter iterator code simple, as it doesn't need to
* worry about the term iter overwriting the iterator fields. */
Expand Down
2 changes: 1 addition & 1 deletion src/misc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file misc.c
* @brief Miscallaneous functions.
* @brief Miscellaneous functions.
*/

#include "private_api.h"
Expand Down
2 changes: 1 addition & 1 deletion src/storage/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef struct ecs_table_event_t {
/* Event match */
ecs_entity_t event;

/* If the nubmer of fields gets out of hand, this can be turned into a union
/* If the number of fields gets out of hand, this can be turned into a union
* but since events are very temporary objects, this works for now and makes
* initializing an event a bit simpler. */
} ecs_table_event_t;
Expand Down

0 comments on commit ff0fd5e

Please sign in to comment.