Author Topic: current source state? (Akari?)  (Read 45156 times)

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #25 on: 2008-10-12 13:50:40 »
I can guarantee, that current codebase is compiling and working with gcc-4.2.3 (latest on Ubuntu Hardy) on Linux.
Sweet that sounds great to me.

Currently I am using CodeBlocks for Linux too, it speeds up development process. For now there isn't autotools scripts, so there isn't
any makefiles created. You can use my project file for CodeBlocks, or I can create autotools scripts for project
(however autoconf scripts would be separated from source tree, because Akari don't like Makefile.* in src directory :) ).
I can give CodeBlocks for linux a shot and if worse comes to worse I can just maintain my own simple makefile.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #26 on: 2008-10-15 01:02:29 »
Safe to expect source to work from after the alpha 3 release?

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: current source state? (Akari?)
« Reply #27 on: 2008-10-15 18:42:07 »
Safe to expect source to work from after the alpha 3 release?

I upload source from 3rd alpha to SVN. If someone will use it - I continue to upload, otherwise next upload will be with 4th alpha.

Screen from 3rd alpha:

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #28 on: 2008-10-16 00:28:02 »
I check sourceforge svn and didn't see the update. Is there a different source repository. that i'm missing?

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: current source state? (Akari?)
« Reply #29 on: 2008-10-16 02:28:26 »
I check sourceforge svn and didn't see the update. Is there a different source repository. that i'm missing?

I didn't say 3rd alpha is finished =)

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #30 on: 2008-10-16 02:41:16 »
I didn't say 3rd alpha is finished =)
Oh you tease!!! Haha, i'll continue waiting patiently then.

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Re: current source state? (Akari?)
« Reply #31 on: 2008-10-18 08:01:21 »
I've got final alpha3 sources yesterday from Akari. They are added to SVN now.
Old sources were branched to branches/old_source, new sources are in trunk, as there is right place for them.
Old sources are deprecated and unsupported, however I'll use them sometime when there would be need to test some generic things with sound.
As it was stated earlier, codeblocks is the only build system supported for now.
To begin hacking you need to copy common/linux/qgears.cbp or common/windows/qgears.cbp to root project directory.
For windows compilation you need a huge set of external headers/libraries. A ready set of libraries for linkage you can get either from me or Akari (of course they are not on svn).
For linux compilation and running you need to install all required dependencies, and make symlink /usr/lib/OGRE/RenderSystem_GL.so -> output (or change "Plugin Folder" in "output/plugins.cfg").
Here is list of needed libraries:
libogre
libboost_thread
iconv
libogg
libvorbisfile
libxml5
liblua-5.1 (5.0 version is unsupported)
zlib

Note: win32 default build of libvorbis on the net is broken, as it doesn't export essential function for proper vorbis decoding. Request it, and I'll upload correct build somewhere.
I'll try to create readme file with detail information how to build project, but later.

Happy Hacking! :)

Aali

  • *
  • Posts: 1196
    • View Profile
Re: current source state? (Akari?)
« Reply #32 on: 2008-10-18 11:20:26 »
And once again the SVN is full of Squeenix IP...
Developing a new engine for their game is a grey area, but if you distribute their copyrighted material they have every right to shut you down.

And no, just because it's in a different format does not make it legal.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #33 on: 2008-10-18 15:46:32 »
Looks like some source is missing from Core.
XmlFile.h
ModuleManager.h
Module.h

Unless of course I'm doing something wrong.

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Re: current source state? (Akari?)
« Reply #34 on: 2008-10-18 15:54:44 »
Oops, sorry, haven't commited all files.

Try now, I've added them.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #35 on: 2008-10-18 16:41:31 »
Awesome on that front.
Just a weird issue with CodeBlocks. I have all the vorbisfile includes/libs yet codeblocks isn't picking them up when linking. It's using the proper `pkg-config --libs vorbisfile` and when run in a terminal it spits out the right "-lvorbisfile". I tried adding /usr/include/vorbis to the includes for the project hoping that would help, but not so. Ubuntu Hardy CodeBlocks 8.02

Any advice?

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Re: current source state? (Akari?)
« Reply #36 on: 2008-10-18 16:49:54 »
I guess here is the problem, my `pkg-config --libs vorbisfile` output is "-lvorbisfile -lvorbis -lm -logg", same system as your, libvorbis-dev-1.2.0.dfsg-2
Instead of adding `pkg-config --libs vorbisfile` as parameter to compiler, you can try to add
vorbisfile
vorbis
m
ogg
To "Linker Settings" section of Build options.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #37 on: 2008-10-18 17:51:16 »
I fixed the package issue. I used a different version of vorbisfile because of another project I was working on with some friends. I redid that package and fixed a couple unrelated others but still the issue persists and pkg-config pops right list.

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Re: current source state? (Akari?)
« Reply #38 on: 2008-10-18 18:45:41 »
Can you post here failed codeblocks output?

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #39 on: 2008-10-18 18:52:41 »
Code: [Select]
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::FillBuffer(SoundEngine::Channel&, unsigned int)':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|497|undefined reference to `ov_read'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|521|undefined reference to `ov_time_seek'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|543|undefined reference to `alBufferData'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::StopChannel(SoundEngine::Channel&)':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|425|undefined reference to `alSourceStop'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|429|undefined reference to `alGetSourcei'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|435|undefined reference to `alSourceUnqueueBuffers'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|436|undefined reference to `alDeleteBuffers'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|440|undefined reference to `alDeleteSources'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|443|undefined reference to `ov_clear'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::RefreshBuffers(SoundEngine::Channel&)':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|555|undefined reference to `alGetSourcei'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|560|undefined reference to `alSourceUnqueueBuffers'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|570|undefined reference to `alSourceQueueBuffers'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|577|undefined reference to `alGetSourcei'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|581|undefined reference to `alGetSourcei'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|589|undefined reference to `alSourcePlay'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::OpenALalcError(ALCdevice_struct const*)':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|395|undefined reference to `alcGetError'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|402|undefined reference to `alcGetString'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::OpenALalError()':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|373|undefined reference to `alGetError'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|379|undefined reference to `alGetString'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::OpenALFree()':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|361|undefined reference to `alcMakeContextCurrent'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|363|undefined reference to `alcDestroyContext'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|365|undefined reference to `alcCloseDevice'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::OpenALInit()':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|331|undefined reference to `alcOpenDevice'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|339|undefined reference to `alcCreateContext'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|345|undefined reference to `alcMakeContextCurrent'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|348|undefined reference to `alListenerfv'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|349|undefined reference to `alListenerfv'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|350|undefined reference to `alListenerfv'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::PauseSound(unsigned int, bool)':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|263|undefined reference to `alSourcePause'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|265|undefined reference to `alSourcePlay'|
obj/Debug/src/core/sound/SoundEngine.o||In function `SoundEngine::PlaySoundA(int)':|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|176|undefined reference to `ov_fopen'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|180|undefined reference to `ov_info'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|189|undefined reference to `alGenSources'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|193|undefined reference to `alGenBuffers'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|196|undefined reference to `alSourcei'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|202|undefined reference to `alSourceQueueBuffers'|
/home/bryce/QGears/q-gears/trunk/src/core/sound/SoundEngine.cpp|206|undefined reference to `alSourcePlay'|
||=== Build finished: 37 errors, 0 warnings ===|
I figure the error is something dumb that i'm misssing

**Fixed**
I knew it was something stupid I forgot to restart CodeBocks after I fixed vorbisfile and installed openal which i forgot to install initially.
« Last Edit: 2008-10-18 19:09:37 by likwidoxigen »

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: current source state? (Akari?)
« Reply #40 on: 2008-10-19 04:01:34 »
Thanks G for explaining the projects current build system if I have questions they'll end up in this thread I suppose.

Is there a data flow diagram of information exchanges and changes within Q-gears?
I'll have to look sometime tomorrow to see what is in the repository etc.

Scarily these days I spend very little time implementing and instead architect system function, and data instead.

Cyb

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #41 on: 2008-10-19 06:25:16 »
Is there a data flow diagram of information exchanges and changes within Q-gears?
I'll have to look sometime tomorrow to see what is in the repository etc.
Take a quick read through the gears pdf. It's older but it gives you a good idea of how the modules interact. As for reading Akari's code, it's fantastically well built and definately something to be proud of. It's well thought out and super easy to read.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: current source state? (Akari?)
« Reply #42 on: 2008-10-19 15:06:33 »
Is there a data flow diagram of information exchanges and changes within Q-gears?
I'll have to look sometime tomorrow to see what is in the repository etc.
Take a quick read through the gears pdf. It's older but it gives you a good idea of how the modules interact. As for reading Akari's code, it's fantastically well built and definately something to be proud of. It's well thought out and super easy to read.
Yes I know the diagram from the early days of the project, the problem is I am certain things have changed since then, and that is more or less is what I was looking for.
Akari's code fortunately is an easier read (than mine) I can doxygen it later to get a better idea. I was just curious if the data flow and transformations were diagrammed or not. (is the doxygen project file included with the file set or do I have to DIY it?)

Cyb

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Re: current source state? (Akari?)
« Reply #43 on: 2008-10-19 17:26:03 »
There is neither data flow diagram nor Doxyfile in the project. I doubt, that creating Doxygen documentation will help, as there isn't any comments in doxygen format.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #44 on: 2008-10-19 20:00:01 »
Hey I've got it all compiled fine and it runs lets me get to console etc. No response from /field /battle etc commands don't appear to do anything, the screen just stays black. Console input does work as /quit operates as expected. Maybe an opengl issue (dell 1420 with intel integrated). On the debug compile all goes smoothly. I'm having some issues with the release compile, but I'm sure I can be figuring it out.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: current source state? (Akari?)
« Reply #45 on: 2008-10-20 02:08:38 »
There is neither data flow diagram nor Doxyfile in the project. I doubt, that creating Doxygen documentation will help, as there isn't any comments in doxygen format.
I doubt it would help if I added any doxygen comments, either since I am not the original author.  I've seen lots of arguments between self documenting code and adding good comments.  I've spent a year using doxygen thus far. So I'm somewhat familiar with it.  Someone inexperienced using it might have lots of questions.  I know I am just beginning to use some of it's features.

Oh well I guess it's dig through the code instead.

Cyb

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #46 on: 2008-10-20 05:11:24 »
Ok so I've been playing around with what's around so far and it's pretty freaking awesome. I managed to figure out how the commands work and stuff. I still can't figure out if i'm doing something wrong with the battles yet though, but i'll keep poking around, that's for sure. Very very cool work guys.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #47 on: 2008-10-20 22:38:57 »
So right now i'm trying to understand how the lua script files for the menus work. Here's what I've got so far.

Binder.cpp binds the ModuleManager functions RunField,RunMenu,RunBattle to lua. In lua to call these you would use module:run_field(116) for example. Communication runs through the boost thread g_ModuleManager.

That part seems nice and clear.

Now I'm trying to look at what happens when RunMenu gets called.

ModuleManager makes a new MenuModule and passes in the menu_id. It then goes and spits out "MenuModule created."
Some how the OnStart function gets run (i'm thinking that's an ogre thing?) and then it goes through and creates a new MenuScriptManager
That MenuScriptManager is used to MenuScriptManager.LoadFile("data/menu/simple.lua")
The Load then opens and runs the script.

The Script then runs and becuause after the script is loaded the state is set to MODULE_RUN nothing shows up. If you make it so that after the script loads the state is changed to MODULE_FINISH you can make a module:run_field(116) call and it then shows and works.

I think i just needed to type that out, and I don't know if i have an actual question, but pointers in any which direction would be helpful i think.

*edit yet again*

So it seems like binder.cpp is missing a bind for setting the state of module so you can actually get out of the script. I haven't for the life of me been able to get the script to exit and continue on execution of the game. Maybe I just don't understand the logic in the construction of how it works or how to actually get it to exit, definately toss some advice myway if you've got it.

*edit-- man this is like a stream of consciousness*

I just found the scripts for the functions and maps and i'm going to go through those and hopefully they'll solve my questions.

md1_1.xml has an error.  For encounters it should be 28.125 no 28,125.
« Last Edit: 2008-10-21 03:42:36 by likwidoxigen »

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: current source state? (Akari?)
« Reply #48 on: 2008-10-21 04:05:01 »
So right now i'm trying to understand how the lua script files for the menus work. Here's what I've got so far.

Binder.cpp binds the ModuleManager functions RunField,RunMenu,RunBattle to lua. In lua to call these you would use module:run_field(116) for example. Communication runs through the boost thread g_ModuleManager.

That part seems nice and clear.

Now I'm trying to look at what happens when RunMenu gets called.

ModuleManager makes a new MenuModule and passes in the menu_id. It then goes and spits out "MenuModule created."
Some how the OnStart function gets run (i'm thinking that's an ogre thing?) and then it goes through and creates a new MenuScriptManager
That MenuScriptManager is used to MenuScriptManager.LoadFile("data/menu/simple.lua")
The Load then opens and runs the script.

The Script then runs and becuause after the script is loaded the state is set to MODULE_RUN nothing shows up. If you make it so that after the script loads the state is changed to MODULE_FINISH you can make a module:run_field(116) call and it then shows and works.

I think i just needed to type that out, and I don't know if i have an actual question, but pointers in any which direction would be helpful i think.

*edit yet again*

So it seems like binder.cpp is missing a bind for setting the state of module so you can actually get out of the script. I haven't for the life of me been able to get the script to exit and continue on execution of the game. Maybe I just don't understand the logic in the construction of how it works or how to actually get it to exit, definately toss some advice myway if you've got it.

*edit-- man this is like a stream of consciousness*

I just found the scripts for the functions and maps and i'm going to go through those and hopefully they'll solve my questions.

md1_1.xml has an error.  For encounters it should be 28.125 no 28,125.

There is no menu yet. Just some drafts. Better play with fields. There are really a lot of things that can be done.

likwidoxigen

  • *
  • Posts: 24
    • View Profile
Re: current source state? (Akari?)
« Reply #49 on: 2008-10-31 18:27:16 »
Updated to Ibex. Compile works fine, run fails.

qgears_debug: ../common/dri_bufmgr_fake.c:1054: dri_fake_reloc_and_validate_buffer: Assertion `bo_fake->map_count ==0' failed.

I am damn confused. I can't find that file, and searching the project for the dri_fake_reloc doesn't pop up anything. Any advice?