diff --git a/scripts/gen_keys.py b/scripts/gen_keys.py index 3325f27c3c..f1c2cfd855 100644 --- a/scripts/gen_keys.py +++ b/scripts/gen_keys.py @@ -1,6 +1,6 @@ import sys, os -# genereate keys.h file +# generate keys.h file f = file("src/engine/keys.h", "w") keynames = [] diff --git a/src/base/hash_libtomcrypt.c b/src/base/hash_libtomcrypt.c index 7482bcd182..50bf770d40 100755 --- a/src/base/hash_libtomcrypt.c +++ b/src/base/hash_libtomcrypt.c @@ -169,7 +169,7 @@ static void sha_done(sha256_state* md, void* out) md->curlen = 0; } - // Pad upto 56 bytes of zeroes + // Pad up to 56 bytes of zeroes while(md->curlen < 56) md->buf[md->curlen++] = 0; diff --git a/src/base/system.h b/src/base/system.h index 65ce02456f..8743de4b51 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -225,7 +225,7 @@ IOHANDLE io_open(const char *filename, int flags); Parameters: io - Handle to the file to read data from. - buffer - Pointer to the buffer that will recive the data. + buffer - Pointer to the buffer that will receive the data. size - Number of bytes to read from the file. Returns: @@ -528,7 +528,7 @@ int64 time_freq(); /* Function: time_timestamp - Retrives the current time as a UNIX timestamp + Retrieves the current time as a UNIX timestamp Returns: The time as a UNIX timestamp @@ -600,7 +600,7 @@ typedef struct void net_invalidate_socket(NETSOCKET *socket); /* Function: net_init - Initiates network functionallity. + Initiates network functionality. Returns: Returns 0 on success, @@ -699,13 +699,13 @@ int net_udp_send(NETSOCKET sock, const NETADDR *addr, const void *data, int size /* Function: net_udp_recv - Recives a packet over an UDP socket. + Receives a packet over an UDP socket. Parameters: sock - Socket to use. - addr - Pointer to an NETADDR that will recive the address. - data - Pointer to a buffer that will recive the data. - maxsize - Maximum size to recive. + addr - Pointer to an NETADDR that will receive the address. + data - Pointer to a buffer that will receive the data. + maxsize - Maximum size to receive. Returns: On success it returns the number of bytes recived. Returns -1 @@ -886,18 +886,18 @@ int str_length(const char *str); /* Function: str_format - Performs printf formating into a buffer. + Performs printf formatting into a buffer. Parameters: - buffer - Pointer to the buffer to recive the formated string. + buffer - Pointer to the buffer to receive the formatted string. buffer_size - Size of the buffer. - format - printf formating string. - ... - Parameters for the formating. + format - printf formatting string. + ... - Parameters for the formatting. Remarks: - - See the C manual for syntax for the printf formating string. - - The strings are treated as zero-terminated strings. - - Garantees that dst string will contain zero-termination. + - See the C manual for syntax for the printf formatting string. + - The strings are treated as zero-termineted strings. + - Guarantees that dst string will contain zero-termination. */ void str_format(char *buffer, int buffer_size, const char *format, ...) GNUC_ATTRIBUTE((format(printf, 3, 4))); @@ -1244,7 +1244,7 @@ const char *str_find(const char *haystack, const char *needle); data - Size of the data Remarks: - - The desination buffer will be zero-terminated + - The destination buffer will be zero-terminated */ void str_hex(char *dst, int dst_size, const void *data, int data_size); diff --git a/src/base/tl/array.h b/src/base/tl/array.h index 230e521009..2040be22dd 100644 --- a/src/base/tl/array.h +++ b/src/base/tl/array.h @@ -268,7 +268,7 @@ class array : private ALLOCATOR /* Function: optimize - Removes unnessasary data, returns how many bytes was earned. + Removes unnecessary data, returns how many bytes was earned. Remarks: - Invalidates ranges diff --git a/src/engine/client.h b/src/engine/client.h index cd9f684e3a..7ca6201142 100644 --- a/src/engine/client.h +++ b/src/engine/client.h @@ -46,7 +46,7 @@ class IClient : public IInterface STATE_LOADING - The client has connected to a server and is loading resources. STATE_ONLINE - The client is connected to a server and running the game. STATE_DEMOPLAYBACK - The client is playing a demo - STATE_QUITING - The client is quiting. + STATE_QUITING - The client is quitting. */ enum diff --git a/src/engine/client/backend_sdl.h b/src/engine/client/backend_sdl.h index 1f3647b874..6e64123c1d 100644 --- a/src/engine/client/backend_sdl.h +++ b/src/engine/client/backend_sdl.h @@ -42,7 +42,7 @@ class CGraphicsBackend_Threaded : public IGraphicsBackend { public: - // constructed on the main thread, the rest of the functions is runned on the render thread + // constructed on the main thread, the rest of the functions is run on the render thread class ICommandProcessor { public: diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp index 39b1bb68fc..f5c126c7b4 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp @@ -312,7 +312,7 @@ void CSound::RateConvert(int SampleID) for(int i = 0; i < NumFrames; i++) { - // resample TODO: this should be done better, like linear atleast + // resample TODO: this should be done better, like linear at least float a = i/(float)NumFrames; int f = (int)(a*pSample->m_NumFrames); if(f >= pSample->m_NumFrames) diff --git a/src/engine/docs/prediction.txt b/src/engine/docs/prediction.txt index e740b1e8fd..637c559693 100644 --- a/src/engine/docs/prediction.txt +++ b/src/engine/docs/prediction.txt @@ -2,7 +2,7 @@ Title: Prediction The engine calls when reprediction is required. This happens usally when new data has arrived from the server. should to prediction from the current snapshot and current snapshot tick ( + 1) upto and including the tick returned by . -Predicted input sent to the server can be retrived by calling with the corresponding tick that you want the input for. Here is a simple example of how it might look. +Predicted input sent to the server can be retrieved by calling with the corresponding tick that you want the input for. Here is a simple example of how it might look. > void modc_predict() > { diff --git a/src/engine/docs/snapshots.txt b/src/engine/docs/snapshots.txt index 46ee3105ca..35dd585206 100644 --- a/src/engine/docs/snapshots.txt +++ b/src/engine/docs/snapshots.txt @@ -4,7 +4,7 @@ Section: Overview Topic: Definitions -- *Snapshot*. A is a serialized game state from which a client can render the game from. They are sent from the server at a regular interval and is created specificly for each client in order to reduce bandwidth. +- *Snapshot*. A is a serialized game state from which a client can render the game from. They are sent from the server at a regular interval and is created specifically for each client in order to reduce bandwidth. - *Delta Snapshot*. A set of data that can be applied to a snapshot in order to create a new snapshot with the updated game state. Topic: Structure diff --git a/src/engine/external/important.txt b/src/engine/external/important.txt index 305ccadcc6..41b9c6a11a 100644 --- a/src/engine/external/important.txt +++ b/src/engine/external/important.txt @@ -1,5 +1,5 @@ The source code under this directory are external libraries with their own licences. The source you find here is stripped -of unnessesary information. Please visit their websites for +of unnecessary information. Please visit their websites for more information and official releases. diff --git a/src/engine/kernel.h b/src/engine/kernel.h index b5961bc372..de3696db78 100644 --- a/src/engine/kernel.h +++ b/src/engine/kernel.h @@ -44,7 +44,7 @@ class IKernel static IKernel *Create(); virtual ~IKernel() {} - // templated access to handle pointer convertions and interface names + // templated access to handle pointer conversions and interface names template bool RegisterInterface(TINTERFACE *pInterface) { diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index da886374e9..869114272a 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -124,7 +124,7 @@ void CSnapIDPool::FreeID(int ID) { if(ID < 0) return; - dbg_assert(m_aIDs[ID].m_State == 1, "id is not alloced"); + dbg_assert(m_aIDs[ID].m_State == 1, "id is not allocated"); m_InUsage--; m_aIDs[ID].m_State = 2; @@ -551,7 +551,7 @@ void CServer::DoSnapshot() // create snapshots for all clients for(int i = 0; i < MAX_CLIENTS; i++) { - // client must be ingame to recive snapshots + // client must be ingame to receive snapshots if(m_aClients[i].m_State != CClient::STATE_INGAME) continue; @@ -591,7 +591,7 @@ void CServer::DoSnapshot() // save it the snapshot m_aClients[i].m_Snapshots.Add(m_CurrentGameTick, time_get(), SnapshotSize, pData, 0); - // find snapshot that we can preform delta against + // find snapshot that we can perform delta against EmptySnap.Clear(); { diff --git a/src/engine/server/server.h b/src/engine/server/server.h index 6bdb468d1a..7e8d341518 100644 --- a/src/engine/server/server.h +++ b/src/engine/server/server.h @@ -17,7 +17,7 @@ class CSnapIDPool { public: short m_Next; - short m_State; // 0 = free, 1 = alloced, 2 = timed + short m_State; // 0 = free, 1 = allocated, 2 = timed int m_Timeout; }; diff --git a/src/engine/shared/netban.cpp b/src/engine/shared/netban.cpp index 6b27616d5d..7a5d5f5a3a 100644 --- a/src/engine/shared/netban.cpp +++ b/src/engine/shared/netban.cpp @@ -460,7 +460,7 @@ bool CNetBan::IsBanned(const NETADDR *pAddr, char *pBuf, unsigned BufferSize, in CNetHash aHash[17]; int Length = CNetHash::MakeHashArray(pAddr, aHash); - // check ban adresses + // check ban addresses CBanAddr *pBan = m_BanAddrPool.Find(pAddr, &aHash[Length]); if(pBan) { diff --git a/src/engine/shared/network_conn.cpp b/src/engine/shared/network_conn.cpp index f7f8dfec64..8e3bfd1d0c 100644 --- a/src/engine/shared/network_conn.cpp +++ b/src/engine/shared/network_conn.cpp @@ -398,7 +398,7 @@ int CNetConnection::Update() } else { - // resend packet if we havn't got it acked in 1 second + // resend packet if we haven't got it acked in 1 second if(Now-pResend->m_LastSendTime > time_freq()) ResendChunk(pResend); } diff --git a/src/engine/shared/protocol.h b/src/engine/shared/protocol.h index 145474bd8e..bfdec29e35 100644 --- a/src/engine/shared/protocol.h +++ b/src/engine/shared/protocol.h @@ -6,7 +6,7 @@ #include /* - Connection diagram - How the initilization works. + Connection diagram - How the initialization works. Client -> INFO -> Server Contains version info, name, and some other info. @@ -20,7 +20,7 @@ modc_connected is called on the client and mods_connected is called on the server. The client should call client_entergame when the - mod has done it's initilization. + mod has done it's initialization. Client -> ENTERGAME -> Server Tells the server to start sending snapshots. diff --git a/src/engine/shared/ringbuffer.cpp b/src/engine/shared/ringbuffer.cpp index b9f55d73ac..a164a83e5b 100644 --- a/src/engine/shared/ringbuffer.cpp +++ b/src/engine/shared/ringbuffer.cpp @@ -145,7 +145,7 @@ int CRingBufferBase::PopFirst() m_pConsume = NextBlock(m_pConsume); } - // in the case that we have catched up with the produce pointer + // in the case that we have caught up with the produce pointer // we might stand on a free block so merge em MergeBack(m_pConsume); return 1; diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index 77a2d1617b..bc250bc5b4 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -607,7 +607,7 @@ void CChat::AddLine(const char *pLine, int ClientID, int Mode, int TargetID) while(*p) { pLine = p; - // find line seperator and strip multiline + // find line separator and strip multiline while(*p) { if(*p++ == '\n') diff --git a/src/game/client/components/items.cpp b/src/game/client/components/items.cpp index 1bf67eb236..e6560f5eb7 100644 --- a/src/game/client/components/items.cpp +++ b/src/game/client/components/items.cpp @@ -41,7 +41,7 @@ void CItems::RenderProjectile(const CNetObj_Projectile *pCurrent, int ItemID) s_LastGameTickTime = Client()->GameTickTime(); float Ct = (Client()->PrevGameTick()-pCurrent->m_StartTick)/(float)SERVER_TICK_SPEED + s_LastGameTickTime; if(Ct < 0) - return; // projectile havn't been shot yet + return; // projectile haven't been shot yet vec2 StartPos(pCurrent->m_X, pCurrent->m_Y); vec2 StartVel(pCurrent->m_VelX/100.0f, pCurrent->m_VelY/100.0f); diff --git a/src/game/client/components/sounds.cpp b/src/game/client/components/sounds.cpp index 0acb9c56a9..bdbcc89f8c 100644 --- a/src/game/client/components/sounds.cpp +++ b/src/game/client/components/sounds.cpp @@ -113,7 +113,7 @@ void CSounds::OnRender() return; } - // set listner pos + // set listener pos vec2 Pos = *m_pClient->m_pCamera->GetCenter(); Sound()->SetListenerPos(Pos.x, Pos.y); diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 5e203c274d..24f36460e6 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -88,7 +88,7 @@ void FormatTimeDiff(char *pBuf, int Size, int Time, int Precision, bool ForceSig AppendDecimals(pBuf, Size, Time, Precision); } -// instanciate all systems +// instantiate all systems static CInfoMessages gs_InfoMessages; static CCamera gs_Camera; static CChat gs_Chat; diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 9becd3e2a4..0054ce6363 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -920,7 +920,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // tile info button TB_Top.VSplitLeft(40.0f, &Button, &TB_Top); static int s_TileInfoButton = 0; - if(DoButton_Editor(&s_TileInfoButton, "Info", m_ShowTileInfo, &Button, 0, "[ctrl+i] Show tile informations") || + if(DoButton_Editor(&s_TileInfoButton, "Info", m_ShowTileInfo, &Button, 0, "[ctrl+i] Show tile information") || (Input()->KeyPress(KEY_I) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))) { m_ShowTileInfo = !m_ShowTileInfo;