discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ghack - GNUstep roguelike


From: Turtle Wizard
Subject: Re: Ghack - GNUstep roguelike
Date: Wed, 13 Mar 2013 12:07:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (darwin)

"Dr. H. Nikolaus Schaller" <hns@goldelico.com> writes:

> Well, even on GNUstep it is wrong to initialize an object that is already 
> initialized.
>
> And the [Class new] method is a shortcut for [[Class alloc] init].
>
> i.e. you have to replace
>
> [[[Class alloc] init] initWithString:...]
>

You can overload class and instance methods with an id or pointer, it just 
overloads no
alloc it returns a self, this is possible in SmallTalk, I don't see any reason 
why
this should not work. It's a sort of subclass responsability.

>
>> 
>>>> 
>>>> 2. OS X and QantumSTEP don't have the PS() operator functions
>> 
>> There is GS in this case on MacOS X, with some other framework library for 
>> iOS.
>
> ???
>
> I want to link your code either against Cocoa or QuantumSTEP. And these 
> systems don't provide the PS() operators. I.e. your code is making 
> assumptions about the libraries that limit portability. But all of them 
> provide a full implementation of NSBezierPath. So why use cryptic and 
> undocumented PS()-operators instead of a well documented @interface?
>

Sorry, I thought AppKit provided these with CGRectMake and the other way round,
NSMakeRect.

>> 
>>>> 
>>>> I have added some macros to my code to build an NSBezierPath and 
>>>> fill/stroke it.
>>>> 

I understand.

>>>> 3. there is no [con getSymbolData] method in drawRogueCharacter
>>>> 
>>>> Shouldn't that be getCharacterXpmData?
>> 
>> This is in development if I find the time for it.
>
> Ok, I will watch out for updates.
>

yes it returns Xpm.m's code :-)

>> 
>>>> 
>>>> 4. the code uses strndup() which is a GNU/Linux extension not available 
>>>> everywhere
>>>> 
>> 
>> Again, GNUStep is a UNIX/Linux system.
>
> No. GNUstep also runs on BSD and others. Even Windows.
>
> See: http://stackoverflow.com/questions/6062822/whats-wrong-with-strndup
>

Thanks.

>> 
>>>> I have added the code from 
>>>> http://opensource.apple.com/source/gcc/gcc-5575.11/libiberty/strndup.c
>>>> 
>>>> 5. the GhackInfo.plist is missing some or using different keys for OS X 
>>>> (icon file, executable)
>>>> 
>>>> BR and please continue the good work!
>> 
>> These are in ./Resources/. It uses the mouse not the keyboard :-)
>
> ???
>
> Key = key for a NSDictionary. Not Key-board button.
>
> Your http://code.google.com/p/ghack/source/browse/Ghack-0.1/GhackInfo.plist 
> defines:
>
> {
> ApplicationDescription = "GNUstep roguelike game";
> ApplicationIcon = "Ghack.tiff";
> ApplicationName = Ghack;
> ApplicationRelease = "0.2";
> Authors = (
> "Marko Riedel"
> );
> Copyright = "Copyright (C) 2002-2011 Free Software Foundation, Inc";
> CopyrightDescription = "Released under GPL v2";
> FullVersionID = "0.2";
> NSExecutable = Ghack;
> NSIcon = "Ghack.tiff";
> NSPrincipalClass = NSApplication;
> NSRole = Application;
> URL = "http://gap.nongnu.org/gmines/";;
> }
>
> For being source code compatible to Cocoa it should include
>
> ApplicationIcon -> CFBundleIconFile
> FullVersionID -> CFBundleVersion
> NSExecutable -> CFBundleExecutable
> NSIcon -> CFBundleIconFile
>
> etc.
>

Thanks again for the example.

>> 
>> Good points, Thanks for the comment.
>
> Yes, please improve!
>

I made a preliminary iOS version here : 
http://ghack.googlecode.com/files/Ghack-ios-0.1.8.tar.gz

I don't think I can make it possible for not having 2 codebases, though
some things are shared. HTH.

Fyndhorn Elder


reply via email to

[Prev in Thread] Current Thread [Next in Thread]