"DP_QC_CMD "
"DP_QC_STRREPLACE "
"DP_FONT_VARIABLEWIDTH "
-// FIXME: rename this extension maybe? [12/5/2007 Black]
"DP_GECKO_SUPPORT "
-"DP_QC_RENDER_SCENE"
+"DP_QC_RENDER_SCENE "
"DP_QC_STRINGBUFFERS "
"DP_QC_CRC16 "
"FTE_STRINGS "
VM_CL_R_SetView, // #303 float(float property, ...) setproperty (DP_QC_RENDER_SCENE)
VM_CL_R_RenderScene, // #304 void() renderscene (DP_QC_RENDER_SCENE)
VM_CL_R_AddDynamicLight, // #305 void(vector org, float radius, vector lightcolours) adddynamiclight (DP_QC_RENDER_SCENE)
-VM_CL_R_PolygonBegin, // #306 void(string texturename, float flag[, float is2d, float lines]) R_BeginPolygon
-VM_CL_R_PolygonVertex, // #307 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex
+VM_CL_R_PolygonBegin, // #306 void(string texturename, float flag[, float is2d, float lines]) R_BeginPolygon (DP_QC_RENDER_SCENE)
+VM_CL_R_PolygonVertex, // #307 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex (DP_QC_RENDER_SCENE)
VM_CL_R_PolygonEnd, // #308 void() R_EndPolygon
NULL/*VM_CL_R_LoadWorldModel*/, // #309 void(string modelname) R_LoadWorldModel
-NULL, // #310
-NULL, // #311
-NULL, // #312
+// TODO: rearrange and merge all builtin lists and share as many extensions as possible between all VM instances [1/27/2008 Andreas]
+VM_CL_setattachment, // #310 void(entity e, entity tagentity, string tagname) setattachment (DP_GFX_QUAKE3MODELTAGS) (DP_QC_RENDER_SCENE)
+VM_CL_gettagindex, // #311 float(entity ent, string tagname) gettagindex (DP_QC_GETTAGINFO) (DP_QC_RENDER_SCENE)
+VM_CL_gettaginfo, // #312 vector(entity ent, float tagindex) gettaginfo (DP_QC_GETTAGINFO) (DP_QC_RENDER_SCENE)
NULL, // #313
NULL, // #314
NULL, // #315
const int vm_m_numbuiltins = sizeof(vm_m_builtins) / sizeof(prvm_builtin_t);
-r_refdef_scene_t menu_scene;
-
void VM_M_Cmd_Init(void)
{
+ r_refdef_scene_t *scene;
+
VM_Cmd_Init();
VM_Polygons_Reset();
- memset (&menu_scene, 0, sizeof (menu_scene));
+ scene = R_GetScenePointer( RST_MENU );
- menu_scene.maxtempentities = 128;
- menu_scene.tempentities = (entity_render_t*) Mem_Alloc(prog->progs_mempool, sizeof(entity_render_t) * menu_scene.maxtempentities);
+ memset (scene, 0, sizeof (*scene));
- menu_scene.maxentities = MAX_EDICTS + 256 + 512;
- menu_scene.entities = (entity_render_t **)Mem_Alloc(cls.permanentmempool, sizeof(entity_render_t *) * menu_scene.maxentities);
+ scene->maxtempentities = 128;
+ scene->tempentities = (entity_render_t*) Mem_Alloc(prog->progs_mempool, sizeof(entity_render_t) * scene->maxtempentities);
+
+ scene->maxentities = MAX_EDICTS + 256 + 512;
+ scene->entities = (entity_render_t **)Mem_Alloc(prog->progs_mempool, sizeof(entity_render_t *) * scene->maxentities);
}
void VM_M_Cmd_Reset(void)
{
+ // note: the menu's render entities are automatically freed when the prog's pool is freed
+
//VM_Cmd_Init();
VM_Cmd_Reset();
VM_Polygons_Reset();