Nowadays, I modified the iphone version.
Mainly in the way to initialize the orx application in iphone.Instead of generating the appdelegate by orx itself, it can start from your own appdelegate and generating a view controller. Thus it enable to build view flexiablely, for instance, you can establish orx env after playing a video, although, it sacrifice some convenience to transfer from other platform to iphone version.
Besides, I build a xcode project template for it. saving some rename time to have a cup of coffee.
the template is in attachment. Put it on /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates, and the project created by the template is able to work.
it is my first time to build template, maybe in other machine, it unable to work. please apologize for my limited knowledge and I will try my best to fix it.
thank you.
Comments
As for modifying orx application, you should be able to extend orxAppDelegate from outside orx.h/orxiPhone.m (which is a neat feature of objective-C).
However I should probably provide a hook in the applicationDidFinishLaunching() to give the user controls or even just move its code to orx.h so it can be easily modified.
What do you think would be better?
I'd like to have things as most automated as possible but still keeping them customizable. Also the less differences there are between all platforms from a orx-user point of view, the better.
But I can't catch your meaning of
providing a hook in the applicationDidFinishLaunching() to give the user controls or even just move its code to orx.h so it can be easily modified.
sorry for my bad understanding, could you give me a brief structure to implement these two ways to realize users control? thank you .
No worries, it wasn't very clear. Right now orxView is created and executed from the ApplicationDidFinishLaunching() selector which is in orxiPhone.m.
I can make this code public in orx.h so that people can modify it like they want, or I can add a hook: instead of going straight for the orxView, I can create a new thread that will wait till it receives a signal if the hook selector has been implemented, which gives the time to the user to do whatever he wants before orx runs. If the hook selector is not implemented things will work like right now.
This would be one option, but at first I thought that any other view could be added on top of orx and just ask orx not to render its own (by listening to the render event for orxRENDER_EVENT_START and returning orxSTATUS_FAILURE, which prevents rendering to happen completely). In this case there's nothing to change in orx, simple extends orxAppDelegate in the user's own private file, add its view and in the init() callback do whatever he wants with the other views.
I haven't tried myself though, but it sounds like it should work in theory.
and choose the lib according to what's the mode and where you want to run
for example:
the simulator debug mode, you should choose the libsimorxd.a in the simlib folder. and do not choose other lib in lib and simlib
while in the device release, you should choose the liborx.a .
hope you could understand what I mean
ps: the include folder in the template also need to be modified. cause the include folder in template is out of data.