Page 31 of 47

PostPosted: 06 Sep 2010, 11:36
by Krom
Okay, I'm looking forward to that list of problems :)

We always use WinXP (Lewin can correct me if I'm wrong).

PostPosted: 07 Sep 2010, 07:54
by Lewin
Well I use Windows 7 64bit mostly but I haven't noticed any major differences in the behaviour of either the Remake or Delphi. But I would say that Windows XP 32bit is our "officially" supported OS.
Lewin.

PostPosted: 07 Sep 2010, 14:53
by Siegfried
Well, the laptop I used was an Win7 64bit.

Do you all use the proprietary Delphi IDE?

PostPosted: 07 Sep 2010, 16:39
by Krom
Yes, sure, we use Delphi "as is" from the box, no plug-ins. Everything needed is included into "Common" folder.

PostPosted: 08 Sep 2010, 08:12
by Siegfried
Well, it is exactly those additional files which throw error messages en masse.

I checked out rev.1011 and let it compile by fpc2.4.3

The compile errors in the Common/dglOpenGL.pas were solved by uncommenting fpc-scpecific parts.

But the Common/openal.pas gives a fatal syntax error in the first lines.
It says l.73: "identifier" expected but "TYPE" found, which is obviously bullshit.

I'll keep on trying.

PostPosted: 08 Sep 2010, 08:19
by Krom
You should check with Delphi->Lazarus conversion guides. There must be something like "objmode=delphi" switch in project file. dglOpenGL and OpenAL should not be changed in any way, they are third-party libs after all :wink: When I maintained KaM Remake with Lazarus (Jan-May '10) it all solved with that switches.

PostPosted: 08 Sep 2010, 09:17
by Siegfried
I compile it with the Delphi-syntax-mode (-Mdelphi), but this was already set by default. The libs compile fine with the oldstable, but not the music-player (which did not work under win7 anyways)

I found this this:
"I guess, Delphi has a mplayer unit. Lazarus has not."

But finally I'm on my way I think. Let's see if I can fix this.

PostPosted: 08 Sep 2010, 10:36
by Krom
I had to hide every MPlayer occurrence under {$IFDEF WDC} so that it was completely unaccessible by Lazarus. Hence Lazarus builds don't have mp3 playback yet. We are planning to switch to another sound library which will play sounds and mp3s itself (maybe Bass).

I guess some conditionals might have slipped, so you need to add them back to compile in Lazarus.

PostPosted: 08 Sep 2010, 11:40
by Siegfried
Yes, I ran through that whole process. If I am successful eventually, I'll write a short guide about that.

But I still have problems with the fpc and the max-function you are using.
"KM_Unit1.pas(568,53) Error: Wrong number of parameters specified for call to "Max""

Are you present on some IRC channels?

PostPosted: 08 Sep 2010, 11:56
by Krom
no, I have only ICQ (106696203), Skype (kromster80) and if you warn me in advance I can turn on MSN (forgot my account name, but can login).

This error arises because Lazarus can't properly map Max function depending on number of parameters to Math.pas (2 params) and KromUtils.pas (3 params). You can manually set it though by adding unit name before it - Math.Max(params)

PostPosted: 08 Sep 2010, 13:06
by Siegfried
Thank you. It finally compiled.

But the exe still it crashes with "exception class "EListError" with message: List index (3) out of bounds."
Oh my, shame on programers who write non-saying error messages like that :evil:

Well, and the lazarus built-in debugger, let's stay polite and just say that it is not the best I've seen so far.

PostPosted: 08 Sep 2010, 13:14
by Krom
I guess it may refer to MusicTracks count which should be all commented out in Lazarus. You could run by-line debug to see which unit causes the crash, also I'm not sure, but maybe L has call stack frame somewhere in View-Debug-Call stack ..

PostPosted: 08 Sep 2010, 13:30
by Siegfried
*sigh*

I found out, it was the fps stats in the top right corner. Don't ask for details, but disabling it (KM_Unit1 l.148) solved the problem. KaM Remake starts finally. But only to crash because it does not find Resources.

Well, I don't want to spam this thread completely, so I'll stop posting at this point until I get it to work properly.

PostPosted: 08 Sep 2010, 13:39
by Krom
Ah, this is caused by the fact that LFM (Lazarus Form) haven't got recent DFM (Delphi Form) updates. I did added new section into StatusBar1 to display mission time. Hence the crash with wrong list index. See, thats the kind of things happening with unmaintained options (i.e. Lazarus support).

"Resources" should be taken from recent KaM Remake Demo, they did changed inbetween demos.

P.S. Feel free to create a topic nearby where we can talk all the problems over. I want to help you to write that guide!

PostPosted: 08 Sep 2010, 14:39
by Siegfried
KM_TGATexture l.189:
the uncompress-function causes the crash with the Tiles1.tga. The other textures are loaded properly.

I begin to wonder if this makes sense anymore.
I had to deactivate the whole music module and do several smaller changes. And now it seems I would have to replace the zlib-functions as well, without guarantee that this is the end of the story.

But I surely won't pay several hundreds of euros for that over-expensive IDE. Isn't there a gratis version around for personal use or something?