data
export vec3_origin
align 4
LABELV vec3_origin
byte 4 0
byte 4 0
byte 4 0
export axisDefault
align 4
LABELV axisDefault
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 0
byte 4 1065353216
export colorBlack
align 4
LABELV colorBlack
byte 4 0
byte 4 0
byte 4 0
byte 4 1065353216
export colorRed
align 4
LABELV colorRed
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 1065353216
export colorGreen
align 4
LABELV colorGreen
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 1065353216
export colorBlue
align 4
LABELV colorBlue
byte 4 0
byte 4 0
byte 4 1065353216
byte 4 1065353216
export colorYellow
align 4
LABELV colorYellow
byte 4 1065353216
byte 4 1065353216
byte 4 0
byte 4 1065353216
export colorMagenta
align 4
LABELV colorMagenta
byte 4 1065353216
byte 4 0
byte 4 1065353216
byte 4 1065353216
export colorCyan
align 4
LABELV colorCyan
byte 4 0
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
export colorWhite
align 4
LABELV colorWhite
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
export colorLtGrey
align 4
LABELV colorLtGrey
byte 4 1061158912
byte 4 1061158912
byte 4 1061158912
byte 4 1065353216
export colorMdGrey
align 4
LABELV colorMdGrey
byte 4 1056964608
byte 4 1056964608
byte 4 1056964608
byte 4 1065353216
export colorDkGrey
align 4
LABELV colorDkGrey
byte 4 1048576000
byte 4 1048576000
byte 4 1048576000
byte 4 1065353216
export colorLtBlue
align 4
LABELV colorLtBlue
byte 4 1052501869
byte 4 1048945099
byte 4 1060689150
byte 4 1065353216
export colorDkBlue
align 4
LABELV colorDkBlue
byte 4 1045153448
byte 4 0
byte 4 1053542056
byte 4 1065353216
export g_color_table
align 4
LABELV g_color_table
byte 4 0
byte 4 0
byte 4 0
byte 4 1065353216
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 1065353216
byte 4 1065353216
byte 4 0
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 0
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
byte 4 1065353216
export bytedirs
align 4
LABELV bytedirs
byte 4 3204879951
byte 4 0
byte 4 1062847556
byte 4 3202531056
byte 4 1047828139
byte 4 1063074669
byte 4 3197577718
byte 4 0
byte 4 1064605338
byte 4 3198039930
byte 4 1056964608
byte 4 1062149053
byte 4 3190184938
byte 4 1049007711
byte 4 1064532072
byte 4 0
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 1062847556
byte 4 1057396303
byte 4 3189189110
byte 4 1060597999
byte 4 1060013330
byte 4 1041705462
byte 4 1060597999
byte 4 1060013330
byte 4 0
byte 4 1057396303
byte 4 1062847556
byte 4 1050556282
byte 4 1056964608
byte 4 1062149053
byte 4 1057396303
byte 4 0
byte 4 1062847556
byte 4 1050094070
byte 4 0
byte 4 1064605338
byte 4 1055047408
byte 4 1047828139
byte 4 1063074669
byte 4 1042701290
byte 4 1049007711
byte 4 1064532072
byte 4 3207496978
byte 4 1041705462
byte 4 1060597999
byte 4 3209632701
byte 4 1050556282
byte 4 1056964608
byte 4 3205921044
byte 4 1054458931
byte 4 1060121929
byte 4 3210331204
byte 4 1057396303
byte 4 0
byte 4 3210558317
byte 4 1055047408
byte 4 1047828139
byte 4 3208081647
byte 4 1060013330
byte 4 1041705462
byte 4 3207605577
byte 4 1058437396
byte 4 1054458931
byte 4 3204448256
byte 4 1062149053
byte 4 1050556282
byte 4 3195311787
byte 4 1063074669
byte 4 1055047408
byte 4 3201942579
byte 4 1060121929
byte 4 1058437396
byte 4 3208081647
byte 4 1060013330
byte 4 3189189110
byte 4 3204448256
byte 4 1062149053
byte 4 3198039930
byte 4 3204879951
byte 4 1062847556
byte 4 0
byte 4 0
byte 4 1062847556
byte 4 3204879951
byte 4 3195311787
byte 4 1063074669
byte 4 3202531056
byte 4 0
byte 4 1064605338
byte 4 3197577718
byte 4 3196491359
byte 4 1064532072
byte 4 3190184938
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 1064605338
byte 4 1050094070
byte 4 3196491359
byte 4 1064532072
byte 4 1042701290
byte 4 1047828139
byte 4 1063074669
byte 4 1055047408
byte 4 1049007711
byte 4 1064532072
byte 4 1042701290
byte 4 1056964608
byte 4 1062149053
byte 4 1050556282
byte 4 1047828139
byte 4 1063074669
byte 4 3202531056
byte 4 1049007711
byte 4 1064532072
byte 4 3190184938
byte 4 1056964608
byte 4 1062149053
byte 4 3198039930
byte 4 1062847556
byte 4 1057396303
byte 4 0
byte 4 1060597999
byte 4 1060013330
byte 4 1041705462
byte 4 1060597999
byte 4 1060013330
byte 4 3189189110
byte 4 1057396303
byte 4 1062847556
byte 4 0
byte 4 1054458931
byte 4 1060121929
byte 4 1058437396
byte 4 1063074669
byte 4 1055047408
byte 4 1047828139
byte 4 1060121929
byte 4 1058437396
byte 4 1054458931
byte 4 1062149053
byte 4 1050556282
byte 4 1056964608
byte 4 1060013330
byte 4 1041705462
byte 4 1060597999
byte 4 1058437396
byte 4 1054458931
byte 4 1060121929
byte 4 1064605338
byte 4 1050094070
byte 4 0
byte 4 1065353216
byte 4 0
byte 4 0
byte 4 1064532072
byte 4 1042701290
byte 4 1049007711
byte 4 1062847556
byte 4 3204879951
byte 4 0
byte 4 1064605338
byte 4 3197577718
byte 4 0
byte 4 1063074669
byte 4 3202531056
byte 4 1047828139
byte 4 1064532072
byte 4 3190184938
byte 4 1049007711
byte 4 1062149053
byte 4 3198039930
byte 4 1056964608
byte 4 1060013330
byte 4 3189189110
byte 4 1060597999
byte 4 1062847556
byte 4 0
byte 4 1057396303
byte 4 1063074669
byte 4 1055047408
byte 4 3195311787
byte 4 1062149053
byte 4 1050556282
byte 4 3204448256
byte 4 1064532072
byte 4 1042701290
byte 4 3196491359
byte 4 1057396303
byte 4 0
byte 4 3210331204
byte 4 1060013330
byte 4 1041705462
byte 4 3208081647
byte 4 1060013330
byte 4 3189189110
byte 4 3208081647
byte 4 1062847556
byte 4 0
byte 4 3204879951
byte 4 1062149053
byte 4 3198039930
byte 4 3204448256
byte 4 1063074669
byte 4 3202531056
byte 4 3195311787
byte 4 1064532072
byte 4 3190184938
byte 4 3196491359
byte 4 1041705462
byte 4 1060597999
byte 4 3207496978
byte 4 1050556282
byte 4 1056964608
byte 4 3209632701
byte 4 1054458931
byte 4 1060121929
byte 4 3205921044
byte 4 1055047408
byte 4 1047828139
byte 4 3210558317
byte 4 1058437396
byte 4 1054458931
byte 4 3207605577
byte 4 1060121929
byte 4 1058437396
byte 4 3201942579
byte 4 3189189110
byte 4 1060597999
byte 4 3207496978
byte 4 3198039930
byte 4 1056964608
byte 4 3209632701
byte 4 0
byte 4 1057396303
byte 4 3210331204
byte 4 3204879951
byte 4 0
byte 4 3210331204
byte 4 3202531056
byte 4 1047828139
byte 4 3210558317
byte 4 3197577718
byte 4 0
byte 4 3212088986
byte 4 3190184938
byte 4 1049007711
byte 4 3212015720
byte 4 0
byte 4 0
byte 4 3212836864
byte 4 1050094070
byte 4 0
byte 4 3212088986
byte 4 1042701290
byte 4 1049007711
byte 4 3212015720
byte 4 3202531056
byte 4 3195311787
byte 4 3210558317
byte 4 3198039930
byte 4 3204448256
byte 4 3209632701
byte 4 3190184938
byte 4 3196491359
byte 4 3212015720
byte 4 0
byte 4 3210331204
byte 4 3204879951
byte 4 3189189110
byte 4 3208081647
byte 4 3207496978
byte 4 1041705462
byte 4 3208081647
byte 4 3207496978
byte 4 0
byte 4 3204879951
byte 4 3210331204
byte 4 1050556282
byte 4 3204448256
byte 4 3209632701
byte 4 1055047408
byte 4 3195311787
byte 4 3210558317
byte 4 1042701290
byte 4 3196491359
byte 4 3212015720
byte 4 1047828139
byte 4 3210558317
byte 4 3202531056
byte 4 1056964608
byte 4 3209632701
byte 4 3198039930
byte 4 1054458931
byte 4 3207605577
byte 4 3205921044
byte 4 1060597999
byte 4 3207496978
byte 4 3189189110
byte 4 1060121929
byte 4 3205921044
byte 4 3201942579
byte 4 1058437396
byte 4 3201942579
byte 4 3207605577
byte 4 0
byte 4 3212088986
byte 4 3197577718
byte 4 0
byte 4 3212836864
byte 4 0
byte 4 1049007711
byte 4 3212015720
byte 4 3190184938
byte 4 0
byte 4 3210331204
byte 4 1057396303
byte 4 0
byte 4 3212088986
byte 4 1050094070
byte 4 1047828139
byte 4 3210558317
byte 4 1055047408
byte 4 1049007711
byte 4 3212015720
byte 4 1042701290
byte 4 1056964608
byte 4 3209632701
byte 4 1050556282
byte 4 1060597999
byte 4 3207496978
byte 4 1041705462
byte 4 1057396303
byte 4 3210331204
byte 4 0
byte 4 3195311787
byte 4 3210558317
byte 4 3202531056
byte 4 3204448256
byte 4 3209632701
byte 4 3198039930
byte 4 3196491359
byte 4 3212015720
byte 4 3190184938
byte 4 3210331204
byte 4 3204879951
byte 4 0
byte 4 3208081647
byte 4 3207496978
byte 4 3189189110
byte 4 3208081647
byte 4 3207496978
byte 4 1041705462
byte 4 3204879951
byte 4 3210331204
byte 4 0
byte 4 3204448256
byte 4 3209632701
byte 4 1050556282
byte 4 3195311787
byte 4 3210558317
byte 4 1055047408
byte 4 3196491359
byte 4 3212015720
byte 4 1042701290
byte 4 3210558317
byte 4 3202531056
byte 4 1047828139
byte 4 3209632701
byte 4 3198039930
byte 4 1056964608
byte 4 3207605577
byte 4 3205921044
byte 4 1054458931
byte 4 3207496978
byte 4 3189189110
byte 4 1060597999
byte 4 3202531056
byte 4 3195311787
byte 4 1063074669
byte 4 3205921044
byte 4 3201942579
byte 4 1060121929
byte 4 3198039930
byte 4 3204448256
byte 4 1062149053
byte 4 3189189110
byte 4 3208081647
byte 4 1060013330
byte 4 3201942579
byte 4 3207605577
byte 4 1058437396
byte 4 3190184938
byte 4 3196491359
byte 4 1064532072
byte 4 1055047408
byte 4 3195311787
byte 4 1063074669
byte 4 1042701290
byte 4 3196491359
byte 4 1064532072
byte 4 1050556282
byte 4 3204448256
byte 4 1062149053
byte 4 1041705462
byte 4 3208081647
byte 4 1060013330
byte 4 0
byte 4 3204879951
byte 4 1062847556
byte 4 1054458931
byte 4 3207605577
byte 4 1058437396
byte 4 1058437396
byte 4 3201942579
byte 4 1060121929
byte 4 1060121929
byte 4 3205921044
byte 4 1054458931
byte 4 3212088986
byte 4 1050094070
byte 4 0
byte 4 3212015720
byte 4 1042701290
byte 4 1049007711
byte 4 3212836864
byte 4 0
byte 4 0
byte 4 3210331204
byte 4 0
byte 4 1057396303
byte 4 3212088986
byte 4 3197577718
byte 4 0
byte 4 3212015720
byte 4 3190184938
byte 4 1049007711
byte 4 3210558317
byte 4 1055047408
byte 4 3195311787
byte 4 3212015720
byte 4 1042701290
byte 4 3196491359
byte 4 3209632701
byte 4 1050556282
byte 4 3204448256
byte 4 3210558317
byte 4 3202531056
byte 4 3195311787
byte 4 3212015720
byte 4 3190184938
byte 4 3196491359
byte 4 3209632701
byte 4 3198039930
byte 4 3204448256
byte 4 3207496978
byte 4 1041705462
byte 4 3208081647
byte 4 3207496978
byte 4 3189189110
byte 4 3208081647
byte 4 3210331204
byte 4 0
byte 4 3204879951
byte 4 3207605577
byte 4 1058437396
byte 4 3201942579
byte 4 3205921044
byte 4 1054458931
byte 4 3207605577
byte 4 3201942579
byte 4 1060121929
byte 4 3205921044
byte 4 3201942579
byte 4 3207605577
byte 4 3205921044
byte 4 3205921044
byte 4 3201942579
byte 4 3207605577
byte 4 3207605577
byte 4 3205921044
byte 4 3201942579
export Q_rand
code
proc Q_rand 4 0
file "../q_math.c"
line 126
;1:// Copyright (C) 1999-2000 Id Software, Inc.
;2://
;3:// q_math.c -- stateless support routines that are included in each code module
;4:#include "q_shared.h"
;5:
;6:
;7:vec3_t	vec3_origin = {0,0,0};
;8:vec3_t	axisDefault[3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } };
;9:
;10:
;11:vec4_t		colorBlack	= {0, 0, 0, 1};
;12:vec4_t		colorRed	= {1, 0, 0, 1};
;13:vec4_t		colorGreen	= {0, 1, 0, 1};
;14:vec4_t		colorBlue	= {0, 0, 1, 1};
;15:vec4_t		colorYellow	= {1, 1, 0, 1};
;16:vec4_t		colorMagenta= {1, 0, 1, 1};
;17:vec4_t		colorCyan	= {0, 1, 1, 1};
;18:vec4_t		colorWhite	= {1, 1, 1, 1};
;19:vec4_t		colorLtGrey	= {0.75, 0.75, 0.75, 1};
;20:vec4_t		colorMdGrey	= {0.5, 0.5, 0.5, 1};
;21:vec4_t		colorDkGrey	= {0.25, 0.25, 0.25, 1};
;22:
;23:vec4_t		colorLtBlue	= {0.367f, 0.261f, 0.722f, 1};
;24:vec4_t		colorDkBlue	= {0.199f, 0.0f,   0.398f, 1};
;25:
;26:vec4_t	g_color_table[8] =
;27:	{
;28:	{0.0, 0.0, 0.0, 1.0},
;29:	{1.0, 0.0, 0.0, 1.0},
;30:	{0.0, 1.0, 0.0, 1.0},
;31:	{1.0, 1.0, 0.0, 1.0},
;32:	{0.0, 0.0, 1.0, 1.0},
;33:	{0.0, 1.0, 1.0, 1.0},
;34:	{1.0, 0.0, 1.0, 1.0},
;35:	{1.0, 1.0, 1.0, 1.0},
;36:	};
;37:
;38:
;39:vec3_t	bytedirs[NUMVERTEXNORMALS] =
;40:{
;41:{-0.525731f, 0.000000f, 0.850651f}, {-0.442863f, 0.238856f, 0.864188f}, 
;42:{-0.295242f, 0.000000f, 0.955423f}, {-0.309017f, 0.500000f, 0.809017f}, 
;43:{-0.162460f, 0.262866f, 0.951056f}, {0.000000f, 0.000000f, 1.000000f}, 
;44:{0.000000f, 0.850651f, 0.525731f}, {-0.147621f, 0.716567f, 0.681718f}, 
;45:{0.147621f, 0.716567f, 0.681718f}, {0.000000f, 0.525731f, 0.850651f}, 
;46:{0.309017f, 0.500000f, 0.809017f}, {0.525731f, 0.000000f, 0.850651f}, 
;47:{0.295242f, 0.000000f, 0.955423f}, {0.442863f, 0.238856f, 0.864188f}, 
;48:{0.162460f, 0.262866f, 0.951056f}, {-0.681718f, 0.147621f, 0.716567f}, 
;49:{-0.809017f, 0.309017f, 0.500000f},{-0.587785f, 0.425325f, 0.688191f}, 
;50:{-0.850651f, 0.525731f, 0.000000f},{-0.864188f, 0.442863f, 0.238856f}, 
;51:{-0.716567f, 0.681718f, 0.147621f},{-0.688191f, 0.587785f, 0.425325f}, 
;52:{-0.500000f, 0.809017f, 0.309017f}, {-0.238856f, 0.864188f, 0.442863f}, 
;53:{-0.425325f, 0.688191f, 0.587785f}, {-0.716567f, 0.681718f, -0.147621f}, 
;54:{-0.500000f, 0.809017f, -0.309017f}, {-0.525731f, 0.850651f, 0.000000f}, 
;55:{0.000000f, 0.850651f, -0.525731f}, {-0.238856f, 0.864188f, -0.442863f}, 
;56:{0.000000f, 0.955423f, -0.295242f}, {-0.262866f, 0.951056f, -0.162460f}, 
;57:{0.000000f, 1.000000f, 0.000000f}, {0.000000f, 0.955423f, 0.295242f}, 
;58:{-0.262866f, 0.951056f, 0.162460f}, {0.238856f, 0.864188f, 0.442863f}, 
;59:{0.262866f, 0.951056f, 0.162460f}, {0.500000f, 0.809017f, 0.309017f}, 
;60:{0.238856f, 0.864188f, -0.442863f},{0.262866f, 0.951056f, -0.162460f}, 
;61:{0.500000f, 0.809017f, -0.309017f},{0.850651f, 0.525731f, 0.000000f}, 
;62:{0.716567f, 0.681718f, 0.147621f}, {0.716567f, 0.681718f, -0.147621f}, 
;63:{0.525731f, 0.850651f, 0.000000f}, {0.425325f, 0.688191f, 0.587785f}, 
;64:{0.864188f, 0.442863f, 0.238856f}, {0.688191f, 0.587785f, 0.425325f}, 
;65:{0.809017f, 0.309017f, 0.500000f}, {0.681718f, 0.147621f, 0.716567f}, 
;66:{0.587785f, 0.425325f, 0.688191f}, {0.955423f, 0.295242f, 0.000000f}, 
;67:{1.000000f, 0.000000f, 0.000000f}, {0.951056f, 0.162460f, 0.262866f}, 
;68:{0.850651f, -0.525731f, 0.000000f},{0.955423f, -0.295242f, 0.000000f}, 
;69:{0.864188f, -0.442863f, 0.238856f}, {0.951056f, -0.162460f, 0.262866f}, 
;70:{0.809017f, -0.309017f, 0.500000f}, {0.681718f, -0.147621f, 0.716567f}, 
;71:{0.850651f, 0.000000f, 0.525731f}, {0.864188f, 0.442863f, -0.238856f}, 
;72:{0.809017f, 0.309017f, -0.500000f}, {0.951056f, 0.162460f, -0.262866f}, 
;73:{0.525731f, 0.000000f, -0.850651f}, {0.681718f, 0.147621f, -0.716567f}, 
;74:{0.681718f, -0.147621f, -0.716567f},{0.850651f, 0.000000f, -0.525731f}, 
;75:{0.809017f, -0.309017f, -0.500000f}, {0.864188f, -0.442863f, -0.238856f}, 
;76:{0.951056f, -0.162460f, -0.262866f}, {0.147621f, 0.716567f, -0.681718f}, 
;77:{0.309017f, 0.500000f, -0.809017f}, {0.425325f, 0.688191f, -0.587785f}, 
;78:{0.442863f, 0.238856f, -0.864188f}, {0.587785f, 0.425325f, -0.688191f}, 
;79:{0.688191f, 0.587785f, -0.425325f}, {-0.147621f, 0.716567f, -0.681718f}, 
;80:{-0.309017f, 0.500000f, -0.809017f}, {0.000000f, 0.525731f, -0.850651f}, 
;81:{-0.525731f, 0.000000f, -0.850651f}, {-0.442863f, 0.238856f, -0.864188f}, 
;82:{-0.295242f, 0.000000f, -0.955423f}, {-0.162460f, 0.262866f, -0.951056f}, 
;83:{0.000000f, 0.000000f, -1.000000f}, {0.295242f, 0.000000f, -0.955423f}, 
;84:{0.162460f, 0.262866f, -0.951056f}, {-0.442863f, -0.238856f, -0.864188f}, 
;85:{-0.309017f, -0.500000f, -0.809017f}, {-0.162460f, -0.262866f, -0.951056f}, 
;86:{0.000000f, -0.850651f, -0.525731f}, {-0.147621f, -0.716567f, -0.681718f}, 
;87:{0.147621f, -0.716567f, -0.681718f}, {0.000000f, -0.525731f, -0.850651f}, 
;88:{0.309017f, -0.500000f, -0.809017f}, {0.442863f, -0.238856f, -0.864188f}, 
;89:{0.162460f, -0.262866f, -0.951056f}, {0.238856f, -0.864188f, -0.442863f}, 
;90:{0.500000f, -0.809017f, -0.309017f}, {0.425325f, -0.688191f, -0.587785f}, 
;91:{0.716567f, -0.681718f, -0.147621f}, {0.688191f, -0.587785f, -0.425325f}, 
;92:{0.587785f, -0.425325f, -0.688191f}, {0.000000f, -0.955423f, -0.295242f}, 
;93:{0.000000f, -1.000000f, 0.000000f}, {0.262866f, -0.951056f, -0.162460f}, 
;94:{0.000000f, -0.850651f, 0.525731f}, {0.000000f, -0.955423f, 0.295242f}, 
;95:{0.238856f, -0.864188f, 0.442863f}, {0.262866f, -0.951056f, 0.162460f}, 
;96:{0.500000f, -0.809017f, 0.309017f}, {0.716567f, -0.681718f, 0.147621f}, 
;97:{0.525731f, -0.850651f, 0.000000f}, {-0.238856f, -0.864188f, -0.442863f}, 
;98:{-0.500000f, -0.809017f, -0.309017f}, {-0.262866f, -0.951056f, -0.162460f}, 
;99:{-0.850651f, -0.525731f, 0.000000f}, {-0.716567f, -0.681718f, -0.147621f}, 
;100:{-0.716567f, -0.681718f, 0.147621f}, {-0.525731f, -0.850651f, 0.000000f}, 
;101:{-0.500000f, -0.809017f, 0.309017f}, {-0.238856f, -0.864188f, 0.442863f}, 
;102:{-0.262866f, -0.951056f, 0.162460f}, {-0.864188f, -0.442863f, 0.238856f}, 
;103:{-0.809017f, -0.309017f, 0.500000f}, {-0.688191f, -0.587785f, 0.425325f}, 
;104:{-0.681718f, -0.147621f, 0.716567f}, {-0.442863f, -0.238856f, 0.864188f}, 
;105:{-0.587785f, -0.425325f, 0.688191f}, {-0.309017f, -0.500000f, 0.809017f}, 
;106:{-0.147621f, -0.716567f, 0.681718f}, {-0.425325f, -0.688191f, 0.587785f}, 
;107:{-0.162460f, -0.262866f, 0.951056f}, {0.442863f, -0.238856f, 0.864188f}, 
;108:{0.162460f, -0.262866f, 0.951056f}, {0.309017f, -0.500000f, 0.809017f}, 
;109:{0.147621f, -0.716567f, 0.681718f}, {0.000000f, -0.525731f, 0.850651f}, 
;110:{0.425325f, -0.688191f, 0.587785f}, {0.587785f, -0.425325f, 0.688191f}, 
;111:{0.688191f, -0.587785f, 0.425325f}, {-0.955423f, 0.295242f, 0.000000f}, 
;112:{-0.951056f, 0.162460f, 0.262866f}, {-1.000000f, 0.000000f, 0.000000f}, 
;113:{-0.850651f, 0.000000f, 0.525731f}, {-0.955423f, -0.295242f, 0.000000f}, 
;114:{-0.951056f, -0.162460f, 0.262866f}, {-0.864188f, 0.442863f, -0.238856f}, 
;115:{-0.951056f, 0.162460f, -0.262866f}, {-0.809017f, 0.309017f, -0.500000f}, 
;116:{-0.864188f, -0.442863f, -0.238856f}, {-0.951056f, -0.162460f, -0.262866f}, 
;117:{-0.809017f, -0.309017f, -0.500000f}, {-0.681718f, 0.147621f, -0.716567f}, 
;118:{-0.681718f, -0.147621f, -0.716567f}, {-0.850651f, 0.000000f, -0.525731f}, 
;119:{-0.688191f, 0.587785f, -0.425325f}, {-0.587785f, 0.425325f, -0.688191f}, 
;120:{-0.425325f, 0.688191f, -0.587785f}, {-0.425325f, -0.688191f, -0.587785f}, 
;121:{-0.587785f, -0.425325f, -0.688191f}, {-0.688191f, -0.587785f, -0.425325f}
;122:};
;123:
;124://==============================================================
;125:
;126:int		Q_rand( int *seed ) {
line 127
;127:	*seed = (69069 * *seed + 1);
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 0
INDIRP4
CNSTI4 69069
ADDRLP4 0
INDIRP4
INDIRI4
MULI4
CNSTI4 1
ADDI4
ASGNI4
line 128
;128:	return *seed;
ADDRFP4 0
INDIRP4
INDIRI4
RETI4
LABELV $36
endproc Q_rand 4 0
export Q_random
proc Q_random 4 4
line 131
;129:}
;130:
;131:float	Q_random( int *seed ) {
line 132
;132:	return ( Q_rand( seed ) & 0xffff ) / (float)0x10000;
ADDRFP4 0
INDIRP4
ARGP4
ADDRLP4 0
ADDRGP4 Q_rand
CALLI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 65535
BANDI4
CVIF4 4
CNSTF4 1199570944
DIVF4
RETF4
LABELV $37
endproc Q_random 4 4
export Q_crandom
proc Q_crandom 4 4
line 135
;133:}
;134:
;135:float	Q_crandom( int *seed ) {
line 136
;136:	return 2.0 * ( Q_random( seed ) - 0.5 );
ADDRFP4 0
INDIRP4
ARGP4
ADDRLP4 0
ADDRGP4 Q_random
CALLF4
ASGNF4
CNSTF4 1073741824
ADDRLP4 0
INDIRF4
CNSTF4 1056964608
SUBF4
MULF4
RETF4
LABELV $38
endproc Q_crandom 4 4
export VectorCompare
proc VectorCompare 16 0
line 141
;137:}
;138:
;139:#ifdef __LCC__
;140:
;141:int VectorCompare( const vec3_t v1, const vec3_t v2 ) {
line 142
;142:	if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) {
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 0
INDIRP4
INDIRF4
ADDRLP4 4
INDIRP4
INDIRF4
NEF4 $43
ADDRLP4 8
CNSTI4 4
ASGNI4
ADDRLP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
NEF4 $43
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRLP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
EQF4 $40
LABELV $43
line 143
;143:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $39
JUMPV
LABELV $40
line 145
;144:	}			
;145:	return 1;
CNSTI4 1
RETI4
LABELV $39
endproc VectorCompare 16 0
export VectorLength
proc VectorLength 20 4
line 148
;146:}
;147:
;148:vec_t VectorLength( const vec3_t v ) {
line 149
;149:	return (vec_t)sqrt (v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRLP4 0
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 8
ADDRLP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 12
ADDRLP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
ADDRLP4 4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ADDRLP4 8
INDIRF4
ADDRLP4 8
INDIRF4
MULF4
ADDF4
ADDRLP4 12
INDIRF4
ADDRLP4 12
INDIRF4
MULF4
ADDF4
ARGF4
ADDRLP4 16
ADDRGP4 sqrt
CALLF4
ASGNF4
ADDRLP4 16
INDIRF4
RETF4
LABELV $44
endproc VectorLength 20 4
export VectorLengthSquared
proc VectorLengthSquared 16 0
line 152
;150:}
;151:
;152:vec_t VectorLengthSquared( const vec3_t v ) {
line 153
;153:	return (v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRLP4 0
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 8
ADDRLP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 12
ADDRLP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
ADDRLP4 4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ADDRLP4 8
INDIRF4
ADDRLP4 8
INDIRF4
MULF4
ADDF4
ADDRLP4 12
INDIRF4
ADDRLP4 12
INDIRF4
MULF4
ADDF4
RETF4
LABELV $45
endproc VectorLengthSquared 16 0
export Distance
proc Distance 32 4
line 156
;154:}
;155:
;156:vec_t Distance( const vec3_t p1, const vec3_t p2 ) {
line 159
;157:	vec3_t	v;
;158:
;159:	VectorSubtract (p2, p1, v);
ADDRLP4 12
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 16
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 0
ADDRLP4 12
INDIRP4
INDIRF4
ADDRLP4 16
INDIRP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 20
CNSTI4 4
ASGNI4
ADDRLP4 0+4
ADDRLP4 12
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
ADDRLP4 16
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 24
CNSTI4 8
ASGNI4
ADDRLP4 0+8
ADDRFP4 4
INDIRP4
ADDRLP4 24
INDIRI4
ADDP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 24
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
line 160
;160:	return VectorLength( v );
ADDRLP4 0
ARGP4
ADDRLP4 28
ADDRGP4 VectorLength
CALLF4
ASGNF4
ADDRLP4 28
INDIRF4
RETF4
LABELV $46
endproc Distance 32 4
export DistanceSquared
proc DistanceSquared 32 0
line 163
;161:}
;162:
;163:vec_t DistanceSquared( const vec3_t p1, const vec3_t p2 ) {
line 166
;164:	vec3_t	v;
;165:
;166:	VectorSubtract (p2, p1, v);
ADDRLP4 12
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 16
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 0
ADDRLP4 12
INDIRP4
INDIRF4
ADDRLP4 16
INDIRP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 20
CNSTI4 4
ASGNI4
ADDRLP4 0+4
ADDRLP4 12
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
ADDRLP4 16
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 24
CNSTI4 8
ASGNI4
ADDRLP4 0+8
ADDRFP4 4
INDIRP4
ADDRLP4 24
INDIRI4
ADDP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 24
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
line 167
;167:	return v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
ADDRLP4 28
ADDRLP4 0
INDIRF4
ASGNF4
ADDRLP4 28
INDIRF4
ADDRLP4 28
INDIRF4
MULF4
ADDRLP4 0+4
INDIRF4
ADDRLP4 0+4
INDIRF4
MULF4
ADDF4
ADDRLP4 0+8
INDIRF4
ADDRLP4 0+8
INDIRF4
MULF4
ADDF4
RETF4
LABELV $49
endproc DistanceSquared 32 0
export VectorNormalizeFast
proc VectorNormalizeFast 36 4
line 173
;168:}
;169:
;170:// fast vector normalize routine that does not check to make sure
;171:// that length != 0, nor does it return length, uses rsqrt approximation
;172:void VectorNormalizeFast( vec3_t v )
;173:{
line 176
;174:	float ilength;
;175:
;176:	ilength = Q_rsqrt( DotProduct( v, v ) );
ADDRLP4 4
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 8
ADDRLP4 4
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 12
ADDRLP4 4
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 16
ADDRLP4 4
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
ADDRLP4 8
INDIRF4
ADDRLP4 8
INDIRF4
MULF4
ADDRLP4 12
INDIRF4
ADDRLP4 12
INDIRF4
MULF4
ADDF4
ADDRLP4 16
INDIRF4
ADDRLP4 16
INDIRF4
MULF4
ADDF4
ARGF4
ADDRLP4 20
ADDRGP4 Q_rsqrt
CALLF4
ASGNF4
ADDRLP4 0
ADDRLP4 20
INDIRF4
ASGNF4
line 178
;177:
;178:	v[0] *= ilength;
ADDRLP4 24
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 24
INDIRP4
ADDRLP4 24
INDIRP4
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 179
;179:	v[1] *= ilength;
ADDRLP4 28
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
ASGNP4
ADDRLP4 28
INDIRP4
ADDRLP4 28
INDIRP4
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 180
;180:	v[2] *= ilength;
ADDRLP4 32
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
ASGNP4
ADDRLP4 32
INDIRP4
ADDRLP4 32
INDIRP4
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 181
;181:}
LABELV $56
endproc VectorNormalizeFast 36 4
export VectorInverse
proc VectorInverse 12 0
line 183
;182:
;183:void VectorInverse( vec3_t v ){
line 184
;184:	v[0] = -v[0];
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 0
INDIRP4
ADDRLP4 0
INDIRP4
INDIRF4
NEGF4
ASGNF4
line 185
;185:	v[1] = -v[1];
ADDRLP4 4
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
ASGNP4
ADDRLP4 4
INDIRP4
ADDRLP4 4
INDIRP4
INDIRF4
NEGF4
ASGNF4
line 186
;186:	v[2] = -v[2];
ADDRLP4 8
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
ASGNP4
ADDRLP4 8
INDIRP4
ADDRLP4 8
INDIRP4
INDIRF4
NEGF4
ASGNF4
line 187
;187:}
LABELV $57
endproc VectorInverse 12 0
export CrossProduct
proc CrossProduct 40 0
line 189
;188:
;189:void CrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross ) {
line 190
;190:	cross[0] = v1[1]*v2[2] - v1[2]*v2[1];
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
CNSTI4 4
ASGNI4
ADDRLP4 8
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRLP4 8
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
MULF4
ADDRLP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ADDRLP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
MULF4
SUBF4
ASGNF4
line 191
;191:	cross[1] = v1[2]*v2[0] - v1[0]*v2[2];
ADDRLP4 16
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 20
CNSTI4 8
ASGNI4
ADDRLP4 24
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 16
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
ADDRLP4 24
INDIRP4
INDIRF4
MULF4
ADDRLP4 16
INDIRP4
INDIRF4
ADDRLP4 24
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
MULF4
SUBF4
ASGNF4
line 192
;192:	cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
ADDRLP4 28
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 32
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 36
CNSTI4 4
ASGNI4
ADDRFP4 8
INDIRP4
CNSTI4 8
ADDP4
ADDRLP4 28
INDIRP4
INDIRF4
ADDRLP4 32
INDIRP4
ADDRLP4 36
INDIRI4
ADDP4
INDIRF4
MULF4
ADDRLP4 28
INDIRP4
ADDRLP4 36
INDIRI4
ADDP4
INDIRF4
ADDRLP4 32
INDIRP4
INDIRF4
MULF4
SUBF4
ASGNF4
line 193
;193:}
LABELV $58
endproc CrossProduct 40 0
export ClampChar
proc ClampChar 0 0
line 198
;194:#endif
;195:
;196://=======================================================
;197:
;198:signed char ClampChar( int i ) {
line 199
;199:	if ( i < -128 ) {
ADDRFP4 0
INDIRI4
CNSTI4 -128
GEI4 $60
line 200
;200:		return -128;
CNSTI4 -128
RETI4
ADDRGP4 $59
JUMPV
LABELV $60
line 202
;201:	}
;202:	if ( i > 127 ) {
ADDRFP4 0
INDIRI4
CNSTI4 127
LEI4 $62
line 203
;203:		return 127;
CNSTI4 127
RETI4
ADDRGP4 $59
JUMPV
LABELV $62
line 205
;204:	}
;205:	return i;
ADDRFP4 0
INDIRI4
CVII1 4
CVII4 1
RETI4
LABELV $59
endproc ClampChar 0 0
export ClampShort
proc ClampShort 0 0
line 208
;206:}
;207:
;208:signed short ClampShort( int i ) {
line 209
;209:	if ( i < -32768 ) {
ADDRFP4 0
INDIRI4
CNSTI4 -32768
GEI4 $65
line 210
;210:		return -32768;
CNSTI4 -32768
RETI4
ADDRGP4 $64
JUMPV
LABELV $65
line 212
;211:	}
;212:	if ( i > 0x7fff ) {
ADDRFP4 0
INDIRI4
CNSTI4 32767
LEI4 $67
line 213
;213:		return 0x7fff;
CNSTI4 32767
RETI4
ADDRGP4 $64
JUMPV
LABELV $67
line 215
;214:	}
;215:	return i;
ADDRFP4 0
INDIRI4
CVII2 4
CVII4 2
RETI4
LABELV $64
endproc ClampShort 0 0
export DirToByte
proc DirToByte 24 0
line 220
;216:}
;217:
;218:
;219:// this isn't a real cheap function to call!
;220:int DirToByte( vec3_t dir ) {
line 224
;221:	int		i, best;
;222:	float	d, bestd;
;223:
;224:	if ( !dir ) {
ADDRFP4 0
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $70
line 225
;225:		return 0;
CNSTI4 0
RETI4
ADDRGP4 $69
JUMPV
LABELV $70
line 228
;226:	}
;227:
;228:	bestd = 0;
ADDRLP4 8
CNSTF4 0
ASGNF4
line 229
;229:	best = 0;
ADDRLP4 12
CNSTI4 0
ASGNI4
line 230
;230:	for (i=0 ; i<NUMVERTEXNORMALS ; i++)
ADDRLP4 0
CNSTI4 0
ASGNI4
LABELV $72
line 231
;231:	{
line 232
;232:		d = DotProduct (dir, bytedirs[i]);
ADDRLP4 16
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 20
CNSTI4 12
ADDRLP4 0
INDIRI4
MULI4
ASGNI4
ADDRLP4 4
ADDRLP4 16
INDIRP4
INDIRF4
ADDRLP4 20
INDIRI4
ADDRGP4 bytedirs
ADDP4
INDIRF4
MULF4
ADDRLP4 16
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 20
INDIRI4
ADDRGP4 bytedirs+4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 16
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ADDRLP4 20
INDIRI4
ADDRGP4 bytedirs+8
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 233
;233:		if (d > bestd)
ADDRLP4 4
INDIRF4
ADDRLP4 8
INDIRF4
LEF4 $78
line 234
;234:		{
line 235
;235:			bestd = d;
ADDRLP4 8
ADDRLP4 4
INDIRF4
ASGNF4
line 236
;236:			best = i;
ADDRLP4 12
ADDRLP4 0
INDIRI4
ASGNI4
line 237
;237:		}
LABELV $78
line 238
;238:	}
LABELV $73
line 230
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 162
LTI4 $72
line 240
;239:
;240:	return best;
ADDRLP4 12
INDIRI4
RETI4
LABELV $69
endproc DirToByte 24 0
export ByteToDir
proc ByteToDir 4 0
line 243
;241:}
;242:
;243:void ByteToDir( int b, vec3_t dir ) {
line 244
;244:	if ( b < 0 || b >= NUMVERTEXNORMALS ) {
ADDRLP4 0
ADDRFP4 0
INDIRI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 0
LTI4 $83
ADDRLP4 0
INDIRI4
CNSTI4 162
LTI4 $81
LABELV $83
line 245
;245:		VectorCopy( vec3_origin, dir );
ADDRFP4 4
INDIRP4
ADDRGP4 vec3_origin
INDIRB
ASGNB 12
line 246
;246:		return;
ADDRGP4 $80
JUMPV
LABELV $81
line 248
;247:	}
;248:	VectorCopy (bytedirs[b], dir);
ADDRFP4 4
INDIRP4
CNSTI4 12
ADDRFP4 0
INDIRI4
MULI4
ADDRGP4 bytedirs
ADDP4
INDIRB
ASGNB 12
line 249
;249:}
LABELV $80
endproc ByteToDir 4 0
export ColorBytes3
proc ColorBytes3 40 0
line 252
;250:
;251:
;252:unsigned ColorBytes3 (float r, float g, float b) {
line 255
;253:	unsigned	i;
;254:
;255:	( (byte *)&i )[0] = r * 255;
ADDRLP4 8
CNSTF4 1132396544
ADDRFP4 0
INDIRF4
MULF4
ASGNF4
ADDRLP4 12
CNSTF4 1325400064
ASGNF4
ADDRLP4 8
INDIRF4
ADDRLP4 12
INDIRF4
LTF4 $86
ADDRLP4 4
ADDRLP4 8
INDIRF4
ADDRLP4 12
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $87
JUMPV
LABELV $86
ADDRLP4 4
ADDRLP4 8
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $87
ADDRLP4 0
ADDRLP4 4
INDIRU4
CVUU1 4
ASGNU1
line 256
;256:	( (byte *)&i )[1] = g * 255;
ADDRLP4 20
CNSTF4 1132396544
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
ADDRLP4 24
CNSTF4 1325400064
ASGNF4
ADDRLP4 20
INDIRF4
ADDRLP4 24
INDIRF4
LTF4 $90
ADDRLP4 16
ADDRLP4 20
INDIRF4
ADDRLP4 24
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $91
JUMPV
LABELV $90
ADDRLP4 16
ADDRLP4 20
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $91
ADDRLP4 0+1
ADDRLP4 16
INDIRU4
CVUU1 4
ASGNU1
line 257
;257:	( (byte *)&i )[2] = b * 255;
ADDRLP4 32
CNSTF4 1132396544
ADDRFP4 8
INDIRF4
MULF4
ASGNF4
ADDRLP4 36
CNSTF4 1325400064
ASGNF4
ADDRLP4 32
INDIRF4
ADDRLP4 36
INDIRF4
LTF4 $94
ADDRLP4 28
ADDRLP4 32
INDIRF4
ADDRLP4 36
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $95
JUMPV
LABELV $94
ADDRLP4 28
ADDRLP4 32
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $95
ADDRLP4 0+2
ADDRLP4 28
INDIRU4
CVUU1 4
ASGNU1
line 259
;258:
;259:	return i;
ADDRLP4 0
INDIRU4
RETU4
LABELV $84
endproc ColorBytes3 40 0
export ColorBytes4
proc ColorBytes4 52 0
line 262
;260:}
;261:
;262:unsigned ColorBytes4 (float r, float g, float b, float a) {
line 265
;263:	unsigned	i;
;264:
;265:	( (byte *)&i )[0] = r * 255;
ADDRLP4 8
CNSTF4 1132396544
ADDRFP4 0
INDIRF4
MULF4
ASGNF4
ADDRLP4 12
CNSTF4 1325400064
ASGNF4
ADDRLP4 8
INDIRF4
ADDRLP4 12
INDIRF4
LTF4 $98
ADDRLP4 4
ADDRLP4 8
INDIRF4
ADDRLP4 12
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $99
JUMPV
LABELV $98
ADDRLP4 4
ADDRLP4 8
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $99
ADDRLP4 0
ADDRLP4 4
INDIRU4
CVUU1 4
ASGNU1
line 266
;266:	( (byte *)&i )[1] = g * 255;
ADDRLP4 20
CNSTF4 1132396544
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
ADDRLP4 24
CNSTF4 1325400064
ASGNF4
ADDRLP4 20
INDIRF4
ADDRLP4 24
INDIRF4
LTF4 $102
ADDRLP4 16
ADDRLP4 20
INDIRF4
ADDRLP4 24
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $103
JUMPV
LABELV $102
ADDRLP4 16
ADDRLP4 20
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $103
ADDRLP4 0+1
ADDRLP4 16
INDIRU4
CVUU1 4
ASGNU1
line 267
;267:	( (byte *)&i )[2] = b * 255;
ADDRLP4 32
CNSTF4 1132396544
ADDRFP4 8
INDIRF4
MULF4
ASGNF4
ADDRLP4 36
CNSTF4 1325400064
ASGNF4
ADDRLP4 32
INDIRF4
ADDRLP4 36
INDIRF4
LTF4 $106
ADDRLP4 28
ADDRLP4 32
INDIRF4
ADDRLP4 36
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $107
JUMPV
LABELV $106
ADDRLP4 28
ADDRLP4 32
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $107
ADDRLP4 0+2
ADDRLP4 28
INDIRU4
CVUU1 4
ASGNU1
line 268
;268:	( (byte *)&i )[3] = a * 255;
ADDRLP4 44
CNSTF4 1132396544
ADDRFP4 12
INDIRF4
MULF4
ASGNF4
ADDRLP4 48
CNSTF4 1325400064
ASGNF4
ADDRLP4 44
INDIRF4
ADDRLP4 48
INDIRF4
LTF4 $110
ADDRLP4 40
ADDRLP4 44
INDIRF4
ADDRLP4 48
INDIRF4
SUBF4
CVFI4 4
CVIU4 4
CNSTU4 2147483648
ADDU4
ASGNU4
ADDRGP4 $111
JUMPV
LABELV $110
ADDRLP4 40
ADDRLP4 44
INDIRF4
CVFI4 4
CVIU4 4
ASGNU4
LABELV $111
ADDRLP4 0+3
ADDRLP4 40
INDIRU4
CVUU1 4
ASGNU1
line 270
;269:
;270:	return i;
ADDRLP4 0
INDIRU4
RETU4
LABELV $96
endproc ColorBytes4 52 0
export NormalizeColor
proc NormalizeColor 12 0
line 273
;271:}
;272:
;273:float NormalizeColor( const vec3_t in, vec3_t out ) {
line 276
;274:	float	max;
;275:	
;276:	max = in[0];
ADDRLP4 0
ADDRFP4 0
INDIRP4
INDIRF4
ASGNF4
line 277
;277:	if ( in[1] > max ) {
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
LEF4 $113
line 278
;278:		max = in[1];
ADDRLP4 0
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
line 279
;279:	}
LABELV $113
line 280
;280:	if ( in[2] > max ) {
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
LEF4 $115
line 281
;281:		max = in[2];
ADDRLP4 0
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
line 282
;282:	}
LABELV $115
line 284
;283:
;284:	if ( !max ) {
ADDRLP4 0
INDIRF4
CNSTF4 0
NEF4 $117
line 285
;285:		VectorClear( out );
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 8
CNSTF4 0
ASGNF4
ADDRLP4 4
INDIRP4
CNSTI4 8
ADDP4
ADDRLP4 8
INDIRF4
ASGNF4
ADDRLP4 4
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 8
INDIRF4
ASGNF4
ADDRLP4 4
INDIRP4
ADDRLP4 8
INDIRF4
ASGNF4
line 286
;286:	} else {
ADDRGP4 $118
JUMPV
LABELV $117
line 287
;287:		out[0] = in[0] / max;
ADDRFP4 4
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRLP4 0
INDIRF4
DIVF4
ASGNF4
line 288
;288:		out[1] = in[1] / max;
ADDRLP4 4
CNSTI4 4
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
DIVF4
ASGNF4
line 289
;289:		out[2] = in[2] / max;
ADDRLP4 8
CNSTI4 8
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
DIVF4
ASGNF4
line 290
;290:	}
LABELV $118
line 291
;291:	return max;
ADDRLP4 0
INDIRF4
RETF4
LABELV $112
endproc NormalizeColor 12 0
export PlaneFromPoints
proc PlaneFromPoints 76 12
line 303
;292:}
;293:
;294:
;295:/*
;296:=====================
;297:PlaneFromPoints
;298:
;299:Returns false if the triangle is degenrate.
;300:The normal will point out of the clock for clockwise ordered points
;301:=====================
;302:*/
;303:qboolean PlaneFromPoints( vec4_t plane, const vec3_t a, const vec3_t b, const vec3_t c ) {
line 306
;304:	vec3_t	d1, d2;
;305:
;306:	VectorSubtract( b, a, d1 );
ADDRLP4 24
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 28
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 0
ADDRLP4 24
INDIRP4
INDIRF4
ADDRLP4 28
INDIRP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 32
CNSTI4 4
ASGNI4
ADDRLP4 0+4
ADDRLP4 24
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
ADDRLP4 28
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 36
CNSTI4 8
ASGNI4
ADDRLP4 0+8
ADDRFP4 8
INDIRP4
ADDRLP4 36
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 36
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
line 307
;307:	VectorSubtract( c, a, d2 );
ADDRLP4 40
ADDRFP4 12
INDIRP4
ASGNP4
ADDRLP4 44
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 12
ADDRLP4 40
INDIRP4
INDIRF4
ADDRLP4 44
INDIRP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 48
CNSTI4 4
ASGNI4
ADDRLP4 12+4
ADDRLP4 40
INDIRP4
ADDRLP4 48
INDIRI4
ADDP4
INDIRF4
ADDRLP4 44
INDIRP4
ADDRLP4 48
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
ADDRLP4 52
CNSTI4 8
ASGNI4
ADDRLP4 12+8
ADDRFP4 12
INDIRP4
ADDRLP4 52
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 52
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
line 308
;308:	CrossProduct( d2, d1, plane );
ADDRLP4 12
ARGP4
ADDRLP4 0
ARGP4
ADDRFP4 0
INDIRP4
ARGP4
ADDRGP4 CrossProduct
CALLV
pop
line 309
;309:	if ( VectorNormalize( plane ) == 0 ) {
ADDRFP4 0
INDIRP4
ARGP4
ADDRLP4 56
ADDRGP4 VectorNormalize
CALLF4
ASGNF4
ADDRLP4 56
INDIRF4
CNSTF4 0
NEF4 $124
line 310
;310:		return qfalse;
CNSTI4 0
RETI4
ADDRGP4 $119
JUMPV
LABELV $124
line 313
;311:	}
;312:
;313:	plane[3] = DotProduct( a, plane );
ADDRLP4 60
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 64
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 68
CNSTI4 4
ASGNI4
ADDRLP4 72
CNSTI4 8
ASGNI4
ADDRLP4 60
INDIRP4
CNSTI4 12
ADDP4
ADDRLP4 64
INDIRP4
INDIRF4
ADDRLP4 60
INDIRP4
INDIRF4
MULF4
ADDRLP4 64
INDIRP4
ADDRLP4 68
INDIRI4
ADDP4
INDIRF4
ADDRLP4 60
INDIRP4
ADDRLP4 68
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 64
INDIRP4
ADDRLP4 72
INDIRI4
ADDP4
INDIRF4
ADDRLP4 60
INDIRP4
ADDRLP4 72
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 314
;314:	return qtrue;
CNSTI4 1
RETI4
LABELV $119
endproc PlaneFromPoints 76 12
export RotatePointAroundVector
proc RotatePointAroundVector 256 12
line 325
;315:}
;316:
;317:/*
;318:===============
;319:RotatePointAroundVector
;320:
;321:This is not implemented very well...
;322:===============
;323:*/
;324:void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point,
;325:							 float degrees ) {
line 335
;326:	float	m[3][3];
;327:	float	im[3][3];
;328:	float	zrot[3][3];
;329:	float	tmpmat[3][3];
;330:	float	rot[3][3];
;331:	int	i;
;332:	vec3_t vr, vup, vf;
;333:	float	rad;
;334:
;335:	vf[0] = dir[0];
ADDRLP4 148
ADDRFP4 4
INDIRP4
INDIRF4
ASGNF4
line 336
;336:	vf[1] = dir[1];
ADDRLP4 148+4
ADDRFP4 4
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
line 337
;337:	vf[2] = dir[2];
ADDRLP4 148+8
ADDRFP4 4
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
line 339
;338:
;339:	PerpendicularVector( vr, dir );
ADDRLP4 160
ARGP4
ADDRFP4 4
INDIRP4
ARGP4
ADDRGP4 PerpendicularVector
CALLV
pop
line 340
;340:	CrossProduct( vr, vf, vup );
ADDRLP4 160
ARGP4
ADDRLP4 148
ARGP4
ADDRLP4 176
ARGP4
ADDRGP4 CrossProduct
CALLV
pop
line 342
;341:
;342:	m[0][0] = vr[0];
ADDRLP4 40
ADDRLP4 160
INDIRF4
ASGNF4
line 343
;343:	m[1][0] = vr[1];
ADDRLP4 40+12
ADDRLP4 160+4
INDIRF4
ASGNF4
line 344
;344:	m[2][0] = vr[2];
ADDRLP4 40+24
ADDRLP4 160+8
INDIRF4
ASGNF4
line 346
;345:
;346:	m[0][1] = vup[0];
ADDRLP4 40+4
ADDRLP4 176
INDIRF4
ASGNF4
line 347
;347:	m[1][1] = vup[1];
ADDRLP4 40+12+4
ADDRLP4 176+4
INDIRF4
ASGNF4
line 348
;348:	m[2][1] = vup[2];
ADDRLP4 40+24+4
ADDRLP4 176+8
INDIRF4
ASGNF4
line 350
;349:
;350:	m[0][2] = vf[0];
ADDRLP4 40+8
ADDRLP4 148
INDIRF4
ASGNF4
line 351
;351:	m[1][2] = vf[1];
ADDRLP4 40+12+8
ADDRLP4 148+4
INDIRF4
ASGNF4
line 352
;352:	m[2][2] = vf[2];
ADDRLP4 40+24+8
ADDRLP4 148+8
INDIRF4
ASGNF4
line 354
;353:
;354:	memcpy( im, m, sizeof( im ) );
ADDRLP4 112
ARGP4
ADDRLP4 40
ARGP4
CNSTI4 36
ARGI4
ADDRGP4 memcpy
CALLP4
pop
line 356
;355:
;356:	im[0][1] = m[1][0];
ADDRLP4 112+4
ADDRLP4 40+12
INDIRF4
ASGNF4
line 357
;357:	im[0][2] = m[2][0];
ADDRLP4 112+8
ADDRLP4 40+24
INDIRF4
ASGNF4
line 358
;358:	im[1][0] = m[0][1];
ADDRLP4 112+12
ADDRLP4 40+4
INDIRF4
ASGNF4
line 359
;359:	im[1][2] = m[2][1];
ADDRLP4 112+12+8
ADDRLP4 40+24+4
INDIRF4
ASGNF4
line 360
;360:	im[2][0] = m[0][2];
ADDRLP4 112+24
ADDRLP4 40+8
INDIRF4
ASGNF4
line 361
;361:	im[2][1] = m[1][2];
ADDRLP4 112+24+4
ADDRLP4 40+12+8
INDIRF4
ASGNF4
line 363
;362:
;363:	memset( zrot, 0, sizeof( zrot ) );
ADDRLP4 76
ARGP4
CNSTI4 0
ARGI4
CNSTI4 36
ARGI4
ADDRGP4 memset
CALLP4
pop
line 364
;364:	zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F;
ADDRLP4 224
CNSTF4 1065353216
ASGNF4
ADDRLP4 76+24+8
ADDRLP4 224
INDIRF4
ASGNF4
ADDRLP4 76+12+4
ADDRLP4 224
INDIRF4
ASGNF4
ADDRLP4 76
ADDRLP4 224
INDIRF4
ASGNF4
line 366
;365:
;366:	rad = DEG2RAD( degrees );
ADDRLP4 172
CNSTF4 1078530011
ADDRFP4 12
INDIRF4
MULF4
CNSTF4 1127481344
DIVF4
ASGNF4
line 367
;367:	zrot[0][0] = cos( rad );
ADDRLP4 172
INDIRF4
ARGF4
ADDRLP4 228
ADDRGP4 cos
CALLF4
ASGNF4
ADDRLP4 76
ADDRLP4 228
INDIRF4
ASGNF4
line 368
;368:	zrot[0][1] = sin( rad );
ADDRLP4 172
INDIRF4
ARGF4
ADDRLP4 232
ADDRGP4 sin
CALLF4
ASGNF4
ADDRLP4 76+4
ADDRLP4 232
INDIRF4
ASGNF4
line 369
;369:	zrot[1][0] = -sin( rad );
ADDRLP4 172
INDIRF4
ARGF4
ADDRLP4 236
ADDRGP4 sin
CALLF4
ASGNF4
ADDRLP4 76+12
ADDRLP4 236
INDIRF4
NEGF4
ASGNF4
line 370
;370:	zrot[1][1] = cos( rad );
ADDRLP4 172
INDIRF4
ARGF4
ADDRLP4 240
ADDRGP4 cos
CALLF4
ASGNF4
ADDRLP4 76+12+4
ADDRLP4 240
INDIRF4
ASGNF4
line 372
;371:
;372:	MatrixMultiply( m, zrot, tmpmat );
ADDRLP4 40
ARGP4
ADDRLP4 76
ARGP4
ADDRLP4 188
ARGP4
ADDRGP4 MatrixMultiply
CALLV
pop
line 373
;373:	MatrixMultiply( tmpmat, im, rot );
ADDRLP4 188
ARGP4
ADDRLP4 112
ARGP4
ADDRLP4 4
ARGP4
ADDRGP4 MatrixMultiply
CALLV
pop
line 375
;374:
;375:	for ( i = 0; i < 3; i++ ) {
ADDRLP4 0
CNSTI4 0
ASGNI4
LABELV $171
line 376
;376:		dst[i] = rot[i][0] * point[0] + rot[i][1] * point[1] + rot[i][2] * point[2];
ADDRLP4 248
CNSTI4 12
ADDRLP4 0
INDIRI4
MULI4
ASGNI4
ADDRLP4 252
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRFP4 0
INDIRP4
ADDP4
ADDRLP4 248
INDIRI4
ADDRLP4 4
ADDP4
INDIRF4
ADDRLP4 252
INDIRP4
INDIRF4
MULF4
ADDRLP4 248
INDIRI4
ADDRLP4 4+4
ADDP4
INDIRF4
ADDRLP4 252
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 248
INDIRI4
ADDRLP4 4+8
ADDP4
INDIRF4
ADDRLP4 252
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 377
;377:	}
LABELV $172
line 375
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 3
LTI4 $171
line 378
;378:}
LABELV $126
endproc RotatePointAroundVector 256 12
export RotateAroundDirection
proc RotateAroundDirection 20 16
line 385
;379:
;380:/*
;381:===============
;382:RotateAroundDirection
;383:===============
;384:*/
;385:void RotateAroundDirection( vec3_t axis[3], float yaw ) {
line 388
;386:
;387:	// create an arbitrary axis[1] 
;388:	PerpendicularVector( axis[1], axis[0] );
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 0
INDIRP4
CNSTI4 12
ADDP4
ARGP4
ADDRLP4 0
INDIRP4
ARGP4
ADDRGP4 PerpendicularVector
CALLV
pop
line 391
;389:
;390:	// rotate it around axis[0] by yaw
;391:	if ( yaw ) {
ADDRFP4 4
INDIRF4
CNSTF4 0
EQF4 $178
line 394
;392:		vec3_t	temp;
;393:
;394:		VectorCopy( axis[1], temp );
ADDRLP4 4
ADDRFP4 0
INDIRP4
CNSTI4 12
ADDP4
INDIRB
ASGNB 12
line 395
;395:		RotatePointAroundVector( axis[1], axis[0], temp, yaw );
ADDRLP4 16
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 16
INDIRP4
CNSTI4 12
ADDP4
ARGP4
ADDRLP4 16
INDIRP4
ARGP4
ADDRLP4 4
ARGP4
ADDRFP4 4
INDIRF4
ARGF4
ADDRGP4 RotatePointAroundVector
CALLV
pop
line 396
;396:	}
LABELV $178
line 399
;397:
;398:	// cross to get axis[2]
;399:	CrossProduct( axis[0], axis[1], axis[2] );
ADDRLP4 4
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
INDIRP4
ARGP4
ADDRLP4 4
INDIRP4
CNSTI4 12
ADDP4
ARGP4
ADDRLP4 4
INDIRP4
CNSTI4 24
ADDP4
ARGP4
ADDRGP4 CrossProduct
CALLV
pop
line 400
;400:}
LABELV $177
endproc RotateAroundDirection 20 16
export vectoangles
proc vectoangles 40 8
line 404
;401:
;402:
;403:
;404:void vectoangles( const vec3_t value1, vec3_t angles ) {
line 408
;405:	float	forward;
;406:	float	yaw, pitch;
;407:	
;408:	if ( value1[1] == 0 && value1[0] == 0 ) {
ADDRLP4 12
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 16
CNSTF4 0
ASGNF4
ADDRLP4 12
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 16
INDIRF4
NEF4 $181
ADDRLP4 12
INDIRP4
INDIRF4
ADDRLP4 16
INDIRF4
NEF4 $181
line 409
;409:		yaw = 0;
ADDRLP4 0
CNSTF4 0
ASGNF4
line 410
;410:		if ( value1[2] > 0 ) {
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
CNSTF4 0
LEF4 $183
line 411
;411:			pitch = 90;
ADDRLP4 4
CNSTF4 1119092736
ASGNF4
line 412
;412:		}
ADDRGP4 $182
JUMPV
LABELV $183
line 413
;413:		else {
line 414
;414:			pitch = 270;
ADDRLP4 4
CNSTF4 1132920832
ASGNF4
line 415
;415:		}
line 416
;416:	}
ADDRGP4 $182
JUMPV
LABELV $181
line 417
;417:	else {
line 418
;418:		if ( value1[0] ) {
ADDRFP4 0
INDIRP4
INDIRF4
CNSTF4 0
EQF4 $185
line 419
;419:			yaw = ( atan2 ( value1[1], value1[0] ) * 180 / M_PI );
ADDRLP4 20
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 20
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ARGF4
ADDRLP4 20
INDIRP4
INDIRF4
ARGF4
ADDRLP4 24
ADDRGP4 atan2
CALLF4
ASGNF4
ADDRLP4 0
CNSTF4 1127481344
ADDRLP4 24
INDIRF4
MULF4
CNSTF4 1078530011
DIVF4
ASGNF4
line 420
;420:		}
ADDRGP4 $186
JUMPV
LABELV $185
line 421
;421:		else if ( value1[1] > 0 ) {
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
CNSTF4 0
LEF4 $187
line 422
;422:			yaw = 90;
ADDRLP4 0
CNSTF4 1119092736
ASGNF4
line 423
;423:		}
ADDRGP4 $188
JUMPV
LABELV $187
line 424
;424:		else {
line 425
;425:			yaw = 270;
ADDRLP4 0
CNSTF4 1132920832
ASGNF4
line 426
;426:		}
LABELV $188
LABELV $186
line 427
;427:		if ( yaw < 0 ) {
ADDRLP4 0
INDIRF4
CNSTF4 0
GEF4 $189
line 428
;428:			yaw += 360;
ADDRLP4 0
ADDRLP4 0
INDIRF4
CNSTF4 1135869952
ADDF4
ASGNF4
line 429
;429:		}
LABELV $189
line 431
;430:
;431:		forward = sqrt ( value1[0]*value1[0] + value1[1]*value1[1] );
ADDRLP4 20
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 24
ADDRLP4 20
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 28
ADDRLP4 20
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 24
INDIRF4
ADDRLP4 24
INDIRF4
MULF4
ADDRLP4 28
INDIRF4
ADDRLP4 28
INDIRF4
MULF4
ADDF4
ARGF4
ADDRLP4 32
ADDRGP4 sqrt
CALLF4
ASGNF4
ADDRLP4 8
ADDRLP4 32
INDIRF4
ASGNF4
line 432
;432:		pitch = ( atan2(value1[2], forward) * 180 / M_PI );
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ARGF4
ADDRLP4 8
INDIRF4
ARGF4
ADDRLP4 36
ADDRGP4 atan2
CALLF4
ASGNF4
ADDRLP4 4
CNSTF4 1127481344
ADDRLP4 36
INDIRF4
MULF4
CNSTF4 1078530011
DIVF4
ASGNF4
line 433
;433:		if ( pitch < 0 ) {
ADDRLP4 4
INDIRF4
CNSTF4 0
GEF4 $191
line 434
;434:			pitch += 360;
ADDRLP4 4
ADDRLP4 4
INDIRF4
CNSTF4 1135869952
ADDF4
ASGNF4
line 435
;435:		}
LABELV $191
line 436
;436:	}
LABELV $182
line 438
;437:
;438:	angles[PITCH] = -pitch;
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRF4
NEGF4
ASGNF4
line 439
;439:	angles[YAW] = yaw;
ADDRFP4 4
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 0
INDIRF4
ASGNF4
line 440
;440:	angles[ROLL] = 0;
ADDRFP4 4
INDIRP4
CNSTI4 8
ADDP4
CNSTF4 0
ASGNF4
line 441
;441:}
LABELV $180
endproc vectoangles 40 8
export AnglesToAxis
proc AnglesToAxis 16 16
line 449
;442:
;443:
;444:/*
;445:=================
;446:AnglesToAxis
;447:=================
;448:*/
;449:void AnglesToAxis( const vec3_t angles, vec3_t axis[3] ) {
line 453
;450:	vec3_t	right;
;451:
;452:	// angle vectors returns "right" instead of "y axis"
;453:	AngleVectors( angles, axis[0], right, axis[2] );
ADDRFP4 0
INDIRP4
ARGP4
ADDRLP4 12
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 12
INDIRP4
ARGP4
ADDRLP4 0
ARGP4
ADDRLP4 12
INDIRP4
CNSTI4 24
ADDP4
ARGP4
ADDRGP4 AngleVectors
CALLV
pop
line 454
;454:	VectorSubtract( vec3_origin, right, axis[1] );
ADDRFP4 4
INDIRP4
CNSTI4 12
ADDP4
ADDRGP4 vec3_origin
INDIRF4
ADDRLP4 0
INDIRF4
SUBF4
ASGNF4
ADDRFP4 4
INDIRP4
CNSTI4 16
ADDP4
ADDRGP4 vec3_origin+4
INDIRF4
ADDRLP4 0+4
INDIRF4
SUBF4
ASGNF4
ADDRFP4 4
INDIRP4
CNSTI4 20
ADDP4
ADDRGP4 vec3_origin+8
INDIRF4
ADDRLP4 0+8
INDIRF4
SUBF4
ASGNF4
line 455
;455:}
LABELV $193
endproc AnglesToAxis 16 16
export AxisClear
proc AxisClear 0 0
line 457
;456:
;457:void AxisClear( vec3_t axis[3] ) {
line 458
;458:	axis[0][0] = 1;
ADDRFP4 0
INDIRP4
CNSTF4 1065353216
ASGNF4
line 459
;459:	axis[0][1] = 0;
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
CNSTF4 0
ASGNF4
line 460
;460:	axis[0][2] = 0;
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
CNSTF4 0
ASGNF4
line 461
;461:	axis[1][0] = 0;
ADDRFP4 0
INDIRP4
CNSTI4 12
ADDP4
CNSTF4 0
ASGNF4
line 462
;462:	axis[1][1] = 1;
ADDRFP4 0
INDIRP4
CNSTI4 16
ADDP4
CNSTF4 1065353216
ASGNF4
line 463
;463:	axis[1][2] = 0;
ADDRFP4 0
INDIRP4
CNSTI4 20
ADDP4
CNSTF4 0
ASGNF4
line 464
;464:	axis[2][0] = 0;
ADDRFP4 0
INDIRP4
CNSTI4 24
ADDP4
CNSTF4 0
ASGNF4
line 465
;465:	axis[2][1] = 0;
ADDRFP4 0
INDIRP4
CNSTI4 28
ADDP4
CNSTF4 0
ASGNF4
line 466
;466:	axis[2][2] = 1;
ADDRFP4 0
INDIRP4
CNSTI4 32
ADDP4
CNSTF4 1065353216
ASGNF4
line 467
;467:}
LABELV $198
endproc AxisClear 0 0
export AxisCopy
proc AxisCopy 8 0
line 469
;468:
;469:void AxisCopy( vec3_t in[3], vec3_t out[3] ) {
line 470
;470:	VectorCopy( in[0], out[0] );
ADDRFP4 4
INDIRP4
ADDRFP4 0
INDIRP4
INDIRB
ASGNB 12
line 471
;471:	VectorCopy( in[1], out[1] );
ADDRLP4 0
CNSTI4 12
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRB
ASGNB 12
line 472
;472:	VectorCopy( in[2], out[2] );
ADDRLP4 4
CNSTI4 24
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRB
ASGNB 12
line 473
;473:}
LABELV $199
endproc AxisCopy 8 0
export ProjectPointOnPlane
proc ProjectPointOnPlane 60 0
line 476
;474:
;475:void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal )
;476:{
line 481
;477:	float d;
;478:	vec3_t n;
;479:	float inv_denom;
;480:
;481:	inv_denom =  DotProduct( normal, normal );
ADDRLP4 20
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 24
ADDRLP4 20
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 28
ADDRLP4 20
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 32
ADDRLP4 20
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
ADDRLP4 0
ADDRLP4 24
INDIRF4
ADDRLP4 24
INDIRF4
MULF4
ADDRLP4 28
INDIRF4
ADDRLP4 28
INDIRF4
MULF4
ADDF4
ADDRLP4 32
INDIRF4
ADDRLP4 32
INDIRF4
MULF4
ADDF4
ASGNF4
line 485
;482:#ifndef Q3_VM
;483:	assert( Q_fabs(inv_denom) != 0.0f ); // bk010122 - zero vectors get here
;484:#endif
;485:	inv_denom = 1.0f / inv_denom;
ADDRLP4 0
CNSTF4 1065353216
ADDRLP4 0
INDIRF4
DIVF4
ASGNF4
line 487
;486:
;487:	d = DotProduct( normal, p ) * inv_denom;
ADDRLP4 36
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 40
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 44
CNSTI4 4
ASGNI4
ADDRLP4 48
CNSTI4 8
ASGNI4
ADDRLP4 16
ADDRLP4 36
INDIRP4
INDIRF4
ADDRLP4 40
INDIRP4
INDIRF4
MULF4
ADDRLP4 36
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 36
INDIRP4
ADDRLP4 48
INDIRI4
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
ADDRLP4 48
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 489
;488:
;489:	n[0] = normal[0] * inv_denom;
ADDRLP4 4
ADDRFP4 8
INDIRP4
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 490
;490:	n[1] = normal[1] * inv_denom;
ADDRLP4 4+4
ADDRFP4 8
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 491
;491:	n[2] = normal[2] * inv_denom;
ADDRLP4 4+8
ADDRFP4 8
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
line 493
;492:
;493:	dst[0] = p[0] - d * n[0];
ADDRFP4 0
INDIRP4
ADDRFP4 4
INDIRP4
INDIRF4
ADDRLP4 16
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
SUBF4
ASGNF4
line 494
;494:	dst[1] = p[1] - d * n[1];
ADDRLP4 52
CNSTI4 4
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 52
INDIRI4
ADDP4
ADDRFP4 4
INDIRP4
ADDRLP4 52
INDIRI4
ADDP4
INDIRF4
ADDRLP4 16
INDIRF4
ADDRLP4 4+4
INDIRF4
MULF4
SUBF4
ASGNF4
line 495
;495:	dst[2] = p[2] - d * n[2];
ADDRLP4 56
CNSTI4 8
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
ADDRFP4 4
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
INDIRF4
ADDRLP4 16
INDIRF4
ADDRLP4 4+8
INDIRF4
MULF4
SUBF4
ASGNF4
line 496
;496:}
LABELV $200
endproc ProjectPointOnPlane 60 0
export MakeNormalVectors
proc MakeNormalVectors 40 12
line 506
;497:
;498:/*
;499:================
;500:MakeNormalVectors
;501:
;502:Given a normalized forward vector, create two
;503:other perpendicular vectors
;504:================
;505:*/
;506:void MakeNormalVectors( const vec3_t forward, vec3_t right, vec3_t up) {
line 511
;507:	float		d;
;508:
;509:	// this rotate and negate guarantees a vector
;510:	// not colinear with the original
;511:	right[1] = -forward[0];
ADDRFP4 4
INDIRP4
CNSTI4 4
ADDP4
ADDRFP4 0
INDIRP4
INDIRF4
NEGF4
ASGNF4
line 512
;512:	right[2] = forward[1];
ADDRFP4 4
INDIRP4
CNSTI4 8
ADDP4
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
line 513
;513:	right[0] = forward[2];
ADDRFP4 4
INDIRP4
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
line 515
;514:
;515:	d = DotProduct (right, forward);
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 8
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 12
CNSTI4 4
ASGNI4
ADDRLP4 16
CNSTI4 8
ASGNI4
ADDRLP4 0
ADDRLP4 4
INDIRP4
INDIRF4
ADDRLP4 8
INDIRP4
INDIRF4
MULF4
ADDRLP4 4
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ADDRLP4 8
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 4
INDIRP4
ADDRLP4 16
INDIRI4
ADDP4
INDIRF4
ADDRLP4 8
INDIRP4
ADDRLP4 16
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 516
;516:	VectorMA (right, -d, forward, right);
ADDRLP4 20
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 20
INDIRP4
ADDRLP4 20
INDIRP4
INDIRF4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRLP4 0
INDIRF4
NEGF4
MULF4
ADDF4
ASGNF4
ADDRLP4 24
CNSTI4 4
ASGNI4
ADDRLP4 28
ADDRFP4 4
INDIRP4
ADDRLP4 24
INDIRI4
ADDP4
ASGNP4
ADDRLP4 28
INDIRP4
ADDRLP4 28
INDIRP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 24
INDIRI4
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
NEGF4
MULF4
ADDF4
ASGNF4
ADDRLP4 32
CNSTI4 8
ASGNI4
ADDRLP4 36
ADDRFP4 4
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
ASGNP4
ADDRLP4 36
INDIRP4
ADDRLP4 36
INDIRP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
ADDRLP4 0
INDIRF4
NEGF4
MULF4
ADDF4
ASGNF4
line 517
;517:	VectorNormalize (right);
ADDRFP4 4
INDIRP4
ARGP4
ADDRGP4 VectorNormalize
CALLF4
pop
line 518
;518:	CrossProduct (right, forward, up);
ADDRFP4 4
INDIRP4
ARGP4
ADDRFP4 0
INDIRP4
ARGP4
ADDRFP4 8
INDIRP4
ARGP4
ADDRGP4 CrossProduct
CALLV
pop
line 519
;519:}
LABELV $205
endproc MakeNormalVectors 40 12
export VectorRotate
proc VectorRotate 40 0
line 523
;520:
;521:
;522:void VectorRotate( vec3_t in, vec3_t matrix[3], vec3_t out )
;523:{
line 524
;524:	out[0] = DotProduct( in, matrix[0] );
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 8
CNSTI4 4
ASGNI4
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRP4
INDIRF4
ADDRLP4 4
INDIRP4
INDIRF4
MULF4
ADDRLP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 525
;525:	out[1] = DotProduct( in, matrix[1] );
ADDRLP4 16
CNSTI4 4
ASGNI4
ADDRLP4 20
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 24
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 16
INDIRI4
ADDP4
ADDRLP4 20
INDIRP4
INDIRF4
ADDRLP4 24
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
MULF4
ADDRLP4 20
INDIRP4
ADDRLP4 16
INDIRI4
ADDP4
INDIRF4
ADDRLP4 24
INDIRP4
CNSTI4 16
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 20
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ADDRLP4 24
INDIRP4
CNSTI4 20
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 526
;526:	out[2] = DotProduct( in, matrix[2] );
ADDRLP4 28
CNSTI4 8
ASGNI4
ADDRLP4 32
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 36
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 28
INDIRI4
ADDP4
ADDRLP4 32
INDIRP4
INDIRF4
ADDRLP4 36
INDIRP4
CNSTI4 24
ADDP4
INDIRF4
MULF4
ADDRLP4 32
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 36
INDIRP4
CNSTI4 28
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 32
INDIRP4
ADDRLP4 28
INDIRI4
ADDP4
INDIRF4
ADDRLP4 36
INDIRP4
CNSTI4 32
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 527
;527:}
LABELV $206
endproc VectorRotate 40 0
export Q_rsqrt
proc Q_rsqrt 20 0
line 536
;528:
;529://============================================================================
;530:
;531:#if !idppc
;532:/*
;533:** float q_rsqrt( float number )
;534:*/
;535:float Q_rsqrt( float number )
;536:{
line 539
;537:	long i;
;538:	float x2, y;
;539:	const float threehalfs = 1.5F;
ADDRLP4 12
CNSTF4 1069547520
ASGNF4
line 541
;540:
;541:	x2 = number * 0.5F;
ADDRLP4 8
CNSTF4 1056964608
ADDRFP4 0
INDIRF4
MULF4
ASGNF4
line 542
;542:	y  = number;
ADDRLP4 0
ADDRFP4 0
INDIRF4
ASGNF4
line 543
;543:	i  = * ( long * ) &y;						// evil floating point bit level hacking
ADDRLP4 4
ADDRLP4 0
INDIRI4
ASGNI4
line 544
;544:	i  = 0x5f3759df - ( i >> 1 );               // what the fuck?
ADDRLP4 4
CNSTI4 1597463007
ADDRLP4 4
INDIRI4
CNSTI4 1
RSHI4
SUBI4
ASGNI4
line 545
;545:	y  = * ( float * ) &i;
ADDRLP4 0
ADDRLP4 4
INDIRF4
ASGNF4
line 546
;546:	y  = y * ( threehalfs - ( x2 * y * y ) );   // 1st iteration
ADDRLP4 16
ADDRLP4 0
INDIRF4
ASGNF4
ADDRLP4 0
ADDRLP4 16
INDIRF4
ADDRLP4 12
INDIRF4
ADDRLP4 8
INDIRF4
ADDRLP4 16
INDIRF4
MULF4
ADDRLP4 16
INDIRF4
MULF4
SUBF4
MULF4
ASGNF4
line 554
;547://	y  = y * ( threehalfs - ( x2 * y * y ) );   // 2nd iteration, this can be removed
;548:
;549:#ifndef Q3_VM
;550:#ifdef __linux__
;551:	assert( !isnan(y) ); // bk010122 - FPE?
;552:#endif
;553:#endif
;554:	return y;
ADDRLP4 0
INDIRF4
RETF4
LABELV $207
endproc Q_rsqrt 20 0
export Q_fabs
proc Q_fabs 4 0
line 557
;555:}
;556:
;557:float Q_fabs( float f ) {
line 558
;558:	int tmp = * ( int * ) &f;
ADDRLP4 0
ADDRFP4 0
INDIRI4
ASGNI4
line 559
;559:	tmp &= 0x7FFFFFFF;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 2147483647
BANDI4
ASGNI4
line 560
;560:	return * ( float * ) &tmp;
ADDRLP4 0
INDIRF4
RETF4
LABELV $208
endproc Q_fabs 4 0
export LerpAngle
proc LerpAngle 8 0
line 572
;561:}
;562:#endif
;563:
;564://============================================================
;565:
;566:/*
;567:===============
;568:LerpAngle
;569:
;570:===============
;571:*/
;572:float LerpAngle (float from, float to, float frac) {
line 575
;573:	float	a;
;574:
;575:	if ( to - from > 180 ) {
ADDRFP4 4
INDIRF4
ADDRFP4 0
INDIRF4
SUBF4
CNSTF4 1127481344
LEF4 $210
line 576
;576:		to -= 360;
ADDRFP4 4
ADDRFP4 4
INDIRF4
CNSTF4 1135869952
SUBF4
ASGNF4
line 577
;577:	}
LABELV $210
line 578
;578:	if ( to - from < -180 ) {
ADDRFP4 4
INDIRF4
ADDRFP4 0
INDIRF4
SUBF4
CNSTF4 3274964992
GEF4 $212
line 579
;579:		to += 360;
ADDRFP4 4
ADDRFP4 4
INDIRF4
CNSTF4 1135869952
ADDF4
ASGNF4
line 580
;580:	}
LABELV $212
line 581
;581:	a = from + frac * (to - from);
ADDRLP4 4
ADDRFP4 0
INDIRF4
ASGNF4
ADDRLP4 0
ADDRLP4 4
INDIRF4
ADDRFP4 8
INDIRF4
ADDRFP4 4
INDIRF4
ADDRLP4 4
INDIRF4
SUBF4
MULF4
ADDF4
ASGNF4
line 583
;582:
;583:	return a;
ADDRLP4 0
INDIRF4
RETF4
LABELV $209
endproc LerpAngle 8 0
export AngleSubtract
proc AngleSubtract 4 0
line 594
;584:}
;585:
;586:
;587:/*
;588:=================
;589:AngleSubtract
;590:
;591:Always returns a value from -180 to 180
;592:=================
;593:*/
;594:float	AngleSubtract( float a1, float a2 ) {
line 597
;595:	float	a;
;596:
;597:	a = a1 - a2;
ADDRLP4 0
ADDRFP4 0
INDIRF4
ADDRFP4 4
INDIRF4
SUBF4
ASGNF4
line 598
;598:	assert(fabs(a) < 3600);
ADDRGP4 $216
JUMPV
LABELV $215
line 599
;599:	while ( a > 180 ) {
line 600
;600:		a -= 360;
ADDRLP4 0
ADDRLP4 0
INDIRF4
CNSTF4 1135869952
SUBF4
ASGNF4
line 601
;601:	}
LABELV $216
line 599
ADDRLP4 0
INDIRF4
CNSTF4 1127481344
GTF4 $215
ADDRGP4 $219
JUMPV
LABELV $218
line 602
;602:	while ( a < -180 ) {
line 603
;603:		a += 360;
ADDRLP4 0
ADDRLP4 0
INDIRF4
CNSTF4 1135869952
ADDF4
ASGNF4
line 604
;604:	}
LABELV $219
line 602
ADDRLP4 0
INDIRF4
CNSTF4 3274964992
LTF4 $218
line 605
;605:	return a;
ADDRLP4 0
INDIRF4
RETF4
LABELV $214
endproc AngleSubtract 4 0
export AnglesSubtract
proc AnglesSubtract 20 8
line 609
;606:}
;607:
;608:
;609:void AnglesSubtract( vec3_t v1, vec3_t v2, vec3_t v3 ) {
line 610
;610:	v3[0] = AngleSubtract( v1[0], v2[0] );
ADDRFP4 0
INDIRP4
INDIRF4
ARGF4
ADDRFP4 4
INDIRP4
INDIRF4
ARGF4
ADDRLP4 0
ADDRGP4 AngleSubtract
CALLF4
ASGNF4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRF4
ASGNF4
line 611
;611:	v3[1] = AngleSubtract( v1[1], v2[1] );
ADDRLP4 4
CNSTI4 4
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ARGF4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ARGF4
ADDRLP4 8
ADDRGP4 AngleSubtract
CALLF4
ASGNF4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRLP4 8
INDIRF4
ASGNF4
line 612
;612:	v3[2] = AngleSubtract( v1[2], v2[2] );
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ARGF4
ADDRFP4 4
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ARGF4
ADDRLP4 16
ADDRGP4 AngleSubtract
CALLF4
ASGNF4
ADDRFP4 8
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
ADDRLP4 16
INDIRF4
ASGNF4
line 613
;613:}
LABELV $221
endproc AnglesSubtract 20 8
export AngleMod
proc AngleMod 0 0
line 616
;614:
;615:
;616:float	AngleMod(float a) {
line 617
;617:	a = (360.0/65536) * ((int)(a*(65536/360.0)) & 65535);
ADDRFP4 0
CNSTF4 1001652224
CNSTF4 1127615329
ADDRFP4 0
INDIRF4
MULF4
CVFI4 4
CNSTI4 65535
BANDI4
CVIF4 4
MULF4
ASGNF4
line 618
;618:	return a;
ADDRFP4 0
INDIRF4
RETF4
LABELV $222
endproc AngleMod 0 0
export AngleNormalize360
proc AngleNormalize360 0 0
line 629
;619:}
;620:
;621:
;622:/*
;623:=================
;624:AngleNormalize360
;625:
;626:returns angle normalized to the range [0 <= angle < 360]
;627:=================
;628:*/
;629:float AngleNormalize360 ( float angle ) {
line 630
;630:	return (360.0 / 65536) * ((int)(angle * (65536 / 360.0)) & 65535);
CNSTF4 1001652224
CNSTF4 1127615329
ADDRFP4 0
INDIRF4
MULF4
CVFI4 4
CNSTI4 65535
BANDI4
CVIF4 4
MULF4
RETF4
LABELV $223
endproc AngleNormalize360 0 0
export AngleNormalize180
proc AngleNormalize180 4 4
line 641
;631:}
;632:
;633:
;634:/*
;635:=================
;636:AngleNormalize180
;637:
;638:returns angle normalized to the range [-180 < angle <= 180]
;639:=================
;640:*/
;641:float AngleNormalize180 ( float angle ) {
line 642
;642:	angle = AngleNormalize360( angle );
ADDRFP4 0
INDIRF4
ARGF4
ADDRLP4 0
ADDRGP4 AngleNormalize360
CALLF4
ASGNF4
ADDRFP4 0
ADDRLP4 0
INDIRF4
ASGNF4
line 643
;643:	if ( angle > 180.0 ) {
ADDRFP4 0
INDIRF4
CNSTF4 1127481344
LEF4 $225
line 644
;644:		angle -= 360.0;
ADDRFP4 0
ADDRFP4 0
INDIRF4
CNSTF4 1135869952
SUBF4
ASGNF4
line 645
;645:	}
LABELV $225
line 646
;646:	return angle;
ADDRFP4 0
INDIRF4
RETF4
LABELV $224
endproc AngleNormalize180 4 4
export AngleDelta
proc AngleDelta 4 4
line 657
;647:}
;648:
;649:
;650:/*
;651:=================
;652:AngleDelta
;653:
;654:returns the normalized delta from angle1 to angle2
;655:=================
;656:*/
;657:float AngleDelta ( float angle1, float angle2 ) {
line 658
;658:	return AngleNormalize180( angle1 - angle2 );
ADDRFP4 0
INDIRF4
ADDRFP4 4
INDIRF4
SUBF4
ARGF4
ADDRLP4 0
ADDRGP4 AngleNormalize180
CALLF4
ASGNF4
ADDRLP4 0
INDIRF4
RETF4
LABELV $227
endproc AngleDelta 4 4
export SetPlaneSignbits
proc SetPlaneSignbits 8 0
line 670
;659:}
;660:
;661:
;662://============================================================
;663:
;664:
;665:/*
;666:=================
;667:SetPlaneSignbits
;668:=================
;669:*/
;670:void SetPlaneSignbits (cplane_t *out) {
line 674
;671:	int	bits, j;
;672:
;673:	// for fast box on planeside test
;674:	bits = 0;
ADDRLP4 4
CNSTI4 0
ASGNI4
line 675
;675:	for (j=0 ; j<3 ; j++) {
ADDRLP4 0
CNSTI4 0
ASGNI4
LABELV $229
line 676
;676:		if (out->normal[j] < 0) {
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRF4
CNSTF4 0
GEF4 $233
line 677
;677:			bits |= 1<<j;
ADDRLP4 4
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDRLP4 0
INDIRI4
LSHI4
BORI4
ASGNI4
line 678
;678:		}
LABELV $233
line 679
;679:	}
LABELV $230
line 675
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 3
LTI4 $229
line 680
;680:	out->signbits = bits;
ADDRFP4 0
INDIRP4
CNSTI4 17
ADDP4
ADDRLP4 4
INDIRI4
CVIU4 4
CVUU1 4
ASGNU1
line 681
;681:}
LABELV $228
endproc SetPlaneSignbits 8 0
export BoxOnPlaneSide
proc BoxOnPlaneSide 280 0
line 729
;682:
;683:
;684:/*
;685:==================
;686:BoxOnPlaneSide
;687:
;688:Returns 1, 2, or 1 + 2
;689:
;690:// this is the slow, general version
;691:int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
;692:{
;693:	int		i;
;694:	float	dist1, dist2;
;695:	int		sides;
;696:	vec3_t	corners[2];
;697:
;698:	for (i=0 ; i<3 ; i++)
;699:	{
;700:		if (p->normal[i] < 0)
;701:		{
;702:			corners[0][i] = emins[i];
;703:			corners[1][i] = emaxs[i];
;704:		}
;705:		else
;706:		{
;707:			corners[1][i] = emins[i];
;708:			corners[0][i] = emaxs[i];
;709:		}
;710:	}
;711:	dist1 = DotProduct (p->normal, corners[0]) - p->dist;
;712:	dist2 = DotProduct (p->normal, corners[1]) - p->dist;
;713:	sides = 0;
;714:	if (dist1 >= 0)
;715:		sides = 1;
;716:	if (dist2 < 0)
;717:		sides |= 2;
;718:
;719:	return sides;
;720:}
;721:
;722:==================
;723:*/
;724:#if !( (defined __linux__ || __FreeBSD__) && (defined __i386__) && (!defined C_ONLY)) // rb010123
;725:
;726:#if defined __LCC__ || defined C_ONLY || !id386
;727:
;728:int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
;729:{
line 734
;730:	float	dist1, dist2;
;731:	int		sides;
;732:
;733:// fast axial cases
;734:	if (p->type < 3)
ADDRFP4 8
INDIRP4
CNSTI4 16
ADDP4
INDIRU1
CVUI4 1
CNSTI4 3
GEI4 $236
line 735
;735:	{
line 736
;736:		if (p->dist <= emins[p->type])
ADDRLP4 12
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 12
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
ADDRLP4 12
INDIRP4
CNSTI4 16
ADDP4
INDIRU1
CVUI4 1
CNSTI4 2
LSHI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRF4
GTF4 $238
line 737
;737:			return 1;
CNSTI4 1
RETI4
ADDRGP4 $235
JUMPV
LABELV $238
line 738
;738:		if (p->dist >= emaxs[p->type])
ADDRLP4 16
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 16
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
ADDRLP4 16
INDIRP4
CNSTI4 16
ADDP4
INDIRU1
CVUI4 1
CNSTI4 2
LSHI4
ADDRFP4 4
INDIRP4
ADDP4
INDIRF4
LTF4 $240
line 739
;739:			return 2;
CNSTI4 2
RETI4
ADDRGP4 $235
JUMPV
LABELV $240
line 740
;740:		return 3;
CNSTI4 3
RETI4
ADDRGP4 $235
JUMPV
LABELV $236
line 744
;741:	}
;742:
;743:// general case
;744:	switch (p->signbits)
ADDRLP4 12
ADDRFP4 8
INDIRP4
CNSTI4 17
ADDP4
INDIRU1
CVUI4 1
ASGNI4
ADDRLP4 12
INDIRI4
CNSTI4 0
LTI4 $242
ADDRLP4 12
INDIRI4
CNSTI4 7
GTI4 $242
ADDRLP4 12
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 $253
ADDP4
INDIRP4
JUMPV
lit
align 4
LABELV $253
address $245
address $246
address $247
address $248
address $249
address $250
address $251
address $252
code
line 745
;745:	{
LABELV $245
line 747
;746:	case 0:
;747:		dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
ADDRLP4 20
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 24
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 28
CNSTI4 4
ASGNI4
ADDRLP4 32
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 20
INDIRP4
INDIRF4
ADDRLP4 24
INDIRP4
INDIRF4
MULF4
ADDRLP4 20
INDIRP4
ADDRLP4 28
INDIRI4
ADDP4
INDIRF4
ADDRLP4 24
INDIRP4
ADDRLP4 28
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 20
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
ADDRLP4 24
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 748
;748:		dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
ADDRLP4 36
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 40
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 44
CNSTI4 4
ASGNI4
ADDRLP4 48
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 36
INDIRP4
INDIRF4
ADDRLP4 40
INDIRP4
INDIRF4
MULF4
ADDRLP4 36
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 36
INDIRP4
ADDRLP4 48
INDIRI4
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
ADDRLP4 48
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 749
;749:		break;
ADDRGP4 $243
JUMPV
LABELV $246
line 751
;750:	case 1:
;751:		dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
ADDRLP4 52
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 56
CNSTI4 4
ASGNI4
ADDRLP4 60
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 64
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 52
INDIRP4
INDIRF4
ADDRFP4 0
INDIRP4
INDIRF4
MULF4
ADDRLP4 52
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
INDIRF4
ADDRLP4 60
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 52
INDIRP4
ADDRLP4 64
INDIRI4
ADDP4
INDIRF4
ADDRLP4 60
INDIRP4
ADDRLP4 64
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 752
;752:		dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
ADDRLP4 68
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 72
CNSTI4 4
ASGNI4
ADDRLP4 76
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 80
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 68
INDIRP4
INDIRF4
ADDRFP4 4
INDIRP4
INDIRF4
MULF4
ADDRLP4 68
INDIRP4
ADDRLP4 72
INDIRI4
ADDP4
INDIRF4
ADDRLP4 76
INDIRP4
ADDRLP4 72
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 68
INDIRP4
ADDRLP4 80
INDIRI4
ADDP4
INDIRF4
ADDRLP4 76
INDIRP4
ADDRLP4 80
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 753
;753:		break;
ADDRGP4 $243
JUMPV
LABELV $247
line 755
;754:	case 2:
;755:		dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
ADDRLP4 84
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 88
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 92
CNSTI4 4
ASGNI4
ADDRLP4 96
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 84
INDIRP4
INDIRF4
ADDRLP4 88
INDIRP4
INDIRF4
MULF4
ADDRLP4 84
INDIRP4
ADDRLP4 92
INDIRI4
ADDP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 92
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 84
INDIRP4
ADDRLP4 96
INDIRI4
ADDP4
INDIRF4
ADDRLP4 88
INDIRP4
ADDRLP4 96
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 756
;756:		dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
ADDRLP4 100
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 104
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 108
CNSTI4 4
ASGNI4
ADDRLP4 112
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 100
INDIRP4
INDIRF4
ADDRLP4 104
INDIRP4
INDIRF4
MULF4
ADDRLP4 100
INDIRP4
ADDRLP4 108
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 108
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 100
INDIRP4
ADDRLP4 112
INDIRI4
ADDP4
INDIRF4
ADDRLP4 104
INDIRP4
ADDRLP4 112
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 757
;757:		break;
ADDRGP4 $243
JUMPV
LABELV $248
line 759
;758:	case 3:
;759:		dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
ADDRLP4 116
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 120
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 124
CNSTI4 4
ASGNI4
ADDRLP4 128
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 116
INDIRP4
INDIRF4
ADDRLP4 120
INDIRP4
INDIRF4
MULF4
ADDRLP4 116
INDIRP4
ADDRLP4 124
INDIRI4
ADDP4
INDIRF4
ADDRLP4 120
INDIRP4
ADDRLP4 124
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 116
INDIRP4
ADDRLP4 128
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 128
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 760
;760:		dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
ADDRLP4 132
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 136
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 140
CNSTI4 4
ASGNI4
ADDRLP4 144
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 132
INDIRP4
INDIRF4
ADDRLP4 136
INDIRP4
INDIRF4
MULF4
ADDRLP4 132
INDIRP4
ADDRLP4 140
INDIRI4
ADDP4
INDIRF4
ADDRLP4 136
INDIRP4
ADDRLP4 140
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 132
INDIRP4
ADDRLP4 144
INDIRI4
ADDP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 144
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 761
;761:		break;
ADDRGP4 $243
JUMPV
LABELV $249
line 763
;762:	case 4:
;763:		dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
ADDRLP4 148
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 152
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 156
CNSTI4 4
ASGNI4
ADDRLP4 160
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 148
INDIRP4
INDIRF4
ADDRLP4 152
INDIRP4
INDIRF4
MULF4
ADDRLP4 148
INDIRP4
ADDRLP4 156
INDIRI4
ADDP4
INDIRF4
ADDRLP4 152
INDIRP4
ADDRLP4 156
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 148
INDIRP4
ADDRLP4 160
INDIRI4
ADDP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 160
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 764
;764:		dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
ADDRLP4 164
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 168
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 172
CNSTI4 4
ASGNI4
ADDRLP4 176
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 164
INDIRP4
INDIRF4
ADDRLP4 168
INDIRP4
INDIRF4
MULF4
ADDRLP4 164
INDIRP4
ADDRLP4 172
INDIRI4
ADDP4
INDIRF4
ADDRLP4 168
INDIRP4
ADDRLP4 172
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 164
INDIRP4
ADDRLP4 176
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 176
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 765
;765:		break;
ADDRGP4 $243
JUMPV
LABELV $250
line 767
;766:	case 5:
;767:		dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
ADDRLP4 180
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 184
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 188
CNSTI4 4
ASGNI4
ADDRLP4 192
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 180
INDIRP4
INDIRF4
ADDRLP4 184
INDIRP4
INDIRF4
MULF4
ADDRLP4 180
INDIRP4
ADDRLP4 188
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 188
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 180
INDIRP4
ADDRLP4 192
INDIRI4
ADDP4
INDIRF4
ADDRLP4 184
INDIRP4
ADDRLP4 192
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 768
;768:		dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
ADDRLP4 196
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 200
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 204
CNSTI4 4
ASGNI4
ADDRLP4 208
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 196
INDIRP4
INDIRF4
ADDRLP4 200
INDIRP4
INDIRF4
MULF4
ADDRLP4 196
INDIRP4
ADDRLP4 204
INDIRI4
ADDP4
INDIRF4
ADDRFP4 0
INDIRP4
ADDRLP4 204
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 196
INDIRP4
ADDRLP4 208
INDIRI4
ADDP4
INDIRF4
ADDRLP4 200
INDIRP4
ADDRLP4 208
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 769
;769:		break;
ADDRGP4 $243
JUMPV
LABELV $251
line 771
;770:	case 6:
;771:		dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
ADDRLP4 212
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 216
CNSTI4 4
ASGNI4
ADDRLP4 220
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 224
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 212
INDIRP4
INDIRF4
ADDRFP4 4
INDIRP4
INDIRF4
MULF4
ADDRLP4 212
INDIRP4
ADDRLP4 216
INDIRI4
ADDP4
INDIRF4
ADDRLP4 220
INDIRP4
ADDRLP4 216
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 212
INDIRP4
ADDRLP4 224
INDIRI4
ADDP4
INDIRF4
ADDRLP4 220
INDIRP4
ADDRLP4 224
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 772
;772:		dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
ADDRLP4 228
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 232
CNSTI4 4
ASGNI4
ADDRLP4 236
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 240
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 228
INDIRP4
INDIRF4
ADDRFP4 0
INDIRP4
INDIRF4
MULF4
ADDRLP4 228
INDIRP4
ADDRLP4 232
INDIRI4
ADDP4
INDIRF4
ADDRLP4 236
INDIRP4
ADDRLP4 232
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 228
INDIRP4
ADDRLP4 240
INDIRI4
ADDP4
INDIRF4
ADDRLP4 236
INDIRP4
ADDRLP4 240
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 773
;773:		break;
ADDRGP4 $243
JUMPV
LABELV $252
line 775
;774:	case 7:
;775:		dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
ADDRLP4 244
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 248
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 252
CNSTI4 4
ASGNI4
ADDRLP4 256
CNSTI4 8
ASGNI4
ADDRLP4 4
ADDRLP4 244
INDIRP4
INDIRF4
ADDRLP4 248
INDIRP4
INDIRF4
MULF4
ADDRLP4 244
INDIRP4
ADDRLP4 252
INDIRI4
ADDP4
INDIRF4
ADDRLP4 248
INDIRP4
ADDRLP4 252
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 244
INDIRP4
ADDRLP4 256
INDIRI4
ADDP4
INDIRF4
ADDRLP4 248
INDIRP4
ADDRLP4 256
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 776
;776:		dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
ADDRLP4 260
ADDRFP4 8
INDIRP4
ASGNP4
ADDRLP4 264
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 268
CNSTI4 4
ASGNI4
ADDRLP4 272
CNSTI4 8
ASGNI4
ADDRLP4 8
ADDRLP4 260
INDIRP4
INDIRF4
ADDRLP4 264
INDIRP4
INDIRF4
MULF4
ADDRLP4 260
INDIRP4
ADDRLP4 268
INDIRI4
ADDP4
INDIRF4
ADDRLP4 264
INDIRP4
ADDRLP4 268
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 260
INDIRP4
ADDRLP4 272
INDIRI4
ADDP4
INDIRF4
ADDRLP4 264
INDIRP4
ADDRLP4 272
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 777
;777:		break;
ADDRGP4 $243
JUMPV
LABELV $242
line 779
;778:	default:
;779:		dist1 = dist2 = 0;		// shut up compiler
ADDRLP4 276
CNSTF4 0
ASGNF4
ADDRLP4 8
ADDRLP4 276
INDIRF4
ASGNF4
ADDRLP4 4
ADDRLP4 276
INDIRF4
ASGNF4
line 780
;780:		break;
LABELV $243
line 783
;781:	}
;782:
;783:	sides = 0;
ADDRLP4 0
CNSTI4 0
ASGNI4
line 784
;784:	if (dist1 >= p->dist)
ADDRLP4 4
INDIRF4
ADDRFP4 8
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
LTF4 $254
line 785
;785:		sides = 1;
ADDRLP4 0
CNSTI4 1
ASGNI4
LABELV $254
line 786
;786:	if (dist2 < p->dist)
ADDRLP4 8
INDIRF4
ADDRFP4 8
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
GEF4 $256
line 787
;787:		sides |= 2;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 2
BORI4
ASGNI4
LABELV $256
line 789
;788:
;789:	return sides;
ADDRLP4 0
INDIRI4
RETI4
LABELV $235
endproc BoxOnPlaneSide 280 0
export RadiusFromBounds
proc RadiusFromBounds 36 4
line 1033
;790:}
;791:#else
;792:#pragma warning( disable: 4035 )
;793:
;794:__declspec( naked ) int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
;795:{
;796:	static int bops_initialized;
;797:	static int Ljmptab[8];
;798:
;799:	__asm {
;800:
;801:		push ebx
;802:			
;803:		cmp bops_initialized, 1
;804:		je  initialized
;805:		mov bops_initialized, 1
;806:		
;807:		mov Ljmptab[0*4], offset Lcase0
;808:		mov Ljmptab[1*4], offset Lcase1
;809:		mov Ljmptab[2*4], offset Lcase2
;810:		mov Ljmptab[3*4], offset Lcase3
;811:		mov Ljmptab[4*4], offset Lcase4
;812:		mov Ljmptab[5*4], offset Lcase5
;813:		mov Ljmptab[6*4], offset Lcase6
;814:		mov Ljmptab[7*4], offset Lcase7
;815:			
;816:initialized:
;817:
;818:		mov edx,dword ptr[4+12+esp]
;819:		mov ecx,dword ptr[4+4+esp]
;820:		xor eax,eax
;821:		mov ebx,dword ptr[4+8+esp]
;822:		mov al,byte ptr[17+edx]
;823:		cmp al,8
;824:		jge Lerror
;825:		fld dword ptr[0+edx]
;826:		fld st(0)
;827:		jmp dword ptr[Ljmptab+eax*4]
;828:Lcase0:
;829:		fmul dword ptr[ebx]
;830:		fld dword ptr[0+4+edx]
;831:		fxch st(2)
;832:		fmul dword ptr[ecx]
;833:		fxch st(2)
;834:		fld st(0)
;835:		fmul dword ptr[4+ebx]
;836:		fld dword ptr[0+8+edx]
;837:		fxch st(2)
;838:		fmul dword ptr[4+ecx]
;839:		fxch st(2)
;840:		fld st(0)
;841:		fmul dword ptr[8+ebx]
;842:		fxch st(5)
;843:		faddp st(3),st(0)
;844:		fmul dword ptr[8+ecx]
;845:		fxch st(1)
;846:		faddp st(3),st(0)
;847:		fxch st(3)
;848:		faddp st(2),st(0)
;849:		jmp LSetSides
;850:Lcase1:
;851:		fmul dword ptr[ecx]
;852:		fld dword ptr[0+4+edx]
;853:		fxch st(2)
;854:		fmul dword ptr[ebx]
;855:		fxch st(2)
;856:		fld st(0)
;857:		fmul dword ptr[4+ebx]
;858:		fld dword ptr[0+8+edx]
;859:		fxch st(2)
;860:		fmul dword ptr[4+ecx]
;861:		fxch st(2)
;862:		fld st(0)
;863:		fmul dword ptr[8+ebx]
;864:		fxch st(5)
;865:		faddp st(3),st(0)
;866:		fmul dword ptr[8+ecx]
;867:		fxch st(1)
;868:		faddp st(3),st(0)
;869:		fxch st(3)
;870:		faddp st(2),st(0)
;871:		jmp LSetSides
;872:Lcase2:
;873:		fmul dword ptr[ebx]
;874:		fld dword ptr[0+4+edx]
;875:		fxch st(2)
;876:		fmul dword ptr[ecx]
;877:		fxch st(2)
;878:		fld st(0)
;879:		fmul dword ptr[4+ecx]
;880:		fld dword ptr[0+8+edx]
;881:		fxch st(2)
;882:		fmul dword ptr[4+ebx]
;883:		fxch st(2)
;884:		fld st(0)
;885:		fmul dword ptr[8+ebx]
;886:		fxch st(5)
;887:		faddp st(3),st(0)
;888:		fmul dword ptr[8+ecx]
;889:		fxch st(1)
;890:		faddp st(3),st(0)
;891:		fxch st(3)
;892:		faddp st(2),st(0)
;893:		jmp LSetSides
;894:Lcase3:
;895:		fmul dword ptr[ecx]
;896:		fld dword ptr[0+4+edx]
;897:		fxch st(2)
;898:		fmul dword ptr[ebx]
;899:		fxch st(2)
;900:		fld st(0)
;901:		fmul dword ptr[4+ecx]
;902:		fld dword ptr[0+8+edx]
;903:		fxch st(2)
;904:		fmul dword ptr[4+ebx]
;905:		fxch st(2)
;906:		fld st(0)
;907:		fmul dword ptr[8+ebx]
;908:		fxch st(5)
;909:		faddp st(3),st(0)
;910:		fmul dword ptr[8+ecx]
;911:		fxch st(1)
;912:		faddp st(3),st(0)
;913:		fxch st(3)
;914:		faddp st(2),st(0)
;915:		jmp LSetSides
;916:Lcase4:
;917:		fmul dword ptr[ebx]
;918:		fld dword ptr[0+4+edx]
;919:		fxch st(2)
;920:		fmul dword ptr[ecx]
;921:		fxch st(2)
;922:		fld st(0)
;923:		fmul dword ptr[4+ebx]
;924:		fld dword ptr[0+8+edx]
;925:		fxch st(2)
;926:		fmul dword ptr[4+ecx]
;927:		fxch st(2)
;928:		fld st(0)
;929:		fmul dword ptr[8+ecx]
;930:		fxch st(5)
;931:		faddp st(3),st(0)
;932:		fmul dword ptr[8+ebx]
;933:		fxch st(1)
;934:		faddp st(3),st(0)
;935:		fxch st(3)
;936:		faddp st(2),st(0)
;937:		jmp LSetSides
;938:Lcase5:
;939:		fmul dword ptr[ecx]
;940:		fld dword ptr[0+4+edx]
;941:		fxch st(2)
;942:		fmul dword ptr[ebx]
;943:		fxch st(2)
;944:		fld st(0)
;945:		fmul dword ptr[4+ebx]
;946:		fld dword ptr[0+8+edx]
;947:		fxch st(2)
;948:		fmul dword ptr[4+ecx]
;949:		fxch st(2)
;950:		fld st(0)
;951:		fmul dword ptr[8+ecx]
;952:		fxch st(5)
;953:		faddp st(3),st(0)
;954:		fmul dword ptr[8+ebx]
;955:		fxch st(1)
;956:		faddp st(3),st(0)
;957:		fxch st(3)
;958:		faddp st(2),st(0)
;959:		jmp LSetSides
;960:Lcase6:
;961:		fmul dword ptr[ebx]
;962:		fld dword ptr[0+4+edx]
;963:		fxch st(2)
;964:		fmul dword ptr[ecx]
;965:		fxch st(2)
;966:		fld st(0)
;967:		fmul dword ptr[4+ecx]
;968:		fld dword ptr[0+8+edx]
;969:		fxch st(2)
;970:		fmul dword ptr[4+ebx]
;971:		fxch st(2)
;972:		fld st(0)
;973:		fmul dword ptr[8+ecx]
;974:		fxch st(5)
;975:		faddp st(3),st(0)
;976:		fmul dword ptr[8+ebx]
;977:		fxch st(1)
;978:		faddp st(3),st(0)
;979:		fxch st(3)
;980:		faddp st(2),st(0)
;981:		jmp LSetSides
;982:Lcase7:
;983:		fmul dword ptr[ecx]
;984:		fld dword ptr[0+4+edx]
;985:		fxch st(2)
;986:		fmul dword ptr[ebx]
;987:		fxch st(2)
;988:		fld st(0)
;989:		fmul dword ptr[4+ecx]
;990:		fld dword ptr[0+8+edx]
;991:		fxch st(2)
;992:		fmul dword ptr[4+ebx]
;993:		fxch st(2)
;994:		fld st(0)
;995:		fmul dword ptr[8+ecx]
;996:		fxch st(5)
;997:		faddp st(3),st(0)
;998:		fmul dword ptr[8+ebx]
;999:		fxch st(1)
;1000:		faddp st(3),st(0)
;1001:		fxch st(3)
;1002:		faddp st(2),st(0)
;1003:LSetSides:
;1004:		faddp st(2),st(0)
;1005:		fcomp dword ptr[12+edx]
;1006:		xor ecx,ecx
;1007:		fnstsw ax
;1008:		fcomp dword ptr[12+edx]
;1009:		and ah,1
;1010:		xor ah,1
;1011:		add cl,ah
;1012:		fnstsw ax
;1013:		and ah,1
;1014:		add ah,ah
;1015:		add cl,ah
;1016:		pop ebx
;1017:		mov eax,ecx
;1018:		ret
;1019:Lerror:
;1020:		int 3
;1021:	}
;1022:}
;1023:#pragma warning( default: 4035 )
;1024:
;1025:#endif
;1026:#endif
;1027:
;1028:/*
;1029:=================
;1030:RadiusFromBounds
;1031:=================
;1032:*/
;1033:float RadiusFromBounds( const vec3_t mins, const vec3_t maxs ) {
line 1038
;1034:	int		i;
;1035:	vec3_t	corner;
;1036:	float	a, b;
;1037:
;1038:	for (i=0 ; i<3 ; i++) {
ADDRLP4 0
CNSTI4 0
ASGNI4
LABELV $259
line 1039
;1039:		a = fabs( mins[i] );
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRFP4 0
INDIRP4
ADDP4
INDIRF4
ARGF4
ADDRLP4 24
ADDRGP4 fabs
CALLF4
ASGNF4
ADDRLP4 4
ADDRLP4 24
INDIRF4
ASGNF4
line 1040
;1040:		b = fabs( maxs[i] );
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRFP4 4
INDIRP4
ADDP4
INDIRF4
ARGF4
ADDRLP4 28
ADDRGP4 fabs
CALLF4
ASGNF4
ADDRLP4 8
ADDRLP4 28
INDIRF4
ASGNF4
line 1041
;1041:		corner[i] = a > b ? a : b;
ADDRLP4 4
INDIRF4
ADDRLP4 8
INDIRF4
LEF4 $264
ADDRLP4 32
ADDRLP4 4
INDIRF4
ASGNF4
ADDRGP4 $265
JUMPV
LABELV $264
ADDRLP4 32
ADDRLP4 8
INDIRF4
ASGNF4
LABELV $265
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRLP4 12
ADDP4
ADDRLP4 32
INDIRF4
ASGNF4
line 1042
;1042:	}
LABELV $260
line 1038
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 3
LTI4 $259
line 1044
;1043:
;1044:	return VectorLength (corner);
ADDRLP4 12
ARGP4
ADDRLP4 24
ADDRGP4 VectorLength
CALLF4
ASGNF4
ADDRLP4 24
INDIRF4
RETF4
LABELV $258
endproc RadiusFromBounds 36 4
export ClearBounds
proc ClearBounds 16 0
line 1048
;1045:}
;1046:
;1047:
;1048:void ClearBounds( vec3_t mins, vec3_t maxs ) {
line 1049
;1049:	mins[0] = mins[1] = mins[2] = 99999;
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
CNSTF4 1203982208
ASGNF4
ADDRLP4 0
INDIRP4
CNSTI4 8
ADDP4
ADDRLP4 4
INDIRF4
ASGNF4
ADDRLP4 0
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 4
INDIRF4
ASGNF4
ADDRLP4 0
INDIRP4
ADDRLP4 4
INDIRF4
ASGNF4
line 1050
;1050:	maxs[0] = maxs[1] = maxs[2] = -99999;
ADDRLP4 8
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 12
CNSTF4 3351465856
ASGNF4
ADDRLP4 8
INDIRP4
CNSTI4 8
ADDP4
ADDRLP4 12
INDIRF4
ASGNF4
ADDRLP4 8
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 12
INDIRF4
ASGNF4
ADDRLP4 8
INDIRP4
ADDRLP4 12
INDIRF4
ASGNF4
line 1051
;1051:}
LABELV $266
endproc ClearBounds 16 0
export AddPointToBounds
proc AddPointToBounds 20 0
line 1053
;1052:
;1053:void AddPointToBounds( const vec3_t v, vec3_t mins, vec3_t maxs ) {
line 1054
;1054:	if ( v[0] < mins[0] ) {
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 4
INDIRP4
INDIRF4
GEF4 $268
line 1055
;1055:		mins[0] = v[0];
ADDRFP4 4
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ASGNF4
line 1056
;1056:	}
LABELV $268
line 1057
;1057:	if ( v[0] > maxs[0]) {
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 8
INDIRP4
INDIRF4
LEF4 $270
line 1058
;1058:		maxs[0] = v[0];
ADDRFP4 8
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ASGNF4
line 1059
;1059:	}
LABELV $270
line 1061
;1060:
;1061:	if ( v[1] < mins[1] ) {
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
GEF4 $272
line 1062
;1062:		mins[1] = v[1];
ADDRLP4 4
CNSTI4 4
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ASGNF4
line 1063
;1063:	}
LABELV $272
line 1064
;1064:	if ( v[1] > maxs[1]) {
ADDRLP4 4
CNSTI4 4
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
LEF4 $274
line 1065
;1065:		maxs[1] = v[1];
ADDRLP4 8
CNSTI4 4
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ASGNF4
line 1066
;1066:	}
LABELV $274
line 1068
;1067:
;1068:	if ( v[2] < mins[2] ) {
ADDRLP4 8
CNSTI4 8
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
GEF4 $276
line 1069
;1069:		mins[2] = v[2];
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ASGNF4
line 1070
;1070:	}
LABELV $276
line 1071
;1071:	if ( v[2] > maxs[2]) {
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRFP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ADDRFP4 8
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
LEF4 $278
line 1072
;1072:		maxs[2] = v[2];
ADDRLP4 16
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 16
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 16
INDIRI4
ADDP4
INDIRF4
ASGNF4
line 1073
;1073:	}
LABELV $278
line 1074
;1074:}
LABELV $267
endproc AddPointToBounds 20 0
export VectorNormalize
proc VectorNormalize 40 4
line 1077
;1075:
;1076:
;1077:vec_t VectorNormalize( vec3_t v ) {
line 1080
;1078:	float	length, ilength;
;1079:
;1080:	length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
ADDRLP4 8
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 12
ADDRLP4 8
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 16
ADDRLP4 8
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 20
ADDRLP4 8
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
ADDRLP4 0
ADDRLP4 12
INDIRF4
ADDRLP4 12
INDIRF4
MULF4
ADDRLP4 16
INDIRF4
ADDRLP4 16
INDIRF4
MULF4
ADDF4
ADDRLP4 20
INDIRF4
ADDRLP4 20
INDIRF4
MULF4
ADDF4
ASGNF4
line 1081
;1081:	length = sqrt (length);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 24
ADDRGP4 sqrt
CALLF4
ASGNF4
ADDRLP4 0
ADDRLP4 24
INDIRF4
ASGNF4
line 1083
;1082:
;1083:	if ( length ) {
ADDRLP4 0
INDIRF4
CNSTF4 0
EQF4 $281
line 1084
;1084:		ilength = 1/length;
ADDRLP4 4
CNSTF4 1065353216
ADDRLP4 0
INDIRF4
DIVF4
ASGNF4
line 1085
;1085:		v[0] *= ilength;
ADDRLP4 28
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 28
INDIRP4
ADDRLP4 28
INDIRP4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ASGNF4
line 1086
;1086:		v[1] *= ilength;
ADDRLP4 32
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
ASGNP4
ADDRLP4 32
INDIRP4
ADDRLP4 32
INDIRP4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ASGNF4
line 1087
;1087:		v[2] *= ilength;
ADDRLP4 36
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
ASGNP4
ADDRLP4 36
INDIRP4
ADDRLP4 36
INDIRP4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ASGNF4
line 1088
;1088:	}
LABELV $281
line 1090
;1089:		
;1090:	return length;
ADDRLP4 0
INDIRF4
RETF4
LABELV $280
endproc VectorNormalize 40 4
export VectorNormalize2
proc VectorNormalize2 36 4
line 1093
;1091:}
;1092:
;1093:vec_t VectorNormalize2( const vec3_t v, vec3_t out) {
line 1096
;1094:	float	length, ilength;
;1095:
;1096:	length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
ADDRLP4 8
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 12
ADDRLP4 8
INDIRP4
INDIRF4
ASGNF4
ADDRLP4 16
ADDRLP4 8
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ASGNF4
ADDRLP4 20
ADDRLP4 8
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ASGNF4
ADDRLP4 0
ADDRLP4 12
INDIRF4
ADDRLP4 12
INDIRF4
MULF4
ADDRLP4 16
INDIRF4
ADDRLP4 16
INDIRF4
MULF4
ADDF4
ADDRLP4 20
INDIRF4
ADDRLP4 20
INDIRF4
MULF4
ADDF4
ASGNF4
line 1097
;1097:	length = sqrt (length);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 24
ADDRGP4 sqrt
CALLF4
ASGNF4
ADDRLP4 0
ADDRLP4 24
INDIRF4
ASGNF4
line 1099
;1098:
;1099:	if (length)
ADDRLP4 0
INDIRF4
CNSTF4 0
EQF4 $284
line 1100
;1100:	{
line 1104
;1101:#ifndef Q3_VM // bk0101022 - FPE related
;1102://	  assert( ((Q_fabs(v[0])!=0.0f) || (Q_fabs(v[1])!=0.0f) || (Q_fabs(v[2])!=0.0f)) );
;1103:#endif
;1104:		ilength = 1/length;
ADDRLP4 4
CNSTF4 1065353216
ADDRLP4 0
INDIRF4
DIVF4
ASGNF4
line 1105
;1105:		out[0] = v[0]*ilength;
ADDRFP4 4
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ASGNF4
line 1106
;1106:		out[1] = v[1]*ilength;
ADDRLP4 28
CNSTI4 4
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 28
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 28
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ASGNF4
line 1107
;1107:		out[2] = v[2]*ilength;
ADDRLP4 32
CNSTI4 8
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRF4
MULF4
ASGNF4
line 1108
;1108:	} else {
ADDRGP4 $285
JUMPV
LABELV $284
line 1112
;1109:#ifndef Q3_VM // bk0101022 - FPE related
;1110://	  assert( ((Q_fabs(v[0])==0.0f) && (Q_fabs(v[1])==0.0f) && (Q_fabs(v[2])==0.0f)) );
;1111:#endif
;1112:		VectorClear( out );
ADDRLP4 28
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 32
CNSTF4 0
ASGNF4
ADDRLP4 28
INDIRP4
CNSTI4 8
ADDP4
ADDRLP4 32
INDIRF4
ASGNF4
ADDRLP4 28
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 32
INDIRF4
ASGNF4
ADDRLP4 28
INDIRP4
ADDRLP4 32
INDIRF4
ASGNF4
line 1113
;1113:	}
LABELV $285
line 1115
;1114:		
;1115:	return length;
ADDRLP4 0
INDIRF4
RETF4
LABELV $283
endproc VectorNormalize2 36 4
export _VectorMA
proc _VectorMA 8 0
line 1119
;1116:
;1117:}
;1118:
;1119:void _VectorMA( const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc) {
line 1120
;1120:	vecc[0] = veca[0] + scale*vecb[0];
ADDRFP4 12
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 4
INDIRF4
ADDRFP4 8
INDIRP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1121
;1121:	vecc[1] = veca[1] + scale*vecb[1];
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 12
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1122
;1122:	vecc[2] = veca[2] + scale*vecb[2];
ADDRLP4 4
CNSTI4 8
ASGNI4
ADDRFP4 12
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1123
;1123:}
LABELV $286
endproc _VectorMA 8 0
export _DotProduct
proc _DotProduct 16 0
line 1126
;1124:
;1125:
;1126:vec_t _DotProduct( const vec3_t v1, const vec3_t v2 ) {
line 1127
;1127:	return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
ADDRLP4 8
CNSTI4 4
ASGNI4
ADDRLP4 12
CNSTI4 8
ASGNI4
ADDRLP4 0
INDIRP4
INDIRF4
ADDRLP4 4
INDIRP4
INDIRF4
MULF4
ADDRLP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 0
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
ADDRLP4 12
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
RETF4
LABELV $287
endproc _DotProduct 16 0
export _VectorSubtract
proc _VectorSubtract 8 0
line 1130
;1128:}
;1129:
;1130:void _VectorSubtract( const vec3_t veca, const vec3_t vecb, vec3_t out ) {
line 1131
;1131:	out[0] = veca[0]-vecb[0];
ADDRFP4 8
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 4
INDIRP4
INDIRF4
SUBF4
ASGNF4
line 1132
;1132:	out[1] = veca[1]-vecb[1];
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
line 1133
;1133:	out[2] = veca[2]-vecb[2];
ADDRLP4 4
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
SUBF4
ASGNF4
line 1134
;1134:}
LABELV $288
endproc _VectorSubtract 8 0
export _VectorAdd
proc _VectorAdd 8 0
line 1136
;1135:
;1136:void _VectorAdd( const vec3_t veca, const vec3_t vecb, vec3_t out ) {
line 1137
;1137:	out[0] = veca[0]+vecb[0];
ADDRFP4 8
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 4
INDIRP4
INDIRF4
ADDF4
ASGNF4
line 1138
;1138:	out[1] = veca[1]+vecb[1];
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDF4
ASGNF4
line 1139
;1139:	out[2] = veca[2]+vecb[2];
ADDRLP4 4
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDF4
ASGNF4
line 1140
;1140:}
LABELV $289
endproc _VectorAdd 8 0
export _VectorCopy
proc _VectorCopy 8 0
line 1142
;1141:
;1142:void _VectorCopy( const vec3_t in, vec3_t out ) {
line 1143
;1143:	out[0] = in[0];
ADDRFP4 4
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ASGNF4
line 1144
;1144:	out[1] = in[1];
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ASGNF4
line 1145
;1145:	out[2] = in[2];
ADDRLP4 4
CNSTI4 8
ASGNI4
ADDRFP4 4
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ASGNF4
line 1146
;1146:}
LABELV $290
endproc _VectorCopy 8 0
export _VectorScale
proc _VectorScale 8 0
line 1148
;1147:
;1148:void _VectorScale( const vec3_t in, vec_t scale, vec3_t out ) {
line 1149
;1149:	out[0] = in[0]*scale;
ADDRFP4 8
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1150
;1150:	out[1] = in[1]*scale;
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1151
;1151:	out[2] = in[2]*scale;
ADDRLP4 4
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1152
;1152:}
LABELV $291
endproc _VectorScale 8 0
export Vector4Scale
proc Vector4Scale 12 0
line 1154
;1153:
;1154:void Vector4Scale( const vec4_t in, vec_t scale, vec4_t out ) {
line 1155
;1155:	out[0] = in[0]*scale;
ADDRFP4 8
INDIRP4
ADDRFP4 0
INDIRP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1156
;1156:	out[1] = in[1]*scale;
ADDRLP4 0
CNSTI4 4
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 0
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1157
;1157:	out[2] = in[2]*scale;
ADDRLP4 4
CNSTI4 8
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 4
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1158
;1158:	out[3] = in[3]*scale;
ADDRLP4 8
CNSTI4 12
ASGNI4
ADDRFP4 8
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
ADDRFP4 0
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRFP4 4
INDIRF4
MULF4
ASGNF4
line 1159
;1159:}
LABELV $292
endproc Vector4Scale 12 0
export Q_log2
proc Q_log2 8 0
line 1162
;1160:
;1161:
;1162:int Q_log2( int val ) {
line 1165
;1163:	int answer;
;1164:
;1165:	answer = 0;
ADDRLP4 0
CNSTI4 0
ASGNI4
ADDRGP4 $295
JUMPV
LABELV $294
line 1166
;1166:	while ( ( val>>=1 ) != 0 ) {
line 1167
;1167:		answer++;
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 1168
;1168:	}
LABELV $295
line 1166
ADDRLP4 4
ADDRFP4 0
INDIRI4
CNSTI4 1
RSHI4
ASGNI4
ADDRFP4 0
ADDRLP4 4
INDIRI4
ASGNI4
ADDRLP4 4
INDIRI4
CNSTI4 0
NEI4 $294
line 1169
;1169:	return answer;
ADDRLP4 0
INDIRI4
RETI4
LABELV $293
endproc Q_log2 8 0
export MatrixMultiply
proc MatrixMultiply 104 0
line 1198
;1170:}
;1171:
;1172:
;1173:
;1174:/*
;1175:=================
;1176:PlaneTypeForNormal
;1177:=================
;1178:*/
;1179:/*
;1180:int	PlaneTypeForNormal (vec3_t normal) {
;1181:	if ( normal[0] == 1.0 )
;1182:		return PLANE_X;
;1183:	if ( normal[1] == 1.0 )
;1184:		return PLANE_Y;
;1185:	if ( normal[2] == 1.0 )
;1186:		return PLANE_Z;
;1187:	
;1188:	return PLANE_NON_AXIAL;
;1189:}
;1190:*/
;1191:
;1192:
;1193:/*
;1194:================
;1195:MatrixMultiply
;1196:================
;1197:*/
;1198:void MatrixMultiply(float in1[3][3], float in2[3][3], float out[3][3]) {
line 1199
;1199:	out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] +
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 0
INDIRP4
INDIRF4
ADDRLP4 4
INDIRP4
INDIRF4
MULF4
ADDRLP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ADDRLP4 4
INDIRP4
CNSTI4 24
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1201
;1200:				in1[0][2] * in2[2][0];
;1201:	out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] +
ADDRLP4 8
CNSTI4 4
ASGNI4
ADDRLP4 12
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 16
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
ADDRLP4 12
INDIRP4
INDIRF4
ADDRLP4 16
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
MULF4
ADDRLP4 12
INDIRP4
ADDRLP4 8
INDIRI4
ADDP4
INDIRF4
ADDRLP4 16
INDIRP4
CNSTI4 16
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 12
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
ADDRLP4 16
INDIRP4
CNSTI4 28
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1203
;1202:				in1[0][2] * in2[2][1];
;1203:	out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] +
ADDRLP4 20
CNSTI4 8
ASGNI4
ADDRLP4 24
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 28
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
ADDRLP4 24
INDIRP4
INDIRF4
ADDRLP4 28
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
MULF4
ADDRLP4 24
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
ADDRLP4 28
INDIRP4
CNSTI4 20
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 24
INDIRP4
ADDRLP4 20
INDIRI4
ADDP4
INDIRF4
ADDRLP4 28
INDIRP4
CNSTI4 32
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1205
;1204:				in1[0][2] * in2[2][2];
;1205:	out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] +
ADDRLP4 32
CNSTI4 12
ASGNI4
ADDRLP4 36
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 40
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
ADDRLP4 36
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
INDIRF4
MULF4
ADDRLP4 36
INDIRP4
CNSTI4 16
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
ADDRLP4 32
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 36
INDIRP4
CNSTI4 20
ADDP4
INDIRF4
ADDRLP4 40
INDIRP4
CNSTI4 24
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1207
;1206:				in1[1][2] * in2[2][0];
;1207:	out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] +
ADDRLP4 44
CNSTI4 16
ASGNI4
ADDRLP4 48
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 52
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
ADDRLP4 48
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
ADDRLP4 52
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
MULF4
ADDRLP4 48
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
INDIRF4
ADDRLP4 52
INDIRP4
ADDRLP4 44
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 48
INDIRP4
CNSTI4 20
ADDP4
INDIRF4
ADDRLP4 52
INDIRP4
CNSTI4 28
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1209
;1208:				in1[1][2] * in2[2][1];
;1209:	out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] +
ADDRLP4 56
CNSTI4 20
ASGNI4
ADDRLP4 60
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 64
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
ADDRLP4 60
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
ADDRLP4 64
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
MULF4
ADDRLP4 60
INDIRP4
CNSTI4 16
ADDP4
INDIRF4
ADDRLP4 64
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 60
INDIRP4
ADDRLP4 56
INDIRI4
ADDP4
INDIRF4
ADDRLP4 64
INDIRP4
CNSTI4 32
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1211
;1210:				in1[1][2] * in2[2][2];
;1211:	out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] +
ADDRLP4 68
CNSTI4 24
ASGNI4
ADDRLP4 72
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 76
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 68
INDIRI4
ADDP4
ADDRLP4 72
INDIRP4
ADDRLP4 68
INDIRI4
ADDP4
INDIRF4
ADDRLP4 76
INDIRP4
INDIRF4
MULF4
ADDRLP4 72
INDIRP4
CNSTI4 28
ADDP4
INDIRF4
ADDRLP4 76
INDIRP4
CNSTI4 12
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 72
INDIRP4
CNSTI4 32
ADDP4
INDIRF4
ADDRLP4 76
INDIRP4
ADDRLP4 68
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1213
;1212:				in1[2][2] * in2[2][0];
;1213:	out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] +
ADDRLP4 80
CNSTI4 28
ASGNI4
ADDRLP4 84
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 88
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 80
INDIRI4
ADDP4
ADDRLP4 84
INDIRP4
CNSTI4 24
ADDP4
INDIRF4
ADDRLP4 88
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
MULF4
ADDRLP4 84
INDIRP4
ADDRLP4 80
INDIRI4
ADDP4
INDIRF4
ADDRLP4 88
INDIRP4
CNSTI4 16
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 84
INDIRP4
CNSTI4 32
ADDP4
INDIRF4
ADDRLP4 88
INDIRP4
ADDRLP4 80
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1215
;1214:				in1[2][2] * in2[2][1];
;1215:	out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] +
ADDRLP4 92
CNSTI4 32
ASGNI4
ADDRLP4 96
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 100
ADDRFP4 4
INDIRP4
ASGNP4
ADDRFP4 8
INDIRP4
ADDRLP4 92
INDIRI4
ADDP4
ADDRLP4 96
INDIRP4
CNSTI4 24
ADDP4
INDIRF4
ADDRLP4 100
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
MULF4
ADDRLP4 96
INDIRP4
CNSTI4 28
ADDP4
INDIRF4
ADDRLP4 100
INDIRP4
CNSTI4 20
ADDP4
INDIRF4
MULF4
ADDF4
ADDRLP4 96
INDIRP4
ADDRLP4 92
INDIRI4
ADDP4
INDIRF4
ADDRLP4 100
INDIRP4
ADDRLP4 92
INDIRI4
ADDP4
INDIRF4
MULF4
ADDF4
ASGNF4
line 1217
;1216:				in1[2][2] * in2[2][2];
;1217:}
LABELV $297
endproc MatrixMultiply 104 0
bss
align 4
LABELV $299
skip 4
align 4
LABELV $300
skip 4
align 4
LABELV $301
skip 4
align 4
LABELV $302
skip 4
align 4
LABELV $303
skip 4
align 4
LABELV $304
skip 4
export AngleVectors
code
proc AngleVectors 36 4
line 1220
;1218:
;1219:
;1220:void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up) {
line 1225
;1221:	float		angle;
;1222:	static float		sr, sp, sy, cr, cp, cy;
;1223:	// static to help MS compiler fp bugs
;1224:
;1225:	angle = angles[YAW] * (M_PI*2 / 360);
ADDRLP4 0
CNSTF4 1016003125
ADDRFP4 0
INDIRP4
CNSTI4 4
ADDP4
INDIRF4
MULF4
ASGNF4
line 1226
;1226:	sy = sin(angle);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 4
ADDRGP4 sin
CALLF4
ASGNF4
ADDRGP4 $301
ADDRLP4 4
INDIRF4
ASGNF4
line 1227
;1227:	cy = cos(angle);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 8
ADDRGP4 cos
CALLF4
ASGNF4
ADDRGP4 $304
ADDRLP4 8
INDIRF4
ASGNF4
line 1228
;1228:	angle = angles[PITCH] * (M_PI*2 / 360);
ADDRLP4 0
CNSTF4 1016003125
ADDRFP4 0
INDIRP4
INDIRF4
MULF4
ASGNF4
line 1229
;1229:	sp = sin(angle);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 12
ADDRGP4 sin
CALLF4
ASGNF4
ADDRGP4 $300
ADDRLP4 12
INDIRF4
ASGNF4
line 1230
;1230:	cp = cos(angle);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 16
ADDRGP4 cos
CALLF4
ASGNF4
ADDRGP4 $303
ADDRLP4 16
INDIRF4
ASGNF4
line 1231
;1231:	angle = angles[ROLL] * (M_PI*2 / 360);
ADDRLP4 0
CNSTF4 1016003125
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRF4
MULF4
ASGNF4
line 1232
;1232:	sr = sin(angle);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 20
ADDRGP4 sin
CALLF4
ASGNF4
ADDRGP4 $299
ADDRLP4 20
INDIRF4
ASGNF4
line 1233
;1233:	cr = cos(angle);
ADDRLP4 0
INDIRF4
ARGF4
ADDRLP4 24
ADDRGP4 cos
CALLF4
ASGNF4
ADDRGP4 $302
ADDRLP4 24
INDIRF4
ASGNF4
line 1235
;1234:
;1235:	if (forward)
ADDRFP4 4
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $305
line 1236
;1236:	{
line 1237
;1237:		forward[0] = cp*cy;
ADDRFP4 4
INDIRP4
ADDRGP4 $303
INDIRF4
ADDRGP4 $304
INDIRF4
MULF4
ASGNF4
line 1238
;1238:		forward[1] = cp*sy;
ADDRFP4 4
INDIRP4
CNSTI4 4
ADDP4
ADDRGP4 $303
INDIRF4
ADDRGP4 $301
INDIRF4
MULF4
ASGNF4
line 1239
;1239:		forward[2] = -sp;
ADDRFP4 4
INDIRP4
CNSTI4 8
ADDP4
ADDRGP4 $300
INDIRF4
NEGF4
ASGNF4
line 1240
;1240:	}
LABELV $305
line 1241
;1241:	if (right)
ADDRFP4 8
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $307
line 1242
;1242:	{
line 1243
;1243:		right[0] = (-1*sr*sp*cy+-1*cr*-sy);
ADDRLP4 28
CNSTF4 3212836864
ASGNF4
ADDRFP4 8
INDIRP4
ADDRLP4 28
INDIRF4
ADDRGP4 $299
INDIRF4
MULF4
ADDRGP4 $300
INDIRF4
MULF4
ADDRGP4 $304
INDIRF4
MULF4
ADDRLP4 28
INDIRF4
ADDRGP4 $302
INDIRF4
MULF4
ADDRGP4 $301
INDIRF4
NEGF4
MULF4
ADDF4
ASGNF4
line 1244
;1244:		right[1] = (-1*sr*sp*sy+-1*cr*cy);
ADDRLP4 32
CNSTF4 3212836864
ASGNF4
ADDRFP4 8
INDIRP4
CNSTI4 4
ADDP4
ADDRLP4 32
INDIRF4
ADDRGP4 $299
INDIRF4
MULF4
ADDRGP4 $300
INDIRF4
MULF4
ADDRGP4 $301
INDIRF4
MULF4
ADDRLP4 32
INDIRF4
ADDRGP4 $302
INDIRF4
MULF4
ADDRGP4 $304
INDIRF4
MULF4
ADDF4
ASGNF4
line 1245
;1245:		right[2] = -1*sr*cp;
ADDRFP4 8
INDIRP4
CNSTI4 8
ADDP4
CNSTF4 3212836864
ADDRGP4 $299
INDIRF4
MULF4
ADDRGP4 $303
INDIRF4
MULF4
ASGNF4
line 1246
;1246:	}
LABELV $307
line 1247
;1247:	if (up)
ADDRFP4 12
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $309
line 1248
;1248:	{
line 1249
;1249:		up[0] = (cr*sp*cy+-sr*-sy);
ADDRFP4 12
INDIRP4
ADDRGP4 $302
INDIRF4
ADDRGP4 $300
INDIRF4
MULF4
ADDRGP4 $304
INDIRF4
MULF4
ADDRGP4 $299
INDIRF4
NEGF4
ADDRGP4 $301
INDIRF4
NEGF4
MULF4
ADDF4
ASGNF4
line 1250
;1250:		up[1] = (cr*sp*sy+-sr*cy);
ADDRFP4 12
INDIRP4
CNSTI4 4
ADDP4
ADDRGP4 $302
INDIRF4
ADDRGP4 $300
INDIRF4
MULF4
ADDRGP4 $301
INDIRF4
MULF4
ADDRGP4 $299
INDIRF4
NEGF4
ADDRGP4 $304
INDIRF4
MULF4
ADDF4
ASGNF4
line 1251
;1251:		up[2] = cr*cp;
ADDRFP4 12
INDIRP4
CNSTI4 8
ADDP4
ADDRGP4 $302
INDIRF4
ADDRGP4 $303
INDIRF4
MULF4
ASGNF4
line 1252
;1252:	}
LABELV $309
line 1253
;1253:}
LABELV $298
endproc AngleVectors 36 4
export PerpendicularVector
proc PerpendicularVector 36 12
line 1259
;1254:
;1255:/*
;1256:** assumes "src" is normalized
;1257:*/
;1258:void PerpendicularVector( vec3_t dst, const vec3_t src )
;1259:{
line 1262
;1260:	int	pos;
;1261:	int i;
;1262:	float minelem = 1.0F;
ADDRLP4 4
CNSTF4 1065353216
ASGNF4
line 1268
;1263:	vec3_t tempvec;
;1264:
;1265:	/*
;1266:	** find the smallest magnitude axially aligned vector
;1267:	*/
;1268:	for ( pos = 0, i = 0; i < 3; i++ )
ADDRLP4 24
CNSTI4 0
ASGNI4
ADDRLP4 8
ADDRLP4 24
INDIRI4
ASGNI4
ADDRLP4 0
ADDRLP4 24
INDIRI4
ASGNI4
ADDRGP4 $315
JUMPV
LABELV $312
line 1269
;1269:	{
line 1270
;1270:		if ( fabs( src[i] ) < minelem )
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRFP4 4
INDIRP4
ADDP4
INDIRF4
ARGF4
ADDRLP4 28
ADDRGP4 fabs
CALLF4
ASGNF4
ADDRLP4 28
INDIRF4
ADDRLP4 4
INDIRF4
GEF4 $316
line 1271
;1271:		{
line 1272
;1272:			pos = i;
ADDRLP4 8
ADDRLP4 0
INDIRI4
ASGNI4
line 1273
;1273:			minelem = fabs( src[i] );
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRFP4 4
INDIRP4
ADDP4
INDIRF4
ARGF4
ADDRLP4 32
ADDRGP4 fabs
CALLF4
ASGNF4
ADDRLP4 4
ADDRLP4 32
INDIRF4
ASGNF4
line 1274
;1274:		}
LABELV $316
line 1275
;1275:	}
LABELV $313
line 1268
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $315
ADDRLP4 0
INDIRI4
CNSTI4 3
LTI4 $312
line 1276
;1276:	tempvec[0] = tempvec[1] = tempvec[2] = 0.0F;
ADDRLP4 28
CNSTF4 0
ASGNF4
ADDRLP4 12+8
ADDRLP4 28
INDIRF4
ASGNF4
ADDRLP4 12+4
ADDRLP4 28
INDIRF4
ASGNF4
ADDRLP4 12
ADDRLP4 28
INDIRF4
ASGNF4
line 1277
;1277:	tempvec[pos] = 1.0F;
ADDRLP4 8
INDIRI4
CNSTI4 2
LSHI4
ADDRLP4 12
ADDP4
CNSTF4 1065353216
ASGNF4
line 1282
;1278:
;1279:	/*
;1280:	** project the point onto the plane defined by src
;1281:	*/
;1282:	ProjectPointOnPlane( dst, tempvec, src );
ADDRFP4 0
INDIRP4
ARGP4
ADDRLP4 12
ARGP4
ADDRFP4 4
INDIRP4
ARGP4
ADDRGP4 ProjectPointOnPlane
CALLV
pop
line 1287
;1283:
;1284:	/*
;1285:	** normalize the result
;1286:	*/
;1287:	VectorNormalize( dst );
ADDRFP4 0
INDIRP4
ARGP4
ADDRGP4 VectorNormalize
CALLF4
pop
line 1288
;1288:}
LABELV $311
endproc PerpendicularVector 36 12
data
align 4
LABELV holdrand
byte 4 2309737967
export Rand_Init
code
proc Rand_Init 0 0
line 1300
;1289:
;1290:// This is the VC libc version of rand() without multiple seeds per thread or 12 levels
;1291:// of subroutine calls.
;1292:// Both calls have been designed to minimise the inherent number of float <--> int 
;1293:// conversions and the additional math required to get the desired value.
;1294:// eg the typical tint = (rand() * 255) / 32768
;1295:// becomes tint = irand(0, 255)
;1296:
;1297:static unsigned long	holdrand = 0x89abcdef;
;1298:
;1299:void Rand_Init(int seed)
;1300:{
line 1301
;1301:	holdrand = seed;
ADDRGP4 holdrand
ADDRFP4 0
INDIRI4
CVIU4 4
ASGNU4
line 1302
;1302:}
LABELV $320
endproc Rand_Init 0 0
export flrand
proc flrand 16 0
line 1307
;1303:
;1304:// Returns a float min <= x < max (exclusive; will get max - 0.00001; but never max)
;1305:
;1306:float flrand(float min, float max)
;1307:{
line 1310
;1308:	float	result;
;1309:
;1310:	assert((max - min) < 32768);
line 1312
;1311:
;1312:	holdrand = (holdrand * 214013L) + 2531011L;
ADDRLP4 4
ADDRGP4 holdrand
ASGNP4
ADDRLP4 4
INDIRP4
CNSTU4 214013
ADDRLP4 4
INDIRP4
INDIRU4
MULU4
CNSTU4 2531011
ADDU4
ASGNU4
line 1313
;1313:	result = (float)(holdrand >> 17);						// 0 - 32767 range
ADDRLP4 8
ADDRGP4 holdrand
INDIRU4
CNSTI4 17
RSHU4
ASGNU4
ADDRLP4 0
CNSTF4 1073741824
ADDRLP4 8
INDIRU4
CNSTI4 1
RSHU4
CVUI4 4
CVIF4 4
MULF4
ADDRLP4 8
INDIRU4
CNSTU4 1
BANDU4
CVUI4 4
CVIF4 4
ADDF4
ASGNF4
line 1314
;1314:	result = ((result * (max - min)) / 32768.0F) + min;
ADDRLP4 12
ADDRFP4 0
INDIRF4
ASGNF4
ADDRLP4 0
ADDRLP4 0
INDIRF4
ADDRFP4 4
INDIRF4
ADDRLP4 12
INDIRF4
SUBF4
MULF4
CNSTF4 1191182336
DIVF4
ADDRLP4 12
INDIRF4
ADDF4
ASGNF4
line 1316
;1315:
;1316:	return(result);
ADDRLP4 0
INDIRF4
RETF4
LABELV $321
endproc flrand 16 0
export irand
proc irand 12 0
line 1322
;1317:}
;1318:
;1319:// Returns an integer min <= x <= max (ie inclusive)
;1320:
;1321:int irand(int min, int max)
;1322:{
line 1325
;1323:	int		result;
;1324:
;1325:	assert((max - min) < 32768);
line 1327
;1326:
;1327:	max++;
ADDRFP4 4
ADDRFP4 4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
line 1328
;1328:	holdrand = (holdrand * 214013L) + 2531011L;
ADDRLP4 4
ADDRGP4 holdrand
ASGNP4
ADDRLP4 4
INDIRP4
CNSTU4 214013
ADDRLP4 4
INDIRP4
INDIRU4
MULU4
CNSTU4 2531011
ADDU4
ASGNU4
line 1329
;1329:	result = holdrand >> 17;
ADDRLP4 0
ADDRGP4 holdrand
INDIRU4
CNSTI4 17
RSHU4
CVUI4 4
ASGNI4
line 1330
;1330:	result = ((result * (max - min)) >> 15) + min;
ADDRLP4 8
ADDRFP4 0
INDIRI4
ASGNI4
ADDRLP4 0
ADDRLP4 0
INDIRI4
ADDRFP4 4
INDIRI4
ADDRLP4 8
INDIRI4
SUBI4
MULI4
CNSTI4 15
RSHI4
ADDRLP4 8
INDIRI4
ADDI4
ASGNI4
line 1331
;1331:	return(result);
ADDRLP4 0
INDIRI4
RETI4
LABELV $322
endproc irand 12 0
export powf
proc powf 8 0
line 1335
;1332:}
;1333:
;1334:float powf ( float x, int y )
;1335:{
line 1336
;1336:	float r = x;
ADDRLP4 0
ADDRFP4 0
INDIRF4
ASGNF4
line 1337
;1337:	for ( y--; y>0; y-- )
ADDRFP4 4
ADDRFP4 4
INDIRI4
CNSTI4 1
SUBI4
ASGNI4
ADDRGP4 $327
JUMPV
LABELV $324
line 1338
;1338:		r = r * r;
ADDRLP4 0
ADDRLP4 0
INDIRF4
ADDRLP4 0
INDIRF4
MULF4
ASGNF4
LABELV $325
line 1337
ADDRFP4 4
ADDRFP4 4
INDIRI4
CNSTI4 1
SUBI4
ASGNI4
LABELV $327
ADDRFP4 4
INDIRI4
CNSTI4 0
GTI4 $324
line 1339
;1339:	return r;
ADDRLP4 0
INDIRF4
RETF4
LABELV $323
endproc powf 8 0
import GetStringForID
import GetIDForString
import Q_irand
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_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 Q_acos
import colorTable
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
