Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : Compiling on MacOS X
1
Page 2 of 2
New Topic New Poll Post Reply
Poster Message
ross
Level: Delver
Rank Points: 30
Registered: 05-17-2003
IP: Logged
icon Re: Compiling on MacOS X (0)  

Maybe my 500Mhz mac is too slow generally :( I'll try it on one of the new iMacs tomorrow at work.
05-21-2003 at 09:58 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
ross
Level: Delver
Rank Points: 30
Registered: 05-17-2003
IP: Logged
icon Re: Compiling on MacOS X (0)  

Is X_OK in Screen.cpp used? I get a parse error from GCC but it still compiles without it.
05-23-2003 at 10:26 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
ross
Level: Delver
Rank Points: 30
Registered: 05-17-2003
IP: Logged
icon Look familiar? (0)  
Does this look familiar?? (Apologies for the size, I'm too excited).



I've still got a couple of problems. Check out the
text at the top of the image. This appears
everywhere when I try and display text. I thought (as
Schik suggested) it might be an endian-ness
problem, but I've made the changes he suggested
and nothing. Possibly it's a problem with SDL_ttf on
MacOS X? I'll have to have a scout about.


And because I've compiled from Makefiles as a
Terminal app, I can only launch it from there (which
means I don't get any keyboard input. I guess this
means that I'll have to get this building in Project
Builder instead to have it all running properly.


Having said that I think the port to Linux is going to
be a piece of cake, just grepping for __APPLE__ (or
__sgi). Apart from DbPackedVars and DbRooms that
is.


Did I mention how excited I was?? :)
05-25-2003 at 10:49 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: Look familiar? (0)  
ross wrote:
Does this look familiar?? (Apologies for the size, I'm too excited).
Wow.

I just barely resisted the urge to fire off e-mails to my Mac-owning friends w/the screenshot. I decided it would be more impressive to wait until it can be installed on their machines. I called in Brittany and showed it to her for want of somebody to share it with, but I don't think she understood the work involved to get to this point. It's nice to see some of my cross-platform design decisions vindicated. But of course, you and Schik are tieing up all the loose ends to finish the port, so I can't take very much credit.
Having said that I think the port to Linux is going to be a piece of cake, just grepping for __APPLE__ (or __sgi). Apart from DbPackedVars and DbRooms that is.
If it can be managed, it would be nice to have some abstraction to the #ifdefs. So in one place (Ports.h, I suppose) you can say something like:

#ifdef __APPLE__
# define LITTLE_ENDIAN
#elif _SGI_
# define BIG_ENDIAN
#elif WIN32
# define LITTLE_ENDIAN
#endif

I don't know what makes sense to abstract--above is just an example. I would like to avoid code like:

#ifdef _SGI_
#ifndef _OX_2234_2saaAA_
int x = 0;
#else
#ifdef TRS_80_EMULATOR
int x = 1;
#endif
#elif GUMBO_2000
#define BETAMAX_SUPPORT
int x = 0;
#endif
#else
int x = 0;
#endif

...all over the project, enclosing many small pieces of code where platform-specific compilation decisions must be made.

However, if in doubt, do it your way (whichever it is), and we will reorganize things as needed down the road. With three supported platforms, it is not so complicated yet.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
05-25-2003 at 11:26 PM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
ross
Level: Delver
Rank Points: 30
Registered: 05-17-2003
IP: Logged
icon Re: Re: Look familiar? (0)  
ErikH2000 wrote:
Wow.

My thoughts exactly :) Surprised I managed it with only a single .m file :)

If it can be managed, it would be nice to have some abstraction to the #ifdefs. So in one place (Ports.h, I suppose) you can say something like:

#ifdef __APPLE__
# define LITTLE_ENDIAN
#elif _SGI_
# define BIG_ENDIAN
#elif WIN32
# define LITTLE_ENDIAN
#endif

That sounds more than reasonable. I actually had a similar idea (although I wanted to do the endian-check in code - for those Linux PPC guys - both of them).

I thought it might be nice to extend the idea of Ports.h into a separate lib that is only needed on non-windoze machines. What I'd really like is to get rid of all the defines (like ALL) as well by providing a little 'portability kit' mimicking (sp?) all of the win32 funcs that you use. That way the only #defines we will need will be for endian-ness. There are likely to be a couple of issues (#include <wchar.h> is one) where something is available on windows/linux but not on Mac, but I could iron those out later. I thought I might do this after this release and before the next biggy :)

Anyway I better get this stuff into Project Builder and see if I can build it in there..... <gulp>
05-25-2003 at 11:36 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: Re: Re: Look familiar? (0)  
ross wrote:
That sounds more than reasonable. I actually had a similar idea (although I wanted to do the endian-check in code - for those Linux PPC guys - both of them).
Sounds clever. I worry about performance, but maybe after looking at it, we will find it isn't an issue.

...
What I'd really like is to get rid of all the defines (like ALL) as well by providing a little 'portability kit'
...
Cool. Let's make plans after the release, Ross.

Also, my regular (paying) work is pushing me into cross-platform development including GCC and Linux. So I'll be in a better position to follow along with needed cross-platform changes in DROD.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
05-26-2003 at 12:13 AM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
ross
Level: Delver
Rank Points: 30
Registered: 05-17-2003
IP: Logged
icon Re: Re: Re: Re: Look familiar? (0)  
ErikH2000 wrote:
Sounds clever. I worry about performance, but maybe after looking at it, we will find it isn't an issue.

Nah not so clever. Just moving most of schiks Ports.cpp into a windows.h alike for non-windows machines. There is little point really having Ports.h/cpp on windows. This should not be too hard a task as Schik has done most of the hard work.

Cool. Let's make plans after the release, Ross.

Suits me fine.

Also, my regular (paying) work is pushing me into cross-platform development including GCC and Linux. So I'll be in a better position to follow along with needed cross-platform changes in DROD.

.. and my paying work pushes me further and further away from portable code :~) (I hate C#).

05-26-2003 at 12:22 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5381
Registered: 02-04-2003
IP: Logged
icon Re: Re: Look familiar? (0)  
ErikH2000 wrote:
But of course, you and Schik are tieing up all the loose ends to finish the port, so I can't take very much credit.
Well, except for having the foresight to use portable libraries in the first place. And coding everything else 99% portably. Oh yeah, and making the game in the first place. Hard to port it if it doesn't exist.
If it can be managed, it would be nice to have some abstraction to the #ifdefs. So in one place (Ports.h, I suppose) you can say something like:

#ifdef __APPLE__
# define LITTLE_ENDIAN
#elif _SGI_
# define BIG_ENDIAN
#elif WIN32
# define LITTLE_ENDIAN
#endif
You know, I meant to do this. I did it with the Unicode stuff, and after doing it thought "gosh, I should have done that with the endian problem too." I guess I was too lazy to go back and fix it up. :eyes

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
05-26-2003 at 03:21 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
1
Page 2 of 2
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : Compiling on MacOS X
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.