mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Small grammar update
This commit is contained in:
parent
4661ea766a
commit
7722ca5e66
|
|
@ -33,7 +33,7 @@ typedef struct
|
||||||
unsigned char ucSoundFXVolume;
|
unsigned char ucSoundFXVolume;
|
||||||
unsigned char ucSensitivity;
|
unsigned char ucSensitivity;
|
||||||
unsigned char ucGamma;
|
unsigned char ucGamma;
|
||||||
unsigned char ucPad01; // 1 uint8_t of padding inserted here
|
unsigned char ucPad01; // 1 byte of padding inserted here
|
||||||
unsigned short usBitmaskValues; // bit 0,1 - difficulty
|
unsigned short usBitmaskValues; // bit 0,1 - difficulty
|
||||||
// bit 2 - view bob
|
// bit 2 - view bob
|
||||||
// bit 3 - player visible in a map
|
// bit 3 - player visible in a map
|
||||||
|
|
@ -65,7 +65,7 @@ typedef struct
|
||||||
// In-Menu sensitivity
|
// In-Menu sensitivity
|
||||||
unsigned char ucMenuSensitivity;
|
unsigned char ucMenuSensitivity;
|
||||||
unsigned char ucInterfaceOpacity;
|
unsigned char ucInterfaceOpacity;
|
||||||
unsigned char ucPad02; // 1 uint8_t padding
|
unsigned char ucPad02; // 1 byte padding
|
||||||
unsigned char ucFov;
|
unsigned char ucFov;
|
||||||
|
|
||||||
// Adding another bitmask flag for more settings for 1.8.2
|
// Adding another bitmask flag for more settings for 1.8.2
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ any other library. Note that ABI compatibility is not guaranteed between version
|
||||||
fix releases, so take care if compiling as a shared object.
|
fix releases, so take care if compiling as a shared object.
|
||||||
|
|
||||||
miniaudio includes both low level and high level APIs. The low level API is good for those who want
|
miniaudio includes both low level and high level APIs. The low level API is good for those who want
|
||||||
to do all of their mixing themselves and only require a light weight interface to the underlying
|
to do all of their mixing themselves and only require a light weight interface to the underlying1 uint8_t
|
||||||
audio device. The high level API is good for those who have complex mixing and effect requirements.
|
audio device. The high level API is good for those who have complex mixing and effect requirements.
|
||||||
|
|
||||||
In miniaudio, objects are transparent structures. Unlike many other libraries, there are no handles
|
In miniaudio, objects are transparent structures. Unlike many other libraries, there are no handles
|
||||||
|
|
@ -3592,9 +3592,9 @@ move the read pointer forward via the consumer thread, and the write pointer for
|
||||||
producer thread. If there is too much space between the pointers, move the read pointer forward. If
|
producer thread. If there is too much space between the pointers, move the read pointer forward. If
|
||||||
there is too little space between the pointers, move the write pointer forward.
|
there is too little space between the pointers, move the write pointer forward.
|
||||||
|
|
||||||
You can use a ring buffer at the uint8_t level instead of the PCM frame level by using the `ma_rb`
|
You can use a ring buffer at the byte level instead of the PCM frame level by using the `ma_rb`
|
||||||
API. This is exactly the same, only you will use the `ma_rb` functions instead of `ma_pcm_rb` and
|
API. This is exactly the same, only you will use the `ma_rb` functions instead of `ma_pcm_rb` and
|
||||||
instead of frame counts you will pass around uint8_t counts.
|
instead of frame counts you will pass around byte counts.
|
||||||
|
|
||||||
The maximum size of the buffer in bytes is `0x7FFFFFFF-(MA_SIMD_ALIGNMENT-1)` due to the most
|
The maximum size of the buffer in bytes is `0x7FFFFFFF-(MA_SIMD_ALIGNMENT-1)` due to the most
|
||||||
significant bit being used to encode a loop flag and the internally managed buffers always being
|
significant bit being used to encode a loop flag and the internally managed buffers always being
|
||||||
|
|
@ -63155,7 +63155,7 @@ static ma_result ma_decoder_init_custom__internal(const ma_decoder_config* pConf
|
||||||
if (result == MA_SUCCESS) {
|
if (result == MA_SUCCESS) {
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
/* Initialization failed. Move on to the next one, but seek back to the start first so the next vtable starts from the first uint8_t of the file. */
|
/* Initialization failed. Move on to the next one, but seek back to the start first so the next vtable starts from the first byte of the file. */
|
||||||
result = ma_decoder_seek_bytes(pDecoder, 0, ma_seek_origin_start);
|
result = ma_decoder_seek_bytes(pDecoder, 0, ma_seek_origin_start);
|
||||||
if (result != MA_SUCCESS) {
|
if (result != MA_SUCCESS) {
|
||||||
return result; /* Failed to seek back to the start. */
|
return result; /* Failed to seek back to the start. */
|
||||||
|
|
|
||||||
|
|
@ -5518,7 +5518,7 @@ int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, in
|
||||||
0.996 - bugfix: fast-huffman decode initialized incorrectly for sparse codebooks; fixing gives 10% speedup - found by Terje Mathisen
|
0.996 - bugfix: fast-huffman decode initialized incorrectly for sparse codebooks; fixing gives 10% speedup - found by Terje Mathisen
|
||||||
0.995 - bugfix: fix to 'effective' overrun detection - found by Terje Mathisen
|
0.995 - bugfix: fix to 'effective' overrun detection - found by Terje Mathisen
|
||||||
0.994 - bugfix: garbage decode on final VQ symbol of a non-multiple - found by Terje Mathisen
|
0.994 - bugfix: garbage decode on final VQ symbol of a non-multiple - found by Terje Mathisen
|
||||||
0.993 - bugfix: pushdata API required 1 extra uint8_t for empty page (failed to consume final page if empty) - found by Terje Mathisen
|
0.993 - bugfix: pushdata API required 1 extra byte for empty page (failed to consume final page if empty) - found by Terje Mathisen
|
||||||
0.992 - fixes for MinGW warning
|
0.992 - fixes for MinGW warning
|
||||||
0.991 - turn fast-float-conversion on by default
|
0.991 - turn fast-float-conversion on by default
|
||||||
0.990 - fix push-mode seek recovery if you seek into the headers
|
0.990 - fix push-mode seek recovery if you seek into the headers
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ typedef struct _GameSessionData
|
||||||
char szPlayers[MINECRAFT_NET_MAX_PLAYERS][XUSER_NAME_SIZE]; // 128 bytes ( 8*16)
|
char szPlayers[MINECRAFT_NET_MAX_PLAYERS][XUSER_NAME_SIZE]; // 128 bytes ( 8*16)
|
||||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
unsigned int m_uiGameHostSettings; // 4 bytes
|
||||||
unsigned int texturePackParentId; // 4 bytes
|
unsigned int texturePackParentId; // 4 bytes
|
||||||
unsigned char subTexturePackId; // 1 uint8_t
|
unsigned char subTexturePackId; // 1 byte
|
||||||
|
|
||||||
bool isJoinable; // 1 uint8_t
|
bool isJoinable; // 1 byte
|
||||||
|
|
||||||
_GameSessionData()
|
_GameSessionData()
|
||||||
{
|
{
|
||||||
|
|
@ -40,12 +40,12 @@ typedef struct _GameSessionData
|
||||||
GameSessionUID players[MINECRAFT_NET_MAX_PLAYERS]; // 64 bytes ( 8*8 ) on xbox, 192 ( 24*8) on PS3
|
GameSessionUID players[MINECRAFT_NET_MAX_PLAYERS]; // 64 bytes ( 8*8 ) on xbox, 192 ( 24*8) on PS3
|
||||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
unsigned int m_uiGameHostSettings; // 4 bytes
|
||||||
unsigned int texturePackParentId; // 4 bytes
|
unsigned int texturePackParentId; // 4 bytes
|
||||||
unsigned char subTexturePackId; // 1 uint8_t
|
unsigned char subTexturePackId; // 1 byte
|
||||||
|
|
||||||
bool isJoinable; // 1 uint8_t
|
bool isJoinable; // 1 byte
|
||||||
|
|
||||||
unsigned char playerCount; // 1 uint8_t
|
unsigned char playerCount; // 1 byte
|
||||||
bool isReadyToJoin; // 1 uint8_t
|
bool isReadyToJoin; // 1 byte
|
||||||
|
|
||||||
_GameSessionData()
|
_GameSessionData()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ bool SQRNetworkPlayer::HasSmallIdConfirmed()
|
||||||
return ( m_flags & SNP_FLAG_SMALLID_CONFIRMED );
|
return ( m_flags & SNP_FLAG_SMALLID_CONFIRMED );
|
||||||
}
|
}
|
||||||
|
|
||||||
// To confirm to the host that we are ready, send a single uint8_t with our small id.
|
// To confirm to the host that we are ready, send a single byte with our small id.
|
||||||
void SQRNetworkPlayer::ConfirmReady()
|
void SQRNetworkPlayer::ConfirmReady()
|
||||||
{
|
{
|
||||||
SendInternal(&m_ISD, sizeof(InitSendData), e_flag_AckNotRequested);
|
SendInternal(&m_ISD, sizeof(InitSendData), e_flag_AckNotRequested);
|
||||||
|
|
|
||||||
|
|
@ -97,12 +97,12 @@ int32_t sceRemoteStorageGetStatus(const SceRemoteStorageStatusReqParams & params
|
||||||
/// Gets section of data from a file specified.
|
/// Gets section of data from a file specified.
|
||||||
///
|
///
|
||||||
/// Gets section of data from a file specified. The amount of data requested can be of any size. To request this information the name of file, the number of bytes and
|
/// Gets section of data from a file specified. The amount of data requested can be of any size. To request this information the name of file, the number of bytes and
|
||||||
/// the uint8_t to start reading along with a buffer to store such data must be provided.
|
/// the byte to start reading along with a buffer to store such data must be provided.
|
||||||
/// Metadata information of the file, as description or visibility, will be provided only in the case the first amount of bytes for the file are requested (offset = 0).
|
/// Metadata information of the file, as description or visibility, will be provided only in the case the first amount of bytes for the file are requested (offset = 0).
|
||||||
/// This method does make use of the callback to inform the user of success termination. The SceRemoteStorageData pointer must be a pointer to a valid
|
/// This method does make use of the callback to inform the user of success termination. The SceRemoteStorageData pointer must be a pointer to a valid
|
||||||
/// location in memory until the callback is called as the output information will be stored in such location.
|
/// location in memory until the callback is called as the output information will be stored in such location.
|
||||||
///
|
///
|
||||||
/// @param params The structure containing the file name to read, the start uint8_t to start reading and the amount of bytes to read.
|
/// @param params The structure containing the file name to read, the start byte to start reading and the amount of bytes to read.
|
||||||
/// @param status The structure where the output information will be stored. The memory location being pointed must be valid until the callback gets called.
|
/// @param status The structure where the output information will be stored. The memory location being pointed must be valid until the callback gets called.
|
||||||
///
|
///
|
||||||
/// @retval SCE_REMOTE_STORAGE_SUCCESS The operation was successfully registered on the thread.
|
/// @retval SCE_REMOTE_STORAGE_SUCCESS The operation was successfully registered on the thread.
|
||||||
|
|
|
||||||
|
|
@ -2088,7 +2088,7 @@ size_t UIController::RegisterForCallbackId(UIScene *scene)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&m_registeredCallbackScenesCS);
|
EnterCriticalSection(&m_registeredCallbackScenesCS);
|
||||||
size_t newId = GetTickCount();
|
size_t newId = GetTickCount();
|
||||||
newId &= 0xFFFFFF; // Chop off the top uint8_t, we don't need any more accuracy than that
|
newId &= 0xFFFFFF; // Chop off the top byte, we don't need any more accuracy than that
|
||||||
newId |= (scene->getSceneType() << 24); // Add in the scene's type to help keep this unique
|
newId |= (scene->getSceneType() << 24); // Add in the scene's type to help keep this unique
|
||||||
m_registeredCallbackScenes[newId] = scene;
|
m_registeredCallbackScenes[newId] = scene;
|
||||||
LeaveCriticalSection(&m_registeredCallbackScenesCS);
|
LeaveCriticalSection(&m_registeredCallbackScenesCS);
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ typedef struct internal_state {
|
||||||
int status; /* as the name implies */
|
int status; /* as the name implies */
|
||||||
Bytef *pending_buf; /* output still pending */
|
Bytef *pending_buf; /* output still pending */
|
||||||
ulg pending_buf_size; /* size of pending_buf */
|
ulg pending_buf_size; /* size of pending_buf */
|
||||||
Bytef *pending_out; /* next pending uint8_t to output to the stream */
|
Bytef *pending_out; /* next pending byte to output to the stream */
|
||||||
uInt pending; /* nb of bytes in the pending buffer */
|
uInt pending; /* nb of bytes in the pending buffer */
|
||||||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||||
gz_headerp gzhead; /* gzip header information to write */
|
gz_headerp gzhead; /* gzip header information to write */
|
||||||
|
|
@ -144,7 +144,7 @@ typedef struct internal_state {
|
||||||
uInt hash_shift;
|
uInt hash_shift;
|
||||||
/* Number of bits by which ins_h must be shifted at each input
|
/* Number of bits by which ins_h must be shifted at each input
|
||||||
* step. It must be such that after MIN_MATCH steps, the oldest
|
* step. It must be such that after MIN_MATCH steps, the oldest
|
||||||
* uint8_t no longer takes part in the hash key, that is:
|
* byte no longer takes part in the hash key, that is:
|
||||||
* hash_shift * MIN_MATCH >= hash_bits
|
* hash_shift * MIN_MATCH >= hash_bits
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -272,7 +272,7 @@ typedef struct internal_state {
|
||||||
|
|
||||||
} FAR deflate_state;
|
} FAR deflate_state;
|
||||||
|
|
||||||
/* Output a uint8_t on the stream.
|
/* Output a byte on the stream.
|
||||||
* IN assertion: there is enough room in pending_buf.
|
* IN assertion: there is enough room in pending_buf.
|
||||||
*/
|
*/
|
||||||
#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
|
#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
that table. For a length or distance, the low four bits of op
|
that table. For a length or distance, the low four bits of op
|
||||||
is the number of extra bits to get after the code. bits is
|
is the number of extra bits to get after the code. bits is
|
||||||
the number of bits in this code or part of the code to drop off
|
the number of bits in this code or part of the code to drop off
|
||||||
of the bit buffer. val is the actual uint8_t to output in the case
|
of the bit buffer. val is the actual byte to output in the case
|
||||||
of a literal, the base length or distance, or the offset from
|
of a literal, the base length or distance, or the offset from
|
||||||
the current table to the next table. Each entry is four bytes. */
|
the current table to the next table. Each entry is four bytes. */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,11 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
|
||||||
struct internal_state;
|
struct internal_state;
|
||||||
|
|
||||||
typedef struct z_stream_s {
|
typedef struct z_stream_s {
|
||||||
z_const Bytef *next_in; /* next input uint8_t */
|
z_const Bytef *next_in; /* next input byte */
|
||||||
uInt avail_in; /* number of bytes available at next_in */
|
uInt avail_in; /* number of bytes available at next_in */
|
||||||
uLong total_in; /* total number of input bytes read so far */
|
uLong total_in; /* total number of input bytes read so far */
|
||||||
|
|
||||||
Bytef *next_out; /* next output uint8_t should be put there */
|
Bytef *next_out; /* next output byte should be put there */
|
||||||
uInt avail_out; /* remaining free space at next_out */
|
uInt avail_out; /* remaining free space at next_out */
|
||||||
uLong total_out; /* total number of bytes output so far */
|
uLong total_out; /* total number of bytes output so far */
|
||||||
|
|
||||||
|
|
@ -278,17 +278,17 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||||
maximize compression.
|
maximize compression.
|
||||||
|
|
||||||
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
|
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
|
||||||
flushed to the output buffer and the output is aligned on a uint8_t boundary, so
|
flushed to the output buffer and the output is aligned on a byte boundary, so
|
||||||
that the decompressor can get all input data available so far. (In
|
that the decompressor can get all input data available so far. (In
|
||||||
particular avail_in is zero after the call if enough output space has been
|
particular avail_in is zero after the call if enough output space has been
|
||||||
provided before the call.) Flushing may degrade compression for some
|
provided before the call.) Flushing may degrade compression for some
|
||||||
compression algorithms and so it should be used only when necessary. This
|
compression algorithms and so it should be used only when necessary. This
|
||||||
completes the current deflate block and follows it with an empty stored block
|
completes the current deflate block and follows it with an empty stored block
|
||||||
that is three bits plus filler bits to the next uint8_t, followed by four bytes
|
that is three bits plus filler bits to the next byte, followed by four bytes
|
||||||
(00 00 ff ff).
|
(00 00 ff ff).
|
||||||
|
|
||||||
If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
|
If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
|
||||||
output buffer, but the output is not aligned to a uint8_t boundary. All of the
|
output buffer, but the output is not aligned to a byte boundary. All of the
|
||||||
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
|
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
|
||||||
This completes the current deflate block and follows it with an empty fixed
|
This completes the current deflate block and follows it with an empty fixed
|
||||||
codes block that is 10 bits long. This assures that enough bytes are output
|
codes block that is 10 bits long. This assures that enough bytes are output
|
||||||
|
|
@ -296,8 +296,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||||
block.
|
block.
|
||||||
|
|
||||||
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
||||||
for Z_SYNC_FLUSH, but the output is not aligned on a uint8_t boundary, and up to
|
for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
|
||||||
seven bits of the current block are held to be written as the next uint8_t after
|
seven bits of the current block are held to be written as the next byte after
|
||||||
the next deflate block is completed. In this case, the decompressor may not
|
the next deflate block is completed. In this case, the decompressor may not
|
||||||
be provided enough bits at this point in order to complete decompression of
|
be provided enough bits at this point in order to complete decompression of
|
||||||
the data provided so far to the compressor. It may need to wait for the next
|
the data provided so far to the compressor. It may need to wait for the next
|
||||||
|
|
|
||||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
||||||
{
|
{
|
||||||
void const *start; // Sample buffer address (W)
|
void const *start; // Sample buffer address (W)
|
||||||
U32 len; // Sample buffer size in bytes (W)
|
U32 len; // Sample buffer size in bytes (W)
|
||||||
U32 pos; // Index to next uint8_t (R/W)
|
U32 pos; // Index to next byte (R/W)
|
||||||
U32 done; // Nonzero if buffer with len=0 sent by app
|
U32 done; // Nonzero if buffer with len=0 sent by app
|
||||||
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
||||||
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||||
|
|
|
||||||
|
|
@ -1779,7 +1779,7 @@ void DQRNetworkManager::SendUnassignSmallId(int playerIndex)
|
||||||
LogCommentFormat( L"SendUnassignSmallId, channel %d\n", playerIndex);
|
LogCommentFormat( L"SendUnassignSmallId, channel %d\n", playerIndex);
|
||||||
// Send data with small Id setting mode - see full comment in DQRNetworkManagerEventHandlers::DataReceivedHandler
|
// Send data with small Id setting mode - see full comment in DQRNetworkManagerEventHandlers::DataReceivedHandler
|
||||||
BYTE data[4];
|
BYTE data[4];
|
||||||
data[0] = 0x80 | ( playerIndex << 5 ); // Send 1 uint8_t, internal mode
|
data[0] = 0x80 | ( playerIndex << 5 ); // Send 1 byte, internal mode
|
||||||
data[1] = 1;
|
data[1] = 1;
|
||||||
data[2] = DQR_INTERNAL_UNASSIGN_SMALL_ID; // Internal data type
|
data[2] = DQR_INTERNAL_UNASSIGN_SMALL_ID; // Internal data type
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,10 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
||||||
break;
|
break;
|
||||||
case DQRConnectionInfo::ConnectionState_InternalRoomSyncData:
|
case DQRConnectionInfo::ConnectionState_InternalRoomSyncData:
|
||||||
connectionInfo->m_pucRoomSyncData[connectionInfo->m_roomSyncDataBytesRead++] = uint8_t;
|
connectionInfo->m_pucRoomSyncData[connectionInfo->m_roomSyncDataBytesRead++] = uint8_t;
|
||||||
// The room sync info is sent as a 4 uint8_t count of the length of XUID strings, then the RoomSyncData, then the XUID strings
|
// The room sync info is sent as a 4 byte count of the length of XUID strings, then the RoomSyncData, then the XUID strings
|
||||||
if( connectionInfo->m_roomSyncDataBytesToRead == 0 )
|
if( connectionInfo->m_roomSyncDataBytesToRead == 0 )
|
||||||
{
|
{
|
||||||
// At first stage of reading the 4 uint8_t count
|
// At first stage of reading the 4 byte count
|
||||||
if( connectionInfo->m_roomSyncDataBytesRead == 4 )
|
if( connectionInfo->m_roomSyncDataBytesRead == 4 )
|
||||||
{
|
{
|
||||||
memcpy( &connectionInfo->m_roomSyncDataBytesToRead, connectionInfo->m_pucRoomSyncData, 4);
|
memcpy( &connectionInfo->m_roomSyncDataBytesToRead, connectionInfo->m_pucRoomSyncData, 4);
|
||||||
|
|
@ -290,10 +290,10 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
||||||
break;
|
break;
|
||||||
case DQRConnectionInfo::ConnectionState_InternalAddPlayerFailedData:
|
case DQRConnectionInfo::ConnectionState_InternalAddPlayerFailedData:
|
||||||
connectionInfo->m_pucAddFailedPlayerData[connectionInfo->m_addFailedPlayerDataBytesRead++] = uint8_t;
|
connectionInfo->m_pucAddFailedPlayerData[connectionInfo->m_addFailedPlayerDataBytesRead++] = uint8_t;
|
||||||
// The failed player info is sent as a 4 uint8_t count of the length of XUID string, then the string itself
|
// The failed player info is sent as a 4 byte count of the length of XUID string, then the string itself
|
||||||
if( connectionInfo->m_addFailedPlayerDataBytesToRead == 0 )
|
if( connectionInfo->m_addFailedPlayerDataBytesToRead == 0 )
|
||||||
{
|
{
|
||||||
// At first stage of reading the 4 uint8_t count
|
// At first stage of reading the 4 byte count
|
||||||
if( connectionInfo->m_addFailedPlayerDataBytesRead == 4 )
|
if( connectionInfo->m_addFailedPlayerDataBytesRead == 4 )
|
||||||
{
|
{
|
||||||
memcpy( &connectionInfo->m_addFailedPlayerDataBytesToRead, connectionInfo->m_pucAddFailedPlayerData, 4);
|
memcpy( &connectionInfo->m_addFailedPlayerDataBytesToRead, connectionInfo->m_pucAddFailedPlayerData, 4);
|
||||||
|
|
|
||||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
||||||
{
|
{
|
||||||
void const *start; // Sample buffer address (W)
|
void const *start; // Sample buffer address (W)
|
||||||
U32 len; // Sample buffer size in bytes (W)
|
U32 len; // Sample buffer size in bytes (W)
|
||||||
U32 pos; // Index to next uint8_t (R/W)
|
U32 pos; // Index to next byte (R/W)
|
||||||
U32 done; // Nonzero if buffer with len=0 sent by app
|
U32 done; // Nonzero if buffer with len=0 sent by app
|
||||||
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
||||||
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||||
|
|
|
||||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
||||||
{
|
{
|
||||||
void const *start; // Sample buffer address (W)
|
void const *start; // Sample buffer address (W)
|
||||||
U32 len; // Sample buffer size in bytes (W)
|
U32 len; // Sample buffer size in bytes (W)
|
||||||
U32 pos; // Index to next uint8_t (R/W)
|
U32 pos; // Index to next byte (R/W)
|
||||||
U32 done; // Nonzero if buffer with len=0 sent by app
|
U32 done; // Nonzero if buffer with len=0 sent by app
|
||||||
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
||||||
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ bool EdgeZLib::Compress(void* pDestination, uint32_t* pDestSize, const void* pSo
|
||||||
pDst = ((uint32_t*)pDestination);
|
pDst = ((uint32_t*)pDestination);
|
||||||
}
|
}
|
||||||
|
|
||||||
pDst[0] = SrcSize; // 4 uint8_t header added for source size
|
pDst[0] = SrcSize; // 4 byte header added for source size
|
||||||
|
|
||||||
|
|
||||||
s_numElementsToCompress = 1; //Must be set correctly before any elements are added
|
s_numElementsToCompress = 1; //Must be set correctly before any elements are added
|
||||||
|
|
@ -275,7 +275,7 @@ bool EdgeZLib::Compress(void* pDestination, uint32_t* pDestSize, const void* pSo
|
||||||
(int)SrcSize, (int)s_compressedSize, compressionPercent, kNumDeflateTasks );
|
(int)SrcSize, (int)s_compressedSize, compressionPercent, kNumDeflateTasks );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*pDestSize = s_compressedSize + 4; // 4 uint8_t header for size
|
*pDestSize = s_compressedSize + 4; // 4 byte header for size
|
||||||
if(findingSizeOnly)
|
if(findingSizeOnly)
|
||||||
free(pDst);
|
free(pDst);
|
||||||
LeaveCriticalSection(&s_critSect);
|
LeaveCriticalSection(&s_critSect);
|
||||||
|
|
|
||||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
||||||
{
|
{
|
||||||
void const *start; // Sample buffer address (W)
|
void const *start; // Sample buffer address (W)
|
||||||
U32 len; // Sample buffer size in bytes (W)
|
U32 len; // Sample buffer size in bytes (W)
|
||||||
U32 pos; // Index to next uint8_t (R/W)
|
U32 pos; // Index to next byte (R/W)
|
||||||
U32 done; // Nonzero if buffer with len=0 sent by app
|
U32 done; // Nonzero if buffer with len=0 sent by app
|
||||||
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
S32 reset_ASI; // Reset the ASI decoder at the end of the buffer
|
||||||
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
S32 reset_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,11 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
|
||||||
struct internal_state;
|
struct internal_state;
|
||||||
|
|
||||||
typedef struct z_stream_s {
|
typedef struct z_stream_s {
|
||||||
z_const Bytef *next_in; /* next input uint8_t */
|
z_const Bytef *next_in; /* next input byte */
|
||||||
uInt avail_in; /* number of bytes available at next_in */
|
uInt avail_in; /* number of bytes available at next_in */
|
||||||
uLong total_in; /* total number of input bytes read so far */
|
uLong total_in; /* total number of input bytes read so far */
|
||||||
|
|
||||||
Bytef *next_out; /* next output uint8_t should be put there */
|
Bytef *next_out; /* next output byte should be put there */
|
||||||
uInt avail_out; /* remaining free space at next_out */
|
uInt avail_out; /* remaining free space at next_out */
|
||||||
uLong total_out; /* total number of bytes output so far */
|
uLong total_out; /* total number of bytes output so far */
|
||||||
|
|
||||||
|
|
@ -278,17 +278,17 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||||
maximize compression.
|
maximize compression.
|
||||||
|
|
||||||
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
|
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
|
||||||
flushed to the output buffer and the output is aligned on a uint8_t boundary, so
|
flushed to the output buffer and the output is aligned on a byte boundary, so
|
||||||
that the decompressor can get all input data available so far. (In
|
that the decompressor can get all input data available so far. (In
|
||||||
particular avail_in is zero after the call if enough output space has been
|
particular avail_in is zero after the call if enough output space has been
|
||||||
provided before the call.) Flushing may degrade compression for some
|
provided before the call.) Flushing may degrade compression for some
|
||||||
compression algorithms and so it should be used only when necessary. This
|
compression algorithms and so it should be used only when necessary. This
|
||||||
completes the current deflate block and follows it with an empty stored block
|
completes the current deflate block and follows it with an empty stored block
|
||||||
that is three bits plus filler bits to the next uint8_t, followed by four bytes
|
that is three bits plus filler bits to the next byte, followed by four bytes
|
||||||
(00 00 ff ff).
|
(00 00 ff ff).
|
||||||
|
|
||||||
If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
|
If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
|
||||||
output buffer, but the output is not aligned to a uint8_t boundary. All of the
|
output buffer, but the output is not aligned to a byte boundary. All of the
|
||||||
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
|
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
|
||||||
This completes the current deflate block and follows it with an empty fixed
|
This completes the current deflate block and follows it with an empty fixed
|
||||||
codes block that is 10 bits long. This assures that enough bytes are output
|
codes block that is 10 bits long. This assures that enough bytes are output
|
||||||
|
|
@ -296,8 +296,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||||
block.
|
block.
|
||||||
|
|
||||||
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
||||||
for Z_SYNC_FLUSH, but the output is not aligned on a uint8_t boundary, and up to
|
for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
|
||||||
seven bits of the current block are held to be written as the next uint8_t after
|
seven bits of the current block are held to be written as the next byte after
|
||||||
the next deflate block is completed. In this case, the decompressor may not
|
the next deflate block is completed. In this case, the decompressor may not
|
||||||
be provided enough bits at this point in order to complete decompression of
|
be provided enough bits at this point in order to complete decompression of
|
||||||
the data provided so far to the compressor. It may need to wait for the next
|
the data provided so far to the compressor. It may need to wait for the next
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ void WinsockNetLayer::ClearSocketForSmallId(BYTE smallId)
|
||||||
LeaveCriticalSection(&s_smallIdToSocketLock);
|
LeaveCriticalSection(&s_smallIdToSocketLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send reject handshake: sentinel 0xFF + DisconnectPacket wire format (1 uint8_t id 255 + 4 uint8_t big-endian reason). Then caller closes socket.
|
// Send reject handshake: sentinel 0xFF + DisconnectPacket wire format (1 byte id 255 + 4 byte big-endian reason). Then caller closes socket.
|
||||||
static void SendRejectWithReason(SOCKET clientSocket, DisconnectPacket::eDisconnectReason reason)
|
static void SendRejectWithReason(SOCKET clientSocket, DisconnectPacket::eDisconnectReason reason)
|
||||||
{
|
{
|
||||||
BYTE buf[6];
|
BYTE buf[6];
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ ByteArrayInputStream::ByteArrayInputStream(byteArray buf)
|
||||||
this->buf = buf;
|
this->buf = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reads the next uint8_t of data from this input stream. The value uint8_t is returned as an int in the range 0 to 255.
|
//Reads the next byte of data from this input stream. The value uint8_t is returned as an int in the range 0 to 255.
|
||||||
//If no uint8_t is available because the end of the stream has been reached, the value -1 is returned.
|
//If no uint8_t is available because the end of the stream has been reached, the value -1 is returned.
|
||||||
//This read method cannot block.
|
//This read method cannot block.
|
||||||
//Returns:
|
//Returns:
|
||||||
//the next uint8_t of data, or -1 if the end of the stream has been reached.
|
//the next byte of data, or -1 if the end of the stream has been reached.
|
||||||
int ByteArrayInputStream::read()
|
int ByteArrayInputStream::read()
|
||||||
{
|
{
|
||||||
if( pos >= count )
|
if( pos >= count )
|
||||||
|
|
|
||||||
|
|
@ -1169,7 +1169,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
usDataOffset = (usDataOffset + 3 ) & 0xfffc; // Make sure offset is 4 uint8_t aligned
|
usDataOffset = (usDataOffset + 3 ) & 0xfffc; // Make sure offset is 4 byte aligned
|
||||||
XMemCpy( pucData + usDataOffset, unpacked_data, 64 );
|
XMemCpy( pucData + usDataOffset, unpacked_data, 64 );
|
||||||
newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT;
|
newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT;
|
||||||
usDataOffset += 64;
|
usDataOffset += 64;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ ConsoleSaveFileInputStream::ConsoleSaveFileInputStream(ConsoleSaveFile *saveFile
|
||||||
|
|
||||||
//Reads a uint8_t of data from this input stream. This method blocks if no input is yet available.
|
//Reads a uint8_t of data from this input stream. This method blocks if no input is yet available.
|
||||||
//Returns:
|
//Returns:
|
||||||
//the next uint8_t of data, or -1 if the end of the file is reached.
|
//the next byte of data, or -1 if the end of the file is reached.
|
||||||
int ConsoleSaveFileInputStream::read()
|
int ConsoleSaveFileInputStream::read()
|
||||||
{
|
{
|
||||||
uint8_t byteRead = 0;
|
uint8_t byteRead = 0;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ DataInputStream::DataInputStream(InputStream *in) : stream( in )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reads the next uint8_t of data from this input stream. The value uint8_t is returned as an int in the range 0 to 255.
|
//Reads the next byte of data from this input stream. The value uint8_t is returned as an int in the range 0 to 255.
|
||||||
//If no uint8_t is available because the end of the stream has been reached, the value -1 is returned.
|
//If no uint8_t is available because the end of the stream has been reached, the value -1 is returned.
|
||||||
//This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
|
//This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
|
||||||
//This method simply performs in.read() and returns the result.
|
//This method simply performs in.read() and returns the result.
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ FileInputStream::~FileInputStream()
|
||||||
|
|
||||||
//Reads a uint8_t of data from this input stream. This method blocks if no input is yet available.
|
//Reads a uint8_t of data from this input stream. This method blocks if no input is yet available.
|
||||||
//Returns:
|
//Returns:
|
||||||
//the next uint8_t of data, or -1 if the end of the file is reached.
|
//the next byte of data, or -1 if the end of the file is reached.
|
||||||
int FileInputStream::read()
|
int FileInputStream::read()
|
||||||
{
|
{
|
||||||
uint8_t byteRead = 0;
|
uint8_t byteRead = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue