Added Patch for VS2015 compatibility

master
Javidx9 7 years ago committed by GitHub
parent d36778aaca
commit 6f3a887bce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      olcConsoleGameEngine.h
  2. 7
      olcConsoleGameEngineGL.h
  3. 9
      olcConsoleGameEngineGLOOP.cpp
  4. 11
      olcConsoleGameEngineOOP.cpp

@ -4,6 +4,20 @@ OneLoneCoder.com - Command Line Game Engine
The Original & Best :P
One Lone Coder License
~~~~~~~~~~~~~~~~~~~~~~
- This software is Copyright (C) 2018 Javidx9
- This is free software
- This software comes with absolutely no warranty
- The copyright holder is not liable or responsible for anything
this software does or does not
- You use this software at your own risk
- You can distribute this software
- You can modify this software
- Redistribution of this software or a derivative of this software
must attribute the Copyright holder named above, in a manner
visible to the end user
License
~~~~~~~
One Lone Coder Console Game Engine Copyright (C) 2018 Javidx9
@ -1091,7 +1105,12 @@ protected: // Audio Engine =====================================================
// Add sample 'id' to the mixers sounds to play list
void PlaySample(int id, bool bLoop = false)
{
listActiveSamples.push_back({ id, 0, false, bLoop });
sCurrentlyPlayingSample a;
a.nAudioSampleID = id;
a.nSamplePosition = 0;
a.bFinished = false;
a.bLoop = bLoop;
listActiveSamples.push_back(a);
}
void StopSample(int id)

@ -1802,7 +1802,12 @@ protected:
// Add sample 'id' to the mixers sounds to play list
void PlaySample(int id, bool bLoop = false)
{
listActiveSamples.push_back({ id, 0, false, bLoop });
sCurrentlyPlayingSample a;
a.nAudioSampleID = id;
a.nSamplePosition = 0;
a.bFinished = false;
a.bLoop = bLoop;
listActiveSamples.push_back(a);
}
void StopSample(int id)

@ -1413,9 +1413,14 @@ unsigned int olcConsoleGameEngineGLOOP::LoadAudioSample(std::wstring sWavFile)
}
// Add sample 'id' to the mixers sounds to play list
void olcConsoleGameEngineGLOOP::PlaySample(int id, bool bLoop)
void olcConsoleGameEngineOOP::PlaySample(int id, bool bLoop = false)
{
listActiveSamples.push_back({ id, 0, false, bLoop });
sCurrentlyPlayingSample a;
a.nAudioSampleID = id;
a.nSamplePosition = 0;
a.bFinished = false;
a.bLoop = bLoop;
listActiveSamples.push_back(a);
}
void olcConsoleGameEngineGLOOP::StopSample(int id)

@ -594,9 +594,14 @@ unsigned int olcConsoleGameEngineOOP::LoadAudioSample(std::wstring sWavFile)
}
// Add sample 'id' to the mixers sounds to play list
void olcConsoleGameEngineOOP::PlaySample(int id, bool bLoop)
{
listActiveSamples.push_back({ id, 0, false, bLoop });
void olcConsoleGameEngineOOP::PlaySample(int id, bool bLoop = false)
{
sCurrentlyPlayingSample a;
a.nAudioSampleID = id;
a.nSamplePosition = 0;
a.bFinished = false;
a.bLoop = bLoop;
listActiveSamples.push_back(a);
}
void StopSample(int id)

Loading…
Cancel
Save