From 0ad239ca6a834c3e03c8dd4cebc885a631738de5 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 11 Feb 2006 14:51:36 +0000 Subject: [PATCH] Fixed all warnings in MDebug. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1948 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cd_win.c | 1 + engine/client/cl_cg.c | 6 +----- engine/client/cl_demo.c | 6 ++++-- engine/client/cl_main.c | 2 ++ engine/client/cl_master.h | 1 + engine/client/cl_ui.c | 13 +++++++------ engine/client/client.h | 40 ++++++++++++++++++++++++++++++++++---- engine/client/clq3_parse.c | 1 + engine/client/clq3defs.h | 6 ++++++ engine/client/keys.h | 2 ++ engine/client/menu.h | 3 +++ engine/client/pr_csqc.c | 13 +++++++++++-- engine/client/quakedef.h | 2 +- engine/client/r_part.c | 1 - engine/client/render.h | 1 + engine/client/snd_mem.c | 2 -- engine/client/sound.h | 3 +++ engine/client/view.c | 3 +++ engine/common/common.h | 5 +++++ engine/common/console.h | 2 ++ engine/common/mathlib.h | 1 + engine/common/net.h | 4 ++++ engine/common/plugin.c | 2 +- engine/common/q1bsp.c | 4 ++-- engine/common/vm.h | 17 ++++++++++++++++ engine/common/zone.h | 1 + engine/gl/gl_model.h | 1 + engine/gl/gl_rmain.c | 1 + engine/gl/gl_screen.c | 3 ++- engine/gl/glquake.h | 4 ++++ engine/gl/shader.h | 2 ++ engine/qclib/progslib.h | 2 ++ engine/server/server.h | 1 + engine/server/sv_user.c | 2 +- engine/server/svq3_game.c | 8 +++++--- engine/sw/d_iface.h | 1 + engine/sw/d_local.h | 3 +++ engine/sw/r_local.h | 6 ++++++ 38 files changed, 145 insertions(+), 31 deletions(-) diff --git a/engine/client/cd_win.c b/engine/client/cd_win.c index fb96c688a..72b622716 100644 --- a/engine/client/cd_win.c +++ b/engine/client/cd_win.c @@ -108,6 +108,7 @@ void CDAudio_Play(int track, qboolean looping) if (!enabled) { #ifndef NOMEDIA + void Media_FakeTrack(int i, qboolean loop); Media_FakeTrack(track, looping); #endif return; diff --git a/engine/client/cl_cg.c b/engine/client/cl_cg.c index eaf862934..c26405aa0 100644 --- a/engine/client/cl_cg.c +++ b/engine/client/cl_cg.c @@ -15,10 +15,6 @@ typedef float m3by3_t[3][3]; #include "clq3defs.h" //cl_ui.c -int VMUI_fopen (char *name, int *handle, int fmode, int owner); -void VMUI_FRead (char *dest, int quantity, int fnum, int owner); //consistancy is in the eye of the beholder.. :) -void VMUI_fclose (int fnum, int owner); -void VMUI_fcloseall (int owner); typedef struct q3refEntity_s q3refEntity_t; void VQ3_AddEntity(const q3refEntity_t *q3); typedef struct q3refdef_s q3refdef_t; @@ -552,7 +548,7 @@ static long CG_SystemCallsEx(void *offset, unsigned int mask, int fn, const long case CG_FS_READ: //fread VALIDATEPOINTER(arg[1], 4); - VMUI_FRead(VM_POINTER(arg[0]), VM_LONG(arg[1]), VM_LONG(arg[2]), 1); + VM_LONG(ret) = VMUI_FRead(VM_POINTER(arg[0]), VM_LONG(arg[1]), VM_LONG(arg[2]), 1); break; case CG_FS_WRITE: //fwrite break; diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index fad384e76..9e2423c9b 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -1279,15 +1279,17 @@ void CL_FinishTimeDemo (void) { int frames; float time; - + cls.timedemo = false; - + // the first frame didn't count frames = (host_framecount - cls.td_startframe) - 1; time = Sys_DoubleTime() - cls.td_starttime; if (!time) time = 1; Con_Printf ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time); + + Con_Printf("NOTE: times currently depend on load times\n"); } /* diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index a3d1b4c71..354c7be3d 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "winquake.h" #include #include "netinc.h" +#include "cl_master.h" +#include "cl_ignore.h" #if defined(_WIN32) && !defined(MINGW) && defined(RGLQUAKE) #define WINAVI diff --git a/engine/client/cl_master.h b/engine/client/cl_master.h index 7cea05bc4..4747fb6f8 100644 --- a/engine/client/cl_master.h +++ b/engine/client/cl_master.h @@ -132,6 +132,7 @@ extern serverinfo_t *firstserver; extern master_t *master; extern player_t *mplayers; +void Master_SetupSockets(void); void CL_QueryServers(void); int NET_CheckPollSockets(void); void MasterInfo_Request(master_t *mast, qboolean evenifwedonthavethefiles); diff --git a/engine/client/cl_ui.c b/engine/client/cl_ui.c index ec39a35f4..8db262512 100644 --- a/engine/client/cl_ui.c +++ b/engine/client/cl_ui.c @@ -2,6 +2,7 @@ #ifdef VM_UI #include "ui_public.h" #include "cl_master.h" +#include "shader.h" int keycatcher; @@ -320,24 +321,24 @@ void VMUI_fclose (int fnum, int owner) vmui_fopen_files[fnum].data = NULL; } -void VMUI_FRead (char *dest, int quantity, int fnum, int owner) +int VMUI_FRead (char *dest, int quantity, int fnum, int owner) { fnum--; if (fnum < 0 || fnum >= MAX_VMUI_FILES) - return; //out of range + return 0; //out of range if (vmui_fopen_files[fnum].owner != owner) - return; //cgs? + return 0; //cgs? if (!vmui_fopen_files[fnum].data) - return; //not open + return 0; //not open if (quantity > vmui_fopen_files[fnum].len - vmui_fopen_files[fnum].ofs) quantity = vmui_fopen_files[fnum].len - vmui_fopen_files[fnum].ofs; memcpy(dest, vmui_fopen_files[fnum].data + vmui_fopen_files[fnum].ofs, quantity); vmui_fopen_files[fnum].ofs += quantity; - + return quantity; } /* void VMUI_fputs (progfuncs_t *prinst, struct globalvars_s *pr_globals) @@ -880,7 +881,7 @@ long UI_SystemCallsEx(void *offset, unsigned int mask, int fn, const long *arg) if ((int)arg[0] + VM_LONG(arg[1]) >= mask || VM_POINTER(arg[0]) < offset) break; //out of bounds. - VMUI_FRead(VM_POINTER(arg[0]), VM_LONG(arg[1]), VM_LONG(arg[2]), 0); + VM_LONG(ret) = VMUI_FRead(VM_POINTER(arg[0]), VM_LONG(arg[1]), VM_LONG(arg[2]), 0); break; case UI_FS_WRITE: //fwrite break; diff --git a/engine/client/client.h b/engine/client/client.h index 9db6fc97b..feac370f1 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -656,8 +656,10 @@ void CL_EstablishConnection (char *host); void CL_Disconnect (void); void CL_Disconnect_f (void); +void CL_Reconnect_f (void); void CL_NextDemo (void); qboolean CL_DemoBehind(void); +void CL_SaveInfo(vfsfile_t *f); void CL_BeginServerConnect(void); void CLNQ_BeginServerConnect(void); @@ -669,6 +671,8 @@ extern entity_t cl_visedicts_list[2][MAX_VISEDICTS]; extern char emodel_name[], pmodel_name[], prespawn_name[], modellist_name[], soundlist_name[]; +qboolean TraceLineN (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal); + // // cl_input // @@ -713,9 +717,15 @@ char *Key_KeynumToString (int keynum); int Key_StringToKeynum (char *str, int *modifier); char *Key_GetBinding(int keynum); +void CL_UseIndepPhysics(qboolean allow); + +void CL_FlushClientCommands(void); void VARGS CL_SendClientCommand(qboolean reliable, char *format, ...); +int CL_RemoveClientCommands(char *command); void CL_AllowIndependantSendCmd(qboolean allow); +void CL_DrawPrydonCursor(void); + // // cl_demo.c // @@ -728,6 +738,7 @@ void CL_Record_f (void); void CL_ReRecord_f (void); void CL_PlayDemo_f (void); void CL_DemoJump_f(void); +void CL_ProgressDemoTime(void); void CL_TimeDemo_f (void); // @@ -744,12 +755,14 @@ void CLQ2_ParseServerMessage (void); #endif void CL_NewTranslation (int slot); qboolean CL_CheckOrEnqueDownloadFile (char *filename, char *localname); +qboolean CL_EnqueDownload(char *filename, char *localname, qboolean verbose, qboolean ignorefailedlist); qboolean CL_IsUploading(void); void CL_NextUpload(void); void CL_StartUpload (qbyte *data, int size); void CL_StopUpload(void); void CL_RequestNextDownload (void); +void CL_SendDownloadReq(sizebuf_t *msg); // // view.c @@ -764,6 +777,11 @@ void V_ParseDamage (int pnum); void V_SetContentsColor (int contents); void GLV_CalcBlend (void); +//used directly by csqc +void V_CalcRefdef (int pnum); +void CalcGunAngle (int pnum); +void DropPunchAngle (int pnum); + // // cl_tent @@ -803,6 +821,7 @@ void CL_LinkProjectiles (void); // #ifdef Q3CLIENT void VARGS CLQ3_SendClientCommand(const char *fmt, ...); +void CLQ3_SendAuthPacket(netadr_t gameserver); void CLQ3_SendConnectPacket(netadr_t to); void CLQ3_SendCmd(usercmd_t *cmd); qboolean CLQ3_Netchan_Process(void); @@ -821,6 +840,7 @@ char *CG_GetConfigString(int num); // #ifdef CSQC_DAT qboolean CSQC_Init (unsigned int checksum); +void CSQC_RegisterCvarsAndThings(void); qboolean CSQC_DrawView(void); void CSQC_Shutdown(void); qboolean CSQC_StuffCmd(char *cmd); @@ -829,6 +849,7 @@ qboolean CSQC_ConsoleCommand(char *cmd); qboolean CSQC_KeyPress(int key, qboolean down); int CSQC_StartSound(int entnum, int channel, char *soundname, vec3_t pos, float vol, float attenuation); void CSQC_ParseEntities(void); +qboolean CSQC_SettingListener(void); #endif // @@ -840,6 +861,7 @@ void CL_PredictUsercmd (int pnum, player_state_t *from, player_state_t *to, user #ifdef Q2CLIENT void CLQ2_CheckPredictionError (void); #endif +void CL_CalcClientTime(void); // // cl_cam.c @@ -856,8 +878,11 @@ void Cam_Track(int pnum, usercmd_t *cmd); int Cam_TrackNum(int pnum); void Cam_FinishMove(int pnum, usercmd_t *cmd); void Cam_Reset(void); +void Cam_Lock(int pnum, int playernum); void CL_InitCam(void); +void vectoangles(vec3_t vec, vec3_t ang); + // //zqtp.c // @@ -881,6 +906,15 @@ qboolean TP_FilterMessage (char *s); qboolean TP_CheckSoundTrigger (char *str); void TP_SearchForMsgTriggers (char *s, int level); +void TP_ExecTrigger (char *s); +qboolean TP_SuppressMessage(char *buf); + +void TP_Init(void); +void TP_CheckVars(void); +void TP_CheckPickupSound(char *s, vec3_t org); +void TP_ParsePlayerInfo(player_state_t *oldstate, player_state_t *state, player_info_t *info); +void CL_Say (qboolean team, char *extra); + // // skin.c // @@ -901,6 +935,7 @@ typedef struct char filler[58]; // unsigned char data; // unbounded } pcx_t; +qbyte *ReadPCXData(qbyte *buf, int length, int width, int height, qbyte *result); char *Skin_FindName (player_info_t *sc); @@ -988,9 +1023,6 @@ qboolean CIN_RunCinematic (void); void MVD_Interpolate(void); -void TP_Init(void); -void TP_CheckVars(void); -void TP_CheckPickupSound(char *s, vec3_t org); - void Stats_NewMap(void); void Stats_ParsePrintLine(char *line); + diff --git a/engine/client/clq3_parse.c b/engine/client/clq3_parse.c index 98b48a922..f6ec2b831 100644 --- a/engine/client/clq3_parse.c +++ b/engine/client/clq3_parse.c @@ -1,4 +1,5 @@ #include "quakedef.h" +#include "shader.h" //urm, yeah, this is more than just parse. diff --git a/engine/client/clq3defs.h b/engine/client/clq3defs.h index 17a3c09ad..1950239d1 100644 --- a/engine/client/clq3defs.h +++ b/engine/client/clq3defs.h @@ -311,6 +311,7 @@ typedef struct { float glyphScale; char name[MAX_QPATH]; } fontInfo_t; +void UI_RegisterFont(char *fontName, int pointSize, fontInfo_t *font); void Netchan_TransmitNextFragment( netchan_t *chan ); @@ -318,7 +319,12 @@ void Netchan_TransmitQ3( netchan_t *chan, int length, const qbyte *data ); qboolean Netchan_ProcessQ3 (netchan_t *chan); qboolean MSG_Q3_ReadDeltaEntity( const q3entityState_t *from, q3entityState_t *to, int number ); +void MSGQ3_WriteDeltaEntity(sizebuf_t *msg, const q3entityState_t *from, const q3entityState_t *to, qboolean force); void MSG_Q3_ReadDeltaPlayerstate( const q3playerState_t *from, q3playerState_t *to ); +void MSGQ3_WriteDeltaPlayerstate(sizebuf_t *msg, const q3playerState_t *from, const q3playerState_t *to); + +void MSG_Q3_ReadDeltaUsercmd(int key, const usercmd_t *from, usercmd_t *to); +void MSG_WriteBits(sizebuf_t *msg, int value, int bits); #endif diff --git a/engine/client/keys.h b/engine/client/keys.h index ec3fd18e2..e2fa42f97 100644 --- a/engine/client/keys.h +++ b/engine/client/keys.h @@ -174,3 +174,5 @@ void Key_WriteBindings (vfsfile_t *f); void Key_SetBinding (int keynum, int modifier, char *binding, int cmdlevel); void Key_ClearStates (void); +void Key_ConsoleDrawSelectionBox(void); + diff --git a/engine/client/menu.h b/engine/client/menu.h index 83f580193..d3a841e6a 100644 --- a/engine/client/menu.h +++ b/engine/client/menu.h @@ -273,6 +273,8 @@ void M_HideMenu (menu_t *menu); void M_RemoveMenu (menu_t *menu); void M_RemoveAllMenus (void); +void DrawCursor(void); + void M_Complex_Key(int key); void M_Complex_Draw(void); void M_Script_Init(void); @@ -359,6 +361,7 @@ void MP_Shutdown (void); void MP_Init (void); qboolean MP_Toggle(void); void MP_Draw(void); +void MP_RegisterCvarsAndCmds(void); void MP_Keydown(int key); void MP_Keyup(int key); diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index 03f208759..1ae730b8d 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -4,6 +4,7 @@ #ifdef RGLQUAKE #include "glquake.h" //evil to include this +#include "shader.h" #endif #include "pr_common.h" @@ -732,7 +733,10 @@ static qboolean CopyCSQCEdictToEntity(csqcedict_t *in, entity_t *out) out->skinnum = in->v->skin; out->fatness = in->v->fatness; #ifdef Q3SHADERS - out->forcedshader = *(struct shader_s**)&in->v->forceshader; + if (in->v->forceshader > 0) + out->forcedshader = r_shaders + ((int)in->v->forceshader-1); + else + out->forcedshader = NULL; #endif out->keynum = -1; @@ -2688,7 +2692,12 @@ static void PF_shaderforname (progfuncs_t *prinst, struct globalvars_s *pr_globa { char *str = PF_VarString(prinst, 0, pr_globals); #ifdef Q3SHADERS - G_INT(OFS_RETURN) = R_RegisterSkin(str); + shader_t *shad; + shad = R_RegisterSkin(str); + if (shad) + G_INT(OFS_RETURN) = shad-r_shaders + 1; + else + G_INT(OFS_RETURN) = 0; #else G_INT(OFS_RETURN) = 0; #endif diff --git a/engine/client/quakedef.h b/engine/client/quakedef.h index ed77988b3..b5f7062ab 100644 --- a/engine/client/quakedef.h +++ b/engine/client/quakedef.h @@ -76,7 +76,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma warning(3:4674) // dtor of thrown object is inaccessible #pragma warning(3:4705) // statement has no effect (example: a+1;) -#pragma warning(4:4013) // function undefined, assuming extern returning int +#pragma warning(3:4013) // function undefined, assuming extern returning int #pragma warning( 4 : 4267) //truncation from const double to float diff --git a/engine/client/r_part.c b/engine/client/r_part.c index 9a3b58316..87ba1d1ff 100644 --- a/engine/client/r_part.c +++ b/engine/client/r_part.c @@ -84,7 +84,6 @@ static double cost[7] = {1.000000, 0.623490, -0.222521, -0.900969, -0.900969, -0 #define crand() (rand()%32767/16383.5f-1) void D_DrawParticleTrans (particle_t *pparticle, int blendmode); -void D_DrawSparkTrans (particle_t *pparticle, vec3_t src, vec3_t dest, int blendmode); void P_ReadPointFile_f (void); void P_ExportBuiltinSet_f(void); diff --git a/engine/client/render.h b/engine/client/render.h index d632642d3..25fe01211 100644 --- a/engine/client/render.h +++ b/engine/client/render.h @@ -314,6 +314,7 @@ qboolean Media_ShowFilm(void); void Media_CaptureDemoEnd(void); void Media_RecordAudioFrame (short *sample_buffer, int samples); void Media_RecordFrame (void); +qboolean Media_PausedDemo (void); void R_SetRenderer(int wanted); void RQ_Init(void); diff --git a/engine/client/snd_mem.c b/engine/client/snd_mem.c index 720a13914..8a8e32a71 100644 --- a/engine/client/snd_mem.c +++ b/engine/client/snd_mem.c @@ -148,8 +148,6 @@ void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, qbyte *data) //============================================================================= -typedef sfxcache_t *(*S_LoadSound_t) (sfx_t *s, qbyte *data, int datalen, int sndspeed); - sfxcache_t *S_LoadWavSound (sfx_t *s, qbyte *data, int datalen, int sndspeed) { wavinfo_t info; diff --git a/engine/client/sound.h b/engine/client/sound.h index 8a2ae8825..c5457e450 100644 --- a/engine/client/sound.h +++ b/engine/client/sound.h @@ -188,6 +188,9 @@ extern int snd_blocked; void S_LocalSound (char *s); sfxcache_t *S_LoadSound (sfx_t *s); +typedef sfxcache_t *(*S_LoadSound_t) (sfx_t *s, qbyte *data, int datalen, int sndspeed); +qboolean S_RegisterSoundInputPlugin(S_LoadSound_t loadfnc); //called to register additional sound input plugins + wavinfo_t GetWavinfo (char *name, qbyte *wav, int wavlength); void SND_InitScaletable (void); diff --git a/engine/client/view.c b/engine/client/view.c index 67575d0cc..f674161f6 100644 --- a/engine/client/view.c +++ b/engine/client/view.c @@ -1317,7 +1317,10 @@ void R_DrawNameTags(void) #ifdef RGLQUAKE if (qrenderer == QR_OPENGL) + { + void GL_Set2D (void); GL_Set2D(); + } #endif frame = &cl.frames[cl.parsecount&UPDATE_MASK]; diff --git a/engine/common/common.h b/engine/common/common.h index 5f5134469..67ff5e2f0 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -325,9 +325,14 @@ char *VFS_GETS(vfsfile_t *vf, char *buffer, int buflen); void FS_FlushFSHash(void); void FS_CreatePath(char *pname, int relativeto); int FS_Rename(char *oldf, char *newf, int relativeto); //0 on success, non-0 on error +int FS_Rename2(char *oldf, char *newf, int oldrelativeto, int newrelativeto); int FS_Remove(char *fname, int relativeto); //0 on success, non-0 on error +qboolean FS_WriteFile (char *filename, void *data, int len, int relativeto); vfsfile_t *FS_OpenVFS(char *filename, char *mode, int relativeto); vfsfile_t *FS_OpenTemp(void); +void FS_UnloadPackFiles(void); +void FS_ReloadPackFiles(void); +char *FS_GenerateClientPacksList(char *buffer, int maxlen, int basechecksum); enum { FS_GAME, FS_BASE, diff --git a/engine/common/console.h b/engine/common/console.h index 8a1a5198c..397df189b 100644 --- a/engine/common/console.h +++ b/engine/common/console.h @@ -134,6 +134,8 @@ void Con_ExecuteLine(console_t *con, char *line); //takes normal console command void Con_CycleConsole (void); qboolean Con_IsActive (console_t *con); void Con_Destroy (console_t *con); +void Con_SetActive (console_t *con); +qboolean Con_NameForNum(int num, char *buffer, int buffersize); console_t *Con_FindConsole(char *name); console_t *Con_Create(char *name); void Con_SetVisible (console_t *con); diff --git a/engine/common/mathlib.h b/engine/common/mathlib.h index 0f4e9b871..976075749 100644 --- a/engine/common/mathlib.h +++ b/engine/common/mathlib.h @@ -72,6 +72,7 @@ float ColorNormalize (vec3_t in, vec3_t out); void MakeNormalVectors (vec3_t forward, vec3_t right, vec3_t up); void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); +void R_ConcatRotationsPad (float in1[3][4], float in2[3][4], float out[3][4]); void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); void FloorDivMod (double numer, double denom, int *quotient, diff --git a/engine/common/net.h b/engine/common/net.h index 950e1581c..0a3ce1bee 100644 --- a/engine/common/net.h +++ b/engine/common/net.h @@ -64,6 +64,8 @@ extern qbyte net_message_buffer[MAX_UDP_PACKET]; extern cvar_t hostname; +int TCP_OpenStream (netadr_t remoteaddr); //makes things easier + void NET_Init (void); void NET_InitClient (void); void NET_InitServer (void); @@ -165,6 +167,8 @@ qboolean NQNetChan_Process(netchan_t *chan); #ifdef HUFFNETWORK int Huff_PreferedCompressionCRC (void); +void Huff_EncryptPacket(sizebuf_t *msg, int offset); +void Huff_DecryptPacket(sizebuf_t *msg, int offset); qboolean Huff_CompressionCRC(int crc); void Huff_CompressPacket(sizebuf_t *msg, int offset); void Huff_DecompressPacket(sizebuf_t *msg, int offset); diff --git a/engine/common/plugin.c b/engine/common/plugin.c index e9ab3051e..2098054f5 100644 --- a/engine/common/plugin.c +++ b/engine/common/plugin.c @@ -453,7 +453,7 @@ int VARGS Plug_ExportNative(void *offset, unsigned int mask, const long *arg) #ifndef SERVERONLY else if (!strcmp(name, "S_LoadSound")) //a hook for loading extra types of sound (wav, mp3, ogg, midi, whatever you choose to support) { - S_RegisterSoundInputPlugin(func); + S_RegisterSoundInputPlugin((void*)func); currentplug->blockcloses++; } #endif diff --git a/engine/common/q1bsp.c b/engine/common/q1bsp.c index 308024c39..92e233bda 100644 --- a/engine/common/q1bsp.c +++ b/engine/common/q1bsp.c @@ -768,9 +768,9 @@ int Q1BSP_ClipDecal(vec3_t center, vec3_t normal, vec3_t tangent1, vec3_t tangen } //This is spike's testing function, and is only usable by gl. :) +/* void Q1BSP_TestClipDecal(void) { - /* int i; int numtris; vec3_t fwd; @@ -838,8 +838,8 @@ void Q1BSP_TestClipDecal(void) qglEnd(); qglEnable(GL_TEXTURE_2D); qglEnable(GL_DEPTH_TEST); - */ } +*/ #endif /* diff --git a/engine/common/vm.h b/engine/common/vm.h index fe28d6bdf..c555a74a4 100644 --- a/engine/common/vm.h +++ b/engine/common/vm.h @@ -42,6 +42,10 @@ void Plug_Init(void); void Plug_SBar(void); void Plug_DrawReloadImages(void); int Plug_ConnectionlessClientPacket(char *buffer, int size); + +qboolean Plug_ChatMessage(char *buffer, int talkernum, int tpflags); +qboolean Plug_ServerMessage(char *buffer, int messagelevel); +qboolean Plug_CenterPrintMessage(char *buffer, int clientnum); #endif @@ -63,6 +67,19 @@ qboolean UI_DrawStatusBar(int scores); qboolean UI_DrawIntermission(void); qboolean UI_DrawFinale(void); int UI_MenuState(void); + + +int VMUI_fopen (char *name, int *handle, int fmode, int owner); +int VMUI_FRead (char *dest, int quantity, int fnum, int owner); +void VMUI_fclose (int fnum, int owner); +void VMUI_fcloseall (int owner); +int VMQ3_GetFileList(char *path, char *ext, char *output, int buffersize); + +//sans botlib +int Script_LoadFile(char *filename); +void Script_Free(int handle); +int Script_Read(int handle, struct pc_token_s *token); +void Script_Get_File_And_Line(int handle, char *filename, int *line); #endif #ifdef VM_CG diff --git a/engine/common/zone.h b/engine/common/zone.h index 2b188a453..1d815e6d0 100644 --- a/engine/common/zone.h +++ b/engine/common/zone.h @@ -86,6 +86,7 @@ Zone block void Memory_Init (void *buf, int size); void VARGS Z_Free (void *ptr); +int Z_MemSize(void *c); void *Z_Malloc (int size); // returns 0 filled memory void *Z_MallocNamed (int size, char *, int); // returns 0 filled memory //#define Z_Malloc(x) Z_MallocNamed2(x, __FILE__, __LINE__ ) diff --git a/engine/gl/gl_model.h b/engine/gl/gl_model.h index 4b4bb51b9..a9d3e09c2 100644 --- a/engine/gl/gl_model.h +++ b/engine/gl/gl_model.h @@ -859,6 +859,7 @@ struct model_s *CM_TempBoxModel(vec3_t mins, vec3_t maxs); void Mod_ParseInfoFromEntityLump(char *data); void VARGS CMQ2_SetAreaPortalState (int portalnum, qboolean open); +void CMQ3_SetAreaPortalState (int area1, int area2, qboolean open); #endif diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index d9e96f478..e7abab3f8 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef RGLQUAKE #include "glquake.h" +#include "renderque.h" #ifdef Q3SHADERS #include "shader.h" diff --git a/engine/gl/gl_screen.c b/engine/gl/gl_screen.c index 184325440..6944694bb 100644 --- a/engine/gl/gl_screen.c +++ b/engine/gl/gl_screen.c @@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include void GLSCR_UpdateScreen (void); +void GLDraw_TextureMode_Changed (void); extern qboolean scr_drawdialog; @@ -283,7 +284,7 @@ void GLSCR_UpdateScreen (void) if (r_worldentity.model && uimenu != 1) { V_RenderView (); - Q1BSP_TestClipDecal(); +// Q1BSP_TestClipDecal(); } else GL_DoSwap(); diff --git a/engine/gl/glquake.h b/engine/gl/glquake.h index e165f6dc7..487b2abca 100644 --- a/engine/gl/glquake.h +++ b/engine/gl/glquake.h @@ -222,6 +222,7 @@ extern const char *gl_extensions; #ifdef Q3SHADERS void R_UnlockArrays (void); void R_IBrokeTheArrays(void); +void R_ClearArrays (void); #endif #if defined(RGLQUAKE) @@ -282,6 +283,8 @@ void EmitSkyPolys (msurface_t *fa); void R_DrawSkyChain (msurface_t *s); void R_ClearSkyBox (void); +void R_DrawSkyBox (msurface_t *s); +void R_ForceSkyBox (void); void R_AddSkySurface (msurface_t *fa); // @@ -363,6 +366,7 @@ typedef struct { //gl_ppl.c void PPL_DrawWorld (void); +qboolean PPL_ShouldDraw(void); void RotateLightVector(vec3_t *angles, vec3_t origin, vec3_t lightpoint, vec3_t result); #endif diff --git a/engine/gl/shader.h b/engine/gl/shader.h index 76a57c34f..95b5183d3 100644 --- a/engine/gl/shader.h +++ b/engine/gl/shader.h @@ -226,6 +226,8 @@ typedef struct shader_s { int registration_sequence; } shader_t; +extern shader_t r_shaders[]; + diff --git a/engine/qclib/progslib.h b/engine/qclib/progslib.h index c89b7c59a..76f1cf4ce 100644 --- a/engine/qclib/progslib.h +++ b/engine/qclib/progslib.h @@ -169,8 +169,10 @@ typedef struct progexterns_s { int (*useeditor) (progfuncs_t *prinst, char *filename, int line, int nump, char **parms); //called on syntax errors or step-by-step debugging. } progparms_t, progexterns_t; +//FIXMEs void QC_AddSharedVar(progfuncs_t *progfuncs, int start, int size); void QC_AddSharedFieldVar(progfuncs_t *progfuncs, int num, char *relstringtable); +void ED_Print (progfuncs_t *progfuncs, struct edict_s *ed); #if defined(QCLIBDLL_EXPORTS) __declspec(dllexport) diff --git a/engine/server/server.h b/engine/server/server.h index f498774ca..854d073f2 100644 --- a/engine/server/server.h +++ b/engine/server/server.h @@ -1038,6 +1038,7 @@ void SV_GibFilterInit(void); void SV_CleanupEnts(void); void SV_CSQC_DroppedPacket(client_t *client, int sequence); +void SV_CSQC_DropAll(client_t *client); // // sv_nchan.c diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index d343ecf35..18d016db9 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -1261,7 +1261,7 @@ void SV_Begin_f (void) sendangles = true; split->istobeloaded = false; - f = PR_FindFunc(svprogfuncs, "RestoreGame", PR_ANY); + f = PR_FindFunction(svprogfuncs, "RestoreGame", PR_ANY); if (f) { pr_global_struct->time = sv.time; diff --git a/engine/server/svq3_game.c b/engine/server/svq3_game.c index efe35c27d..74a5c30b5 100644 --- a/engine/server/svq3_game.c +++ b/engine/server/svq3_game.c @@ -5,6 +5,8 @@ #ifdef Q3SERVER +float RadiusFromBounds (vec3_t mins, vec3_t maxs); + #define USEBOTLIB @@ -1662,11 +1664,11 @@ void *BL_HunkMalloc(int size) int BL_FOpenFile(const char *name, fileHandle_t *handle, fsMode_t mode) { - return VMUI_fopen(name, handle, mode, Z_TAG_BOTLIB); + return VMUI_fopen((char*)name, (int*)handle, mode, Z_TAG_BOTLIB); } int BL_FRead( void *buffer, int len, fileHandle_t f ) { - return VMUI_FRead(buffer, len, f, Z_TAG_BOTLIB); + return VMUI_FRead(buffer, len, (int)f, Z_TAG_BOTLIB); } //int BL_FWrite( const void *buffer, int len, fileHandle_t f ) //{ @@ -1674,7 +1676,7 @@ int BL_FRead( void *buffer, int len, fileHandle_t f ) //} int BL_FCloseFile( fileHandle_t f ) { - VMUI_fclose(f, Z_TAG_BOTLIB); + VMUI_fclose((int)f, Z_TAG_BOTLIB); return 0; } //int BL_Seek( fileHandle_t f ) diff --git a/engine/sw/d_iface.h b/engine/sw/d_iface.h index 3953b9f33..cac419e5a 100644 --- a/engine/sw/d_iface.h +++ b/engine/sw/d_iface.h @@ -229,4 +229,5 @@ extern qbyte *r_warpbuffer; struct palremap_s *D_IdentityRemap(void); struct palremap_s *D_GetPaletteRemap(int red, int green, int blue, qboolean desaturate, qboolean fullbrights, int topcolor, int bottomcolor); +void D_DereferenceRemap(struct palremap_s *palremap); diff --git a/engine/sw/d_local.h b/engine/sw/d_local.h index 5237430f9..097a0c1cf 100644 --- a/engine/sw/d_local.h +++ b/engine/sw/d_local.h @@ -163,4 +163,7 @@ extern qbyte FASTCALL Trans(qbyte p, qbyte p2); extern qbyte FASTCALL AddBlend(qbyte p, qbyte p2); extern qbyte *pal555to8; + + +void D_ShutdownTrans(void); #endif diff --git a/engine/sw/r_local.h b/engine/sw/r_local.h index 59f014ae9..8abbe6610 100644 --- a/engine/sw/r_local.h +++ b/engine/sw/r_local.h @@ -310,8 +310,14 @@ void SWR_SetupFrame (void); void R_InitSkyBox (void); void R_InitSkyBox (void); void SWR_BuildLightmaps(void); +void R_WipeDecals(void); void SWR_NetGraph (void); qbyte *SWMod_LeafPVS (model_t *model, mleaf_t *leaf, qbyte *buffer); +void D_DrawSparkTrans (particle_t *pparticle, vec3_t src, vec3_t dest, int blendmode); + + +void D_Shutdown (void); + #endif //def SWQUAKE