Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Mar 27, 2014
1 parent 6310bfd commit d1da980
Show file tree
Hide file tree
Showing 30 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ native Linux builds and cross-compile to emscripten and PNaCl.
First you need to setup vagrant:

1. get VirtualBox for your host operating system (https://www.virtualbox.org/wiki/Downloads)
2. get Vargrant for your host OS (http://www.vagrantup.com/downloads.html)
2. get Vagrant for your host OS (http://www.vagrantup.com/downloads.html)
3. install the vagrant-vbguest plugin: ```vagrant plugin install vagrant-vbguest```

Now you're ready to setup the VM with **vagrant up**
Expand Down
6 changes: 3 additions & 3 deletions IDEAS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Design Basics ###

- OK: nested namespaces: oryol::[module_name]
- OK: explicitely NOT a framework for asset tools, only a game runtime (even only a 3d runtime in the beginning)
- OK: explicitly NOT a framework for asset tools, only a game runtime (even only a 3d runtime in the beginning)
- OK: use the C++11 stdc++ lib, but not boost (update: except for containers, write custom containers instead)
- OK: all basic types are defined in the oryol namespace (oryol::int32, oryol::float32, ...)
- OK: ~~define our own ptr<> type, or use shared_ptr<> (update: use our own smart pointer and refcounted base class)
Expand All @@ -10,11 +10,11 @@
- OK: modules can depend on other modules, dependencies are defined both for compile time (in cmake files) and at runtime
(modules attach other modules) update: not sure about the automatic runtime resolution of dependencies yet...
- TODO: optionally supports platforms without threading (emscripten)
- NO: ~~custom RTTI system, but without static initialisers~~ we'll just the the standard C++ rtti system, but sparingly, update: the standard RTTI system is almost useless (only useful for dynamic_cast, which is only useful when working around design errors... not sure yet whether I want to have the overhead of a custom RTTI system again...)
- NO: ~~custom RTTI system, but without static initialisers~~ we'll just use the standard C++ rtti system, but sparingly, update: the standard RTTI system is almost useless (only useful for dynamic_cast, which is only useful when working around design errors... not sure yet whether I want to have the overhead of a custom RTTI system again...)
- UNDECIDED: usually one header file per module

### Memory Management ###

- OK: use object pools and placement new/delete for all Oryol::Core::RefCounted derived classes
- PROBABLY NOT ~~separate classes into thread-local (must be created / destroyed in same thread) and global (can be destroyed inother thread then creation)...?~~ not sure if this is worth the trouble... UPDATE: the custom poolAllocator is lockless and fast enough, so allocating an object in one thread and freeing it in another is not an issue
- PROBABLY NOT ~~separate classes into thread-local (must be created / destroyed in same thread) and global (can be destroyed in other thread then creation)...?~~ not sure if this is worth the trouble... UPDATE: the custom poolAllocator is lockless and fast enough, so allocating an object in one thread and freeing it in another is not an issue

2 changes: 1 addition & 1 deletion code/Modules/Core/Containers/Map.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ template<class KEY, class VALUE> class Map {
void InsertBulk(KeyValuePair<KEY, VALUE>&& kvp);
/// insert element in bulk-mode (destroys sorting order)
void InsertBulk(const KEY& key, const VALUE& value);
/// end bulk-mode (sorting happend here)
/// end bulk-mode (sorting happens here)
void EndBulk();
/// find the first duplicate element, or InvalidIndex if not found, this is O(N)!
int32 FindDuplicate(int32 startIndex) const;
Expand Down
4 changes: 2 additions & 2 deletions code/Modules/Core/Macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Oryol::Core::poolAllocator<TYPE> TYPE::allocator;
#define OryolTemplClassPoolAllocImpl(TEMPLATE_TYPE, CLASS_TYPE) \
template<class TEMPLATE_TYPE> Oryol::Core::poolAllocator<CLASS_TYPE<TEMPLATE_TYPE>> CLASS_TYPE<TEMPLATE_TYPE>::allocator;

/// declare an oryol class without pool allocator (located inside class declaration)
/// declare an Oryol class without pool allocator (located inside class declaration)
#define OryolClassDecl(TYPE) \
protected:\
virtual void destroy() {\
Expand Down Expand Up @@ -98,7 +98,7 @@ public:\
};\
private:

/// implementation-side macrot for thread-local singletons (located in .cc source file)
/// implementation-side macro for thread-local singletons (located in .cc source file)
#define OryolLocalSingletonImpl(TYPE) ORYOL_THREAD_LOCAL TYPE* TYPE::singleton = 0;

/// to-string / from-string helper macros
Expand Down
6 changes: 3 additions & 3 deletions code/Modules/Core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Core/Types.h defines the following basic datatypes in the Oryol namespace:
* **intptr, uintptr**: an integer with as many bits as a pointer (32 or 64 bits)
* **uchar**: an unsigned 8-bit character

Use the standard wchar_t for wide-characters, but be aware that this is 2 bytes on Windows, and 4 bytes everwhere else.
Use the standard wchar_t for wide-characters, but be aware that this is 2 bytes on Windows, and 4 bytes everywhere else.

The following constants are defined (all resolve to -1):

Expand All @@ -35,7 +35,7 @@ Log::Info("Hello World!");
// warning-level output
Log::Warn("Earth will be destroyed in %d seconds...\n", secsToDestruction);
// error-level output
Log::Error("Something terrible has happend...\n");
Log::Error("Something terrible has happened...\n");
// debug-level output
Log::Dbg("Some spammy debug-only message\n");

Expand All @@ -47,7 +47,7 @@ The Log class is supposed to be thread-safe.
### Asserts
Instead of the basic C-style assert(), use Oryols **o_assert()** and **o_assert2()** macros. Both provide
Instead of the basic C-style assert(), use Oryol's **o_assert()** and **o_assert2()** macros. Both provide
additional information, like the pretty-printed function signature of the enclosing function, which is
very useful when the assert is inside templated code. **o_assert2()** takes an additional human-readable
string which is output to the console when the assert triggers. In the future, o_assert() will very likely
Expand Down
16 changes: 8 additions & 8 deletions code/Modules/Core/String/StringBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ StringBuilder::findFirstOf(const char* str, int32 strLen, int32 startIndex, int3

//------------------------------------------------------------------------------
/**
Find index of first occurance of any chacters in delim in an external string, between startIndex
Find index of first occurrence of any characters in delim in an external string, between startIndex
(including) and endIndex (excluding). If endIndex is EndOfString, search until end of string.
Returns InvalidIndex if not found.
*/
Expand All @@ -410,7 +410,7 @@ StringBuilder::FindFirstOf(const char* str, int32 startIndex, int32 endIndex, co

//------------------------------------------------------------------------------
/**
Find index of first occurance of any chacters in delim, between startIndex
Find index of first occurrence of any characters in delim, between startIndex
(including) and endIndex (excluding). If endIndex is 0, search until end of string.
Returns InvalidIndex if not found.
*/
Expand Down Expand Up @@ -443,8 +443,8 @@ StringBuilder::findFirstNotOf(const char* str, int32 strLen, int32 startIndex, i

//------------------------------------------------------------------------------
/**
Find index of first occurange of any characters NOT in delim, between startIndex
(including) and endIndex (exluding). If endIndex is EndOfString, search until end of string.
Find index of first occurrence of any characters NOT in delim, between startIndex
(including) and endIndex (excluding). If endIndex is EndOfString, search until end of string.
Returns InvalidIndex if not found.
*/
int32
Expand All @@ -458,8 +458,8 @@ StringBuilder::FindFirstNotOf(const char* str, int32 startIndex, int32 endIndex,

//------------------------------------------------------------------------------
/**
Find index of first occurange of any characters NOT in delim, between startIndex
(including) and endIndex (exluding). If endIndex is EndOfString, search until end of string.
Find index of first occurrence of any characters NOT in delim, between startIndex
(including) and endIndex (excluding). If endIndex is EndOfString, search until end of string.
Returns InvalidIndex if not found.
*/
int32
Expand Down Expand Up @@ -497,7 +497,7 @@ StringBuilder::findSubString(const char* str, int32 startIndex, int32 endIndex,

//------------------------------------------------------------------------------
/**
Find first occurance of subStr between startIndex (including) and endIndex
Find first occurrence of subStr between startIndex (including) and endIndex
(excluding). If endIndex is 0, search until end of string.
Returns InvalidIndex if not found.
*/
Expand All @@ -510,7 +510,7 @@ StringBuilder::FindSubString(const char* str, int32 startIndex, int32 endIndex,

//------------------------------------------------------------------------------
/**
Find first occurance of subStr between startIndex (including) and endIndex
Find first occurrence of subStr between startIndex (including) and endIndex
(excluding). If endIndex is 0, search until end of string.
Returns InvalidIndex if not found.
*/
Expand Down
8 changes: 4 additions & 4 deletions code/Modules/Core/String/StringBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ class StringBuilder {
/// substitute a range of characters with a string, endIndex can be EndOfString
void SubstituteRange(int32 startIndex, int32 endIndex, const char* subst);

/// find byte-index of first occurence of delim chars, return EndOfString if not found
/// find byte-index of first occurrence of delim chars, return EndOfString if not found
int32 FindFirstOf(int32 startIndex, int32 endIndex, const char* delims) const;
/// find byte-index of first occurence of delim chars, return EndOfString if not found
/// find byte-index of first occurrence of delim chars, return EndOfString if not found
static int32 FindFirstOf(const char* str, int32 startIndex, int32 endIndex, const char* delims);
/// find byte-index of first occurence not in delim chars, return EndOfString if not found
/// find byte-index of first occurrence not in delim chars, return EndOfString if not found
int32 FindFirstNotOf(int32 startIndex, int32 endIndex, const char* delims) const;
/// find byte-index of first occurence not in delim chars, return EndOfString if not found
/// find byte-index of first occurrence not in delim chars, return EndOfString if not found
static int32 FindFirstNotOf(const char* str, int32 startIndex, int32 endIndex, const char* delims);
/// find substring index, endIndex can be EndOfString, return EndOfString if not found
int32 FindSubString(int32 startIndex, int32 endIndex, const char* subString) const;
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Core/Threading/RWLock.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RWLock::UnlockWrite() {
inline void
RWLock::LockRead() {
#if ORYOL_HAS_THREADS
/// spin until noone's writing anymore
/// spin until no one is writing anymore
while (this->writeLock) {
// spinning...
}
Expand Down
4 changes: 2 additions & 2 deletions code/Modules/HTTP/osx/osxURLLoader.mm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
// extract HTTP status...
response->SetStatus((IOStatus::Code) [urlResponse statusCode]);

// exract response header fields...
// extract response header fields...
NSDictionary* headerFields = [urlResponse allHeaderFields];
Map<String,String> fields;
for (id key in headerFields) {
Expand Down Expand Up @@ -112,7 +112,7 @@
req->SetResponse(response);
}
else {
// an error occured
// an error occurred
Ptr<HTTPProtocol::HTTPResponse> response = HTTPProtocol::HTTPResponse::Create();
if (nil != urlResponse) {
response->SetStatus((IOStatus::Code) [urlResponse statusCode]);
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/HTTP/windows/winURLLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ winURLLoader::doOneRequest(const Ptr<HTTPProtocol::HTTPRequest>& req) {
// ...and finally set the responseBodyStream on the httpResponse
httpResponse->SetBody(responseBodyStream);

// @todo: write error desc to httpResponse if something went wront
// @todo: write error desc to httpResponse if something went wrong
}
else {
Log::Warn("winURLLoader: WinHttpReceiveResponse() failed for '%s'!\n", req->GetURL().AsCStr());
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/IO/ContentType.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@see Stream
ContentType describes the data type contained in a Stream. Some
filesystem implementation can make use of this (for instance the
filesystem implementations can make use of this (for instance the
HTTPFileSystem will use this in the Content-Type request/response
header fields).
*/
Expand Down
6 changes: 3 additions & 3 deletions code/Modules/IO/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Stream : public Core::RefCounted {

/// set the write cursor position (byte offset from start)
void SetWritePosition(int32 pos);
/// move write cursor position relativ to current write position
/// move write cursor position relative to current write position
void MoveWritePosition(int32 diff);
/// get the write cursor position (byte offset from start)
int32 GetWritePosition() const;
Expand All @@ -68,15 +68,15 @@ class Stream : public Core::RefCounted {

/// set the read cursor position (byte offset from start)
void SetReadPosition(int32 pos);
/// move read cursor position relativ to current read position
/// move read cursor position relative to current read position
void MoveReadPosition(int32 diff);
/// get the read cursor position (byte offset from start)
int32 GetReadPosition() const;
/// read a number of bytes from the stream (returns bytes read)
virtual int32 Read(void* ptr, int32 numBytes);
/// map a memory area at the current read-position, DOES NOT ADVANCE READ-POS!
virtual const uint8* MapRead(const uint8** outMaxValidPtr);
/// unmap previosuly mapped memory area
/// unmap previously mapped memory area
virtual void UnmapRead();
/// return true if currently locked for reading
bool IsReadMapped() const;
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Messaging/AsyncQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AsyncQueue : public Port {
virtual void DoWork();
/// put a message into the port
virtual bool Put(const Core::Ptr<Message>& msg) override;
/// explicitely forward queued messages
/// explicitly forward queued messages
void ForwardMessages();

protected:
Expand Down
4 changes: 2 additions & 2 deletions code/Modules/Messaging/Dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
@brief call message handler functions on incoming messages
A Dispatcher is a Port where message handler functions for a specific
message protocol can subcribe to. One specific Dispatcher object
message protocol can subscribe to. One specific Dispatcher object
can only handle messages from one specific protocol. The Protocol must
be given as a template argument.
When a Message arrives in the Put method, the subscribed handler function
is looked up in a jump table and called. If no handler function exists
for the message, nothing will happen.
The message handler function is excpected to "handle" the message, which
The message handler function is expected to "handle" the message, which
means to set the Handled flag of the message at some point in time.
Setting the Handled flag doesn't have to happen within the handler function,
it can also happen at some later time.
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Messaging/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Messaging {

class Protocol {
public:
/// get the protocol if
/// get the protocol id
static ProtocolIdType GetProtocolId() {
return 'BASE';
};
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Messaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Message classes have the following attributes:
- a numeric message id (auto-generated), message ids are only unique within their protocol
- a protocol id (this is a FourCC uint32)
- a current state (Initial, Pending, Handled)
- a set of member variables with their respecitive setter/getter methods
- a set of member variables with their respective setter/getter methods

Messages are generally created through pool-allocators. When a message is created, a pointer is popped from
a lock-free forward-linked list, and placement-new is called on the memory block (so, no expensive "dynamic
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Messaging/ThreadedQueue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ThreadedQueue::~ThreadedQueue() {
/**
If a tick-duration is set, the thread will wakeup after this duration
even when no messages are pending. This is useful to do some work
which dosn't depend on incoming messages. A tick duration of 0 is the
which doesn't depend on incoming messages. A tick duration of 0 is the
default and means that the thread will NOT tick (e.g. only wake up
when messages arrive)
*/
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/Core/resourceMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class resourceMgr {
template<class SETUP> Resource::Id CreateResource(const SETUP& setup);
/// create a resource with data stream, or return existing resource
template<class SETUP> Resource::Id CreateResource(const SETUP& setup, const Core::Ptr<IO::Stream>& data);
/// lookup a resource by resource locator (incremenets use-count of resource!)
/// lookup a resource by resource locator (increments use-count of resource!)
Resource::Id LookupResource(const Resource::Locator& locator);
/// discard a resource (decrement use-count, free resource if use-count is 0)
void DiscardResource(const Resource::Id& resId);
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/Core/stateWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
/**
@class Oryol::Render::StateWrapper
@brief platform-agnostic wrapper for render state managment
@brief platform-agnostic wrapper for render state management
@todo describe StateWrapper
*/
#if ORYOL_OPENGL
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/RenderFacade.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class RenderFacade {
template<class SETUP> Resource::Id CreateResource(const SETUP& setup);
/// create a resource with data stream, or return existing resource
template<class SETUP> Resource::Id CreateResource(const SETUP& setup, const Core::Ptr<IO::Stream>& data);
/// lookup a resource by resource locator (incremenets use-count of resource!)
/// lookup a resource by resource locator (increments use-count of resource!)
Resource::Id LookupResource(const Resource::Locator& locator);
/// discard a resource (decrement use-count, free resource if use-count is 0)
void DiscardResource(const Resource::Id& resId);
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/Setup/RenderSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class RenderSetup : public DisplayAttrs {
RenderSetup();
/// tweak resource pool size for a rendering resource type
void SetPoolSize(ResourceType::Code type, int32 poolSize);
/// get resource pool size for a rendering resoruce type
/// get resource pool size for a rendering resource type
int32 GetPoolSize(ResourceType::Code type) const;
/// tweak resource throttling value for a resource type, 0 means unthrottled
void SetThrottling(ResourceType::Code type, int32 maxCreatePerFrame);
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/Types/StandardUniform.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
bound the rendering system will update the uniform values when needed.
The most important StandardUniform is the ModelViewProj matrix, but
there are also a couple of other useful matrices, and a continouous
there are also a couple of other useful matrices, and a continuous
Timer for implementing simple animations in shaders.
@see Program, ProgramSetup
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/Types/VertexAttr.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
/**
@class Oryol::Render::VertexAttr
@brief vertex attribut enum (position, texcoord, ...)
@brief vertex attribute enum (position, texcoord, ...)
The VertexAttr definitions don't have a hardwired meaning, they just
exist to make the binding of vertex components (living in vertex buffers)
Expand Down
2 changes: 1 addition & 1 deletion code/Modules/Render/Util/MeshBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
the CPU. It is mainly build for convenience, less for performance,
so it should mainly be used to setup static, immutable geometry. For
dynamic geometry which needs to change every frame lower level approaches
shouls be used (such as VertexWriter). To create pre-defined shapes
should be used (such as VertexWriter). To create pre-defined shapes
such as cube, sphere or donuts, consider using the higher level
ShapeBuilder class which is built on top of MeshBuilder.
Expand Down
Loading

0 comments on commit d1da980

Please sign in to comment.