Posts: 1,033
Threads: 85
Joined: Oct 2013
Thanks: 3
Given 37 thank(s) in 22 post(s)
Sorry netbeans is weird. Does anyone know how openAL and assaultcube are... connected? I tried porting sound portion of cube.h into sound.h and sound.cpp, and then audio manager stuff too. But I get errors on ALUint or something and have thus far failed to track down an error. Anyone know how these things connect?
Posts: 205
Threads: 6
Joined: Oct 2012
Thanks: 14
Given 17 thank(s) in 9 post(s)
Your questions does not makes sense at all.
Making good use of programming terminology will help you understand the concepts and be able to reformulate correct questions.
I'm not trying to be harsh, that said: It's not 'conected' the correct term to say is 'linked'; OpenAL, OpenGL, Enet, SDL are assemblies (in the context of a managed environment) which can be dynamic or static libraries that are linked to an executable. Also you don't say 'porting', porting is when you translate source code from either to another language or another architecture. By making use of library calls you are not porting it you are merely using the library.
Also you don't specify what are you trying achieve and what are the specific problems you've encountered in the process of doing it. People that could help, will be unable to since it is hard to guess what are you trying to do.
My guess is that you are getting linker errors and/or a bad configurations in Netbeans.
Posts: 1,033
Threads: 85
Joined: Oct 2013
Thanks: 3
Given 37 thank(s) in 22 post(s)
Sorry I've been a bit out of it because of engineering final projects and exams (give me another week).
I'm trying to refactor the code so that it makes more sense. However, moving portions of cube.h into files with names that make more sense (sound.cpp, etc) seems to lead to some (dependency, linking) errors. So I looked at the included libraries and tried to figure out exactly what section of code depends on what library. However, after trying to isolate audiomanager.cpp (this may or may not be a good idea, I realized later) from cube.h, I started getting openAL linking errors because it says that certain openAL variables are not defined in the correct scope. Hence, I was trying to track down where exactly the openAL library is included in cube.h so that I can play around with and see if I can accomplish this properly.
Does that make more sense? If not, give me a couple days sleep.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
AC won't ever have clean code tbh, its gone too far.
Its all intertwined and mixed up together, and cube.h is pretty much the center for it all.
Also, what are you moving from a .h to a .cpp?
Try clearing your copy of all changes, then doing the most minimal amount of change that causes a bug. If that doesn't tell you the problem, post it here.