Need some help to finalize AmigaOS4 port of AssaultCube
#3
@flowtron
Thanks for answer :)

Well, related to __APPLE__ stuff, there is not many parts in code about, there is:

1. client.cpp / sendintro(). I think its only about connections ? code looks like this:
Quote:void sendintro()
{
packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
putint(p, SV_CONNECT);
putint(p, AC_VERSION);
putint(p, (isbigendian() ? 0x80 : 0 )|(adler((unsigned char *)guns, sizeof(guns)) % 31 << 8)|
#ifdef WIN32
0x40 |
#endif
#ifdef __APPLE__
0x20 |
#endif
#ifdef _DEBUG
0x08 |
#endif
#ifdef __GNUC__
0x04 |
#endif
0);
sendstring(player1->name, p);
sendstring(genpwdhash(player1->name, clientpassword, sessionid), p);
const char *lang = getalias("LANG");
sendstring(!lang || strlen(lang) != 2 ? "" : lang, p);
putint(p, connectrole);
clientpassword[0] = '\0';
connectrole = CR_DEFAULT;
putint(p, player1->nextprimweap->type);
loopi(2) putint(p, player1->skin(i));
sendpackettoserv(1, p.finalize());
}

As on aos4 we have GCC as default compiler ,so its eat __GNUC__ , and should be everything ok here ?

2. console.h

There is only one difference, and its related to SDL:
Quote:#ifdef __APPLE__
#define MOD_KEYS (KMOD_LMETA|KMOD_RMETA)
#else
#define MOD_KEYS (KMOD_LCTRL|KMOD_RCTRL)
#endif

I not change it as well, because its imho some kind of fix for apple ?

3. main.cpp

There is defines on for setfullscreen(), in screenres () and in setresdata(), which all realted to setting of screenmodes (with which i have no problems. all works fine without any changes here).

So, for now i leave all of this like that.

4. openal.cpp

There is one more fix for apple stuff, we have not problem on os4 with it, so, i leave it without any changes.

5. Platform.h

That only about includes, so, if it already compiles fine , then no problems here as well.

6. serverbrowser.cpp

There is again some apple only specific fix, which i also not touch.

The only change which i do related to __APPLE__ , its in :

console.cpp and log.cpp

But for sure they boch should be not related to meshes in any case, its just about how handle console which user spawn for all those commands and alt (imho) ? So, it shouldnt be a problems here ..

Quote:The writing of the shadow.dat files should go to the game-home-directory - what are you passing as "--home=" argument to your binary? Is it writeable by the user?!

When i compile it , i not set any "--home=" values , just in hope that it will get "current directory", nope ? On aos4 we have PROGDIR: (which mean the same as ./ for linux, i.e. current directory), and we use all the time that for HOME stuff.

It is possible, that it crashes because trying to write to some /somethink_which_we_not_have for svn data, and crashes in meshes, because i use win32 data (which have something different, or platform specific, or endian specific inside ? )

Quote:another reason to use the approach I suggested above, it'd make it easy to flip on/off single segments.

Can you explain a little more about that ?

Maybe assault cube have some kind of "turn full debug info on", which will say me about everyhitnkg, about all the values, what expected and what founds and so on ?
Thanks given by:


Messages In This Thread
RE: Need some help to finalize AmigaOS4 port of AssaultCube - by kas1e - 11 Nov 10, 06:10PM