This is a request to merge my new Mac front end, which is a much-improved version of my work at http://ridiculousfish.com/angband/.
I am calling this the "Cocoa" front end (i.e. Makefile.cocoa, main-cocoa.m) I hope eventually my version will become the canonical Mac Angband, but for now it lives alongside the existing "osx" front end. This merge does not touch any existing file, and the osx front end continues to build normally. The Cocoa version builds similarly to the osx front end (cd src; make -f Makefile.cocoa) and was developed against master.
This new Cocoa version is much nicer than the existing Carbon-based implementation. It uses Quartz for non-uniformly scaled text that always fills the window. It has support for sound, graphics, custom fonts (both monospaced and variable width), multiple terms (finally), and full screen. It builds with clang and is overall much more of a modern Mac app.
This front-end is tested on OS X SnowLeopard and Lion (10.6 and 10.7) on Intel machines only. It could probably be made to work on earlier versions and on PowerPC, but I do not have those systems available for testing. The osx front end should continue to work there.
Initial import of Cocoa front end to Angband
Fix for a black screen issue if there was no preference file
Fix to allow loading a save game from the Finder in the welcome screen
Fix an out of date prompt
Fix for terms randomly popping up after selecting them in preferences.
Renamed a function from mac -> cocoa
Full screen support in Lion
Redeclare setRestorable: to avoid an error when building on 10.6
Awesome, thanks so much! I will get this tested and merged ASAP.
So, one thing that I noticed when merging is that it looks like the snapshot of main-crb.c you used predates some work we did to pull the graphical modes out into a file (graphics.txt). This means we are no longer hardcoding the tilesets in the various main interfaces.
I'm currently trying to make this change to main-cocoa.m but I figured I'd mention it, in case either you thought you could do it faster, or just to let you know that I'm working on the pull.
This request has been merged into angband/staging and will soon appear in angband/master. One outstanding issue is that I haven't updated the Graphics submenu to dynamically build its contents from lib/xtra/graf/graphics.txt. Recent main-crb.c does this (as well as other ports).
I will try to fix this soon, but if you have a moment and felt like doing that it would be awesome.
Thanks again for this great contribution!
Thanks for taking this! I'm happy to hear about a dynamically Graphics menu and I'll be glad to implement that in Cocoa-land.
Awesome! I want this for FA so bad.
For those of you following this pull request, especially ridiculousfish, I'd appreciate any comments you have for my follow-up work at #171