DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
pr_comp.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dfield16_t
 
struct  dfunction_t
 
struct  dprograms_t
 
struct  dprograms_v7_t
 
struct  dstatement16_t
 
struct  dstatement32_t
 
struct  mdef_t
 
struct  mfunction_t
 
struct  mstatement_t
 

Macros

#define DEF_SAVEGLOBAL   (1<<15)
 
#define MAX_PARMS   8
 
#define OFS_NULL   0
 
#define OFS_PARM0   4
 
#define OFS_PARM1   7
 
#define OFS_PARM2   10
 
#define OFS_PARM3   13
 
#define OFS_PARM4   16
 
#define OFS_PARM5   19
 
#define OFS_PARM6   22
 
#define OFS_PARM7   25
 
#define OFS_RETURN   1
 
#define PROG_SECONDARYVERSION16   ((('1'<<0)|('F'<<8)|('T'<<16)|('E'<<24))^(('P'<<0)|('R'<<8)|('O'<<16)|('G'<<24)))
 
#define PROG_SECONDARYVERSION32   ((('1'<<0)|('F'<<8)|('T'<<16)|('E'<<24))^(('3'<<0)|('2'<<8)|('B'<<16)|(' '<<24)))
 
#define PROG_VERSION   6
 
#define RESERVED_OFS   28
 

Typedefs

typedef unsigned int func_t
 
typedef int string_t
 

Enumerations

enum  etype_t {
  ev_void , ev_string , ev_float , ev_vector ,
  ev_entity , ev_field , ev_function , ev_pointer
}
 
enum  opcode_t {
  OP_DONE , OP_MUL_F , OP_MUL_V , OP_MUL_FV ,
  OP_MUL_VF , OP_DIV_F , OP_ADD_F , OP_ADD_V ,
  OP_SUB_F , OP_SUB_V , OP_EQ_F , OP_EQ_V ,
  OP_EQ_S , OP_EQ_E , OP_EQ_FNC , OP_NE_F ,
  OP_NE_V , OP_NE_S , OP_NE_E , OP_NE_FNC ,
  OP_LE_F , OP_GE_F , OP_LT_F , OP_GT_F ,
  OP_LOAD_F , OP_LOAD_V , OP_LOAD_S , OP_LOAD_ENT ,
  OP_LOAD_FLD , OP_LOAD_FNC , OP_ADDRESS , OP_STORE_F ,
  OP_STORE_V , OP_STORE_S , OP_STORE_ENT , OP_STORE_FLD ,
  OP_STORE_FNC , OP_STOREP_F , OP_STOREP_V , OP_STOREP_S ,
  OP_STOREP_ENT , OP_STOREP_FLD , OP_STOREP_FNC , OP_RETURN ,
  OP_NOT_F , OP_NOT_V , OP_NOT_S , OP_NOT_ENT ,
  OP_NOT_FNC , OP_IF , OP_IFNOT , OP_CALL0 ,
  OP_CALL1 , OP_CALL2 , OP_CALL3 , OP_CALL4 ,
  OP_CALL5 , OP_CALL6 , OP_CALL7 , OP_CALL8 ,
  OP_STATE , OP_GOTO , OP_AND_F , OP_OR_F ,
  OP_BITAND_F , OP_BITOR_F , OP_MULSTORE_F , OP_MULSTORE_VF ,
  OP_MULSTOREP_F , OP_MULSTOREP_VF , OP_DIVSTORE_F , OP_DIVSTOREP_F ,
  OP_ADDSTORE_F , OP_ADDSTORE_V , OP_ADDSTOREP_F , OP_ADDSTOREP_V ,
  OP_SUBSTORE_F , OP_SUBSTORE_V , OP_SUBSTOREP_F , OP_SUBSTOREP_V ,
  OP_FETCH_GBL_F , OP_FETCH_GBL_V , OP_FETCH_GBL_S , OP_FETCH_GBL_E ,
  OP_FETCH_GBL_FNC , OP_CSTATE , OP_CWSTATE , OP_THINKTIME ,
  OP_BITSETSTORE_F , OP_BITSETSTOREP_F , OP_BITCLRSTORE_F , OP_BITCLRSTOREP_F ,
  OP_RAND0 , OP_RAND1 , OP_RAND2 , OP_RANDV0 ,
  OP_RANDV1 , OP_RANDV2 , OP_SWITCH_F , OP_SWITCH_V ,
  OP_SWITCH_S , OP_SWITCH_E , OP_SWITCH_FNC , OP_CASE ,
  OP_CASERANGE , OP_CALL1H , OP_CALL2H , OP_CALL3H ,
  OP_CALL4H , OP_CALL5H , OP_CALL6H , OP_CALL7H ,
  OP_CALL8H , OP_STORE_I , OP_STORE_IF , OP_STORE_FI ,
  OP_ADD_I , OP_ADD_FI , OP_ADD_IF , OP_SUB_I ,
  OP_SUB_FI , OP_SUB_IF , OP_CONV_ITOF , OP_CONV_FTOI ,
  OP_LOADP_ITOF , OP_LOADP_FTOI , OP_LOAD_I , OP_STOREP_I ,
  OP_STOREP_IF , OP_STOREP_FI , OP_BITAND_I , OP_BITOR_I ,
  OP_MUL_I , OP_DIV_I , OP_EQ_I , OP_NE_I ,
  OP_IFNOT_S , OP_IF_S , OP_NOT_I , OP_DIV_VF ,
  OP_BITXOR_I , OP_RSHIFT_I , OP_LSHIFT_I , OP_GLOBALADDRESS ,
  OP_ADD_PIW , OP_LOADA_F , OP_LOADA_V , OP_LOADA_S ,
  OP_LOADA_ENT , OP_LOADA_FLD , OP_LOADA_FNC , OP_LOADA_I ,
  OP_STORE_P , OP_LOAD_P , OP_LOADP_F , OP_LOADP_V ,
  OP_LOADP_S , OP_LOADP_ENT , OP_LOADP_FLD , OP_LOADP_FNC ,
  OP_LOADP_I , OP_LE_I , OP_GE_I , OP_LT_I ,
  OP_GT_I , OP_LE_IF , OP_GE_IF , OP_LT_IF ,
  OP_GT_IF , OP_LE_FI , OP_GE_FI , OP_LT_FI ,
  OP_GT_FI , OP_EQ_IF , OP_EQ_FI , OP_ADD_SF ,
  OP_SUB_S , OP_STOREP_C , OP_LOADP_C , OP_MUL_IF ,
  OP_MUL_FI , OP_MUL_VI , OP_MUL_IV , OP_DIV_IF ,
  OP_DIV_FI , OP_BITAND_IF , OP_BITOR_IF , OP_BITAND_FI ,
  OP_BITOR_FI , OP_AND_I , OP_OR_I , OP_AND_IF ,
  OP_OR_IF , OP_AND_FI , OP_OR_FI , OP_NE_IF ,
  OP_NE_FI , OP_GSTOREP_I , OP_GSTOREP_F , OP_GSTOREP_ENT ,
  OP_GSTOREP_FLD , OP_GSTOREP_S , OP_GSTOREP_FNC , OP_GSTOREP_V ,
  OP_GADDRESS , OP_GLOAD_I , OP_GLOAD_F , OP_GLOAD_FLD ,
  OP_GLOAD_ENT , OP_GLOAD_S , OP_GLOAD_FNC , OP_BOUNDCHECK ,
  OP_UNUSED , OP_PUSH , OP_POP , OP_SWITCH_I ,
  OP_GLOAD_V , OP_IF_F , OP_IFNOT_F , OP_STOREF_V ,
  OP_STOREF_F , OP_STOREF_S , OP_STOREF_I , OP_STOREP_B ,
  OP_LOADP_B , OP_LE_U , OP_LT_U , OP_DIV_U ,
  OP_RSHIFT_U , OP_ADD_I64 , OP_SUB_I64 , OP_MUL_I64 ,
  OP_DIV_I64 , OP_BITAND_I64 , OP_BITOR_I64 , OP_BITXOR_I64 ,
  OP_LSHIFT_I64I , OP_RSHIFT_I64I , OP_LE_I64 , OP_LT_I64 ,
  OP_EQ_I64 , OP_NE_I64 , OP_LE_U64 , OP_LT_U64 ,
  OP_DIV_U64 , OP_RSHIFT_U64I , OP_STORE_I64 , OP_STOREP_I64 ,
  OP_STOREF_I64 , OP_LOAD_I64 , OP_LOADA_I64 , OP_LOADP_I64 ,
  OP_CONV_UI64 , OP_CONV_II64 , OP_CONV_I64I , OP_CONV_FD ,
  OP_CONV_DF , OP_CONV_I64F , OP_CONV_FI64 , OP_CONV_I64D ,
  OP_CONV_DI64 , OP_ADD_D , OP_SUB_D , OP_MUL_D ,
  OP_DIV_D , OP_LE_D , OP_LT_D , OP_EQ_D ,
  OP_NE_D
}
 

Macro Definition Documentation

◆ DEF_SAVEGLOBAL

◆ MAX_PARMS

#define MAX_PARMS   8

Definition at line 423 of file pr_comp.h.

◆ OFS_NULL

◆ OFS_PARM0

#define OFS_PARM0   4

Definition at line 34 of file pr_comp.h.

Referenced by CL_VM_DrawHud(), CL_VM_Event_Sound(), CL_VM_Init(), CL_VM_InputEvent(), CL_VM_Parse_CenterPrint(), CL_VM_Parse_Print(), CL_VM_Parse_StuffCmd(), CL_VM_TransformView(), CL_VM_UpdateView(), CSQC_ReadEntities(), EntityFrameCSQC_WriteFrame(), MP_Draw(), MP_GetServerListEntryCategory(), MP_KeyEvent(), MP_ToggleMenu(), PRVM_ConsoleCommand(), PRVM_EnterFunction(), PRVM_GameCommand(), SV_CheckContentsTransition(), SV_Color_f(), SV_Frame(), SV_Physics_Step(), SV_ReadClientMessage(), SV_ThreadFunc(), uri_to_string_callback(), VM_acos(), VM_altstr_count(), VM_altstr_get(), VM_altstr_ins(), VM_altstr_prepare(), VM_altstr_set(), VM_argv(), VM_argv_end_index(), VM_argv_start_index(), VM_asin(), VM_atan(), VM_atan2(), VM_bitshift(), VM_bound(), VM_buf_copy(), VM_buf_create(), VM_buf_cvarlist(), VM_buf_del(), VM_buf_getsize(), VM_buf_implode(), VM_buf_loadfile(), VM_buf_sort(), VM_buf_writefile(), VM_bufstr_add(), VM_bufstr_find(), VM_bufstr_free(), VM_bufstr_get(), VM_bufstr_set(), VM_callfunction(), VM_ceil(), VM_changelevel(), VM_changepitch(), VM_checkextension(), VM_chr(), VM_chr2str(), VM_cin_close(), VM_cin_getstate(), VM_cin_open(), VM_cin_restart(), VM_cin_setstate(), VM_CL_ambientsound(), VM_CL_boxparticles(), VM_CL_checkbottom(), VM_CL_checkpvs(), VM_CL_copyentity(), VM_CL_effect(), VM_CL_findbox(), VM_CL_findradius(), VM_CL_frameduration(), VM_CL_frameforname(), VM_CL_GetEntity(), VM_CL_getinputstate(), VM_CL_getlight(), VM_CL_getplayerkey(), VM_CL_getstatf(), VM_CL_getstati(), VM_CL_getstats(), VM_CL_gettagindex(), VM_CL_gettaginfo(), VM_CL_InitParticleSpawner(), VM_CL_lightstyle(), VM_CL_loadcubemap(), VM_CL_makestatic(), VM_CL_makevectors(), VM_CL_modelnameforindex(), VM_CL_particle(), VM_CL_particleeffectnum(), VM_CL_ParticleTheme(), VM_CL_ParticleThemeFree(), VM_CL_ParticleThemeSave(), VM_CL_pointcontents(), VM_CL_pointparticles(), VM_CL_pointsound(), VM_CL_precache_model(), VM_CL_project(), VM_CL_R_AddDynamicLight(), VM_CL_R_AddEntities(), VM_CL_R_AddEntity(), VM_CL_R_PolygonBegin(), VM_CL_R_PolygonVertex(), VM_CL_R_SetView(), VM_CL_registercmd(), VM_CL_RotateMoves(), VM_CL_runplayerphysics(), VM_CL_serverkey(), VM_CL_setattachment(), VM_CL_setcursormode(), VM_CL_setlistener(), VM_CL_setmodel(), VM_CL_setmodelindex(), VM_CL_setorigin(), VM_CL_setpause(), VM_CL_setsensitivityscale(), VM_CL_setsize(), VM_CL_skel_build(), VM_CL_skel_copybones(), VM_CL_skel_create(), VM_CL_skel_delete(), VM_CL_skel_find_bone(), VM_CL_skel_get_boneabs(), VM_CL_skel_get_bonename(), VM_CL_skel_get_boneparent(), VM_CL_skel_get_bonerel(), VM_CL_skel_get_numbones(), VM_CL_skel_mul_bone(), VM_CL_skel_mul_bones(), VM_CL_skel_set_bone(), VM_CL_sound(), VM_CL_SpawnParticle(), VM_CL_SpawnParticleDelayed(), VM_CL_te_beam(), VM_CL_te_blood(), VM_CL_te_bloodshower(), VM_CL_te_customflash(), VM_CL_te_explosion(), VM_CL_te_explosion2(), VM_CL_te_explosionquad(), VM_CL_te_explosionrgb(), VM_CL_te_flamejet(), VM_CL_te_gunshot(), VM_CL_te_gunshotquad(), VM_CL_te_knightspike(), VM_CL_te_lavasplash(), VM_CL_te_lightning1(), VM_CL_te_lightning2(), VM_CL_te_lightning3(), VM_CL_te_particlecube(), VM_CL_te_particlerain(), VM_CL_te_particlesnow(), VM_CL_te_plasmaburn(), VM_CL_te_smallflash(), VM_CL_te_spark(), VM_CL_te_spike(), VM_CL_te_spikequad(), VM_CL_te_superspike(), VM_CL_te_superspikequad(), VM_CL_te_tarexplosion(), VM_CL_te_teleport(), VM_CL_te_wizspike(), VM_CL_tracebox(), VM_CL_traceline(), VM_CL_tracetoss(), VM_CL_trailparticles(), VM_CL_unproject(), VM_CL_V_CalcRefdef(), VM_CL_walkmove(), VM_cos(), VM_crc16(), VM_cvar_set(), VM_digest_hex(), VM_drawcharacter(), VM_drawcolorcodedstring(), VM_drawfill(), VM_drawline(), VM_drawpic(), VM_drawrotpic(), VM_drawsetcliparea(), VM_drawstring(), VM_drawsubpic(), VM_entityfieldname(), VM_entityfieldtype(), VM_eprint(), VM_etof(), VM_etos(), VM_fabs(), VM_fclose(), VM_fgets(), VM_find(), VM_findchain(), VM_findchainflags(), VM_findchainfloat(), VM_findflags(), VM_findfloat(), VM_findfont(), VM_findkeysforcommand(), VM_floor(), VM_fopen(), VM_fputs(), VM_freepic(), VM_ftoe(), VM_ftos(), VM_getentityfieldstring(), VM_getimagesize(), VM_getkeybind(), VM_getsoundtime(), VM_getsurfaceclippedpoint(), VM_getsurfacenearpoint(), VM_getsurfacenormal(), VM_getsurfacenumpoints(), VM_getsurfacenumtriangles(), VM_getsurfacepoint(), VM_getsurfacepointattribute(), VM_getsurfacetexture(), VM_getsurfacetriangle(), VM_gettime(), VM_infoadd(), VM_infoget(), VM_isfunction(), VM_itof(), VM_keynumtostring(), VM_loadfont(), VM_loadfromdata(), VM_loadfromfile(), VM_localsound(), VM_log(), VM_M_copyentity(), VM_M_crypto_getencryptlevel(), VM_M_crypto_getidfp(), VM_M_crypto_getidstatus(), VM_M_crypto_getkeyfp(), VM_M_crypto_getmyidfp(), VM_M_crypto_getmyidstatus(), VM_M_crypto_getmykeyfp(), VM_M_getgamedirinfo(), VM_M_getresolution(), VM_M_getserverlistindexforkey(), VM_M_getserverlistnumber(), VM_M_getserverliststat(), VM_M_getserverliststring(), VM_M_refreshserverlist(), VM_M_registercommand(), VM_M_setkeydest(), VM_M_setmousetarget(), VM_M_setserverlistmasknumber(), VM_M_setserverlistmaskstring(), VM_M_setserverlistsort(), VM_M_WriteAngle(), VM_M_WriteByte(), VM_M_WriteChar(), VM_M_WriteCoord(), VM_M_WriteEntity(), VM_M_WriteLong(), VM_M_WriteShort(), VM_M_WriteString(), VM_makevectors(), VM_matchpattern(), VM_max(), VM_min(), VM_modulo(), VM_netaddress_resolve(), VM_nextent(), VM_normalize(), VM_nudgeoutofsolid(), VM_parseentitydata(), VM_physics_addforce(), VM_physics_addtorque(), VM_physics_enable(), VM_pow(), VM_precache_file(), VM_precache_pic(), VM_precache_sound(), VM_putentityfieldstring(), VM_registercvar(), VM_remove(), VM_rint(), VM_search_begin(), VM_search_end(), VM_search_getfilename(), VM_search_getsize(), VM_setbindmaps(), VM_setkeybind(), VM_sin(), VM_soundlength(), VM_sprint(), VM_sprintf(), VM_sqrt(), VM_str2chr(), VM_strconv(), VM_strdecolorize(), VM_strftime(), VM_stringtokeynum(), VM_stringwidth(), VM_strireplace(), VM_strlen(), VM_strlennocol(), VM_strncasecmp(), VM_strncmp(), VM_strpad(), VM_strreplace(), VM_strstrofs(), VM_strtolower(), VM_strtoupper(), VM_strunzone(), VM_substring(), VM_SV_AddStat(), VM_SV_aim(), VM_SV_ambientsound(), VM_SV_centerprint(), VM_SV_checkbottom(), VM_SV_checkpvs(), VM_SV_clientcommand(), VM_SV_clienttype(), VM_SV_copyentity(), VM_SV_dropclient(), VM_SV_effect(), VM_SV_findbox(), VM_SV_findradius(), VM_SV_frameduration(), VM_SV_frameforname(), VM_SV_getlight(), VM_SV_gettagindex(), VM_SV_gettaginfo(), VM_SV_lightstyle(), VM_SV_makestatic(), VM_SV_modelnameforindex(), VM_SV_MoveToGoal(), VM_SV_particle(), VM_SV_particleeffectnum(), VM_SV_pointcontents(), VM_SV_pointparticles(), VM_SV_pointsound(), VM_SV_precache_model(), VM_SV_precache_sound(), VM_SV_registercommand(), VM_SV_serverkey(), VM_SV_setattachment(), VM_SV_setcolor(), VM_SV_setmodel(), VM_SV_setmodelindex(), VM_SV_setorigin(), VM_SV_setpause(), VM_SV_setsize(), VM_SV_setspawnparms(), VM_SV_skel_build(), VM_SV_skel_copybones(), VM_SV_skel_create(), VM_SV_skel_delete(), VM_SV_skel_find_bone(), VM_SV_skel_get_boneabs(), VM_SV_skel_get_bonename(), VM_SV_skel_get_boneparent(), VM_SV_skel_get_bonerel(), VM_SV_skel_get_numbones(), VM_SV_skel_mul_bone(), VM_SV_skel_mul_bones(), VM_SV_skel_set_bone(), VM_SV_sound(), VM_SV_sprint(), VM_SV_stuffcmd(), VM_SV_te_beam(), VM_SV_te_blood(), VM_SV_te_bloodshower(), VM_SV_te_customflash(), VM_SV_te_explosion(), VM_SV_te_explosion2(), VM_SV_te_explosionquad(), VM_SV_te_explosionrgb(), VM_SV_te_flamejet(), VM_SV_te_gunshot(), VM_SV_te_gunshotquad(), VM_SV_te_knightspike(), VM_SV_te_lavasplash(), VM_SV_te_lightning1(), VM_SV_te_lightning2(), VM_SV_te_lightning3(), VM_SV_te_particlecube(), VM_SV_te_particlerain(), VM_SV_te_particlesnow(), VM_SV_te_plasmaburn(), VM_SV_te_smallflash(), VM_SV_te_spark(), VM_SV_te_spike(), VM_SV_te_spikequad(), VM_SV_te_superspike(), VM_SV_te_superspikequad(), VM_SV_te_tarexplosion(), VM_SV_te_teleport(), VM_SV_te_wizspike(), VM_SV_tracebox(), VM_SV_traceline(), VM_SV_tracetoss(), VM_SV_trailparticles(), VM_SV_walkmove(), VM_tan(), VM_tokenize(), VM_tokenize_console(), VM_tokenizebyseparator(), VM_uncolorstring(), VM_uri_get(), VM_VarString(), VM_vectoangles(), VM_vectorvectors(), VM_vectoyaw(), VM_vlen(), VM_vtos(), VM_wasfreed(), VM_whichpack(), VM_writetofile(), and WriteDest().

◆ OFS_PARM1

#define OFS_PARM1   7

Definition at line 35 of file pr_comp.h.

Referenced by CL_VM_DrawHud(), CL_VM_Event_Sound(), CL_VM_Init(), CL_VM_InputEvent(), CL_VM_TransformView(), CL_VM_UpdateView(), EntityFrameCSQC_WriteFrame(), MP_Draw(), MP_KeyEvent(), SV_CheckContentsTransition(), uri_to_string_callback(), VM_altstr_get(), VM_altstr_ins(), VM_altstr_set(), VM_atan2(), VM_bitshift(), VM_bound(), VM_buf_copy(), VM_buf_create(), VM_buf_cvarlist(), VM_buf_implode(), VM_buf_loadfile(), VM_buf_sort(), VM_buf_writefile(), VM_bufstr_add(), VM_bufstr_find(), VM_bufstr_free(), VM_bufstr_get(), VM_bufstr_set(), VM_cin_open(), VM_cin_setstate(), VM_CL_ambientsound(), VM_CL_checkpvs(), VM_CL_copyentity(), VM_CL_effect(), VM_CL_findbox(), VM_CL_findradius(), VM_CL_frameduration(), VM_CL_frameforname(), VM_CL_GetEntity(), VM_CL_getlight(), VM_CL_getplayerkey(), VM_CL_getstati(), VM_CL_gettagindex(), VM_CL_gettaginfo(), VM_CL_lightstyle(), VM_CL_particle(), VM_CL_pointparticles(), VM_CL_pointsound(), VM_CL_R_AddDynamicLight(), VM_CL_R_PolygonBegin(), VM_CL_R_PolygonVertex(), VM_CL_R_SetView(), VM_CL_setattachment(), VM_CL_setlistener(), VM_CL_setmodel(), VM_CL_setmodelindex(), VM_CL_setorigin(), VM_CL_setsize(), VM_CL_skel_build(), VM_CL_skel_copybones(), VM_CL_skel_find_bone(), VM_CL_skel_get_boneabs(), VM_CL_skel_get_bonename(), VM_CL_skel_get_boneparent(), VM_CL_skel_get_bonerel(), VM_CL_skel_mul_bone(), VM_CL_skel_mul_bones(), VM_CL_skel_set_bone(), VM_CL_sound(), VM_CL_SpawnParticle(), VM_CL_SpawnParticleDelayed(), VM_CL_te_beam(), VM_CL_te_blood(), VM_CL_te_bloodshower(), VM_CL_te_customflash(), VM_CL_te_explosion2(), VM_CL_te_explosionrgb(), VM_CL_te_flamejet(), VM_CL_te_lightning1(), VM_CL_te_lightning2(), VM_CL_te_lightning3(), VM_CL_te_particlecube(), VM_CL_te_particlerain(), VM_CL_te_particlesnow(), VM_CL_te_spark(), VM_CL_tracebox(), VM_CL_traceline(), VM_CL_tracetoss(), VM_CL_trailparticles(), VM_CL_V_CalcRefdef(), VM_CL_walkmove(), VM_drawcharacter(), VM_drawcolorcodedstring(), VM_drawfill(), VM_drawline(), VM_drawpic(), VM_drawrotpic(), VM_drawsetcliparea(), VM_drawstring(), VM_drawsubpic(), VM_find(), VM_findchain(), VM_findchainflags(), VM_findchainfloat(), VM_findflags(), VM_findfloat(), VM_findkeysforcommand(), VM_fopen(), VM_getentityfieldstring(), VM_getkeybind(), VM_getsoundtime(), VM_getsurfaceclippedpoint(), VM_getsurfacenearpoint(), VM_getsurfacenormal(), VM_getsurfacenumpoints(), VM_getsurfacenumtriangles(), VM_getsurfacepoint(), VM_getsurfacepointattribute(), VM_getsurfacetexture(), VM_getsurfacetriangle(), VM_infoadd(), VM_infoget(), VM_loadfont(), VM_localsound(), VM_M_copyentity(), VM_M_getgamedirinfo(), VM_M_getresolution(), VM_M_getserverlistnumber(), VM_M_getserverliststring(), VM_M_setserverlistmasknumber(), VM_M_setserverlistmaskstring(), VM_M_setserverlistsort(), VM_M_WriteDest(), VM_matchpattern(), VM_max(), VM_min(), VM_modulo(), VM_netaddress_resolve(), VM_parseentitydata(), VM_physics_addforce(), VM_physics_addtorque(), VM_physics_enable(), VM_pow(), VM_precache_pic(), VM_putentityfieldstring(), VM_registercvar(), VM_search_begin(), VM_search_getfilename(), VM_setkeybind(), VM_str2chr(), VM_strconv(), VM_stringwidth(), VM_strireplace(), VM_strncasecmp(), VM_strncmp(), VM_strreplace(), VM_strstrofs(), VM_substring(), VM_SV_AddStat(), VM_SV_ambientsound(), VM_SV_checkpvs(), VM_SV_clientcommand(), VM_SV_copyentity(), VM_SV_effect(), VM_SV_findbox(), VM_SV_findradius(), VM_SV_frameduration(), VM_SV_frameforname(), VM_SV_gettagindex(), VM_SV_gettaginfo(), VM_SV_lightstyle(), VM_SV_particle(), VM_SV_pointparticles(), VM_SV_pointsound(), VM_SV_setattachment(), VM_SV_setcolor(), VM_SV_setmodel(), VM_SV_setmodelindex(), VM_SV_setorigin(), VM_SV_setsize(), VM_SV_skel_build(), VM_SV_skel_copybones(), VM_SV_skel_find_bone(), VM_SV_skel_get_boneabs(), VM_SV_skel_get_bonename(), VM_SV_skel_get_boneparent(), VM_SV_skel_get_bonerel(), VM_SV_skel_mul_bone(), VM_SV_skel_mul_bones(), VM_SV_skel_set_bone(), VM_SV_sound(), VM_SV_te_beam(), VM_SV_te_blood(), VM_SV_te_bloodshower(), VM_SV_te_customflash(), VM_SV_te_explosion2(), VM_SV_te_explosionrgb(), VM_SV_te_flamejet(), VM_SV_te_lightning1(), VM_SV_te_lightning2(), VM_SV_te_lightning3(), VM_SV_te_particlecube(), VM_SV_te_particlerain(), VM_SV_te_particlesnow(), VM_SV_te_spark(), VM_SV_tracebox(), VM_SV_traceline(), VM_SV_tracetoss(), VM_SV_trailparticles(), VM_SV_walkmove(), VM_SV_WriteAngle(), VM_SV_WriteByte(), VM_SV_WriteChar(), VM_SV_WriteCoord(), VM_SV_WriteEntity(), VM_SV_WriteLong(), VM_SV_WritePicture(), VM_SV_WriteShort(), VM_SV_WriteString(), VM_SV_WriteUnterminatedString(), VM_uri_get(), VM_vectoangles(), and VM_writetofile().

◆ OFS_PARM2

#define OFS_PARM2   10

Definition at line 36 of file pr_comp.h.

Referenced by CL_VM_Event_Sound(), CL_VM_Init(), CL_VM_InputEvent(), CL_VM_UpdateView(), uri_to_string_callback(), VM_altstr_ins(), VM_altstr_set(), VM_bound(), VM_buf_cvarlist(), VM_buf_sort(), VM_buf_writefile(), VM_bufstr_add(), VM_bufstr_find(), VM_bufstr_set(), VM_CL_ambientsound(), VM_CL_boxparticles(), VM_CL_effect(), VM_CL_findbox(), VM_CL_findradius(), VM_CL_getstati(), VM_CL_particle(), VM_CL_pointparticles(), VM_CL_pointsound(), VM_CL_R_AddDynamicLight(), VM_CL_R_PolygonBegin(), VM_CL_R_PolygonVertex(), VM_CL_R_SetView(), VM_CL_setattachment(), VM_CL_setlistener(), VM_CL_setsize(), VM_CL_skel_build(), VM_CL_skel_copybones(), VM_CL_skel_mul_bone(), VM_CL_skel_mul_bones(), VM_CL_skel_set_bone(), VM_CL_sound(), VM_CL_SpawnParticle(), VM_CL_SpawnParticleDelayed(), VM_CL_te_beam(), VM_CL_te_blood(), VM_CL_te_bloodshower(), VM_CL_te_customflash(), VM_CL_te_explosion2(), VM_CL_te_flamejet(), VM_CL_te_lightning1(), VM_CL_te_lightning2(), VM_CL_te_lightning3(), VM_CL_te_particlecube(), VM_CL_te_particlerain(), VM_CL_te_particlesnow(), VM_CL_te_spark(), VM_CL_tracebox(), VM_CL_traceline(), VM_CL_trailparticles(), VM_CL_walkmove(), VM_drawcharacter(), VM_drawcolorcodedstring(), VM_drawfill(), VM_drawline(), VM_drawpic(), VM_drawrotpic(), VM_drawsetcliparea(), VM_drawstring(), VM_drawsubpic(), VM_find(), VM_findchain(), VM_findchainflags(), VM_findchainfloat(), VM_findflags(), VM_findfloat(), VM_getsurfaceclippedpoint(), VM_getsurfacepoint(), VM_getsurfacepointattribute(), VM_getsurfacetriangle(), VM_loadfont(), VM_localsound(), VM_M_setserverlistmasknumber(), VM_M_setserverlistmaskstring(), VM_M_WriteDest(), VM_matchpattern(), VM_physics_addforce(), VM_putentityfieldstring(), VM_registercvar(), VM_search_begin(), VM_setkeybind(), VM_strconv(), VM_stringwidth(), VM_strireplace(), VM_strncasecmp(), VM_strncmp(), VM_strreplace(), VM_strstrofs(), VM_substring(), VM_SV_AddStat(), VM_SV_ambientsound(), VM_SV_effect(), VM_SV_findbox(), VM_SV_findradius(), VM_SV_particle(), VM_SV_pointparticles(), VM_SV_pointsound(), VM_SV_setattachment(), VM_SV_setsize(), VM_SV_skel_build(), VM_SV_skel_copybones(), VM_SV_skel_mul_bone(), VM_SV_skel_mul_bones(), VM_SV_skel_set_bone(), VM_SV_sound(), VM_SV_te_beam(), VM_SV_te_blood(), VM_SV_te_bloodshower(), VM_SV_te_customflash(), VM_SV_te_explosion2(), VM_SV_te_flamejet(), VM_SV_te_lightning1(), VM_SV_te_lightning2(), VM_SV_te_lightning3(), VM_SV_te_particlecube(), VM_SV_te_particlerain(), VM_SV_te_particlesnow(), VM_SV_te_spark(), VM_SV_tracebox(), VM_SV_traceline(), VM_SV_trailparticles(), VM_SV_walkmove(), VM_SV_WritePicture(), and VM_uri_get().

◆ OFS_PARM3

◆ OFS_PARM4

◆ OFS_PARM5

◆ OFS_PARM6

◆ OFS_PARM7

#define OFS_PARM7   25

Definition at line 41 of file pr_comp.h.

Referenced by CL_VM_Event_Sound(), VM_CL_boxparticles(), VM_drawrotpic(), and VM_drawsubpic().

◆ OFS_RETURN

#define OFS_RETURN   1

Definition at line 33 of file pr_comp.h.

Referenced by CL_VM_TransformView(), CSQC_ReadEntities(), EntityFrameCSQC_WriteFrame(), MP_GetServerListEntryCategory(), PRVM_ConsoleCommand(), SV_MarkWriteEntityStateToClient(), VM_acos(), VM_altstr_count(), VM_altstr_get(), VM_altstr_ins(), VM_altstr_prepare(), VM_altstr_set(), VM_argv(), VM_argv_end_index(), VM_argv_start_index(), VM_asin(), VM_atan(), VM_atan2(), VM_bitshift(), VM_bound(), VM_buf_create(), VM_buf_getsize(), VM_buf_implode(), VM_buf_loadfile(), VM_buf_writefile(), VM_bufstr_add(), VM_bufstr_find(), VM_bufstr_get(), VM_ceil(), VM_checkextension(), VM_chr(), VM_chr2str(), VM_cin_getstate(), VM_cin_open(), VM_CL_checkbottom(), VM_CL_checkpvs(), VM_CL_droptofloor(), VM_CL_frameduration(), VM_CL_frameforname(), VM_CL_GetEntity(), VM_CL_getextresponse(), VM_CL_getinputstate(), VM_CL_getlight(), VM_CL_getmousepos(), VM_CL_getplayerkey(), VM_CL_getstatf(), VM_CL_getstati(), VM_CL_getstats(), VM_CL_gettagindex(), VM_CL_gettaginfo(), VM_CL_InitParticleSpawner(), VM_CL_isdemo(), VM_CL_modelnameforindex(), VM_CL_particleeffectnum(), VM_CL_ParticleThemeSave(), VM_CL_pointcontents(), VM_CL_precache_model(), VM_CL_project(), VM_CL_R_SetView(), VM_CL_ReadAngle(), VM_CL_ReadByte(), VM_CL_ReadChar(), VM_CL_ReadCoord(), VM_CL_ReadFloat(), VM_CL_ReadLong(), VM_CL_ReadPicture(), VM_CL_ReadShort(), VM_CL_ReadString(), VM_CL_serverkey(), VM_CL_skel_build(), VM_CL_skel_create(), VM_CL_skel_find_bone(), VM_CL_skel_get_boneabs(), VM_CL_skel_get_bonename(), VM_CL_skel_get_boneparent(), VM_CL_skel_get_bonerel(), VM_CL_skel_get_numbones(), VM_CL_SpawnParticle(), VM_CL_SpawnParticleDelayed(), VM_CL_unproject(), VM_CL_videoplaying(), VM_CL_walkmove(), VM_clientcount(), VM_clientstate(), VM_cos(), VM_crc16(), VM_cvar(), VM_cvar_defstring(), VM_cvar_description(), VM_cvar_string(), VM_cvar_type(), VM_digest_hex(), VM_drawcharacter(), VM_drawcolorcodedstring(), VM_drawfill(), VM_drawpic(), VM_drawrotpic(), VM_drawstring(), VM_drawsubpic(), VM_entityfieldname(), VM_entityfieldtype(), VM_etof(), VM_etos(), VM_fabs(), VM_fgets(), VM_findfont(), VM_findkeysforcommand(), VM_floor(), VM_fopen(), VM_ftoe(), VM_ftos(), VM_gecko_create(), VM_gecko_get_texture_extent(), VM_gecko_keyevent(), VM_getbindmaps(), VM_getentityfieldstring(), VM_getimagesize(), VM_getkeybind(), VM_getostype(), VM_getsoundtime(), VM_getsurfaceclippedpoint(), VM_getsurfacenearpoint(), VM_getsurfacenormal(), VM_getsurfacenumpoints(), VM_getsurfacenumtriangles(), VM_getsurfacepoint(), VM_getsurfacepointattribute(), VM_getsurfacetexture(), VM_getsurfacetriangle(), VM_gettime(), VM_infoadd(), VM_infoget(), VM_iscachedpic(), VM_isfunction(), VM_isserver(), VM_itof(), VM_keynumtostring(), VM_loadfont(), VM_loadfromfile(), VM_localsound(), VM_log(), VM_M_crypto_getencryptlevel(), VM_M_crypto_getidfp(), VM_M_crypto_getidstatus(), VM_M_crypto_getkeyfp(), VM_M_crypto_getmyidfp(), VM_M_crypto_getmyidstatus(), VM_M_crypto_getmykeyfp(), VM_M_getgamedirinfo(), VM_M_getkeydest(), VM_M_getmousepos(), VM_M_getmousetarget(), VM_M_getresolution(), VM_M_getserverlistindexforkey(), VM_M_getserverlistnumber(), VM_M_getserverliststat(), VM_M_getserverliststring(), VM_matchpattern(), VM_max(), VM_min(), VM_modulo(), VM_netaddress_resolve(), VM_normalize(), VM_nudgeoutofsolid(), VM_numentityfields(), VM_pow(), VM_precache_file(), VM_precache_pic(), VM_precache_sound(), VM_putentityfieldstring(), VM_random(), VM_randomvec(), VM_registercvar(), VM_rint(), VM_search_begin(), VM_search_getfilename(), VM_search_getsize(), VM_setbindmaps(), VM_setkeybind(), VM_sin(), VM_soundlength(), VM_sprintf(), VM_sqrt(), VM_stof(), VM_stov(), VM_str2chr(), VM_strcat(), VM_strconv(), VM_strdecolorize(), VM_strftime(), VM_stringtokeynum(), VM_stringwidth(), VM_strireplace(), VM_strlen(), VM_strlennocol(), VM_strncasecmp(), VM_strncmp(), VM_strpad(), VM_strreplace(), VM_strstrofs(), VM_strtolower(), VM_strtoupper(), VM_strzone(), VM_substring(), VM_SV_aim(), VM_SV_checkbottom(), VM_SV_checkpvs(), VM_SV_clienttype(), VM_SV_droptofloor(), VM_SV_frameduration(), VM_SV_frameforname(), VM_SV_getextresponse(), VM_SV_getlight(), VM_SV_gettagindex(), VM_SV_gettaginfo(), VM_SV_modelnameforindex(), VM_SV_MoveToGoal(), VM_SV_particleeffectnum(), VM_SV_pointcontents(), VM_SV_precache_model(), VM_SV_precache_sound(), VM_SV_serverkey(), VM_SV_skel_build(), VM_SV_skel_create(), VM_SV_skel_find_bone(), VM_SV_skel_get_boneabs(), VM_SV_skel_get_bonename(), VM_SV_skel_get_boneparent(), VM_SV_skel_get_bonerel(), VM_SV_skel_get_numbones(), VM_SV_walkmove(), VM_tan(), VM_tokenize(), VM_tokenize_console(), VM_tokenizebyseparator(), VM_uncolorstring(), VM_uri_escape(), VM_uri_get(), VM_uri_unescape(), VM_vectoangles(), VM_vectoyaw(), VM_vlen(), VM_vtos(), VM_wasfreed(), VM_whichpack(), and while().

◆ PROG_SECONDARYVERSION16

#define PROG_SECONDARYVERSION16   ((('1'<<0)|('F'<<8)|('T'<<16)|('E'<<24))^(('P'<<0)|('R'<<8)|('O'<<16)|('G'<<24)))

Definition at line 520 of file pr_comp.h.

Referenced by PRVM_Prog_Load().

◆ PROG_SECONDARYVERSION32

#define PROG_SECONDARYVERSION32   ((('1'<<0)|('F'<<8)|('T'<<16)|('E'<<24))^(('3'<<0)|('2'<<8)|('B'<<16)|(' '<<24)))

Definition at line 521 of file pr_comp.h.

Referenced by PRVM_Prog_Load().

◆ PROG_VERSION

#define PROG_VERSION   6

Definition at line 476 of file pr_comp.h.

Referenced by PRVM_Prog_Load().

◆ RESERVED_OFS

#define RESERVED_OFS   28

Definition at line 42 of file pr_comp.h.

Typedef Documentation

◆ func_t

typedef unsigned int func_t

Definition at line 26 of file pr_comp.h.

◆ string_t

typedef int string_t

Definition at line 27 of file pr_comp.h.

Enumeration Type Documentation

◆ etype_t

enum etype_t
Enumerator
ev_void 
ev_string 
ev_float 
ev_vector 
ev_entity 
ev_field 
ev_function 
ev_pointer 

Definition at line 29 of file pr_comp.h.

etype_t
Definition pr_comp.h:29
@ ev_function
Definition pr_comp.h:29
@ ev_void
Definition pr_comp.h:29
@ ev_vector
Definition pr_comp.h:29
@ ev_entity
Definition pr_comp.h:29
@ ev_field
Definition pr_comp.h:29
@ ev_string
Definition pr_comp.h:29
@ ev_float
Definition pr_comp.h:29
@ ev_pointer
Definition pr_comp.h:29

◆ opcode_t

enum opcode_t
Enumerator
OP_DONE 
OP_MUL_F 
OP_MUL_V 
OP_MUL_FV 
OP_MUL_VF 
OP_DIV_F 
OP_ADD_F 
OP_ADD_V 
OP_SUB_F 
OP_SUB_V 
OP_EQ_F 
OP_EQ_V 
OP_EQ_S 
OP_EQ_E 
OP_EQ_FNC 
OP_NE_F 
OP_NE_V 
OP_NE_S 
OP_NE_E 
OP_NE_FNC 
OP_LE_F 
OP_GE_F 
OP_LT_F 
OP_GT_F 
OP_LOAD_F 
OP_LOAD_V 
OP_LOAD_S 
OP_LOAD_ENT 
OP_LOAD_FLD 
OP_LOAD_FNC 
OP_ADDRESS 
OP_STORE_F 
OP_STORE_V 
OP_STORE_S 
OP_STORE_ENT 
OP_STORE_FLD 
OP_STORE_FNC 
OP_STOREP_F 
OP_STOREP_V 
OP_STOREP_S 
OP_STOREP_ENT 
OP_STOREP_FLD 
OP_STOREP_FNC 
OP_RETURN 
OP_NOT_F 
OP_NOT_V 
OP_NOT_S 
OP_NOT_ENT 
OP_NOT_FNC 
OP_IF 
OP_IFNOT 
OP_CALL0 
OP_CALL1 
OP_CALL2 
OP_CALL3 
OP_CALL4 
OP_CALL5 
OP_CALL6 
OP_CALL7 
OP_CALL8 
OP_STATE 
OP_GOTO 
OP_AND_F 
OP_OR_F 
OP_BITAND_F 
OP_BITOR_F 
OP_MULSTORE_F 
OP_MULSTORE_VF 
OP_MULSTOREP_F 
OP_MULSTOREP_VF 
OP_DIVSTORE_F 
OP_DIVSTOREP_F 
OP_ADDSTORE_F 
OP_ADDSTORE_V 
OP_ADDSTOREP_F 
OP_ADDSTOREP_V 
OP_SUBSTORE_F 
OP_SUBSTORE_V 
OP_SUBSTOREP_F 
OP_SUBSTOREP_V 
OP_FETCH_GBL_F 
OP_FETCH_GBL_V 
OP_FETCH_GBL_S 
OP_FETCH_GBL_E 
OP_FETCH_GBL_FNC 
OP_CSTATE 
OP_CWSTATE 
OP_THINKTIME 
OP_BITSETSTORE_F 
OP_BITSETSTOREP_F 
OP_BITCLRSTORE_F 
OP_BITCLRSTOREP_F 
OP_RAND0 
OP_RAND1 
OP_RAND2 
OP_RANDV0 
OP_RANDV1 
OP_RANDV2 
OP_SWITCH_F 
OP_SWITCH_V 
OP_SWITCH_S 
OP_SWITCH_E 
OP_SWITCH_FNC 
OP_CASE 
OP_CASERANGE 
OP_CALL1H 
OP_CALL2H 
OP_CALL3H 
OP_CALL4H 
OP_CALL5H 
OP_CALL6H 
OP_CALL7H 
OP_CALL8H 
OP_STORE_I 
OP_STORE_IF 
OP_STORE_FI 
OP_ADD_I 
OP_ADD_FI 
OP_ADD_IF 
OP_SUB_I 
OP_SUB_FI 
OP_SUB_IF 
OP_CONV_ITOF 
OP_CONV_FTOI 
OP_LOADP_ITOF 
OP_LOADP_FTOI 
OP_LOAD_I 
OP_STOREP_I 
OP_STOREP_IF 
OP_STOREP_FI 
OP_BITAND_I 
OP_BITOR_I 
OP_MUL_I 
OP_DIV_I 
OP_EQ_I 
OP_NE_I 
OP_IFNOT_S 
OP_IF_S 
OP_NOT_I 
OP_DIV_VF 
OP_BITXOR_I 
OP_RSHIFT_I 
OP_LSHIFT_I 
OP_GLOBALADDRESS 
OP_ADD_PIW 
OP_LOADA_F 
OP_LOADA_V 
OP_LOADA_S 
OP_LOADA_ENT 
OP_LOADA_FLD 
OP_LOADA_FNC 
OP_LOADA_I 
OP_STORE_P 
OP_LOAD_P 
OP_LOADP_F 
OP_LOADP_V 
OP_LOADP_S 
OP_LOADP_ENT 
OP_LOADP_FLD 
OP_LOADP_FNC 
OP_LOADP_I 
OP_LE_I 
OP_GE_I 
OP_LT_I 
OP_GT_I 
OP_LE_IF 
OP_GE_IF 
OP_LT_IF 
OP_GT_IF 
OP_LE_FI 
OP_GE_FI 
OP_LT_FI 
OP_GT_FI 
OP_EQ_IF 
OP_EQ_FI 
OP_ADD_SF 
OP_SUB_S 
OP_STOREP_C 
OP_LOADP_C 
OP_MUL_IF 
OP_MUL_FI 
OP_MUL_VI 
OP_MUL_IV 
OP_DIV_IF 
OP_DIV_FI 
OP_BITAND_IF 
OP_BITOR_IF 
OP_BITAND_FI 
OP_BITOR_FI 
OP_AND_I 
OP_OR_I 
OP_AND_IF 
OP_OR_IF 
OP_AND_FI 
OP_OR_FI 
OP_NE_IF 
OP_NE_FI 
OP_GSTOREP_I 
OP_GSTOREP_F 
OP_GSTOREP_ENT 
OP_GSTOREP_FLD 
OP_GSTOREP_S 
OP_GSTOREP_FNC 
OP_GSTOREP_V 
OP_GADDRESS 
OP_GLOAD_I 
OP_GLOAD_F 
OP_GLOAD_FLD 
OP_GLOAD_ENT 
OP_GLOAD_S 
OP_GLOAD_FNC 
OP_BOUNDCHECK 
OP_UNUSED 
OP_PUSH 
OP_POP 
OP_SWITCH_I 
OP_GLOAD_V 
OP_IF_F 
OP_IFNOT_F 
OP_STOREF_V 
OP_STOREF_F 
OP_STOREF_S 
OP_STOREF_I 
OP_STOREP_B 
OP_LOADP_B 
OP_LE_U 
OP_LT_U 
OP_DIV_U 
OP_RSHIFT_U 
OP_ADD_I64 
OP_SUB_I64 
OP_MUL_I64 
OP_DIV_I64 
OP_BITAND_I64 
OP_BITOR_I64 
OP_BITXOR_I64 
OP_LSHIFT_I64I 
OP_RSHIFT_I64I 
OP_LE_I64 
OP_LT_I64 
OP_EQ_I64 
OP_NE_I64 
OP_LE_U64 
OP_LT_U64 
OP_DIV_U64 
OP_RSHIFT_U64I 
OP_STORE_I64 
OP_STOREP_I64 
OP_STOREF_I64 
OP_LOAD_I64 
OP_LOADA_I64 
OP_LOADP_I64 
OP_CONV_UI64 
OP_CONV_II64 
OP_CONV_I64I 
OP_CONV_FD 
OP_CONV_DF 
OP_CONV_I64F 
OP_CONV_FI64 
OP_CONV_I64D 
OP_CONV_DI64 
OP_ADD_D 
OP_SUB_D 
OP_MUL_D 
OP_DIV_D 
OP_LE_D 
OP_LT_D 
OP_EQ_D 
OP_NE_D 

Definition at line 45 of file pr_comp.h.

46{
47 OP_DONE,
57
58 OP_EQ_F,
59 OP_EQ_V,
60 OP_EQ_S,
61 OP_EQ_E,
63
64 OP_NE_F,
65 OP_NE_V,
66 OP_NE_S,
67 OP_NE_E,
69
70 OP_LE_F,
71 OP_GE_F,
72 OP_LT_F,
73 OP_GT_F,
74
81
83
90
97
100 OP_NOT_V,
101 OP_NOT_S,
104 OP_IF,
105 OP_IFNOT,
106 OP_CALL0,
107 OP_CALL1,
108 OP_CALL2,
109 OP_CALL3,
110 OP_CALL4,
111 OP_CALL5,
112 OP_CALL6,
113 OP_CALL7,
114 OP_CALL8,
115 OP_STATE,
116 OP_GOTO,
117 OP_AND_F,
118 OP_OR_F,
119
122
123 // TODO: actually support Hexen 2?
124
125 OP_MULSTORE_F, //66 redundant, for h2 compat
126 OP_MULSTORE_VF, //67 redundant, for h2 compat
127 OP_MULSTOREP_F, //68
128 OP_MULSTOREP_VF,//69
129
130 OP_DIVSTORE_F, //70 redundant, for h2 compat
131 OP_DIVSTOREP_F, //71
132
133 OP_ADDSTORE_F, //72 redundant, for h2 compat
134 OP_ADDSTORE_V, //73 redundant, for h2 compat
135 OP_ADDSTOREP_F, //74
136 OP_ADDSTOREP_V, //75
137
138 OP_SUBSTORE_F, //76 redundant, for h2 compat
139 OP_SUBSTORE_V, //77 redundant, for h2 compat
140 OP_SUBSTOREP_F, //78
141 OP_SUBSTOREP_V, //79
142
143 OP_FETCH_GBL_F, //80 has built-in bounds check
144 OP_FETCH_GBL_V, //81 has built-in bounds check
145 OP_FETCH_GBL_S, //82 has built-in bounds check
146 OP_FETCH_GBL_E, //83 has built-in bounds check
147 OP_FETCH_GBL_FNC,//84 has built-in bounds check
148
149 OP_CSTATE, //85
150 OP_CWSTATE, //86
151
152 OP_THINKTIME, //87 shortcut for OPA.nextthink=time+OPB
153
154 OP_BITSETSTORE_F, //88 redundant, for h2 compat
156 OP_BITCLRSTORE_F, //90
158
159 OP_RAND0, //92 OPC = random()
160 OP_RAND1, //93 OPC = random()*OPA
161 OP_RAND2, //94 OPC = random()*(OPB-OPA)+OPA
162 OP_RANDV0, //95 //3d/box versions of the above.
163 OP_RANDV1, //96
164 OP_RANDV2, //97
165
166 OP_SWITCH_F, //98 switchref=OPA; PC += OPB --- the jump allows the jump table (such as it is) to be inserted after the block.
167 OP_SWITCH_V, //99
168 OP_SWITCH_S, //100
169 OP_SWITCH_E, //101
170 OP_SWITCH_FNC, //102
171
172 OP_CASE, //103 if (OPA===switchref) PC += OPB
173 OP_CASERANGE, //104 if (OPA<=switchref&&switchref<=OPB) PC += OPC
174
175 //hexen2 calling convention (-TH2 requires us to remap OP_CALLX to these on load, -TFTE just uses these directly.)
176 OP_CALL1H, //OFS_PARM0=OPB
177 OP_CALL2H, //OFS_PARM0,1=OPB,OPC
178 OP_CALL3H, //no extra args
179 OP_CALL4H,
180 OP_CALL5H,
181 OP_CALL6H,
182 OP_CALL7H,
183 OP_CALL8H,
184
188
189 OP_ADD_I,
190 OP_ADD_FI,
191 OP_ADD_IF,
192
193 OP_SUB_I,
194 OP_SUB_FI,
195 OP_SUB_IF,
196
199
202
203 OP_LOAD_I,
204
208
211
212 OP_MUL_I,
213 OP_DIV_I,
214 OP_EQ_I,
215 OP_NE_I,
216
218
219 OP_IF_S,
220
221 OP_NOT_I,
222
223 OP_DIV_VF,
224
228
231
239
241 OP_LOAD_P,
242
250
251 OP_LE_I,
252 OP_GE_I,
253 OP_LT_I,
254 OP_GT_I,
255
256 OP_LE_IF,
257 OP_GE_IF,
258 OP_LT_IF,
259 OP_GT_IF,
260
261 OP_LE_FI,
262 OP_GE_FI,
263 OP_LT_FI,
264 OP_GT_FI,
265
266 OP_EQ_IF,
267 OP_EQ_FI,
268
269 OP_ADD_SF,
270 OP_SUB_S,
273
274 OP_MUL_IF,
275 OP_MUL_FI,
276 OP_MUL_VI,
277 OP_MUL_IV,
278 OP_DIV_IF,
279 OP_DIV_FI,
284 OP_AND_I,
285 OP_OR_I,
286 OP_AND_IF,
287 OP_OR_IF,
288 OP_AND_FI,
289 OP_OR_FI,
290 OP_NE_IF,
291 OP_NE_FI,
292
308
309 OP_UNUSED, //used to be OP_STOREP_P, which is now emulated with OP_STOREP_I, fteqcc nor fte generated it
310 OP_PUSH, //push 4octets onto the local-stack (which is ALWAYS poped on function return). Returns a pointer.
311 OP_POP, //pop those ones that were pushed (don't over do it). Needs assembler.
313
315
316 OP_IF_F, //compares as an actual float, instead of treating -0 as positive.
318
319 OP_STOREF_V, //3 elements...
320 OP_STOREF_F, //1 fpu element...
321 OP_STOREF_S, //1 string reference
322 OP_STOREF_I, //1 non-string reference/int
323
324 //fteqw r5744+
325 OP_STOREP_B,//((char*)b)[(int)c] = (int)a
326 OP_LOADP_B, //(int)c = *(char*)
327
328 //fteqw r5768+
329 //opcodes for 32bit uints
330 OP_LE_U, //aka GT
331 OP_LT_U, //aka GE
332 OP_DIV_U, //don't need mul+add+sub
333 OP_RSHIFT_U, //lshift is the same for signed+unsigned
334
335 //opcodes for 64bit ints
345 OP_LE_I64, //aka GT
346 OP_LT_I64, //aka GE
347 OP_EQ_I64,
348 OP_NE_I64,
349 //extra opcodes for 64bit uints
350 OP_LE_U64, //aka GT
351 OP_LT_U64, //aka GE
354
355 //general 64bitness
362 //various conversions for our 64bit types (yay type promotion)
363 OP_CONV_UI64, //zero extend
364 OP_CONV_II64, //sign extend
365 OP_CONV_I64I, //truncate
366 OP_CONV_FD, //extension
367 OP_CONV_DF, //truncation
368 OP_CONV_I64F, //logically a promotion (always signed)
369 OP_CONV_FI64, //demotion (always signed)
370 OP_CONV_I64D, //'promotion' (always signed)
371 OP_CONV_DI64, //demotion (always signed)
372
373 //opcodes for doubles.
374 OP_ADD_D,
375 OP_SUB_D,
376 OP_MUL_D,
377 OP_DIV_D,
378 OP_LE_D,
379 OP_LT_D,
380 OP_EQ_D,
381 OP_NE_D,
382}
@ OP_SUB_FI
Definition pr_comp.h:194
@ OP_STOREP_S
Definition pr_comp.h:93
@ OP_NE_E
Definition pr_comp.h:67
@ OP_LT_D
Definition pr_comp.h:379
@ OP_LOADA_ENT
Definition pr_comp.h:235
@ OP_AND_I
Definition pr_comp.h:284
@ OP_LOADA_I64
Definition pr_comp.h:360
@ OP_LE_FI
Definition pr_comp.h:261
@ OP_CONV_DF
Definition pr_comp.h:367
@ OP_CALL7H
Definition pr_comp.h:182
@ OP_SUBSTORE_V
Definition pr_comp.h:139
@ OP_BITSETSTOREP_F
Definition pr_comp.h:155
@ OP_ADD_I
Definition pr_comp.h:189
@ OP_FETCH_GBL_F
Definition pr_comp.h:143
@ OP_GSTOREP_FLD
Definition pr_comp.h:296
@ OP_STORE_V
Definition pr_comp.h:85
@ OP_GSTOREP_FNC
Definition pr_comp.h:298
@ OP_ADDSTORE_F
Definition pr_comp.h:133
@ OP_RANDV2
Definition pr_comp.h:164
@ OP_LOADP_B
Definition pr_comp.h:326
@ OP_RSHIFT_U
Definition pr_comp.h:333
@ OP_SUB_F
Definition pr_comp.h:55
@ OP_MUL_I64
Definition pr_comp.h:338
@ OP_LOAD_ENT
Definition pr_comp.h:78
@ OP_LOAD_F
Definition pr_comp.h:75
@ OP_IFNOT_F
Definition pr_comp.h:317
@ OP_LT_FI
Definition pr_comp.h:263
@ OP_GE_I
Definition pr_comp.h:252
@ OP_DIV_I
Definition pr_comp.h:213
@ OP_LT_I
Definition pr_comp.h:253
@ OP_IF
Definition pr_comp.h:104
@ OP_LOAD_FLD
Definition pr_comp.h:79
@ OP_ADD_SF
Definition pr_comp.h:269
@ OP_MUL_VI
Definition pr_comp.h:276
@ OP_BITOR_F
Definition pr_comp.h:121
@ OP_STOREP_V
Definition pr_comp.h:92
@ OP_GLOAD_ENT
Definition pr_comp.h:304
@ OP_GLOAD_F
Definition pr_comp.h:302
@ OP_BITXOR_I
Definition pr_comp.h:225
@ OP_LOADP_C
Definition pr_comp.h:272
@ OP_EQ_FI
Definition pr_comp.h:267
@ OP_CONV_FD
Definition pr_comp.h:366
@ OP_GSTOREP_I
Definition pr_comp.h:293
@ OP_FETCH_GBL_E
Definition pr_comp.h:146
@ OP_MUL_VF
Definition pr_comp.h:51
@ OP_ADD_IF
Definition pr_comp.h:191
@ OP_GLOAD_FLD
Definition pr_comp.h:303
@ OP_NOT_I
Definition pr_comp.h:221
@ OP_LOADA_I
Definition pr_comp.h:238
@ OP_GSTOREP_F
Definition pr_comp.h:294
@ OP_CALL8
Definition pr_comp.h:114
@ OP_CONV_ITOF
Definition pr_comp.h:197
@ OP_SUB_I64
Definition pr_comp.h:337
@ OP_CALL1H
Definition pr_comp.h:176
@ OP_CWSTATE
Definition pr_comp.h:150
@ OP_DIV_F
Definition pr_comp.h:52
@ OP_GT_F
Definition pr_comp.h:73
@ OP_STOREP_IF
Definition pr_comp.h:206
@ OP_DIV_IF
Definition pr_comp.h:278
@ OP_MUL_I
Definition pr_comp.h:212
@ OP_OR_FI
Definition pr_comp.h:289
@ OP_CALL6
Definition pr_comp.h:112
@ OP_RAND0
Definition pr_comp.h:159
@ OP_SUB_S
Definition pr_comp.h:270
@ OP_ADD_V
Definition pr_comp.h:54
@ OP_STOREF_V
Definition pr_comp.h:319
@ OP_LSHIFT_I64I
Definition pr_comp.h:343
@ OP_STOREP_ENT
Definition pr_comp.h:94
@ OP_RSHIFT_I64I
Definition pr_comp.h:344
@ OP_ADDSTORE_V
Definition pr_comp.h:134
@ OP_STOREP_FNC
Definition pr_comp.h:96
@ OP_AND_IF
Definition pr_comp.h:286
@ OP_CALL5H
Definition pr_comp.h:180
@ OP_CALL5
Definition pr_comp.h:111
@ OP_LOADP_V
Definition pr_comp.h:244
@ OP_NE_FNC
Definition pr_comp.h:68
@ OP_RANDV0
Definition pr_comp.h:162
@ OP_CALL6H
Definition pr_comp.h:181
@ OP_NE_S
Definition pr_comp.h:66
@ OP_BITOR_FI
Definition pr_comp.h:283
@ OP_LT_IF
Definition pr_comp.h:258
@ OP_STORE_P
Definition pr_comp.h:240
@ OP_CONV_FTOI
Definition pr_comp.h:198
@ OP_LOADA_FNC
Definition pr_comp.h:237
@ OP_LOADP_ENT
Definition pr_comp.h:246
@ OP_STORE_I
Definition pr_comp.h:185
@ OP_SUB_V
Definition pr_comp.h:56
@ OP_BITAND_FI
Definition pr_comp.h:282
@ OP_SWITCH_V
Definition pr_comp.h:167
@ OP_MUL_IV
Definition pr_comp.h:277
@ OP_MULSTORE_F
Definition pr_comp.h:125
@ OP_NOT_ENT
Definition pr_comp.h:102
@ OP_CONV_I64F
Definition pr_comp.h:368
@ OP_GSTOREP_S
Definition pr_comp.h:297
@ OP_STOREP_I64
Definition pr_comp.h:357
@ OP_STORE_IF
Definition pr_comp.h:186
@ OP_RSHIFT_U64I
Definition pr_comp.h:353
@ OP_GLOAD_I
Definition pr_comp.h:301
@ OP_OR_IF
Definition pr_comp.h:287
@ OP_STOREF_I64
Definition pr_comp.h:358
@ OP_STOREP_FI
Definition pr_comp.h:207
@ OP_FETCH_GBL_V
Definition pr_comp.h:144
@ OP_LOADP_I64
Definition pr_comp.h:361
@ OP_SUBSTORE_F
Definition pr_comp.h:138
@ OP_STOREP_I
Definition pr_comp.h:205
@ OP_CALL3H
Definition pr_comp.h:178
@ OP_SWITCH_I
Definition pr_comp.h:312
@ OP_DIV_FI
Definition pr_comp.h:279
@ OP_EQ_FNC
Definition pr_comp.h:62
@ OP_DIV_D
Definition pr_comp.h:377
@ OP_STOREP_B
Definition pr_comp.h:325
@ OP_LE_U
Definition pr_comp.h:330
@ OP_STOREP_FLD
Definition pr_comp.h:95
@ OP_SUBSTOREP_V
Definition pr_comp.h:141
@ OP_BITOR_I64
Definition pr_comp.h:341
@ OP_MUL_FV
Definition pr_comp.h:50
@ OP_LOAD_P
Definition pr_comp.h:241
@ OP_STOREF_F
Definition pr_comp.h:320
@ OP_ADD_D
Definition pr_comp.h:374
@ OP_NE_V
Definition pr_comp.h:65
@ OP_STORE_FLD
Definition pr_comp.h:88
@ OP_GLOBALADDRESS
Definition pr_comp.h:229
@ OP_ADD_PIW
Definition pr_comp.h:230
@ OP_CALL1
Definition pr_comp.h:107
@ OP_EQ_I
Definition pr_comp.h:214
@ OP_EQ_V
Definition pr_comp.h:59
@ OP_THINKTIME
Definition pr_comp.h:152
@ OP_STORE_ENT
Definition pr_comp.h:87
@ OP_BITCLRSTORE_F
Definition pr_comp.h:156
@ OP_MUL_IF
Definition pr_comp.h:274
@ OP_LE_D
Definition pr_comp.h:378
@ OP_MUL_D
Definition pr_comp.h:376
@ OP_LOADP_FTOI
Definition pr_comp.h:201
@ OP_LE_U64
Definition pr_comp.h:350
@ OP_GSTOREP_ENT
Definition pr_comp.h:295
@ OP_GT_IF
Definition pr_comp.h:259
@ OP_NE_IF
Definition pr_comp.h:290
@ OP_IF_F
Definition pr_comp.h:316
@ OP_ADD_F
Definition pr_comp.h:53
@ OP_PUSH
Definition pr_comp.h:310
@ OP_CONV_I64D
Definition pr_comp.h:370
@ OP_UNUSED
Definition pr_comp.h:309
@ OP_LT_F
Definition pr_comp.h:72
@ OP_FETCH_GBL_S
Definition pr_comp.h:145
@ OP_RSHIFT_I
Definition pr_comp.h:226
@ OP_LOADP_S
Definition pr_comp.h:245
@ OP_MUL_FI
Definition pr_comp.h:275
@ OP_LOADA_F
Definition pr_comp.h:232
@ OP_GE_F
Definition pr_comp.h:71
@ OP_GE_IF
Definition pr_comp.h:257
@ OP_MULSTOREP_VF
Definition pr_comp.h:128
@ OP_DIV_U
Definition pr_comp.h:332
@ OP_CONV_UI64
Definition pr_comp.h:363
@ OP_LE_I
Definition pr_comp.h:251
@ OP_LE_F
Definition pr_comp.h:70
@ OP_LOADP_I
Definition pr_comp.h:249
@ OP_STOREP_C
Definition pr_comp.h:271
@ OP_DIVSTORE_F
Definition pr_comp.h:130
@ OP_BITAND_F
Definition pr_comp.h:120
@ OP_LE_IF
Definition pr_comp.h:256
@ OP_STOREF_I
Definition pr_comp.h:322
@ OP_CALL8H
Definition pr_comp.h:183
@ OP_ADD_FI
Definition pr_comp.h:190
@ OP_NE_D
Definition pr_comp.h:381
@ OP_GE_FI
Definition pr_comp.h:262
@ OP_IFNOT_S
Definition pr_comp.h:217
@ OP_AND_F
Definition pr_comp.h:117
@ OP_CALL0
Definition pr_comp.h:106
@ OP_LOADP_FLD
Definition pr_comp.h:247
@ OP_NE_F
Definition pr_comp.h:64
@ OP_NOT_F
Definition pr_comp.h:99
@ OP_STORE_S
Definition pr_comp.h:86
@ OP_LOAD_S
Definition pr_comp.h:77
@ OP_OR_I
Definition pr_comp.h:285
@ OP_LT_I64
Definition pr_comp.h:346
@ OP_CALL4
Definition pr_comp.h:110
@ OP_ADDSTOREP_V
Definition pr_comp.h:136
@ OP_EQ_E
Definition pr_comp.h:61
@ OP_DIV_VF
Definition pr_comp.h:223
@ OP_FETCH_GBL_FNC
Definition pr_comp.h:147
@ OP_STOREP_F
Definition pr_comp.h:91
@ OP_DIV_I64
Definition pr_comp.h:339
@ OP_RANDV1
Definition pr_comp.h:163
@ OP_STORE_I64
Definition pr_comp.h:356
@ OP_ADD_I64
Definition pr_comp.h:336
@ OP_SUB_D
Definition pr_comp.h:375
@ OP_SUB_IF
Definition pr_comp.h:195
@ OP_RAND2
Definition pr_comp.h:161
@ OP_CSTATE
Definition pr_comp.h:149
@ OP_BITXOR_I64
Definition pr_comp.h:342
@ OP_LSHIFT_I
Definition pr_comp.h:227
@ OP_CONV_FI64
Definition pr_comp.h:369
@ OP_LOAD_I64
Definition pr_comp.h:359
@ OP_CALL2H
Definition pr_comp.h:177
@ OP_CALL2
Definition pr_comp.h:108
@ OP_GLOAD_V
Definition pr_comp.h:314
@ OP_EQ_D
Definition pr_comp.h:380
@ OP_LE_I64
Definition pr_comp.h:345
@ OP_STORE_FI
Definition pr_comp.h:187
@ OP_MUL_V
Definition pr_comp.h:49
@ OP_CONV_I64I
Definition pr_comp.h:365
@ OP_EQ_I64
Definition pr_comp.h:347
@ OP_GLOAD_S
Definition pr_comp.h:305
@ OP_NE_I64
Definition pr_comp.h:348
@ OP_LOADA_FLD
Definition pr_comp.h:236
@ OP_LT_U64
Definition pr_comp.h:351
@ OP_SUB_I
Definition pr_comp.h:193
@ OP_SWITCH_E
Definition pr_comp.h:169
@ OP_CONV_DI64
Definition pr_comp.h:371
@ OP_ADDSTOREP_F
Definition pr_comp.h:135
@ OP_NE_FI
Definition pr_comp.h:291
@ OP_LOADP_F
Definition pr_comp.h:243
@ OP_STATE
Definition pr_comp.h:115
@ OP_GT_I
Definition pr_comp.h:254
@ OP_LOAD_I
Definition pr_comp.h:203
@ OP_SWITCH_FNC
Definition pr_comp.h:170
@ OP_LOADA_V
Definition pr_comp.h:233
@ OP_LOADA_S
Definition pr_comp.h:234
@ OP_CALL3
Definition pr_comp.h:109
@ OP_BITCLRSTOREP_F
Definition pr_comp.h:157
@ OP_LOADP_ITOF
Definition pr_comp.h:200
@ OP_RETURN
Definition pr_comp.h:98
@ OP_BITAND_I64
Definition pr_comp.h:340
@ OP_OR_F
Definition pr_comp.h:118
@ OP_IF_S
Definition pr_comp.h:219
@ OP_ADDRESS
Definition pr_comp.h:82
@ OP_SUBSTOREP_F
Definition pr_comp.h:140
@ OP_EQ_IF
Definition pr_comp.h:266
@ OP_BITAND_I
Definition pr_comp.h:209
@ OP_EQ_F
Definition pr_comp.h:58
@ OP_SWITCH_S
Definition pr_comp.h:168
@ OP_DONE
Definition pr_comp.h:47
@ OP_NOT_V
Definition pr_comp.h:100
@ OP_DIV_U64
Definition pr_comp.h:352
@ OP_BOUNDCHECK
Definition pr_comp.h:307
@ OP_CONV_II64
Definition pr_comp.h:364
@ OP_AND_FI
Definition pr_comp.h:288
@ OP_GSTOREP_V
Definition pr_comp.h:299
@ OP_EQ_S
Definition pr_comp.h:60
@ OP_BITOR_IF
Definition pr_comp.h:281
@ OP_MULSTOREP_F
Definition pr_comp.h:127
@ OP_STOREF_S
Definition pr_comp.h:321
@ OP_LOAD_FNC
Definition pr_comp.h:80
@ OP_NE_I
Definition pr_comp.h:215
@ OP_GT_FI
Definition pr_comp.h:264
@ OP_NOT_FNC
Definition pr_comp.h:103
@ OP_RAND1
Definition pr_comp.h:160
@ OP_DIVSTOREP_F
Definition pr_comp.h:131
@ OP_LOAD_V
Definition pr_comp.h:76
@ OP_GOTO
Definition pr_comp.h:116
@ OP_GLOAD_FNC
Definition pr_comp.h:306
@ OP_BITAND_IF
Definition pr_comp.h:280
@ OP_CALL7
Definition pr_comp.h:113
@ OP_GADDRESS
Definition pr_comp.h:300
@ OP_STORE_FNC
Definition pr_comp.h:89
@ OP_MULSTORE_VF
Definition pr_comp.h:126
@ OP_CASE
Definition pr_comp.h:172
@ OP_SWITCH_F
Definition pr_comp.h:166
@ OP_BITSETSTORE_F
Definition pr_comp.h:154
@ OP_LT_U
Definition pr_comp.h:331
@ OP_BITOR_I
Definition pr_comp.h:210
@ OP_MUL_F
Definition pr_comp.h:48
@ OP_LOADP_FNC
Definition pr_comp.h:248
@ OP_POP
Definition pr_comp.h:311
@ OP_NOT_S
Definition pr_comp.h:101
@ OP_CALL4H
Definition pr_comp.h:179
@ OP_CASERANGE
Definition pr_comp.h:173
@ OP_STORE_F
Definition pr_comp.h:84
@ OP_IFNOT
Definition pr_comp.h:105