Board index » off-topic » Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

Re: Crowther & Woods Colossal Cave Adventure - in Delphi!


2004-10-29 09:20:46 PM
off-topic19
After commenting out 'getEnvironmentVariable' and defining 'PInteger', I
compiled it OK with my D5E.
I haven't played this for 20 years. I never did complete it. I seem to
remember that I got as far as a great chasm with maybee a shadowy figure
moving on the other side.
I will try to resist viewing the data file.
Thanks,
Martin
 
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

Thanks, Colin!
BTW, I think I found a bug. :)
Pouring water on the plant didn't do anything. I thought, whoa,
I'm not that bad a gardener so I looked into it a bit...
ISTM line 396 of unitActions1.pas
if not AT(PLANT) or not AT(DOOR) then begin result := 2011; exit; end;
is wrong: I was AT(PLANT) when pouring but no way I could at the
same time be AT(DOOR) so I guess the line should read
if not (AT(PLANT) or AT(DOOR)) then begin result := 2011; exit; end;
HTH, ;)
--
ilkka hyvärinen
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

Ilkka Hyvärinen wrote:
Quote
so I guess the line should read

if not (AT(PLANT) or AT(DOOR)) then begin result := 2011; exit; end;
I think...
if not AT(PLANT) and not AT(DOOR) then begin result := 2011; exit; end;
Because it then goes on to check if you're pouring water on the plant
or oil on the door.
I muts try and play it all the way through sometime. Now I've got the
source, I might even finish it!
--
Colin - Author of XanaNews
 

{smallsort}

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

Colin Wilson wrote:
Quote
Ilkka Hyvärinen wrote:

>if not (AT(PLANT) or AT(DOOR)) then begin result := 2011; exit;
>end;

if not AT(PLANT) and not AT(DOOR) then begin result := 2011; exit;
end;

Heh, if you say so. It's been 10 years since I've done proper
math but I think both are actually equivalent. :)
Quote
I muts try and play it all the way through sometime. Now I've got the
source, I might even finish it!
LOL, <aol>ME 2!!!</aol>
--
ilkka hyvärinen
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

How can I define what is PInteger?
I cant compile it with my BCB5 although I know its in Delphi but I also know
I can compile Delphi codes by BCB5
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

Pedram wrote:
Quote
How can I define what is PInteger?
I cant compile it with my BCB5 although I know its in Delphi but I
also know I can compile Delphi codes by BCB5
type
PInteger = ^Integer;
--
Colin - Author of XanaNews
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

Ilkka Hyvärinen wrote:
Quote
Heh, if you say so. It's been 10 years since I've done proper
math but I think both are actually equivalent. :)
Yes!
--
Colin - Author of XanaNews
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

"Pedram" < XXXX@XXXXX.COM >wrote in
Quote
How can I define what is PInteger?
I cant compile it with my BCB5 although I know its in Delphi but I
also know I can compile Delphi codes by BCB5
If you include the 'Windows' unit, this will be fixed.
Cheers,
Nick
 

Re:Re: Crowther & Woods Colossal Cave Adventure - in Delphi!

"Pedram" < XXXX@XXXXX.COM >wrote in
Quote
How can I define what is PInteger?
I cant compile it with my BCB5 although I know its in Delphi but I
also know I can compile Delphi codes by BCB5
You might also need to comment out the 'GetEnvironmentVariable' call in
unitInit.quick_init (roughly line 812), as D7 version of this is different
to D5 (and maybe BCB5).
i.e. From:
GetEnvironmentVariable(PChar(adv));
if adv = '' then
adv := 'adventure.data';
To:
//GetEnvironmentVariable(PChar(adv));
//if adv = '' then
adv := 'adventure.data';
(as the save game is always called 'adventure.data' !).
Cheers,
Nick