Merge branch 'feature-windows'

This commit is contained in:
2017-06-21 23:52:59 -07:00
5 changed files with 29 additions and 15 deletions

View File

@@ -1011,7 +1011,7 @@ void KRAudioManager::getHRTFMix(const KRVector2 &dir, KRVector2 &dir1, KRVector2
void KRAudioManager::initAudio()
{
if(!m_initialized == NULL) {
if(!m_initialized) {
m_initialized = true;
m_output_sample = KRENGINE_AUDIO_BLOCK_LENGTH;
@@ -1490,7 +1490,7 @@ void KRAudioManager::startFrame(float deltaTime)
if(source->getEnableOcclusion() && false) {
if(source->getEnableOcclusion() && /* FINDME!! DISABLES CODE */ (false)) {
KRHitInfo hitinfo;
if(source->getScene().lineCast(m_listener_position, source_world_position, hitinfo, KRAKEN_COLLIDER_AUDIO)) {
gain = 0.0f;

View File

@@ -794,7 +794,7 @@ void KRCamera::renderPost()
float dScaleX = 2.0 / (1024 / 16);
float dScaleY = 2.0 / (768 / 16);
float dTexScale = 1.0 / 16.0;
int iRow = row_count - 1; iCol = 0, iTab = 0;
int iRow = row_count - 1; iCol = 0; iTab = 0;
while(*pChar) {
char c = *pChar++;
if(c == '\n') {

View File

@@ -204,7 +204,7 @@ fprintf(stderr, "Error at line number %d, in file %s. alGetError() returned %i f
OSStatus e = x; \
if( e != noErr) \
{ \
fprintf(stderr, "Error at line number %d, in file %s. Returned %d for call %s\n",__LINE__, __FILE__, e, #x ); \
fprintf(stderr, "Error at line number %d, in file %s. Returned %d for call %s\n",__LINE__, __FILE__, (int)e, #x ); \
} \
}
#else

View File

@@ -431,7 +431,9 @@ void KRVector3::setXMLAttribute(const std::string &base_name, tinyxml2::XMLEleme
void KRVector3::getXMLAttribute(const std::string &base_name, tinyxml2::XMLElement *e, const KRVector3 &default_value)
{
float new_x,new_y,new_z;
float new_x = 0.0f;
float new_y = 0.0f;
float new_z = 0.0f;
if(e->QueryFloatAttribute((base_name + "_x").c_str(), &new_x) == tinyxml2::XML_SUCCESS
&& e->QueryFloatAttribute((base_name + "_y").c_str(), &new_y) == tinyxml2::XML_SUCCESS
&& e->QueryFloatAttribute((base_name + "_z").c_str(), &new_z) == tinyxml2::XML_SUCCESS) {