comm.c
changes/comm.c · 2.3 KB
From the archive romolc10.tar.gz
Download the archive « Back to the archive contents
Jason Dinkel
Mar. 27 1995
Modified for ROM OLC
Hans Birkeland
Apr 14 1995
This file contains modifications needed to comm.c.
---- game_loop_mac_msdos
dcon.next = descriptor_list;
dcon.showstr_head = NULL;
dcon.showstr_point = NULL;
dcon.pEdit = NULL; /* OLC */
dcon.pString = NULL; /* OLC */
dcon.editor = 0; /* OLC */
descriptor_list = &dcon;
Replace:
if ( d->connected == CON_PLAYING )
interpret( d->character, d->incomm );
else
nanny( d, d->incomm );
with:
/* OLC */
if ( d->showstr_point )
show_string( d, d->incomm );
else
if ( d->pString )
string_add( d->character, d->incomm );
else
switch ( d->connected )
{
case CON_PLAYING:
if ( !run_olc_editor( d ) )
interpret( d->character, d->incomm );
break;
default:
nanny( d, d->incomm );
break;
}
---- game_loop_unix
Replace:
if (d->showstr_point)
show_string(d,d->incomm);
else if ( d->connected == CON_PLAYING )
interpret( d->character, d->incomm );
else
nanny( d, d->incomm );
With:
/* OLC */
if ( d->showstr_point )
show_string( d, d->incomm );
else
if ( d->pString )
string_add( d->character, d->incomm );
else
switch ( d->connected )
{
case CON_PLAYING:
if ( !run_olc_editor( d ) )
interpret( d->character, d->incomm );
break;
default:
nanny( d, d->incomm );
break;
}
---- new_descriptor
dnew->outsize = 2000;
dnew->pEdit = NULL; /* OLC */
dnew->pString = NULL; /* OLC */
dnew->editor = 0; /* OLC */
dnew->outbuf = alloc_mem( dnew->outsize );
---- process_output
(this is probably more complicated than needed..)
Replace:
if (!merc_down && d->showstr_point)
write_to_buffer(d,"[Hit Return to continue]\n\r",0);
else if (fPrompt && !merc_down && d->connected == CON_PLAYING)
{
CHAR_DATA *ch;
With:
if ( !merc_down )
if ( d->showstr_point )
write_to_buffer( d, "[Hit Return to continue]\n\r", 0 );
else if ( fPrompt && d->pString && d->connected == CON_PLAYING )
write_to_buffer( d, "> ", 2 );
else if ( fPrompt && d->connected == CON_PLAYING )
{
CHAR_DATA *ch;