for a few moments
==============
*/
-void SCR_CenterPrint(char *str)
+void SCR_CenterPrint(const char *str)
{
strlcpy (scr_centerstring, str, sizeof (scr_centerstring));
scr_centertime_off = scr_centertime.value;
int restorevm_tempstringsbuf_cursize;
if(!cl.csqc_loaded)
{
- SCR_CenterPrint((char*)msg);
+ SCR_CenterPrint(msg);
return;
}
CSQC_BEGIN
vm_tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
}
else
- SCR_CenterPrint((char*)msg);
+ SCR_CenterPrint(msg);
CSQC_END
}
extern cvar_t r_polygonoffset_submodel_factor;
extern cvar_t r_polygonoffset_submodel_offset;
-void R_Q1BSP_DrawShadowVolume(entity_render_t *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int modelnumsurfaces, const int *modelsurfacelist, const vec3_t lightmins, const vec3_t lightmaxs)
+void R_Q1BSP_DrawShadowVolume(entity_render_t *ent, const vec3_t relativelightorigin, const vec3_t relativelightdirection, float lightradius, int modelnumsurfaces, const int *modelsurfacelist, const vec3_t lightmins, const vec3_t lightmaxs)
{
dp_model_t *model = ent->model;
msurface_t *surface;
msurface_t *surface;
// note: in practice this never actually receives batches), oh well
R_Shadow_RenderMode_Begin();
- R_Shadow_RenderMode_ActiveLight((rtlight_t *)rtlight);
+ R_Shadow_RenderMode_ActiveLight(rtlight);
R_Shadow_RenderMode_Lighting(false, true);
R_Shadow_SetupEntityLight(ent);
for (i = 0;i < numsurfaces;i = j)
#endif
#ifndef GL_PROJECTION
+#include <stddef.h>
+
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
// double precision float in [0,1]
typedef double GLclampd;
// int whose size is the same as a pointer (?)
-typedef size_t GLintptrARB;
+typedef ptrdiff_t GLintptrARB;
// int whose size is the same as a pointer (?)
-typedef size_t GLsizeiptrARB;
+typedef ptrdiff_t GLsizeiptrARB;
#define GL_MODELVIEW 0x1700
#define GL_PROJECTION 0x1701
// 1-byte character string
typedef char GLcharARB;
// 4-byte integer handle to a shader object or program object
-typedef int GLhandleARB;
+typedef unsigned int GLhandleARB;
#endif
extern void (GLAPIENTRY *qglDeleteObjectARB)(GLhandleARB obj);
extern GLhandleARB (GLAPIENTRY *qglGetHandleARB)(GLenum pname);
PRVM_ED_WriteGlobals (f);
for (i=0 ; i<prog->num_edicts ; i++)
+ {
+ Con_Printf("edict %d...\n", i);
PRVM_ED_Write (f, PRVM_EDICT_NUM(i));
+ }
SV_VM_End();
// compile a shadow volume for the model based on light source
void(*CompileShadowVolume)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist);
// draw a shadow volume for the model based on light source
- void(*DrawShadowVolume)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist, const vec3_t lightmins, const vec3_t lightmaxs);
+ void(*DrawShadowVolume)(struct entity_render_s *ent, const vec3_t relativelightorigin, const vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist, const vec3_t lightmins, const vec3_t lightmaxs);
// draw the lighting on a model (through stencil)
void(*DrawLight)(struct entity_render_s *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs);
// trace a box against this model
void R_Q1BSP_DrawDebug(struct entity_render_s *ent);
void R_Q1BSP_GetLightInfo(struct entity_render_s *ent, vec3_t relativelightorigin, float lightradius, vec3_t outmins, vec3_t outmaxs, int *outleaflist, unsigned char *outleafpvs, int *outnumleafspointer, int *outsurfacelist, unsigned char *outsurfacepvs, int *outnumsurfacespointer, unsigned char *outshadowtrispvs, unsigned char *outlighttrispvs);
void R_Q1BSP_CompileShadowVolume(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist);
-void R_Q1BSP_DrawShadowVolume(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist, const vec3_t lightmins, const vec3_t lightmaxs);
+void R_Q1BSP_DrawShadowVolume(struct entity_render_s *ent, const vec3_t relativelightorigin, const vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist, const vec3_t lightmins, const vec3_t lightmaxs);
void R_Q1BSP_DrawLight(struct entity_render_s *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs);
// alias models
int dmg_origin; // csqc
int sb_showscores; // csqc
int drawfont; // csqc / menu
+ int require_spawnfunc_prefix; // ssqc
}
prvm_prog_globaloffsets_t;
r_shadow_lightingrendermode = R_SHADOW_RENDERMODE_LIGHT_VERTEX;
}
-void R_Shadow_RenderMode_ActiveLight(rtlight_t *rtlight)
+void R_Shadow_RenderMode_ActiveLight(const rtlight_t *rtlight)
{
rsurface.rtlight = rtlight;
}
void R_Shadow_MarkVolumeFromBox(int firsttriangle, int numtris, const float *invertex3f, const int *elements, const vec3_t projectorigin, const vec3_t projectdirection, const vec3_t lightmins, const vec3_t lightmaxs, const vec3_t surfacemins, const vec3_t surfacemaxs);
void R_Shadow_RenderLighting(int firstvertex, int numvertices, int firsttriangle, int numtriangles, const int *element3i, const unsigned short *element3s, int element3i_bufferobject, int element3s_bufferobject);
void R_Shadow_RenderMode_Begin(void);
-void R_Shadow_RenderMode_ActiveLight(rtlight_t *rtlight);
+void R_Shadow_RenderMode_ActiveLight(const rtlight_t *rtlight);
void R_Shadow_RenderMode_Reset(void);
void R_Shadow_RenderMode_StencilShadowVolumes(qboolean clearstencil);
void R_Shadow_RenderMode_Lighting(qboolean stenciltest, qboolean transparent);
// rtlight rendering
// light currently being rendered
- rtlight_t *rtlight;
+ const rtlight_t *rtlight;
// current light's cull box (copied out of an rtlight or calculated by GetLightInfo)
vec3_t rtlight_cullmins;
vec3_t rtlight_cullmaxs;
void CL_Screen_Init (void);
void CL_UpdateScreen (void);
-void SCR_CenterPrint(char *str);
+void SCR_CenterPrint(const char *str);
void SCR_BeginLoadingPlaque (void);