Jump to content
Eternal Lands Official Forums
Corun

OS X Port Questions

Recommended Posts

Couple of questions:

*) What is the reason for renaming Move() to Move1(), and GetColor() to GetColor1()?

*) why is global.h included in translate.h? gcc doesn't complain on my machine

*) would it be useful to make a separate makefile for OSX?

 

I committed your patch with a few small changes, and left Move() and translate.h untouched. Let me know if that needs change. Could you check out a clean copy of CVS and tell me if everything works?

*) Move and GetColor needed to be changed because one of the library headers includes Carbon(A Mac OS X API) and that defines Move() and GetColor(). I changed them to get rid of the name conflict.

 

*) On OS X, #define ELC is in global.h. This is needed by translate.h.

 

*) I don't think making a makefile would be useful. The OS X version really needs an xCode(OS X IDE) project to be built properly.

 

I checkout a fresh version and had to change the following to get it to work:

-GetColor and Move

-#include "global.h" in translate.h

-the #endif after "#include <X11/Xlib.h>" on line 25 of paste.h needed to move to the end of paste.h

Share this post


Link to post
Share on other sites

Can't you do this

#ifdef OSX
#define GetColor GetColor1
#define Move Move1
#endif

 

somewhere in global.h? Of course *after* the system files get included.

Share this post


Link to post
Share on other sites
Can't you do this

#ifdef OSX
#define GetColor GetColor1
#define Move Move1
#endif

 

somewhere in global.h? Of course *after* the system files get included.

Perhaps, but the names (esp. Move) weren't very descriptive anyway.

 

EDIT: WTF. Guess I forgot to push the send button yesterday. I knew I should stick to working on one computer at a time.

 

*) Move and GetColor were renamed to move_camera and GetColorFromName

*) Fixed the ifdef

*) I'm not too happy about including global.h in translate.h. First of all we get a recursive inclusion, second, it is wrong if translate.h is ever to be used by the map editor or elconfig. I don't like the way these flags are defined either, IMHO they should be defined using compiler flags, using e.g. -DELC for gcc.

*) Could you created an xCode project file, and is it possible to keep that up to date without having to use xCode? And could you look at that definition issue too?

Edited by Grum

Share this post


Link to post
Share on other sites
it is wrong if translate.h is ever to be used by the map editor or elconfig.

Uh... it is. :(

Share this post


Link to post
Share on other sites
it is wrong if translate.h is ever to be used by the map editor or elconfig.

Uh... it is. :(

Yeah, I wrote that first. Then I realized that I wasn't sure, so I changed it. Anyway, it's teh ebul.

Share this post


Link to post
Share on other sites

It works! It works!

 

Chat system is sorta messed. Backspace key doesn't work and sometimes it mirrors my text.

 

Textures are kinda like #poor_man, and the items overlap. I have a ATi Rage 128 (no idea how good it is) and get 4 FPS with really bad lag. Dunno if that's the game or the comp.

Edited by freeone3000

Share this post


Link to post
Share on other sites

Chat system is sorta messed. Backspace key doesn't work and sometimes it mirrors my text.

That's the cvs, not the port. It's an acknowledged bug. :)

Edited by crusadingknight

Share this post


Link to post
Share on other sites
It works! It works!

 

Chat system is sorta messed. Backspace key doesn't work and sometimes it mirrors my text.

 

Textures are kinda like #poor_man, and the items overlap. I have a ATi Rage 128 (no idea how good it is) and get 4 FPS with really bad lag. Dunno if that's the game or the comp.

ATI Rage 128 Is about the worst graphics card that supports 3D acceleration on Mac OS X. I'm not surprised at the speed :-).

 

About the Chat System. Phew.. I was looking for ages trying to fix that bug. I couldn't work out why it was appearing on Mac OS X (Other people I asked who I guess weren't running the CVS version said theirs worked fine). I gave up in the end hoping that someone else would fix it :-)

Share this post


Link to post
Share on other sites

Oops, sorry about that, I could've told you that. yes, there's a bug when not using windowed chat. I have a clue why the text is doubled, but still haven't figured out what causes the segfault.

Share this post


Link to post
Share on other sites
Guest mcdermr

I just downloaded the os x binary, linked above, and it works quite well!!! Congrats and THANK YOU Corun for working on the port!!! I'm not getting any door icons on cave entrances, boat flags, and doors. It just doesn't switch to it at all. Also, I went to the general store in DP to see if it works to talk with NPC's, which it does, however when trying to buy something from Stephen, I noticed a period at the bottom of the list. Is this a CVS bug or an OS X bug? When I click on it I get disconnected from the server. The mouse controls are mirror imaged when I put into full screen (ie. by putting my cursor at the top of my screen the icons on the bottom light up, it was quite tricky to figure out where the full screen button was to click to undo the full screen! :ph34r: ) Also, where should I be reporting the bugs that I find with the OS X port, here or the report a bug area?

 

(My backspace key doesn't work, too)

Share this post


Link to post
Share on other sites
Guest mcdermr

Yes, I was in walk mode when I tried that. I forgot to mention in my last post that by selecting use mode then "using" the door, flag, cave entrance, etc. I was able to enter the desired area.,

Share this post


Link to post
Share on other sites

Dah! When switching outta fullscreen, it crashes.

That little cloverleaf thingy plus V doesn't paste, just gives a v, and the option isn't in one of the menus.

Every other time I click on it, it doesn't let me type in it.

Goto command is messed. Details of messedness:

I type: #goto 100,100

It gives me: cannot go to 100100,100

I type: #goto ,100

It gives me: cannot go to 1001000,1000

I type: #goto 22,22

It gives me: Cannot go to 22,22.

I type: #goto22,33

It gives me: Mark spawns in one of fourty random places. not found.

I type: #beaver

It gives me: Unknown: #beaver

I type:#goto33

It gives me: Mark Updated list of gbugs under programming... not found

 

(Amazing I could run this at all without admin permissions.)

 

Oh I wish I had a backspace, a bright and shiney backspace, a backspace I could call my own...

Edited by freeone3000

Share this post


Link to post
Share on other sites

And when I hold pgdn too long, it puts -'s in the chat. Puts commas when I hold pgup too long. Numlock puts in astericks.

Edited by freeone3000

Share this post


Link to post
Share on other sites
Guest Blorx1

Great work Corun! Thanks for the hard work! The only bug I've found is that the Delete key doesn't work. I usually get around 8-20 fps on my 700MHz G4 GF2 MX

Share this post


Link to post
Share on other sites
Guest Blorx1

Not sure about the pgdn one...I got the delete=no no thing though...it needs fixed...

Share this post


Link to post
Share on other sites

I try incorrect password. No error, however it does not log in.

I try invalid username. No error, however it does not log in.

I try a supposedly valid username and pass, two diffrent sets, no error, however it does not log in.

 

Turned out it was human error or something weird...

Edited by freeone3000

Share this post


Link to post
Share on other sites

I started playing with porting to OS X 10.3.9 yesterday using the latest cvs. Here is a list of my progress and problems, starting with the Makefile.linux. First off, I have fink installed, but fink does not include a lot of necessary distributions. I picked up the OpenAL framework from Creative, but I cannot figure it out. Therefore, I removed -lopenal from the LDFLAGS.

books/parser.c is looking for ../error.h, which should be ../errors.h

I was getting a CarbonSound.h not found error, possibly because I had to downgrade back to Quicktime 6 for my Pro license to be valid. Anyhow, I had to place #define __CARBONSOUND__ in the OSX section of global.h.

rules.c cannot find malloc.h, so I pointed it to the one found in /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h

Cal3d was obtained from sourceforge, but the Cal3d header files for some reason look for eachother in cal3d/*... creating a weird recursion. So I went through the files and made them local references. Not sure if this is the right thing to do, but hey.... I also had to edit the cal3d_wrapper.* files to point to my cal3d directory.

 

As you can see, I am mostly hacking my way through this as I am not too familiar with the Os X way of doing things (and it has been 8 years since I took a programming class). Well, everything currently compiles up to cal3d_wrapper.o at which point I get:

ld: Undefined symbols:
_alBufferData
_alDeleteBuffers
...
CalCoreMesh::scale(float)
CalCoreSkeleton::scale(float)
...
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(unsigned long, char)
make: *** [el.x86.linux.bin] Error 1

 

Anyone have ideas on what is causing this? Do I have to precompile cal3d to get a libcal3d.a? I was trying to read through the cal3d specific thread, but much of that information is a few months old.

Share this post


Link to post
Share on other sites

First of all, you will need to figure out how to get the openal libraries - they are needed at runtime, unless you compile with -DNO_MUSIC.

 

On *nix, the cal3d_wrapper.cpp is compiled with a C++ compiler while the rest are compiled with a normal C compiler. In the end the cal3d_wrapper.o is linked together with the others forming a final binary.

Share this post


Link to post
Share on other sites
maybe this link helps:

OpenAl from developer.creative.com

Nope. Not very informative. As I said, I already picked up that from Creative. I do not know how to use XCode, which might solve some issues. However, I (think I) learned how to pull in OpenAL. In the LDFLAGS I added "-framework OpenAL". This of course caused its own problems, since now I get

ld: warning multiple definitions of symbol CAGuard::Wait()
/Library/Frameworks/OpenAL.framework/OpenAL(single module) definition of CAGuard::Wait()
/sw/lib/libSDL.dylib(CAGuard.o) definition of CAGuard::Wait()

for multiple CAGuard items followed by:

ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
symbol CAGuard::~CAGuard [not-in-charge]() used from dynamic library /Library/Frameworks/OpenAL.framework/OpenAL(single module) not from earlier dynamic library /sw/lib/libSDL-1.2.0.dylib(CAGuard.o)
...
ld: Undefined symbols:
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)
std::ios_base::Init::Init[in-charge]()
std::ios_base::Init::~Init [in-charge]()
___gxx_personality_v0
make: *** [el.x86.linux.bin] Error 1

So my Framework is now fighting with fink libraries.

 

I tried playing around with XCode. It hurt my brain. I was getting unresolved symbol _SDL_main problems. I might get around that problem by creating the project as a SDL OpenGL Application (obtained with SDL-devel-1.2.9), but so far have run into many other SDL problems doing so.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×