Skip to content

Commit

Permalink
engine: remove czeror sequence parser
Browse files Browse the repository at this point in the history
This file initially came from HLND, a Chinese GoldSrc recreation.
It turned out to be suspiciously close to the original version, down
to the comments and code style. We don't work with leaked sources here,
so remove it.

A proper parser should be reimplemented from ground-up, when we will
start working on CZDS support.
  • Loading branch information
a1batross committed Jul 26, 2023
1 parent e49848d commit e23580c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2,013 deletions.
5 changes: 0 additions & 5 deletions engine/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ GNU General Public License for more details.
#include "library.h"
#include "vid_common.h"
#include "pm_local.h"
#include "sequence.h"

#define MAX_TOTAL_CMDS 32
#define MAX_CMD_BUFFER 8000
Expand Down Expand Up @@ -233,9 +232,6 @@ void CL_SignonReply( void )
if( cl.proxy_redirect && !cls.spectator )
CL_Disconnect();
cl.proxy_redirect = false;

if( cls.demoplayback )
Sequence_OnLevelLoad( clgame.mapname );
break;
}
}
Expand Down Expand Up @@ -3138,7 +3134,6 @@ void CL_Init( void )
VID_Init(); // init video
S_Init(); // init sound
Voice_Init( VOICE_DEFAULT_CODEC, 3 ); // init voice
Sequence_Init();

// unreliable buffer. unsed for unreliable commands and voice stream
MSG_Init( &cls.datagram, "cls.datagram", cls.datagram_buf, sizeof( cls.datagram_buf ));
Expand Down
20 changes: 3 additions & 17 deletions engine/client/s_vox.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ GNU General Public License for more details.
#include "common.h"
#include "sound.h"
#include "const.h"
#include "sequence.h"
#include <ctype.h>

static int cszrawsentences = 0;
Expand Down Expand Up @@ -165,24 +164,11 @@ static const char *VOX_LookupString( const char *pszin )
int i = -1, len;
const char *c;

// check if we are a CSCZ or immediate sentence
// check if we are an immediate sentence
if( *pszin == '#' )
{
// Q_atoi is too smart and allows negative values
// so check with Q_isdigit beforehand
if( Q_isdigit( pszin + 1 ))
{
sentenceEntry_s *sentenceEntry;
i = Q_atoi( pszin + 1 );
if(( sentenceEntry = Sequence_GetSentenceByIndex( i )))
return sentenceEntry->data;
return NULL;
}
else
{
// immediate sentence, probably coming from "speak" command
return pszin + 1;
}
// immediate sentence, probably coming from "speak" command
return pszin + 1;
}

// check if we received an index
Expand Down
5 changes: 2 additions & 3 deletions engine/common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ GNU General Public License for more details.
#include "const.h"
#include "client.h"
#include "library.h"
#include "sequence.h"

static const char *file_exts[] =
{
Expand Down Expand Up @@ -1047,7 +1046,7 @@ void *GAME_EXPORT pfnSequenceGet( const char *fileName, const char *entryName )
{
Msg( "Sequence_Get: file %s, entry %s\n", fileName, entryName );

return Sequence_Get( fileName, entryName );
return NULL;
}

/*
Expand All @@ -1061,7 +1060,7 @@ void *GAME_EXPORT pfnSequencePickSentence( const char *groupName, int pickMethod
{
Msg( "Sequence_PickSentence: group %s, pickMethod %i\n", groupName, pickMethod );

return Sequence_PickSentence( groupName, pickMethod, picked );
return NULL;

}

Expand Down
Loading

0 comments on commit e23580c

Please sign in to comment.