code

equ trap_Print								  -1	; CG_PRINT 
equ trap_Error								  -2	; CG_ERROR 
equ trap_Milliseconds						  -3	; CG_MILLISECONDS 
equ trap_Cvar_Register						  -4	; CG_CVAR_REGISTER 
equ trap_Cvar_Update						  -5	; CG_CVAR_UPDATE 
equ trap_Cvar_Set							  -6	; CG_CVAR_SET 
equ trap_Cvar_VariableStringBuffer			  -7	; CG_CVAR_VARIABLESTRINGBUFFER 
equ trap_Argc								  -8	; CG_ARGC 
equ trap_Argv								  -9	; CG_ARGV 
equ trap_Args								 -10	; CG_ARGS 
equ trap_FS_FOpenFile						 -11	; CG_FS_FOPENFILE 
equ trap_FS_Read							 -12	; CG_FS_READ 
equ trap_FS_Write							 -13	; CG_FS_WRITE 
equ trap_FS_FCloseFile						 -14	; CG_FS_FCLOSEFILE 
equ trap_SendConsoleCommand					 -16	; CG_SENDCONSOLECOMMAND 
equ trap_AddCommand							 -17	; CG_ADDCOMMAND 
equ trap_RemoveCommand						-121	; CG_REMOVECOMMAND 
equ trap_SendClientCommand					 -18	; CG_SENDCLIENTCOMMAND 
equ trap_UpdateScreen						 -19	; CG_UPDATESCREEN 
equ trap_RMG_Init							 -20	; CG_RMG_INIT 
equ trap_CM_LoadMap							 -21	; CG_CM_LOADMAP 
equ trap_CM_NumInlineModels					 -22	; CG_CM_NUMINLINEMODELS 
equ trap_CM_InlineModel						 -23	; CG_CM_INLINEMODEL 
equ trap_CM_TempBoxModel					 -25	; CG_CM_TEMPBOXMODEL 
equ trap_CM_TempCapsuleModel				-134	; CG_CM_TEMPCAPSULEMODEL 
equ trap_CM_PointContents					 -26	; CG_CM_POINTCONTENTS 
equ trap_CM_TransformedPointContents		 -27	; CG_CM_TRANSFORMEDPOINTCONTENTS 
equ trap_CM_BoxTrace						 -28	; CG_CM_BOXTRACE 
equ trap_CM_CapsuleTrace					-135	; CG_CM_CAPSULETRACE 
equ trap_CM_TransformedBoxTrace				 -29	; CG_CM_TRANSFORMEDBOXTRACE 
equ trap_CM_TransformedCapsuleTrace			-136	; CG_CM_TRANSFORMEDCAPSULETRACE 
equ trap_CM_MarkFragments					 -30	; CG_CM_MARKFRAGMENTS 
equ trap_S_StopAllSounds					 -32	; CG_S_STOPALLSOUNDS 
equ trap_S_StartSound						 -31	; CG_S_STARTSOUND 
equ trap_S_StartLocalSound					 -33	; CG_S_STARTLOCALSOUND 
equ trap_S_ClearLoopingSounds				 -34	; CG_S_CLEARLOOPINGSOUNDS 
equ trap_S_AddLoopingSound					 -35	; CG_S_ADDLOOPINGSOUND 
equ trap_S_AddRealLoopingSound				-132	; CG_S_ADDREALLOOPINGSOUND 
equ trap_S_StopLoopingSound					-133	; CG_S_STOPLOOPINGSOUND 
equ trap_S_UpdateEntityPosition				 -36	; CG_S_UPDATEENTITYPOSITION 
equ trap_S_Respatialize						 -37	; CG_S_RESPATIALIZE 
equ trap_S_RegisterSound					 -38	; CG_S_REGISTERSOUND 
equ trap_S_StartBackgroundTrack				 -39	; CG_S_STARTBACKGROUNDTRACK 
equ trap_AS_AddPrecacheEntry				 -40	; CG_AS_ADDPRECACHEENTRY 
equ trap_AS_ParseSets						 -41	; CG_AS_PARSESETS 
equ trap_AS_UpdateAmbientSet				 -42	; CG_AS_UPDATEAMBIENTSET 
equ trap_AS_AddLocalSet						 -43	; CG_AS_ADDLOCALSET 
equ trap_AS_GetBModelSound					 -44	; CG_AS_GETBMODELSOUND 
equ trap_R_LoadWorldMap						 -45	; CG_R_LOADWORLDMAP 
equ trap_R_RegisterModel					 -46	; CG_R_REGISTERMODEL 
equ trap_R_RegisterSkin						 -47	; CG_R_REGISTERSKIN 
equ trap_R_RegisterShader					 -48	; CG_R_REGISTERSHADER 
equ trap_R_RegisterShaderNoMip				 -78	; CG_R_REGISTERSHADERNOMIP 
equ trap_R_RegisterFont						 -80	; CG_R_REGISTERFONT 
equ trap_R_ClearScene						 -49	; CG_R_CLEARSCENE 
equ trap_R_ClearDecals						 -50	; CG_R_CLEARDECALS 
equ trap_R_AddRefEntityToScene				 -51	; CG_R_ADDREFENTITYTOSCENE 
equ trap_R_AddPolyToScene					 -52	; CG_R_ADDPOLYTOSCENE 
equ trap_R_AddDecalToScene					 -53	; CG_R_ADDDECALTOSCENE 
equ trap_R_AddPolysToScene					-139	; CG_R_ADDPOLYSTOSCENE 
equ trap_R_LightForPoint					-122	; CG_R_LIGHTFORPOINT 
equ trap_R_AddLightToScene					 -54	; CG_R_ADDLIGHTTOSCENE 
equ trap_R_AddAdditiveLightToScene			-137	; CG_R_ADDADDITIVELIGHTTOSCENE 
equ trap_R_RenderScene						 -55	; CG_R_RENDERSCENE 
equ trap_R_DrawVisualOverlay				 -56	; CG_R_DRAWVISUALOVERLAY 
equ trap_R_SetColor							 -57	; CG_R_SETCOLOR 
equ trap_R_DrawStretchPic					 -58	; CG_R_DRAWSTRETCHPIC 
equ trap_R_ModelBounds						 -59	; CG_R_MODELBOUNDS 
equ trap_R_LerpTag							 -60	; CG_R_LERPTAG 
equ trap_R_DrawRotatePic					 -61	; CG_R_DRAWROTATEPIC 
equ trap_R_DrawRotatePic2					 -62	; CG_R_DRAWROTATEPIC2 
equ trap_R_RemapShader						-128	; CG_R_REMAP_SHADER 
equ trap_R_GetLightStyle					-129	; CG_R_GET_LIGHT_STYLE 
equ trap_R_SetLightStyle					-130	; CG_R_SET_LIGHT_STYLE 
equ trap_R_GetTextWidth						 -65	; CG_R_GETTEXTWIDTH 
equ trap_R_GetTextHeight					 -66	; CG_R_GETTEXTHEIGHT 
equ trap_R_DrawText							 -63	; CG_R_DRAWTEXT 
equ trap_R_DrawTextWithCursor				 -64	; CG_R_DRAWTEXTWITHCURSOR 
equ trap_FX_AddLine							-131	; CG_FX_ADDLINE 
equ trap_GetGlconfig						 -67	; CG_GETGLCONFIG 
equ trap_GetGameState						 -68	; CG_GETGAMESTATE 
equ trap_GetCurrentSnapshotNumber			 -69	; CG_GETCURRENTSNAPSHOTNUMBER 
equ trap_GetSnapshot						 -70	; CG_GETSNAPSHOT 
equ trap_GetDefaultState					 -71	; CG_GETDEFAULTSTATE 
equ trap_GetServerCommand					 -72	; CG_GETSERVERCOMMAND 
equ trap_GetCurrentCmdNumber				 -73	; CG_GETCURRENTCMDNUMBER 
equ trap_GetUserCmd							 -74	; CG_GETUSERCMD 
equ trap_SetUserCmdValue					 -75	; CG_SETUSERCMDVALUE 
equ trap_RW_SetTeam							 -76	; CG_RW_SETTEAM 
equ trap_ResetAutorun						 -77	; CG_RESETAUTORUN 
equ trap_MemoryRemaining					 -79	; CG_MEMORY_REMAINING 
equ trap_Key_IsDown							 -81	; CG_KEY_ISDOWN 
equ trap_Key_GetCatcher						 -82	; CG_KEY_GETCATCHER 
equ trap_Key_SetCatcher						 -83	; CG_KEY_SETCATCHER 
equ trap_Key_GetKey							 -84	; CG_KEY_GETKEY 
equ trap_PC_AddGlobalDefine					 -85	; CG_PC_ADD_GLOBAL_DEFINE 
equ trap_PC_LoadSource						 -86	; CG_PC_LOAD_SOURCE 
equ trap_PC_FreeSource						 -87	; CG_PC_FREE_SOURCE 
equ trap_PC_ReadToken						 -88	; CG_PC_READ_TOKEN 
equ trap_PC_SourceFileAndLine				 -89	; CG_PC_SOURCE_FILE_AND_LINE 
equ trap_PC_LoadGlobalDefines				 -90	; CG_PC_LOAD_GLOBAL_DEFINES 
equ trap_PC_RemoveAllGlobalDefines			 -91	; CG_PC_REMOVE_ALL_GLOBAL_DEFINES 
equ trap_S_StopBackgroundTrack				-118	; CG_S_STOPBACKGROUNDTRACK 
equ trap_RealTime							-119	; CG_REAL_TIME 
equ trap_SnapVector							-120	; CG_SNAPVECTOR 
equ trap_CIN_PlayCinematic					-123	; CG_CIN_PLAYCINEMATIC 
equ trap_CIN_StopCinematic					-124	; CG_CIN_STOPCINEMATIC 
equ trap_CIN_RunCinematic					-125	; CG_CIN_RUNCINEMATIC 
equ trap_CIN_DrawCinematic					-126	; CG_CIN_DRAWCINEMATIC 
equ trap_CIN_SetExtents						-127	; CG_CIN_SETEXTENTS 
equ trap_GetEntityToken						-138	; CG_GET_ENTITY_TOKEN 
equ trap_R_inPVS							-140	; CG_R_INPVS 
equ trap_FX_RegisterEffect					-141	; CG_FX_REGISTER_EFFECT 
equ trap_FX_PlaySimpleEffect				-142	; CG_FX_PLAY_SIMPLE_EFFECT 
equ trap_FX_PlayEffect						-143	; CG_FX_PLAY_EFFECT 
equ trap_FX_PlayEntityEffect				-144	; CG_FX_PLAY_ENTITY_EFFECT 
equ trap_FX_PlaySimpleEffectID				-145	; CG_FX_PLAY_SIMPLE_EFFECT_ID 
equ trap_FX_PlayEffectID					-146	; CG_FX_PLAY_EFFECT_ID 
equ trap_FX_PlayEntityEffectID				-147	; CG_FX_PLAY_ENTITY_EFFECT_ID 
equ trap_FX_PlayBoltedEffectID				-148	; CG_FX_PLAY_BOLTED_EFFECT_ID 
equ trap_FX_AddScheduledEffects				-149	; CG_FX_ADD_SCHEDULED_EFFECTS 
equ trap_FX_Draw2DEffects					-153	; CG_FX_DRAW_2D_EFFECTS 
equ trap_FX_InitSystem						-150	; CG_FX_INIT_SYSTEM 
equ trap_FX_FreeSystem						-151	; CG_FX_FREE_SYSTEM 
equ trap_FX_Reset							-154	; CG_FX_RESET 
equ trap_FX_AdjustTime						-152	; CG_FX_ADJUST_TIME 
equ trap_G2_ListModelSurfaces				-156	; CG_G2_LISTSURFACES 
equ trap_G2_ListModelBones					-155	; CG_G2_LISTBONES 
equ trap_G2_SetGhoul2ModelIndexes			-163	; CG_G2_SETMODELS 
equ trap_G2API_CollisionDetect				-190	; CG_G2_COLLISIONDETECT 
equ trap_G2API_AddBolt						-157	; CG_G2_ADDBOLT 
equ trap_G2API_SetBoltInfo					-158	; CG_G2_SETBOLTON 
equ trap_G2API_RemoveBolt					-159	; CG_G2_REMOVEBOLT 
equ trap_G2API_AttachG2Model				-160	; CG_G2_ATTACHG2MODEL 
equ trap_G2API_DetachG2Model				-161	; CG_G2_DETACHG2MODEL 
equ trap_G2_HaveWeGhoul2Models				-162	; CG_G2_HAVEWEGHOULMODELS 
equ trap_G2API_GetBoltMatrix				-164	; CG_G2_GETBOLT 
equ trap_G2API_InitGhoul2Model				-165	; CG_G2_INITGHOUL2MODEL 
equ trap_G2API_GetAnimFileNameIndex			-185	; CG_G2_GETANIMFILENAMEINDEX 
equ trap_G2API_RegisterSkin					-188	; CG_G2_REGISTERSKIN 
equ trap_G2API_SetSkin						-189	; CG_G2_SETSKIN 
equ trap_G2API_CleanGhoul2Models			-166	; CG_G2_CLEANMODELS 
equ trap_G2API_SetBoneAngles				-167	; CG_G2_ANGLEOVERRIDE 
equ trap_G2API_SetBoneAnim					-168	; CG_G2_PLAYANIM 
equ trap_G2API_GetBoneAnim					-169	; CG_G2_GETANIM 
equ trap_G2API_SetSurfaceOnOff				-170	; CG_G2_SETSURFACEONOFF 
equ trap_G2API_SetRootSurface				-171	; CG_G2_SETROOTSURFACE 
equ trap_G2API_SetNewOrigin					-172	; CG_G2_SETNEWORIGIN 
equ trap_G2API_GetGLAName					-173	; CG_G2_GETGLANAME 
equ trap_G2API_CopyGhoul2Instance			-174	; CG_G2_COPYGHOUL2INSTANCE 
equ trap_G2API_CopySpecificGhoul2Model		-175	; CG_G2_COPYSPECIFICGHOUL2MODEL 
equ trap_G2API_DuplicateGhoul2Instance		-176	; CG_G2_DUPLICATEGHOUL2INSTANCE 
equ trap_G2API_RemoveGhoul2Model			-177	; CG_G2_REMOVEGHOUL2MODEL 
equ trap_G2API_AddSkinGore					-178	; CG_G2_ADDSKINGORE 
equ trap_G2API_ClearSkinGore				-179	; CG_G2_CLEARSKINGORE 
equ trap_G2API_SetGhoul2ModelFlags			-180	; CG_G2_SETGHOUL2MODELFLAGS 
equ trap_G2API_GetGhoul2ModelFlags			-181	; CG_G2_GETGHOUL2MODELFLAGS 
equ trap_G2API_SetGhoul2ModelFlagsByIndex	-182	; CG_G2_SETGHOUL2MODELFLAGSBYINDEX 
equ trap_G2API_GetGhoul2ModelFlagsByIndex	-183	; CG_G2_GETGHOUL2MODELFLAGSBYINDEX 
equ trap_G2API_GetNumModels					-184	; CG_G2_GETNUMMODELS 
equ trap_G2API_FindBoltIndex				-186	; CG_G2_FINDBOLTINDEX 
equ trap_G2API_GetBoltIndex					-187	; CG_G2_GETBOLTINDEX 
equ trap_MAT_Init							-192	; CG_MAT_CACHE 
equ trap_MAT_Reset							-191	; CG_MAT_RESET 
equ trap_MAT_GetSound						-193	; CG_MAT_GET_SOUND 
equ trap_MAT_GetDecal						-194	; CG_MAT_GET_DECAL 
equ trap_MAT_GetDecalScale					-195	; CG_MAT_GET_DECAL_SCALE 
equ trap_MAT_GetEffect						-196	; CG_MAT_GET_EFFECT 
equ trap_MAT_GetDebris						-197	; CG_MAT_GET_DEBRIS 
equ trap_MAT_GetDebrisScale					-198	; CG_MAT_GET_DEBRIS_SCALE 
equ trap_GP_Parse							-205	; GP_PARSE 
equ trap_GP_ParseFile						-206	; GP_PARSE_FILE 
equ trap_GP_Clean							-207	; GP_CLEAN 
equ trap_GP_Delete							-208	; GP_DELETE 
equ trap_GP_GetBaseParseGroup				-209	; GP_GET_BASE_PARSE_GROUP 
equ trap_GPG_GetName						-210	; GPG_GET_NAME 
equ trap_GPG_GetNext						-211	; GPG_GET_NEXT 
equ trap_GPG_GetInOrderNext					-212	; GPG_GET_INORDER_NEXT 
equ trap_GPG_GetInOrderPrevious				-213	; GPG_GET_INORDER_PREVIOUS 
equ trap_GPG_GetPairs						-214	; GPG_GET_PAIRS 
equ trap_GPG_GetInOrderPairs				-215	; GPG_GET_INORDER_PAIRS 
equ trap_GPG_GetSubGroups					-216	; GPG_GET_SUBGROUPS 
equ trap_GPG_GetInOrderSubGroups			-217	; GPG_GET_INORDER_SUBGROUPS 
equ trap_GPG_FindSubGroup					-218	; GPG_FIND_SUBGROUP 
equ trap_GPG_FindPair						-219	; GPG_FIND_PAIR 
equ trap_GPG_FindPairValue					-220	; GPG_FIND_PAIRVALUE 
equ trap_GPV_GetName						-221	; GPV_GET_NAME 
equ trap_GPV_GetNext						-222	; GPV_GET_NEXT 
equ trap_GPV_GetInOrderNext					-223	; GPV_GET_INORDER_NEXT 
equ trap_GPV_GetInOrderPrevious				-224	; GPV_GET_INORDER_PREVIOUS 
equ trap_GPV_IsList							-225	; GPV_IS_LIST 
equ trap_GPV_GetTopValue					-226	; GPV_GET_TOP_VALUE 
equ trap_GPV_GetList						-227	; GPV_GET_LIST 
equ trap_CM_TM_Create						-199	; CG_CM_TM_CREATE 
equ trap_CM_TM_AddBuilding					-200	; CG_CM_TM_ADDBUILDING 
equ trap_CM_TM_AddSpot						-201	; CG_CM_TM_ADDSPOT 
equ trap_CM_TM_AddTarget					-202	; CG_CM_TM_ADDTARGET 
equ trap_CM_TM_Upload						-203	; CG_CM_TM_UPLOAD 
equ trap_CM_TM_ConvertPosition				-204	; CG_CM_TM_CONVERT_POS 
equ trap_CM_RegisterTerrain					-228	; CG_CM_REGISTER_TERRAIN 
equ trap_RE_InitRendererTerrain				-229	; CG_RE_INIT_RENDERER_TERRAIN 
equ trap_CG_RegisterSharedMemory			-230	; CG_SET_SHARED_BUFFER 
equ trap_FS_GetFileList						 -15	; CG_FS_GETFILELIST 
equ trap_VM_LocalAlloc						-231	; CG_VM_LOCALALLOC 
equ trap_VM_LocalAllocUnaligned				-232	; CG_VM_LOCALALLOCUNALIGNED 
equ trap_VM_LocalTempAlloc					-233	; CG_VM_LOCALTEMPALLOC 
equ trap_VM_LocalTempFree					-234	; CG_VM_LOCALTEMPFREE 
equ trap_VM_LocalStringAlloc				-235	; CG_VM_LOCALSTRINGALLOC 
equ trap_UI_CloseAll						-237	; CG_UI_CLOSEALL 
equ trap_UI_SetActiveMenu					-236	; CG_UI_SETACTIVEMENU 


; hardcoded functions
equ memset									-101	; CG_MEMSET 
equ memcpy									-102	; CG_MEMCPY 
equ strncpy									-103	; CG_STRNCPY 
equ sin										-104	; CG_SIN 
equ cos										-105	; CG_COS 
equ atan2									-106	; CG_ATAN2 
equ sqrt									-107	; CG_SQRT 
equ matrixmultiply							-116	; CG_MATRIXMULTIPLY 
equ anglevectors							-108	; CG_ANGLEVECTORS 
equ perpendicularvector						-109	; CG_PERPENDICULARVECTOR 
equ floor									-110	; CG_FLOOR 
equ ceil									-111	; CG_CEIL 
equ acos									-114	; CG_ACOS 
equ asin									-115	; CG_ASIN 
