diff --git a/Chapter01/Makefile b/Chapter01/Makefile new file mode 100644 index 00000000..d42b219a --- /dev/null +++ b/Chapter01/Makefile @@ -0,0 +1,9 @@ +chapter1: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp + g++ -o chapter1 `ls *.o` `pkg-config --libs sdl2` + +clean: + rm -f chapter1 SDL *.o + diff --git a/Chapter02/Makefile b/Chapter02/Makefile new file mode 100644 index 00000000..8450e807 --- /dev/null +++ b/Chapter02/Makefile @@ -0,0 +1,9 @@ +chapter2: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp + g++ -o chapter2 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` + +clean: + rm -f chapter2 SDL *.o + diff --git a/Chapter02/Ship.h b/Chapter02/Ship.h index 8a34e962..ca102c6c 100644 --- a/Chapter02/Ship.h +++ b/Chapter02/Ship.h @@ -8,6 +8,7 @@ #pragma once #include "Actor.h" +#include class Ship : public Actor { public: @@ -19,4 +20,4 @@ class Ship : public Actor private: float mRightSpeed; float mDownSpeed; -}; \ No newline at end of file +}; diff --git a/Chapter03/Makefile b/Chapter03/Makefile new file mode 100644 index 00000000..14bf2f10 --- /dev/null +++ b/Chapter03/Makefile @@ -0,0 +1,9 @@ +chapter3: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp + g++ -o chapter3 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` + +clean: + rm -f chapter3 SDL *.o + diff --git a/Chapter04/AIComponent.cpp b/Chapter04/AIComponent.cpp index e88ac6ab..114e2001 100644 --- a/Chapter04/AIComponent.cpp +++ b/Chapter04/AIComponent.cpp @@ -9,7 +9,7 @@ #include "AIComponent.h" #include "Actor.h" #include "AIState.h" -#include +#include "SDL/SDL_log.h" AIComponent::AIComponent(class Actor* owner) :Component(owner) diff --git a/Chapter04/AIState.cpp b/Chapter04/AIState.cpp index 673e9b42..76d7d541 100644 --- a/Chapter04/AIState.cpp +++ b/Chapter04/AIState.cpp @@ -8,7 +8,7 @@ #include "AIState.h" #include "AIComponent.h" -#include +#include "SDL/SDL_log.h" void AIPatrol::Update(float deltaTime) { diff --git a/Chapter04/Makefile b/Chapter04/Makefile new file mode 100644 index 00000000..1a4cd60b --- /dev/null +++ b/Chapter04/Makefile @@ -0,0 +1,9 @@ +chapter4: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp + g++ -o chapter4 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` + +clean: + rm -f chapter4 SDL *.o + diff --git a/Chapter04/Search.cpp b/Chapter04/Search.cpp index 56a83598..ce1e6f41 100644 --- a/Chapter04/Search.cpp +++ b/Chapter04/Search.cpp @@ -2,6 +2,8 @@ #include #include #include +#include +#include struct GraphNode { diff --git a/Chapter05/Makefile b/Chapter05/Makefile new file mode 100644 index 00000000..57feaaab --- /dev/null +++ b/Chapter05/Makefile @@ -0,0 +1,9 @@ +chapter5: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp + g++ -o chapter5 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` -lGL -lGLEW -lSOIL + +clean: + rm -f chapter5 SDL *.o + diff --git a/Chapter05/Shader.cpp b/Chapter05/Shader.cpp index e32c07a2..19ad5d41 100644 --- a/Chapter05/Shader.cpp +++ b/Chapter05/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter05/Texture.cpp b/Chapter05/Texture.cpp index 7d0dbd3e..c3ada9e3 100644 --- a/Chapter05/Texture.cpp +++ b/Chapter05/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter06/Game.h b/Chapter06/Game.h index 6f567720..dbf0478d 100644 --- a/Chapter06/Game.h +++ b/Chapter06/Game.h @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #pragma once -#include +#include "SDL/SDL.h" #include #include #include diff --git a/Chapter06/Makefile b/Chapter06/Makefile new file mode 100644 index 00000000..c07f49ee --- /dev/null +++ b/Chapter06/Makefile @@ -0,0 +1,9 @@ +chapter6: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp + g++ -o chapter6 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` -lGL -lGLEW -lSOIL + +clean: + rm -f chapter6 SDL *.o + diff --git a/Chapter06/Mesh.cpp b/Chapter06/Mesh.cpp index 1673b2b2..73d35ecd 100644 --- a/Chapter06/Mesh.cpp +++ b/Chapter06/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" Mesh::Mesh() diff --git a/Chapter06/Renderer.h b/Chapter06/Renderer.h index 12746df2..bbfc81ed 100644 --- a/Chapter06/Renderer.h +++ b/Chapter06/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight @@ -93,4 +93,4 @@ class Renderer SDL_Window* mWindow; // OpenGL context SDL_GLContext mContext; -}; \ No newline at end of file +}; diff --git a/Chapter06/Shader.cpp b/Chapter06/Shader.cpp index cae3ac07..e119a655 100644 --- a/Chapter06/Shader.cpp +++ b/Chapter06/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter06/Texture.cpp b/Chapter06/Texture.cpp index ddde35f0..1e4fe23d 100644 --- a/Chapter06/Texture.cpp +++ b/Chapter06/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter07/AudioSystem.cpp b/Chapter07/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter07/AudioSystem.cpp +++ b/Chapter07/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter07/Game.h b/Chapter07/Game.h index 12825f7c..7b5358ef 100644 --- a/Chapter07/Game.h +++ b/Chapter07/Game.h @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #pragma once -#include +#include "SDL/SDL.h" #include #include #include diff --git a/Chapter07/Makefile b/Chapter07/Makefile new file mode 100644 index 00000000..b6e17774 --- /dev/null +++ b/Chapter07/Makefile @@ -0,0 +1,9 @@ +chapter7: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/lowlevel/inc -I../fmodlinux/api/studio/inc -I../fmodlinux/api/core/inc/ + g++ -o chapter7 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter7 SDL *.o + diff --git a/Chapter07/Mesh.cpp b/Chapter07/Mesh.cpp index 125ef961..9c61154a 100644 --- a/Chapter07/Mesh.cpp +++ b/Chapter07/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" Mesh::Mesh() diff --git a/Chapter07/Renderer.h b/Chapter07/Renderer.h index 12746df2..bbfc81ed 100644 --- a/Chapter07/Renderer.h +++ b/Chapter07/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight @@ -93,4 +93,4 @@ class Renderer SDL_Window* mWindow; // OpenGL context SDL_GLContext mContext; -}; \ No newline at end of file +}; diff --git a/Chapter07/Shader.cpp b/Chapter07/Shader.cpp index cae3ac07..e119a655 100644 --- a/Chapter07/Shader.cpp +++ b/Chapter07/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter07/SoundEvent.cpp b/Chapter07/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter07/SoundEvent.cpp +++ b/Chapter07/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter07/Texture.cpp b/Chapter07/Texture.cpp index ddde35f0..1e4fe23d 100644 --- a/Chapter07/Texture.cpp +++ b/Chapter07/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter08/InputSystem.cpp b/Chapter08/InputSystem.cpp index da787cf9..97a3a72a 100644 --- a/Chapter08/InputSystem.cpp +++ b/Chapter08/InputSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "InputSystem.h" -#include +#include "SDL/SDL.h" #include bool KeyboardState::GetKeyValue(SDL_Scancode keyCode) const diff --git a/Chapter08/InputSystem.h b/Chapter08/InputSystem.h index a1eccc04..aaae3c69 100644 --- a/Chapter08/InputSystem.h +++ b/Chapter08/InputSystem.h @@ -7,9 +7,9 @@ // ---------------------------------------------------------------- #pragma once -#include -#include -#include +#include "SDL/SDL_scancode.h" +#include "SDL/SDL_gamecontroller.h" +#include "SDL/SDL_mouse.h" #include "Math.h" // The different button states diff --git a/Chapter08/Makefile b/Chapter08/Makefile new file mode 100644 index 00000000..98aaecf3 --- /dev/null +++ b/Chapter08/Makefile @@ -0,0 +1,9 @@ +chapter8: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I../fmodlinux/api/studio/inc + g++ -o chapter8 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter8 SDL *.o + diff --git a/Chapter08/Shader.cpp b/Chapter08/Shader.cpp index e32c07a2..19ad5d41 100644 --- a/Chapter08/Shader.cpp +++ b/Chapter08/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter08/Texture.cpp b/Chapter08/Texture.cpp index 7d0dbd3e..c3ada9e3 100644 --- a/Chapter08/Texture.cpp +++ b/Chapter08/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter09/AudioSystem.cpp b/Chapter09/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter09/AudioSystem.cpp +++ b/Chapter09/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter09/Game.h b/Chapter09/Game.h index 0678cb40..8522453c 100644 --- a/Chapter09/Game.h +++ b/Chapter09/Game.h @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #pragma once -#include +#include "SDL/SDL.h" #include #include #include diff --git a/Chapter09/Makefile b/Chapter09/Makefile new file mode 100644 index 00000000..db78cdd6 --- /dev/null +++ b/Chapter09/Makefile @@ -0,0 +1,9 @@ +chapter9: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I../fmodlinux/api/studio/inc + g++ -o chapter9 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter9 SDL *.o + diff --git a/Chapter09/Mesh.cpp b/Chapter09/Mesh.cpp index 125ef961..9c61154a 100644 --- a/Chapter09/Mesh.cpp +++ b/Chapter09/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" Mesh::Mesh() diff --git a/Chapter09/Renderer.h b/Chapter09/Renderer.h index 44afc0c6..620a08dc 100644 --- a/Chapter09/Renderer.h +++ b/Chapter09/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight @@ -101,4 +101,4 @@ class Renderer SDL_Window* mWindow; // OpenGL context SDL_GLContext mContext; -}; \ No newline at end of file +}; diff --git a/Chapter09/Shader.cpp b/Chapter09/Shader.cpp index cae3ac07..e119a655 100644 --- a/Chapter09/Shader.cpp +++ b/Chapter09/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter09/SoundEvent.cpp b/Chapter09/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter09/SoundEvent.cpp +++ b/Chapter09/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter09/Texture.cpp b/Chapter09/Texture.cpp index ddde35f0..1e4fe23d 100644 --- a/Chapter09/Texture.cpp +++ b/Chapter09/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter10/AudioSystem.cpp b/Chapter10/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter10/AudioSystem.cpp +++ b/Chapter10/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter10/Game.h b/Chapter10/Game.h index 1402e6e0..86a4e1a9 100644 --- a/Chapter10/Game.h +++ b/Chapter10/Game.h @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #pragma once -#include +#include "SDL/SDL.h" #include #include #include diff --git a/Chapter10/Makefile b/Chapter10/Makefile new file mode 100644 index 00000000..4c7296b5 --- /dev/null +++ b/Chapter10/Makefile @@ -0,0 +1,9 @@ +chapter10: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I../fmodlinux/api/studio/inc + g++ -o chapter10 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter10 SDL *.o + diff --git a/Chapter10/Mesh.cpp b/Chapter10/Mesh.cpp index 7409f8ba..6dfbf1e2 100644 --- a/Chapter10/Mesh.cpp +++ b/Chapter10/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" Mesh::Mesh() diff --git a/Chapter10/PhysWorld.cpp b/Chapter10/PhysWorld.cpp index 6db12580..bb3d2950 100644 --- a/Chapter10/PhysWorld.cpp +++ b/Chapter10/PhysWorld.cpp @@ -9,7 +9,7 @@ #include "PhysWorld.h" #include #include "BoxComponent.h" -#include +#include "SDL/SDL.h" PhysWorld::PhysWorld(Game* game) :mGame(game) diff --git a/Chapter10/Renderer.h b/Chapter10/Renderer.h index 44afc0c6..620a08dc 100644 --- a/Chapter10/Renderer.h +++ b/Chapter10/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight @@ -101,4 +101,4 @@ class Renderer SDL_Window* mWindow; // OpenGL context SDL_GLContext mContext; -}; \ No newline at end of file +}; diff --git a/Chapter10/Shader.cpp b/Chapter10/Shader.cpp index cae3ac07..e119a655 100644 --- a/Chapter10/Shader.cpp +++ b/Chapter10/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter10/SoundEvent.cpp b/Chapter10/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter10/SoundEvent.cpp +++ b/Chapter10/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter10/Texture.cpp b/Chapter10/Texture.cpp index ddde35f0..1e4fe23d 100644 --- a/Chapter10/Texture.cpp +++ b/Chapter10/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter11/AudioSystem.cpp b/Chapter11/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter11/AudioSystem.cpp +++ b/Chapter11/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter11/DialogBox.cpp b/Chapter11/DialogBox.cpp index 33fe0e0b..ca55daf9 100644 --- a/Chapter11/DialogBox.cpp +++ b/Chapter11/DialogBox.cpp @@ -9,7 +9,7 @@ #include "DialogBox.h" #include "Game.h" #include "Renderer.h" -#include +#include "SDL/SDL.h" DialogBox::DialogBox(Game* game, const std::string& text, std::function onOK) diff --git a/Chapter11/Font.h b/Chapter11/Font.h index 101d4d2b..a88c32de 100644 --- a/Chapter11/Font.h +++ b/Chapter11/Font.h @@ -9,7 +9,7 @@ #pragma once #include #include -#include +#include "SDL/SDL_ttf.h" #include "Math.h" class Font diff --git a/Chapter11/Game.cpp b/Chapter11/Game.cpp index a4809788..e32a2487 100644 --- a/Chapter11/Game.cpp +++ b/Chapter11/Game.cpp @@ -20,8 +20,8 @@ #include "TargetActor.h" #include "BallActor.h" #include "PauseMenu.h" -#include -#include +#include "SDL/SDL.h" +#include "SDL/SDL_ttf.h" #include "Font.h" #include #include diff --git a/Chapter11/Game.h b/Chapter11/Game.h index 1384784d..0606c2a8 100644 --- a/Chapter11/Game.h +++ b/Chapter11/Game.h @@ -12,7 +12,7 @@ #include #include "Math.h" #include "SoundEvent.h" -#include +#include "SDL/SDL_types.h" class Game { diff --git a/Chapter11/Makefile b/Chapter11/Makefile new file mode 100644 index 00000000..2a9861c9 --- /dev/null +++ b/Chapter11/Makefile @@ -0,0 +1,9 @@ +chapter11: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I..//fmodlinux/api/studio/inc + g++ -o chapter11 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` `pkg-config --libs SDL2_ttf` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter11 SDL *.o + diff --git a/Chapter11/Mesh.cpp b/Chapter11/Mesh.cpp index 7409f8ba..6dfbf1e2 100644 --- a/Chapter11/Mesh.cpp +++ b/Chapter11/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" Mesh::Mesh() diff --git a/Chapter11/PauseMenu.cpp b/Chapter11/PauseMenu.cpp index b4386d2d..32f0a4e0 100644 --- a/Chapter11/PauseMenu.cpp +++ b/Chapter11/PauseMenu.cpp @@ -9,7 +9,7 @@ #include "PauseMenu.h" #include "Game.h" #include "DialogBox.h" -#include +#include "SDL/SDL.h" PauseMenu::PauseMenu(Game* game) :UIScreen(game) diff --git a/Chapter11/PhysWorld.cpp b/Chapter11/PhysWorld.cpp index 6db12580..bb3d2950 100644 --- a/Chapter11/PhysWorld.cpp +++ b/Chapter11/PhysWorld.cpp @@ -9,7 +9,7 @@ #include "PhysWorld.h" #include #include "BoxComponent.h" -#include +#include "SDL/SDL.h" PhysWorld::PhysWorld(Game* game) :mGame(game) diff --git a/Chapter11/Renderer.h b/Chapter11/Renderer.h index f9f44204..ef2d4f26 100644 --- a/Chapter11/Renderer.h +++ b/Chapter11/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight @@ -103,4 +103,4 @@ class Renderer SDL_Window* mWindow; // OpenGL context SDL_GLContext mContext; -}; \ No newline at end of file +}; diff --git a/Chapter11/Shader.cpp b/Chapter11/Shader.cpp index cae3ac07..e119a655 100644 --- a/Chapter11/Shader.cpp +++ b/Chapter11/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter11/SoundEvent.cpp b/Chapter11/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter11/SoundEvent.cpp +++ b/Chapter11/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter11/Texture.cpp b/Chapter11/Texture.cpp index 9761db84..772ae289 100644 --- a/Chapter11/Texture.cpp +++ b/Chapter11/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter12/Animation.cpp b/Chapter12/Animation.cpp index 1b0a1ba2..bff9826a 100644 --- a/Chapter12/Animation.cpp +++ b/Chapter12/Animation.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" bool Animation::Load(const std::string& fileName) diff --git a/Chapter12/AudioSystem.cpp b/Chapter12/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter12/AudioSystem.cpp +++ b/Chapter12/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter12/DialogBox.cpp b/Chapter12/DialogBox.cpp index 33fe0e0b..ca55daf9 100644 --- a/Chapter12/DialogBox.cpp +++ b/Chapter12/DialogBox.cpp @@ -9,7 +9,7 @@ #include "DialogBox.h" #include "Game.h" #include "Renderer.h" -#include +#include "SDL/SDL.h" DialogBox::DialogBox(Game* game, const std::string& text, std::function onOK) diff --git a/Chapter12/Font.h b/Chapter12/Font.h index 101d4d2b..a88c32de 100644 --- a/Chapter12/Font.h +++ b/Chapter12/Font.h @@ -9,7 +9,7 @@ #pragma once #include #include -#include +#include "SDL/SDL_ttf.h" #include "Math.h" class Font diff --git a/Chapter12/Game.cpp b/Chapter12/Game.cpp index 36faef84..2a2c9e3f 100644 --- a/Chapter12/Game.cpp +++ b/Chapter12/Game.cpp @@ -20,8 +20,8 @@ #include "TargetActor.h" #include "BallActor.h" #include "PauseMenu.h" -#include -#include +#include "SDL/SDL.h" +#include "SDL/SDL_ttf.h" #include "Font.h" #include #include diff --git a/Chapter12/Game.h b/Chapter12/Game.h index d437cc0b..59ed2974 100644 --- a/Chapter12/Game.h +++ b/Chapter12/Game.h @@ -12,7 +12,7 @@ #include #include "Math.h" #include "SoundEvent.h" -#include +#include "SDL/SDL_types.h" class Game { diff --git a/Chapter12/Makefile b/Chapter12/Makefile new file mode 100644 index 00000000..e56f69ce --- /dev/null +++ b/Chapter12/Makefile @@ -0,0 +1,9 @@ +chapter12: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I../fmodlinux/api/studio/inc + g++ -o chapter12 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` `pkg-config --libs SDL2_ttf` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter12 SDL *.o + diff --git a/Chapter12/Mesh.cpp b/Chapter12/Mesh.cpp index 6f3e6fc5..751c7a96 100644 --- a/Chapter12/Mesh.cpp +++ b/Chapter12/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" namespace diff --git a/Chapter12/PauseMenu.cpp b/Chapter12/PauseMenu.cpp index b4386d2d..32f0a4e0 100644 --- a/Chapter12/PauseMenu.cpp +++ b/Chapter12/PauseMenu.cpp @@ -9,7 +9,7 @@ #include "PauseMenu.h" #include "Game.h" #include "DialogBox.h" -#include +#include "SDL/SDL.h" PauseMenu::PauseMenu(Game* game) :UIScreen(game) diff --git a/Chapter12/PhysWorld.cpp b/Chapter12/PhysWorld.cpp index 6db12580..bb3d2950 100644 --- a/Chapter12/PhysWorld.cpp +++ b/Chapter12/PhysWorld.cpp @@ -9,7 +9,7 @@ #include "PhysWorld.h" #include #include "BoxComponent.h" -#include +#include "SDL/SDL.h" PhysWorld::PhysWorld(Game* game) :mGame(game) diff --git a/Chapter12/Renderer.h b/Chapter12/Renderer.h index 5583468a..08b5082c 100644 --- a/Chapter12/Renderer.h +++ b/Chapter12/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight diff --git a/Chapter12/Shader.cpp b/Chapter12/Shader.cpp index 563b9066..4e349511 100644 --- a/Chapter12/Shader.cpp +++ b/Chapter12/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter12/Skeleton.cpp b/Chapter12/Skeleton.cpp index 672de671..f053e2de 100644 --- a/Chapter12/Skeleton.cpp +++ b/Chapter12/Skeleton.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "MatrixPalette.h" bool Skeleton::Load(const std::string& fileName) diff --git a/Chapter12/SoundEvent.cpp b/Chapter12/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter12/SoundEvent.cpp +++ b/Chapter12/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter12/Texture.cpp b/Chapter12/Texture.cpp index 9761db84..772ae289 100644 --- a/Chapter12/Texture.cpp +++ b/Chapter12/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter13/Animation.cpp b/Chapter13/Animation.cpp index 1b0a1ba2..bff9826a 100644 --- a/Chapter13/Animation.cpp +++ b/Chapter13/Animation.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" bool Animation::Load(const std::string& fileName) diff --git a/Chapter13/AudioSystem.cpp b/Chapter13/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter13/AudioSystem.cpp +++ b/Chapter13/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter13/DialogBox.cpp b/Chapter13/DialogBox.cpp index 33fe0e0b..ca55daf9 100644 --- a/Chapter13/DialogBox.cpp +++ b/Chapter13/DialogBox.cpp @@ -9,7 +9,7 @@ #include "DialogBox.h" #include "Game.h" #include "Renderer.h" -#include +#include "SDL/SDL.h" DialogBox::DialogBox(Game* game, const std::string& text, std::function onOK) diff --git a/Chapter13/Font.h b/Chapter13/Font.h index 101d4d2b..a88c32de 100644 --- a/Chapter13/Font.h +++ b/Chapter13/Font.h @@ -9,7 +9,7 @@ #pragma once #include #include -#include +#include "SDL/SDL_ttf.h" #include "Math.h" class Font diff --git a/Chapter13/Game.cpp b/Chapter13/Game.cpp index ed432783..a6c48b5a 100644 --- a/Chapter13/Game.cpp +++ b/Chapter13/Game.cpp @@ -20,8 +20,8 @@ #include "TargetActor.h" #include "BallActor.h" #include "PauseMenu.h" -#include -#include +#include "SDL/SDL.h" +#include "SDL/SDL_ttf.h" #include "Font.h" #include #include diff --git a/Chapter13/Game.h b/Chapter13/Game.h index d437cc0b..59ed2974 100644 --- a/Chapter13/Game.h +++ b/Chapter13/Game.h @@ -12,7 +12,7 @@ #include #include "Math.h" #include "SoundEvent.h" -#include +#include "SDL/SDL_types.h" class Game { diff --git a/Chapter13/Makefile b/Chapter13/Makefile new file mode 100644 index 00000000..459c5968 --- /dev/null +++ b/Chapter13/Makefile @@ -0,0 +1,9 @@ +chapter13: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I../fmodlinux/api/studio/inc + g++ -o chapter13 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` `pkg-config --libs SDL2_ttf` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter13 SDL *.o + diff --git a/Chapter13/Mesh.cpp b/Chapter13/Mesh.cpp index 05573592..9c2ef638 100644 --- a/Chapter13/Mesh.cpp +++ b/Chapter13/Mesh.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "Math.h" namespace diff --git a/Chapter13/PauseMenu.cpp b/Chapter13/PauseMenu.cpp index b4386d2d..32f0a4e0 100644 --- a/Chapter13/PauseMenu.cpp +++ b/Chapter13/PauseMenu.cpp @@ -9,7 +9,7 @@ #include "PauseMenu.h" #include "Game.h" #include "DialogBox.h" -#include +#include "SDL/SDL.h" PauseMenu::PauseMenu(Game* game) :UIScreen(game) diff --git a/Chapter13/PhysWorld.cpp b/Chapter13/PhysWorld.cpp index 6db12580..bb3d2950 100644 --- a/Chapter13/PhysWorld.cpp +++ b/Chapter13/PhysWorld.cpp @@ -9,7 +9,7 @@ #include "PhysWorld.h" #include #include "BoxComponent.h" -#include +#include "SDL/SDL.h" PhysWorld::PhysWorld(Game* game) :mGame(game) diff --git a/Chapter13/Renderer.h b/Chapter13/Renderer.h index 8be10480..03c264ab 100644 --- a/Chapter13/Renderer.h +++ b/Chapter13/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight diff --git a/Chapter13/Shader.cpp b/Chapter13/Shader.cpp index 6c22c937..aa87ad2a 100644 --- a/Chapter13/Shader.cpp +++ b/Chapter13/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter13/Skeleton.cpp b/Chapter13/Skeleton.cpp index 672de671..f053e2de 100644 --- a/Chapter13/Skeleton.cpp +++ b/Chapter13/Skeleton.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL_log.h" #include "MatrixPalette.h" bool Skeleton::Load(const std::string& fileName) diff --git a/Chapter13/SoundEvent.cpp b/Chapter13/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter13/SoundEvent.cpp +++ b/Chapter13/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter13/Texture.cpp b/Chapter13/Texture.cpp index cedbceed..29519f28 100644 --- a/Chapter13/Texture.cpp +++ b/Chapter13/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/Chapter14/Actor.cpp b/Chapter14/Actor.cpp index 8fc150ee..08fea1a0 100644 --- a/Chapter14/Actor.cpp +++ b/Chapter14/Actor.cpp @@ -10,6 +10,7 @@ #include "Game.h" #include "Component.h" #include "LevelLoader.h" +#include const char* Actor::TypeNames[NUM_ACTOR_TYPES] = { "Actor", diff --git a/Chapter14/Animation.cpp b/Chapter14/Animation.cpp index 93d7dc03..d18b5ef2 100644 --- a/Chapter14/Animation.cpp +++ b/Chapter14/Animation.cpp @@ -9,7 +9,7 @@ #include "Animation.h" #include "Skeleton.h" #include -#include +#include "SDL/SDL_log.h" #include "LevelLoader.h" bool Animation::Load(const std::string& fileName) diff --git a/Chapter14/AudioSystem.cpp b/Chapter14/AudioSystem.cpp index 73c5feff..4f1b1f88 100644 --- a/Chapter14/AudioSystem.cpp +++ b/Chapter14/AudioSystem.cpp @@ -7,7 +7,7 @@ // ---------------------------------------------------------------- #include "AudioSystem.h" -#include +#include "SDL/SDL_log.h" #include #include #include @@ -56,7 +56,7 @@ bool AudioSystem::Initialize() } // Save the low-level system pointer - mSystem->getLowLevelSystem(&mLowLevelSystem); + mSystem->getCoreSystem(&mLowLevelSystem); // Load the master banks (strings first) LoadBank("Assets/Master Bank.strings.bank"); diff --git a/Chapter14/DialogBox.cpp b/Chapter14/DialogBox.cpp index 33fe0e0b..ca55daf9 100644 --- a/Chapter14/DialogBox.cpp +++ b/Chapter14/DialogBox.cpp @@ -9,7 +9,7 @@ #include "DialogBox.h" #include "Game.h" #include "Renderer.h" -#include +#include "SDL/SDL.h" DialogBox::DialogBox(Game* game, const std::string& text, std::function onOK) diff --git a/Chapter14/Font.h b/Chapter14/Font.h index 101d4d2b..a88c32de 100644 --- a/Chapter14/Font.h +++ b/Chapter14/Font.h @@ -9,7 +9,7 @@ #pragma once #include #include -#include +#include "SDL/SDL_ttf.h" #include "Math.h" class Font diff --git a/Chapter14/Game.cpp b/Chapter14/Game.cpp index 90519116..5a55256f 100644 --- a/Chapter14/Game.cpp +++ b/Chapter14/Game.cpp @@ -20,8 +20,8 @@ #include "TargetActor.h" #include "BallActor.h" #include "PauseMenu.h" -#include -#include +#include "SDL/SDL.h" +#include "SDL/SDL_ttf.h" #include "Font.h" #include #include "Skeleton.h" diff --git a/Chapter14/Game.h b/Chapter14/Game.h index 57652c83..8b1fa08b 100644 --- a/Chapter14/Game.h +++ b/Chapter14/Game.h @@ -12,7 +12,7 @@ #include #include "Math.h" #include "SoundEvent.h" -#include +#include "SDL/SDL_types.h" class Game { diff --git a/Chapter14/LevelLoader.cpp b/Chapter14/LevelLoader.cpp index 0970b5c0..4b683028 100644 --- a/Chapter14/LevelLoader.cpp +++ b/Chapter14/LevelLoader.cpp @@ -9,7 +9,7 @@ #include "LevelLoader.h" #include #include -#include +#include "SDL/SDL.h" #include "Game.h" #include "Renderer.h" #include "Actor.h" diff --git a/Chapter14/Makefile b/Chapter14/Makefile new file mode 100644 index 00000000..bb1c9881 --- /dev/null +++ b/Chapter14/Makefile @@ -0,0 +1,9 @@ +chapter14: + rm -f SDL + ln -s /usr/include/SDL2 SDL + g++ -c *.cpp -I../fmodlinux/api/core/inc -I../fmodlinux/api/studio/inc + g++ -o chapter14 `ls *.o` `pkg-config --libs sdl2` `pkg-config --libs SDL2_image` `pkg-config --libs SDL2_ttf` -lGL -lGLEW -lSOIL -L../fmodlinux/api/core/lib/x86_64 -lfmod -L../fmodlinux/api/studio/lib/x86_64 -lfmodstudio + +clean: + rm -f chapter14 SDL *.o + diff --git a/Chapter14/Mesh.cpp b/Chapter14/Mesh.cpp index 71b1ed50..a5c0572c 100644 --- a/Chapter14/Mesh.cpp +++ b/Chapter14/Mesh.cpp @@ -11,7 +11,7 @@ #include "Texture.h" #include "VertexArray.h" #include -#include +#include "SDL/SDL_log.h" #include "Math.h" #include "LevelLoader.h" #include diff --git a/Chapter14/PauseMenu.cpp b/Chapter14/PauseMenu.cpp index b4386d2d..32f0a4e0 100644 --- a/Chapter14/PauseMenu.cpp +++ b/Chapter14/PauseMenu.cpp @@ -9,7 +9,7 @@ #include "PauseMenu.h" #include "Game.h" #include "DialogBox.h" -#include +#include "SDL/SDL.h" PauseMenu::PauseMenu(Game* game) :UIScreen(game) diff --git a/Chapter14/PhysWorld.cpp b/Chapter14/PhysWorld.cpp index 6db12580..bb3d2950 100644 --- a/Chapter14/PhysWorld.cpp +++ b/Chapter14/PhysWorld.cpp @@ -9,7 +9,7 @@ #include "PhysWorld.h" #include #include "BoxComponent.h" -#include +#include "SDL/SDL.h" PhysWorld::PhysWorld(Game* game) :mGame(game) diff --git a/Chapter14/Renderer.h b/Chapter14/Renderer.h index 38424e8d..427a9a43 100644 --- a/Chapter14/Renderer.h +++ b/Chapter14/Renderer.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "SDL/SDL.h" #include "Math.h" struct DirectionalLight diff --git a/Chapter14/Shader.cpp b/Chapter14/Shader.cpp index 6c22c937..aa87ad2a 100644 --- a/Chapter14/Shader.cpp +++ b/Chapter14/Shader.cpp @@ -8,7 +8,7 @@ #include "Shader.h" #include "Texture.h" -#include +#include "SDL/SDL.h" #include #include diff --git a/Chapter14/Skeleton.cpp b/Chapter14/Skeleton.cpp index 5e04295d..d6131531 100644 --- a/Chapter14/Skeleton.cpp +++ b/Chapter14/Skeleton.cpp @@ -8,7 +8,7 @@ #include "Skeleton.h" #include -#include +#include "SDL/SDL_log.h" #include "MatrixPalette.h" #include "LevelLoader.h" diff --git a/Chapter14/SoundEvent.cpp b/Chapter14/SoundEvent.cpp index 6edbda39..a6ce8a9e 100644 --- a/Chapter14/SoundEvent.cpp +++ b/Chapter14/SoundEvent.cpp @@ -80,7 +80,7 @@ void SoundEvent::SetParameter(const std::string& name, float value) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->setParameterValue(name.c_str(), value); + event->setParameterByName(name.c_str(), value); } } @@ -123,7 +123,7 @@ float SoundEvent::GetParameter(const std::string& name) auto event = mSystem ? mSystem->GetEventInstance(mID) : nullptr; if (event) { - event->getParameterValue(name.c_str(), &retVal); + event->getParameterByName(name.c_str(), &retVal); } return retVal; } diff --git a/Chapter14/Texture.cpp b/Chapter14/Texture.cpp index 18feab2a..713b8c0d 100644 --- a/Chapter14/Texture.cpp +++ b/Chapter14/Texture.cpp @@ -9,7 +9,7 @@ #include "Texture.h" #include #include -#include +#include "SDL/SDL.h" Texture::Texture() :mTextureID(0) diff --git a/README.md b/README.md index 41b4a0db..32248e9e 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,12 @@ a separate installation from (https://www.fmod.com/download). Download and install version 1.09.x of the FMOD Studio API (newer versions are untested). On Windows, install FMOD to the default directory. On Mac, copy the contents of the FMOD package into External/FMOD. + +To compile on Linux, install g++ and download FMOD API (current 2.00.00) and uncompress in this +same directory as this README.md. Rename the directory created to fmodlinux +Install the dependencis pkg-config GLEW, rapidjson, sdl2, sdl2_image, sdl2_ttf, +sdl2_mixer, and SOIL. Then change in a Chapter directory you want to compile +and execute make. For chapter07 and beyond. Use for x86_64 +$ export LD_LIBRARY_PATH=../fmodlinux/api/core/lib/x86_64:../fmodlinux/api/studio/lib/x86_64:$LD_LIBRARY_PATH +For Chapter08 you need to use a gamepad for input. +