export CGSagaGetValueGroup
code
proc CGSagaGetValueGroup 44 8
file "../cg_saga.c"
line 15
;1:#include "cg_local.h"
;2:#include "bg_saga.h"
;3:
;4:#define DEFAULT_WIN_OBJECTIVE		"sound/chars/kyle/prototype/personal.mp3"
;5:#define DEFAULT_LOSE_OBJECTIVE		"sound/chars/kyle/prototype/isntworking.mp3"
;6:
;7:#define DEFAULT_WIN_ROUND			"sound/chars/kyle/prototype/personal.mp3"
;8:#define DEFAULT_LOSE_ROUND			"sound/chars/kyle/prototype/isntworking.mp3"
;9:
;10:char		cg_saga_info[MAX_SAGA_INFO_SIZE];
;11:int			cg_saga_valid;
;12:
;13://The following two functions are very cheap parsing functions
;14:int CGSagaGetValueGroup(char *buf, char *group, char *outbuf)
;15:{
line 21
;16:	char *place, *placesecond;
;17:	int iplace;
;18:	int failure;
;19:	int i;
;20:	int startpoint, startletter;
;21:	int subg = 0;
ADDRLP4 16
CNSTI4 0
ASGNI4
line 23
;22:
;23:	i = 0;
ADDRLP4 12
CNSTI4 0
ASGNI4
line 25
;24:
;25:	iplace = 0;
ADDRLP4 28
CNSTI4 0
ASGNI4
line 27
;26:
;27:	place = strstr(buf, group);
ADDRFP4 0
INDIRP4
ARGP4
ADDRFP4 4
INDIRP4
ARGP4
ADDRLP4 32
ADDRGP4 strstr
CALLP4
ASGNP4
ADDRLP4 8
ADDRLP4 32
INDIRP4
ASGNP4
line 29
;28:
;29:	if (!place)
ADDRLP4 8
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $132
line 30
;30:	{
line 31
;31:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $131
JUMPV
LABELV $132
line 34
;32:	}
;33:
;34:	startpoint = place - buf + strlen(group) + 1;
ADDRFP4 4
INDIRP4
ARGP4
ADDRLP4 36
ADDRGP4 strlen
CALLI4
ASGNI4
ADDRLP4 0
ADDRLP4 8
INDIRP4
CVPU4 4
ADDRFP4 0
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
ADDRLP4 36
INDIRI4
ADDI4
CNSTI4 1
ADDI4
ASGNI4
line 35
;35:	startletter = (place - buf) - 1;
ADDRLP4 20
ADDRLP4 8
INDIRP4
CVPU4 4
ADDRFP4 0
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
CNSTI4 1
SUBI4
ASGNI4
line 37
;36:
;37:	failure = 0;
ADDRLP4 24
CNSTI4 0
ASGNI4
ADDRGP4 $135
JUMPV
LABELV $134
line 40
;38:
;39:	while (buf[startpoint+1] != '{' || buf[startletter] != '\n')
;40:	{
line 41
;41:		placesecond = strstr(place+1, group);
ADDRLP4 8
INDIRP4
CNSTI4 1
ADDP4
ARGP4
ADDRFP4 4
INDIRP4
ARGP4
ADDRLP4 40
ADDRGP4 strstr
CALLP4
ASGNP4
ADDRLP4 4
ADDRLP4 40
INDIRP4
ASGNP4
line 43
;42:
;43:		if (placesecond)
ADDRLP4 4
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $137
line 44
;44:		{
line 45
;45:			startpoint += (placesecond - place);
ADDRLP4 0
ADDRLP4 0
INDIRI4
ADDRLP4 4
INDIRP4
CVPU4 4
ADDRLP4 8
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
ADDI4
ASGNI4
line 46
;46:			startletter += (placesecond - place);
ADDRLP4 20
ADDRLP4 20
INDIRI4
ADDRLP4 4
INDIRP4
CVPU4 4
ADDRLP4 8
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
ADDI4
ASGNI4
line 47
;47:			place = placesecond;
ADDRLP4 8
ADDRLP4 4
INDIRP4
ASGNP4
line 48
;48:		}
ADDRGP4 $138
JUMPV
LABELV $137
line 50
;49:		else
;50:		{
line 51
;51:			failure = 1;
ADDRLP4 24
CNSTI4 1
ASGNI4
line 52
;52:			break;
ADDRGP4 $136
JUMPV
LABELV $138
line 54
;53:		}
;54:	}
LABELV $135
line 39
ADDRLP4 40
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ADDRLP4 40
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 123
NEI4 $134
ADDRLP4 20
INDIRI4
ADDRLP4 40
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 10
NEI4 $134
LABELV $136
line 56
;55:
;56:	if (failure)
ADDRLP4 24
INDIRI4
CNSTI4 0
EQI4 $142
line 57
;57:	{
line 58
;58:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $131
JUMPV
LABELV $141
line 65
;59:	}
;60:
;61:	//we have found the proper group name if we made it here, so find the opening brace and read into the outbuf
;62:	//until hitting the end brace
;63:
;64:	while (buf[startpoint] != '{')
;65:	{
line 66
;66:		startpoint++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 67
;67:	}
LABELV $142
line 64
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 123
NEI4 $141
line 69
;68:
;69:	startpoint++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
ADDRGP4 $145
JUMPV
LABELV $144
line 72
;70:
;71:	while (buf[startpoint] != '}' || subg)
;72:	{
line 73
;73:		if (buf[startpoint] == '{')
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 123
NEI4 $147
line 74
;74:		{
line 75
;75:			subg++;
ADDRLP4 16
ADDRLP4 16
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 76
;76:		}
ADDRGP4 $148
JUMPV
LABELV $147
line 77
;77:		else if (buf[startpoint] == '}')
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 125
NEI4 $149
line 78
;78:		{
line 79
;79:			subg--;
ADDRLP4 16
ADDRLP4 16
INDIRI4
CNSTI4 1
SUBI4
ASGNI4
line 80
;80:		}
LABELV $149
LABELV $148
line 81
;81:		outbuf[i] = buf[startpoint];
ADDRLP4 12
INDIRI4
ADDRFP4 8
INDIRP4
ADDP4
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
ASGNI1
line 82
;82:		i++;
ADDRLP4 12
ADDRLP4 12
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 83
;83:		startpoint++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 84
;84:	}
LABELV $145
line 71
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 125
NEI4 $144
ADDRLP4 16
INDIRI4
CNSTI4 0
NEI4 $144
line 85
;85:	outbuf[i] = '\0';
ADDRLP4 12
INDIRI4
ADDRFP4 8
INDIRP4
ADDP4
CNSTI1 0
ASGNI1
line 87
;86:
;87:	return 1;
CNSTI4 1
RETI4
LABELV $131
endproc CGSagaGetValueGroup 44 8
export CGSagaGetPairedValue
proc CGSagaGetPairedValue 64 8
line 91
;88:}
;89:
;90:int CGSagaGetPairedValue(char *buf, char *key, char *outbuf, int inquotes)
;91:{
line 96
;92:	char *place, *placesecond;
;93:	int startpoint, startletter;
;94:	int i, found;
;95:
;96:	if (!buf || !key || !outbuf)
ADDRLP4 24
CNSTU4 0
ASGNU4
ADDRFP4 0
INDIRP4
CVPU4 4
ADDRLP4 24
INDIRU4
EQU4 $155
ADDRFP4 4
INDIRP4
CVPU4 4
ADDRLP4 24
INDIRU4
EQU4 $155
ADDRFP4 8
INDIRP4
CVPU4 4
ADDRLP4 24
INDIRU4
NEU4 $152
LABELV $155
line 97
;97:	{
line 98
;98:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $151
JUMPV
LABELV $152
line 101
;99:	}
;100:
;101:	i = 0;
ADDRLP4 0
CNSTI4 0
ASGNI4
ADDRGP4 $157
JUMPV
LABELV $156
line 104
;102:
;103:	while (buf[i] && buf[i] != '\0')
;104:	{
line 105
;105:		if (buf[i] == '/')
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 47
NEI4 $159
line 106
;106:		{
line 107
;107:			if (buf[i+1] && buf[i+1] != '\0' && buf[i+1] == '/')
ADDRLP4 28
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 32
CNSTI4 0
ASGNI4
ADDRLP4 28
INDIRI4
ADDRLP4 32
INDIRI4
EQI4 $161
ADDRLP4 28
INDIRI4
ADDRLP4 32
INDIRI4
EQI4 $161
ADDRLP4 28
INDIRI4
CNSTI4 47
NEI4 $161
line 108
;108:			{
ADDRGP4 $164
JUMPV
LABELV $163
line 110
;109:				while (buf[i] != '\n')
;110:				{
line 111
;111:					buf[i] = '/';
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
CNSTI1 47
ASGNI1
line 112
;112:					i++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 113
;113:				}
LABELV $164
line 109
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 10
NEI4 $163
line 114
;114:			}
LABELV $161
line 115
;115:		}
LABELV $159
line 116
;116:		i++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 117
;117:	}
LABELV $157
line 103
ADDRLP4 28
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 32
CNSTI4 0
ASGNI4
ADDRLP4 28
INDIRI4
ADDRLP4 32
INDIRI4
EQI4 $166
ADDRLP4 28
INDIRI4
ADDRLP4 32
INDIRI4
NEI4 $156
LABELV $166
line 119
;118:
;119:	place = strstr(buf, key);
ADDRFP4 0
INDIRP4
ARGP4
ADDRFP4 4
INDIRP4
ARGP4
ADDRLP4 36
ADDRGP4 strstr
CALLP4
ASGNP4
ADDRLP4 12
ADDRLP4 36
INDIRP4
ASGNP4
line 121
;120:
;121:	if (!place)
ADDRLP4 12
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $167
line 122
;122:	{
line 123
;123:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $151
JUMPV
LABELV $167
line 126
;124:	}
;125:	//tab == 9
;126:	startpoint = place - buf + strlen(key);
ADDRFP4 4
INDIRP4
ARGP4
ADDRLP4 40
ADDRGP4 strlen
CALLI4
ASGNI4
ADDRLP4 4
ADDRLP4 12
INDIRP4
CVPU4 4
ADDRFP4 0
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
ADDRLP4 40
INDIRI4
ADDI4
ASGNI4
line 127
;127:	startletter = (place - buf) - 1;
ADDRLP4 8
ADDRLP4 12
INDIRP4
CVPU4 4
ADDRFP4 0
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
CNSTI4 1
SUBI4
ASGNI4
line 129
;128:
;129:	found = 0;
ADDRLP4 20
CNSTI4 0
ASGNI4
ADDRGP4 $170
JUMPV
LABELV $169
line 132
;130:
;131:	while (!found)
;132:	{
line 133
;133:		if (startletter == 0 || !buf[startletter] || buf[startletter] == '\0' || buf[startletter] == 9 || buf[startletter] == ' ' || buf[startletter] == '\n')
ADDRLP4 48
CNSTI4 0
ASGNI4
ADDRLP4 8
INDIRI4
ADDRLP4 48
INDIRI4
EQI4 $178
ADDRLP4 52
ADDRLP4 8
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 52
INDIRI4
ADDRLP4 48
INDIRI4
EQI4 $178
ADDRLP4 52
INDIRI4
ADDRLP4 48
INDIRI4
EQI4 $178
ADDRLP4 52
INDIRI4
CNSTI4 9
EQI4 $178
ADDRLP4 52
INDIRI4
CNSTI4 32
EQI4 $178
ADDRLP4 52
INDIRI4
CNSTI4 10
NEI4 $172
LABELV $178
line 134
;134:		{
line 135
;135:			if (buf[startpoint] == '\0' || buf[startpoint] == 9 || buf[startpoint] == ' ' || buf[startpoint] == '\n')
ADDRLP4 56
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 56
INDIRI4
CNSTI4 0
EQI4 $183
ADDRLP4 56
INDIRI4
CNSTI4 9
EQI4 $183
ADDRLP4 56
INDIRI4
CNSTI4 32
EQI4 $183
ADDRLP4 56
INDIRI4
CNSTI4 10
NEI4 $179
LABELV $183
line 136
;136:			{
line 137
;137:				found = 1;
ADDRLP4 20
CNSTI4 1
ASGNI4
line 138
;138:				break;
ADDRGP4 $171
JUMPV
LABELV $179
line 140
;139:			}
;140:		}
LABELV $172
line 142
;141:
;142:		placesecond = strstr(place+1, key);
ADDRLP4 12
INDIRP4
CNSTI4 1
ADDP4
ARGP4
ADDRFP4 4
INDIRP4
ARGP4
ADDRLP4 56
ADDRGP4 strstr
CALLP4
ASGNP4
ADDRLP4 16
ADDRLP4 56
INDIRP4
ASGNP4
line 144
;143:
;144:		if (placesecond)
ADDRLP4 16
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $184
line 145
;145:		{
line 146
;146:			startpoint += placesecond - place;
ADDRLP4 4
ADDRLP4 4
INDIRI4
ADDRLP4 16
INDIRP4
CVPU4 4
ADDRLP4 12
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
ADDI4
ASGNI4
line 147
;147:			startletter += placesecond - place;
ADDRLP4 8
ADDRLP4 8
INDIRI4
ADDRLP4 16
INDIRP4
CVPU4 4
ADDRLP4 12
INDIRP4
CVPU4 4
SUBU4
CVUI4 4
ADDI4
ASGNI4
line 148
;148:			place = placesecond;
ADDRLP4 12
ADDRLP4 16
INDIRP4
ASGNP4
line 149
;149:		}
ADDRGP4 $185
JUMPV
LABELV $184
line 151
;150:		else
;151:		{
line 152
;152:			place = NULL;
ADDRLP4 12
CNSTP4 0
ASGNP4
line 153
;153:			break;
ADDRGP4 $171
JUMPV
LABELV $185
line 156
;154:		}
;155:
;156:	}
LABELV $170
line 131
ADDRLP4 20
INDIRI4
CNSTI4 0
EQI4 $169
LABELV $171
line 158
;157:
;158:	if (!found || !place || !buf[startpoint] || buf[startpoint] == '\0')
ADDRLP4 44
CNSTI4 0
ASGNI4
ADDRLP4 20
INDIRI4
ADDRLP4 44
INDIRI4
EQI4 $190
ADDRLP4 12
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $190
ADDRLP4 48
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 48
INDIRI4
ADDRLP4 44
INDIRI4
EQI4 $190
ADDRLP4 48
INDIRI4
ADDRLP4 44
INDIRI4
NEI4 $192
LABELV $190
line 159
;159:	{
line 160
;160:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $151
JUMPV
LABELV $191
line 164
;161:	}
;162:
;163:	while (buf[startpoint] == ' ' || buf[startpoint] == 9 || buf[startpoint] == '\n')
;164:	{
line 165
;165:		startpoint++;
ADDRLP4 4
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 166
;166:	}
LABELV $192
line 163
ADDRLP4 52
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 52
INDIRI4
CNSTI4 32
EQI4 $191
ADDRLP4 52
INDIRI4
CNSTI4 9
EQI4 $191
ADDRLP4 52
INDIRI4
CNSTI4 10
EQI4 $191
line 168
;167:
;168:	i = 0;
ADDRLP4 0
CNSTI4 0
ASGNI4
line 170
;169:
;170:	if (inquotes)
ADDRFP4 12
INDIRI4
CNSTI4 0
EQI4 $201
line 171
;171:	{
ADDRGP4 $197
JUMPV
LABELV $196
line 173
;172:		while (buf[startpoint] && buf[startpoint] != '\"')
;173:		{
line 174
;174:			startpoint++;
ADDRLP4 4
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 175
;175:		}
LABELV $197
line 172
ADDRLP4 56
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 56
INDIRI4
CNSTI4 0
EQI4 $199
ADDRLP4 56
INDIRI4
CNSTI4 34
NEI4 $196
LABELV $199
line 177
;176:
;177:		startpoint++;
ADDRLP4 4
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 178
;178:	}
ADDRGP4 $201
JUMPV
LABELV $200
line 181
;179:
;180:	while (buf[startpoint] && buf[startpoint] != '\0' && buf[startpoint] != '\n')
;181:	{
line 182
;182:		outbuf[i] = buf[startpoint];
ADDRLP4 0
INDIRI4
ADDRFP4 8
INDIRP4
ADDP4
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
ASGNI1
line 183
;183:		i++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 184
;184:		startpoint++;
ADDRLP4 4
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 186
;185:
;186:		if (inquotes && buf[startpoint] == '\"')
ADDRFP4 12
INDIRI4
CNSTI4 0
EQI4 $203
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
CNSTI4 34
NEI4 $203
line 187
;187:		{
line 188
;188:			break;
ADDRGP4 $202
JUMPV
LABELV $203
line 190
;189:		}
;190:	}
LABELV $201
line 180
ADDRLP4 56
ADDRLP4 4
INDIRI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 60
CNSTI4 0
ASGNI4
ADDRLP4 56
INDIRI4
ADDRLP4 60
INDIRI4
EQI4 $206
ADDRLP4 56
INDIRI4
ADDRLP4 60
INDIRI4
EQI4 $206
ADDRLP4 56
INDIRI4
CNSTI4 10
NEI4 $200
LABELV $206
LABELV $202
line 192
;191:
;192:	outbuf[i] = '\0';
ADDRLP4 0
INDIRI4
ADDRFP4 8
INDIRP4
ADDP4
CNSTI1 0
ASGNI1
line 194
;193:
;194:	return 1;
CNSTI4 1
RETI4
LABELV $151
endproc CGSagaGetPairedValue 64 8
export CG_InitSagaMode
proc CG_InitSagaMode 544 16
line 198
;195:}
;196:
;197:void CG_InitSagaMode(void)
;198:{
line 200
;199:	char			levelname[512];
;200:	int				len = 0;
ADDRLP4 516
CNSTI4 0
ASGNI4
line 201
;201:	int				i = 0;
ADDRLP4 0
CNSTI4 0
ASGNI4
line 204
;202:	fileHandle_t	f;
;203:
;204:	if (cgs.gametype != GT_SAGA)
ADDRGP4 cgs+32960
INDIRI4
CNSTI4 6
EQI4 $208
line 205
;205:	{
line 206
;206:		goto failure;
ADDRGP4 $211
JUMPV
LABELV $208
line 209
;207:	}
;208:
;209:	Com_sprintf(levelname, sizeof(levelname), "%s\0", cgs.mapname);
ADDRLP4 4
ARGP4
CNSTI4 512
ARGI4
ADDRGP4 $212
ARGP4
ADDRGP4 cgs+33008
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 211
;210:
;211:	i = strlen(levelname)-1;
ADDRLP4 4
ARGP4
ADDRLP4 524
ADDRGP4 strlen
CALLI4
ASGNI4
ADDRLP4 0
ADDRLP4 524
INDIRI4
CNSTI4 1
SUBI4
ASGNI4
ADDRGP4 $215
JUMPV
LABELV $214
line 214
;212:
;213:	while (i > 0 && levelname[i] && levelname[i] != '.')
;214:	{
line 215
;215:		i--;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
SUBI4
ASGNI4
line 216
;216:	}
LABELV $215
line 213
ADDRLP4 532
CNSTI4 0
ASGNI4
ADDRLP4 0
INDIRI4
ADDRLP4 532
INDIRI4
LEI4 $218
ADDRLP4 536
ADDRLP4 0
INDIRI4
ADDRLP4 4
ADDP4
INDIRI1
CVII4 1
ASGNI4
ADDRLP4 536
INDIRI4
ADDRLP4 532
INDIRI4
EQI4 $218
ADDRLP4 536
INDIRI4
CNSTI4 46
NEI4 $214
LABELV $218
line 218
;217:
;218:	if (!i)
ADDRLP4 0
INDIRI4
CNSTI4 0
NEI4 $219
line 219
;219:	{
line 220
;220:		goto failure;
ADDRGP4 $211
JUMPV
LABELV $219
line 223
;221:	}
;222:
;223:	levelname[i] = '\0'; //kill the ".bsp"
ADDRLP4 0
INDIRI4
ADDRLP4 4
ADDP4
CNSTI1 0
ASGNI1
line 225
;224:
;225:	Com_sprintf(levelname, sizeof(levelname), "%s.saga\0", levelname); 
ADDRLP4 4
ARGP4
CNSTI4 512
ARGI4
ADDRGP4 $221
ARGP4
ADDRLP4 4
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 227
;226:
;227:	if (!levelname || !levelname[0])
ADDRLP4 4
CVPU4 4
CNSTU4 0
EQU4 $224
ADDRLP4 4
INDIRI1
CVII4 1
CNSTI4 0
NEI4 $222
LABELV $224
line 228
;228:	{
line 229
;229:		goto failure;
ADDRGP4 $211
JUMPV
LABELV $222
line 232
;230:	}
;231:
;232:	len = trap_FS_FOpenFile(levelname, &f, FS_READ);
ADDRLP4 4
ARGP4
ADDRLP4 520
ARGP4
CNSTI4 0
ARGI4
ADDRLP4 540
ADDRGP4 trap_FS_FOpenFile
CALLI4
ASGNI4
ADDRLP4 516
ADDRLP4 540
INDIRI4
ASGNI4
line 234
;233:
;234:	if (!f || len >= MAX_SAGA_INFO_SIZE)
ADDRLP4 520
INDIRI4
CNSTI4 0
EQI4 $227
ADDRLP4 516
INDIRI4
CNSTI4 8192
LTI4 $225
LABELV $227
line 235
;235:	{
line 236
;236:		goto failure;
ADDRGP4 $211
JUMPV
LABELV $225
line 239
;237:	}
;238:
;239:	trap_FS_Read(cg_saga_info, len, f);
ADDRGP4 cg_saga_info
ARGP4
ADDRLP4 516
INDIRI4
ARGI4
ADDRLP4 520
INDIRI4
ARGI4
ADDRGP4 trap_FS_Read
CALLV
pop
line 241
;240:
;241:	cg_saga_valid = 1;
ADDRGP4 cg_saga_valid
CNSTI4 1
ASGNI4
line 243
;242:
;243:	return;
ADDRGP4 $207
JUMPV
LABELV $211
line 246
;244:
;245:failure:
;246:	cg_saga_valid = 0;
ADDRGP4 cg_saga_valid
CNSTI4 0
ASGNI4
line 247
;247:}
LABELV $207
endproc CG_InitSagaMode 544 16
export CG_SagaRoundOver
proc CG_SagaRoundOver 10324 16
line 250
;248:
;249:void CG_SagaRoundOver(centity_t *ent, int won)
;250:{
line 256
;251:	int				myTeam;
;252:	char			teamstr[64];
;253:	char			objectives[MAX_SAGA_INFO_SIZE];
;254:	char			appstring[1024];
;255:	char			soundstr[1024];
;256:	int				success = 0;
ADDRLP4 8260
CNSTI4 0
ASGNI4
line 258
;257:
;258:	if (!cg_saga_valid)
ADDRGP4 cg_saga_valid
INDIRI4
CNSTI4 0
NEI4 $229
line 259
;259:	{
line 260
;260:		Com_Printf("ERROR: Saga data does not exist on client!\n");
ADDRGP4 $231
ARGP4
ADDRGP4 Com_Printf
CALLV
pop
line 261
;261:		return;
ADDRGP4 $228
JUMPV
LABELV $229
line 264
;262:	}
;263:
;264:	if (!cg.snap)
ADDRGP4 cg+36
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $232
line 265
;265:	{
line 266
;266:		return; //yikes
ADDRGP4 $228
JUMPV
LABELV $232
line 269
;267:	}
;268:
;269:	myTeam = cg.snap->ps.persistant[PERS_TEAM];
ADDRLP4 64
ADDRGP4 cg+36
INDIRP4
CNSTI4 336
ADDP4
INDIRI4
ASGNI4
line 271
;270:
;271:	if (myTeam == TEAM_SPECTATOR)
ADDRLP4 64
INDIRI4
CNSTI4 3
NEI4 $236
line 272
;272:	{
line 273
;273:		return;
ADDRGP4 $228
JUMPV
LABELV $236
line 276
;274:	}
;275:
;276:	if (myTeam == SAGATEAM_IMPERIAL)
ADDRLP4 64
INDIRI4
CNSTI4 1
NEI4 $238
line 277
;277:	{
line 278
;278:		Com_sprintf(teamstr, sizeof(teamstr), "Imperial");
ADDRLP4 0
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $240
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 279
;279:	}
ADDRGP4 $239
JUMPV
LABELV $238
line 281
;280:	else
;281:	{
line 282
;282:		Com_sprintf(teamstr, sizeof(teamstr), "Rebel");
ADDRLP4 0
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $241
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 283
;283:	}
LABELV $239
line 285
;284:
;285:	if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives))
ADDRGP4 cg_saga_info
ARGP4
ADDRLP4 0
ARGP4
ADDRLP4 68
ARGP4
ADDRLP4 10312
ADDRGP4 CGSagaGetValueGroup
CALLI4
ASGNI4
ADDRLP4 10312
INDIRI4
CNSTI4 0
EQI4 $242
line 286
;286:	{
line 287
;287:		if (won == myTeam)
ADDRFP4 4
INDIRI4
ADDRLP4 64
INDIRI4
NEI4 $244
line 288
;288:		{
line 289
;289:			success = CGSagaGetPairedValue(objectives, "wonround", appstring, 1);
ADDRLP4 68
ARGP4
ADDRGP4 $246
ARGP4
ADDRLP4 8264
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 10316
ADDRGP4 CGSagaGetPairedValue
CALLI4
ASGNI4
ADDRLP4 8260
ADDRLP4 10316
INDIRI4
ASGNI4
line 290
;290:		}
ADDRGP4 $245
JUMPV
LABELV $244
line 292
;291:		else
;292:		{
line 293
;293:			success = CGSagaGetPairedValue(objectives, "lostround", appstring, 1);
ADDRLP4 68
ARGP4
ADDRGP4 $247
ARGP4
ADDRLP4 8264
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 10316
ADDRGP4 CGSagaGetPairedValue
CALLI4
ASGNI4
ADDRLP4 8260
ADDRLP4 10316
INDIRI4
ASGNI4
line 294
;294:		}
LABELV $245
line 296
;295:
;296:		if (success)
ADDRLP4 8260
INDIRI4
CNSTI4 0
EQI4 $248
line 297
;297:		{
line 298
;298:			Com_Printf("%s\n", appstring);
ADDRGP4 $250
ARGP4
ADDRLP4 8264
ARGP4
ADDRGP4 Com_Printf
CALLV
pop
line 299
;299:		}
LABELV $248
line 301
;300:
;301:		if (myTeam == won)
ADDRLP4 64
INDIRI4
ADDRFP4 4
INDIRI4
NEI4 $251
line 302
;302:		{
line 303
;303:			Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_wewon");
ADDRLP4 0
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $253
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 304
;304:		}
ADDRGP4 $252
JUMPV
LABELV $251
line 306
;305:		else
;306:		{
line 307
;307:			Com_sprintf(teamstr, sizeof(teamstr), "roundover_sound_welost");
ADDRLP4 0
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $254
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 308
;308:		}
LABELV $252
line 310
;309:
;310:		if (CGSagaGetPairedValue(objectives, teamstr, appstring, 1))
ADDRLP4 68
ARGP4
ADDRLP4 0
ARGP4
ADDRLP4 8264
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 10316
ADDRGP4 CGSagaGetPairedValue
CALLI4
ASGNI4
ADDRLP4 10316
INDIRI4
CNSTI4 0
EQI4 $255
line 311
;311:		{
line 312
;312:			Com_sprintf(soundstr, sizeof(soundstr), appstring);
ADDRLP4 9288
ARGP4
CNSTI4 1024
ARGI4
ADDRLP4 8264
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 313
;313:		}
ADDRGP4 $256
JUMPV
LABELV $255
line 315
;314:		else
;315:		{
line 316
;316:			if (myTeam != won)
ADDRLP4 64
INDIRI4
ADDRFP4 4
INDIRI4
EQI4 $257
line 317
;317:			{
line 318
;318:				Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_ROUND);
ADDRLP4 9288
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 $259
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 319
;319:			}
ADDRGP4 $258
JUMPV
LABELV $257
line 321
;320:			else
;321:			{
line 322
;322:				Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_ROUND);
ADDRLP4 9288
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 $260
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 323
;323:			}
LABELV $258
line 324
;324:		}
LABELV $256
line 326
;325:
;326:		trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER);
ADDRLP4 9288
ARGP4
ADDRLP4 10320
ADDRGP4 trap_S_RegisterSound
CALLI4
ASGNI4
ADDRLP4 10320
INDIRI4
ARGI4
CNSTI4 7
ARGI4
ADDRGP4 trap_S_StartLocalSound
CALLV
pop
line 328
;327:		//Com_Printf("Play sound: %s\n", soundstr);
;328:	}
LABELV $242
line 329
;329:}
LABELV $228
endproc CG_SagaRoundOver 10324 16
export CG_SagaObjectiveCompleted
proc CG_SagaObjectiveCompleted 18784 16
line 332
;330:
;331:void CG_SagaObjectiveCompleted(centity_t *ent, int won, int objectivenum)
;332:{
line 340
;333:	int				myTeam;
;334:	char			teamstr[64];
;335:	char			objstr[256];
;336:	char			objectives[MAX_SAGA_INFO_SIZE];
;337:	char			foundobjective[MAX_SAGA_INFO_SIZE];
;338:	char			appstring[1024];
;339:	char			soundstr[1024];
;340:	int				success = 0;
ADDRLP4 8524
CNSTI4 0
ASGNI4
line 341
;341:	int				i = 0;
ADDRLP4 0
CNSTI4 0
ASGNI4
line 342
;342:	int				i_r = 0;
ADDRLP4 8196
CNSTI4 0
ASGNI4
line 344
;343:
;344:	if (!cg_saga_valid)
ADDRGP4 cg_saga_valid
INDIRI4
CNSTI4 0
NEI4 $262
line 345
;345:	{
line 346
;346:		Com_Printf("ERROR: Saga data does not exist on client!\n");
ADDRGP4 $231
ARGP4
ADDRGP4 Com_Printf
CALLV
pop
line 347
;347:		return;
ADDRGP4 $261
JUMPV
LABELV $262
line 350
;348:	}
;349:
;350:	if (!cg.snap)
ADDRGP4 cg+36
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $264
line 351
;351:	{
line 352
;352:		return; //yikes
ADDRGP4 $261
JUMPV
LABELV $264
line 355
;353:	}
;354:
;355:	myTeam = cg.snap->ps.persistant[PERS_TEAM];
ADDRLP4 8264
ADDRGP4 cg+36
INDIRP4
CNSTI4 336
ADDP4
INDIRI4
ASGNI4
line 357
;356:
;357:	if (myTeam == TEAM_SPECTATOR)
ADDRLP4 8264
INDIRI4
CNSTI4 3
NEI4 $268
line 358
;358:	{
line 359
;359:		return;
ADDRGP4 $261
JUMPV
LABELV $268
line 362
;360:	}
;361:
;362:	if (won == SAGATEAM_IMPERIAL)
ADDRFP4 4
INDIRI4
CNSTI4 1
NEI4 $270
line 363
;363:	{
line 364
;364:		Com_sprintf(teamstr, sizeof(teamstr), "Imperial");
ADDRLP4 8200
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $240
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 365
;365:	}
ADDRGP4 $271
JUMPV
LABELV $270
line 367
;366:	else
;367:	{
line 368
;368:		Com_sprintf(teamstr, sizeof(teamstr), "Rebel");
ADDRLP4 8200
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $241
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 369
;369:	}
LABELV $271
line 371
;370:
;371:	if (CGSagaGetValueGroup(cg_saga_info, teamstr, objectives))
ADDRGP4 cg_saga_info
ARGP4
ADDRLP4 8200
ARGP4
ADDRLP4 4
ARGP4
ADDRLP4 18768
ADDRGP4 CGSagaGetValueGroup
CALLI4
ASGNI4
ADDRLP4 18768
INDIRI4
CNSTI4 0
EQI4 $272
line 372
;372:	{
line 373
;373:		Com_sprintf(objstr, sizeof(objstr), "Objective%i", objectivenum);
ADDRLP4 8268
ARGP4
CNSTI4 256
ARGI4
ADDRGP4 $274
ARGP4
ADDRFP4 8
INDIRI4
ARGI4
ADDRGP4 Com_sprintf
CALLV
pop
ADDRGP4 $276
JUMPV
LABELV $275
line 376
;374:
;375:		while (objectives[i])
;376:		{
line 377
;377:			if (objectives[i] != 9)
ADDRLP4 0
INDIRI4
ADDRLP4 4
ADDP4
INDIRI1
CVII4 1
CNSTI4 9
EQI4 $278
line 378
;378:			{
line 379
;379:				objectives[i_r] = objectives[i];
ADDRLP4 8196
INDIRI4
ADDRLP4 4
ADDP4
ADDRLP4 0
INDIRI4
ADDRLP4 4
ADDP4
INDIRI1
ASGNI1
line 380
;380:				i_r++;
ADDRLP4 8196
ADDRLP4 8196
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 381
;381:			}
LABELV $278
line 383
;382:
;383:			i++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 384
;384:		}
LABELV $276
line 375
ADDRLP4 0
INDIRI4
ADDRLP4 4
ADDP4
INDIRI1
CVII4 1
CNSTI4 0
NEI4 $275
line 385
;385:		objectives[i_r] = '\0';
ADDRLP4 8196
INDIRI4
ADDRLP4 4
ADDP4
CNSTI1 0
ASGNI1
line 387
;386:
;387:		if (CGSagaGetValueGroup(objectives, objstr, foundobjective))
ADDRLP4 4
ARGP4
ADDRLP4 8268
ARGP4
ADDRLP4 8528
ARGP4
ADDRLP4 18772
ADDRGP4 CGSagaGetValueGroup
CALLI4
ASGNI4
ADDRLP4 18772
INDIRI4
CNSTI4 0
EQI4 $280
line 388
;388:		{
line 389
;389:			if (myTeam == SAGATEAM_IMPERIAL)
ADDRLP4 8264
INDIRI4
CNSTI4 1
NEI4 $282
line 390
;390:			{
line 391
;391:				success = CGSagaGetPairedValue(foundobjective, "message_imperial", appstring, 1);
ADDRLP4 8528
ARGP4
ADDRGP4 $284
ARGP4
ADDRLP4 16720
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 18776
ADDRGP4 CGSagaGetPairedValue
CALLI4
ASGNI4
ADDRLP4 8524
ADDRLP4 18776
INDIRI4
ASGNI4
line 392
;392:			}
ADDRGP4 $283
JUMPV
LABELV $282
line 394
;393:			else
;394:			{
line 395
;395:				success = CGSagaGetPairedValue(foundobjective, "message_rebel", appstring, 1);
ADDRLP4 8528
ARGP4
ADDRGP4 $285
ARGP4
ADDRLP4 16720
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 18776
ADDRGP4 CGSagaGetPairedValue
CALLI4
ASGNI4
ADDRLP4 8524
ADDRLP4 18776
INDIRI4
ASGNI4
line 396
;396:			}
LABELV $283
line 398
;397:
;398:			if (success)
ADDRLP4 8524
INDIRI4
CNSTI4 0
EQI4 $286
line 399
;399:			{
line 400
;400:				Com_Printf("%s\n", appstring);
ADDRGP4 $250
ARGP4
ADDRLP4 16720
ARGP4
ADDRGP4 Com_Printf
CALLV
pop
line 401
;401:			}
LABELV $286
line 403
;402:
;403:			if (myTeam == SAGATEAM_IMPERIAL)
ADDRLP4 8264
INDIRI4
CNSTI4 1
NEI4 $288
line 404
;404:			{
line 405
;405:				Com_sprintf(teamstr, sizeof(teamstr), "sound_imperial");
ADDRLP4 8200
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $290
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 406
;406:			}
ADDRGP4 $289
JUMPV
LABELV $288
line 408
;407:			else
;408:			{
line 409
;409:				Com_sprintf(teamstr, sizeof(teamstr), "sound_rebel");
ADDRLP4 8200
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 $291
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 410
;410:			}
LABELV $289
line 412
;411:
;412:			if (CGSagaGetPairedValue(foundobjective, teamstr, appstring, 1))
ADDRLP4 8528
ARGP4
ADDRLP4 8200
ARGP4
ADDRLP4 16720
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 18776
ADDRGP4 CGSagaGetPairedValue
CALLI4
ASGNI4
ADDRLP4 18776
INDIRI4
CNSTI4 0
EQI4 $292
line 413
;413:			{
line 414
;414:				Com_sprintf(soundstr, sizeof(soundstr), appstring);
ADDRLP4 17744
ARGP4
CNSTI4 1024
ARGI4
ADDRLP4 16720
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 415
;415:			}
ADDRGP4 $293
JUMPV
LABELV $292
line 417
;416:			else
;417:			{
line 418
;418:				if (myTeam != won)
ADDRLP4 8264
INDIRI4
ADDRFP4 4
INDIRI4
EQI4 $294
line 419
;419:				{
line 420
;420:					Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_LOSE_OBJECTIVE);
ADDRLP4 17744
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 $259
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 421
;421:				}
ADDRGP4 $295
JUMPV
LABELV $294
line 423
;422:				else
;423:				{
line 424
;424:					Com_sprintf(soundstr, sizeof(soundstr), DEFAULT_WIN_OBJECTIVE);
ADDRLP4 17744
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 $260
ARGP4
ADDRGP4 Com_sprintf
CALLV
pop
line 425
;425:				}
LABELV $295
line 426
;426:			}
LABELV $293
line 428
;427:
;428:			trap_S_StartLocalSound(trap_S_RegisterSound(soundstr), CHAN_ANNOUNCER);
ADDRLP4 17744
ARGP4
ADDRLP4 18780
ADDRGP4 trap_S_RegisterSound
CALLI4
ASGNI4
ADDRLP4 18780
INDIRI4
ARGI4
CNSTI4 7
ARGI4
ADDRGP4 trap_S_StartLocalSound
CALLV
pop
line 430
;429:			//Com_Printf("Play sound: %s\n", soundstr);
;430:		}
LABELV $280
line 431
;431:	}
LABELV $272
line 432
;432:}
LABELV $261
endproc CG_SagaObjectiveCompleted 18784 16
bss
export cg_saga_valid
align 4
LABELV cg_saga_valid
skip 4
export cg_saga_info
align 1
LABELV cg_saga_info
skip 8192
import g2WeaponInstances
import CG_CheckPlayerG2Weapons
import CG_CopyG2WeaponInstance
import CG_ShutDownG2Weapons
import CG_InitG2Weapons
import CG_CreateBBRefEnts
import CG_SetGhoul2Info
import CG_Init_CGents
import CG_Init_CG
import trap_G2API_SetNewOrigin
import trap_G2API_SetSurfaceOnOff
import trap_G2API_SetRootSurface
import trap_G2API_SetBoneAnim
import trap_G2API_GetGLAName
import trap_G2API_SetBoneAngles
import trap_G2API_CleanGhoul2Models
import trap_G2API_SetBoltInfo
import trap_G2API_AddBolt
import trap_G2API_RemoveGhoul2Model
import trap_G2API_HasGhoul2ModelOnIndex
import trap_G2API_DuplicateGhoul2Instance
import trap_G2API_CopySpecificGhoul2Model
import trap_G2API_CopyGhoul2Instance
import trap_G2API_GiveMeVectorFromMatrix
import trap_G2API_InitGhoul2Model
import trap_G2API_GetBoltMatrix_NoRecNoRot
import trap_G2API_GetBoltMatrix_NoReconstruct
import trap_G2API_GetBoltMatrix
import trap_G2_HaveWeGhoul2Models
import trap_G2_SetGhoul2ModelIndexes
import trap_G2_ListModelBones
import trap_G2_ListModelSurfaces
import trap_G2API_CollisionDetect
import FX_ForceDrained
import FX_TieLaserAltFireThink
import FX_TieLaserWeaponHitPlayer
import FX_TieLaserWeaponHitWall
import FX_TieLaserProjectileThink
import FX_BlasterWeaponHitPlayer
import FX_BlasterWeaponHitWall
import FX_BlasterAltFireThink
import FX_BlasterProjectileThink
import FX_BryarAltHitPlayer
import FX_BryarHitPlayer
import FX_BryarAltHitWall
import FX_BryarHitWall
import CG_Spark
import FX_TurretHitPlayer
import FX_TurretHitWall
import FX_TurretProjectileThink
import CG_NewParticleArea
import initparticles
import CG_GetStripEdString
import CG_ParticleExplosion
import CG_ParticleMisc
import CG_ParticleDust
import CG_ParticleSparks
import CG_ParticleBulletDebris
import CG_ParticleSnowFlurry
import CG_AddParticleShrapnel
import CG_ParticleSmoke
import CG_ParticleSnow
import CG_AddParticles
import CG_ClearParticles
import trap_ROFF_Purge_Ent
import trap_ROFF_Play
import trap_ROFF_Cache
import trap_ROFF_UpdateEntities
import trap_ROFF_Clean
import trap_CG_RegisterSharedMemory
import trap_SP_GetStringTextString
import trap_SP_Print
import trap_FX_AddSprite
import trap_FX_AddPrimitive
import trap_FX_AddBezier
import trap_FX_AddPoly
import trap_FX_AdjustTime
import trap_FX_FreeSystem
import trap_FX_InitSystem
import trap_FX_AddScheduledEffects
import trap_FX_PlayBoltedEffectID
import trap_FX_PlayEntityEffectID
import trap_FX_PlayEffectID
import trap_FX_PlaySimpleEffectID
import trap_FX_PlayEntityEffect
import trap_FX_PlayEffect
import trap_FX_PlaySimpleEffect
import trap_FX_RegisterEffect
import trap_R_inPVS
import trap_GetEntityToken
import trap_getCameraInfo
import trap_startCamera
import trap_loadCamera
import trap_SnapVector
import trap_CIN_SetExtents
import trap_CIN_DrawCinematic
import trap_CIN_RunCinematic
import trap_CIN_StopCinematic
import trap_CIN_PlayCinematic
import BG_CycleForce
import BG_ProperForceIndex
import BG_CycleInven
import trap_Key_GetKey
import trap_Key_SetCatcher
import trap_Key_GetCatcher
import trap_Key_IsDown
import trap_MemoryRemaining
import testPrintFloat
import testPrintInt
import trap_OpenUIMenu
import trap_SetClientTurnExtent
import trap_SetClientForceAngle
import trap_SetUserCmdValue
import trap_GetUserCmd
import trap_GetCurrentCmdNumber
import trap_GetServerCommand
import trap_GetSnapshot
import trap_GetCurrentSnapshotNumber
import trap_GetGameState
import trap_GetGlconfig
import trap_FX_AddLine
import trap_R_GetBModelVerts
import trap_R_SetLightStyle
import trap_R_GetLightStyle
import trap_R_RemapShader
import trap_R_DrawRotatePic2
import trap_R_DrawRotatePic
import trap_R_LerpTag
import trap_R_ModelBounds
import trap_R_DrawStretchPic
import trap_R_SetColor
import trap_R_RenderScene
import trap_R_LightForPoint
import trap_R_AddLightToScene
import trap_R_AddPolysToScene
import trap_R_AddPolyToScene
import trap_R_AddRefEntityToScene
import trap_R_ClearScene
import trap_AnyLanguage_ReadCharFromString
import trap_Language_UsesSpaces
import trap_Language_IsAsian
import trap_R_Font_DrawString
import trap_R_Font_HeightPixels
import trap_R_Font_StrLenChars
import trap_R_Font_StrLenPixels
import trap_R_RegisterFont
import trap_R_RegisterShaderNoMip
import trap_R_RegisterShader
import trap_R_RegisterSkin
import trap_R_RegisterModel
import trap_R_LoadWorldMap
import trap_S_StopBackgroundTrack
import trap_S_StartBackgroundTrack
import trap_S_RegisterSound
import trap_S_Respatialize
import trap_S_UpdateEntityPosition
import trap_S_AddRealLoopingSound
import trap_S_AddLoopingSound
import trap_S_ClearLoopingSounds
import trap_S_StartLocalSound
import trap_S_StopLoopingSound
import trap_S_StartSound
import trap_S_MuteSound
import trap_CM_MarkFragments
import trap_CM_TransformedBoxTrace
import trap_CM_BoxTrace
import trap_CM_TransformedPointContents
import trap_CM_PointContents
import trap_CM_TempBoxModel
import trap_CM_InlineModel
import trap_CM_NumInlineModels
import trap_CM_LoadMap
import trap_UpdateScreen
import trap_SendClientCommand
import trap_AddCommand
import trap_SendConsoleCommand
import trap_FS_FCloseFile
import trap_FS_Write
import trap_FS_Read
import trap_FS_FOpenFile
import trap_Args
import trap_Argv
import trap_Argc
import trap_Cvar_VariableStringBuffer
import trap_Cvar_Set
import trap_Cvar_Update
import trap_Cvar_Register
import trap_Milliseconds
import trap_Error
import trap_Print
import CG_CheckChangedPredictableEvents
import CG_TransitionPlayerState
import CG_Respawn
import CG_IsMindTricked
import CG_PlayBufferedVoiceChats
import CG_VoiceChatLocal
import CG_ShaderStateChanged
import CG_LoadVoiceChats
import CG_SetConfigValues
import CG_ParseServerinfo
import CG_ExecuteNewServerCommands
import CG_InitConsoleCommands
import CG_ConsoleCommand
import CG_DrawOldTourneyScoreboard
import CG_DrawOldScoreboard
import CG_DrawInformation
import CG_LoadingClient
import CG_LoadingItem
import CG_LoadingString
import CG_ProcessSnapshots
import CG_InitGlass
import CG_TestLine
import CG_SurfaceExplosion
import CG_MakeExplosion
import CG_Bleed
import CG_ScorePlum
import CG_CreateDebris
import CG_GlassShatter
import CG_BubbleTrail
import CG_SmokePuff
import CG_AddLocalEntities
import CG_AllocLocalEntity
import CG_InitLocalEntities
import CG_ImpactMark
import CG_AddMarks
import CG_InitMarkPolys
import CG_OutOfAmmoChange
import CG_DrawIconBackground
import CG_DrawWeaponSelect
import CG_AddPlayerWeapon
import CG_AddViewWeapon
import CG_MissileHitPlayer
import CG_MissileHitWall
import CG_FireWeapon
import CG_RegisterItemVisuals
import CG_RegisterWeapon
import CG_Weapon_f
import CG_PrevWeapon_f
import CG_NextWeapon_f
import CG_GetClientWeaponMuzzleBoltPoint
import TurretClientRun
import ScaleModelAxis
import CG_PositionRotatedEntityOnTag
import CG_PositionEntityOnTag
import CG_AdjustPositionForMover
import CG_Beam
import CG_ManualEntityRender
import CG_AddPacketEntities
import CG_SetEntitySoundPosition
import CG_ReattachLimb
import CG_PainEvent
import CG_EntityEvent
import CG_PlaceString
import CG_CheckEvents
import CG_LoadDeferredPlayers
import CG_PredictPlayerState
import CG_Trace
import CG_PointContents
import CG_BuildSolidList
import CG_PlayerShieldHit
import CG_CustomSound
import CG_NewClientInfo
import CG_AddRefEntityWithPowerups
import CG_ResetPlayerEntity
import CG_Player
import CG_StatusHandle
import CG_OtherTeamHasFlag
import CG_YourTeamHasFlag
import CG_GameTypeString
import CG_CheckOrderPending
import CG_Text_PaintChar
import CG_Draw3DModel
import CG_GetKillerText
import CG_GetGameStatusText
import CG_GetTeamColor
import CG_InitTeamChat
import CG_SetPrintString
import CG_ShowResponseHead
import CG_DeferMenuScript
import CG_RunMenuScript
import CG_OwnerDrawVisible
import CG_GetValue
import CG_SelectNextPlayer
import CG_SelectPrevPlayer
import CG_Text_Height
import CG_Text_Width
import CG_Text_Paint
import CG_OwnerDraw
import CG_DrawTeamBackground
import CG_DrawFlagModel
import CG_DrawActive
import CG_DrawHead
import CG_CenterPrint
import CG_AddLagometerSnapshotInfo
import CG_AddLagometerFrameInfo
import teamChat2
import teamChat1
import systemChat
import drawTeamOverlayModificationCount
import numSortedTeamPlayers
import sortedTeamPlayers
import CG_DrawTopBottom
import CG_DrawSides
import CG_DrawRect
import UI_DrawScaledProportionalString
import UI_DrawProportionalString
import CG_GetColorForHealth
import CG_ColorForHealth
import CG_TileClear
import CG_TeamColor
import CG_FadeColor
import CG_DrawStrlen
import CG_DrawSmallStringColor
import CG_DrawSmallString
import CG_DrawBigStringColor
import CG_DrawBigString
import CG_DrawStringExt
import CG_DrawNumField
import CG_DrawString
import CG_DrawRotatePic2
import CG_DrawRotatePic
import CG_DrawPic
import CG_FillRect
import CG_TestModelAnimate_f
import CG_TestModelSetAnglespost_f
import CG_TestModelSetAnglespre_f
import CG_ListModelBones_f
import CG_ListModelSurfaces_f
import CG_TestModelSurfaceOnOff_f
import CG_TestG2Model_f
import CG_DrawActiveFrame
import CG_AddBufferedSound
import CG_ZoomUp_f
import CG_ZoomDown_f
import CG_TestModelPrevSkin_f
import CG_TestModelNextSkin_f
import CG_TestModelPrevFrame_f
import CG_TestModelNextFrame_f
import CG_TestGun_f
import CG_TestModel_f
import CG_PrevForcePower_f
import CG_NextForcePower_f
import CG_PrevInventory_f
import CG_NextInventory_f
import CG_BuildSpectatorString
import CG_SetScoreSelection
import CG_RankRunFrame
import CG_EventHandling
import CG_MouseEvent
import CG_KeyEvent
import CG_LoadMenus
import CG_LastAttacker
import CG_CrosshairPlayer
import CG_UpdateCvars
import CG_StartMusic
import CG_Error
import CG_Printf
import CG_Argv
import CG_ConfigString
import cg_followCamTransition
import cg_followCam
import cg_roll
import cg_throttle
import cg_debugBB
import ui_myteam
import cg_recordSPDemoName
import cg_recordSPDemo
import cg_singlePlayerActive
import cg_enableBreath
import cg_enableDust
import cg_singlePlayer
import cg_currentSelectedPlayerName
import cg_currentSelectedPlayer
import cg_blueTeamName
import cg_redTeamName
import cg_trueLightning
import cg_noProjectileTrail
import cg_noTaunt
import cg_bigFont
import cg_smallFont
import cg_cameraMode
import cg_timescale
import cg_timescaleFadeSpeed
import cg_timescaleFadeEnd
import cg_cameraOrbitDelay
import cg_cameraOrbit
import pmove_msec
import pmove_fixed
import cg_smoothClients
import cg_hudFiles
import cg_scorePlum
import cg_noVoiceText
import cg_noVoiceChats
import cg_teamChatsOnly
import cg_drawFriend
import cg_deferPlayers
import cg_predictItems
import cg_blood
import cg_paused
import cg_buildScript
import cg_forceModel
import cg_stats
import cg_teamChatHeight
import cg_teamChatTime
import cg_synchronousClients
import cg_drawEnemyInfo
import cg_lagometer
import cg_stereoSeparation
import cg_thirdPersonHorzOffset
import cg_thirdPersonAlpha
import cg_thirdPersonTargetDamp
import cg_thirdPersonCameraDamp
import cg_thirdPersonVertOffset
import cg_thirdPersonPitchOffset
import cg_thirdPersonAngle
import cg_thirdPersonRange
import cg_thirdPerson
import cg_dismember
import cg_animBlend
import cg_auraShell
import cg_speedTrail
import cg_duelHeadAngles
import cg_saberTrail
import cg_saberContact
import cg_saberDynamicMarkTime
import cg_saberDynamicMarks
import cg_fpls
import cg_saberModelTraceEffect
import cg_oldPainSounds
import cg_swingAngles
import cg_zoomFov
import cg_fov
import cg_simpleItems
import cg_ignore
import cg_autoswitch
import cg_tracerLength
import cg_tracerWidth
import cg_tracerChance
import cg_viewsize
import cg_drawGun
import cg_gun_z
import cg_gun_y
import cg_gun_x
import cg_gun_frame
import cg_addMarks
import cg_footsteps
import cg_showmiss
import cg_noPlayerAnims
import cg_nopredict
import cg_errorDecay
import cg_debugEvents
import cg_debugPosition
import cg_debugAnim
import cg_animSpeed
import cg_draw2D
import cg_drawStatus
import cg_crosshairHealth
import cg_crosshairSize
import cg_crosshairY
import cg_crosshairX
import cg_teamOverlayUserinfo
import cg_drawTeamOverlay
import cg_drawRewards
import cg_dynamicCrosshair
import cg_drawScores
import cg_drawCrosshairNames
import cg_drawCrosshair
import cg_drawAmmoWarning
import cg_drawIcons
import cg_draw3dIcons
import cg_drawSnapshot
import cg_drawFPS
import cg_drawTimer
import cg_shadows
import cg_bobroll
import cg_bobpitch
import cg_bobup
import cg_runroll
import cg_runpitch
import cg_centertime
import cg_vehicleTemplates
import cg_vehicles
import VehicleInfo_GetNameForMovementType
import VehicleInfo_GetBitForMovementType
import VehicleInfo_GetNameForWeapon
import VehicleInfo_GetIndexForWeapon
import VehicleInfo_GetBitForWeapon
import VehicleInfo_GetBitForVehicleType
import Vehicle_CopyVehicle
import Vehicle_InitVehicle
import cg_markPolys
import cg_items
import cg_weapons
import cg_entities
import cg
import cgs
import CGCam_SetMusicMult
import CGCam_Shake
import cgScreenEffects
import ammoTicPos
import forceTicPos
import forcePowerDarkLight
import WeaponAttackAnim
import WeaponReadyAnim
import BG_OutOfMemory
import BG_StringAlloc
import BG_TempFree
import BG_TempAlloc
import BG_AllocUnaligned
import BG_Alloc
import BG_CanUseFPNow
import BG_HasYsalamiri
import BG_GetItemIndexByTag
import BG_ParseAnimationFile
import BG_PlayerTouchesItem
import BG_PlayerStateToEntityStateExtraPolate
import BG_PlayerStateToEntityState
import BG_TouchJumpPad
import BG_AddPredictableEventToPlayerstate
import BG_EvaluateTrajectoryDelta
import BG_EvaluateTrajectory
import BG_ForcePowerDrain
import BG_SaberStartTransAnim
import BG_InDeathAnim
import BG_InRoll
import BG_KnockawayForParry
import BG_BrokenParryForParry
import BG_BrokenParryForAttack
import BG_SaberInSpecialAttack
import BG_SpinningSaberAnim
import BG_FlippingAnim
import BG_SaberInIdle
import BG_SaberInSpecial
import BG_SaberInAttack
import BG_DirectFlippingAnim
import BG_InSaberStandAnim
import BG_InSpecialJump
import BG_LegalizedForcePowers
import saberMoveData
import BG_CanItemBeGrabbed
import BG_FindItemForHoldable
import BG_FindItemForPowerup
import BG_FindItemForWeapon
import BG_FindItem
import vectoyaw
import bg_numItems
import bg_itemlist
import PM_CalculateRelativeViewAngles
import Pmove
import PM_QuaternionViewAngles
import PM_UpdateViewAngles
import pm
import bgForcePowerCost
import forceMasteryPoints
import forceMasteryLevels
import bgGlobalAnimations
import BGPAFtextLoaded
import forcePowerSorted
import WP_MuzzlePoint
import ammoData
import weaponData
import GetStringForID
import GetIDForString
import Q_irand
import irand
import flrand
import Rand_Init
import Com_Printf
import Com_Error
import Info_NextPair
import Info_Validate
import Info_SetValueForKey_Big
import Info_SetValueForKey
import Info_RemoveKey_big
import Info_RemoveKey
import Info_ValueForKey
import va
import Q_CleanStr
import Q_PrintStrlen
import Q_strcat
import Q_strncpyz
import Q_strrchr
import Q_strupr
import Q_strlwr
import Q_stricmpn
import Q_strncmp
import Q_stricmp
import Q_isalpha
import Q_isupper
import Q_islower
import Q_isprint
import Com_sprintf
import Parse3DMatrix
import Parse2DMatrix
import Parse1DMatrix
import SkipRestOfLine
import SkipBracedSection
import COM_MatchToken
import COM_ParseVec4
import COM_ParseFloat
import COM_ParseInt
import COM_ParseString
import COM_ParseWarning
import COM_ParseError
import COM_Compress
import COM_ParseExt
import COM_Parse
import SkipWhitespace
import COM_GetCurrentParseLine
import COM_BeginParseSession
import COM_DefaultExtension
import COM_StripExtension
import COM_SkipPath
import Com_Clamp
import MatrixToEuler
import QuatToAngles
import QuatMul
import AnglesToQuat
import AxisToQuaternion
import QuaternionToAxis
import QuaternionToEuler
import QuatToAxis
import QuaternionMultiply
import QuaternionNormalize
import QuaternionMagnitude
import QuaternionFromString
import AnglesToTieFloats
import AnglesFromTieFloats
import QuaternionToTieFloats
import QuaternionFromTieFloats
import QuaternionCopy
import PerpendicularVector
import AngleVectors
import RotationMatrixAroundDir
import MatrixMultiply
import MakeNormalVectors
import RotateAroundDirection
import RotatePointAroundVector
import ProjectPointOnPlane
import PlaneFromPoints
import AngleDelta
import AngleNormalize180
import AngleNormalize360
import AnglesSubtract
import AngleSubtract
import LerpAngle
import AngleMod
import BoxOnPlaneSide
import SetPlaneSignbits
import AxisCopy
import AxisClear
import AnglesToAxis
import vectoangles
import Q_crandom
import Q_random
import Q_rand
import Q_acos
import Q_log2
import VectorRotate
import Vector4Scale
import VectorNormalize2
import VectorNormalize
import CrossProduct
import VectorInverse
import VectorNormalizeFast
import DistanceSquared
import Distance
import VectorLengthSquared
import VectorLength
import VectorCompare
import AddPointToBounds
import ClearBounds
import RadiusFromBounds
import NormalizeColor
import ColorBytes4
import ColorBytes3
import _VectorMA
import _VectorScale
import _VectorCopy
import _VectorAdd
import _VectorSubtract
import _DotProduct
import ByteToDir
import DirToByte
import powf
import ClampShort
import ClampChar
import Q_rsqrt
import Q_fabs
import axisDefault
import vec3_origin
import g_color_table
import colorDkBlue
import colorLtBlue
import colorDkGrey
import colorMdGrey
import colorLtGrey
import colorWhite
import colorCyan
import colorMagenta
import colorYellow
import colorBlue
import colorGreen
import colorRed
import colorBlack
import colorTable
import bytedirs
import Com_Memcpy
import Com_Memset
import Hunk_Alloc
import forceSpeedLevels
import FloatSwap
import LongSwap
import ShortSwap
import acos
import fabs
import abs
import tan
import atan2
import cos
import sin
import sqrt
import floor
import ceil
import memcpy
import memset
import memmove
import sscanf
import vsprintf
import _atoi
import atoi
import _atof
import atof
import toupper
import tolower
import strncpy
import strstr
import strchr
import strcmp
import strcpy
import strcat
import strlen
import rand
import srand
import qsort
lit
align 1
LABELV $291
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 95
byte 1 114
byte 1 101
byte 1 98
byte 1 101
byte 1 108
byte 1 0
align 1
LABELV $290
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 95
byte 1 105
byte 1 109
byte 1 112
byte 1 101
byte 1 114
byte 1 105
byte 1 97
byte 1 108
byte 1 0
align 1
LABELV $285
byte 1 109
byte 1 101
byte 1 115
byte 1 115
byte 1 97
byte 1 103
byte 1 101
byte 1 95
byte 1 114
byte 1 101
byte 1 98
byte 1 101
byte 1 108
byte 1 0
align 1
LABELV $284
byte 1 109
byte 1 101
byte 1 115
byte 1 115
byte 1 97
byte 1 103
byte 1 101
byte 1 95
byte 1 105
byte 1 109
byte 1 112
byte 1 101
byte 1 114
byte 1 105
byte 1 97
byte 1 108
byte 1 0
align 1
LABELV $274
byte 1 79
byte 1 98
byte 1 106
byte 1 101
byte 1 99
byte 1 116
byte 1 105
byte 1 118
byte 1 101
byte 1 37
byte 1 105
byte 1 0
align 1
LABELV $260
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 99
byte 1 104
byte 1 97
byte 1 114
byte 1 115
byte 1 47
byte 1 107
byte 1 121
byte 1 108
byte 1 101
byte 1 47
byte 1 112
byte 1 114
byte 1 111
byte 1 116
byte 1 111
byte 1 116
byte 1 121
byte 1 112
byte 1 101
byte 1 47
byte 1 112
byte 1 101
byte 1 114
byte 1 115
byte 1 111
byte 1 110
byte 1 97
byte 1 108
byte 1 46
byte 1 109
byte 1 112
byte 1 51
byte 1 0
align 1
LABELV $259
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 99
byte 1 104
byte 1 97
byte 1 114
byte 1 115
byte 1 47
byte 1 107
byte 1 121
byte 1 108
byte 1 101
byte 1 47
byte 1 112
byte 1 114
byte 1 111
byte 1 116
byte 1 111
byte 1 116
byte 1 121
byte 1 112
byte 1 101
byte 1 47
byte 1 105
byte 1 115
byte 1 110
byte 1 116
byte 1 119
byte 1 111
byte 1 114
byte 1 107
byte 1 105
byte 1 110
byte 1 103
byte 1 46
byte 1 109
byte 1 112
byte 1 51
byte 1 0
align 1
LABELV $254
byte 1 114
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 111
byte 1 118
byte 1 101
byte 1 114
byte 1 95
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 95
byte 1 119
byte 1 101
byte 1 108
byte 1 111
byte 1 115
byte 1 116
byte 1 0
align 1
LABELV $253
byte 1 114
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 111
byte 1 118
byte 1 101
byte 1 114
byte 1 95
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 95
byte 1 119
byte 1 101
byte 1 119
byte 1 111
byte 1 110
byte 1 0
align 1
LABELV $250
byte 1 37
byte 1 115
byte 1 10
byte 1 0
align 1
LABELV $247
byte 1 108
byte 1 111
byte 1 115
byte 1 116
byte 1 114
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 0
align 1
LABELV $246
byte 1 119
byte 1 111
byte 1 110
byte 1 114
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 0
align 1
LABELV $241
byte 1 82
byte 1 101
byte 1 98
byte 1 101
byte 1 108
byte 1 0
align 1
LABELV $240
byte 1 73
byte 1 109
byte 1 112
byte 1 101
byte 1 114
byte 1 105
byte 1 97
byte 1 108
byte 1 0
align 1
LABELV $231
byte 1 69
byte 1 82
byte 1 82
byte 1 79
byte 1 82
byte 1 58
byte 1 32
byte 1 83
byte 1 97
byte 1 103
byte 1 97
byte 1 32
byte 1 100
byte 1 97
byte 1 116
byte 1 97
byte 1 32
byte 1 100
byte 1 111
byte 1 101
byte 1 115
byte 1 32
byte 1 110
byte 1 111
byte 1 116
byte 1 32
byte 1 101
byte 1 120
byte 1 105
byte 1 115
byte 1 116
byte 1 32
byte 1 111
byte 1 110
byte 1 32
byte 1 99
byte 1 108
byte 1 105
byte 1 101
byte 1 110
byte 1 116
byte 1 33
byte 1 10
byte 1 0
align 1
LABELV $221
byte 1 37
byte 1 115
byte 1 46
byte 1 115
byte 1 97
byte 1 103
byte 1 97
byte 1 0
byte 1 0
align 1
LABELV $212
byte 1 37
byte 1 115
byte 1 0
byte 1 0
