As discussed in a previous thread, it may be a useful feature for some ACK games to be able to skip the 'player info' screen that results upon pressing the 'I' key and move straight on into inventory. This frees the game to implement its own version of the info screen (with an extra command, something like (S)TATUS) which may display variables and info specific to that game. Or you can just leave the info screen off altogether; particularly for games that do not implement things like experience, levels, and encumberance, this may be a useful way to avoid confusing the player.
THE EDIT: In the file O_PLAY0.PAS, change the procedure 'showplayerstatus' as follows. Code lines that were actually changed are prefixed with '***'; don't copy and paste the whole thing since pasting the code into this message has introduced line breaks where they weren't before, and I also snipped out a bit in the middle for length.
Code: Select all
procedure showplayerstatus;
var
j:char;
my_inv:array[1..254] of byte;
i,i1,top:integer;
done:boolean;
s:string;
begin
savepage;
*** if (ack.variables[26] = 100) then
*** begin
*** player_inventory;
*** restorepage;
*** helpindex:=2;
*** end else
*** begin
titlebars;
if (ack.playername<>'') and (ack.playername<>'UNUSED') then
say(3,3,0,'NAME: Û1'+ack.playername);
if ack.mpmax[0]<>0 then
s:='Û0 ENERGY: Û1'+strnum(ack.mp[0])+'Û0/Û1'+strnum(ack.mpmax[0])
else s:='';
say(3,13,0,'HIT POINTS: Û1'+strnum(ack.hp[0])+'Û0/Û1'+strnum(ack.hpmax[0])+s);
<snipped>
say(1,188,0,'PRESS Û6 I Û0 FOR INVENTORY OR Û6ESCÛ0 TO EXIT');
helpindex:=48;
repeat
j:=upcase(readkey);
if j=#0 then if readkey=#59 then help;
until (j=#27) or (j='I');
if upcase(j)='I' then
player_inventory;
restorepage;
helpindex:=2;
*** end;
end;
ack.variables[26] is the Z macro variable, so if Z=100, the info screen will be skipped; otherwise, the Info command will act as normal. When testing this sort of thing, the 'Debug' mode in the adventure configuration editor is helpful as it allows you to peek/poke variable values in the A-Z set by pressing Control+P.