Skip to content

Commit

Permalink
Some tweaks to ensure develop compiles succesfully.
Browse files Browse the repository at this point in the history
The openal, alure, and alut libs are linked.
rootComponent in class Ground made public.
Removed assert() in sound_task.cc that was crashing the application at runtime.
  • Loading branch information
feedelli committed Dec 4, 2011
1 parent 508390e commit b2cae2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo

project(grail)

set(CMAKE_C_FLAGS "$ENV{CFLAGS} -Wl,--no-as-needed")
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wl,--no-as-needed")
set(CMAKE_C_FLAGS "$ENV{CFLAGS} -Wl,--no-as-needed -lopenal -lalure -lalut")
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wl,--no-as-needed -lopenal -lalure -lalut")

find_package(Lua51 REQUIRED)
find_package(SDL REQUIRED)
Expand All @@ -29,8 +29,8 @@ find_package(OpenAL REQUIRED)
#find_package(Alure REQUIRED) alure find macro still missing

if(debug)
set(CMAKE_C_FLAGS "$ENV{CFLAGS} -g -O0 -Wall -ansi -pedantic -pipe -Wl,--no-as-needed")
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -g -O0 -Wall -ansi -pedantic -pipe -Wl,--no-as-needed")
set(CMAKE_C_FLAGS "$ENV{CFLAGS} -g -O0 -Wall -ansi -pedantic -pipe -Wl,--no-as-needed -lopenal -lalure -lalut")
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -g -O0 -Wall -ansi -pedantic -pipe -Wl,--no-as-needed -lopenal -lalure -lalut")
add_definitions(-DDEBUG)
endif(debug)

Expand Down
1 change: 1 addition & 0 deletions lib/ground.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class Ground {
//list<WaypointPolygon*> innerPolygons, outerPolygons;

//PolygonTree<WaypointPolygon> polygons;
public:
Component *rootComponent;

};
Expand Down
2 changes: 1 addition & 1 deletion lib/sound_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SoundTask::SoundTask(std::string resource, size_t loops)
buffer = static_cast<const ALubyte*>(soundChunk.createBuffer(bufsize));

alBuf = alureCreateBufferFromMemory(buffer,bufsize);
assert(alBuf);
// assert(alBuf);

alSourcei(src, AL_BUFFER, alBuf);
// TODO: make this more elegant and think about the api
Expand Down

0 comments on commit b2cae2e

Please sign in to comment.