Vinterstum wrote:Ahh yeah that could be. I (obviously) compile with the unofficial SDK as well, so I already had that laying around. I'll see if I can generate Info.plist directly instead, without depending on make.
If you don't want to depend on Make, and if you only need it for Info.plist.in it would be easy to make a shell script for that (instead of the Run Script phase with the invocation to Make):
Code: Select all
VERSION=`cat $SRCROOT/../../base/internal_version.h | cut -d" -f2`
cat $SRCROOT/Info.plist.in | sed -e "s/@VERSION@/$VERSION/g" > $SRCROOT/Info.plist
Having $(SRCROOT)/Info.plist.in as input file and $(SRCROOT)/Info.plist as output.
Vinterstum wrote:Currently, the only way is to actually include the game data files in the XCode project.
When ScummVM runs like this, it's pretty sandboxed and can't access the other application folders (so using things like File Magnet and whatnot won't work).
Pretty much the only way to "solve" this would be something like embedding an FTP server into ScummVM :/. Or there may be some apps around that'll upload (over USB, using whatever protocol iTunes/XCode uses) files directly to the application folder, like iPhoneBrowser and whatnot. I'll look into this some more.
Yeah, including the game files inside the app worked. It has been hard finding the application using the GUIDs, but I have found it. Maybe I can make some kind of first-time initialization that copies the embedded game files to the document folder of the application (or maybe symlink them), or even create the config entries for each of the directories included in the application.
Vinterstum wrote:That's just the tip of the iceberg, unfortunately. The assembler Apple uses is based on an ancient, ancient version of the GNU assembler and supports very little of what you generally use for "handwritten" assembly. I'm sure it would be possible to convert the asm to pretty much what the compiler would output (which is all it's able to handle), but I haven't really seen the point yet. The speed loss isn't that big. And it would make the assembly source a lot less readable.
I have tried inlining the assembly code, but unfortunately it do not work (it crashes, obviously). But as you say, I really don't see the need for optimizing more the code (at least Monkey Island plays fine).
Vinterstum wrote:Not sure what you mean by "OpenGL specific main loop"
![Smile :)](./images/smilies/icon_smile.gif)
. The iPhone supports the texture_rectangle_ARB extension (or whatever the name is), so you can pretty much set up a few 1024x1024 textures (or tile smaller ones), update subregions of that when necessary, and use that extension to do a direct draw (or set up vertices normally for the Simulator, which doesn't support that extension). One texture for the main screen, one for the overlay, and one for the cursor. This setup would save one layer of blitting (and can do the rotation on the hardware side) and may well be faster than the current code.
Doing most of this from the thread ScummVM runs in shouldn't be a problem, I'd think, but I haven't played around with it too much yet.
Sorry, I was thinking maybe in Glut or something like that. OpenGL do not have main loop.
From that point you "lost" me. I haven't touched OGL in many years (when all was fixed pipeline), but I'll try to look at the extension you are talking about. But I'm a bit behind here.
Vinterstum wrote:Ahh nice, thanks
![Smile :)](./images/smilies/icon_smile.gif)
. I haven't been working with XCode for too long, so I don't know all the tricks yet
![Smile :)](./images/smilies/icon_smile.gif)
.
Yeah, odities of Xcode.
Btw, if someone came across this thread and want to play its games on the iPhone using the official SDK, this is the process I have used to include a game ("monkey", from now on):
- Create a new top-level group name "gamefiles".
- Create inside it a new group named "monkey".
- In this group right click "Add > Existing Files". Search for your game files in your hard drive (can be anywhere, I have used my game files from ScummVM for Mac OS X).
- In the dialog do not check "Copy files", and do not add the files to any target. Path Type can be anyone, but Absolute will be the best (if you don't move your game files around).
- Add a new Copy Files phase to ScummVM target.
- In the Info window set Destination to Resources and Path to "gamefiles/monkey" (the first directory is only for organization pourposes).
- Drag the game files you have added to this new build phase.
- Compile and install the application into the device.
- Search inside /var/private/mobile/Applications for ScummVM application. There are no names, only numbers and letters, you will have to search one by one, until some directory have the gamefiles directory inside.
- Choose "monkey"
Another little thing: ScummVM icon already have the glare applied so it would be convenient to have UIPrerenderedIcon key set to false in Info.plist (at the bottom of Info.plist.in, before the clossing tags for dict and plist):
Code: Select all
<key>UIPrerenderedIcon</key>
<false/>
Have fun.[/code]