Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old December 19, 2011, 17:33   #1
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,770
Derakon is on a distinguished road
Cocoa build on OSX

I'd like to be able to get some coding done while I'm on vacation. However, my (newly-replaced after the old one died) laptop is running OSX 10.7. The Carbon build no longer compiles, presumably because Apple got around to nixing support for Carbon. The Cocoa build does compile...but it has some issues. Here's the splash screen, for example:



Looks an awful lot like the UTF-8 display bug, and reminds me of the other time I encountered garbled text. Is this known?
Derakon is offline   Reply With Quote
Old December 19, 2011, 19:52   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,568
Donated: $60
Nick is on a distinguished road
The Cocoa issue is known, and (at least) believed to be a UTF-8 thing.

This thread may has some information, but maybe not the full story.

I am currently able to compile FAangband (and Beleriand, such as it is) on 10.7 - they are both on github. In both cases I have made a main-leo.c and a Makefile.leo (yes, I know) and it all works fine, but as the thread shows, camb had some difficulties with NPP.

Of course, you could always spend your time fixing the Cocoa port
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old December 21, 2011, 05:07   #3
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,770
Derakon is on a distinguished road
I opted for the latter, on the theory that Cocoa is the way of the future. And progress is being made. So.

In z-term.c, we're tossing around wchar_t character arrays. term_text_cocoa in main-cocoa.m didn't know this and was treating them as char arrays. This had two main effects:

* Only 1/4th of the string to be drawn actually got drawn.
* The characters in what was drawn were drawn 4 times further apart than they should have been.

Fortunately, just changing the type of the argument to the function, and a few manual casts, fixed that issue, so now the game will run legibly, at least in my brief tests.

UTF-8 support isn't perfect yet; Mumaks are displayed as "Mûmak" (that's M, A with a tilde, double-close-wakka (i.e. ">>" as a single character), "mak"). Still, this is a damned sight better than what we used to have.

One concern: the Cocoa port scales the fort size with the window size (the fonts menu lets you set the font size, but that just tweaks how detailed the fonts are). I'd much rather scale the viewable area with the window size and set the font size elsewhere. Does anyone know offhand how to enable that behavior? Or am I going to have to figure it out myself? (EDIT: also, no extra term windows = sad Derakon)

Anyway, here's the change.

Last edited by Derakon; December 21, 2011 at 05:23.
Derakon is offline   Reply With Quote
Old December 21, 2011, 07:18   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,568
Donated: $60
Nick is on a distinguished road
This is awesome.

Quote:
Originally Posted by Derakon View Post
One concern: the Cocoa port scales the fort size with the window size (the fonts menu lets you set the font size, but that just tweaks how detailed the fonts are). I'd much rather scale the viewable area with the window size and set the font size elsewhere. Does anyone know offhand how to enable that behavior? Or am I going to have to figure it out myself? (EDIT: also, no extra term windows = sad Derakon)
Those are the two immediate issues for me, too. One other thing I noticed (I'm not sure if it's just v4 or V as well); 'K' for unignore conflicts with run north using the roguelike keys. Filed as #1604.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old December 21, 2011, 07:43   #5
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 38
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Derakon View Post
One concern: the Cocoa port scales the fort size with the window size (the fonts menu lets you set the font size, but that just tweaks how detailed the fonts are). I'd much rather scale the viewable area with the window size and set the font size elsewhere. Does anyone know offhand how to enable that behavior? Or am I going to have to figure it out myself? (EDIT: also, no extra term windows = sad Derakon)
Hey.

I've been absent for awhile but I will just pop in to say that:

1. The guy who coded up this port is here: http://ridiculousfish.com/blog/

2. I think he specifically wanted the scaling for e.g. Angband screensavers and full screen mode. It may be possible to compromise on a menu option or a preference or something for how to handle scaling--I'm not sure.

I too find that the scaling (especially with subwindows) to be a bit of a weird thing.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old December 21, 2011, 09:47   #6
ghengiz
Adept
 
ghengiz's Avatar
 
Join Date: Nov 2011
Location: Roaming in Terry Pratchett's Discworld
Posts: 178
ghengiz is on a distinguished road
Quote:
Originally Posted by Derakon View Post
no extra term windows = sad Derakon
that's exactly why I ditch the osx version (which would be native on my laptop) in favour of compiling the console version with X11 support
ghengiz is offline   Reply With Quote
Old December 21, 2011, 17:44   #7
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,770
Derakon is on a distinguished road
Magnate asked me to put the Cocoa stuff in its own branch...so, only forty-five minutes of wrestling with git later, here we are.

Thanks for pointing me to the original port creator, Fizzix. We'll see how much effort I'm willing to devote to Cocoa instead of the new combat system; my main objective was just to get something that would run nicely on my laptop, and that's accomplished.

EDIT: ah, extra term windows work differently in the Cocoa branch. Instead of opening a new window, then telling the game what to draw there (via the window settings options), you just set the options and new terms are automatically created or destroyed. That's neat, if a bit contrary to how I'm used to things working.

Last edited by Derakon; December 21, 2011 at 17:55.
Derakon is offline   Reply With Quote
Old December 21, 2011, 20:30   #8
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Quote:
Originally Posted by ghengiz View Post
that's exactly why I ditch the osx version (which would be native on my laptop) in favour of compiling the console version with X11 support
Hm, are you talking about the Cocoa version or the Carbon version? The latter supports subwindows just fine, albeit slightly differently from how other ports handle them.
myshkin is offline   Reply With Quote
Old December 21, 2011, 20:32   #9
myshkin
Angband Devteam member
 
Join Date: Apr 2007
Posts: 334
myshkin is on a distinguished road
Quote:
Originally Posted by Nick View Post
Those are the two immediate issues for me, too. One other thing I noticed (I'm not sure if it's just v4 or V as well); 'K' for unignore conflicts with run north using the roguelike keys. Filed as #1604.
Thanks. I thought I'd noted that before, but I can't find a ticket. A workaround for the moment is \K, but of course that's obnoxious to use.
myshkin is offline   Reply With Quote
Old December 21, 2011, 22:33   #10
ghengiz
Adept
 
ghengiz's Avatar
 
Join Date: Nov 2011
Location: Roaming in Terry Pratchett's Discworld
Posts: 178
ghengiz is on a distinguished road
Quote:
Originally Posted by myshkin View Post
Hm, are you talking about the Cocoa version or the Carbon version? The latter supports subwindows just fine, albeit slightly differently from how other ports handle them.
I know...but I have a little nuisance that can be sintetized in the following two points:
1) the last osx pre-made version for vanilla is 3.2, which works fine, even the sub-windows part, but I like 3.3.2 more;
2) I cannot compile successfully main-crb.c of v3.3.2 on lion 10.7.2 with neither xcode 4.2 nor fink' gcc' libraries, due apparently to some issues introduced with the mouse routines.

I don't mind to tinker with the source files to make the mouse working (and therefore to finish the compilation), when I can just compile the curses version with X11 support

In order to answer your question, I suppose it's the carbon version, because the makefile.osx tries to compile main-crb.c
ghengiz is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mk build system? CJNyfalt Development 11 March 25, 2015 07:25
OSX build working again Magnate Development 9 October 30, 2011 08:13
Nightly build Jungle_Boy Development 7 September 16, 2011 08:00
getting started on OSX cinereaste Development 8 August 6, 2010 04:13
OSX Tileset help? ZorroRoaster Variants 1 March 31, 2009 00:09


All times are GMT +1. The time now is 23:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.