mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
C++23 Compiler Compatible
This commit is contained in:
parent
de46641cda
commit
b2e0405fe9
|
|
@ -264,13 +264,13 @@ void AchievementScreen::renderBg(int xm, int ym, float a)
|
|||
|
||||
for ( Achievement *ach : *Achievements::achievements )
|
||||
{
|
||||
if ( ach == nullptr || ach->requires == nullptr) continue;
|
||||
if ( ach == nullptr || ach->requirements == nullptr) continue;
|
||||
|
||||
int x1 = ach->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll + 11 + xBigMap;
|
||||
int y1 = ach->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll + 11 + yBigMap;
|
||||
|
||||
int x2 = ach->requires->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll + 11 + xBigMap;
|
||||
int y2 = ach->requires->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll + 11 + yBigMap;
|
||||
int x2 = ach->requirements->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll + 11 + xBigMap;
|
||||
int y2 = ach->requirements->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll + 11 + yBigMap;
|
||||
|
||||
int color = 0;
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a)
|
|||
else
|
||||
{
|
||||
int width = Math::_max(font->width(name), 120);
|
||||
wstring msg = I18n::get(L"achievement.requires", ach->requires->name);
|
||||
wstring msg = I18n::get(L"achievement.requirements", ach->requirements->name);
|
||||
int height = font->wordWrapHeight(msg, width);
|
||||
fillGradient(x - 3, y - 3, x + width + 3, y + height + 12 + 3, 0xc0000000, 0xc0000000);
|
||||
font->drawWordWrap(msg, x, y + 12, width, 0xff705050);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ typedef struct
|
|||
unsigned char ucSoundFXVolume;
|
||||
unsigned char ucSensitivity;
|
||||
unsigned char ucGamma;
|
||||
unsigned char ucPad01; // 1 byte of padding inserted here
|
||||
unsigned char ucPad01; // 1 uint8_t of padding inserted here
|
||||
unsigned short usBitmaskValues; // bit 0,1 - difficulty
|
||||
// bit 2 - view bob
|
||||
// bit 3 - player visible in a map
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ void SoundEngine::playMusicTick() {};
|
|||
#else
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
|
||||
char SoundEngine::m_szMusicPath[]={"music\\"};
|
||||
char SoundEngine::m_szRedistName[]={"redist64"};
|
||||
const char SoundEngine::m_szSoundPath[] = {"Windows64Media\\Sound\\"};
|
||||
const char SoundEngine::m_szMusicPath[] = {"music\\"};
|
||||
const char SoundEngine::m_szRedistName[] = {"redist64"};
|
||||
#elif defined _DURANGO
|
||||
char SoundEngine::m_szSoundPath[]={"Sound\\"};
|
||||
char SoundEngine::m_szMusicPath[]={"music\\"};
|
||||
|
|
@ -103,7 +103,7 @@ char SoundEngine::m_szRedistName[]={"redist"};
|
|||
|
||||
#endif
|
||||
|
||||
char *SoundEngine::m_szStreamFileA[eStream_Max]=
|
||||
const char *SoundEngine::m_szStreamFileA[eStream_Max]=
|
||||
{
|
||||
"calm1",
|
||||
"calm2",
|
||||
|
|
|
|||
|
|
@ -148,10 +148,10 @@ private:
|
|||
ma_sound m_musicStream;
|
||||
bool m_musicStreamActive;
|
||||
|
||||
static char m_szSoundPath[];
|
||||
static char m_szMusicPath[];
|
||||
static char m_szRedistName[];
|
||||
static char *m_szStreamFileA[eStream_Max];
|
||||
static const char m_szSoundPath[];
|
||||
static const char m_szMusicPath[];
|
||||
static const char m_szRedistName[];
|
||||
static const char *m_szStreamFileA[eStream_Max];
|
||||
|
||||
AUDIO_LISTENER m_ListenerA[MAX_LOCAL_PLAYERS];
|
||||
int m_validListenerCount;
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ use a specific one you will need to specify the device ID in the configuration,
|
|||
config.capture.pDeviceID = pMyCaptureDeviceID; // Only if requesting a capture, duplex or loopback device.
|
||||
```
|
||||
|
||||
To retrieve the device ID you will need to perform device enumeration, however this requires the
|
||||
To retrieve the device ID you will need to perform device enumeration, however this requirements the
|
||||
use of a new concept called the "context". Conceptually speaking the context sits above the device.
|
||||
There is one context to many devices. The purpose of the context is to represent the backend at a
|
||||
more global level and to perform operations outside the scope of an individual device. Mainly it is
|
||||
|
|
@ -396,7 +396,7 @@ The start/stop time needs to be specified based on the absolute timer which is c
|
|||
engine. The current global time in PCM frames can be retrieved with
|
||||
`ma_engine_get_time_in_pcm_frames()`. The engine's global time can be changed with
|
||||
`ma_engine_set_time_in_pcm_frames()` for synchronization purposes if required. Note that scheduling
|
||||
a start time still requires an explicit call to `ma_sound_start()` before anything will play:
|
||||
a start time still requirements an explicit call to `ma_sound_start()` before anything will play:
|
||||
|
||||
```c
|
||||
ma_sound_set_start_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 2);
|
||||
|
|
@ -480,7 +480,7 @@ symbol for `ActivateAudioInterfaceAsync()`.
|
|||
The macOS build should compile cleanly without the need to download any dependencies nor link to
|
||||
any libraries or frameworks. The iOS build needs to be compiled as Objective-C and will need to
|
||||
link the relevant frameworks but should compile cleanly out of the box with Xcode. Compiling
|
||||
through the command line requires linking to `-lpthread` and `-lm`.
|
||||
through the command line requirements linking to `-lpthread` and `-lm`.
|
||||
|
||||
Due to the way miniaudio links to frameworks at runtime, your application may not pass Apple's
|
||||
notarization process. To fix this there are two options. The first is to compile with
|
||||
|
|
@ -502,13 +502,13 @@ See this discussion for more info: https://github.com/mackron/miniaudio/issues/2
|
|||
|
||||
2.3. Linux
|
||||
----------
|
||||
The Linux build only requires linking to `-ldl`, `-lpthread` and `-lm`. You do not need any
|
||||
The Linux build only requirements linking to `-ldl`, `-lpthread` and `-lm`. You do not need any
|
||||
development packages. You may need to link with `-latomic` if you're compiling for 32-bit ARM.
|
||||
|
||||
|
||||
2.4. BSD
|
||||
--------
|
||||
The BSD build only requires linking to `-lpthread` and `-lm`. NetBSD uses audio(4), OpenBSD uses
|
||||
The BSD build only requirements linking to `-lpthread` and `-lm`. NetBSD uses audio(4), OpenBSD uses
|
||||
sndio and FreeBSD uses OSS. You may need to link with `-latomic` if you're compiling for 32-bit
|
||||
ARM.
|
||||
|
||||
|
|
@ -517,7 +517,7 @@ ARM.
|
|||
------------
|
||||
AAudio is the highest priority backend on Android. This should work out of the box without needing
|
||||
any kind of compiler configuration. Support for AAudio starts with Android 8 which means older
|
||||
versions will fall back to OpenSL|ES which requires API level 16+.
|
||||
versions will fall back to OpenSL|ES which requirements API level 16+.
|
||||
|
||||
There have been reports that the OpenSL|ES backend fails to initialize on some Android based
|
||||
devices due to `dlopen()` failing to open "libOpenSLES.so". If this happens on your platform
|
||||
|
|
@ -581,7 +581,7 @@ To run locally, you'll need to use emrun:
|
|||
+----------------------------------+--------------------------------------------------------------------+
|
||||
| MA_NO_NULL | Disables the null backend. |
|
||||
+----------------------------------+--------------------------------------------------------------------+
|
||||
| MA_ENABLE_ONLY_SPECIFIC_BACKENDS | Disables all backends by default and requires `MA_ENABLE_*` to |
|
||||
| MA_ENABLE_ONLY_SPECIFIC_BACKENDS | Disables all backends by default and requirements `MA_ENABLE_*` to |
|
||||
| | enable specific backends. |
|
||||
+----------------------------------+--------------------------------------------------------------------+
|
||||
| MA_ENABLE_WASAPI | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to |
|
||||
|
|
@ -1467,7 +1467,7 @@ can be useful to schedule a sound to start or stop:
|
|||
ma_sound_set_stop_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 2));
|
||||
```
|
||||
|
||||
Note that scheduling a start time still requires an explicit call to `ma_sound_start()` before
|
||||
Note that scheduling a start time still requirements an explicit call to `ma_sound_start()` before
|
||||
anything will play.
|
||||
|
||||
The time is specified in global time which is controlled by the engine. You can get the engine's
|
||||
|
|
@ -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
|
||||
there is too little space between the pointers, move the write pointer forward.
|
||||
|
||||
You can use a ring buffer at the byte level instead of the PCM frame level by using the `ma_rb`
|
||||
You can use a ring buffer at the uint8_t 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
|
||||
instead of frame counts you will pass around byte counts.
|
||||
instead of frame counts you will pass around uint8_t counts.
|
||||
|
||||
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
|
||||
|
|
@ -3674,7 +3674,7 @@ BSD
|
|||
15.4. UWP
|
||||
---------
|
||||
- UWP only supports default playback and capture devices.
|
||||
- UWP requires the Microphone capability to be enabled in the application's manifest (Package.appxmanifest):
|
||||
- UWP requirements the Microphone capability to be enabled in the application's manifest (Package.appxmanifest):
|
||||
|
||||
```
|
||||
<Package ...>
|
||||
|
|
@ -7275,7 +7275,7 @@ easier, some helper callbacks are available. If the backend uses a blocking read
|
|||
backend uses a callback for data delivery, that callback must call `ma_device_handle_backend_data_callback()` from within its callback.
|
||||
This allows miniaudio to then process any necessary data conversion and then pass it to the miniaudio data callback.
|
||||
|
||||
If the backend requires absolute flexibility with its data delivery, it can optionally implement the `onDeviceDataLoop()` callback
|
||||
If the backend requirements absolute flexibility with its data delivery, it can optionally implement the `onDeviceDataLoop()` callback
|
||||
which will allow it to implement the logic that will run on the audio thread. This is much more advanced and is completely optional.
|
||||
|
||||
The audio thread should run data delivery logic in a loop while `ma_device_get_state() == ma_device_state_started` and no errors have been
|
||||
|
|
@ -11301,7 +11301,7 @@ typedef struct
|
|||
ma_uint32 defaultVolumeSmoothTimeInPCMFrames; /* Defaults to 0. Controls the default amount of smoothing to apply to volume changes to sounds. High values means more smoothing at the expense of high latency (will take longer to reach the new volume). */
|
||||
ma_uint32 preMixStackSizeInBytes; /* A stack is used for internal processing in the node graph. This allows you to configure the size of this stack. Smaller values will reduce the maximum depth of your node graph. You should rarely need to modify this. */
|
||||
ma_allocation_callbacks allocationCallbacks;
|
||||
ma_bool32 noAutoStart; /* When set to true, requires an explicit call to ma_engine_start(). This is false by default, meaning the engine will be started automatically in ma_engine_init(). */
|
||||
ma_bool32 noAutoStart; /* When set to true, requirements an explicit call to ma_engine_start(). This is false by default, meaning the engine will be started automatically in ma_engine_init(). */
|
||||
ma_bool32 noDevice; /* When set to true, don't create a default device. ma_engine_read_pcm_frames() can be called manually to read data. */
|
||||
ma_mono_expansion_mode monoExpansionMode; /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */
|
||||
ma_vfs* pResourceManagerVFS; /* A pointer to a pre-allocated VFS object to use with the resource manager. This is ignored if pResourceManager is not NULL. */
|
||||
|
|
@ -11813,7 +11813,7 @@ static MA_INLINE ma_bool32 ma_has_avx()
|
|||
#if defined(_AVX_) || defined(__AVX__)
|
||||
return MA_TRUE; /* If the compiler is allowed to freely generate AVX code we can assume support. */
|
||||
#else
|
||||
/* AVX requires both CPU and OS support. */
|
||||
/* AVX requirements both CPU and OS support. */
|
||||
#if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV)
|
||||
return MA_FALSE;
|
||||
#else
|
||||
|
|
@ -11847,7 +11847,7 @@ static MA_INLINE ma_bool32 ma_has_avx2(void)
|
|||
#if defined(_AVX2_) || defined(__AVX2__)
|
||||
return MA_TRUE; /* If the compiler is allowed to freely generate AVX2 code we can assume support. */
|
||||
#else
|
||||
/* AVX2 requires both CPU and OS support. */
|
||||
/* AVX2 requirements both CPU and OS support. */
|
||||
#if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV)
|
||||
return MA_FALSE;
|
||||
#else
|
||||
|
|
@ -11981,7 +11981,7 @@ static MA_INLINE ma_uint32 ma_swap_endian_uint32(ma_uint32 n)
|
|||
return __builtin_bswap32(n);
|
||||
#endif
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & 0xFF000000) >> 24) |
|
||||
|
|
@ -30346,13 +30346,13 @@ PulseAudio. In PulseAudio, the data callback will *only* be called if you wrote
|
|||
writing data, and if you don't have anything to write, just write silence. That's fine until you want to drain the stream. You see, if
|
||||
you're continuously writing data to the stream, the stream will never get drained! That means in order to drain the stream, you need to
|
||||
*not* write data to it! But remember, when you don't write data to the stream, the callback won't get fired again! Why is draining
|
||||
important? Because that's how we've defined stopping to work in miniaudio. In miniaudio, stopping the device requires it to be drained
|
||||
before returning from ma_device_stop(). So we've stopped the device, which requires us to drain, but draining requires us to *not* write
|
||||
important? Because that's how we've defined stopping to work in miniaudio. In miniaudio, stopping the device requirements it to be drained
|
||||
before returning from ma_device_stop(). So we've stopped the device, which requirements us to drain, but draining requirements us to *not* write
|
||||
data to the stream (or else it won't ever complete draining), but not writing to the stream means the callback won't get fired again!
|
||||
|
||||
This becomes a problem when stopping and then restarting the device. When the device is stopped, it's drained, which requires us to *not*
|
||||
This becomes a problem when stopping and then restarting the device. When the device is stopped, it's drained, which requirements us to *not*
|
||||
write anything to the stream. But then, since we didn't write anything to it, the write callback will *never* get called again if we just
|
||||
resume the stream naively. This means that starting the stream requires us to write data to the stream from outside the callback. This
|
||||
resume the stream naively. This means that starting the stream requirements us to write data to the stream from outside the callback. This
|
||||
disconnect is something PulseAudio has got seriously wrong - there should only ever be a single source of data delivery, that being the
|
||||
callback. (I have tried using `pa_stream_flush()` to trigger the write callback to fire, but this just doesn't work for some reason.)
|
||||
|
||||
|
|
@ -42076,7 +42076,7 @@ static ma_result ma_device_init__webaudio(ma_device* pDevice, const ma_device_co
|
|||
}
|
||||
#else
|
||||
{
|
||||
/* ScriptProcessorNode. This path requires us to do almost everything in JS, but we'll do as much as we can in C. */
|
||||
/* ScriptProcessorNode. This path requirements us to do almost everything in JS, but we'll do as much as we can in C. */
|
||||
ma_uint32 deviceIndex;
|
||||
ma_uint32 channels;
|
||||
ma_uint32 sampleRate;
|
||||
|
|
@ -56784,7 +56784,7 @@ static ma_result ma_data_converter_process_pcm_frames__channels_first(ma_data_co
|
|||
|
||||
/*
|
||||
Before doing any processing we need to determine how many frames we should try processing
|
||||
this iteration, for both input and output. The resampler requires us to perform format and
|
||||
this iteration, for both input and output. The resampler requirements us to perform format and
|
||||
channel conversion before passing any data into it. If we get our input count wrong, we'll
|
||||
end up performing redundant pre-processing. This isn't the end of the world, but it does
|
||||
result in some inefficiencies proportionate to how far our estimates are off.
|
||||
|
|
@ -63155,7 +63155,7 @@ static ma_result ma_decoder_init_custom__internal(const ma_decoder_config* pConf
|
|||
if (result == MA_SUCCESS) {
|
||||
return MA_SUCCESS;
|
||||
} else {
|
||||
/* 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. */
|
||||
/* 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. */
|
||||
result = ma_decoder_seek_bytes(pDecoder, 0, ma_seek_origin_start);
|
||||
if (result != MA_SUCCESS) {
|
||||
return result; /* Failed to seek back to the start. */
|
||||
|
|
@ -75444,7 +75444,7 @@ static void ma_data_source_node_process_pcm_frames(ma_node* pNode, const float**
|
|||
MA_ASSERT(frameCount > 0);
|
||||
|
||||
if (ma_data_source_get_data_format(pDataSourceNode->pDataSource, &format, &channels, NULL, NULL, 0) == MA_SUCCESS) { /* <-- Don't care about sample rate here. */
|
||||
/* The node graph system requires samples be in floating point format. This is checked in ma_data_source_node_init(). */
|
||||
/* The node graph system requirements samples be in floating point format. This is checked in ma_data_source_node_init(). */
|
||||
MA_ASSERT(format == ma_format_f32);
|
||||
(void)format; /* Just to silence some static analysis tools. */
|
||||
|
||||
|
|
@ -76413,7 +76413,7 @@ static ma_node_vtable g_ma_delay_node_vtable =
|
|||
NULL,
|
||||
1, /* 1 input channels. */
|
||||
1, /* 1 output channel. */
|
||||
MA_NODE_FLAG_CONTINUOUS_PROCESSING /* Delay requires continuous processing to ensure the tail get's processed. */
|
||||
MA_NODE_FLAG_CONTINUOUS_PROCESSING /* Delay requirements continuous processing to ensure the tail get's processed. */
|
||||
};
|
||||
|
||||
MA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode)
|
||||
|
|
@ -78471,7 +78471,7 @@ MA_API ma_result ma_sound_init_from_file_internal(ma_engine* pEngine, const ma_s
|
|||
ma_resource_manager_pipeline_notifications notifications;
|
||||
|
||||
/*
|
||||
The engine requires knowledge of the channel count of the underlying data source before it can
|
||||
The engine requirements knowledge of the channel count of the underlying data source before it can
|
||||
initialize the sound. Therefore, we need to make the resource manager wait until initialization
|
||||
of the underlying data source to be initialized so we can get access to the channel count. To
|
||||
do this, the MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT is forced.
|
||||
|
|
@ -78766,7 +78766,7 @@ MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint
|
|||
return MA_INVALID_ARGS;
|
||||
}
|
||||
|
||||
/* Stopping with a fade out requires us to schedule the stop into the future by the fade length. */
|
||||
/* Stopping with a fade out requirements us to schedule the stop into the future by the fade length. */
|
||||
ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound)) + fadeLengthInFrames, fadeLengthInFrames);
|
||||
|
||||
return MA_SUCCESS;
|
||||
|
|
@ -80011,7 +80011,7 @@ static MA_INLINE ma_uint16 ma_dr_wav__bswap16(ma_uint16 n)
|
|||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
return __builtin_bswap16(n);
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & 0xFF00) >> 8) |
|
||||
|
|
@ -80038,7 +80038,7 @@ static MA_INLINE ma_uint32 ma_dr_wav__bswap32(ma_uint32 n)
|
|||
return __builtin_bswap32(n);
|
||||
#endif
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & 0xFF000000) >> 24) |
|
||||
|
|
@ -80055,7 +80055,7 @@ static MA_INLINE ma_uint64 ma_dr_wav__bswap64(ma_uint64 n)
|
|||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
return __builtin_bswap64(n);
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) |
|
||||
|
|
@ -81733,11 +81733,11 @@ MA_PRIVATE size_t ma_dr_wav__write(ma_dr_wav* pWav, const void* pData, size_t da
|
|||
MA_DR_WAV_ASSERT(pWav->onWrite != NULL);
|
||||
return pWav->onWrite(pWav->pUserData, pData, dataSize);
|
||||
}
|
||||
MA_PRIVATE size_t ma_dr_wav__write_byte(ma_dr_wav* pWav, ma_uint8 byte)
|
||||
MA_PRIVATE size_t ma_dr_wav__write_byte(ma_dr_wav* pWav, ma_uint8 uint8_t)
|
||||
{
|
||||
MA_DR_WAV_ASSERT(pWav != NULL);
|
||||
MA_DR_WAV_ASSERT(pWav->onWrite != NULL);
|
||||
return pWav->onWrite(pWav->pUserData, &byte, 1);
|
||||
return pWav->onWrite(pWav->pUserData, &uint8_t, 1);
|
||||
}
|
||||
MA_PRIVATE size_t ma_dr_wav__write_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value)
|
||||
{
|
||||
|
|
@ -81787,12 +81787,12 @@ MA_PRIVATE size_t ma_dr_wav__write_or_count(ma_dr_wav* pWav, const void* pData,
|
|||
}
|
||||
return ma_dr_wav__write(pWav, pData, dataSize);
|
||||
}
|
||||
MA_PRIVATE size_t ma_dr_wav__write_or_count_byte(ma_dr_wav* pWav, ma_uint8 byte)
|
||||
MA_PRIVATE size_t ma_dr_wav__write_or_count_byte(ma_dr_wav* pWav, ma_uint8 uint8_t)
|
||||
{
|
||||
if (pWav == NULL) {
|
||||
return 1;
|
||||
}
|
||||
return ma_dr_wav__write_byte(pWav, byte);
|
||||
return ma_dr_wav__write_byte(pWav, uint8_t);
|
||||
}
|
||||
MA_PRIVATE size_t ma_dr_wav__write_or_count_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value)
|
||||
{
|
||||
|
|
@ -85149,7 +85149,7 @@ static MA_INLINE ma_uint16 ma_dr_flac__swap_endian_uint16(ma_uint16 n)
|
|||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
return _watcom_bswap16(n);
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & 0xFF00) >> 8) |
|
||||
|
|
@ -85178,7 +85178,7 @@ static MA_INLINE ma_uint32 ma_dr_flac__swap_endian_uint32(ma_uint32 n)
|
|||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
return _watcom_bswap32(n);
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & 0xFF000000) >> 24) |
|
||||
|
|
@ -85197,7 +85197,7 @@ static MA_INLINE ma_uint64 ma_dr_flac__swap_endian_uint64(ma_uint64 n)
|
|||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
return _watcom_bswap64(n);
|
||||
#else
|
||||
#error "This compiler does not support the byte swap intrinsic."
|
||||
#error "This compiler does not support the uint8_t swap intrinsic."
|
||||
#endif
|
||||
#else
|
||||
return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) |
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ extern int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, shor
|
|||
|
||||
extern int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats);
|
||||
extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples);
|
||||
// gets num_samples samples, not necessarily on a frame boundary--this requires
|
||||
// gets num_samples samples, not necessarily on a frame boundary--this requirements
|
||||
// buffering so you have to supply the buffers. DOES NOT APPLY THE COERCION RULES.
|
||||
// Returns the number of samples stored per channel; it may be less than requested
|
||||
// at the end of the file. If there are no more samples in the file, returns 0.
|
||||
|
|
@ -362,7 +362,7 @@ extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buf
|
|||
extern int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts);
|
||||
extern int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int num_samples);
|
||||
#endif
|
||||
// gets num_samples samples, not necessarily on a frame boundary--this requires
|
||||
// gets num_samples samples, not necessarily on a frame boundary--this requirements
|
||||
// buffering so you have to supply the buffers. Applies the coercion rules above
|
||||
// to produce 'channels' channels. Returns the number of samples stored per channel;
|
||||
// it may be less than requested at the end of the file. If there are no more
|
||||
|
|
@ -446,14 +446,14 @@ enum STBVorbisError
|
|||
|
||||
// STB_VORBIS_NO_FAST_SCALED_FLOAT
|
||||
// does not use a fast float-to-int trick to accelerate float-to-int on
|
||||
// most platforms which requires endianness be defined correctly.
|
||||
// most platforms which requirements endianness be defined correctly.
|
||||
//#define STB_VORBIS_NO_FAST_SCALED_FLOAT
|
||||
|
||||
|
||||
// STB_VORBIS_MAX_CHANNELS [number]
|
||||
// globally define this to the maximum number of channels you need.
|
||||
// The spec does not put a restriction on channels except that
|
||||
// the count is stored in a byte, so 255 is the hard limit.
|
||||
// the count is stored in a uint8_t, so 255 is the hard limit.
|
||||
// Reducing this saves about 16 bytes per value, so using 16 saves
|
||||
// (255-16)*16 or around 4KB. Plus anything other memory usage
|
||||
// I forgot to account for. Can probably go as low as 8 (7.1 audio),
|
||||
|
|
@ -503,7 +503,7 @@ enum STBVorbisError
|
|||
|
||||
// STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH
|
||||
// If the 'fast huffman' search doesn't succeed, then stb_vorbis falls
|
||||
// back on binary searching for the correct one. This requires storing
|
||||
// back on binary searching for the correct one. This requirements storing
|
||||
// extra tables with the huffman codes in sorted order. Defining this
|
||||
// symbol trades off space for speed by forcing a linear search in the
|
||||
// non-fast case, except for "sparse" codebooks.
|
||||
|
|
@ -541,7 +541,7 @@ enum STBVorbisError
|
|||
// STB_VORBIS_NO_DEFER_FLOOR
|
||||
// Normally we only decode the floor without synthesizing the actual
|
||||
// full curve. We can instead synthesize the curve immediately. This
|
||||
// requires more memory and is very likely slower, so I don't think
|
||||
// requirements more memory and is very likely slower, so I don't think
|
||||
// you'd ever want to do it except for debugging.
|
||||
// #define STB_VORBIS_NO_DEFER_FLOOR
|
||||
|
||||
|
|
@ -996,9 +996,9 @@ static void crc32_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
static __forceinline uint32 crc32_update(uint32 crc, uint8 byte)
|
||||
static __forceinline uint32 crc32_update(uint32 crc, uint8 uint8_t)
|
||||
{
|
||||
return (crc << 8) ^ crc_table[byte ^ (crc >> 24)];
|
||||
return (crc << 8) ^ crc_table[uint8_t ^ (crc >> 24)];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1066,7 +1066,7 @@ static float float32_unpack(uint32 x)
|
|||
// increasing frequencies--they rely on the lengths being sorted;
|
||||
// this makes for a very simple generation algorithm.
|
||||
// vorbis allows a huffman table with non-sorted lengths. This
|
||||
// requires a more sophisticated construction, since symbols in
|
||||
// requirements a more sophisticated construction, since symbols in
|
||||
// order do not map to huffman codes "in order".
|
||||
static void add_entry(Codebook *c, uint32 huff_code, int symbol, int count, int len, uint32 *values)
|
||||
{
|
||||
|
|
@ -1198,7 +1198,7 @@ static void compute_sorted_huffman(Codebook *c, uint8 *lengths, uint32 *values)
|
|||
// #1: sort a different data structure that says who they correspond to
|
||||
// #2: for each sorted entry, search the original list to find who corresponds
|
||||
// #3: for each original entry, find the sorted entry
|
||||
// #1 requires extra storage, #2 is slow, #3 can use binary search!
|
||||
// #1 requirements extra storage, #2 is slow, #3 can use binary search!
|
||||
for (i=0; i < len; ++i) {
|
||||
int huff_len = c->sparse ? lengths[values[i]] : lengths[i];
|
||||
if (include_in_sort(c,huff_len)) {
|
||||
|
|
@ -2325,7 +2325,7 @@ void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype)
|
|||
}
|
||||
#elif 0
|
||||
// transform to use a slow dct-iv; this is STILL basically trivial,
|
||||
// but only requires half as many ops
|
||||
// but only requirements half as many ops
|
||||
void dct_iv_slow(float *buffer, int n)
|
||||
{
|
||||
float mcos[16384];
|
||||
|
|
@ -3491,7 +3491,7 @@ static int vorbis_finish_frame(stb_vorbis *f, int len, int left, int right)
|
|||
if (!prev)
|
||||
// there was no previous packet, so this data isn't valid...
|
||||
// this isn't entirely true, only the would-have-overlapped data
|
||||
// isn't valid, but this seems to be what the spec requires
|
||||
// isn't valid, but this seems to be what the spec requirements
|
||||
return 0;
|
||||
|
||||
// truncate a short frame
|
||||
|
|
@ -3515,7 +3515,7 @@ static int vorbis_pump_first_frame(stb_vorbis *f)
|
|||
static int is_whole_packet_present(stb_vorbis *f)
|
||||
{
|
||||
// make sure that we have the packet available before continuing...
|
||||
// this requires a full ogg parse, but we know we can fetch from f->stream
|
||||
// this requirements a full ogg parse, but we know we can fetch from f->stream
|
||||
|
||||
// instead of coding this out explicitly, we could save the current read state,
|
||||
// read the next packet with get8() until end-of-packet, check f->eof, then
|
||||
|
|
@ -4356,7 +4356,7 @@ static int vorbis_search_for_page_pushdata(vorb *f, uint8 *data, int data_len)
|
|||
// they may cause us to stop early if their header is incomplete
|
||||
if (f->page_crc_tests < STB_VORBIS_PUSHDATA_CRC_COUNT) {
|
||||
if (data_len < 4) return 0;
|
||||
data_len -= 3; // need to look for 4-byte sequence, so don't miss
|
||||
data_len -= 3; // need to look for 4-uint8_t sequence, so don't miss
|
||||
// one that straddles a boundary
|
||||
for (i=0; i < data_len; ++i) {
|
||||
if (data[i] == 0x4f) {
|
||||
|
|
@ -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.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.993 - bugfix: pushdata API required 1 extra byte for empty page (failed to consume final page if empty) - 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.992 - fixes for MinGW warning
|
||||
0.991 - turn fast-float-conversion on by default
|
||||
0.990 - fix push-mode seek recovery if you seek into the headers
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
unordered_map<wstring,eMinecraftColour> ColourTable::s_colourNamesMap;
|
||||
|
||||
wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
|
||||
{
|
||||
const wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
|
||||
{
|
||||
L"NOTSET",
|
||||
|
||||
L"Foliage_Evergreen",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class ColourTable
|
|||
private:
|
||||
unsigned int m_colourValues[eMinecraftColour_COUNT];
|
||||
|
||||
static wchar_t *ColourTableElements[eMinecraftColour_COUNT];
|
||||
static const wchar_t *ColourTableElements[eMinecraftColour_COUNT];
|
||||
static unordered_map<wstring,eMinecraftColour> s_colourNamesMap;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -3310,7 +3310,7 @@ void CMinecraftApp::HandleXuiActions(void)
|
|||
// In split screen mode, we don't want to do any async loading or flushing of the cache, just a simple respawn
|
||||
pMinecraft->localplayers[i]->respawn();
|
||||
|
||||
// If the respawn requires a dimension change then the action will have changed
|
||||
// If the respawn requirements a dimension change then the action will have changed
|
||||
//if(app.GetXuiAction(i) == eAppAction_Respawn)
|
||||
//{
|
||||
// SetAction(i,eAppAction_Idle);
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ PBYTE DLCAudioFile::getData(DWORD &dwBytes)
|
|||
return m_pbData;
|
||||
}
|
||||
|
||||
WCHAR *DLCAudioFile::wchTypeNamesA[]=
|
||||
{
|
||||
const WCHAR *DLCAudioFile::wchTypeNamesA[] =
|
||||
{
|
||||
L"CUENAME",
|
||||
L"CREDIT",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public:
|
|||
e_AudioParamType_Max,
|
||||
|
||||
};
|
||||
static WCHAR *wchTypeNamesA[e_AudioParamType_Max];
|
||||
static const WCHAR *wchTypeNamesA[e_AudioParamType_Max];
|
||||
|
||||
DLCAudioFile(const wstring &path);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void DLCGameRulesHeader::addData(PBYTE pbData, DWORD dwBytes)
|
|||
|
||||
// Init values.
|
||||
int version_number;
|
||||
byte compression_type;
|
||||
uint8_t compression_type;
|
||||
wstring texturepackid;
|
||||
|
||||
// Read Datastream.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
#include "..\..\Minecraft.h"
|
||||
#include "..\..\TexturePackRepository.h"
|
||||
|
||||
WCHAR *DLCManager::wchTypeNamesA[]=
|
||||
{
|
||||
const WCHAR *DLCManager::wchTypeNamesA[] =
|
||||
{
|
||||
L"DISPLAYNAME",
|
||||
L"THEMENAME",
|
||||
L"FREE",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
e_DLCParamType_Max,
|
||||
|
||||
};
|
||||
static WCHAR *wchTypeNamesA[e_DLCParamType_Max];
|
||||
static const WCHAR *wchTypeNamesA[e_DLCParamType_Max];
|
||||
|
||||
private:
|
||||
vector<DLCPack *> m_packs;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
#include "ConsoleGameRules.h"
|
||||
#include "GameRuleManager.h"
|
||||
|
||||
WCHAR *GameRuleManager::wchTagNameA[] =
|
||||
{
|
||||
const WCHAR *GameRuleManager::wchTagNameA[] =
|
||||
{
|
||||
L"", // eGameRuleType_Root
|
||||
L"MapOptions", // eGameRuleType_LevelGenerationOptions
|
||||
L"ApplySchematic", // eGameRuleType_ApplySchematic
|
||||
|
|
@ -34,8 +34,8 @@ WCHAR *GameRuleManager::wchTagNameA[] =
|
|||
L"UpdatePlayer", // eGameRuleType_UpdatePlayerRule
|
||||
};
|
||||
|
||||
WCHAR *GameRuleManager::wchAttrNameA[] =
|
||||
{
|
||||
const WCHAR *GameRuleManager::wchAttrNameA[] =
|
||||
{
|
||||
L"descriptionName", // eGameRuleAttr_descriptionName
|
||||
L"promptName", // eGameRuleAttr_promptName
|
||||
L"dataTag", // eGameRuleAttr_dataTag
|
||||
|
|
@ -104,7 +104,7 @@ void GameRuleManager::loadGameRules(DLCPack *pack)
|
|||
{
|
||||
DLCGameRulesHeader *dlcHeader = (DLCGameRulesHeader *)pack->getFile(DLCManager::e_DLCType_GameRulesHeader, i);
|
||||
DWORD dSize;
|
||||
byte *dData = dlcHeader->getData(dSize);
|
||||
uint8_t *dData = dlcHeader->getData(dSize);
|
||||
|
||||
LevelGenerationOptions *createdLevelGenerationOptions = new LevelGenerationOptions(pack);
|
||||
// = loadGameRules(dData, dSize); //, strings);
|
||||
|
|
@ -123,7 +123,7 @@ void GameRuleManager::loadGameRules(DLCPack *pack)
|
|||
DLCGameRulesFile *dlcFile = (DLCGameRulesFile *)pack->getFile(DLCManager::e_DLCType_GameRules, i);
|
||||
|
||||
DWORD dSize;
|
||||
byte *dData = dlcFile->getData(dSize);
|
||||
uint8_t *dData = dlcFile->getData(dSize);
|
||||
|
||||
LevelGenerationOptions *createdLevelGenerationOptions = new LevelGenerationOptions(pack);
|
||||
// = loadGameRules(dData, dSize); //, strings);
|
||||
|
|
@ -137,7 +137,7 @@ void GameRuleManager::loadGameRules(DLCPack *pack)
|
|||
}
|
||||
}
|
||||
|
||||
LevelGenerationOptions *GameRuleManager::loadGameRules(byte *dIn, UINT dSize)
|
||||
LevelGenerationOptions *GameRuleManager::loadGameRules(uint8_t *dIn, UINT dSize)
|
||||
{
|
||||
LevelGenerationOptions *lgo = new LevelGenerationOptions();
|
||||
lgo->setGrSource( new JustGrSource() );
|
||||
|
|
@ -148,7 +148,7 @@ LevelGenerationOptions *GameRuleManager::loadGameRules(byte *dIn, UINT dSize)
|
|||
}
|
||||
|
||||
// 4J-JEV: Reverse of saveGameRules.
|
||||
void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, byte *dIn, UINT dSize)
|
||||
void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, uint8_t *dIn, UINT dSize)
|
||||
{
|
||||
app.DebugPrintf("GameRuleManager::LoadingGameRules:\n");
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, byte *dIn, UINT
|
|||
}
|
||||
|
||||
// 4J-JEV: Reverse of loadGameRules.
|
||||
void GameRuleManager::saveGameRules(byte **dOut, UINT *dSize)
|
||||
void GameRuleManager::saveGameRules(uint8_t **dOut, UINT *dSize)
|
||||
{
|
||||
if (m_currentGameRuleDefinitions == NULL &&
|
||||
m_currentLevelGenerationOptions == NULL)
|
||||
|
|
@ -367,7 +367,7 @@ void GameRuleManager::writeRuleFile(DataOutputStream *dos)
|
|||
m_currentGameRuleDefinitions->write(dos);
|
||||
}
|
||||
|
||||
bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT dSize, StringTable *strings) //(DLCGameRulesFile *dlcFile, StringTable *strings)
|
||||
bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, uint8_t *dIn, UINT dSize, StringTable *strings) //(DLCGameRulesFile *dlcFile, StringTable *strings)
|
||||
{
|
||||
bool levelGenAdded = false;
|
||||
bool gameRulesAdded = false;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class WstringLookup;
|
|||
class GameRuleManager
|
||||
{
|
||||
public:
|
||||
static WCHAR *wchTagNameA[ConsoleGameRules::eGameRuleType_Count];
|
||||
static WCHAR *wchAttrNameA[ConsoleGameRules::eGameRuleAttr_Count];
|
||||
static const WCHAR *wchTagNameA[ConsoleGameRules::eGameRuleType_Count];
|
||||
static const WCHAR *wchAttrNameA[ConsoleGameRules::eGameRuleAttr_Count];
|
||||
|
||||
static const short version_number = 2;
|
||||
|
||||
|
|
@ -40,10 +40,10 @@ public:
|
|||
|
||||
void loadGameRules(DLCPack *);
|
||||
|
||||
LevelGenerationOptions *loadGameRules(byte *dIn, UINT dSize);
|
||||
void loadGameRules(LevelGenerationOptions *lgo, byte *dIn, UINT dSize);
|
||||
LevelGenerationOptions *loadGameRules(uint8_t *dIn, UINT dSize);
|
||||
void loadGameRules(LevelGenerationOptions *lgo, uint8_t *dIn, UINT dSize);
|
||||
|
||||
void saveGameRules(byte **dOut, UINT *dSize);
|
||||
void saveGameRules(uint8_t **dOut, UINT *dSize);
|
||||
|
||||
private:
|
||||
LevelGenerationOptions *readHeader(DLCGameRulesHeader *grh);
|
||||
|
|
@ -51,7 +51,7 @@ private:
|
|||
void writeRuleFile(DataOutputStream *dos);
|
||||
|
||||
public:
|
||||
bool readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT dSize, StringTable *strings); //(DLCGameRulesFile *dlcFile, StringTable *strings);
|
||||
bool readRuleFile(LevelGenerationOptions *lgo, uint8_t *dIn, UINT dSize, StringTable *strings); //(DLCGameRulesFile *dlcFile, StringTable *strings);
|
||||
|
||||
private:
|
||||
void readAttributes(DataInputStream *dis, vector<wstring> *tagsAndAtts, GameRuleDefinition *rule);
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ typedef struct _GameSessionData
|
|||
char szPlayers[MINECRAFT_NET_MAX_PLAYERS][XUSER_NAME_SIZE]; // 128 bytes ( 8*16)
|
||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
||||
unsigned int texturePackParentId; // 4 bytes
|
||||
unsigned char subTexturePackId; // 1 byte
|
||||
unsigned char subTexturePackId; // 1 uint8_t
|
||||
|
||||
bool isJoinable; // 1 byte
|
||||
bool isJoinable; // 1 uint8_t
|
||||
|
||||
_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
|
||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
||||
unsigned int texturePackParentId; // 4 bytes
|
||||
unsigned char subTexturePackId; // 1 byte
|
||||
unsigned char subTexturePackId; // 1 uint8_t
|
||||
|
||||
bool isJoinable; // 1 byte
|
||||
bool isJoinable; // 1 uint8_t
|
||||
|
||||
unsigned char playerCount; // 1 byte
|
||||
bool isReadyToJoin; // 1 byte
|
||||
unsigned char playerCount; // 1 uint8_t
|
||||
bool isReadyToJoin; // 1 uint8_t
|
||||
|
||||
_GameSessionData()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ bool SQRNetworkPlayer::HasSmallIdConfirmed()
|
|||
return ( m_flags & SNP_FLAG_SMALLID_CONFIRMED );
|
||||
}
|
||||
|
||||
// To confirm to the host that we are ready, send a single byte with our small id.
|
||||
// To confirm to the host that we are ready, send a single uint8_t with our small id.
|
||||
void SQRNetworkPlayer::ConfirmReady()
|
||||
{
|
||||
SendInternal(&m_ISD, sizeof(InitSendData), e_flag_AckNotRequested);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "TutorialTask.h"
|
||||
|
||||
// A tutorial task that requires each of the task to be completed in order until the last one is complete.
|
||||
// A tutorial task that requirements each of the task to be completed in order until the last one is complete.
|
||||
// If an earlier task that was complete is now not complete then it's hint should be shown.
|
||||
class ProcedureCompoundTask : public TutorialTask
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1309,7 +1309,7 @@ bool IUIScene_CreativeMenu::overrideTooltips(ESceneSection sectionUnderPointer,
|
|||
return _override;
|
||||
}
|
||||
|
||||
void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *list, byte type, int color, int sulphur, bool flicker, bool trail, int fadeColor/*= -1*/)
|
||||
void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *list, uint8_t type, int color, int sulphur, bool flicker, bool trail, int fadeColor/*= -1*/)
|
||||
{
|
||||
/////////////////////////////////
|
||||
// Create firecharge
|
||||
|
|
@ -1370,7 +1370,7 @@ void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *lis
|
|||
expTags->add(expTag);
|
||||
|
||||
fireTag->put(FireworksItem::TAG_EXPLOSIONS, expTags);
|
||||
fireTag->putByte(FireworksItem::TAG_FLIGHT, (byte) sulphur);
|
||||
fireTag->putByte(FireworksItem::TAG_FLIGHT, (uint8_t) sulphur);
|
||||
|
||||
itemTag->put(FireworksItem::TAG_FIREWORKS, fireTag);
|
||||
|
||||
|
|
|
|||
|
|
@ -137,5 +137,5 @@ protected:
|
|||
EToolTipItem &buttonBack
|
||||
);
|
||||
|
||||
static void BuildFirework(vector<shared_ptr<ItemInstance> > *list, byte type, int color, int sulphur, bool flicker, bool trail, int fadeColor = -1);
|
||||
static void BuildFirework(vector<shared_ptr<ItemInstance> > *list, uint8_t type, int color, int sulphur, bool flicker, bool trail, int fadeColor = -1);
|
||||
};
|
||||
|
|
@ -608,7 +608,7 @@ void UIController::loadSkins()
|
|||
IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinName)
|
||||
{
|
||||
IggyLibrary lib = IGGY_INVALID_LIBRARY;
|
||||
// 4J Stu - We need to load the platformskin before the normal skin, as the normal skin requires some elements from the platform skin
|
||||
// 4J Stu - We need to load the platformskin before the normal skin, as the normal skin requirements some elements from the platform skin
|
||||
if(!skinPath.empty() && app.hasArchiveFile(skinPath))
|
||||
{
|
||||
byteArray baFile = app.getArchiveFile(skinPath);
|
||||
|
|
@ -967,7 +967,7 @@ void UIController::handleInput()
|
|||
}
|
||||
|
||||
#ifdef __PSVITA__
|
||||
//CD - Vita requires key press 40 - select [MINECRAFT_ACTION_GAME_INFO]
|
||||
//CD - Vita requirements key press 40 - select [MINECRAFT_ACTION_GAME_INFO]
|
||||
handleKeyPress(iPad, MINECRAFT_ACTION_GAME_INFO);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1942,7 +1942,7 @@ size_t UIController::RegisterForCallbackId(UIScene *scene)
|
|||
{
|
||||
EnterCriticalSection(&m_registeredCallbackScenesCS);
|
||||
size_t newId = GetTickCount();
|
||||
newId &= 0xFFFFFF; // Chop off the top byte, we don't need any more accuracy than that
|
||||
newId &= 0xFFFFFF; // Chop off the top uint8_t, we don't need any more accuracy than that
|
||||
newId |= (scene->getSceneType() << 24); // Add in the scene's type to help keep this unique
|
||||
m_registeredCallbackScenes[newId] = scene;
|
||||
LeaveCriticalSection(&m_registeredCallbackScenesCS);
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ void UIScene_CraftingMenu::handleTimerComplete(int id)
|
|||
{
|
||||
if(id == GAME_CRAFTING_TOUCHUPDATE_TIMER_ID)
|
||||
{
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requires further iggy calls
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requirements further iggy calls
|
||||
GetMainPanel()->UpdateControl();
|
||||
ui.TouchBoxRebuild(this);
|
||||
killTimer(GAME_CRAFTING_TOUCHUPDATE_TIMER_ID);
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
|||
void UIScene_CreateWorldMenu::handleTimerComplete(int id)
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requires further iggy calls
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requirements further iggy calls
|
||||
if(m_bRebuildTouchBoxes)
|
||||
{
|
||||
GetMainPanel()->UpdateControl();
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void UIScene_CreativeMenu::handleTimerComplete(int id)
|
|||
{
|
||||
if(id == GAME_CREATIVE_TOUCHUPDATE_TIMER_ID)
|
||||
{
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requires further iggy calls
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requirements further iggy calls
|
||||
GetMainPanel()->UpdateControl();
|
||||
ui.TouchBoxRebuild(this);
|
||||
killTimer(GAME_CREATIVE_TOUCHUPDATE_TIMER_ID);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ private:
|
|||
|
||||
typedef struct _PlayerInfo
|
||||
{
|
||||
byte m_smallId;
|
||||
uint8_t m_smallId;
|
||||
char m_voiceStatus;
|
||||
short m_colorState;
|
||||
wstring m_name;
|
||||
|
|
|
|||
|
|
@ -968,7 +968,7 @@ void UIScene_LoadMenu::handleTouchBoxRebuild()
|
|||
void UIScene_LoadMenu::handleTimerComplete(int id)
|
||||
{
|
||||
#ifdef __PSVITA__
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requires further iggy calls
|
||||
// we cannot rebuild touch boxes in an iggy callback because it requirements further iggy calls
|
||||
if(m_bRebuildTouchBoxes)
|
||||
{
|
||||
GetMainPanel()->UpdateControl();
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ static wstring ReadLevelNameFromSaveFile(const wstring& filePath)
|
|||
if (off >= 12 && off + len <= saveSize && len > 0 && len < 4 * 1024 * 1024)
|
||||
{
|
||||
byteArray ba;
|
||||
ba.data = (byte*)(saveData + off);
|
||||
ba.data = (uint8_t*)(saveData + off);
|
||||
ba.length = len;
|
||||
CompoundTag *root = NbtIo::decompress(ba);
|
||||
if (root != NULL)
|
||||
|
|
@ -1051,7 +1051,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
|
|||
m_pSaveDetails=StorageManager.ReturnSavesInfo();
|
||||
if(m_pSaveDetails==NULL)
|
||||
{
|
||||
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
|
||||
C4JStorage::ESaveGameState eSGIStatus = StorageManager.GetSavesInfo(m_iPad, NULL, this, const_cast<char *>("save")); // needs to be casted as we dont have the library the function derives from as part of the build
|
||||
}
|
||||
|
||||
#if TO_BE_IMPLEMENTED
|
||||
|
|
@ -2852,7 +2852,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
|
|||
case eSaveTransfer_CreateDummyFile:
|
||||
{
|
||||
StorageManager.ResetSaveData();
|
||||
byte *compData = (byte *)StorageManager.AllocateSaveData( app.getRemoteStorage()->getSaveFilesize() );
|
||||
uint8_t *compData = (uint8_t *)StorageManager.AllocateSaveData( app.getRemoteStorage()->getSaveFilesize() );
|
||||
// Make our next save default to the name of the level
|
||||
const char* pNameUTF8 = app.getRemoteStorage()->getSaveNameUTF8();
|
||||
mbstowcs(wSaveName, pNameUTF8, strlen(pNameUTF8)+1); // plus null
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
//#define SKIN_SELECT_PACK_PLAYER_CUSTOM 1
|
||||
#define SKIN_SELECT_MAX_DEFAULTS 2
|
||||
|
||||
WCHAR *UIScene_SkinSelectMenu::wchDefaultNamesA[]=
|
||||
{
|
||||
const WCHAR *UIScene_SkinSelectMenu::wchDefaultNamesA[] =
|
||||
{
|
||||
L"USE LOCALISED VERSION", // Server selected
|
||||
L"Steve",
|
||||
L"Tennis Steve",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
class UIScene_SkinSelectMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
static WCHAR *wchDefaultNamesA[eDefaultSkins_Count];
|
||||
static const WCHAR *wchDefaultNamesA[eDefaultSkins_Count];
|
||||
|
||||
// 4J Stu - How many to show on each side of the main control
|
||||
static const BYTE sidePreviewControls = 4;
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa
|
|||
}
|
||||
else
|
||||
{
|
||||
// This is called from a storage manager thread... need to set up thread storage for IntCache as CreateGame requires this to search for a suitable seed if we haven't set a seed.
|
||||
// This is called from a storage manager thread... need to set up thread storage for IntCache as CreateGame requirements this to search for a suitable seed if we haven't set a seed.
|
||||
IntCache::CreateNewThreadStorage();
|
||||
CreateGame(pScene, 0);
|
||||
IntCache::ReleaseThreadStorage();
|
||||
|
|
@ -791,7 +791,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
|
|||
}
|
||||
else
|
||||
{
|
||||
// This is called from a storage manager thread... need to set up thread storage for IntCache as CreateGame requires this to search for a suitable seed if we haven't set a seed.
|
||||
// This is called from a storage manager thread... need to set up thread storage for IntCache as CreateGame requirements this to search for a suitable seed if we haven't set a seed.
|
||||
IntCache::CreateNewThreadStorage();
|
||||
CreateGame(pClass, 0);
|
||||
IntCache::ReleaseThreadStorage();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ uLong ZEXPORT adler32(adler, buf, len)
|
|||
sum2 = (adler >> 16) & 0xffff;
|
||||
adler &= 0xffff;
|
||||
|
||||
/* in case user likes doing a byte at a time, keep it fast */
|
||||
/* in case user likes doing a uint8_t at a time, keep it fast */
|
||||
if (len == 1) {
|
||||
adler += buf[0];
|
||||
if (adler >= BASE)
|
||||
|
|
@ -100,7 +100,7 @@ uLong ZEXPORT adler32(adler, buf, len)
|
|||
return adler | (sum2 << 16);
|
||||
}
|
||||
|
||||
/* do length NMAX blocks -- requires just one modulo operation */
|
||||
/* do length NMAX blocks -- requirements just one modulo operation */
|
||||
while (len >= NMAX) {
|
||||
len -= NMAX;
|
||||
n = NMAX / 16; /* NMAX is divisible by 16 */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
/* ===========================================================================
|
||||
Compresses the source buffer into the destination buffer. The level
|
||||
parameter has the same meaning as in deflateInit. sourceLen is the byte
|
||||
parameter has the same meaning as in deflateInit. sourceLen is the uint8_t
|
||||
length of the source buffer. Upon entry, destLen is the total size of the
|
||||
destination buffer, which must be at least 0.1% larger than sourceLen plus
|
||||
12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ local void make_crc_table OF((void));
|
|||
local void write_table OF((FILE *, const z_crc_t FAR *));
|
||||
#endif /* MAKECRCH */
|
||||
/*
|
||||
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
|
||||
Generate tables for a uint8_t-wise 32-bit CRC calculation on the polynomial:
|
||||
x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
|
||||
|
||||
Polynomials over GF(2) are represented in binary, one bit per coefficient,
|
||||
with the lowest powers in the most significant bit. Then adding polynomials
|
||||
is just exclusive-or, and multiplying a polynomial by x is a right shift by
|
||||
one. If we call the above polynomial p, and represent a byte as the
|
||||
one. If we call the above polynomial p, and represent a uint8_t as the
|
||||
polynomial q, also with the lowest power in the most significant bit (so the
|
||||
byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
|
||||
uint8_t 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
|
||||
where a mod b means the remainder after dividing a by b.
|
||||
|
||||
This calculation is done using the shift-register method of multiplying and
|
||||
|
|
@ -82,7 +82,7 @@ local void make_crc_table OF((void));
|
|||
q and repeat for all eight bits of q.
|
||||
|
||||
The first table is simply the CRC of all possible eight bit values. This is
|
||||
all the information needed to generate CRCs on data a byte at a time for all
|
||||
all the information needed to generate CRCs on data a uint8_t at a time for all
|
||||
combinations of CRC register values and incoming bytes. The remaining tables
|
||||
allow for word-at-a-time CRC calculation for both big-endian and little-
|
||||
endian machines, where a word is four bytes.
|
||||
|
|
@ -117,7 +117,7 @@ local void make_crc_table()
|
|||
|
||||
#ifdef BYFOUR
|
||||
/* generate crc for each value followed by one, two, and three zeros,
|
||||
and then the byte reversal of those as well as the first table */
|
||||
and then the uint8_t reversal of those as well as the first table */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = crc_table[0][n];
|
||||
crc_table[4][n] = ZSWAP32(c);
|
||||
|
|
@ -179,7 +179,7 @@ local void write_table(out, table)
|
|||
|
||||
#else /* !DYNAMIC_CRC_TABLE */
|
||||
/* ========================================================================
|
||||
* Tables of CRC-32s of all single-byte values, made by make_crc_table().
|
||||
* Tables of CRC-32s of all single-uint8_t values, made by make_crc_table().
|
||||
*/
|
||||
#include "crc32.h"
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
|
|
@ -381,7 +381,7 @@ local uLong crc32_combine_(crc1, crc2, len2)
|
|||
gf2_matrix_square(odd, even);
|
||||
|
||||
/* apply len2 zeros to crc1 (first square will put the operator for one
|
||||
zero byte, eight zero bits, in even) */
|
||||
zero uint8_t, eight zero bits, in even) */
|
||||
do {
|
||||
/* apply zeros operator for this bit of len2 */
|
||||
gf2_matrix_square(even, odd);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ local const config configuration_table[10] = {
|
|||
/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
|
||||
#endif
|
||||
|
||||
/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
|
||||
/* Note: the deflate() code requirements max_lazy >= MIN_MATCH and max_chain >= 4
|
||||
* For deflate_fast() (levels <= 3) good is ignored and lazy has a different
|
||||
* meaning.
|
||||
*/
|
||||
|
|
@ -159,7 +159,7 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
|
|||
#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
|
||||
|
||||
/* ===========================================================================
|
||||
* Update a hash value with the given input byte
|
||||
* Update a hash value with the given input uint8_t
|
||||
* IN assertion: all calls to to UPDATE_HASH are made with consecutive
|
||||
* input characters, so that a running hash key can be computed from the
|
||||
* previous key instead of complete recalculation each time.
|
||||
|
|
@ -273,7 +273,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
|||
strategy < 0 || strategy > Z_FIXED) {
|
||||
return Z_STREAM_ERROR;
|
||||
}
|
||||
if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
|
||||
if (windowBits == 8) windowBits = 9; /* until 256-uint8_t window bug fixed */
|
||||
s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
|
||||
if (s == Z_NULL) return Z_MEM_ERROR;
|
||||
strm->state = (struct internal_state FAR *)s;
|
||||
|
|
@ -1383,7 +1383,7 @@ local void check_match(s, start, match, length)
|
|||
*
|
||||
* IN assertion: lookahead < MIN_LOOKAHEAD
|
||||
* OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
|
||||
* At least one byte has been read, or avail_in == 0; reads are
|
||||
* At least one uint8_t has been read, or avail_in == 0; reads are
|
||||
* performed for at least two bytes (required for the zip translate_eol
|
||||
* option -- not supported here).
|
||||
*/
|
||||
|
|
@ -1407,7 +1407,7 @@ local void fill_window(s)
|
|||
|
||||
} else if (more == (unsigned)(-1)) {
|
||||
/* Very unlikely, but possible on 16 bit machine if
|
||||
* strstart == 0 && lookahead == 1 (input done a byte at time)
|
||||
* strstart == 0 && lookahead == 1 (input done a uint8_t at time)
|
||||
*/
|
||||
more--;
|
||||
}
|
||||
|
|
@ -1566,7 +1566,7 @@ local block_state deflate_stored(s, flush)
|
|||
int flush;
|
||||
{
|
||||
/* Stored blocks are limited to 0xffff bytes, pending_buf is limited
|
||||
* to pending_buf_size, and each stored block has a 5 byte header:
|
||||
* to pending_buf_size, and each stored block has a 5 uint8_t header:
|
||||
*/
|
||||
ulg max_block_size = 0xffff;
|
||||
ulg max_start;
|
||||
|
|
@ -1703,7 +1703,7 @@ local block_state deflate_fast(s, flush)
|
|||
*/
|
||||
}
|
||||
} else {
|
||||
/* No match, output a literal byte */
|
||||
/* No match, output a literal uint8_t */
|
||||
Tracevv((stderr,"%c", s->window[s->strstart]));
|
||||
_tr_tally_lit (s, s->window[s->strstart], bflush);
|
||||
s->lookahead--;
|
||||
|
|
@ -1863,7 +1863,7 @@ local block_state deflate_rle(s, flush)
|
|||
int flush;
|
||||
{
|
||||
int bflush; /* set if current block must be flushed */
|
||||
uInt prev; /* byte at distance one to match */
|
||||
uInt prev; /* uint8_t at distance one to match */
|
||||
Bytef *scan, *strend; /* scan goes up to strend for length of run */
|
||||
|
||||
for (;;) {
|
||||
|
|
@ -1879,7 +1879,7 @@ local block_state deflate_rle(s, flush)
|
|||
if (s->lookahead == 0) break; /* flush the current block */
|
||||
}
|
||||
|
||||
/* See how many times the previous byte repeats */
|
||||
/* See how many times the previous uint8_t repeats */
|
||||
s->match_length = 0;
|
||||
if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
|
||||
scan = s->window + s->strstart - 1;
|
||||
|
|
@ -1909,7 +1909,7 @@ local block_state deflate_rle(s, flush)
|
|||
s->strstart += s->match_length;
|
||||
s->match_length = 0;
|
||||
} else {
|
||||
/* No match, output a literal byte */
|
||||
/* No match, output a literal uint8_t */
|
||||
Tracevv((stderr,"%c", s->window[s->strstart]));
|
||||
_tr_tally_lit (s, s->window[s->strstart], bflush);
|
||||
s->lookahead--;
|
||||
|
|
@ -1948,7 +1948,7 @@ local block_state deflate_huff(s, flush)
|
|||
}
|
||||
}
|
||||
|
||||
/* Output a literal byte */
|
||||
/* Output a literal uint8_t */
|
||||
s->match_length = 0;
|
||||
Tracevv((stderr,"%c", s->window[s->strstart]));
|
||||
_tr_tally_lit (s, s->window[s->strstart], bflush);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ typedef struct internal_state {
|
|||
int status; /* as the name implies */
|
||||
Bytef *pending_buf; /* output still pending */
|
||||
ulg pending_buf_size; /* size of pending_buf */
|
||||
Bytef *pending_out; /* next pending byte to output to the stream */
|
||||
Bytef *pending_out; /* next pending uint8_t to output to the stream */
|
||||
uInt pending; /* nb of bytes in the pending buffer */
|
||||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||
gz_headerp gzhead; /* gzip header information to write */
|
||||
|
|
@ -144,7 +144,7 @@ typedef struct internal_state {
|
|||
uInt hash_shift;
|
||||
/* 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
|
||||
* byte no longer takes part in the hash key, that is:
|
||||
* uint8_t no longer takes part in the hash key, that is:
|
||||
* hash_shift * MIN_MATCH >= hash_bits
|
||||
*/
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ typedef struct internal_state {
|
|||
|
||||
} FAR deflate_state;
|
||||
|
||||
/* Output a byte on the stream.
|
||||
/* Output a uint8_t on the stream.
|
||||
* IN assertion: there is enough room in pending_buf.
|
||||
*/
|
||||
#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
|
||||
|
|
|
|||
|
|
@ -128,11 +128,11 @@ local int gz_look(state)
|
|||
|
||||
/* look for gzip magic bytes -- if there, do gzip decoding (note: there is
|
||||
a logical dilemma here when considering the case of a partially written
|
||||
gzip file, to wit, if a single 31 byte is written, then we cannot tell
|
||||
whether this is a single-byte file, or just a partially written gzip
|
||||
gzip file, to wit, if a single 31 uint8_t is written, then we cannot tell
|
||||
whether this is a single-uint8_t file, or just a partially written gzip
|
||||
file -- for here we assume that if a gzip file is being written, then
|
||||
the header will be written in a single operation, so that reading a
|
||||
single byte is sufficient indication that it is not a gzip file) */
|
||||
single uint8_t is sufficient indication that it is not a gzip file) */
|
||||
if (strm->avail_in > 1 &&
|
||||
strm->next_in[0] == 31 && strm->next_in[1] == 139) {
|
||||
inflateReset(strm);
|
||||
|
|
@ -447,7 +447,7 @@ int ZEXPORT gzungetc(c, file)
|
|||
if (c < 0)
|
||||
return -1;
|
||||
|
||||
/* if output buffer empty, put byte at end (allows more pushing) */
|
||||
/* if output buffer empty, put uint8_t at end (allows more pushing) */
|
||||
if (state->x.have == 0) {
|
||||
state->x.have = 1;
|
||||
state->x.next = state->out + (state->size << 1) - 1;
|
||||
|
|
@ -463,7 +463,7 @@ int ZEXPORT gzungetc(c, file)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* slide output data if needed and insert byte before existing data */
|
||||
/* slide output data if needed and insert uint8_t before existing data */
|
||||
if (state->x.next == state->out) {
|
||||
unsigned char *src = state->out + state->x.have;
|
||||
unsigned char *dest = state->out + (state->size << 1);
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ struct inflate_state FAR *state;
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
/* Get a byte of input into the bit accumulator, or return from inflateBack()
|
||||
/* Get a uint8_t of input into the bit accumulator, or return from inflateBack()
|
||||
with an error if there is no input available. */
|
||||
#define PULLBYTE() \
|
||||
do { \
|
||||
|
|
@ -197,7 +197,7 @@ struct inflate_state FAR *state;
|
|||
bits -= (unsigned)(n); \
|
||||
} while (0)
|
||||
|
||||
/* Remove zero to seven bits as needed to go to a byte boundary */
|
||||
/* Remove zero to seven bits as needed to go to a uint8_t boundary */
|
||||
#define BYTEBITS() \
|
||||
do { \
|
||||
hold >>= bits & 7; \
|
||||
|
|
@ -325,7 +325,7 @@ void FAR *out_desc;
|
|||
|
||||
case STORED:
|
||||
/* get and verify stored block length */
|
||||
BYTEBITS(); /* go to byte boundary */
|
||||
BYTEBITS(); /* go to uint8_t boundary */
|
||||
NEEDBITS(32);
|
||||
if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
|
||||
strm->msg = (char *)"invalid stored block lengths";
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
- The maximum bytes that a single length/distance pair can output is 258
|
||||
bytes, which is the maximum length that can be coded. inflate_fast()
|
||||
requires strm->avail_out >= 258 for each loop to avoid checking for
|
||||
requirements strm->avail_out >= 258 for each loop to avoid checking for
|
||||
output space.
|
||||
*/
|
||||
void ZLIB_INTERNAL inflate_fast(strm, start)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* - Use pointers for available input and output checking in inffast.c
|
||||
* - Remove input and output counters in inffast.c
|
||||
* - Change inffast.c entry and loop from avail_in >= 7 to >= 6
|
||||
* - Remove unnecessary second byte pull from length extra in inffast.c
|
||||
* - Remove unnecessary second uint8_t pull from length extra in inffast.c
|
||||
* - Unroll direct copy to three copies per loop in inffast.c
|
||||
*
|
||||
* 1.2.beta2 4 Dec 2002
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
* - Add comments on state->bits assertion in inffast.c
|
||||
* - Add comments on op field in inftrees.h
|
||||
* - Fix bug in reuse of allocated window after inflateReset()
|
||||
* - Remove bit fields--back to byte structure for speed
|
||||
* - Remove bit fields--back to uint8_t structure for speed
|
||||
* - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
|
||||
* - Change post-increments to pre-increments in inflate_fast(), PPC biased?
|
||||
* - Add compile time option, POSTINC, to use post-increments instead (Intel?)
|
||||
|
|
@ -484,7 +484,7 @@ unsigned copy;
|
|||
bits = 0; \
|
||||
} while (0)
|
||||
|
||||
/* Get a byte of input into the bit accumulator, or return from inflate()
|
||||
/* Get a uint8_t of input into the bit accumulator, or return from inflate()
|
||||
if there is no input available. */
|
||||
#define PULLBYTE() \
|
||||
do { \
|
||||
|
|
@ -513,7 +513,7 @@ unsigned copy;
|
|||
bits -= (unsigned)(n); \
|
||||
} while (0)
|
||||
|
||||
/* Remove zero to seven bits as needed to go to a byte boundary */
|
||||
/* Remove zero to seven bits as needed to go to a uint8_t boundary */
|
||||
#define BYTEBITS() \
|
||||
do { \
|
||||
hold >>= bits & 7; \
|
||||
|
|
@ -552,10 +552,10 @@ unsigned copy;
|
|||
gives the low n bits in the accumulator. When done, DROPBITS(n) drops
|
||||
the low n bits off the accumulator. INITBITS() clears the accumulator
|
||||
and sets the number of available bits to zero. BYTEBITS() discards just
|
||||
enough bits to put the accumulator on a byte boundary. After BYTEBITS()
|
||||
and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
|
||||
enough bits to put the accumulator on a uint8_t boundary. After BYTEBITS()
|
||||
and a NEEDBITS(8), then BITS(8) would return the next uint8_t in the stream.
|
||||
|
||||
NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
|
||||
NEEDBITS(n) uses PULLBYTE() to get an available uint8_t of input, or to return
|
||||
if there is no input available. The decoding of variable length codes uses
|
||||
PULLBYTE() directly in order to pull just enough bytes to decode the next
|
||||
code, and no more.
|
||||
|
|
@ -580,7 +580,7 @@ unsigned copy;
|
|||
|
||||
A state may also return if there is not enough output space available to
|
||||
complete that state. Those states are copying stored data, writing a
|
||||
literal byte, and copying a matching string.
|
||||
literal uint8_t, and copying a matching string.
|
||||
|
||||
When returning, a "goto inf_leave" is used to update the total counters,
|
||||
update the check value, and determine whether any progress has been made
|
||||
|
|
@ -862,7 +862,7 @@ int flush;
|
|||
DROPBITS(2);
|
||||
break;
|
||||
case STORED:
|
||||
BYTEBITS(); /* go to byte boundary */
|
||||
BYTEBITS(); /* go to uint8_t boundary */
|
||||
NEEDBITS(32);
|
||||
if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
|
||||
strm->msg = (char *)"invalid stored block lengths";
|
||||
|
|
@ -1345,7 +1345,7 @@ gz_headerp head;
|
|||
or when out of input. When called, *have is the number of pattern bytes
|
||||
found in order so far, in 0..3. On return *have is updated to the new
|
||||
state. If on return *have equals four, then the pattern was found and the
|
||||
return value is how many bytes were read including the last byte of the
|
||||
return value is how many bytes were read including the last uint8_t of the
|
||||
pattern. If *have is less than four, then the pattern has not been found
|
||||
yet and the return value is len. In the latter case, syncsearch() can be
|
||||
called again with more data and the *have state. *have is initialized to
|
||||
|
|
@ -1379,7 +1379,7 @@ z_streamp strm;
|
|||
{
|
||||
unsigned len; /* number of bytes to look at or looked at */
|
||||
unsigned long in, out; /* temporary to save total_in and total_out */
|
||||
unsigned char buf[4]; /* to restore bit buffer to byte string */
|
||||
unsigned char buf[4]; /* to restore bit buffer to uint8_t string */
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* check parameters */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
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
|
||||
the number of bits in this code or part of the code to drop off
|
||||
of the bit buffer. val is the actual byte to output in the case
|
||||
of the bit buffer. val is the actual uint8_t to output in the case
|
||||
of a literal, the base length or distance, or the offset from
|
||||
the current table to the next table. Each entry is four bytes. */
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ local void build_tree(s, desc)
|
|||
}
|
||||
}
|
||||
|
||||
/* The pkzip format requires that at least one distance code exists,
|
||||
/* The pkzip format requirements that at least one distance code exists,
|
||||
* and that at least one bit should be sent even if there is only one
|
||||
* possible code. So to avoid special checks later on we force at least
|
||||
* two codes of non zero frequency.
|
||||
|
|
@ -814,7 +814,7 @@ local int build_bl_tree(s)
|
|||
*/
|
||||
|
||||
/* Determine the number of bit length codes to send. The pkzip format
|
||||
* requires that at least 4 bit length codes be sent. (appnote.txt says
|
||||
* requirements that at least 4 bit length codes be sent. (appnote.txt says
|
||||
* 3 but the actual value used is 4.)
|
||||
*/
|
||||
for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
|
||||
|
|
@ -996,7 +996,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
|||
if (last) {
|
||||
bi_windup(s);
|
||||
#ifdef DEBUG
|
||||
s->compressed_len += 7; /* align on byte boundary */
|
||||
s->compressed_len += 7; /* align on uint8_t boundary */
|
||||
#endif
|
||||
}
|
||||
Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
|
||||
|
|
@ -1072,7 +1072,7 @@ local void compress_block(s, ltree, dtree)
|
|||
dist = s->d_buf[lx];
|
||||
lc = s->l_buf[lx++];
|
||||
if (dist == 0) {
|
||||
send_code(s, lc, ltree); /* send a literal byte */
|
||||
send_code(s, lc, ltree); /* send a literal uint8_t */
|
||||
Tracecv(isgraph(lc), (stderr," '%c' ", lc));
|
||||
} else {
|
||||
/* Here, lc is the match length - MIN_MATCH */
|
||||
|
|
@ -1181,7 +1181,7 @@ local void bi_flush(s)
|
|||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Flush the bit buffer and align the output on a byte boundary
|
||||
* Flush the bit buffer and align the output on a uint8_t boundary
|
||||
*/
|
||||
local void bi_windup(s)
|
||||
deflate_state *s;
|
||||
|
|
@ -1208,7 +1208,7 @@ local void copy_block(s, buf, len, header)
|
|||
unsigned len; /* its length */
|
||||
int header; /* true if block header must be written */
|
||||
{
|
||||
bi_windup(s); /* align on byte boundary */
|
||||
bi_windup(s); /* align on uint8_t boundary */
|
||||
|
||||
if (header) {
|
||||
put_short(s, (ush)len);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
/* ===========================================================================
|
||||
Decompresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total
|
||||
the uint8_t length of the source buffer. Upon entry, destLen is the total
|
||||
size of the destination buffer, which must be large enough to hold the
|
||||
entire uncompressed data. (The size of the uncompressed data must have
|
||||
been saved previously by the compressor and transmitted to the decompressor
|
||||
|
|
|
|||
|
|
@ -83,11 +83,11 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
|
|||
struct internal_state;
|
||||
|
||||
typedef struct z_stream_s {
|
||||
z_const Bytef *next_in; /* next input byte */
|
||||
z_const Bytef *next_in; /* next input uint8_t */
|
||||
uInt avail_in; /* number of bytes available at next_in */
|
||||
uLong total_in; /* total number of input bytes read so far */
|
||||
|
||||
Bytef *next_out; /* next output byte should be put there */
|
||||
Bytef *next_out; /* next output uint8_t should be put there */
|
||||
uInt avail_out; /* remaining free space at next_out */
|
||||
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.
|
||||
|
||||
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 byte boundary, so
|
||||
flushed to the output buffer and the output is aligned on a uint8_t boundary, so
|
||||
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
|
||||
provided before the call.) Flushing may degrade compression for some
|
||||
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
|
||||
that is three bits plus filler bits to the next byte, followed by four bytes
|
||||
that is three bits plus filler bits to the next uint8_t, followed by four bytes
|
||||
(00 00 ff ff).
|
||||
|
||||
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 byte boundary. All of the
|
||||
output buffer, but the output is not aligned to a uint8_t boundary. All of the
|
||||
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
|
||||
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.
|
||||
|
||||
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 byte boundary, and up to
|
||||
seven bits of the current block are held to be written as the next byte after
|
||||
for Z_SYNC_FLUSH, but the output is not aligned on a uint8_t boundary, and up to
|
||||
seven bits of the current block are held to be written as the next uint8_t after
|
||||
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
|
||||
the data provided so far to the compressor. It may need to wait for the next
|
||||
|
|
@ -429,10 +429,10 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
|||
|
||||
The Z_BLOCK option assists in appending to or combining deflate streams.
|
||||
Also to assist in this, on return inflate() will set strm->data_type to the
|
||||
number of unused bits in the last byte taken from strm->next_in, plus 64 if
|
||||
number of unused bits in the last uint8_t taken from strm->next_in, plus 64 if
|
||||
inflate() is currently decoding the last block in the deflate stream, plus
|
||||
128 if inflate() returned immediately after decoding an end-of-block code or
|
||||
decoding the complete header up to just before the first byte of the deflate
|
||||
decoding the complete header up to just before the first uint8_t of the deflate
|
||||
stream. The end-of-block will not be indicated until all of the uncompressed
|
||||
data from that block has been written to strm->next_out. The number of
|
||||
unused bits may in general be greater than seven, except when bit 7 of
|
||||
|
|
@ -588,7 +588,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
|||
const Bytef *dictionary,
|
||||
uInt dictLength));
|
||||
/*
|
||||
Initializes the compression dictionary from the given byte sequence
|
||||
Initializes the compression dictionary from the given uint8_t sequence
|
||||
without producing any compressed output. When using the zlib format, this
|
||||
function must be called immediately after deflateInit, deflateInit2 or
|
||||
deflateReset, and before any call of deflate. When doing raw deflate, this
|
||||
|
|
@ -599,7 +599,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
|||
compressor and decompressor must use exactly the same dictionary (see
|
||||
inflateSetDictionary).
|
||||
|
||||
The dictionary should consist of strings (byte sequences) that are likely
|
||||
The dictionary should consist of strings (uint8_t sequences) that are likely
|
||||
to be encountered later in the data to be compressed, with the most commonly
|
||||
used strings preferably put towards the end of the dictionary. Using a
|
||||
dictionary is most useful when the data to be compressed is short and can be
|
||||
|
|
@ -718,7 +718,7 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
|
|||
been generated, but not yet provided in the available output. The bytes not
|
||||
provided would be due to the available output space having being consumed.
|
||||
The number of bits of output not provided are between 0 and 7, where they
|
||||
await more bits to join them in order to fill out a full byte. If pending
|
||||
await more bits to join them in order to fill out a full uint8_t. If pending
|
||||
or bits are Z_NULL, then those values are not set.
|
||||
|
||||
deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
|
|
@ -752,7 +752,7 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
|
|||
in the provided gz_header structure are written to the gzip header (xflag is
|
||||
ignored -- the extra flags are set according to the compression level). The
|
||||
caller must assure that, if not Z_NULL, name and comment are terminated with
|
||||
a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
|
||||
a zero uint8_t, and that if extra is not Z_NULL, that extra_len bytes are
|
||||
available there. If hcrc is true, a gzip header crc is included. Note that
|
||||
the current versions of the command-line version of gzip (up through version
|
||||
1.3.x) do not support header crc's, and will report that it is a "multi-part
|
||||
|
|
@ -820,7 +820,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
|||
const Bytef *dictionary,
|
||||
uInt dictLength));
|
||||
/*
|
||||
Initializes the decompression dictionary from the given uncompressed byte
|
||||
Initializes the decompression dictionary from the given uncompressed uint8_t
|
||||
sequence. This function must be called immediately after a call of inflate,
|
||||
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
|
||||
can be determined from the adler32 value returned by that call of inflate.
|
||||
|
|
@ -917,7 +917,7 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
|
|||
/*
|
||||
This function inserts bits in the inflate input stream. The intent is
|
||||
that this function is used to start inflating at a bit position in the
|
||||
middle of a byte. The provided bits will be used before any bytes are used
|
||||
middle of a uint8_t. The provided bits will be used before any bytes are used
|
||||
from next_in. This function should only be used with raw inflate, and
|
||||
should be used before the first inflate() call after inflateInit2() or
|
||||
inflateReset(). bits must be less than or equal to 16, and that many of the
|
||||
|
|
@ -1011,7 +1011,7 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
|
|||
logarithm of the window size, in the range 8..15. window is a caller
|
||||
supplied buffer of that size. Except for special applications where it is
|
||||
assured that deflate was used with small window sizes, windowBits must be 15
|
||||
and a 32K byte window must be supplied to be able to decompress general
|
||||
and a 32K uint8_t window must be supplied to be able to decompress general
|
||||
deflate streams.
|
||||
|
||||
See inflateBack() for the usage of these routines.
|
||||
|
|
@ -1161,7 +1161,7 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
|
|||
const Bytef *source, uLong sourceLen));
|
||||
/*
|
||||
Compresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total size
|
||||
the uint8_t length of the source buffer. Upon entry, destLen is the total size
|
||||
of the destination buffer, which must be at least the value returned by
|
||||
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
||||
compressed buffer.
|
||||
|
|
@ -1176,7 +1176,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
|
|||
int level));
|
||||
/*
|
||||
Compresses the source buffer into the destination buffer. The level
|
||||
parameter has the same meaning as in deflateInit. sourceLen is the byte
|
||||
parameter has the same meaning as in deflateInit. sourceLen is the uint8_t
|
||||
length of the source buffer. Upon entry, destLen is the total size of the
|
||||
destination buffer, which must be at least the value returned by
|
||||
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
||||
|
|
@ -1198,7 +1198,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
|||
const Bytef *source, uLong sourceLen));
|
||||
/*
|
||||
Decompresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total size
|
||||
the uint8_t length of the source buffer. Upon entry, destLen is the total size
|
||||
of the destination buffer, which must be large enough to hold the entire
|
||||
uncompressed data. (The size of the uncompressed data must have been saved
|
||||
previously by the compressor and transmitted to the decompressor by some
|
||||
|
|
@ -1252,7 +1252,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
|||
gzopen can be used to read a file which is not in gzip format; in this
|
||||
case gzread will directly read from the file without decompression. When
|
||||
reading, this will be detected automatically by looking for the magic two-
|
||||
byte gzip header.
|
||||
uint8_t gzip header.
|
||||
|
||||
gzopen returns NULL if the file could not be opened, if there was
|
||||
insufficient memory to allocate the gzFile state, or if an invalid mode was
|
||||
|
|
@ -1390,7 +1390,7 @@ ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
|
|||
|
||||
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
||||
/*
|
||||
Reads one byte from the compressed file. gzgetc returns this byte or -1
|
||||
Reads one uint8_t from the compressed file. gzgetc returns this uint8_t or -1
|
||||
in case of end of file or error. This is implemented as a macro for speed.
|
||||
As such, it does not do all of the checking the other functions do. I.e.
|
||||
it does not check to see if file is NULL, nor whether the structure file
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
class Chunk;
|
||||
class Mob;
|
||||
|
||||
class DirtyChunkSorter : public std::binary_function<const Chunk *,const Chunk *,bool>
|
||||
class DirtyChunkSorter
|
||||
{
|
||||
private:
|
||||
shared_ptr<LivingEntity> cameraEntity;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
class Entity;
|
||||
class Chunk;
|
||||
|
||||
class DistanceChunkSorter : public std::binary_function<const Chunk *,const Chunk *,bool>
|
||||
class DistanceChunkSorter
|
||||
{
|
||||
private:
|
||||
double ix, iy, iz;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
// Vertex data handling
|
||||
typedef enum
|
||||
{
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1, // Position 3 x float, texture 2 x float, colour 4 x byte, normal 4 x byte, padding 1 DWORD
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1, // Position 3 x float, texture 2 x float, colour 4 x uint8_t, normal 4 x uint8_t, padding 1 DWORD
|
||||
VERTEX_TYPE_COMPRESSED, // Compressed format - see comment at top of VS_PS3_TS2_CS1.hlsl for description of layout
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1_LIT, // as VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1 with lighting applied,
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1_TEXGEN, // as VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1 with tex gen
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ typedef ID3D11DeviceContext ID3D1XContext;
|
|||
typedef F32 ViewCoord;
|
||||
typedef gdraw_d3d11_resourcetype gdraw_resourcetype;
|
||||
|
||||
static void report_d3d_error(HRESULT hr, char *call, char *context);
|
||||
static void report_d3d_error(HRESULT hr, const char *call, const char *context);
|
||||
|
||||
static void *map_buffer(ID3D1XContext *ctx, ID3D11Buffer *buf, bool discard)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ static void safe_release(T *&p)
|
|||
}
|
||||
}
|
||||
|
||||
static void report_d3d_error(HRESULT hr, char *call, char *context)
|
||||
static void report_d3d_error(HRESULT hr, const char *call, const char *context)
|
||||
{
|
||||
if (hr == E_OUTOFMEMORY)
|
||||
IggyGDrawSendWarning(NULL, "GDraw D3D out of memory in %s%s", call, context);
|
||||
|
|
@ -478,7 +478,7 @@ static GDrawTexture * RADLINK gdraw_MakeTextureEnd(GDraw_MakeTexture_ProcessingI
|
|||
D3D1X_(SUBRESOURCE_DATA) mipdata[24];
|
||||
S32 i, w, h, nmips, bpp;
|
||||
HRESULT hr = S_OK;
|
||||
char *failed_call;
|
||||
const char *failed_call;
|
||||
U8 *ptr;
|
||||
|
||||
// generate mip maps and set up descriptors for them
|
||||
|
|
@ -700,7 +700,7 @@ static void RADLINK gdraw_DescribeVertexBuffer(GDrawVertexBuffer *vbuf, GDraw_Ve
|
|||
|
||||
static GDrawHandle *get_color_rendertarget(GDrawStats *stats)
|
||||
{
|
||||
char *failed_call;
|
||||
const char *failed_call;
|
||||
|
||||
// try to recycle LRU rendertarget
|
||||
GDrawHandle *t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets);
|
||||
|
|
@ -762,7 +762,7 @@ static GDrawHandle *get_color_rendertarget(GDrawStats *stats)
|
|||
static ID3D1X(DepthStencilView) *get_rendertarget_depthbuffer(GDrawStats *stats)
|
||||
{
|
||||
if (!gdraw->depth_buffer[1]) {
|
||||
char *failed_call;
|
||||
const char *failed_call;
|
||||
assert(!gdraw->rt_depth_buffer);
|
||||
|
||||
D3D1X_(TEXTURE2D_DESC) desc = { gdraw->frametex_width, gdraw->frametex_height, 1, 1, DXGI_FORMAT_D24_UNORM_S8_UINT, { 1, 0 },
|
||||
|
|
@ -2114,13 +2114,13 @@ static bool alloc_dynbuffer(U32 size)
|
|||
//
|
||||
// 1. filled polygons. these are triangulated simple polygons and thus have
|
||||
// roughly as many triangles as they have vertices. they use either 8- or
|
||||
// 16-byte vertex formats; this makes a worst case of 6 bytes of indices
|
||||
// 16-uint8_t vertex formats; this makes a worst case of 6 bytes of indices
|
||||
// for every 8 bytes of vertex data.
|
||||
// 2. strokes and edge antialiasing. they use a 16-byte vertex format and
|
||||
// 2. strokes and edge antialiasing. they use a 16-uint8_t vertex format and
|
||||
// worst-case write a "double quadstrip" which has 4 triangles for every
|
||||
// 3 vertices, which means 24 bytes of index data for every 48 bytes
|
||||
// of vertex data.
|
||||
// 3. textured quads. they use a 16-byte vertex format, have exactly 2
|
||||
// 3. textured quads. they use a 16-uint8_t vertex format, have exactly 2
|
||||
// triangles for every 4 vertices, and use either a static index buffer
|
||||
// (quad_ib) or a single triangle strip, so for our purposes they need no
|
||||
// space to store indices at all.
|
||||
|
|
@ -2379,9 +2379,8 @@ static S32 num_pixels(S32 w, S32 h, S32 mipmaps)
|
|||
return pixels;
|
||||
}
|
||||
|
||||
GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file, S32 /*len*/, IggyFileTextureRaw *texture)
|
||||
{
|
||||
char *failed_call="";
|
||||
GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file, S32 /*len*/, IggyFileTextureRaw *texture){
|
||||
const char *failed_call = "";
|
||||
U8 *free_data = 0;
|
||||
GDrawTexture *t=0;
|
||||
S32 width, height, mipmaps, size, blk;
|
||||
|
|
@ -2399,8 +2398,8 @@ GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file,
|
|||
mipmaps = texture->mipmaps;
|
||||
blk = 1;
|
||||
|
||||
D3D1X_(TEXTURE2D_DESC) desc = { width, height, mipmaps, 1, DXGI_FORMAT_UNKNOWN, { 1, 0 },
|
||||
D3D1X_(USAGE_IMMUTABLE), D3D1X_(BIND_SHADER_RESOURCE), 0, 0 };
|
||||
D3D1X_(TEXTURE2D_DESC) desc = { static_cast<U32>(width), static_cast<U32>(height), static_cast<U32>(mipmaps), 1U, DXGI_FORMAT_UNKNOWN, { 1, 0 },
|
||||
D3D1X_(USAGE_IMMUTABLE), D3D1X_(BIND_SHADER_RESOURCE), 0U, 0U };
|
||||
|
||||
switch (texture->format) {
|
||||
case IFT_FORMAT_rgba_8888 : size= 4; d3dfmt = DXGI_FORMAT_R8G8B8A8_UNORM; break;
|
||||
|
|
@ -2409,7 +2408,7 @@ GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file,
|
|||
case IFT_FORMAT_DXT5 : size=16; d3dfmt = DXGI_FORMAT_BC3_UNORM; blk = 4; break;
|
||||
default: {
|
||||
IggyGDrawSendWarning(NULL, "GDraw .iggytex raw texture format %d not supported by hardware", texture->format);
|
||||
goto done;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2425,7 +2424,7 @@ GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file,
|
|||
free_data = (U8 *) IggyGDrawMalloc(total_size);
|
||||
if (!free_data) {
|
||||
IggyGDrawSendWarning(NULL, "GDraw out of memory to store texture data to pass to D3D for %d x %d texture", width, height);
|
||||
goto done;
|
||||
return 0;
|
||||
}
|
||||
|
||||
U8 *cur = free_data;
|
||||
|
|
@ -2454,21 +2453,23 @@ GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file,
|
|||
|
||||
failed_call = "CreateTexture2D";
|
||||
hr = gdraw->d3d_device->CreateTexture2D(&desc, mipdata, &tex);
|
||||
if (FAILED(hr)) goto done;
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
failed_call = "CreateShaderResourceView for texture creation";
|
||||
hr = gdraw->d3d_device->CreateShaderResourceView(tex, NULL, &view);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
t = gdraw_D3D1X_(WrappedTextureCreate)(view);
|
||||
}
|
||||
}
|
||||
|
||||
failed_call = "CreateShaderResourceView for texture creation";
|
||||
hr = gdraw->d3d_device->CreateShaderResourceView(tex, NULL, &view);
|
||||
if (FAILED(hr)) goto done;
|
||||
|
||||
t = gdraw_D3D1X_(WrappedTextureCreate)(view);
|
||||
|
||||
done:
|
||||
if (FAILED(hr)) {
|
||||
report_d3d_error(hr, failed_call, "");
|
||||
}
|
||||
|
||||
if (free_data)
|
||||
if (free_data) {
|
||||
IggyGDrawFree(free_data);
|
||||
}
|
||||
|
||||
if (!t) {
|
||||
if (view)
|
||||
|
|
@ -2478,6 +2479,7 @@ done:
|
|||
} else {
|
||||
((GDrawHandle *) t)->handle.tex.d3d = tex;
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ typedef struct GDrawRenderState
|
|||
U8 stencil_test; // Only draw if these stencil bits are "set"
|
||||
U8 stencil_set; // "Set" these stencil bits (note that actual implementation initializes stencil to 1, and "set" makes them 0)
|
||||
|
||||
U8 reserved[2]; // Currently unused (used to make padding to 4/8-byte boundary for following pointer explicit)
|
||||
U8 reserved[2]; // Currently unused (used to make padding to 4/8-uint8_t boundary for following pointer explicit)
|
||||
S32 blur_passes; // For filters that include blurring, this is the number of box filter passes to run
|
||||
//align 0 mod 8
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ IDOC typedef void RADLINK gdraw_draw_indexed_triangles(GDrawRenderState *r, GDra
|
|||
IDOC typedef void RADLINK gdraw_set_antialias_texture(S32 width, U8 *rgba);
|
||||
/* Specifies the 1D texture data to be used for the antialiasing gradients.
|
||||
|
||||
'rgba' specifies the pixel values in rgba byte order. This will only be called
|
||||
'rgba' specifies the pixel values in rgba uint8_t order. This will only be called
|
||||
once during initialization. */
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
@ -383,7 +383,7 @@ IDOC typedef void RADLINK gdraw_set_antialias_texture(S32 width, U8 *rgba);
|
|||
IDOC typedef enum gdraw_texture_format
|
||||
{
|
||||
// Platform-independent formats
|
||||
GDRAW_TEXTURE_FORMAT_rgba32, // 32bpp RGBA data in platform-preferred byte order (returned by $gdraw_make_texture_begin as $gdraw_texture_type)
|
||||
GDRAW_TEXTURE_FORMAT_rgba32, // 32bpp RGBA data in platform-preferred uint8_t order (returned by $gdraw_make_texture_begin as $gdraw_texture_type)
|
||||
GDRAW_TEXTURE_FORMAT_font, // Alpha-only data with at least 4 bits/pixel. Data is submitted as 8 bits/pixel, conversion (if necessary) done by GDraw.
|
||||
|
||||
// First platform-specific format index (for reference)
|
||||
|
|
@ -718,7 +718,7 @@ IDOC struct GDrawFunctions
|
|||
to dynamically configure which of RAD's supplied drawing layers
|
||||
you wish to use, or to integrate it directly into your own
|
||||
renderer by implementing your own versions of the drawing
|
||||
functions Iggy requires.
|
||||
functions Iggy requirements.
|
||||
*/
|
||||
|
||||
RADDEFEND
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ typedef struct IggyAllocator
|
|||
Iggy_AllocateFunction *mem_alloc;
|
||||
Iggy_DeallocateFunction *mem_free;
|
||||
#ifndef __RAD64__
|
||||
void *struct_padding; // pad to 8-byte boundary
|
||||
void *struct_padding; // pad to 8-uint8_t boundary
|
||||
#endif
|
||||
} IggyAllocator;
|
||||
|
||||
|
|
|
|||
|
|
@ -386,8 +386,8 @@ void DurangoStatsDebugger::retrieveStats(int iPad)
|
|||
|
||||
// ----------------------------------------- //
|
||||
|
||||
byte runningThreads = 0;
|
||||
byte *r_runningThreads = &runningThreads;
|
||||
uint8_t runningThreads = 0;
|
||||
uint8_t *r_runningThreads = &runningThreads;
|
||||
|
||||
if (xuid.toString().compare(L"") == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ RADDEFSTART
|
|||
#define MAX_LOCK_CHAN (16-1) // Max channel available for locking
|
||||
#define PERCUSS_CHAN (10-1) // Percussion channel (no locking)
|
||||
|
||||
#define AIL_MAX_FILE_HEADER_SIZE 8192 // AIL_set_named_sample_file() requires at least 8K
|
||||
#define AIL_MAX_FILE_HEADER_SIZE 8192 // AIL_set_named_sample_file() requirements at least 8K
|
||||
// of data or the entire file image, whichever is less,
|
||||
// to determine sample format
|
||||
#define DIG_F_16BITS_MASK 1
|
||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
|||
{
|
||||
void const *start; // Sample buffer address (W)
|
||||
U32 len; // Sample buffer size in bytes (W)
|
||||
U32 pos; // Index to next byte (R/W)
|
||||
U32 pos; // Index to next uint8_t (R/W)
|
||||
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_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||
|
|
@ -4872,7 +4872,7 @@ typedef struct
|
|||
U8 *ID3v1; // ID3v1 tag, if not NULL (always 128 bytes long if present)
|
||||
|
||||
U8 *start_MP3_data; // Pointer to start of data area in file (not necessarily first valid frame)
|
||||
U8 *end_MP3_data; // Pointer to last valid byte in MP3 data area (before ID3v1 tag, if any)
|
||||
U8 *end_MP3_data; // Pointer to last valid uint8_t in MP3 data area (before ID3v1 tag, if any)
|
||||
|
||||
//
|
||||
// Information about current frame being inspected, valid if AIL_enumerate_MP3_frames() returns
|
||||
|
|
@ -4959,7 +4959,7 @@ typedef struct
|
|||
S32 Ogg_image_size; // Originally passed to AIL_inspect_Ogg()
|
||||
|
||||
U8 *start_Ogg_data; // Pointer to start of data area in file
|
||||
U8 *end_Ogg_data; // Pointer to last valid byte in data area
|
||||
U8 *end_Ogg_data; // Pointer to last valid uint8_t in data area
|
||||
|
||||
// Information lifted from the header after AIL_inspect_Ogg() is called.
|
||||
S32 channel_count;
|
||||
|
|
@ -4970,7 +4970,7 @@ typedef struct
|
|||
// TRUE
|
||||
//
|
||||
|
||||
S32 page_num; // 32-bit page sequence number from OggS header at byte offset 16
|
||||
S32 page_num; // 32-bit page sequence number from OggS header at uint8_t offset 16
|
||||
|
||||
S32 sample_count; // Total # of samples already generated by encoder at the time the current page was written
|
||||
|
||||
|
|
@ -5005,7 +5005,7 @@ typedef struct
|
|||
|
||||
const char* current_frame;
|
||||
|
||||
// output data - byte offset for current frame.
|
||||
// output data - uint8_t offset for current frame.
|
||||
S32 byte_offset;
|
||||
} BINKA_INFO;
|
||||
|
||||
|
|
@ -5756,7 +5756,7 @@ EXPTYPE typedef struct _MILESBANKSOUNDINFO
|
|||
$:ChannelCount The number of channels the sound assets contains.
|
||||
$:ChannelMask The channel mask for the sound asset.
|
||||
$:Rate The sample rate for the sound asset.
|
||||
$:DataLen The byte count the asset requires if fully loaded.
|
||||
$:DataLen The uint8_t count the asset requirements if fully loaded.
|
||||
$:SoundLimit The maximum number of instances of this sound that is allowed to play at once.
|
||||
$:IsExternal Nonzero if the sound is stored external to the sound bank. See the eventexternal sample.
|
||||
$:DurationMs The length of the sound asset, in milliseconds.
|
||||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
@ -5801,13 +5801,13 @@ DXDEC EXPAPI SINTa AILCALL AIL_get_marker_list(HMSOUNDBANK bank, char const* sou
|
|||
|
||||
DXDEC EXPAPI S32 AILCALL AIL_find_marker_in_list(SINTa marker_list, char const * marker_name, S32* is_samples);
|
||||
/*
|
||||
Returns the byte offset into a sample corresponding to the given marker name.
|
||||
Returns the uint8_t offset into a sample corresponding to the given marker name.
|
||||
|
||||
$:marker_list The marker list returned from $AIL_get_marker_list.
|
||||
$:marker_name The name of the marker to look up.
|
||||
$:is_samples returns whether the marker is at a sample location instead of a byte location.
|
||||
$:is_samples returns whether the marker is at a sample location instead of a uint8_t location.
|
||||
|
||||
$:return -1 if the marker was not found, or the byte offset of the marker.
|
||||
$:return -1 if the marker was not found, or the uint8_t offset of the marker.
|
||||
|
||||
Looks up an offset to use in functions such as $AIL_set_sample_position. marker_list can be retrieved with
|
||||
$AIL_get_marker_list.
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ void ChatIntegrationLayer::OnOutgoingChatPacketReady(
|
|||
__in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args
|
||||
)
|
||||
{
|
||||
byte *bytes;
|
||||
uint8_t *bytes;
|
||||
int byteCount;
|
||||
|
||||
GetBufferBytes(args->PacketBuffer, &bytes);
|
||||
|
|
@ -300,7 +300,7 @@ void ChatIntegrationLayer::OnOutgoingChatPacketReady(
|
|||
|
||||
void ChatIntegrationLayer::OnIncomingChatMessage(
|
||||
unsigned int sessionAddress,
|
||||
Platform::Array<byte>^ message
|
||||
Platform::Array<uint8_t>^ message
|
||||
)
|
||||
{
|
||||
// To integrate the Chat DLL in your game, change the following code to use your game's network layer.
|
||||
|
|
@ -312,10 +312,10 @@ void ChatIntegrationLayer::OnIncomingChatMessage(
|
|||
// What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session.
|
||||
// A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it.
|
||||
|
||||
// This is how you would convert from byte array to a IBuffer^
|
||||
// This is how you would convert from uint8_t array to a IBuffer^
|
||||
//
|
||||
// Windows::Storage::Streams::IBuffer^ destBuffer = ref new Windows::Storage::Streams::Buffer( sourceByteBufferSize );
|
||||
// byte* destBufferBytes = nullptr;
|
||||
// uint8_t* destBufferBytes = nullptr;
|
||||
// GetBufferBytes( destBuffer, &destBufferBytes );
|
||||
// errno_t err = memcpy_s( destBufferBytes, destBuffer->Capacity, sourceByteBuffer, sourceByteBufferSize );
|
||||
// THROW_HR_IF(err != 0, E_FAIL);
|
||||
|
|
@ -782,7 +782,7 @@ void ChatIntegrationLayer::ToggleRenderTargetVolume()
|
|||
}
|
||||
|
||||
|
||||
void ChatIntegrationLayer::GetBufferBytes( __in Windows::Storage::Streams::IBuffer^ buffer, __out byte** ppOut )
|
||||
void ChatIntegrationLayer::GetBufferBytes( __in Windows::Storage::Streams::IBuffer^ buffer, __out uint8_t** ppOut )
|
||||
{
|
||||
if ( ppOut == nullptr || buffer == nullptr )
|
||||
{
|
||||
|
|
@ -797,7 +797,7 @@ void ChatIntegrationLayer::GetBufferBytes( __in Windows::Storage::Streams::IBuff
|
|||
srcBufferByteAccess->Buffer(ppOut);
|
||||
}
|
||||
|
||||
Windows::Storage::Streams::IBuffer^ ChatIntegrationLayer::ArrayToBuffer( __in Platform::Array<byte>^ array )
|
||||
Windows::Storage::Streams::IBuffer^ ChatIntegrationLayer::ArrayToBuffer( __in Platform::Array<uint8_t>^ array )
|
||||
{
|
||||
Windows::Storage::Streams::DataWriter^ writer = ref new Windows::Storage::Streams::DataWriter();
|
||||
writer->WriteBytes(array);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public:
|
|||
/// <param name="uniqueRemoteConsoleIdentifier">A unique ID for the remote console</param>
|
||||
void OnIncomingChatMessage(
|
||||
unsigned int sessionAddress,
|
||||
Platform::Array<byte>^ message
|
||||
Platform::Array<uint8_t>^ message
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -216,8 +216,8 @@ public:
|
|||
void ToggleRenderTargetVolume();
|
||||
|
||||
private:
|
||||
void GetBufferBytes( __in Windows::Storage::Streams::IBuffer^ buffer, __out byte** ppOut );
|
||||
Windows::Storage::Streams::IBuffer^ ArrayToBuffer( __in Platform::Array<byte>^ array );
|
||||
void GetBufferBytes( __in Windows::Storage::Streams::IBuffer^ buffer, __out uint8_t** ppOut );
|
||||
Windows::Storage::Streams::IBuffer^ ArrayToBuffer( __in Platform::Array<uint8_t>^ array );
|
||||
|
||||
Concurrency::critical_section m_lock;
|
||||
Microsoft::Xbox::GameChat::ChatManager^ m_chatManager;
|
||||
|
|
|
|||
|
|
@ -714,8 +714,8 @@ bool DQRNetworkManager::IsHost()
|
|||
}
|
||||
|
||||
// Consider as "in session" from the moment that a game is created or joined, until the point where the game itself has been told via state change that we are now idle. The
|
||||
// game code requires IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
|
||||
// it also requires that it is informed of the state changes leading up to not being in the session, before this should report false.
|
||||
// game code requirements IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
|
||||
// it also requirements that it is informed of the state changes leading up to not being in the session, before this should report false.
|
||||
bool DQRNetworkManager::IsInSession()
|
||||
{
|
||||
return m_isInSession;
|
||||
|
|
@ -1639,8 +1639,8 @@ void DQRNetworkManager::SendRoomSyncInfo()
|
|||
|
||||
EnterCriticalSection(&m_csRoomSyncData);
|
||||
// Calculate the size of data we are going to be sending. This is composed of:
|
||||
// (1) 2 byte general header
|
||||
// (2) A single byte internal data tag
|
||||
// (1) 2 uint8_t general header
|
||||
// (2) A single uint8_t internal data tag
|
||||
// (3) An unsigned int encoding the size of the combined size of all the strings in stage (5)
|
||||
// (4) The RoomSyncData structure itself
|
||||
// (5) A wchar NULL terminated string for every active player to encode the XUID
|
||||
|
|
@ -1660,7 +1660,7 @@ void DQRNetworkManager::SendRoomSyncInfo()
|
|||
uint32_t sizeLow = internalBytes & 0xff;
|
||||
|
||||
data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
|
||||
data[1] = sizeLow; // Data following has the a single byte to say what it is, followed by the room sync data itself
|
||||
data[1] = sizeLow; // Data following has the a single uint8_t to say what it is, followed by the room sync data itself
|
||||
data[2] = DQR_INTERNAL_PLAYER_TABLE;
|
||||
|
||||
memcpy(data + 3, &xuidBytes, 4);
|
||||
|
|
@ -1686,8 +1686,8 @@ void DQRNetworkManager::SendAddPlayerFailed(Platform::String^ xuid)
|
|||
if( m_isOfflineGame ) return;
|
||||
|
||||
// Calculate the size of data we are going to be sending. This is composed of:
|
||||
// (1) 2 byte general header
|
||||
// (2) A single byte internal data tag
|
||||
// (1) 2 uint8_t general header
|
||||
// (2) A single uint8_t internal data tag
|
||||
// (3) An unsigned int encoding the size size of the string
|
||||
// (5) A wchar NULL terminated string storing the xuid of the player which has failed to join
|
||||
|
||||
|
|
@ -1702,7 +1702,7 @@ void DQRNetworkManager::SendAddPlayerFailed(Platform::String^ xuid)
|
|||
uint32_t sizeLow = internalBytes & 0xff;
|
||||
|
||||
data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
|
||||
data[1] = sizeLow; // Data following has the a single byte to say what it is, followed by the room sync data itself
|
||||
data[1] = sizeLow; // Data following has the a single uint8_t to say what it is, followed by the room sync data itself
|
||||
data[2] = DQR_INTERNAL_ADD_PLAYER_FAILED;
|
||||
|
||||
memcpy(data + 3, &xuidBytes, 4);
|
||||
|
|
@ -1779,7 +1779,7 @@ void DQRNetworkManager::SendUnassignSmallId(int playerIndex)
|
|||
LogCommentFormat( L"SendUnassignSmallId, channel %d\n", playerIndex);
|
||||
// Send data with small Id setting mode - see full comment in DQRNetworkManagerEventHandlers::DataReceivedHandler
|
||||
BYTE data[4];
|
||||
data[0] = 0x80 | ( playerIndex << 5 ); // Send 1 byte, internal mode
|
||||
data[0] = 0x80 | ( playerIndex << 5 ); // Send 1 uint8_t, internal mode
|
||||
data[1] = 1;
|
||||
data[2] = DQR_INTERNAL_UNASSIGN_SMALL_ID; // Internal data type
|
||||
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
|||
|
||||
do
|
||||
{
|
||||
BYTE byte = *pNextByte;
|
||||
BYTE uint8_t = *pNextByte;
|
||||
switch( connectionInfo->m_internalDataState )
|
||||
{
|
||||
case DQRConnectionInfo::ConnectionState_InternalHeaderByte:
|
||||
switch( byte )
|
||||
switch( uint8_t )
|
||||
{
|
||||
case DQR_INTERNAL_ASSIGN_SMALL_IDS:
|
||||
connectionInfo->m_internalDataState = DQRConnectionInfo::ConnectionState_InternalAssignSmallIdMask;
|
||||
|
|
@ -93,14 +93,14 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
|||
pNextByte++;
|
||||
break;
|
||||
case DQRConnectionInfo::ConnectionState_InternalAssignSmallIdMask:
|
||||
// Up to 4 smallIds are assigned at once, with the ones that are being assigned dictated by a mask byte which is passed in first.
|
||||
// Up to 4 smallIds are assigned at once, with the ones that are being assigned dictated by a mask uint8_t which is passed in first.
|
||||
// The small Ids themselves follow, always 4 bytes, and any that are masked as being assigned are processed, the other bytes ignored.
|
||||
// In order work around a bug with the networking library, this particular packet (being the first this that is sent from a client)
|
||||
// is at first sent unreliably, with retries, until a message is received back to the client, or it times out. We therefore have to be able
|
||||
// to handle (and ignore) this being received more than once
|
||||
DQRNetworkManager::LogCommentFormat(L"Small Ids being received");
|
||||
connectionInfo->m_smallIdReadMask = byte;
|
||||
// Create a uniquely allocated byte to which names have been resolved, as another one of these packets could be received whilst that asyncronous process is going o n
|
||||
connectionInfo->m_smallIdReadMask = uint8_t;
|
||||
// Create a uniquely allocated uint8_t to which names have been resolved, as another one of these packets could be received whilst that asyncronous process is going o n
|
||||
connectionInfo->m_pucsmallIdReadMaskResolved = new unsigned char;
|
||||
*connectionInfo->m_pucsmallIdReadMaskResolved = 0;
|
||||
connectionInfo->m_internalDataState = DQRConnectionInfo::ConnectionState_InternalAssignSmallId0;
|
||||
|
|
@ -123,20 +123,20 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
|||
// We therefore have to be able to handle (and ignore) this being received more than once - hence the check of the bool above.
|
||||
// At this point, the connection is considered properly active from the point of view of the host.
|
||||
|
||||
int sessionIndex = GetSessionIndexForSmallId(byte);
|
||||
int sessionIndex = GetSessionIndexForSmallId(uint8_t);
|
||||
if( sessionIndex != -1 )
|
||||
{
|
||||
connectionInfo->m_channelActive[channel] = true;
|
||||
connectionInfo->m_smallId[channel] = byte;
|
||||
connectionInfo->m_smallId[channel] = uint8_t;
|
||||
|
||||
m_sessionAddressFromSmallId[byte] = sessionAddress;
|
||||
m_channelFromSmallId[byte] = channel;
|
||||
m_sessionAddressFromSmallId[uint8_t] = sessionAddress;
|
||||
m_channelFromSmallId[uint8_t] = channel;
|
||||
|
||||
auto pAsyncOp = m_primaryUserXboxLiveContext->ProfileService->GetUserProfileAsync(m_multiplayerSession->Members->GetAt(sessionIndex)->XboxUserId);
|
||||
DQRNetworkManager::LogCommentFormat(L"Session index of %d found for player with small id %d - attempting to resolve display name\n",sessionIndex,byte);
|
||||
DQRNetworkManager::LogCommentFormat(L"Session index of %d found for player with small id %d - attempting to resolve display name\n",sessionIndex,uint8_t);
|
||||
|
||||
DQRNetworkPlayer *pPlayer = new DQRNetworkPlayer(this, DQRNetworkPlayer::DNP_TYPE_REMOTE, true, 0, sessionAddress);
|
||||
pPlayer->SetSmallId(byte);
|
||||
pPlayer->SetSmallId(uint8_t);
|
||||
pPlayer->SetUID(PlayerUID(m_multiplayerSession->Members->GetAt(sessionIndex)->XboxUserId->Data()));
|
||||
|
||||
HostGamertagResolveDetails *resolveDetails = new HostGamertagResolveDetails();
|
||||
|
|
@ -208,11 +208,11 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
|||
pNextByte++;
|
||||
break;
|
||||
case DQRConnectionInfo::ConnectionState_InternalRoomSyncData:
|
||||
connectionInfo->m_pucRoomSyncData[connectionInfo->m_roomSyncDataBytesRead++] = byte;
|
||||
// The room sync info is sent as a 4 byte count of the length of XUID strings, then the RoomSyncData, then the XUID strings
|
||||
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
|
||||
if( connectionInfo->m_roomSyncDataBytesToRead == 0 )
|
||||
{
|
||||
// At first stage of reading the 4 byte count
|
||||
// At first stage of reading the 4 uint8_t count
|
||||
if( connectionInfo->m_roomSyncDataBytesRead == 4 )
|
||||
{
|
||||
memcpy( &connectionInfo->m_roomSyncDataBytesToRead, connectionInfo->m_pucRoomSyncData, 4);
|
||||
|
|
@ -289,11 +289,11 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo,
|
|||
pNextByte++;
|
||||
break;
|
||||
case DQRConnectionInfo::ConnectionState_InternalAddPlayerFailedData:
|
||||
connectionInfo->m_pucAddFailedPlayerData[connectionInfo->m_addFailedPlayerDataBytesRead++] = byte;
|
||||
// The failed player info is sent as a 4 byte count of the length of XUID string, then the string itself
|
||||
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
|
||||
if( connectionInfo->m_addFailedPlayerDataBytesToRead == 0 )
|
||||
{
|
||||
// At first stage of reading the 4 byte count
|
||||
// At first stage of reading the 4 uint8_t count
|
||||
if( connectionInfo->m_addFailedPlayerDataBytesRead == 4 )
|
||||
{
|
||||
memcpy( &connectionInfo->m_addFailedPlayerDataBytesToRead, connectionInfo->m_pucAddFailedPlayerData, 4);
|
||||
|
|
|
|||
|
|
@ -281,24 +281,24 @@ void DQRNetworkManager::Process_RTS_MESSAGE_DATA_RECEIVED(RTS_Message &message)
|
|||
BYTE *pEndByte = pNextByte + message.m_dataSize;
|
||||
do
|
||||
{
|
||||
BYTE byte = *pNextByte;
|
||||
BYTE uint8_t = *pNextByte;
|
||||
switch( connectionInfo->m_state )
|
||||
{
|
||||
case DQRConnectionInfo::ConnectionState_HeaderByte0:
|
||||
connectionInfo->m_currentChannel = ( byte >> 5 ) & 3;
|
||||
connectionInfo->m_internalFlag = ( ( byte & 0x80 ) == 0x80 );
|
||||
connectionInfo->m_currentChannel = ( uint8_t >> 5 ) & 3;
|
||||
connectionInfo->m_internalFlag = ( ( uint8_t & 0x80 ) == 0x80 );
|
||||
|
||||
// Byte transfer mode. Bits 0-4 of this byte represent the upper 5 bits of our count of bytes to transfer... lower 8-bits will follow
|
||||
connectionInfo->m_bytesRemaining = ((int)( byte & 0x1f )) << 8;
|
||||
// Byte transfer mode. Bits 0-4 of this uint8_t represent the upper 5 bits of our count of bytes to transfer... lower 8-bits will follow
|
||||
connectionInfo->m_bytesRemaining = ((int)( uint8_t & 0x1f )) << 8;
|
||||
connectionInfo->m_state = DQRConnectionInfo::ConnectionState_HeaderByte1;
|
||||
connectionInfo->m_internalDataState = DQRConnectionInfo::ConnectionState_InternalHeaderByte;
|
||||
pNextByte++;
|
||||
break;
|
||||
case DQRConnectionInfo::ConnectionState_HeaderByte1:
|
||||
// Add in the lower 8 bits of our byte count, the upper 5 were obtained from the first header byte.
|
||||
connectionInfo->m_bytesRemaining |= byte;
|
||||
// Add in the lower 8 bits of our uint8_t count, the upper 5 were obtained from the first header uint8_t.
|
||||
connectionInfo->m_bytesRemaining |= uint8_t;
|
||||
|
||||
// If there isn't any data following, then just go back to the initial state expecting another header byte.
|
||||
// If there isn't any data following, then just go back to the initial state expecting another header uint8_t.
|
||||
if( connectionInfo->m_bytesRemaining == 0 )
|
||||
{
|
||||
connectionInfo->m_state = DQRConnectionInfo::ConnectionState_HeaderByte0;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ private:
|
|||
static size_t s_currentConfigSize;
|
||||
|
||||
static size_t s_dataWrittenSize;
|
||||
static byte *s_dataWritten;
|
||||
static uint8_t *s_dataWritten;
|
||||
|
||||
public:
|
||||
static void Tick();
|
||||
|
|
|
|||
|
|
@ -225,5 +225,5 @@ enum ETelemetryChallenges
|
|||
eTelemetryTutorial_TradingMenu,
|
||||
eTelemetryTutorial_Enderchest,
|
||||
|
||||
// Sent over network as a byte
|
||||
// Sent over network as a uint8_t
|
||||
};
|
||||
|
|
@ -69,10 +69,10 @@ void XShowAchievementsUI(int i) {}
|
|||
DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; }
|
||||
|
||||
#ifndef _DURANGO
|
||||
void PIXAddNamedCounter(int a, char* b, ...) {}
|
||||
void PIXAddNamedCounter(int a, const char* b, ...) {}
|
||||
//#define PS3_USE_PIX_EVENTS
|
||||
//#define PS4_USE_PIX_EVENTS
|
||||
void PIXBeginNamedEvent(int a, char* b, ...)
|
||||
void PIXBeginNamedEvent(int a, const char *b, ...)
|
||||
{
|
||||
#ifdef PS4_USE_PIX_EVENTS
|
||||
char buf[512];
|
||||
|
|
@ -125,7 +125,7 @@ void PIXEndNamedEvent()
|
|||
PixDepth -= 1;
|
||||
#endif
|
||||
}
|
||||
void PIXSetMarkerDeprecated(int a, char* b, ...) {}
|
||||
void PIXSetMarkerDeprecated(int a, const char* b, ...) {}
|
||||
#else
|
||||
// 4J Stu - Removed this implementation in favour of a macro that will convert our string format
|
||||
// conversion at compile time rather than at runtime
|
||||
|
|
@ -524,8 +524,8 @@ void C_4JProfile::Initialise(DWORD dwTitleID,
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
profileData[i] = new byte[iGameDefinedDataSizeX4 / 4];
|
||||
ZeroMemory(profileData[i], sizeof(byte) * iGameDefinedDataSizeX4 / 4);
|
||||
profileData[i] = new uint8_t[iGameDefinedDataSizeX4 / 4];
|
||||
ZeroMemory(profileData[i], sizeof(uint8_t) * iGameDefinedDataSizeX4 / 4);
|
||||
|
||||
// Set some sane initial values!
|
||||
GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)profileData[i];
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ C4JThread* GameRenderer::m_updateThread;
|
|||
C4JThread::EventArray* GameRenderer::m_updateEvents;
|
||||
bool GameRenderer::nearThingsToDo = false;
|
||||
bool GameRenderer::updateRunning = false;
|
||||
vector<byte *> GameRenderer::m_deleteStackByte;
|
||||
vector<uint8_t *> GameRenderer::m_deleteStackByte;
|
||||
vector<SparseLightStorage *> GameRenderer::m_deleteStackSparseLightStorage;
|
||||
vector<CompressedTileStorage *> GameRenderer::m_deleteStackCompressedTileStorage;
|
||||
vector<SparseDataStorage *> GameRenderer::m_deleteStackSparseDataStorage;
|
||||
|
|
@ -1205,7 +1205,7 @@ void GameRenderer::renderLevel(float a)
|
|||
|
||||
#ifdef MULTITHREAD_ENABLE
|
||||
// Request that an item be deleted, when it is safe to do so
|
||||
void GameRenderer::AddForDelete(byte *deleteThis)
|
||||
void GameRenderer::AddForDelete(uint8_t *deleteThis)
|
||||
{
|
||||
EnterCriticalSection(&m_csDeleteStack);
|
||||
m_deleteStackByte.push_back(deleteThis);
|
||||
|
|
@ -1987,9 +1987,9 @@ void GameRenderer::setupClearColor(float a)
|
|||
float clearness = EnchantmentHelper::getOxygenBonus(player) * 0.2f;
|
||||
|
||||
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Water_Clear_Colour );
|
||||
byte redComponent = ((colour>>16)&0xFF);
|
||||
byte greenComponent = ((colour>>8)&0xFF);
|
||||
byte blueComponent = ((colour)&0xFF);
|
||||
uint8_t redComponent = ((colour>>16)&0xFF);
|
||||
uint8_t greenComponent = ((colour>>8)&0xFF);
|
||||
uint8_t blueComponent = ((colour)&0xFF);
|
||||
|
||||
fr = (float)redComponent/256 + clearness;//0.02f;
|
||||
fg = (float)greenComponent/256 + clearness;//0.02f;
|
||||
|
|
@ -1998,9 +1998,9 @@ void GameRenderer::setupClearColor(float a)
|
|||
else if (t != 0 && Tile::tiles[t]->material == Material::lava)
|
||||
{
|
||||
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Lava_Clear_Colour );
|
||||
byte redComponent = ((colour>>16)&0xFF);
|
||||
byte greenComponent = ((colour>>8)&0xFF);
|
||||
byte blueComponent = ((colour)&0xFF);
|
||||
uint8_t redComponent = ((colour>>16)&0xFF);
|
||||
uint8_t greenComponent = ((colour>>8)&0xFF);
|
||||
uint8_t blueComponent = ((colour)&0xFF);
|
||||
|
||||
fr = (float)redComponent/256;//0.6f;
|
||||
fg = (float)greenComponent/256;//0.1f;
|
||||
|
|
|
|||
|
|
@ -178,12 +178,12 @@ public:
|
|||
static bool nearThingsToDo;
|
||||
static bool updateRunning;
|
||||
#endif
|
||||
static vector<byte *> m_deleteStackByte;
|
||||
static vector<uint8_t *> m_deleteStackByte;
|
||||
static vector<SparseLightStorage *> m_deleteStackSparseLightStorage;
|
||||
static vector<CompressedTileStorage *> m_deleteStackCompressedTileStorage;
|
||||
static vector<SparseDataStorage *> m_deleteStackSparseDataStorage;
|
||||
static CRITICAL_SECTION m_csDeleteStack;
|
||||
static void AddForDelete(byte *deleteThis);
|
||||
static void AddForDelete(uint8_t *deleteThis);
|
||||
static void AddForDelete(SparseLightStorage *deleteThis);
|
||||
static void AddForDelete(CompressedTileStorage *deleteThis);
|
||||
static void AddForDelete(SparseDataStorage *deleteThis);
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ public:
|
|||
void setGlobalChunkFlag(int index, unsigned char flag, unsigned char shift = 0);
|
||||
void clearGlobalChunkFlag(int x, int y, int z, Level *level, unsigned char flag, unsigned char shift = 0);
|
||||
|
||||
// Get/set whole byte of flags
|
||||
// Get/set whole uint8_t of flags
|
||||
unsigned char getGlobalChunkFlags(int x, int y, int z, Level *level);
|
||||
void setGlobalChunkFlags(int x, int y, int z, Level *level, unsigned char flags);
|
||||
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@
|
|||
<SccProvider>SAK</SccProvider>
|
||||
<Keyword>Xbox360Proj</Keyword>
|
||||
<ApplicationEnvironment>title</ApplicationEnvironment>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'" Label="Configuration">
|
||||
|
|
@ -288,65 +289,65 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Xbox 360'" Label="Configuration">
|
||||
|
|
@ -422,97 +423,97 @@
|
|||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|ARM64EC'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugContentPackage|Durango'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
|
|
@ -1567,6 +1568,8 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
|||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ShowIncludes>false</ShowIncludes>
|
||||
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<LanguageStandard_C>stdclatest</LanguageStandard_C>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ Minecraft::Minecraft(Component *mouseComponent, Canvas *parent, MinecraftApplet
|
|||
|
||||
this->parent = parent;
|
||||
// 4J - Our actual physical frame buffer is always 1280x720 ie in a 16:9 ratio. If we want to do a 4:3 mode, we are telling the original minecraft code
|
||||
// that the width is 3/4 what it actually is, to correctly present a 4:3 image. Have added width_phys and height_phys for any code we add that requires
|
||||
// that the width is 3/4 what it actually is, to correctly present a 4:3 image. Have added width_phys and height_phys for any code we add that requirements
|
||||
// to know the real physical dimensions of the frame buffer.
|
||||
if( RenderManager.IsWidescreen() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ Minimap::Minimap(Font *font, Options *options, Textures *textures, bool optimise
|
|||
void Minimap::reloadColours()
|
||||
{
|
||||
ColourTable *colourTable = Minecraft::GetInstance()->getColourTable();
|
||||
// 4J note that this code has been extracted pretty much as it was in Minimap::render, although with some byte order changes
|
||||
// 4J note that this code has been extracted pretty much as it was in Minimap::render, although with some uint8_t order changes
|
||||
for( int i = 0; i < (14 * 4); i++ ) // 14 material colours currently, 4 brightnesses of each
|
||||
{
|
||||
if (i / 4 == 0)
|
||||
{
|
||||
// 4J - changed byte order to save having to reorder later
|
||||
// 4J - changed uint8_t order to save having to reorder later
|
||||
#ifdef __ORBIS__
|
||||
LUT[i] = 0;
|
||||
#else
|
||||
|
|
@ -78,7 +78,7 @@ void Minimap::reloadColours()
|
|||
int g = ((color >> 8) & 0xff) * br / 255;
|
||||
int b = ((color) & 0xff) * br / 255;
|
||||
|
||||
// 4J - changed byte order to save having to reorder later
|
||||
// 4J - changed uint8_t order to save having to reorder later
|
||||
#if ( defined _DURANGO || defined _WIN64 || __PSVITA__ )
|
||||
LUT[i] = 255 << 24 | b << 16 | g << 8 | r;
|
||||
#elif defined _XBOX
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ LevelChunk *MultiPlayerChunkCache::create(int x, int z)
|
|||
|
||||
// 4J - changed to use new methods for lighting
|
||||
chunk->setSkyLightDataAllBright();
|
||||
// Arrays::fill(chunk->skyLight->data, (byte) 255);
|
||||
// Arrays::fill(chunk->skyLight->data, (uint8_t) 255);
|
||||
}
|
||||
|
||||
chunk->loaded = true;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
// Vertex data handling
|
||||
typedef enum
|
||||
{
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1, // Position 3 x float, texture 2 x float, colour 4 x byte, normal 4 x byte, padding 1 DWORD
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1, // Position 3 x float, texture 2 x float, colour 4 x uint8_t, normal 4 x uint8_t, padding 1 DWORD
|
||||
VERTEX_TYPE_COMPRESSED, // Compressed format - see comment at top of VS_PS3_TS2_CS1.hlsl for description of layout
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1_LIT, // as VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1 with lighting applied,
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1_TEXGEN, // as VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1 with tex gen
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ struct ShaderCode
|
|||
|
||||
struct GDraw
|
||||
{
|
||||
// 16-byte aligned!
|
||||
// 16-uint8_t aligned!
|
||||
F32 projection[4]; // always 2D scale+2D translate. first two are scale, last two are translate.
|
||||
|
||||
// scale factor converting worldspace to viewspace <0,0>..<w,h>
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ typedef struct GDrawRenderState
|
|||
U8 stencil_test; // Only draw if these stencil bits are "set"
|
||||
U8 stencil_set; // "Set" these stencil bits (note that actual implementation initializes stencil to 1, and "set" makes them 0)
|
||||
|
||||
U8 reserved[2]; // Currently unused (used to make padding to 4/8-byte boundary for following pointer explicit)
|
||||
U8 reserved[2]; // Currently unused (used to make padding to 4/8-uint8_t boundary for following pointer explicit)
|
||||
S32 blur_passes; // For filters that include blurring, this is the number of box filter passes to run
|
||||
//align 0 mod 8
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ IDOC typedef void RADLINK gdraw_draw_indexed_triangles(GDrawRenderState *r, GDra
|
|||
IDOC typedef void RADLINK gdraw_set_antialias_texture(S32 width, U8 *rgba);
|
||||
/* Specifies the 1D texture data to be used for the antialiasing gradients.
|
||||
|
||||
'rgba' specifies the pixel values in rgba byte order. This will only be called
|
||||
'rgba' specifies the pixel values in rgba uint8_t order. This will only be called
|
||||
once during initialization. */
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
@ -383,7 +383,7 @@ IDOC typedef void RADLINK gdraw_set_antialias_texture(S32 width, U8 *rgba);
|
|||
IDOC typedef enum gdraw_texture_format
|
||||
{
|
||||
// Platform-independent formats
|
||||
GDRAW_TEXTURE_FORMAT_rgba32, // 32bpp RGBA data in platform-preferred byte order (returned by $gdraw_make_texture_begin as $gdraw_texture_type)
|
||||
GDRAW_TEXTURE_FORMAT_rgba32, // 32bpp RGBA data in platform-preferred uint8_t order (returned by $gdraw_make_texture_begin as $gdraw_texture_type)
|
||||
GDRAW_TEXTURE_FORMAT_font, // Alpha-only data with at least 4 bits/pixel. Data is submitted as 8 bits/pixel, conversion (if necessary) done by GDraw.
|
||||
|
||||
// First platform-specific format index (for reference)
|
||||
|
|
@ -718,7 +718,7 @@ IDOC struct GDrawFunctions
|
|||
to dynamically configure which of RAD's supplied drawing layers
|
||||
you wish to use, or to integrate it directly into your own
|
||||
renderer by implementing your own versions of the drawing
|
||||
functions Iggy requires.
|
||||
functions Iggy requirements.
|
||||
*/
|
||||
|
||||
RADDEFEND
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ typedef struct IggyAllocator
|
|||
Iggy_AllocateFunction *mem_alloc;
|
||||
Iggy_DeallocateFunction *mem_free;
|
||||
#ifndef __RAD64__
|
||||
void *struct_padding; // pad to 8-byte boundary
|
||||
void *struct_padding; // pad to 8-uint8_t boundary
|
||||
#endif
|
||||
} IggyAllocator;
|
||||
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ RADDEFSTART
|
|||
#define MAX_LOCK_CHAN (16-1) // Max channel available for locking
|
||||
#define PERCUSS_CHAN (10-1) // Percussion channel (no locking)
|
||||
|
||||
#define AIL_MAX_FILE_HEADER_SIZE 8192 // AIL_set_named_sample_file() requires at least 8K
|
||||
#define AIL_MAX_FILE_HEADER_SIZE 8192 // AIL_set_named_sample_file() requirements at least 8K
|
||||
// of data or the entire file image, whichever is less,
|
||||
// to determine sample format
|
||||
#define DIG_F_16BITS_MASK 1
|
||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
|||
{
|
||||
void const *start; // Sample buffer address (W)
|
||||
U32 len; // Sample buffer size in bytes (W)
|
||||
U32 pos; // Index to next byte (R/W)
|
||||
U32 pos; // Index to next uint8_t (R/W)
|
||||
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_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||
|
|
@ -4872,7 +4872,7 @@ typedef struct
|
|||
U8 *ID3v1; // ID3v1 tag, if not NULL (always 128 bytes long if present)
|
||||
|
||||
U8 *start_MP3_data; // Pointer to start of data area in file (not necessarily first valid frame)
|
||||
U8 *end_MP3_data; // Pointer to last valid byte in MP3 data area (before ID3v1 tag, if any)
|
||||
U8 *end_MP3_data; // Pointer to last valid uint8_t in MP3 data area (before ID3v1 tag, if any)
|
||||
|
||||
//
|
||||
// Information about current frame being inspected, valid if AIL_enumerate_MP3_frames() returns
|
||||
|
|
@ -4959,7 +4959,7 @@ typedef struct
|
|||
S32 Ogg_image_size; // Originally passed to AIL_inspect_Ogg()
|
||||
|
||||
U8 *start_Ogg_data; // Pointer to start of data area in file
|
||||
U8 *end_Ogg_data; // Pointer to last valid byte in data area
|
||||
U8 *end_Ogg_data; // Pointer to last valid uint8_t in data area
|
||||
|
||||
// Information lifted from the header after AIL_inspect_Ogg() is called.
|
||||
S32 channel_count;
|
||||
|
|
@ -4970,7 +4970,7 @@ typedef struct
|
|||
// TRUE
|
||||
//
|
||||
|
||||
S32 page_num; // 32-bit page sequence number from OggS header at byte offset 16
|
||||
S32 page_num; // 32-bit page sequence number from OggS header at uint8_t offset 16
|
||||
|
||||
S32 sample_count; // Total # of samples already generated by encoder at the time the current page was written
|
||||
|
||||
|
|
@ -5005,7 +5005,7 @@ typedef struct
|
|||
|
||||
const char* current_frame;
|
||||
|
||||
// output data - byte offset for current frame.
|
||||
// output data - uint8_t offset for current frame.
|
||||
S32 byte_offset;
|
||||
} BINKA_INFO;
|
||||
|
||||
|
|
@ -5756,7 +5756,7 @@ EXPTYPE typedef struct _MILESBANKSOUNDINFO
|
|||
$:ChannelCount The number of channels the sound assets contains.
|
||||
$:ChannelMask The channel mask for the sound asset.
|
||||
$:Rate The sample rate for the sound asset.
|
||||
$:DataLen The byte count the asset requires if fully loaded.
|
||||
$:DataLen The uint8_t count the asset requirements if fully loaded.
|
||||
$:SoundLimit The maximum number of instances of this sound that is allowed to play at once.
|
||||
$:IsExternal Nonzero if the sound is stored external to the sound bank. See the eventexternal sample.
|
||||
$:DurationMs The length of the sound asset, in milliseconds.
|
||||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
@ -5801,13 +5801,13 @@ DXDEC EXPAPI SINTa AILCALL AIL_get_marker_list(HMSOUNDBANK bank, char const* sou
|
|||
|
||||
DXDEC EXPAPI S32 AILCALL AIL_find_marker_in_list(SINTa marker_list, char const * marker_name, S32* is_samples);
|
||||
/*
|
||||
Returns the byte offset into a sample corresponding to the given marker name.
|
||||
Returns the uint8_t offset into a sample corresponding to the given marker name.
|
||||
|
||||
$:marker_list The marker list returned from $AIL_get_marker_list.
|
||||
$:marker_name The name of the marker to look up.
|
||||
$:is_samples returns whether the marker is at a sample location instead of a byte location.
|
||||
$:is_samples returns whether the marker is at a sample location instead of a uint8_t location.
|
||||
|
||||
$:return -1 if the marker was not found, or the byte offset of the marker.
|
||||
$:return -1 if the marker was not found, or the uint8_t offset of the marker.
|
||||
|
||||
Looks up an offset to use in functions such as $AIL_set_sample_position. marker_list can be retrieved with
|
||||
$AIL_get_marker_list.
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void SQRNetworkManager_Orbis::Terminate()
|
|||
} while( m_basicEventThread->isRunning() );
|
||||
}
|
||||
|
||||
// Second stage of initialisation, that requires NP Manager to be online & the player to be signed in. This kicks of the creation of a context
|
||||
// Second stage of initialisation, that requirements NP Manager to be online & the player to be signed in. This kicks of the creation of a context
|
||||
// for Np Matching 2. Initialisation is finally complete when we get a callback to ContextCallback. The SQRNetworkManager_Orbis is then finally moved
|
||||
// into SNM_INT_STATE_IDLE at this stage.
|
||||
void SQRNetworkManager_Orbis::InitialiseAfterOnline()
|
||||
|
|
@ -944,8 +944,8 @@ bool SQRNetworkManager_Orbis::IsReadyToPlayOrIdle()
|
|||
|
||||
|
||||
// Consider as "in session" from the moment that a game is created or joined, until the point where the game itself has been told via state change that we are now idle. The
|
||||
// game code requires IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
|
||||
// it also requires that it is informed of the state changes leading up to not being in the session, before this should report false.
|
||||
// game code requirements IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
|
||||
// it also requirements that it is informed of the state changes leading up to not being in the session, before this should report false.
|
||||
bool SQRNetworkManager_Orbis::IsInSession()
|
||||
{
|
||||
return m_isInSession;
|
||||
|
|
@ -1235,7 +1235,7 @@ bool SQRNetworkManager_Orbis::AddLocalPlayerByUserIndex(int idx)
|
|||
m_roomSyncData.setPlayerCount(m_roomSyncData.getPlayerCount()+1);
|
||||
|
||||
// And do any adjusting necessary to the mappings from this room data, to the SQRNetworkPlayers.
|
||||
// This will also create the required new SQRNetworkPlayer and do all the callbacks that requires etc.
|
||||
// This will also create the required new SQRNetworkPlayer and do all the callbacks that requirements etc.
|
||||
MapRoomSlotPlayers();
|
||||
|
||||
// Sync this back out to our networked clients...
|
||||
|
|
@ -1324,7 +1324,7 @@ bool SQRNetworkManager_Orbis::RemoveLocalPlayerByUserIndex(int idx)
|
|||
memset(&m_roomSyncData.players[m_roomSyncData.getPlayerCount()],0,sizeof(PlayerSyncData));
|
||||
|
||||
// And do any adjusting necessary to the mappings from this room data, to the SQRNetworkPlayers.
|
||||
// This will also delete the SQRNetworkPlayer and do all the callbacks that requires etc.
|
||||
// This will also delete the SQRNetworkPlayer and do all the callbacks that requirements etc.
|
||||
MapRoomSlotPlayers(roomSlotPlayerCount);
|
||||
m_aRoomSlotPlayers[m_roomSyncData.getPlayerCount()] = NULL;
|
||||
|
||||
|
|
@ -2040,7 +2040,7 @@ void SQRNetworkManager_Orbis::SyncRoomData()
|
|||
sceNpMatching2SetRoomDataInternal ( m_matchingContext, &reqParam, NULL, &m_setRoomDataRequestId );
|
||||
}
|
||||
|
||||
// Check if the matching context is valid, and if not attempt to create one. If to do this requires starting an asynchronous process, then sets the internal state to the state passed in
|
||||
// Check if the matching context is valid, and if not attempt to create one. If to do this requirements starting an asynchronous process, then sets the internal state to the state passed in
|
||||
// before doing this.
|
||||
// Returns true on success.
|
||||
bool SQRNetworkManager_Orbis::GetMatchingContext(eSQRNetworkManagerInternalState asyncState)
|
||||
|
|
@ -2413,7 +2413,7 @@ void SQRNetworkManager_Orbis::DeleteServerContext()
|
|||
}
|
||||
}
|
||||
|
||||
// Creates a set of Rudp connections by the "active open" method. This requires that both ends of the connection call cellRudpInitiate to fully create a connection. We
|
||||
// Creates a set of Rudp connections by the "active open" method. This requirements that both ends of the connection call cellRudpInitiate to fully create a connection. We
|
||||
// create one connection per local play on any remote machine.
|
||||
//
|
||||
// peerMemberId is the room member Id of the remote end of the connection
|
||||
|
|
@ -2930,7 +2930,7 @@ void SQRNetworkManager_Orbis::DefaultRequestCallback(SceNpMatching2ContextId id,
|
|||
break;
|
||||
// This is the response to sceNpMatching2GetRoomMemberDataInternal.This only happens on the host, as a response to an incoming connection being established, when we
|
||||
// kick off the request for room member internal data so that we can determine what local players that remote machine is intending to bring into the game. At this point we can
|
||||
// activate the host end of each of the Rupd connection that this machine requires. We can also update our player slot data (which gets syncronised back out to other room members) at this point.
|
||||
// activate the host end of each of the Rupd connection that this machine requirements. We can also update our player slot data (which gets syncronised back out to other room members) at this point.
|
||||
case SCE_NP_MATCHING2_REQUEST_EVENT_GET_ROOM_MEMBER_DATA_INTERNAL:
|
||||
if( errorCode == 0 )
|
||||
{
|
||||
|
|
@ -3525,7 +3525,7 @@ void SQRNetworkManager_Orbis::RudpContextCallback(int ctx_id, int event_id, int
|
|||
else
|
||||
{
|
||||
unsigned int dataSize = sceRudpGetSizeReadable(ctx_id);
|
||||
// If we're the host, and this player hasn't yet had its small id confirmed, then the first byte sent to us should be this id
|
||||
// If we're the host, and this player hasn't yet had its small id confirmed, then the first uint8_t sent to us should be this id
|
||||
if( manager->m_isHosting )
|
||||
{
|
||||
SQRNetworkPlayer *playerFrom = manager->GetPlayerFromRudpCtx( ctx_id );
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ typedef unsigned int UINT;
|
|||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef long __int64;
|
||||
typedef unsigned long __uint64;
|
||||
typedef unsigned int DWORD;
|
||||
|
|
@ -61,7 +61,7 @@ typedef WCHAR *LPWSTR, *PWSTR;
|
|||
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
||||
|
||||
//
|
||||
// ANSI (Multi-byte Character) types
|
||||
// ANSI (Multi-uint8_t Character) types
|
||||
//
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *LPCH, *PCH;
|
||||
|
|
|
|||
|
|
@ -2495,7 +2495,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// No mapping for the Unicode character exists in the target multi-byte code page.
|
||||
// No mapping for the Unicode character exists in the target multi-uint8_t code page.
|
||||
//
|
||||
#define ERROR_NO_UNICODE_TRANSLATION 1113L
|
||||
|
||||
|
|
@ -2704,7 +2704,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The specified program requires a newer version of Windows.
|
||||
// The specified program requirements a newer version of Windows.
|
||||
//
|
||||
#define ERROR_OLD_WIN_VERSION 1150L
|
||||
|
||||
|
|
@ -2830,7 +2830,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The indicated device requires reinitialization due to hardware errors.
|
||||
// The indicated device requirements reinitialization due to hardware errors.
|
||||
//
|
||||
#define ERROR_DEVICE_REINITIALIZATION_NEEDED 1164L // dderror
|
||||
|
||||
|
|
@ -4940,7 +4940,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// This operation requires an interactive window station.
|
||||
// This operation requirements an interactive window station.
|
||||
//
|
||||
#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459L
|
||||
|
||||
|
|
@ -6117,7 +6117,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The byte count is too small.
|
||||
// The uint8_t count is too small.
|
||||
//
|
||||
#define RPC_X_BYTE_COUNT_TOO_SMALL 1782L
|
||||
|
||||
|
|
@ -9717,7 +9717,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// This request requires a secure connection.
|
||||
// This request requirements a secure connection.
|
||||
//
|
||||
#define ERROR_DS_CONFIDENTIALITY_REQUIRED 8237L
|
||||
|
||||
|
|
@ -11097,7 +11097,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// A root object requires a class of 'top'.
|
||||
// A root object requirements a class of 'top'.
|
||||
//
|
||||
#define ERROR_DS_ROOT_REQUIRES_CLASS_TOP 8432L
|
||||
|
||||
|
|
@ -11511,7 +11511,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation requires a directory service, and none was available.
|
||||
// The requested operation requirements a directory service, and none was available.
|
||||
//
|
||||
#define ERROR_DS_DS_REQUIRED 8478L
|
||||
|
||||
|
|
@ -11619,7 +11619,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Another operation which requires exclusive access to the PDC FSMO is already in progress.
|
||||
// Another operation which requirements exclusive access to the PDC FSMO is already in progress.
|
||||
//
|
||||
#define ERROR_DS_PDC_OPERATION_IN_PROGRESS 8490L
|
||||
|
||||
|
|
@ -12009,7 +12009,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The connection between client and server requires packet privacy or better.
|
||||
// The connection between client and server requirements packet privacy or better.
|
||||
//
|
||||
#define ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION 8533L
|
||||
|
||||
|
|
@ -12036,7 +12036,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation requires that destination domain auditing be enabled.
|
||||
// The operation requirements that destination domain auditing be enabled.
|
||||
//
|
||||
#define ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED 8536L
|
||||
|
||||
|
|
@ -12182,7 +12182,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation requires that source domain auditing be enabled.
|
||||
// The operation requirements that source domain auditing be enabled.
|
||||
//
|
||||
#define ERROR_DS_SOURCE_AUDITING_NOT_ENABLED 8552L
|
||||
|
||||
|
|
@ -12722,7 +12722,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Secondary DNS zone requires master IP address.
|
||||
// Secondary DNS zone requirements master IP address.
|
||||
//
|
||||
#define DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 9612L
|
||||
|
||||
|
|
@ -12799,7 +12799,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Primary DNS zone requires datafile.
|
||||
// Primary DNS zone requirements datafile.
|
||||
//
|
||||
#define DNS_ERROR_PRIMARY_REQUIRES_DATAFILE 9651L
|
||||
|
||||
|
|
@ -15890,7 +15890,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation requires that JIT be in the current context and it is not
|
||||
// The requested operation requirements that JIT be in the current context and it is not
|
||||
//
|
||||
#define CONTEXT_E_NOJIT _HRESULT_TYPEDEF_(0x8004E026L)
|
||||
|
||||
|
|
@ -15899,7 +15899,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation requires that the current context have a Transaction, and it does not
|
||||
// The requested operation requirements that the current context have a Transaction, and it does not
|
||||
//
|
||||
#define CONTEXT_E_NOTRANSACTION _HRESULT_TYPEDEF_(0x8004E027L)
|
||||
|
||||
|
|
@ -18864,7 +18864,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The streamed cryptographic message requires more data to complete the decode operation.
|
||||
// The streamed cryptographic message requirements more data to complete the decode operation.
|
||||
//
|
||||
#define CRYPT_E_STREAM_INSUFFICIENT_DATA _HRESULT_TYPEDEF_(0x80091011L)
|
||||
|
||||
|
|
@ -21062,7 +21062,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation requires a Smart Card, but no Smart Card is currently in the device.
|
||||
// The operation requirements a Smart Card, but no Smart Card is currently in the device.
|
||||
//
|
||||
#define SCARD_E_NO_SMARTCARD _HRESULT_TYPEDEF_(0x8010000CL)
|
||||
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ int main(int argc, const char *argv[] )
|
|||
StorageManager.SetSaveTitleExtraFileSuffix(app.GetString(IDS_SAVE_SUBTITLE_SUFFIX));
|
||||
StorageManager.SetDLCInfoMap(app.GetSonyDLCMap());
|
||||
app.CommerceInit(); // MGH - moved this here so GetCommerce isn't NULL
|
||||
// 4J-PB - Kick of the check for trial or full version - requires ui to be initialised
|
||||
// 4J-PB - Kick of the check for trial or full version - requirements ui to be initialised
|
||||
app.GetCommerce()->CheckForTrialUpgradeKey();
|
||||
|
||||
////////////////
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void ConsoleUIController::init(S32 w, S32 h)
|
|||
render targets or shadow maps.
|
||||
|
||||
The texture and vertex buffer pools contain multiple textures and
|
||||
vertex buffers. Each object requires a bit of main memory for management
|
||||
vertex buffers. Each object requirements a bit of main memory for management
|
||||
overhead. We need to specify how many object handles can be in use at
|
||||
the same time in any given pool. If Iggy runs out of GDraw handles, it
|
||||
won't crash, but instead throw out old cache data in a LRU fashion.
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ private:
|
|||
static size_t s_currentConfigSize;
|
||||
|
||||
static size_t s_dataWrittenSize;
|
||||
static byte *s_dataWritten;
|
||||
static uint8_t *s_dataWritten;
|
||||
|
||||
public:
|
||||
static void Tick();
|
||||
|
|
|
|||
|
|
@ -225,5 +225,5 @@ enum ETelemetryChallenges
|
|||
eTelemetryTutorial_TradingMenu,
|
||||
eTelemetryTutorial_Enderchest,
|
||||
|
||||
// Sent over network as a byte
|
||||
// Sent over network as a uint8_t
|
||||
};
|
||||
|
|
@ -33,7 +33,7 @@ int32_t CTSS::TssSizeCheck(size_t size)
|
|||
|
||||
if (size == 0)
|
||||
{
|
||||
printf("Tss File size is 0 byte. Maybe, data isn't set on the server.\n\n");
|
||||
printf("Tss File size is 0 uint8_t. Maybe, data isn't set on the server.\n\n");
|
||||
printf("\tThe data is set with scp. The account is generable in PS3 Developer Network.\n");
|
||||
printf("\tThere are three server environments. for development, environment for test, and product.\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
// Vertex data handling
|
||||
typedef enum
|
||||
{
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1, // Position 3 x float, texture 2 x float, colour 4 x byte, normal 4 x byte, padding 1 DWORD
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1, // Position 3 x float, texture 2 x float, colour 4 x uint8_t, normal 4 x uint8_t, padding 1 DWORD
|
||||
VERTEX_TYPE_COMPRESSED, // Compressed format - see comment at top of VS_PS3_TS2_CS1.hlsl for description of layout
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1_LIT, // as VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1 with lighting applied,
|
||||
VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1_TEXGEN, // as VERTEX_TYPE_PF3_TF2_CB4_NB4_XW1 with tex gen
|
||||
|
|
|
|||
|
|
@ -615,7 +615,7 @@ static void swizzle_subrect_32bpp_small(U8 * RADRESTRICT dest, U32 dx, U32 dy, U
|
|||
{
|
||||
// determine morton-order stepping constants
|
||||
U32 minor = RR_MIN(dw, dh);
|
||||
S64 xinc = (S32) rsx_morton_encode(-1, 0, minor) * 4; // *4 since we work with byte offsets
|
||||
S64 xinc = (S32) rsx_morton_encode(-1, 0, minor) * 4; // *4 since we work with uint8_t offsets
|
||||
S64 yinc = (S32) rsx_morton_encode(-1, 1, minor) * 4;
|
||||
|
||||
// determine start offsets along x/y axis
|
||||
|
|
@ -705,7 +705,7 @@ static void swizzle_subrect_32bpp(U8 * RADRESTRICT dest, U32 dx, U32 dy, U32 dw,
|
|||
// main part: go through image in blocks of 8x4 pixels. (8x4 since that's one full cache line,
|
||||
// so we write pixels one cache line at a time)
|
||||
minor = RR_MIN(dw, dh);
|
||||
incx = (S32) rsx_morton_encode(-8, 0, minor) * 4; // *4 since it's all byte offsets
|
||||
incx = (S32) rsx_morton_encode(-8, 0, minor) * 4; // *4 since it's all uint8_t offsets
|
||||
incy = (S32) rsx_morton_encode(-4, 1, minor) * 4;
|
||||
outx0 = rsx_morton_encode(dx0, 0, minor) * 4;
|
||||
outy = rsx_morton_encode(dy0, 1, minor) * 4;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ IDOC extern int gdraw_GCM_SetRendertargetMemory(void *ptr, S32 num_bytes, S32 wi
|
|||
|
||||
All render targets allocated by GDraw have the same size (width x height pixels) and will use the same pitch;
|
||||
thus you can pack them all into one tile region, which is recommended from a performance perspective.
|
||||
Pitch must allow for 4-byte-per-pixel rendertargets (so pitch must be at least width*4).
|
||||
Pitch must allow for 4-uint8_t-per-pixel rendertargets (so pitch must be at least width*4).
|
||||
|
||||
On other platforms, Iggy does not require you to correctly specify the width and height of the
|
||||
rendertargets; the size you specify is a hint, and GDraw will detect the actual
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ typedef struct GDrawRenderState
|
|||
U8 stencil_test; // Only draw if these stencil bits are "set"
|
||||
U8 stencil_set; // "Set" these stencil bits (note that actual implementation initializes stencil to 1, and "set" makes them 0)
|
||||
|
||||
U8 reserved[2]; // Currently unused (used to make padding to 4/8-byte boundary for following pointer explicit)
|
||||
U8 reserved[2]; // Currently unused (used to make padding to 4/8-uint8_t boundary for following pointer explicit)
|
||||
S32 blur_passes; // For filters that include blurring, this is the number of box filter passes to run
|
||||
//align 0 mod 8
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ IDOC typedef void RADLINK gdraw_draw_indexed_triangles(GDrawRenderState *r, GDra
|
|||
IDOC typedef void RADLINK gdraw_set_antialias_texture(S32 width, U8 *rgba);
|
||||
/* Specifies the 1D texture data to be used for the antialiasing gradients.
|
||||
|
||||
'rgba' specifies the pixel values in rgba byte order. This will only be called
|
||||
'rgba' specifies the pixel values in rgba uint8_t order. This will only be called
|
||||
once during initialization. */
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
@ -383,7 +383,7 @@ IDOC typedef void RADLINK gdraw_set_antialias_texture(S32 width, U8 *rgba);
|
|||
IDOC typedef enum gdraw_texture_format
|
||||
{
|
||||
// Platform-independent formats
|
||||
GDRAW_TEXTURE_FORMAT_rgba32, // 32bpp RGBA data in platform-preferred byte order (returned by $gdraw_make_texture_begin as $gdraw_texture_type)
|
||||
GDRAW_TEXTURE_FORMAT_rgba32, // 32bpp RGBA data in platform-preferred uint8_t order (returned by $gdraw_make_texture_begin as $gdraw_texture_type)
|
||||
GDRAW_TEXTURE_FORMAT_font, // Alpha-only data with at least 4 bits/pixel. Data is submitted as 8 bits/pixel, conversion (if necessary) done by GDraw.
|
||||
|
||||
// First platform-specific format index (for reference)
|
||||
|
|
@ -718,7 +718,7 @@ IDOC struct GDrawFunctions
|
|||
to dynamically configure which of RAD's supplied drawing layers
|
||||
you wish to use, or to integrate it directly into your own
|
||||
renderer by implementing your own versions of the drawing
|
||||
functions Iggy requires.
|
||||
functions Iggy requirements.
|
||||
*/
|
||||
|
||||
RADDEFEND
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ typedef struct IggyAllocator
|
|||
Iggy_AllocateFunction *mem_alloc;
|
||||
Iggy_DeallocateFunction *mem_free;
|
||||
#ifndef __RAD64__
|
||||
void *struct_padding; // pad to 8-byte boundary
|
||||
void *struct_padding; // pad to 8-uint8_t boundary
|
||||
#endif
|
||||
} IggyAllocator;
|
||||
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ RADDEFSTART
|
|||
#define MAX_LOCK_CHAN (16-1) // Max channel available for locking
|
||||
#define PERCUSS_CHAN (10-1) // Percussion channel (no locking)
|
||||
|
||||
#define AIL_MAX_FILE_HEADER_SIZE 8192 // AIL_set_named_sample_file() requires at least 8K
|
||||
#define AIL_MAX_FILE_HEADER_SIZE 8192 // AIL_set_named_sample_file() requirements at least 8K
|
||||
// of data or the entire file image, whichever is less,
|
||||
// to determine sample format
|
||||
#define DIG_F_16BITS_MASK 1
|
||||
|
|
@ -1900,7 +1900,7 @@ typedef struct _SMPBUF
|
|||
{
|
||||
void const *start; // Sample buffer address (W)
|
||||
U32 len; // Sample buffer size in bytes (W)
|
||||
U32 pos; // Index to next byte (R/W)
|
||||
U32 pos; // Index to next uint8_t (R/W)
|
||||
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_seek_pos; // New destination offset in stream source data, for ASI codecs that care
|
||||
|
|
@ -4872,7 +4872,7 @@ typedef struct
|
|||
U8 *ID3v1; // ID3v1 tag, if not NULL (always 128 bytes long if present)
|
||||
|
||||
U8 *start_MP3_data; // Pointer to start of data area in file (not necessarily first valid frame)
|
||||
U8 *end_MP3_data; // Pointer to last valid byte in MP3 data area (before ID3v1 tag, if any)
|
||||
U8 *end_MP3_data; // Pointer to last valid uint8_t in MP3 data area (before ID3v1 tag, if any)
|
||||
|
||||
//
|
||||
// Information about current frame being inspected, valid if AIL_enumerate_MP3_frames() returns
|
||||
|
|
@ -4959,7 +4959,7 @@ typedef struct
|
|||
S32 Ogg_image_size; // Originally passed to AIL_inspect_Ogg()
|
||||
|
||||
U8 *start_Ogg_data; // Pointer to start of data area in file
|
||||
U8 *end_Ogg_data; // Pointer to last valid byte in data area
|
||||
U8 *end_Ogg_data; // Pointer to last valid uint8_t in data area
|
||||
|
||||
// Information lifted from the header after AIL_inspect_Ogg() is called.
|
||||
S32 channel_count;
|
||||
|
|
@ -4970,7 +4970,7 @@ typedef struct
|
|||
// TRUE
|
||||
//
|
||||
|
||||
S32 page_num; // 32-bit page sequence number from OggS header at byte offset 16
|
||||
S32 page_num; // 32-bit page sequence number from OggS header at uint8_t offset 16
|
||||
|
||||
S32 sample_count; // Total # of samples already generated by encoder at the time the current page was written
|
||||
|
||||
|
|
@ -5005,7 +5005,7 @@ typedef struct
|
|||
|
||||
const char* current_frame;
|
||||
|
||||
// output data - byte offset for current frame.
|
||||
// output data - uint8_t offset for current frame.
|
||||
S32 byte_offset;
|
||||
} BINKA_INFO;
|
||||
|
||||
|
|
@ -5756,7 +5756,7 @@ EXPTYPE typedef struct _MILESBANKSOUNDINFO
|
|||
$:ChannelCount The number of channels the sound assets contains.
|
||||
$:ChannelMask The channel mask for the sound asset.
|
||||
$:Rate The sample rate for the sound asset.
|
||||
$:DataLen The byte count the asset requires if fully loaded.
|
||||
$:DataLen The uint8_t count the asset requirements if fully loaded.
|
||||
$:SoundLimit The maximum number of instances of this sound that is allowed to play at once.
|
||||
$:IsExternal Nonzero if the sound is stored external to the sound bank. See the eventexternal sample.
|
||||
$:DurationMs The length of the sound asset, in milliseconds.
|
||||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
@ -5801,13 +5801,13 @@ DXDEC EXPAPI SINTa AILCALL AIL_get_marker_list(HMSOUNDBANK bank, char const* sou
|
|||
|
||||
DXDEC EXPAPI S32 AILCALL AIL_find_marker_in_list(SINTa marker_list, char const * marker_name, S32* is_samples);
|
||||
/*
|
||||
Returns the byte offset into a sample corresponding to the given marker name.
|
||||
Returns the uint8_t offset into a sample corresponding to the given marker name.
|
||||
|
||||
$:marker_list The marker list returned from $AIL_get_marker_list.
|
||||
$:marker_name The name of the marker to look up.
|
||||
$:is_samples returns whether the marker is at a sample location instead of a byte location.
|
||||
$:is_samples returns whether the marker is at a sample location instead of a uint8_t location.
|
||||
|
||||
$:return -1 if the marker was not found, or the byte offset of the marker.
|
||||
$:return -1 if the marker was not found, or the uint8_t offset of the marker.
|
||||
|
||||
Looks up an offset to use in functions such as $AIL_set_sample_position. marker_list can be retrieved with
|
||||
$AIL_get_marker_list.
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ void SQRNetworkManager_PS3::Terminate()
|
|||
} while( m_basicEventThread->isRunning() );
|
||||
}
|
||||
|
||||
// Second stage of initialisation, that requires NP Manager to be online & the player to be signed in. This kicks of the creation of a context
|
||||
// Second stage of initialisation, that requirements NP Manager to be online & the player to be signed in. This kicks of the creation of a context
|
||||
// for Np Matching 2. Initialisation is finally complete when we get a callback to ContextCallback. The SQRNetworkManager_PS3 is then finally moved
|
||||
// into SNM_INT_STATE_IDLE at this stage.
|
||||
void SQRNetworkManager_PS3::InitialiseAfterOnline()
|
||||
|
|
@ -778,8 +778,8 @@ bool SQRNetworkManager_PS3::IsReadyToPlayOrIdle()
|
|||
|
||||
|
||||
// Consider as "in session" from the moment that a game is created or joined, until the point where the game itself has been told via state change that we are now idle. The
|
||||
// game code requires IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
|
||||
// it also requires that it is informed of the state changes leading up to not being in the session, before this should report false.
|
||||
// game code requirements IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
|
||||
// it also requirements that it is informed of the state changes leading up to not being in the session, before this should report false.
|
||||
bool SQRNetworkManager_PS3::IsInSession()
|
||||
{
|
||||
return m_isInSession;
|
||||
|
|
@ -1066,7 +1066,7 @@ bool SQRNetworkManager_PS3::AddLocalPlayerByUserIndex(int idx)
|
|||
m_roomSyncData.setPlayerCount(m_roomSyncData.getPlayerCount()+1);
|
||||
|
||||
// And do any adjusting necessary to the mappings from this room data, to the SQRNetworkPlayers.
|
||||
// This will also create the required new SQRNetworkPlayer and do all the callbacks that requires etc.
|
||||
// This will also create the required new SQRNetworkPlayer and do all the callbacks that requirements etc.
|
||||
MapRoomSlotPlayers();
|
||||
|
||||
// Sync this back out to our networked clients...
|
||||
|
|
@ -1146,7 +1146,7 @@ bool SQRNetworkManager_PS3::RemoveLocalPlayerByUserIndex(int idx)
|
|||
memset(&m_roomSyncData.players[m_roomSyncData.getPlayerCount()],0,sizeof(PlayerSyncData));
|
||||
|
||||
// And do any adjusting necessary to the mappings from this room data, to the SQRNetworkPlayers.
|
||||
// This will also delete the SQRNetworkPlayer and do all the callbacks that requires etc.
|
||||
// This will also delete the SQRNetworkPlayer and do all the callbacks that requirements etc.
|
||||
MapRoomSlotPlayers(roomSlotPlayerCount);
|
||||
m_aRoomSlotPlayers[m_roomSyncData.getPlayerCount()] = NULL;
|
||||
|
||||
|
|
@ -1714,7 +1714,7 @@ void SQRNetworkManager_PS3::SyncRoomData()
|
|||
sceNpMatching2SetRoomDataInternal ( m_matchingContext, &reqParam, NULL, &m_setRoomDataRequestId );
|
||||
}
|
||||
|
||||
// Check if the matching context is valid, and if not attempt to create one. If to do this requires starting an asynchronous process, then sets the internal state to the state passed in
|
||||
// Check if the matching context is valid, and if not attempt to create one. If to do this requirements starting an asynchronous process, then sets the internal state to the state passed in
|
||||
// before doing this.
|
||||
// Returns true on success.
|
||||
bool SQRNetworkManager_PS3::GetMatchingContext(eSQRNetworkManagerInternalState asyncState)
|
||||
|
|
@ -2137,7 +2137,7 @@ void SQRNetworkManager_PS3::DeleteServerContext()
|
|||
}
|
||||
}
|
||||
|
||||
// Creates a set of Rudp connections by the "active open" method. This requires that both ends of the connection call cellRudpInitiate to fully create a connection. We
|
||||
// Creates a set of Rudp connections by the "active open" method. This requirements that both ends of the connection call cellRudpInitiate to fully create a connection. We
|
||||
// create one connection per local play on any remote machine.
|
||||
//
|
||||
// peerMemberId is the room member Id of the remote end of the connection
|
||||
|
|
@ -2414,7 +2414,7 @@ void SQRNetworkManager_PS3::DefaultRequestCallback(SceNpMatching2ContextId id, S
|
|||
SQRNetworkManager_PS3 *manager = (SQRNetworkManager_PS3 *)arg;
|
||||
if( id != manager->m_matchingContext ) return;
|
||||
|
||||
// PS3 requires a call to get any data that is passed with the callback. On PS3, the data is just passed in directly - do the getting of data here on PS3 to get it into the same state as the PS4
|
||||
// PS3 requirements a call to get any data that is passed with the callback. On PS3, the data is just passed in directly - do the getting of data here on PS3 to get it into the same state as the PS4
|
||||
#ifdef __PS3__
|
||||
void *data = 0;
|
||||
bool dataError = false;
|
||||
|
|
@ -2679,7 +2679,7 @@ void SQRNetworkManager_PS3::DefaultRequestCallback(SceNpMatching2ContextId id, S
|
|||
break;
|
||||
// This is the response to sceNpMatching2GetRoomMemberDataInternal.This only happens on the host, as a response to an incoming connection being established, when we
|
||||
// kick off the request for room member internal data so that we can determine what local players that remote machine is intending to bring into the game. At this point we can
|
||||
// activate the host end of each of the Rupd connection that this machine requires. We can also update our player slot data (which gets syncronised back out to other room members) at this point.
|
||||
// activate the host end of each of the Rupd connection that this machine requirements. We can also update our player slot data (which gets syncronised back out to other room members) at this point.
|
||||
case SCE_NP_MATCHING2_REQUEST_EVENT_GetRoomMemberDataInternal:
|
||||
if( errorCode == 0 )
|
||||
{
|
||||
|
|
@ -3195,7 +3195,7 @@ void SQRNetworkManager_PS3::RudpContextCallback(int ctx_id, int event_id, int er
|
|||
if( manager->m_listener )
|
||||
{
|
||||
unsigned int dataSize = cellRudpGetSizeReadable(ctx_id);
|
||||
// If we're the host, and this player hasn't yet had its small id confirmed, then the first byte sent to us should be this id
|
||||
// If we're the host, and this player hasn't yet had its small id confirmed, then the first uint8_t sent to us should be this id
|
||||
if( manager->m_isHosting )
|
||||
{
|
||||
SQRNetworkPlayer *playerFrom = manager->GetPlayerFromRudpCtx( ctx_id );
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ int SonyRemoteStorage_PS3::LoadCompressCallback(void *pParam,bool bIsCorrupt, bo
|
|||
// We add 4 bytes to the start so that we can signal compressed data
|
||||
// And another 4 bytes to store the decompressed data size
|
||||
unsigned int compLength = origFilesize+8;
|
||||
byte *compData = (byte *)malloc( compLength );
|
||||
uint8_t *compData = (uint8_t *)malloc( compLength );
|
||||
Compression::UseDefaultThreadStorage();
|
||||
Compression::getCompression()->Compress(compData+8,&compLength,pOrigSaveData,origFilesize);
|
||||
ZeroMemory(compData,8);
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ bool EdgeZLib::Compress(void* pDestination, uint32_t* pDestSize, const void* pSo
|
|||
pDst = ((uint32_t*)pDestination);
|
||||
}
|
||||
|
||||
pDst[0] = SrcSize; // 4 byte header added for source size
|
||||
pDst[0] = SrcSize; // 4 uint8_t header added for source size
|
||||
|
||||
|
||||
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 );
|
||||
#endif
|
||||
|
||||
*pDestSize = s_compressedSize + 4; // 4 byte header for size
|
||||
*pDestSize = s_compressedSize + 4; // 4 uint8_t header for size
|
||||
if(findingSizeOnly)
|
||||
free(pDst);
|
||||
LeaveCriticalSection(&s_critSect);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ typedef unsigned int UINT;
|
|||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef long long __int64;
|
||||
typedef unsigned long long __uint64;
|
||||
typedef unsigned long DWORD;
|
||||
|
|
@ -137,7 +137,7 @@ typedef WCHAR *LPWSTR, *PWSTR;
|
|||
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
||||
|
||||
//
|
||||
// ANSI (Multi-byte Character) types
|
||||
// ANSI (Multi-uint8_t Character) types
|
||||
//
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *LPCH, *PCH;
|
||||
|
|
|
|||
|
|
@ -2495,7 +2495,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// No mapping for the Unicode character exists in the target multi-byte code page.
|
||||
// No mapping for the Unicode character exists in the target multi-uint8_t code page.
|
||||
//
|
||||
#define ERROR_NO_UNICODE_TRANSLATION 1113L
|
||||
|
||||
|
|
@ -2704,7 +2704,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The specified program requires a newer version of Windows.
|
||||
// The specified program requirements a newer version of Windows.
|
||||
//
|
||||
#define ERROR_OLD_WIN_VERSION 1150L
|
||||
|
||||
|
|
@ -2830,7 +2830,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The indicated device requires reinitialization due to hardware errors.
|
||||
// The indicated device requirements reinitialization due to hardware errors.
|
||||
//
|
||||
#define ERROR_DEVICE_REINITIALIZATION_NEEDED 1164L // dderror
|
||||
|
||||
|
|
@ -4940,7 +4940,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// This operation requires an interactive window station.
|
||||
// This operation requirements an interactive window station.
|
||||
//
|
||||
#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459L
|
||||
|
||||
|
|
@ -6117,7 +6117,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The byte count is too small.
|
||||
// The uint8_t count is too small.
|
||||
//
|
||||
#define RPC_X_BYTE_COUNT_TOO_SMALL 1782L
|
||||
|
||||
|
|
@ -9717,7 +9717,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// This request requires a secure connection.
|
||||
// This request requirements a secure connection.
|
||||
//
|
||||
#define ERROR_DS_CONFIDENTIALITY_REQUIRED 8237L
|
||||
|
||||
|
|
@ -11097,7 +11097,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// A root object requires a class of 'top'.
|
||||
// A root object requirements a class of 'top'.
|
||||
//
|
||||
#define ERROR_DS_ROOT_REQUIRES_CLASS_TOP 8432L
|
||||
|
||||
|
|
@ -11511,7 +11511,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation requires a directory service, and none was available.
|
||||
// The requested operation requirements a directory service, and none was available.
|
||||
//
|
||||
#define ERROR_DS_DS_REQUIRED 8478L
|
||||
|
||||
|
|
@ -11619,7 +11619,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Another operation which requires exclusive access to the PDC FSMO is already in progress.
|
||||
// Another operation which requirements exclusive access to the PDC FSMO is already in progress.
|
||||
//
|
||||
#define ERROR_DS_PDC_OPERATION_IN_PROGRESS 8490L
|
||||
|
||||
|
|
@ -12009,7 +12009,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The connection between client and server requires packet privacy or better.
|
||||
// The connection between client and server requirements packet privacy or better.
|
||||
//
|
||||
#define ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION 8533L
|
||||
|
||||
|
|
@ -12036,7 +12036,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation requires that destination domain auditing be enabled.
|
||||
// The operation requirements that destination domain auditing be enabled.
|
||||
//
|
||||
#define ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED 8536L
|
||||
|
||||
|
|
@ -12182,7 +12182,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation requires that source domain auditing be enabled.
|
||||
// The operation requirements that source domain auditing be enabled.
|
||||
//
|
||||
#define ERROR_DS_SOURCE_AUDITING_NOT_ENABLED 8552L
|
||||
|
||||
|
|
@ -12722,7 +12722,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Secondary DNS zone requires master IP address.
|
||||
// Secondary DNS zone requirements master IP address.
|
||||
//
|
||||
#define DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 9612L
|
||||
|
||||
|
|
@ -12799,7 +12799,7 @@
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Primary DNS zone requires datafile.
|
||||
// Primary DNS zone requirements datafile.
|
||||
//
|
||||
#define DNS_ERROR_PRIMARY_REQUIRES_DATAFILE 9651L
|
||||
|
||||
|
|
@ -15890,7 +15890,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation requires that JIT be in the current context and it is not
|
||||
// The requested operation requirements that JIT be in the current context and it is not
|
||||
//
|
||||
#define CONTEXT_E_NOJIT _HRESULT_TYPEDEF_(0x8004E026L)
|
||||
|
||||
|
|
@ -15899,7 +15899,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation requires that the current context have a Transaction, and it does not
|
||||
// The requested operation requirements that the current context have a Transaction, and it does not
|
||||
//
|
||||
#define CONTEXT_E_NOTRANSACTION _HRESULT_TYPEDEF_(0x8004E027L)
|
||||
|
||||
|
|
@ -18864,7 +18864,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The streamed cryptographic message requires more data to complete the decode operation.
|
||||
// The streamed cryptographic message requirements more data to complete the decode operation.
|
||||
//
|
||||
#define CRYPT_E_STREAM_INSUFFICIENT_DATA _HRESULT_TYPEDEF_(0x80091011L)
|
||||
|
||||
|
|
@ -21062,7 +21062,7 @@ __forceinline HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x :
|
|||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation requires a Smart Card, but no Smart Card is currently in the device.
|
||||
// The operation requirements a Smart Card, but no Smart Card is currently in the device.
|
||||
//
|
||||
#define SCARD_E_NO_SMARTCARD _HRESULT_TYPEDEF_(0x8010000CL)
|
||||
|
||||
|
|
|
|||
|
|
@ -839,7 +839,7 @@ int main()
|
|||
ui.init(1280,480);
|
||||
|
||||
app.CommerceInit(); // MGH - moved this here so GetCommerce isn't NULL
|
||||
// 4J-PB - Kick of the check for trial or full version - requires ui to be initialised
|
||||
// 4J-PB - Kick of the check for trial or full version - requirements ui to be initialised
|
||||
app.GetCommerce()->CheckForTrialUpgradeKey();
|
||||
|
||||
static bool bTrialTimerDisplayed=true;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
// private:
|
||||
static const int sc_size = 20;
|
||||
unsigned char m_tileIds[sc_size*sc_size*sc_size]; // byte
|
||||
unsigned char m_tileIds[sc_size*sc_size*sc_size]; // uint8_t
|
||||
unsigned char m_brightness[sc_size*sc_size*sc_size]; // 2x 4bit
|
||||
unsigned char m_data_flags[sc_size*sc_size*sc_size]; // 2x 4bit
|
||||
int m_grassColor[sc_size*sc_size];
|
||||
|
|
@ -59,7 +59,7 @@ public:
|
|||
int m_lastHitBlockX;
|
||||
int m_lastHitBlockY;
|
||||
int m_lastHitBlockZ;
|
||||
unsigned int m_pad[3];// padding to 16 byte alignment
|
||||
unsigned int m_pad[3];// padding to 16 uint8_t alignment
|
||||
|
||||
|
||||
int getTileIdx(int x, int y, int z) { return (( x - m_x0 )*sc_size*sc_size) + (( y - m_y0 )*sc_size) + ( z - m_z0 ); }
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ public:
|
|||
unsigned int minColour = ms_pTileData->stemTile_minColour;
|
||||
unsigned int maxColour = ms_pTileData->stemTile_maxColour;
|
||||
|
||||
byte redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( data/7.0f));
|
||||
byte greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( data/7.0f));
|
||||
byte blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( data/7.0f));
|
||||
uint8_t redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( data/7.0f));
|
||||
uint8_t greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( data/7.0f));
|
||||
uint8_t blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( data/7.0f));
|
||||
|
||||
colour = redComponent<<16 | greenComponent<<8 | blueComponent;
|
||||
return colour;
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ void Tesselator_SPU::color(int r, int g, int b, int a)
|
|||
col = (r << 24) | (g << 16) | (b << 8) | (a);
|
||||
}
|
||||
|
||||
void Tesselator_SPU::color(byte r, byte g, byte b)
|
||||
void Tesselator_SPU::color(uint8_t r, uint8_t g, uint8_t b)
|
||||
{
|
||||
color(r & 0xff, g & 0xff, b & 0xff);
|
||||
}
|
||||
|
|
@ -396,7 +396,7 @@ void Tesselator_SPU::vertexUV(float x, float y, float z, float u, float v)
|
|||
// 4 - not axis aligned, use uv stored in the vertex data 4 on from this one
|
||||
// ll is an 8-bit (4 bit per u/v) index into the current lighting texture
|
||||
//
|
||||
// For quads that don't have axis aligned UVs (ie have a code for 4 in i as described above) the 8 byte vertex
|
||||
// For quads that don't have axis aligned UVs (ie have a code for 4 in i as described above) the 8 uint8_t vertex
|
||||
// is followed by a further 8 bytes which have explicit UVs defined for each vertex:
|
||||
//
|
||||
// 0000 0000 uuuu vvvv (vertex 0)
|
||||
|
|
@ -723,9 +723,9 @@ void Tesselator_SPU::noColor()
|
|||
void Tesselator_SPU::normal(float x, float y, float z)
|
||||
{
|
||||
hasNormal = true;
|
||||
byte xx = (byte) (x * 127);
|
||||
byte yy = (byte) (y * 127);
|
||||
byte zz = (byte) (z * 127);
|
||||
uint8_t xx = (uint8_t) (x * 127);
|
||||
uint8_t yy = (uint8_t) (y * 127);
|
||||
uint8_t zz = (uint8_t) (z * 127);
|
||||
|
||||
_normal = (xx & 0xff) | ((yy & 0xff) << 8) | ((zz & 0xff) << 16);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#ifdef __PS3__
|
||||
#ifdef SN_TARGET_PS3_SPU
|
||||
typedef unsigned int DWORD;
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned char uint8_t;
|
||||
#include <float.h>
|
||||
#else
|
||||
#include "..\..\..\stdafx.h"
|
||||
|
|
@ -154,7 +154,7 @@ public:
|
|||
void color(float r, float g, float b, float a);
|
||||
void color(int r, int g, int b);
|
||||
void color(int r, int g, int b, int a);
|
||||
void color(byte r, byte g, byte b);
|
||||
void color(uint8_t r, uint8_t g, uint8_t b);
|
||||
void vertexUV(float x, float y, float z, float u, float v);
|
||||
void vertex(float x, float y, float z);
|
||||
void color(int c);
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@
|
|||
// Some notes on the logic of all of this...
|
||||
// (1) Large numbers of blocks in the world really don't need to be stored at a full 8 bits per tile.
|
||||
// In a worst-case scenario, all planes would be 256 bytes and we'd have to store offsets of up to 32704 ( 64 x 511). This would require 15 bits per offset to store, but since in all cases
|
||||
// the data can be stored with a 2 byte alignment, we can store offsets divided by 2, freeing up 2 bits to store the type of index for each plane. This allows us to encode 4 types, but we really have
|
||||
// 5 types (0, 1, 2, 4 or 8 bits per tile). Since the 8-bit per tile planes are likely to be very rare, we can free up an extra bit in those by making their offset 4-byte aligned, and
|
||||
// the data can be stored with a 2 uint8_t alignment, we can store offsets divided by 2, freeing up 2 bits to store the type of index for each plane. This allows us to encode 4 types, but we really have
|
||||
// 5 types (0, 1, 2, 4 or 8 bits per tile). Since the 8-bit per tile planes are likely to be very rare, we can free up an extra bit in those by making their offset 4-uint8_t aligned, and
|
||||
// then use the extra bit to determine whether its a 0 or 8-bit per tile index. In the 0 bit case, we can use the bits used for the offset to store the actual tile value represented throughout the plane.
|
||||
// (2) The compression is done per 4x4x4 block rather than planes like the lighting, as that gives many more regions that have a small number of tile types than per plane, and can therefore
|
||||
// be compressed using less bits per tile. This is at the expense of a larger index, and more overhead from storing the tile types in each block (since there are more blocks than planes). However
|
||||
|
|
@ -136,7 +136,7 @@ public:
|
|||
class OutputData
|
||||
{
|
||||
public:
|
||||
unsigned char m_tileIds[sc_size*sc_size*sc_size]; // byte
|
||||
unsigned char m_tileIds[sc_size*sc_size*sc_size]; // uint8_t
|
||||
unsigned char m_brightness[sc_size*sc_size*sc_size]; // 2x 4bit
|
||||
unsigned char m_data_flags[sc_size*sc_size*sc_size]; // 2x 4bit
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ private:
|
|||
static size_t s_currentConfigSize;
|
||||
|
||||
static size_t s_dataWrittenSize;
|
||||
static byte *s_dataWritten;
|
||||
static uint8_t *s_dataWritten;
|
||||
|
||||
public:
|
||||
static void Tick();
|
||||
|
|
|
|||
|
|
@ -225,5 +225,5 @@ enum ETelemetryChallenges
|
|||
eTelemetryTutorial_TradingMenu,
|
||||
eTelemetryTutorial_Enderchest,
|
||||
|
||||
// Sent over network as a byte
|
||||
// Sent over network as a uint8_t
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue