pingus-devel
[Top][All Lists]
Advanced

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

Re: Platform Specific Code


From: Ingo Ruhnke
Subject: Re: Platform Specific Code
Date: 21 Oct 2002 22:19:43 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Philippi <address@hidden> writes:

> On Monday 21 October 2002 21:30, Neil Hotmail wrote:
>> There are a fair few (say 10/15), but the important thing is there are
>> more than there need to be.
> 
> Sure, I consider them ugly anyway.

By far most of them are already in system.cxx or in algo.cxx, a few
others are in the startup code (needed cause you don't have a $HOME
under windows) and I couldn't really find anything in the gamecode. In
pingus_resource.cxx there is something that could be placed inside
system.cxx, but thats basically all.
 
>> #ifdef WIN32
>>    #include "Win32/Standard"
>> #elseif LINUX
>>   #include "Linux/Standard"
>> #else
>>   #die painfully
>> #endif
>>
>> This way pingus.hxx would include the appropriate platform specific
>> code, as above, the fact that its included by everything should
>> make it a lot easier. It will also make it shorter when Pingu's
>> gets ported to 50 OS's.
 
There is no linux specific code in Pingus, its basically all POSIX
compliant (or should be) so it should compile on nearly all unix
platforms. Well, ClanLib might be a bit of a show-stopper here, but
Unixes beside GNU/Linux arn't really used for games so I don't care
much. So after all it should be:

#ifdef WIN32
...
#elseif MACOSX
...
#else // POSIX
...
#endif

> Well to include platform specific differences was dteh idea behind
> pingus.hxx. But I wonder how you'll manage to port to 50 OS's - I've
> never heard of that many. ;-)

There might be BeOS (if it ever comes back to life) and probally most
important MacOSX, the rest doesn't really matter.

-- 
WWW:      http://pingus.seul.org/~grumbel/ 
Games:    http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden 
ICQ:      59461927




reply via email to

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