• entries
    383
  • comments
    1075
  • views
    352189

Diagonal Updates

Sign in to follow this  
Trapper Zoid

97 views

Brief run down of newly implemented features in the Diagonal Game Library:
  • PhysicsFS is now integrated in. I've stripped it down to only read plain directories and ZIP files, but it appears to be working fine.
  • Logging has been ported across from my old engine. I have my colour coded HTML log messages back again, now running through PhysicsFS.
  • TinyXML has been integrated in to work with Diagonal and PhysicsFS - I had to rewrite the loading and saving functions for it to be less of a pain. Luckily I already had a PhysFS variant of fprintf written for the logging system so it was pretty painless.
  • XML setting system has been ported and expanded. I can now read and write integer, float and string settings into a layered XML settings file.

Coming soon:
  • Testing all this on the MacBook Pro. I should switch over to developing on there more often, but my subversion archive is on my PC and I haven't got a network link between the two, so keeping the code in sync is difficult.
  • Getting the SDL initialisation working properly



Update!

The MacBook Pro tests are not going so well. I expected weird errors but these ones are extremely vexing. My Mac version of Code::Blocks has decided to throw weird incompatibility errors at random at me which I suspect have more to do with the compiler and/or IDE than my code. Xcode seems to compile everything, but I have had trouble figuring out how to link to the Boost test library framework. My SDL version seems to throw an complaint that I've got two main functions, which is bizarre. And now it won't let me clean the project.

It's enough for me to try and go with g++ and makefiles (if I could remember the arcane set of instructions to get those working...)
Sign in to follow this  


5 Comments


Recommended Comments

Boost test library? Like for unit testing?

I've been using the unit testing stuff that comes with Xcode, and Tut successfully. I'd have to read up on it, but if it works from command line GCC it should work in Xcode.

SDL subverts the main function you normally add into your code and replaces it with SDL_main. Your real main function is in the SDLmain.m file that it installs into your project when you make a new SDL project from a template. Generally this error occurs because you haven't included SDL from the file that has your main function in it, so the macro doesn't have a chance to work.

Share this comment


Link to comment
If you've include the SDL headers and it still complains about two main functions make sure that its prototype is exactly int main(int argc, char* argv[]). Otherwise the SDL Macro won't correctly rename yours.

Share this comment


Link to comment
Thanks - I'll give those a try. I hunted down the same two suggestions on the SDL help page after making that post and they both apply; I've used char **argv instead of char *argv[] and don't have SDL included in my main module.

I still need to figure out how to link up libraries in Xcode, but that's just due to my unfamiliarity with the IDE.

Share this comment


Link to comment
In Xcode, you can link libraries by just dragging them from Finder into the Xcode "Frameworks -> Linked Frameworks" group, or altering your command line to just do -lwhatever.

I can take some screenshots if you tell me what you type at the command line :)

Share this comment


Link to comment
Quote:
Original post by Ravuya
In Xcode, you can link libraries by just dragging them from Finder into the Xcode "Frameworks -> Linked Frameworks" group, or altering your command line to just do -lwhatever.

I can take some screenshots if you tell me what you type at the command line :)

Heh, didn't see this post before I tried to figure this out on my own. I need to check here more often [smile].
I'll need hunt around all those default Xcode settings to see what goes where though; my current frameworks aren't particularly organised. It does seem to work for testing though.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now