From 17dc709d5c2fda12aa222e501d7a8689cdc2edb0 Mon Sep 17 00:00:00 2001 From: drjaska Date: Sat, 13 May 2023 21:08:42 +0300 Subject: [PATCH] trailing whitespace "[ \t]$" Signed-off-by: drjaska --- CREDITS.md | 2 +- cap_avi.c | 4 +- cap_ogg.c | 12 ++--- cl_cmd.c | 2 +- cl_input.c | 2 +- cl_main.c | 10 ++-- cl_screen.c | 4 +- cl_video.c | 16 +++---- cl_video_jamdecode.c | 4 +- cl_video_libavw.c | 2 +- clvm_cmds.c | 2 +- cmd.c | 22 ++++----- com_game.c | 2 +- com_list.h | 2 +- console.c | 8 ++-- convex.h | 2 +- crypto.c | 4 +- csprogs.c | 2 +- curves.c | 6 +-- cvar.c | 6 +-- dpdefs/dpextensions.qc | 16 +++---- dpdefs/menudefs.qc | 2 +- dpdefs/source_compare.pl | 2 +- fs.c | 24 +++++----- ft2.h | 4 +- gl_backend.c | 2 +- gl_draw.c | 2 +- gl_rmain.c | 22 ++++----- gl_rsurf.c | 2 +- image_png.c | 2 +- lhnet.c | 4 +- libcurl.c | 4 +- makefile.inc | 2 +- meshqueue.c | 4 +- mod_skeletal_animatevertices_sse.c | 2 +- model_alias.c | 34 ++++++------- model_brush.c | 22 ++++----- model_hlmdl.h | 10 ++-- model_iqm.h | 4 +- model_shared.c | 18 +++---- mvm_cmds.c | 24 +++++----- netconn.c | 16 +++---- .../build/native/include/SDL_haptic.h | 4 +- .../build/native/include/SDL_hints.h | 42 ++++++++-------- .../build/native/include/SDL_main.h | 4 +- .../build/native/include/SDL_opengl.h | 2 +- .../native/include/SDL_opengles2_gl2ext.h | 2 +- .../include/SDL_opengles2_khrplatform.h | 2 +- .../build/native/include/SDL_render.h | 16 +++---- .../build/native/include/SDL_sensor.h | 4 +- .../build/native/include/SDL_system.h | 6 +-- .../build/native/include/SDL_test_memory.h | 2 +- pr_comp.h | 12 ++--- progsvm.h | 2 +- prvm_cmds.c | 48 +++++++++---------- prvm_cmds.h | 2 +- prvm_edict.c | 6 +-- prvm_exec.c | 2 +- prvm_execprogram.h | 10 ++-- r_shadow.c | 12 ++--- r_sprites.c | 30 ++++++------ resource.h | 2 +- sbar.c | 4 +- sbar.h | 2 +- snd_main.c | 4 +- snd_ogg.c | 2 +- snd_oss.c | 10 ++-- sv_ccmds.c | 30 ++++++------ sv_demo.c | 4 +- sv_ents_csqc.c | 6 +-- sv_main.c | 16 +++---- sv_save.c | 4 +- sv_send.c | 4 +- svvm_cmds.c | 4 +- sys.h | 4 +- sys_sdl.c | 4 +- sys_shared.c | 2 +- timing.h | 2 +- todo | 2 +- utf8lib.c | 2 +- vid_sdl.c | 8 ++-- view.c | 6 +-- vpk.h | 4 +- world.c | 28 +++++------ 84 files changed, 349 insertions(+), 349 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 04b024dd..2b1b4393 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -14,7 +14,7 @@ Sorted by alphanumeric order by last name, and pseudonym if not available. Activ **DarkPlaces Engine** ------------------------------------------------------------------------------- -* **Project Leader** +* **Project Leader** * **Ashley Rose Hale (LadyHavoc)** * **Core Developers/Maintainers** diff --git a/cap_avi.c b/cap_avi.c index ea0e3544..9667e666 100644 --- a/cap_avi.c +++ b/cap_avi.c @@ -207,7 +207,7 @@ static void SCR_CaptureVideo_RIFF_MakeIxChunk(const char *fcc, const char *dwChu int i; fs_offset_t ix = SCR_CaptureVideo_RIFF_GetPosition(); fs_offset_t pos, sz; - + if(!format->canseek) Sys_Error("SCR_CaptureVideo_RIFF_MakeIxChunk called on non-seekable AVI"); @@ -313,7 +313,7 @@ static void SCR_CaptureVideo_RIFF_OverflowCheck(int framesize) //fs_offset_t curfilesize; if (format->riffstacklevel != 2) Sys_Error("SCR_CaptureVideo_RIFF_OverflowCheck: chunk stack leakage!\n"); - + if(!format->canseek) return; diff --git a/cap_ogg.c b/cap_ogg.c index 6218e8ad..2a581bc0 100644 --- a/cap_ogg.c +++ b/cap_ogg.c @@ -81,7 +81,7 @@ typedef struct { long e_o_s; int64_t granulepos; - + int64_t packetno; /* sequence number for decode; the framing knows where there's a hole in the data, but we need coupling so that the codec @@ -337,7 +337,7 @@ typedef enum { * Theora bitstream info. * Contains the basic playback parameters for a stream, * corresponding to the initial 'info' header packet. - * + * * Encoded theora frames must be a multiple of 16 in width and height. * To handle other frame sizes, a crop rectangle is specified in * frame_height and frame_width, offset_x and * offset_y. The offset @@ -349,7 +349,7 @@ typedef enum { * fraction. Aspect ratio is also stored as a rational fraction, and * refers to the aspect ratio of the frame pixels, not of the * overall frame itself. - * + * * See * examples/encoder_example.c for usage examples of the * other paramters and good default settings for the encoder parameters. @@ -404,14 +404,14 @@ typedef struct{ } theora_state; -/** +/** * Comment header metadata. * * This structure holds the in-stream metadata corresponding to * the 'comment' header packet. * * Meta data is stored as a series of (tag, value) pairs, in - * length-encoded string vectors. The first occurence of the + * length-encoded string vectors. The first occurence of the * '=' character delimits the tag and value. A particular tag * may occur more than once. The character set encoding for * the strings is always UTF-8, but the tag names are limited @@ -760,7 +760,7 @@ static void SCR_CaptureVideo_Ogg_EndVideo(void) FS_Write(cls.capturevideo.videofile, pg.body, pg.body_len); } } - + while (1) { int result = qogg_stream_flush (&format->to, &pg); if (result < 0) diff --git a/cl_cmd.c b/cl_cmd.c index 9277ad50..056334f1 100644 --- a/cl_cmd.c +++ b/cl_cmd.c @@ -732,7 +732,7 @@ void CL_InitCommands(void) Cvar_RegisterVariable(&r_fixtrans_auto); Cvar_RegisterVariable(&cl_team); Cvar_RegisterVariable(&cl_skin); - Cvar_RegisterVariable(&cl_noaim); + Cvar_RegisterVariable(&cl_noaim); Cmd_AddCommand(CF_CLIENT | CF_CLIENT_FROM_SERVER, "cmd", CL_ForwardToServer_f, "send a console commandline to the server (used by some mods)"); Cmd_AddCommand(CF_CLIENT, "color", CL_Color_f, "change your player shirt and pants colors"); diff --git a/cl_input.c b/cl_input.c index 0e9bc59d..d60132cc 100644 --- a/cl_input.c +++ b/cl_input.c @@ -398,7 +398,7 @@ cvar_t cl_nopred = {CF_CLIENT | CF_ARCHIVE, "cl_nopred", "0", "(QWSV only) disab cvar_t in_pitch_min = {CF_CLIENT, "in_pitch_min", "-90", "how far you can aim upward (quake used -70)"}; cvar_t in_pitch_max = {CF_CLIENT, "in_pitch_max", "90", "how far you can aim downward (quake used 80)"}; -cvar_t m_filter = {CF_CLIENT | CF_ARCHIVE, "m_filter","0", "smoothes mouse movement, less responsive but smoother aiming"}; +cvar_t m_filter = {CF_CLIENT | CF_ARCHIVE, "m_filter","0", "smoothes mouse movement, less responsive but smoother aiming"}; cvar_t m_accelerate = {CF_CLIENT | CF_ARCHIVE, "m_accelerate","1", "linear mouse acceleration factor (set to 1 to disable the linear acceleration and use only the power or natural acceleration; set to 0 to disable all acceleration)"}; cvar_t m_accelerate_minspeed = {CF_CLIENT | CF_ARCHIVE, "m_accelerate_minspeed","5000", "below this speed in px/s, no acceleration is done, with a linear slope between (applied only on linear acceleration)"}; cvar_t m_accelerate_maxspeed = {CF_CLIENT | CF_ARCHIVE, "m_accelerate_maxspeed","10000", "above this speed in px/s, full acceleration is done, with a linear slope between (applied only on linear acceleration)"}; diff --git a/cl_main.c b/cl_main.c index c1141563..7e3cf780 100644 --- a/cl_main.c +++ b/cl_main.c @@ -2058,7 +2058,7 @@ void CL_UpdateWorld(void) r_refdef.scene.numlights = 0; r_refdef.view.matrix = identitymatrix; r_refdef.view.quality = 1; - + cl.num_brushmodel_entities = 0; if (cls.state == ca_connected && cls.signon == SIGNONS) @@ -2563,7 +2563,7 @@ void CL_MeshEntities_Init(void) ent = cl_meshentities + i; ent->state_current.active = true; ent->render.model = cl_meshentitymodels + i; - Mod_Mesh_Create(ent->render.model, cl_meshentitynames[i]); + Mod_Mesh_Create(ent->render.model, cl_meshentitynames[i]); ent->render.alpha = 1; ent->render.flags = RENDER_SHADOW | RENDER_LIGHT; ent->render.framegroupblend[0].lerp = 1; @@ -2964,10 +2964,10 @@ void CL_Shutdown (void) { // be quiet while shutting down S_StopAllSounds(); - + // disconnect client from server if active CL_Disconnect(); - + CL_Video_Shutdown(); #ifdef CONFIG_MENU @@ -2978,7 +2978,7 @@ void CL_Shutdown (void) CDAudio_Shutdown (); S_Terminate (); - + R_Modules_Shutdown(); VID_Shutdown(); diff --git a/cl_screen.c b/cl_screen.c index e4ba43d9..820998c7 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -1762,7 +1762,7 @@ static void SCR_DrawScreen (void) R_TimeReport_EndFrame(); R_TimeReport_BeginFrame(); - + if(!scr_loading) Sbar_ShowFPS(); @@ -1962,7 +1962,7 @@ static void SCR_DrawLoadingStack(void) verts[1] = verts[4] = vid_conheight.integer - scr_loadingscreen_barheight.value; verts[3] = verts[6] = vid_conwidth.integer * loadingscreenstack->absolute_loading_amount_min; verts[7] = verts[10] = vid_conheight.integer; - + #if _MSC_VER >= 1400 #define sscanf sscanf_s #endif diff --git a/cl_video.c b/cl_video.c index 2804661b..8e42403a 100644 --- a/cl_video.c +++ b/cl_video.c @@ -179,7 +179,7 @@ static void LoadSubtitles( clvideo_t *video, const char *subtitlesfile ) if (video->subtitles == CLVIDEO_MAX_SUBTITLES) { Con_Printf(CON_WARN "WARNING: CLVIDEO_MAX_SUBTITLES = %i reached when reading subtitles from '%s'\n", CLVIDEO_MAX_SUBTITLES, subtitlesfile); - break; + break; } // add a sub video->subtitle_text[numsubs] = (char *) Mem_Alloc(cls.permanentmempool, strlen(com_token) + 1); @@ -352,7 +352,7 @@ void CL_CloseVideo(clvideo_t * video) } // update all videos -void CL_Video_Frame(void) +void CL_Video_Frame(void) { clvideo_t *video; int destframe; @@ -386,7 +386,7 @@ void CL_Video_Frame(void) do { video->framenum++; if (video->decodeframe(video->stream, video->imagedata, cl_videormask, cl_videogmask, cl_videobmask, cl_videobytesperpixel, cl_videobytesperpixel * video->width)) - { + { // finished? CL_RestartVideo(video); if (video->state == CLVIDEO_PLAY) @@ -480,10 +480,10 @@ void CL_DrawVideo(void) py = 0; sx = vid_conwidth.integer; sy = vid_conheight.integer; - st[0] = 0.0; st[1] = 0.0; - st[2] = 1.0; st[3] = 0.0; - st[4] = 0.0; st[5] = 1.0; - st[6] = 1.0; st[7] = 1.0; + st[0] = 0.0; st[1] = 0.0; + st[2] = 1.0; st[3] = 0.0; + st[4] = 0.0; st[5] = 1.0; + st[6] = 1.0; st[7] = 1.0; if (cl_video_keepaspectratio.integer) { float a = video->getaspectratio(video->stream) / ((float)vid.width / (float)vid.height); @@ -593,7 +593,7 @@ void CL_VideoStart(char *filename, const char *subtitlesfile) CL_RestartVideo( cl_videos ); } -void CL_Video_KeyEvent( int key, int ascii, qbool down ) +void CL_Video_KeyEvent( int key, int ascii, qbool down ) { // only react to up events, to allow the user to delay the abortion point if it suddenly becomes interesting.. if( !down ) { diff --git a/cl_video_jamdecode.c b/cl_video_jamdecode.c index 04bd6348..3cd7b817 100644 --- a/cl_video_jamdecode.c +++ b/cl_video_jamdecode.c @@ -352,7 +352,7 @@ readframe: // scale AvCodec_FillPicture((AVPicture *)s->frame_output, (uint8_t *)s->frame_output_buffer, PIX_FMT_BGRA, s->framewidth, s->frameheight); AvCodec_FillPicture((AVPicture *)s->frame_output_scale, (uint8_t *)imagedata, PIX_FMT_BGRA, s->info_imagewidth, s->info_imageheight); - SwsContext *scale_context = SwScale_GetCachedContext(NULL, s->framewidth, s->frameheight, PIX_FMT_BGRA, s->info_imagewidth, s->info_imageheight, PIX_FMT_BGRA, libavcodec_scalers[max(0, min(LIBAVCODEC_SCALERS, cl_video_libavcodec_scaler.integer))], NULL, NULL, NULL); + SwsContext *scale_context = SwScale_GetCachedContext(NULL, s->framewidth, s->frameheight, PIX_FMT_BGRA, s->info_imagewidth, s->info_imageheight, PIX_FMT_BGRA, libavcodec_scalers[max(0, min(LIBAVCODEC_SCALERS, cl_video_libavcodec_scaler.integer))], NULL, NULL, NULL); if (!scale_context) { Con_Printf("JamDecoder: LibAvcodec: error creating scale context frame %i\n", s->framenum); @@ -360,7 +360,7 @@ readframe: } if (!SwScale_Scale(scale_context, s->frame_output->data, s->frame_output->linesize, 0, s->frameheight, s->frame_output_scale->data, s->frame_output_scale->linesize)) Con_Printf("JamDecoder: LibAvcodec : error scaling frame\n", s->framenum); - SwScale_FreeContext(scale_context); + SwScale_FreeContext(scale_context); #else // make BGRA imagepixels from 8bit palettized frame b = (unsigned char *)imagedata; diff --git a/cl_video_libavw.c b/cl_video_libavw.c index 83f4921c..b3a86871 100644 --- a/cl_video_libavw.c +++ b/cl_video_libavw.c @@ -328,7 +328,7 @@ void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstrin s->info_imagewidth = max(s->info_imagewidth, (unsigned int)cl_video_libavw_minwidth.integer); if (cl_video_libavw_minheight.integer > 0) s->info_imageheight = max(s->info_imageheight, (unsigned int)cl_video_libavw_minheight.integer); - + // provide sound in separate .wav len = strlen(filename) + 10; wavename = (char *)Z_Malloc(len); diff --git a/clvm_cmds.c b/clvm_cmds.c index 587a31bb..2b0fc507 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -1478,7 +1478,7 @@ void VM_drawcolorcodedstring(prvm_prog_t *prog) pos = PRVM_G_VECTOR(OFS_PARM0); string = PRVM_G_STRING(OFS_PARM1); scale = PRVM_G_VECTOR(OFS_PARM2); - VectorCopy(PRVM_G_VECTOR(OFS_PARM3), rgb); + VectorCopy(PRVM_G_VECTOR(OFS_PARM3), rgb); alpha = PRVM_G_FLOAT(OFS_PARM4); flag = (int)PRVM_G_FLOAT(OFS_PARM5); } diff --git a/cmd.c b/cmd.c index c9b2cd5d..c60a07eb 100644 --- a/cmd.c +++ b/cmd.c @@ -210,11 +210,11 @@ static size_t Cmd_ParseInput (cmd_input_t **output, char **input) * The Quake command-line is super basic. It can be entered in the console * or in config files. A semicolon is used to terminate a command and chain * them together. Otherwise, a newline delineates command input. - * + * * In most engines, the Quake command-line is a simple linear text buffer that * is parsed when it executes. In Darkplaces, we use a linked list of command * input and parse the input on the spot. - * + * * This was done because Darkplaces allows multiple command interpreters on the * same thread. Previously, each interpreter maintained its own buffer and this * caused problems related to execution order, and maintaining a single simple @@ -233,7 +233,7 @@ static size_t Cmd_ParseInput (cmd_input_t **output, char **input) command = false; comment = false; break; - default: + default: if(!comment) // Not a newline so far. Still not a valid command yet. { if(!quotes && (*input)[pos] == ';') // Ignore semicolons in quotes. @@ -298,7 +298,7 @@ static size_t Cmd_ParseInput (cmd_input_t **output, char **input) } strlcpy(&(*output)->text[offset], &(*input)[start], cmdsize + 1); - + /* * If we were still looking ahead by the time we broke from the loop, the command input * hasn't terminated yet and we're still expecting more, so keep this node open for appending later. @@ -455,10 +455,10 @@ void Cbuf_Execute (cmd_buf_t *cbuf) * can insert data at the beginning of the text buffer */ current = List_Entry(cbuf->start.next, cmd_input_t, list); - + // Recycle memory so using WASD doesn't cause a malloc and free List_Move_Tail(¤t->list, &cbuf->free); - + /* * Assume we're rolling with the current command-line and * always set this false because alias expansion or cbuf insertion @@ -544,7 +544,7 @@ void Cbuf_Frame(cmd_buf_t *cbuf) Cmd_StuffCmds_f Adds command line parameters as script statements -Commands lead with a +, and continue until a - or another + +Commands lead with a +, and continue until a - or another quake +prog jctest.qp +cmd amlev1 quake -nosound +cmd amlev1 =============== @@ -1468,7 +1468,7 @@ static qbool Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *ou } } } - else + else outtext[outlen++] = *in++; } outtext[outlen] = 0; @@ -1629,7 +1629,7 @@ static void Cmd_Apropos_f(cmd_state_t *cmd) static cmd_state_t *Cmd_AddInterpreter(cmd_buf_t *cbuf, cvar_state_t *cvars, int cvars_flagsmask, int cmds_flagsmask, cmd_userdefined_t *userdefined) { cmd_state_t *cmd = (cmd_state_t *)Mem_Alloc(tempmempool, sizeof(cmd_state_t)); - + cmd->mempool = Mem_AllocPool("commands", 0, NULL); // space for commands and script files cmd->cbuf = cbuf; @@ -2163,7 +2163,7 @@ void Cmd_ClearCSQCCommands (cmd_state_t *cmd) { cmd_function_t *func; cmd_function_t **next = &cmd->userdefined->qc_functions; - + while(*next) { func = *next; @@ -2178,7 +2178,7 @@ extern cvar_t sv_cheats; * Cloudwalk FIXME: This idea sounded great in my head but... * How do we handle commands that can be received by the client, * but which the server can also execute locally? - * + * * If we create a callback where the engine will forward to server * but try to execute the command locally if it's dedicated, * we're back to intermixing client and server code which I'm diff --git a/com_game.c b/com_game.c index 1406989b..5bf7d52c 100644 --- a/com_game.c +++ b/com_game.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. gamemode_t gamemode; const char *gamename; -const char *gamenetworkfiltername; // same as gamename currently but with _ in place of spaces so that "getservers" packets parse correctly (this also means the +const char *gamenetworkfiltername; // same as gamename currently but with _ in place of spaces so that "getservers" packets parse correctly (this also means the const char *gamedirname1; const char *gamedirname2; const char *gamescreenshotname; diff --git a/com_list.h b/com_list.h index 4bbeb7d6..83099266 100644 --- a/com_list.h +++ b/com_list.h @@ -224,7 +224,7 @@ static inline void List_Create(llist_t *list) /* * Insert a node between two known nodes. - * + * * Only use when prev and next are known. */ static inline void __List_Add(llist_t *node, llist_t *prev, llist_t *next) diff --git a/console.c b/console.c index 58409bef..ac5e4eef 100644 --- a/console.c +++ b/console.c @@ -641,7 +641,7 @@ void Log_ConPrint (const char *msg) FS_Print (logfile, sanitizedmsg); Mem_Free(sanitizedmsg); } - else + else { FS_Print (logfile, msg); } @@ -830,7 +830,7 @@ static void Con_ConDump_f(cmd_state_t *cmd) FS_Write(file, sanitizedmsg, strlen(sanitizedmsg)); Mem_Free(sanitizedmsg); } - else + else { FS_Write(file, CON_LINES(i).start, CON_LINES(i).len); } @@ -1270,13 +1270,13 @@ void Con_MaskPrint(int additionalmask, const char *msg) else g -= 87; if(isdigit(b)) b -= '0'; else b -= 87; - + color = Sys_Con_NearestColor(r * 17, g * 17, b * 17); in += 3; // 3 only, the switch down there does the fourth } else color = in[1]; - + switch(color) { case STRING_COLOR_TAG: diff --git a/convex.h b/convex.h index f8881c86..74a4d41e 100644 --- a/convex.h +++ b/convex.h @@ -65,7 +65,7 @@ typedef struct convex_builder_state_s convex_face_t faces[CONVEX_MAX_FACES]; // we consider points to be equivalent if they are within this distance - // suggested value is maxextent / 1048576.0f, which is a way of saying + // suggested value is maxextent / 1048576.0f, which is a way of saying // 'equivalent within 20 bits of precision' float epsilon; } diff --git a/crypto.c b/crypto.c index 21b70954..6a296193 100644 --- a/crypto.c +++ b/crypto.c @@ -527,7 +527,7 @@ crypto_data_t; static crypto_t *Crypto_ServerFindInstance(lhnetaddress_t *peeraddress, qbool allow_create) { - crypto_t *crypto; + crypto_t *crypto; int i, best; if(!d0_blind_id_dll) @@ -644,7 +644,7 @@ static void Crypto_StoreHostKey(lhnetaddress_t *peeraddress, const char *keystri if(!d0_blind_id_dll) return; - + // syntax of keystring: // aeslevel id@key id@key ... diff --git a/csprogs.c b/csprogs.c index 20c318a8..8e6c4f2f 100644 --- a/csprogs.c +++ b/csprogs.c @@ -513,7 +513,7 @@ qbool CL_VM_UpdateView (double frametime) /* * This should be fine for now but FTEQW uses flags for keydest * and checks that an array called "eyeoffset" is 0 - * + * * Just a note in case there's compatibility problems later */ PRVM_G_FLOAT(OFS_PARM2) = key_dest == key_game; diff --git a/curves.c b/curves.c index 1d9b2941..cd2fc33e 100644 --- a/curves.c +++ b/curves.c @@ -67,7 +67,7 @@ void Q3PatchTesselateFloat(int numcomponents, int outputstride, float *outputver float px, py, *v, a, b, c, *cp[3][3], temp[3][64]; int xmax = max(1, 2*tesselationwidth); int ymax = max(1, 2*tesselationheight); - + // iterate over the individual 3x3 quadratic spline surfaces one at a time // expanding them to fill the output array (with some overlap to ensure // the edges are filled) @@ -209,7 +209,7 @@ static float Squared3xCurveArea(const float *a, const float *control, const floa // a.b / (|a| |b|) // // so the area is - // + // // 0.5 * sqrt(|a|^2 |b|^2 - (a.b)^2) int c; float aa = 0, bb = 0, ab = 0; @@ -388,7 +388,7 @@ int Q3PatchAdjustTesselation(int numcomponents, patchinfo_t *patch1, float *patc return modified; } -#undef SIDE_INVALID +#undef SIDE_INVALID #undef SIDE_X #undef SIDE_Y diff --git a/cvar.c b/cvar.c index 7936c923..1bf49dd2 100644 --- a/cvar.c +++ b/cvar.c @@ -230,7 +230,7 @@ int Cvar_CompleteCountPossible(cvar_state_t *cvars, const char *partial, int nee for (char **alias = cvar->aliases; alias && *alias; alias++) if (!strncasecmp(partial, *alias, len) && (cvar->flags & neededflags)) h++; - + return h; } @@ -261,7 +261,7 @@ const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, in for (char **alias = cvar->aliases; alias && *alias; alias++) if (!strncasecmp(partial, *alias, len) && (cvar->flags & neededflags)) buf[bpos++] = *alias; - + buf[bpos] = NULL; return buf; @@ -296,7 +296,7 @@ void Cvar_CompleteCvarPrint(cvar_state_t *cvars, const char *partial, int needed if (!strncasecmp (partial, *alias, len) && (cvar->flags & neededflags)) Cvar_PrintHelp(cvar, *alias, true); - + } // check if a cvar is held by some progs diff --git a/dpdefs/dpextensions.qc b/dpdefs/dpextensions.qc index 558a288e..058399f4 100644 --- a/dpdefs/dpextensions.qc +++ b/dpdefs/dpextensions.qc @@ -433,7 +433,7 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach //darkplaces implementation: Blub\0 //cvar definitions: // utf8_enable: enable utf8 encoding -//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc., +//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc., //and count as 1 char for string functions like strlen, substring, etc. // note: utf8_enable is run-time cvar, could be changed during execution // note: beware that str2chr() could return value bigger than 255 once utf8 is enabled @@ -495,7 +495,7 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach // description: allows alternative 'static' lightstyle syntax : "=value" // examples: "=0.5", "=2.0", "=2.75" // could be used to control switchable lights or making styled lights with brightness > 2 -// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact +// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact // that other engines (which do not support this extension) could connect to a game and misunderstand this kind of lightstyle syntax //DP_LITSPRITES @@ -1020,7 +1020,7 @@ string(string format, ...) sprintf = #627; //supported stuff: // % // optional: $ for the argument to format (the arg counter then is not increased) -// flags: #0- + +// flags: #0- // optional: , *, or *$ for the field width (width is read before value and precision) // optional: ., .*, or .*$ for the precision (precision is read before value) // length modifiers: h for forcing a float, l for forcing an entity (by default, %d etc. cast a float to int), ll for forcing an int @@ -1357,14 +1357,14 @@ float(string sample) soundlength = #534; // returns length of sound sample in se //syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens: // "string" // start: subtitle start time in seconds -// end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started, +// end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started, // if below 0 - show until next subtitles minus this number of seconds // text: subtitle text, color codes (Q3-style and ^xRGB) are allowed //example of subtitle file: // 3 0 "Vengeance! Vengeance for my eternity of suffering!" // 9 0 "Whelp! As if you knew what eternity was!" // 13 0 "Grovel before your true master." -// 17 0 "Never!" +// 17 0 "Never!" // 18 7 "I'll hack you from crotch to gizzard and feed what's left of you to your brides..." //DP_SOLIDCORPSE @@ -1762,11 +1762,11 @@ const float FORCETYPE_TORQUE = 3; .vector massofs; // offsets a mass center out of object center, if not set a center of model bounds is used .float friction; // a friction of object, get multiplied by second objects's friction on contact .float bouncefactor; -.float bouncestop; +.float bouncestop; .float jointtype; // type of joint .float forcetype; // type of force -.float erp; // error restitution parameter, makes ODE solver attempt to fix errors in contacts, - // bringing together 2 joints or fixing object being stuch in other object, +.float erp; // error restitution parameter, makes ODE solver attempt to fix errors in contacts, + // bringing together 2 joints or fixing object being stuch in other object, // a value of 0.1 will fix slightly, a value of 1.0 attempts to fix whole error in one frame // use with care as high values makes system unstable and likely to explode //builtin definitions: diff --git a/dpdefs/menudefs.qc b/dpdefs/menudefs.qc index 63d2c638..ea3ad6c7 100644 --- a/dpdefs/menudefs.qc +++ b/dpdefs/menudefs.qc @@ -304,7 +304,7 @@ float drawstring(vector position, string text, vector scale, vector rgb, float a float drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #467; vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #467; - + float drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456; float drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457; diff --git a/dpdefs/source_compare.pl b/dpdefs/source_compare.pl index 01dbfd49..54669bc7 100755 --- a/dpdefs/source_compare.pl +++ b/dpdefs/source_compare.pl @@ -180,7 +180,7 @@ for(<../*.h>, <../*.c>) } elsif(/getglobal\w*\(\w+, "(\w+)"\)/) { - # hack for weird DP source + # hack for weird DP source $vm{csprogs}{globals}{$1} = [0, "DP_CSQC_SPAWNPARTICLE"]; } } diff --git a/fs.c b/fs.c index 25789e02..644083e0 100644 --- a/fs.c +++ b/fs.c @@ -451,7 +451,7 @@ static const char* shfolderdllnames [] = }; static dllhandle_t shfolder_dll = NULL; -const GUID qFOLDERID_SavedGames = {0x4C5C32FF, 0xBB9D, 0x43b0, {0xB5, 0xB4, 0x2D, 0x72, 0xE5, 0x4E, 0xAA, 0xA4}}; +const GUID qFOLDERID_SavedGames = {0x4C5C32FF, 0xBB9D, 0x43b0, {0xB5, 0xB4, 0x2D, 0x72, 0xE5, 0x4E, 0xAA, 0xA4}}; #define qREFKNOWNFOLDERID const GUID * #define qKF_FLAG_CREATE 0x8000 #define qKF_FLAG_NO_ALIAS 0x1000 @@ -1519,7 +1519,7 @@ void FS_Rescan (void) Cvar_SetQuick (&scr_screenshot_name, com_modname); else Cvar_SetQuick (&scr_screenshot_name, gamescreenshotname); - + if((i = Sys_CheckParm("-modname")) && i < sys.argc - 1) strlcpy(com_modname, sys.argv[i+1], sizeof(com_modname)); @@ -1740,7 +1740,7 @@ const char *FS_CheckGameDir(const char *gamedir) ret = FS_SysCheckGameDir(va(vabuf, sizeof(vabuf), "%s%s/", fs_basedir, gamedir), buf, sizeof(buf)); if(ret) return ret; - + return fs_checkgamedir_missing; } @@ -1773,7 +1773,7 @@ static void FS_ListGameDirs(void) continue; if(!*info) continue; - stringlistappend(&list2, list.strings[i]); + stringlistappend(&list2, list.strings[i]); } stringlistfreecontents(&list); @@ -2557,7 +2557,7 @@ int FS_CheckNastyPath (const char *path, qbool isgamedir) ==================== FS_SanitizePath -Sanitize path (replace non-portable characters +Sanitize path (replace non-portable characters with portable ones in-place, etc) ==================== */ @@ -2714,7 +2714,7 @@ static qfile_t *FS_OpenReadFile (const char *filename, qbool quiet, qbool nonblo if(count < 0) return NULL; linkbuf[count] = 0; - + // Now combine the paths... mergeslash = strrchr(filename, '/'); mergestart = linkbuf; @@ -3946,7 +3946,7 @@ void FS_Which_f(cmd_state_t *cmd) { Con_Printf("usage:\n%s \n", Cmd_Argv(cmd, 0)); return; - } + } filename = Cmd_Argv(cmd, 1); sp = FS_FindFile(filename, &index, true); if (!sp) { @@ -4099,7 +4099,7 @@ unsigned char *FS_Deflate(const unsigned char *data, size_t size, size_t *deflat Mem_Free(tmp); return NULL; } - + if(qz_deflateEnd(&strm) != Z_OK) { Con_Printf("FS_Deflate: deflateEnd failed\n"); @@ -4126,7 +4126,7 @@ unsigned char *FS_Deflate(const unsigned char *data, size_t size, size_t *deflat memcpy(out, tmp, strm.total_out); Mem_Free(tmp); - + return out; } @@ -4193,7 +4193,7 @@ unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflat case Z_STREAM_END: case Z_OK: break; - + case Z_STREAM_ERROR: Con_Print("FS_Inflate: stream error!\n"); break; @@ -4209,7 +4209,7 @@ unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflat default: Con_Print("FS_Inflate: unknown error!\n"); break; - + } if(ret != Z_OK && ret != Z_STREAM_END) { @@ -4237,6 +4237,6 @@ unsigned char *FS_Inflate(const unsigned char *data, size_t size, size_t *inflat Mem_Free(outbuf.data); *inflated_size = (size_t)outbuf.cursize; - + return out; } diff --git a/ft2.h b/ft2.h index 2104a8c4..ca38e213 100644 --- a/ft2.h +++ b/ft2.h @@ -9,7 +9,7 @@ #include "utf8lib.h" -/* +/* * From http://www.unicode.org/Public/UNIDATA/Blocks.txt * * E000..F8FF; Private Use Area @@ -46,7 +46,7 @@ typedef struct ft2_font_s qbool image_font; // only fallbacks are freetype fonts // TODO: clean this up and do not expose everything. - + const unsigned char *data; // FT2 needs it to stay //fs_offset_t datasize; void *face; diff --git a/gl_backend.c b/gl_backend.c index 32a6ee7d..9a93cc6f 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -2109,7 +2109,7 @@ void R_Mesh_ResetTextureState(void) { #if 0 unsigned int unitnum; - + BACKENDACTIVECHECK for (unitnum = 0;unitnum < MAX_TEXTUREUNITS;unitnum++) diff --git a/gl_draw.c b/gl_draw.c index b4978abb..3ed699a3 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -890,7 +890,7 @@ static void DrawQ_GetTextColor(float color[4], int colorindex, float r, float g, // returns 0 otherwise static int RGBstring_to_colorindex(const char *str) { - Uchar ch; + Uchar ch; int ind = 0x0001 << 4; do { if (*str <= '9' && *str >= '0') diff --git a/gl_rmain.c b/gl_rmain.c index 4a51bd2b..ea499aa0 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1925,7 +1925,7 @@ void R_SetupShader_Surface(const float rtlightambient[3], const float rtlightdif if (r_glsl_permutation->loc_Color_Ambient >= 0) qglUniform3f(r_glsl_permutation->loc_Color_Ambient, rtlightambient[0], rtlightambient[1], rtlightambient[2]); if (r_glsl_permutation->loc_Color_Diffuse >= 0) qglUniform3f(r_glsl_permutation->loc_Color_Diffuse, rtlightdiffuse[0], rtlightdiffuse[1], rtlightdiffuse[2]); if (r_glsl_permutation->loc_Color_Specular >= 0) qglUniform3f(r_glsl_permutation->loc_Color_Specular, rtlightspecular[0], rtlightspecular[1], rtlightspecular[2]); - + // additive passes are only darkened by fog, not tinted if (r_glsl_permutation->loc_FogColor >= 0) qglUniform3f(r_glsl_permutation->loc_FogColor, 0, 0, 0); @@ -3836,7 +3836,7 @@ qbool R_AnimCache_GetEntity(entity_render_t *ent, qbool wantnormals, qbool wantt r_refdef.stats[r_stat_animcache_skeletal_bones] += model->num_bones; r_refdef.stats[r_stat_animcache_skeletal_maxbones] = max(r_refdef.stats[r_stat_animcache_skeletal_maxbones], model->num_bones); ent->animcache_skeletaltransform3x4 = (float *)R_FrameData_Alloc(sizeof(float[3][4]) * model->num_bones); - Mod_Skeletal_BuildTransforms(model, ent->frameblend, ent->skeleton, NULL, ent->animcache_skeletaltransform3x4); + Mod_Skeletal_BuildTransforms(model, ent->frameblend, ent->skeleton, NULL, ent->animcache_skeletaltransform3x4); // note: this can fail if the buffer is at the grow limit ent->animcache_skeletaltransform3x4size = sizeof(float[3][4]) * model->num_bones; ent->animcache_skeletaltransform3x4buffer = R_BufferData_Store(ent->animcache_skeletaltransform3x4size, ent->animcache_skeletaltransform3x4, R_BUFFERDATA_UNIFORM, &ent->animcache_skeletaltransform3x4offset); @@ -4988,7 +4988,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t r_refdef.view.usecustompvs = true; r_refdef.scene.worldmodel->brush.FatPVS(r_refdef.scene.worldmodel, visorigin, 2, r_refdef.viewcache.world_pvsbits, (r_refdef.viewcache.world_numclusters+7)>>3, false); } - + // camera needs no clipplane r_refdef.view.useclipplane = false; // TODO: is the camera origin always valid? if so we don't need to clear this @@ -5259,22 +5259,22 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v { // declare variables float blur_factor, blur_mouseaccel, blur_velocity; - static float blur_average; + static float blur_average; static vec3_t blur_oldangles; // used to see how quickly the mouse is moving // set a goal for the factoring - blur_velocity = bound(0, (VectorLength(cl.movement_velocity) - r_motionblur_velocityfactor_minspeed.value) + blur_velocity = bound(0, (VectorLength(cl.movement_velocity) - r_motionblur_velocityfactor_minspeed.value) / max(1, r_motionblur_velocityfactor_maxspeed.value - r_motionblur_velocityfactor_minspeed.value), 1); - blur_mouseaccel = bound(0, ((fabs(VectorLength(cl.viewangles) - VectorLength(blur_oldangles)) * 10) - r_motionblur_mousefactor_minspeed.value) + blur_mouseaccel = bound(0, ((fabs(VectorLength(cl.viewangles) - VectorLength(blur_oldangles)) * 10) - r_motionblur_mousefactor_minspeed.value) / max(1, r_motionblur_mousefactor_maxspeed.value - r_motionblur_mousefactor_minspeed.value), 1); - blur_factor = ((blur_velocity * r_motionblur_velocityfactor.value) + blur_factor = ((blur_velocity * r_motionblur_velocityfactor.value) + (blur_mouseaccel * r_motionblur_mousefactor.value)); // from the goal, pick an averaged value between goal and last value cl.motionbluralpha = bound(0, (cl.time - cl.oldtime) / max(0.001, r_motionblur_averaging.value), 1); blur_average = blur_average * (1 - cl.motionbluralpha) + blur_factor * cl.motionbluralpha; - // enforce minimum amount of blur + // enforce minimum amount of blur blur_factor = blur_average * (1 - r_motionblur_minblur.value) + r_motionblur_minblur.value; //Con_Printf("motionblur: direct factor: %f, averaged factor: %f, velocity: %f, mouse accel: %f \n", blur_factor, blur_average, blur_velocity, blur_mouseaccel); @@ -5283,7 +5283,7 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v cl.motionbluralpha = 1 - exp(- ( (r_motionblur.value * blur_factor / 80) - + + (r_damageblur.value * (cl.cshifts[CSHIFT_DAMAGE].percent / 1600)) ) / @@ -6011,7 +6011,7 @@ static const unsigned short bboxelements[36] = }; #define BBOXEDGES 13 -static const float bboxedges[BBOXEDGES][6] = +static const float bboxedges[BBOXEDGES][6] = { // whole box { 0, 0, 0, 1, 1, 1 }, @@ -10048,7 +10048,7 @@ void R_DrawModelSurfaces(entity_render_t *ent, qbool skysurfaces, qbool writedep // Now check if update flags are set on any surfaces that are visible if (r_q1bsp_lightmap_updates_hidden_surfaces.integer) { - /* + /* * We can do less frequent texture uploads (approximately 10hz for animated * lightstyles) by rebuilding lightmaps on surfaces that are not currently visible. * For optimal efficiency, this includes the submodels of the worldmodel, so we diff --git a/gl_rsurf.c b/gl_rsurf.c index 723e9fb4..62fdd404 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -907,7 +907,7 @@ static void R_Q1BSP_RecursiveGetLightInfo_BSP(r_q1bsp_getlightinfo_t *info, qboo surfaceindex = leafsurfaceindices[leafsurfaceindex]; surface = surfaces + surfaceindex; if(!surface->texture) - continue; + continue; if (CHECKPVSBIT(info->outsurfacepvs, surfaceindex)) continue; SETPVSBIT(info->outsurfacepvs, surfaceindex); diff --git a/image_png.c b/image_png.c index 6b226af0..817e5cd5 100644 --- a/image_png.c +++ b/image_png.c @@ -489,7 +489,7 @@ qbool PNG_SaveImage_preflipped (const char *filename, int width, int height, qbo return false; } - png = (void *)qpng_create_write_struct( + png = (void *)qpng_create_write_struct( (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : (qpng_access_version_number() / 100 == 104) ? PNG_LIBPNG_VER_STRING_14 : (qpng_access_version_number() / 100 == 105) ? PNG_LIBPNG_VER_STRING_15 : diff --git a/lhnet.c b/lhnet.c index 97dc9b06..4fd031c9 100644 --- a/lhnet.c +++ b/lhnet.c @@ -193,7 +193,7 @@ static int LHNETADDRESS_Resolve(lhnetaddressnative_t *address, const char *name, memcpy(&address->addr.in, addrinf->ai_addr, sizeof(address->addr.in)); } address->port = port; - + freeaddrinfo (addrinf); return 1; } @@ -370,7 +370,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *vaddress, const char *string, int de #endif namecache[namecacheposition].address.addresstype = LHNETADDRESSTYPE_NONE; } - + namecacheposition = (namecacheposition + 1) % MAX_NAMECACHE; return resolved; } diff --git a/libcurl.c b/libcurl.c index 53674299..2bc174da 100644 --- a/libcurl.c +++ b/libcurl.c @@ -740,7 +740,7 @@ static void CheckPendingDownloads(void) } else qcurl_easy_setopt(di->curle, CURLOPT_USERAGENT, ""); - if(developer_curl.integer) + if(developer_curl.integer) qcurl_easy_setopt(di->curle, CURLOPT_VERBOSE, (long) 1); qcurl_easy_setopt(di->curle, CURLOPT_REFERER, di->referer); qcurl_easy_setopt(di->curle, CURLOPT_RESUME_FROM, (long) di->startpos); @@ -786,7 +786,7 @@ static void CheckPendingDownloads(void) } qcurl_easy_setopt(di->curle, CURLOPT_HTTPHEADER, di->slist); - + qcurl_multi_add_handle(curlm, di->curle); di->started = true; ++numdownloads; diff --git a/makefile.inc b/makefile.inc index 87b114ce..9abee2e8 100644 --- a/makefile.inc +++ b/makefile.inc @@ -257,7 +257,7 @@ LDFLAGS_SUNOSSDL=$(LDFLAGS_UNIXCOMMON) -lrt -ldl -lsocket -lnsl $(LDFLAGS_UNIXSD ##### BSD specific variables ##### # Link -LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON) +LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON) LDFLAGS_BSDSDL=$(LDFLAGS_UNIXCOMMON) $(LDFLAGS_UNIXSDL) diff --git a/meshqueue.c b/meshqueue.c index af8c3ea5..081ff7e6 100644 --- a/meshqueue.c +++ b/meshqueue.c @@ -86,10 +86,10 @@ void R_MeshQueue_RenderTransparent(void) trans_sortarraysize = r_transparent_sortarraysize.integer; if (trans_hash) Mem_Free(trans_hash); - trans_hash = (meshqueue_t **)Mem_Alloc(cls.permanentmempool, sizeof(meshqueue_t *) * trans_sortarraysize); + trans_hash = (meshqueue_t **)Mem_Alloc(cls.permanentmempool, sizeof(meshqueue_t *) * trans_sortarraysize); if (trans_hashpointer) Mem_Free(trans_hashpointer); - trans_hashpointer = (meshqueue_t ***)Mem_Alloc(cls.permanentmempool, sizeof(meshqueue_t **) * trans_sortarraysize); + trans_hashpointer = (meshqueue_t ***)Mem_Alloc(cls.permanentmempool, sizeof(meshqueue_t **) * trans_sortarraysize); } // build index diff --git a/mod_skeletal_animatevertices_sse.c b/mod_skeletal_animatevertices_sse.c index 0c2fa5d9..7d6733b2 100644 --- a/mod_skeletal_animatevertices_sse.c +++ b/mod_skeletal_animatevertices_sse.c @@ -215,7 +215,7 @@ void Mod_Skeletal_AnimateVertices_SSE(const model_t * RESTRICT model, const fram _mm_store_ps(r->m[1], r1); _mm_store_ps(r->m[2], r2); _mm_store_ps(r->m[3], r3); - } + } } } diff --git a/model_alias.c b/model_alias.c index 46375f96..1d71f311 100644 --- a/model_alias.c +++ b/model_alias.c @@ -69,7 +69,7 @@ void Mod_Skeletal_BuildTransforms(const model_t * RESTRICT model, const frameble if (!bonepose) bonepose = (float * RESTRICT) Mod_Skeletal_AnimateVertices_AllocBuffers(sizeof(float[12]) * model->num_bones); - + if (skeleton && !skeleton->relativetransforms) skeleton = NULL; @@ -247,15 +247,15 @@ static int Mod_Skeletal_CompressBlend(model_t *model, const int *newindex, const newweights.index[i] = newindex[i]; newweights.influence[i] = (unsigned char)(newinfluence[i] * scale); total += newweights.influence[i]; - } + } while (total > 255) { for (i = 0;i < 4;i++) { - if(newweights.influence[i] > 0 && total > 255) - { + if(newweights.influence[i] > 0 && total > 255) + { newweights.influence[i]--; - total--; + total--; } } } @@ -263,10 +263,10 @@ static int Mod_Skeletal_CompressBlend(model_t *model, const int *newindex, const { for (i = 0; i < 4;i++) { - if(newweights.influence[i] < 255 && total < 255) - { - newweights.influence[i]++; - total++; + if(newweights.influence[i] < 255 && total < 255) + { + newweights.influence[i]++; + total++; } } } @@ -3076,7 +3076,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) if (loadmodel->num_posescale == 0) // don't divide by zero loadmodel->num_posescale = 1.0; loadmodel->num_poseinvscale = 1.0f / loadmodel->num_posescale; - + // load the poses from the animkeys for (index = 0;index < numanimkeys;index++) { @@ -3117,7 +3117,7 @@ void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) if (loadmodel->num_posescale == 0) // don't divide by zero loadmodel->num_posescale = 1.0; loadmodel->num_poseinvscale = 1.0f / loadmodel->num_posescale; - + // load the basepose as a frame for (index = 0;index < numbones;index++) { @@ -3301,7 +3301,7 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend) va.offset = LittleLong(vas[i].offset); vsize = header.num_vertexes*va.size; switch (va.format) - { + { case IQM_FLOAT: vsize *= sizeof(float); break; case IQM_UBYTE: vsize *= sizeof(unsigned char); break; default: continue; @@ -3489,7 +3489,7 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend) Matrix4x4_FromArray12FloatD3D(&pinvbase, loadmodel->data_baseboneposeinverse + 12*loadmodel->data_bones[i].parent); Matrix4x4_Concat(&invbase, &relinvbase, &pinvbase); Matrix4x4_ToArray12FloatD3D(&invbase, loadmodel->data_baseboneposeinverse + 12*i); - } + } else Matrix4x4_ToArray12FloatD3D(&relinvbase, loadmodel->data_baseboneposeinverse + 12*i); } } @@ -3642,7 +3642,7 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend) } else { - for (i = 0, k = 0;i < (int)header.num_frames;i++) + for (i = 0, k = 0;i < (int)header.num_frames;i++) { for (j = 0;j < (int)header.num_poses;j++, k++) { @@ -3694,9 +3694,9 @@ void Mod_INTERQUAKEMODEL_Load(model_t *mod, void *buffer, void *bufferend) bound.mins[0] = LittleFloat(bounds[i].mins[0]); bound.mins[1] = LittleFloat(bounds[i].mins[1]); bound.mins[2] = LittleFloat(bounds[i].mins[2]); - bound.maxs[0] = LittleFloat(bounds[i].maxs[0]); - bound.maxs[1] = LittleFloat(bounds[i].maxs[1]); - bound.maxs[2] = LittleFloat(bounds[i].maxs[2]); + bound.maxs[0] = LittleFloat(bounds[i].maxs[0]); + bound.maxs[1] = LittleFloat(bounds[i].maxs[1]); + bound.maxs[2] = LittleFloat(bounds[i].maxs[2]); bound.xyradius = LittleFloat(bounds[i].xyradius); bound.radius = LittleFloat(bounds[i].radius); if (!i) diff --git a/model_brush.c b/model_brush.c index 4fbf53b5..d161f8d8 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1278,7 +1278,7 @@ static int Mod_BSP_LightPoint_RecursiveBSPNode(model_t *model, vec3_t ambientcol dsi = lmwidth-2; if (dti > lmheight-2) dti = lmheight-2; - + // calculate bilinear interpolation factors // and also multiply by fixedpoint conversion factors to // compensate for lightmaps being 0-255 (as 0-2), we use @@ -1465,7 +1465,7 @@ static int Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode(RecursiveHullCheck t1 = DotProduct (plane->normal, t->start) - plane->dist; t2 = DotProduct (plane->normal, t->end) - plane->dist; } - + midf = t1 / (t1 - t2); VectorMA(t->start, midf, t->dist, mid); @@ -2350,7 +2350,7 @@ static void Mod_Q1BSP_LoadEdges(sizebuf_t *sb) Con_Printf("Mod_Q1BSP_LoadEdges: %s has invalid vertex indices in edge %i (vertices %i %i >= numvertices %i)\n", loadmodel->name, i, out->v[0], out->v[1], loadmodel->brushq1.numvertexes); if(!loadmodel->brushq1.numvertexes) Host_Error("Mod_Q1BSP_LoadEdges: %s has edges but no vertexes, cannot fix\n", loadmodel->name); - + out->v[0] = 0; out->v[1] = 0; } @@ -3021,7 +3021,7 @@ static void Mod_Q1BSP_LoadLeafs(sizebuf_t *sb) out->maxs[0] = MSG_ReadLittleShort(sb); out->maxs[1] = MSG_ReadLittleShort(sb); out->maxs[2] = MSG_ReadLittleShort(sb); - + firstmarksurface = MSG_ReadLittleLong(sb); nummarksurfaces = MSG_ReadLittleLong(sb); } @@ -3033,7 +3033,7 @@ static void Mod_Q1BSP_LoadLeafs(sizebuf_t *sb) out->maxs[0] = MSG_ReadLittleFloat(sb); out->maxs[1] = MSG_ReadLittleFloat(sb); out->maxs[2] = MSG_ReadLittleFloat(sb); - + firstmarksurface = MSG_ReadLittleLong(sb); nummarksurfaces = MSG_ReadLittleLong(sb); } @@ -3045,7 +3045,7 @@ static void Mod_Q1BSP_LoadLeafs(sizebuf_t *sb) out->maxs[0] = MSG_ReadLittleShort(sb); out->maxs[1] = MSG_ReadLittleShort(sb); out->maxs[2] = MSG_ReadLittleShort(sb); - + firstmarksurface = (unsigned short)MSG_ReadLittleShort(sb); nummarksurfaces = (unsigned short)MSG_ReadLittleShort(sb); } @@ -4503,7 +4503,7 @@ static void Mod_Q2BSP_LoadTexinfo(sizebuf_t *sb) loadmodel->data_textures = (texture_t*)Mem_Realloc(loadmodel->mempool, loadmodel->data_textures, loadmodel->num_texturesperskin * sizeof(texture_t)); // now assemble the texture chains - // if we encounter the textures out of order, the later ones won't mark the earlier ones in a sequence, so the earlier + // if we encounter the textures out of order, the later ones won't mark the earlier ones in a sequence, so the earlier for (i = 0, out = loadmodel->brushq1.texinfo;i < count;i++, out++) { int j, k; @@ -4581,7 +4581,7 @@ static void Mod_Q2BSP_LoadLeafs(sizebuf_t *sb) out->maxs[0] = MSG_ReadLittleShort(sb); out->maxs[1] = MSG_ReadLittleShort(sb); out->maxs[2] = MSG_ReadLittleShort(sb); - + firstmarksurface = (unsigned short)MSG_ReadLittleShort(sb); nummarksurfaces = (unsigned short)MSG_ReadLittleShort(sb); firstmarkbrush = (unsigned short)MSG_ReadLittleShort(sb); @@ -5928,7 +5928,7 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l) patchtess[patchtesscount].info.lods[PATCH_LOD_VISUAL].ytess = ytess; patchtess[patchtesscount].info.lods[PATCH_LOD_COLLISION].xtess = cxtess; patchtess[patchtesscount].info.lods[PATCH_LOD_COLLISION].ytess = cytess; - + patchtess[patchtesscount].surface_id = i; patchtess[patchtesscount].lodgroup[0] = LittleFloat(in->specific.patch.mins[0]); patchtess[patchtesscount].lodgroup[1] = LittleFloat(in->specific.patch.mins[1]); @@ -7710,13 +7710,13 @@ static void Mod_VBSP_LoadEdges(sizebuf_t *sb) { out->v[0] = (unsigned short)MSG_ReadLittleShort(sb); out->v[1] = (unsigned short)MSG_ReadLittleShort(sb); - + if ((int)out->v[0] >= loadmodel->brushq1.numvertexes || (int)out->v[1] >= loadmodel->brushq1.numvertexes) { Con_Printf("Mod_VBSP_LoadEdges: %s has invalid vertex indices in edge %i (vertices %i %i >= numvertices %i)\n", loadmodel->name, i, out->v[0], out->v[1], loadmodel->brushq1.numvertexes); if(!loadmodel->brushq1.numvertexes) Host_Error("Mod_VBSP_LoadEdges: %s has edges but no vertexes, cannot fix\n", loadmodel->name); - + out->v[0] = 0; out->v[1] = 0; } diff --git a/model_hlmdl.h b/model_hlmdl.h index 125afd54..1173ecb1 100644 --- a/model_hlmdl.h +++ b/model_hlmdl.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* * The Half-Life MDL format is Valve's format for models in GoldSrc engine. - * + * * These headers were added based on information found at * https://github.com/malortie/assimp/wiki/MDL:-Half-Life-1-file-format */ @@ -153,9 +153,9 @@ typedef struct dhlmdl_sequence_description_s int32_t ofs_events; int32_t num_frames; - + int64_t unused0; - + int32_t motiontype; int32_t motionbone; vec3_t linearmovement; @@ -223,11 +223,11 @@ typedef struct dhlmdl_s int32_t num_verts; int32_t ofs_vertinfo; int32_t ofs_verts; - + int32_t num_norms; int32_t ofs_norminfo; int32_t ofs_norms; - + int64_t unused1; } dhlmdl_t; diff --git a/model_iqm.h b/model_iqm.h index 1dbb940c..485892dd 100644 --- a/model_iqm.h +++ b/model_iqm.h @@ -17,7 +17,7 @@ typedef struct iqmheader_s unsigned int num_frames, num_framechannels, ofs_frames, ofs_bounds; unsigned int num_comment, ofs_comment; unsigned int num_extensions, ofs_extensions; -} +} iqmheader_t; typedef struct iqmmesh_s @@ -122,6 +122,6 @@ typedef struct iqmbounds_s float xyradius, radius; } iqmbounds_t; - + #endif diff --git a/model_shared.c b/model_shared.c index bcf683e3..99bd8c6f 100644 --- a/model_shared.c +++ b/model_shared.c @@ -414,7 +414,7 @@ model_t *Mod_LoadModel(model_t *mod, qbool crash, qbool checkdisk) if (mod->name[0] == '*') // submodel return mod; - + if (!strcmp(mod->name, "null")) { if(mod->loaded) @@ -479,7 +479,7 @@ model_t *Mod_LoadModel(model_t *mod, qbool crash, qbool checkdisk) if (developer_loading.integer) Con_Printf("loading model %s\n", mod->name); - + SCR_PushLoadingScreen(mod->name, 1); // LadyHavoc: unload the existing model in this slot (if there is one) @@ -513,7 +513,7 @@ model_t *Mod_LoadModel(model_t *mod, qbool crash, qbool checkdisk) if (buf) { int i; - const char *ext = FS_FileExtension(mod->name); + const char *ext = FS_FileExtension(mod->name); char *bufend = (char *)buf + filesize; // all models use memory, so allocate a memory pool mod->mempool = Mem_AllocPool(mod->name, 0, NULL); @@ -1368,7 +1368,7 @@ void Mod_Terrain_UpdateSurfacesForViewOrigin(model_t *model) { for (y = 0;y < model->terrain.size[1];y += model->terrain. Mod_Terrain_SurfaceRecurseChunk(model, model->terrain.maxstepsize, x, y); - Mod_Terrain_BuildChunk(model, + Mod_Terrain_BuildChunk(model, } #endif @@ -1469,7 +1469,7 @@ void Mod_LoadQ3Shaders(void) int numparameters; char parameter[TEXTURE_MAXFRAMES + 4][Q3PATHLENGTH]; char *custsurfaceparmnames[256]; // VorteX: q3map2 has 64 but well, someone will need more - unsigned long custsurfaceflags[256]; + unsigned long custsurfaceflags[256]; int numcustsurfaceflags; qbool dpshaderkill; @@ -1502,7 +1502,7 @@ void Mod_LoadQ3Shaders(void) while(COM_ParseToken_QuakeC(&text, false)) { if (!strcasecmp(com_token, "}")) - break; + break; // register surfaceflag if (numcustsurfaceflags >= 256) { @@ -1837,7 +1837,7 @@ void Mod_LoadQ3Shaders(void) if(layer->blendfunc[0] == GL_ONE && layer->blendfunc[1] == GL_ONE) layer->blendfunc[0] = GL_SRC_ALPHA; } - + layer->dptexflags = 0; if (layer->alphatest) layer->dptexflags |= TEXF_ALPHA; @@ -2288,7 +2288,7 @@ qbool Mod_LoadTextureFromQ3Shader(mempool_t *mempool, const char *modelname, tex texture->offsetscale = 1; texture->offsetbias = 0; texture->specularscalemod = 1; - texture->specularpowermod = 1; + texture->specularpowermod = 1; texture->rtlightambient = 0; texture->transparentsort = TRANSPARENTSORT_DISTANCE; // WHEN ADDING DEFAULTS HERE, REMEMBER TO PUT DEFAULTS IN ALL LOADERS @@ -3411,7 +3411,7 @@ static void Mod_Decompile_f(cmd_state_t *cmd) // if it's only one frame, use the original frame name if (j == i + 1) strlcpy(animname, mod->animscenes[i].name, sizeof(animname)); - + } dpsnprintf(outname, sizeof(outname), "%s_decompiled/%s.smd", basename, animname); Mod_Decompile_SMD(mod, outname, first, count, false); diff --git a/mvm_cmds.c b/mvm_cmds.c index 3faf9a1f..224ddd2a 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -1388,19 +1388,19 @@ VM_CL_gettagindex, // #311 float(entity ent, string tagname) gettagindex (DP_ VM_CL_gettaginfo, // #312 vector(entity ent, float tagindex) gettaginfo (DP_QC_GETTAGINFO) (DP_QC_RENDER_SCENE) #else // CSQC range #300-#399 -NULL, -NULL, -NULL, -NULL, -NULL, -NULL, -NULL, -NULL, -NULL, NULL, -NULL, -NULL, -NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, #endif NULL, // #313 NULL, // #314 diff --git a/netconn.c b/netconn.c index 631d89b7..0fa3b26d 100755 --- a/netconn.c +++ b/netconn.c @@ -182,7 +182,7 @@ void NetConn_UpdateFavorites_c(cvar_t *var) strlcpy(favorites_idfp[nFavorites_idfp], com_token, sizeof(favorites_idfp[nFavorites_idfp])); ++nFavorites_idfp; } - else + else { if(LHNETADDRESS_FromString(&favorites[nFavorites], com_token, 26000)) ++nFavorites; @@ -232,7 +232,7 @@ static qbool _ServerList_Entry_Compare( serverlist_entry_t *A, serverlist_entry_ if(A->info.isfavorite != B->info.isfavorite) return A->info.isfavorite; } - + switch( serverlist_sortbyfield ) { case SLIF_PING: result = A->info.ping - B->info.ping; @@ -1630,7 +1630,7 @@ static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *address entry->info.ping = min((unsigned) entry->info.ping, (unsigned) pingtime); serverreplycount++; } - + // other server info is updated by the caller return n; } @@ -1682,7 +1682,7 @@ static qbool NetConn_ClientParsePacket_ServerList_PrepareQuery( int protocol, co break; if( n < serverlist_cachecount ) { - // the entry has already been queried once or + // the entry has already been queried once or return true; } @@ -1700,7 +1700,7 @@ static qbool NetConn_ClientParsePacket_ServerList_PrepareQuery( int protocol, co strlcpy (entry->info.cname, ipstring, sizeof(entry->info.cname)); entry->info.isfavorite = isfavorite; - + // no, then reset the ping right away entry->info.ping = -1; // we also want to increase the serverlist_cachecount then @@ -1776,7 +1776,7 @@ static void NetConn_ClientParsePacket_ServerList_ParseDPList(lhnetaddress_t *sen if (serverlist_consoleoutput && developer_networking.integer) Con_Printf("Requesting info from DarkPlaces server %s\n", ipstring); - + if( !NetConn_ClientParsePacket_ServerList_PrepareQuery( PROTOCOL_DARKPLACES7, ipstring, false ) ) { break; } @@ -2080,7 +2080,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat dpsnprintf (ipstring, sizeof (ipstring), "%u.%u.%u.%u:%u", data[0], data[1], data[2], data[3], data[4] * 256 + data[5]); if (serverlist_consoleoutput && developer_networking.integer) Con_Printf("Requesting info from QuakeWorld server %s\n", ipstring); - + if( !NetConn_ClientParsePacket_ServerList_PrepareQuery( PROTOCOL_QUAKEWORLD, ipstring, false ) ) { break; } @@ -2845,7 +2845,7 @@ static const char *RCon_Authenticate(lhnetaddress_t *peeraddress, const char *pa if(comparator(peeraddress, userpass_start, password, cs, cslen)) goto check; } - + return NULL; // DENIED check: diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h index f240ae92..4bdf28df 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_haptic.h @@ -337,8 +337,8 @@ typedef struct _SDL_Haptic SDL_Haptic; #define SDL_HAPTIC_SPHERICAL 2 /** - * \brief Use this value to play an effect on the steering wheel axis. This - * provides better compatibility across platforms and devices as SDL will guess + * \brief Use this value to play an effect on the steering wheel axis. This + * provides better compatibility across platforms and devices as SDL will guess * the correct axis. * \sa SDL_HapticDirection */ diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h index ea819c85..2a4ab43a 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_hints.h @@ -92,7 +92,7 @@ extern "C" { * By default this hint is not set and the APK expansion files are not searched. */ #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - + /** * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. * @@ -132,13 +132,13 @@ extern "C" { * \brief A variable to control whether we trap the Android back button to handle it manually. * This is necessary for the right mouse button to work on some Android devices, or * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of * SDL_SCANCODE_AC_BACK. * * The variable can be set to the following values: * "0" - Back button will be handled as usual for system. (default) * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems + * manually. (This will also let right mouse click work on systems * where the right mouse button functions as back.) * * The value of this hint is used at runtime, so it can be changed at any time. @@ -147,7 +147,7 @@ extern "C" { /** * \brief Specify an application name. - * + * * This hint lets you specify the application name sent to the OS when * required. For example, this will often appear in volume control applets for * audio streams, and in lists of applications which are inhibiting the @@ -509,7 +509,7 @@ extern "C" { /** * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * + * * For example, on Nintendo Switch controllers, normally you'd get: * * (Y) @@ -563,9 +563,9 @@ extern "C" { * * The variable can be set to the following values: * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and + * responsibility to render the text from these events and * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, + * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, * and text that is being composed will be rendered in its own UI. */ #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" @@ -1269,7 +1269,7 @@ extern "C" { * disabled. You should use a string that describes what your program is doing * (and, therefore, why the screensaver is disabled). For example, "Playing a * game" or "Watching a video". - * + * * Setting this to "" or leaving it unset will have SDL use a reasonable * default: "Playing a game" or something similar. * @@ -1283,13 +1283,13 @@ extern "C" { * On some platforms, like Linux, a realtime priority thread may be subject to restrictions * that require special handling by the application. This hint exists to let SDL know that * the app is prepared to handle said restrictions. - * + * * On Linux, SDL will apply the following configuration to any thread that becomes realtime: * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. * * Exceeding this limit will result in the kernel sending SIGKILL to the app, * * Refer to the man pages for more information. - * + * * This variable can be set to the following values: * "0" - default platform specific behaviour * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy @@ -1377,7 +1377,7 @@ extern "C" { #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" /** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -1390,7 +1390,7 @@ extern "C" { /** * \brief Tell the video driver that we only want a double buffer. * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that + * By default, most lowlevel 2D APIs will use a triple buffer scheme that * wastes no CPU time on waiting for vsync after issuing a flip, but * introduces a frame of latency. On the other hand, using a double buffer * scheme instead is recommended for cases where low latency is an important @@ -1491,9 +1491,9 @@ extern "C" { /** * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). -* +* * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly +* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -1559,13 +1559,13 @@ extern "C" { /** * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * + * * This variable can be set to the following values: * "0" - Disable _NET_WM_BYPASS_COMPOSITOR * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * + * * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * + * */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -1703,7 +1703,7 @@ extern "C" { #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" /** - * \brief A variable controlling whether the windows message loop is processed by SDL + * \brief A variable controlling whether the windows message loop is processed by SDL * * This variable can be set to the following values: * "0" - The window message loop is not run @@ -1744,7 +1744,7 @@ extern "C" { #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" /** - * \brief A variable to specify custom icon resource id from RC file on Windows platform + * \brief A variable to specify custom icon resource id from RC file on Windows platform */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -1779,7 +1779,7 @@ extern "C" { #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX" /** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden + * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) @@ -1790,7 +1790,7 @@ extern "C" { #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" /** -* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called +* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called * * This variable can be set to the following values: * "0" - The window is activated when the SDL_ShowWindow function is called diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h index b3fec15f..0a205fe0 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_main.h @@ -76,9 +76,9 @@ #elif defined(__NACL__) /* On NACL we use ppapi_simple to set up the application helper code, - then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before + then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before starting the user main function. - All user code is run in a separate thread by ppapi_simple, thus + All user code is run in a separate thread by ppapi_simple, thus allowing for blocking io to take place via nacl_io */ #define SDL_MAIN_NEEDED diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h index 9aed5035..3c35e2cd 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengl.h @@ -90,7 +90,7 @@ # define GLAPI extern # endif /* _STATIC_MESA support */ # if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */ -# define GLAPIENTRY +# define GLAPIENTRY # else # define GLAPIENTRY __stdcall # endif diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h index e8ca8b13..7ed16f53 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_gl2ext.h @@ -1535,7 +1535,7 @@ typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, G #ifndef GL_EXT_multisampled_render_to_texture #define GL_EXT_multisampled_render_to_texture 1 #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); #endif typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h index c9e6f17d..43aac97a 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_opengles2_khrplatform.h @@ -223,7 +223,7 @@ typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; /* - * Types that differ between LLP64 and LP64 architectures - in LLP64, + * Types that differ between LLP64 and LP64 architectures - in LLP64, * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears * to be the only LLP64 architecture in current use. */ diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h index d859e3fd..ff2ad1c4 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_render.h @@ -1013,29 +1013,29 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, * \sa SDL_RenderGetLogicalSize * \sa SDL_RenderSetLogicalSize */ -extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer, - int windowX, int windowY, +extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer, + int windowX, int windowY, float *logicalX, float *logicalY); - + /** * Get real coordinates of point in window when given logical coordinates of point in renderer. * Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set - * + * * \param renderer the renderer from which the window coordinates should be calculated * \param logicalX the logical x coordinate * \param logicalY the logical y coordinate * \param windowX the pointer filled with the real X coordinate in the window * \param windowY the pointer filled with the real Y coordinate in the window - - * + + * * \since This function is available since SDL 2.0.18. - * + * * \sa SDL_RenderGetScale * \sa SDL_RenderSetScale * \sa SDL_RenderGetLogicalSize * \sa SDL_RenderSetLogicalSize */ -extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer, +extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer, float logicalX, float logicalY, int *windowX, int *windowY); diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h index a2f30e0f..1f0201f9 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_sensor.h @@ -91,7 +91,7 @@ typedef enum * -X ... +X : left ... right * -Y ... +Y : bottom ... top * -Z ... +Z : farther ... closer - * + * * The axis data is not changed when the phone is rotated. * * \sa SDL_GetDisplayOrientation() @@ -116,7 +116,7 @@ typedef enum * -X ... +X : left ... right * -Y ... +Y : bottom ... top * -Z ... +Z : farther ... closer - * + * * The axis data is not changed when the phone or controller is rotated. * * \sa SDL_GetDisplayOrientation() diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h index 41563add..116d1383 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_system.h @@ -42,7 +42,7 @@ extern "C" { /* Platform specific functions for Windows */ #ifdef __WIN32__ - + typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam); /** @@ -155,9 +155,9 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int prio * \since This function is available since SDL 2.0.18. */ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy); - + #endif /* __LINUX__ */ - + /* Platform specific functions for iOS */ #ifdef __IPHONEOS__ diff --git a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h index cc2edc1b..321606bf 100644 --- a/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h +++ b/packages/sdl2.nuget.2.0.22/build/native/include/SDL_test_memory.h @@ -39,7 +39,7 @@ extern "C" { /** * \brief Start tracking SDL memory allocations - * + * * \note This should be called before any other SDL functions for complete tracking coverage */ int SDLTest_TrackAllocations(void); diff --git a/pr_comp.h b/pr_comp.h index f69b6320..c043d6e8 100644 --- a/pr_comp.h +++ b/pr_comp.h @@ -121,7 +121,7 @@ typedef enum opcode_e OP_BITOR, // TODO: actually support Hexen 2? - + OP_MULSTORE_F, //66 redundant, for h2 compat OP_MULSTORE_VF, //67 redundant, for h2 compat OP_MULSTOREP_F, //68 @@ -196,7 +196,7 @@ typedef enum opcode_e OP_CONV_IF, OP_CONV_FI, - + OP_LOADP_IF, OP_LOADP_FI, @@ -230,7 +230,7 @@ typedef enum opcode_e OP_ADD_PIW, OP_LOADA_F, - OP_LOADA_V, + OP_LOADA_V, OP_LOADA_S, OP_LOADA_ENT, OP_LOADA_FLD, @@ -241,7 +241,7 @@ typedef enum opcode_e OP_LOAD_P, OP_LOADP_F, - OP_LOADP_V, + OP_LOADP_V, OP_LOADP_S, OP_LOADP_ENT, OP_LOADP_FLD, @@ -252,7 +252,7 @@ typedef enum opcode_e OP_GE_I, OP_LT_I, OP_GT_I, - + OP_LE_IF, OP_GE_IF, OP_LT_IF, @@ -295,7 +295,7 @@ typedef enum opcode_e OP_GSTOREP_ENT, OP_GSTOREP_FLD, OP_GSTOREP_S, - OP_GSTOREP_FNC, + OP_GSTOREP_FNC, OP_GSTOREP_V, OP_GADDRESS, OP_GLOAD_I, diff --git a/progsvm.h b/progsvm.h index 92ead5dc..ec7cdfe6 100644 --- a/progsvm.h +++ b/progsvm.h @@ -492,7 +492,7 @@ prvm_prog_funcoffsets_t; // stringbuffer flags #define STRINGBUFFER_SAVED 1 // saved in savegames #define STRINGBUFFER_QCFLAGS 1 // allowed to be set by QC -#define STRINGBUFFER_TEMP 128 // internal use ONLY +#define STRINGBUFFER_TEMP 128 // internal use ONLY typedef struct prvm_stringbuffer_s { int max_strings; diff --git a/prvm_cmds.c b/prvm_cmds.c index 8bcfebd9..49ce46aa 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -733,7 +733,7 @@ void VM_cvar_type(prvm_prog_t *prog) ret |= 16; // CVAR_TYPE_HASDESCRIPTION if(cvar->flags & CF_READONLY) ret |= 32; // CVAR_TYPE_READONLY - + PRVM_G_FLOAT(OFS_RETURN) = ret; } @@ -2108,14 +2108,14 @@ void VM_entityfieldtype(prvm_prog_t *prog) { mdef_t *d; int i = (int)PRVM_G_FLOAT(OFS_PARM0); - + if (i < 0 || i >= prog->numfielddefs) { VM_Warning(prog, "VM_entityfieldtype: %s: field index out of bounds\n", prog->name); PRVM_G_FLOAT(OFS_RETURN) = -1.0; return; } - + d = &prog->fielddefs[i]; PRVM_G_FLOAT(OFS_RETURN) = (prvm_vec_t)d->type; } @@ -2137,16 +2137,16 @@ void VM_getentityfieldstring(prvm_prog_t *prog) prvm_edict_t * ent; int i = (int)PRVM_G_FLOAT(OFS_PARM0); char valuebuf[MAX_INPUTLINE]; - + if (i < 0 || i >= prog->numfielddefs) { VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name); PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, ""); return; } - + d = &prog->fielddefs[i]; - + // get the entity ent = PRVM_G_EDICT(OFS_PARM1); if(ent->free) @@ -2156,7 +2156,7 @@ void VM_getentityfieldstring(prvm_prog_t *prog) return; } val = (prvm_eval_t *)(ent->fields.fp + d->ofs); - + // if it's 0 or blank, return an empty string type = d->type & ~DEF_SAVEGLOBAL; for (j=0 ; jtype, val, valuebuf, sizeof(valuebuf))); } @@ -2371,7 +2371,7 @@ void VM_substring(prvm_prog_t *prog) string[length] = 0; PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string); */ - + s = PRVM_G_STRING(OFS_PARM0); start = (int)PRVM_G_FLOAT(OFS_PARM1); length = (int)PRVM_G_FLOAT(OFS_PARM2); @@ -2389,7 +2389,7 @@ void VM_substring(prvm_prog_t *prog) u_slength = (int)u8_strlen(s); length += u_slength - start + 1; } - + // positive start, positive length u_start = u8_byteofs(s, start, NULL); if (u_start < 0) @@ -2400,7 +2400,7 @@ void VM_substring(prvm_prog_t *prog) u_length = u8_bytelen(s + u_start, length); if (u_length >= sizeof(string)-1) u_length = sizeof(string)-1; - + memcpy(string, s + u_start, u_length); string[u_length] = 0; PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, string); @@ -3249,7 +3249,7 @@ void VM_chr(prvm_prog_t *prog) PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, tmp); */ - + char tmp[8]; int len; VM_SAFEPARMCOUNT(1, VM_chr); @@ -3438,7 +3438,7 @@ void VM_gecko_navigate(prvm_prog_t *prog) { ======================== VM_gecko_keyevent -float[bool] gecko_keyevent( string name, float key, float eventtype ) +float[bool] gecko_keyevent( string name, float key, float eventtype ) ======================== */ void VM_gecko_keyevent(prvm_prog_t *prog) { @@ -3859,7 +3859,7 @@ void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strind void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer) { int i; - + if (!stringbuffer) return; @@ -4347,7 +4347,7 @@ void VM_buf_writefile(prvm_prog_t *prog) VM_Warning(prog, "VM_buf_writefile: no such file handle %i (or file has been closed) in %s\n", filenum, prog->name); return; } - + // get string buffer stringbuffer = (prvm_stringbuffer_t *)Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, (int)PRVM_G_FLOAT(OFS_PARM1)); if(!stringbuffer) @@ -4418,7 +4418,7 @@ static const char *detect_match_rule(char *pattern, int *matchrule) ppos = strchr(pattern, '*'); qpos = strchr(pattern, '?'); // has ? - pattern - if (qpos) + if (qpos) { *matchrule = MATCH_PATTERN; return pattern; @@ -4430,8 +4430,8 @@ static const char *detect_match_rule(char *pattern, int *matchrule) if ((ppos - pattern) == 0) { ppos = strchr(pattern+1, '*'); - // *something - if (!ppos) + // *something + if (!ppos) { *matchrule = MATCH_RIGHT; return pattern+1; @@ -4618,7 +4618,7 @@ void VM_buf_cvarlist(prvm_prog_t *prog) antilen = 0; else antilen = strlen(antipartial); - + for (n = 0;n < stringbuffer->num_strings;n++) if (stringbuffer->strings[n]) Mem_Free(stringbuffer->strings[n]); @@ -4644,7 +4644,7 @@ void VM_buf_cvarlist(prvm_prog_t *prog) stringbuffer->max_strings = stringbuffer->num_strings = n; if (stringbuffer->max_strings) stringbuffer->strings = (char **)Mem_Alloc(prog->progs_mempool, sizeof(stringbuffer->strings[0]) * stringbuffer->max_strings); - + n = 0; for(cvar = prog->console_cmd->cvars->vars; cvar; cvar = cvar->next) { @@ -4794,7 +4794,7 @@ void VM_uncolorstring (prvm_prog_t *prog) szString = PRVM_G_STRING(OFS_PARM0); COM_StringDecolorize(szString, 0, szNewString, sizeof(szNewString), true); PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString); - + } // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS) @@ -5569,14 +5569,14 @@ Common functions between menu.dat and clsprogs ========= */ -//#349 float() isdemo +//#349 float() isdemo void VM_CL_isdemo (prvm_prog_t *prog) { VM_SAFEPARMCOUNT(0, VM_CL_isdemo); PRVM_G_FLOAT(OFS_RETURN) = cls.demoplayback; } -//#355 float() videoplaying +//#355 float() videoplaying void VM_CL_videoplaying (prvm_prog_t *prog) { VM_SAFEPARMCOUNT(0, VM_CL_videoplaying); @@ -5704,7 +5704,7 @@ void VM_sprintf(prvm_prog_t *prog) // complete directive format: // %3$*1$.*2$ld - + width = -1; precision = -1; thisarg = -1; diff --git a/prvm_cmds.h b/prvm_cmds.h index a5555cde..89de7fe2 100644 --- a/prvm_cmds.h +++ b/prvm_cmds.h @@ -157,7 +157,7 @@ void cin_restart(string name) float[bool] gecko_create( string name ) void gecko_destroy( string name ) void gecko_navigate( string name, string URI ) -float[bool] gecko_keyevent( string name, float key, float eventtype ) +float[bool] gecko_keyevent( string name, float key, float eventtype ) void gecko_mousemove( string name, float x, float y ) ============================================================================== diff --git a/prvm_edict.c b/prvm_edict.c index ea839275..b1926d3b 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -1431,9 +1431,9 @@ qbool PRVM_ED_CallSpawnFunction(prvm_prog_t *prog, prvm_edict_t *ent, const char } else { - + Con_DPrint("No spawn function for:\n"); - if (developer.integer > 0) // don't confuse non-developers with errors + if (developer.integer > 0) // don't confuse non-developers with errors PRVM_ED_Print(prog, ent, NULL); PRVM_ED_Free (prog, ent); @@ -1540,7 +1540,7 @@ void PRVM_ED_LoadFromFile (prvm_prog_t *prog, const char *data) if(!PRVM_ED_CallSpawnFunction(prog, ent, data, start)) continue; - + PRVM_ED_CallPostspawnFunction(prog, ent); spawned++; diff --git a/prvm_exec.c b/prvm_exec.c index fd0ff40b..527d5bc2 100644 --- a/prvm_exec.c +++ b/prvm_exec.c @@ -852,7 +852,7 @@ static int PRVM_LeaveFunction (prvm_prog_t *prog) f->tprofile_total += prog->stack[prog->depth].tprofile_acc; f->builtinsprofile_total += prog->stack[prog->depth].builtinsprofile_acc; } - + return prog->stack[prog->depth].s; } diff --git a/prvm_execprogram.h b/prvm_execprogram.h index d9331426..7c090e9c 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -229,7 +229,7 @@ int i; &&handle_OP_GE_I, &&handle_OP_LT_I, &&handle_OP_GT_I, - + &&handle_OP_LE_IF, &&handle_OP_GE_IF, &&handle_OP_LT_IF, @@ -274,7 +274,7 @@ int i; &&handle_OP_GSTOREP_ENT, &&handle_OP_GSTOREP_FLD, &&handle_OP_GSTOREP_S, - &&handle_OP_GSTOREP_FNC, + &&handle_OP_GSTOREP_FNC, &&handle_OP_GSTOREP_V, &&handle_OP_GADDRESS, &&handle_OP_GLOAD_I, @@ -694,7 +694,7 @@ int i; HANDLE_OPCODE(OP_CALL6): HANDLE_OPCODE(OP_CALL7): HANDLE_OPCODE(OP_CALL8): -#ifdef PRVMTIMEPROFILING +#ifdef PRVMTIMEPROFILING tm = Sys_DirtyTime(); prog->xfunction->tprofile += (tm - starttm >= 0 && tm - starttm < 1800) ? (tm - starttm) : 0; starttm = tm; @@ -727,7 +727,7 @@ int i; if (builtinnumber < prog->numbuiltins && prog->builtins[builtinnumber]) { prog->builtins[builtinnumber](prog); -#ifdef PRVMTIMEPROFILING +#ifdef PRVMTIMEPROFILING tm = Sys_DirtyTime(); enterfunc->tprofile += (tm - starttm >= 0 && tm - starttm < 1800) ? (tm - starttm) : 0; prog->xfunction->tbprofile += (tm - starttm >= 0 && tm - starttm < 1800) ? (tm - starttm) : 0; @@ -760,7 +760,7 @@ int i; HANDLE_OPCODE(OP_DONE): HANDLE_OPCODE(OP_RETURN): -#ifdef PRVMTIMEPROFILING +#ifdef PRVMTIMEPROFILING tm = Sys_DirtyTime(); prog->xfunction->tprofile += (tm - starttm >= 0 && tm - starttm < 1800) ? (tm - starttm) : 0; starttm = tm; diff --git a/r_shadow.c b/r_shadow.c index 7363602a..adf30be7 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -877,7 +877,7 @@ int R_Shadow_CalcTriangleSideMask(const vec3_t p1, const vec3_t p2, const vec3_t if(an1 > bias*ap1 && an2 > bias*ap2 && an3 > bias*ap3) mask &= (3<<4) | (dn1 >= 0 ? (1<<0)|(2<<2) : (2<<0)|(1<<2)) - | (dn2 >= 0 ? (1<<0)|(2<<2) : (2<<0)|(1<<2)) + | (dn2 >= 0 ? (1<<0)|(2<<2) : (2<<0)|(1<<2)) | (dn3 >= 0 ? (1<<0)|(2<<2) : (2<<0)|(1<<2)); dp1 = p1[1] + p1[2], dn1 = p1[1] - p1[2], ap1 = fabs(dp1), an1 = fabs(dn1), @@ -886,7 +886,7 @@ int R_Shadow_CalcTriangleSideMask(const vec3_t p1, const vec3_t p2, const vec3_t if(ap1 > bias*an1 && ap2 > bias*an2 && ap3 > bias*an3) mask &= (3<<0) | (dp1 >= 0 ? (1<<2)|(1<<4) : (2<<2)|(2<<4)) - | (dp2 >= 0 ? (1<<2)|(1<<4) : (2<<2)|(2<<4)) + | (dp2 >= 0 ? (1<<2)|(1<<4) : (2<<2)|(2<<4)) | (dp3 >= 0 ? (1<<2)|(1<<4) : (2<<2)|(2<<4)); if(an1 > bias*ap1 && an2 > bias*ap2 && an3 > bias*ap3) mask &= (3<<0) @@ -1386,7 +1386,7 @@ void R_Shadow_RenderMode_Begin(void) GL_DepthMask(false); GL_Color(0, 0, 0, 1); GL_Scissor(r_refdef.view.viewport.x, r_refdef.view.viewport.y, r_refdef.view.viewport.width, r_refdef.view.viewport.height); - + r_shadow_rendermode = R_SHADOW_RENDERMODE_NONE; r_shadow_lightingrendermode = R_SHADOW_RENDERMODE_LIGHT_GLSL; @@ -1778,7 +1778,7 @@ static void R_Shadow_BounceGrid_UpdateSpacing(void) dlight_t *light; rtlight_t *rtlight; - // calculate bounds enclosing world lights as they should be noticably tighter + // calculate bounds enclosing world lights as they should be noticably tighter // than the world bounds on maps with unlit monster containers (see e1m7 etc) range = (unsigned int)Mem_ExpandableArray_IndexRange(&r_shadow_worldlightsarray); // checked for (lightindex = 0;lightindex < range;lightindex++) @@ -2760,9 +2760,9 @@ void R_Shadow_UpdateBounceGridTexture(void) qbool settingschanged; enable = R_Shadow_BounceGrid_CheckEnable(flag); - + R_Shadow_BounceGrid_GenerateSettings(&settings); - + // changing intensity does not require an update r_shadow_bouncegrid_state.intensity = r_shadow_bouncegrid_intensity.value; diff --git a/r_sprites.c b/r_sprites.c index 9bf13fb9..33915581 100644 --- a/r_sprites.c +++ b/r_sprites.c @@ -27,7 +27,7 @@ extern cvar_t r_overheadsprites_scaley; If the sprite is out of view, track it. `origin`, `left` and `up` are changed by this function to achive a rotation around the hotspot. - + --blub */ #define SIDE_TOP 1 @@ -61,12 +61,12 @@ static void R_TrackSprite(const entity_render_t *ent, vec3_t origin, vec3_t left float x, y; // screen X and Y coordinates float ax, ay; // absolute coords, used for division // I divide x and y by the greater absolute value to get ranges -1.0 to +1.0 - + bCoord[2] *= r_refdef.view.frustum_x; bCoord[1] *= r_refdef.view.frustum_y; //Con_Printf("%f %f %f\n", bCoord[0], bCoord[1], bCoord[2]); - + ax = fabs(bCoord[1]); ay = fabs(bCoord[2]); // get the greater value and determine the screen edge it's on @@ -84,8 +84,8 @@ static void R_TrackSprite(const entity_render_t *ent, vec3_t origin, vec3_t left else *edge = SIDE_LEFT; } - - // umm... + + // umm... if(ax < MIN_EPSILON) // this was == 0.0f before --blub ax = MIN_EPSILON; // get the -1 to +1 range @@ -103,18 +103,18 @@ static void R_TrackSprite(const entity_render_t *ent, vec3_t origin, vec3_t left // g is frustum Y // y is y // b is ay - + // real dist (r) shall be d, so // r*r = d*d + dfxa*dfxa + dgyb*dgyb // r*r = d*d * (1 + fxa*fxa + gyb*gyb) // d*d = r*r / (1 + fxa*fxa + gyb*gyb) // d = sqrt(r*r / (1 + fxa*fxa + gyb*gyb)) // thus: - distance = sqrt((distance*distance) / (1.0 + - r_refdef.view.frustum_x*r_refdef.view.frustum_x * x*x * ax*ax + + distance = sqrt((distance*distance) / (1.0 + r_refdef.view.frustum_x*r_refdef.view.frustum_x * x*x * ax*ax r_refdef.view.frustum_y*r_refdef.view.frustum_y * y*y * ay*ay)); // ^ the one we want ^ the one we have ^ our factors - + // Place the sprite a few units ahead of the player VectorCopy(r_refdef.view.origin, origin); VectorMA(origin, distance, r_refdef.view.forward, origin); @@ -157,7 +157,7 @@ static void R_RotateSprite(const mspriteframe_t *frame, vec3_t origin, vec3_t le 90.0f, // bottom 180.0f, // right }; - + // rotate around the hotspot according to which edge it's on // since the hotspot == the origin, only rotate the vectors matrix4x4_t rotm; @@ -168,7 +168,7 @@ static void R_RotateSprite(const mspriteframe_t *frame, vec3_t origin, vec3_t le if(edge < 1 || edge > 4) return; // this usually means something went wrong somewhere, there's no way to get a wrong edge value currently - + dir[0] = frame->right + frame->left; dir[1] = frame->down + frame->up; @@ -257,7 +257,7 @@ static void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, // fixed HUD pixel size specified in sprite // honors scale // honors a global label scaling cvar - + if(r_fb.water.renderingscene) // labels are considered HUD items, and don't appear in reflections return; @@ -267,7 +267,7 @@ static void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, // It has to be done before the calculations, because it moves the origin. if(r_track_sprites.integer) R_TrackSprite(ent, org, left, up, &edge, &dir_angle); - + scale = 2 * ent->scale * (DotProduct(r_refdef.view.forward, org) - DotProduct(r_refdef.view.forward, r_refdef.view.origin)) * r_labelsprites_scale.value; VectorScale(left, scale * r_refdef.view.frustum_x / vid_conwidth.integer, left); // 1px VectorScale(up, scale * r_refdef.view.frustum_y / vid_conheight.integer, up); // 1px @@ -290,7 +290,7 @@ static void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, // It has to be done before the calculations, because it moves the origin. if(r_track_sprites.integer) R_TrackSprite(ent, org, left, up, &edge, &dir_angle); - + scale = 2 * (DotProduct(r_refdef.view.forward, org) - DotProduct(r_refdef.view.forward, r_refdef.view.origin)); if(r_labelsprites_roundtopixels.integer) @@ -391,7 +391,7 @@ static void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, ent->flags, 0, ent->colormod[0], ent->colormod[1], ent->colormod[2], ent->alpha * ent->frameblend[i].lerp, 4, vertex3f, spritetexcoord2f, NULL, NULL, NULL, NULL, 2, polygonelement3i, polygonelement3s, false, false); frame = model->sprite.sprdata_frames + ent->frameblend[i].subframe; texture = R_GetCurrentTexture(model->data_textures + ent->frameblend[i].subframe); - + // sprites are fullbright by default, but if this one is not fullbright we // need to combine the lighting into ambient as sprite lighting is not // directional diff --git a/resource.h b/resource.h index 27fc918d..5851a4a5 100644 --- a/resource.h +++ b/resource.h @@ -5,7 +5,7 @@ #define IDI_ICON1 101 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 102 diff --git a/sbar.c b/sbar.c index 854c62a6..def89343 100644 --- a/sbar.c +++ b/sbar.c @@ -372,7 +372,7 @@ void Sbar_Init (void) Cvar_RegisterVariable(&cl_showdate); Cvar_RegisterVariable(&cl_showdate_format); Cvar_RegisterVariable(&cl_showtex); - + Cvar_RegisterVirtual(&cl_showfps, "showfps"); Cvar_RegisterVirtual(&cl_showsound, "showsound"); Cvar_RegisterVirtual(&cl_showblur, "showblur"); @@ -383,7 +383,7 @@ void Sbar_Init (void) Cvar_RegisterVirtual(&cl_showdate, "showdate"); Cvar_RegisterVirtual(&cl_showdate_format, "showdate_format"); Cvar_RegisterVirtual(&cl_showtex, "showtex"); - + Cvar_RegisterVariable(&sbar_alpha_bg); Cvar_RegisterVariable(&sbar_alpha_fg); Cvar_RegisterVariable(&sbar_hudselector); diff --git a/sbar.h b/sbar.h index 8f82d15b..d3a6d2dc 100644 --- a/sbar.h +++ b/sbar.h @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/snd_main.c b/snd_main.c index ebf84b9b..7a3aeea5 100644 --- a/snd_main.c +++ b/snd_main.c @@ -1189,7 +1189,7 @@ static channel_t *SND_PickChannel(int entnum, int entchannel) if (first_to_die == -1) return NULL; - + S_StopChannel (first_to_die, true, false); emptychan_found: @@ -1675,7 +1675,7 @@ void S_StopChannel (unsigned int channel_ind, qbool lockmutex, qbool freesfx) // threaded sound backends if (lockmutex && !simsound) SndSys_LockRenderBuffer(); - + ch = &channels[channel_ind]; sfx = ch->sfx; if (sfx != NULL) diff --git a/snd_ogg.c b/snd_ogg.c index 09d20c8e..c1d8b96c 100644 --- a/snd_ogg.c +++ b/snd_ogg.c @@ -555,7 +555,7 @@ static void OGG_DecodeTags(vorbis_comment *vc, unsigned int *start, unsigned int thiscomment = qvorbis_comment_query(vc, "REPLAYGAIN_TRACK_GAIN", 0); if(thiscomment) *gaindb = atof(thiscomment); - + startcomment = qvorbis_comment_query(vc, "LOOP_START", 0); // DarkPlaces, and some Japanese app if(startcomment) { diff --git a/snd_oss.c b/snd_oss.c index 05f91c92..a6cf71b1 100644 --- a/snd_oss.c +++ b/snd_oss.c @@ -68,7 +68,7 @@ qbool SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) else suggested->width = 2; } - + return false; } @@ -80,7 +80,7 @@ qbool SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) Con_Print("SndSys_Init: could not open /dev/dsp\n"); return false; } - + // Use non-blocking IOs if possible flags = fcntl(audio_fd, F_GETFL); if (flags != -1) @@ -90,7 +90,7 @@ qbool SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) } else Con_Print("SndSys_Init: fcntl(F_GETFL) failed!\n"); - + // Set the fragment size (up to "NB_FRAGMENTS" fragments of "fragmentsize" bytes) fragmentsize = requested->speed * requested->channels * requested->width / 10; fragmentsize = (unsigned int)ceilf((float)fragmentsize / (float)NB_FRAGMENTS); @@ -248,7 +248,7 @@ void SndSys_Submit (void) { unsigned int startoffset, factor, limit, nbframes; int written; - + if (audio_fd < 0 || snd_renderbuffer->startframe == snd_renderbuffer->endframe) return; @@ -262,7 +262,7 @@ void SndSys_Submit (void) written = SndSys_Write (&snd_renderbuffer->ring[startoffset * factor], limit * factor); if (written < 0 || (unsigned int)written < limit * factor) return; - + nbframes -= limit; startoffset = 0; } diff --git a/sv_ccmds.c b/sv_ccmds.c index 036f4c63..02591878 100644 --- a/sv_ccmds.c +++ b/sv_ccmds.c @@ -114,7 +114,7 @@ static void SV_Changelevel_f(cmd_state_t *cmd) SV_SaveSpawnparms (); strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level)); SV_SpawnServer(level); - + if(sv.active && host.hook.ConnectLocal != NULL) host.hook.ConnectLocal(); } @@ -146,7 +146,7 @@ static void SV_Restart_f(cmd_state_t *cmd) strlcpy(mapname, sv.name, sizeof(mapname)); SV_SpawnServer(mapname); - + if(sv.active && host.hook.ConnectLocal != NULL) host.hook.ConnectLocal(); } @@ -409,7 +409,7 @@ static void SV_Pause_f(cmd_state_t *cmd) print("Pause not allowed.\n"); return; } - + sv.paused ^= 1; if (cmd->source != src_local) SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un"); @@ -768,7 +768,7 @@ static void SV_Status_f(cmd_state_t *cmd) } else hours = 0; - + packetloss = 0; if (client->netconnection) for (j = 0;j < NETGRAPH_PACKETS;j++) @@ -802,7 +802,7 @@ static void SV_Status_f(cmd_state_t *cmd) frags = atoi(qcstatus); } } - + if (in == 0) // default layout { if (sv.protocol == PROTOCOL_QUAKE && svs.maxclients <= 99) @@ -843,7 +843,7 @@ void SV_Name(int clientnum) MSG_WriteByte (&sv.reliable_datagram, clientnum); MSG_WriteString (&sv.reliable_datagram, host_client->name); SV_WriteNetnameIntoDemo(host_client); - } + } } /* @@ -1379,10 +1379,10 @@ static void SV_Viewprev_f(cmd_state_t *cmd) static void SV_SendCvar_f(cmd_state_t *cmd) { - int i; + int i; const char *cvarname; client_t *old; - + if(Cmd_Argc(cmd) != 2) return; @@ -1434,7 +1434,7 @@ static void SV_Ent_Create_f(cmd_state_t *cmd) Matrix4x4_OriginFromMatrix(&view, org); VectorSet(temp, 65536, 0, 0); - Matrix4x4_Transform(&view, temp, dest); + Matrix4x4_Transform(&view, temp, dest); trace = SV_TraceLine(org, dest, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value); @@ -1480,7 +1480,7 @@ static void SV_Ent_Create_f(cmd_state_t *cmd) // Spawn it PRVM_ED_CallPrespawnFunction(prog, ed); - + if(!PRVM_ED_CallSpawnFunction(prog, ed, NULL, NULL)) { print("Could not spawn a \"%s\". No such entity or it has no spawn function\n", Cmd_Argv(cmd, 1)); @@ -1490,7 +1490,7 @@ static void SV_Ent_Create_f(cmd_state_t *cmd) return; } - PRVM_ED_CallPostspawnFunction(prog, ed); + PRVM_ED_CallPostspawnFunction(prog, ed); // Make it appear in the world SV_LinkEdict(ed); @@ -1530,10 +1530,10 @@ static void SV_Ent_Remove_f(cmd_state_t *cmd) Matrix4x4_OriginFromMatrix(&view, org); VectorSet(temp, 65536, 0, 0); - Matrix4x4_Transform(&view, temp, dest); + Matrix4x4_Transform(&view, temp, dest); trace = SV_TraceLine(org, dest, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY, 0, 0, collision_extendmovelength.value); - + if(trace.ent) ednum = (int)PRVM_EDICT_TO_PROG(trace.ent); if(!trace.ent || !ednum) @@ -1609,7 +1609,7 @@ void SV_InitOperatorCommands(void) Cvar_RegisterVariable(&sv_status_privacy); Cvar_RegisterVariable(&sv_status_show_qcstatus); Cvar_RegisterVariable(&sv_namechangetimer); - + Cmd_AddCommand(CF_SERVER | CF_SERVER_FROM_CLIENT, "status", SV_Status_f, "print server status information"); Cmd_AddCommand(CF_SHARED, "map", SV_Map_f, "kick everyone off the server and start a new level"); Cmd_AddCommand(CF_SHARED, "restart", SV_Restart_f, "restart current level"); @@ -1641,7 +1641,7 @@ void SV_InitOperatorCommands(void) Cmd_AddCommand(CF_CHEAT | CF_SERVER_FROM_CLIENT, "noclip", SV_Noclip_f, "noclip mode (flight without collisions, move through walls)"); Cmd_AddCommand(CF_CHEAT | CF_SERVER_FROM_CLIENT, "give", SV_Give_f, "alter inventory"); Cmd_AddCommand(CF_SERVER_FROM_CLIENT, "kill", SV_Kill_f, "die instantly"); - + Cmd_AddCommand(CF_USERINFO, "color", SV_Color_f, "change your player shirt and pants colors"); Cmd_AddCommand(CF_USERINFO, "name", SV_Name_f, "change your player name"); Cmd_AddCommand(CF_USERINFO, "rate", SV_Rate_f, "change your network connection speed"); diff --git a/sv_demo.c b/sv_demo.c index 08ebe841..648fff5e 100644 --- a/sv_demo.c +++ b/sv_demo.c @@ -40,7 +40,7 @@ void SV_WriteDemoMessage(client_t *client, sizebuf_t *sendbuffer, qbool clientto return; if(sendbuffer->cursize == 0) return; - + temp = sendbuffer->cursize | (clienttoserver ? DEMOMSG_CLIENT_TO_SERVER : 0); len = LittleLong(temp); FS_Write(client->sv_demo_file, &len, 4); @@ -60,7 +60,7 @@ void SV_StopDemoRecording(client_t *client) if(client->sv_demo_file == NULL) return; - + buf.data = bufdata; buf.maxsize = sizeof(bufdata); SZ_Clear(&buf); diff --git a/sv_ents_csqc.c b/sv_ents_csqc.c index 3e09b3ca..b6e31c8a 100644 --- a/sv_ents_csqc.c +++ b/sv_ents_csqc.c @@ -44,7 +44,7 @@ void EntityFrameCSQC_LostFrame(client_t *client, int framenum) ringlast = (ringfirst + NUM_CSQCENTITYDB_FRAMES - 1) % NUM_CSQCENTITYDB_FRAMES; // most recently added entry valid = false; - + for(j = 0; j < NUM_CSQCENTITYDB_FRAMES; ++j) { d = &client->csqcentityframehistory[(ringfirst + j) % NUM_CSQCENTITYDB_FRAMES]; @@ -79,7 +79,7 @@ void EntityFrameCSQC_LostFrame(client_t *client, int framenum) ringfirst = (ringfirst + j) % NUM_CSQCENTITYDB_FRAMES; if(ringlast < ringfirst) ringlast += NUM_CSQCENTITYDB_FRAMES; - + memset(recoversendflags, 0, sizeof(recoversendflags)); for(j = ringfirst; j <= ringlast; ++j) @@ -345,6 +345,6 @@ qbool EntityFrameCSQC_WriteFrame (sizebuf_t *msg, int maxsize, int numnumbers, c // if no single ent got added, remove the frame from the DB again, to allow // for a larger history EntityFrameCSQC_DeallocFrame(client, framenum); - + return sectionstarted; } diff --git a/sv_main.c b/sv_main.c index 16fd612b..686ae703 100644 --- a/sv_main.c +++ b/sv_main.c @@ -1174,7 +1174,7 @@ static void Download_CheckExtensions(cmd_state_t *cmd) // first reset them all host_client->download_deflate = false; - + for(i = 2; i < argc; ++i) { if(!strcmp(Cmd_Argv(cmd, i), "deflate")) @@ -1218,7 +1218,7 @@ static void SV_Download_f(cmd_state_t *cmd) } is_csqc = (sv.csqc_progname[0] && strcmp(Cmd_Argv(cmd, 1), sv.csqc_progname) == 0); - + if (!sv_allowdownloads.integer && !is_csqc) { SV_ClientPrintf("Downloads are disabled on this server\n"); @@ -1239,17 +1239,17 @@ static void SV_Download_f(cmd_state_t *cmd) { char extensions[MAX_QPATH]; // make sure this can hold all extensions extensions[0] = '\0'; - + if(host_client->download_deflate) strlcat(extensions, " deflate", sizeof(extensions)); - + Con_DPrintf("Downloading %s to %s\n", host_client->download_name, host_client->name); if(host_client->download_deflate && svs.csqc_progdata_deflated) host_client->download_file = FS_FileFromData(svs.csqc_progdata_deflated, svs.csqc_progsize_deflated, true); else host_client->download_file = FS_FileFromData(svs.csqc_progdata, sv.csqc_progsize, true); - + // no, no space is needed between %s and %s :P SV_ClientCommands("\ncl_downloadbegin %i %s%s\n", (int)FS_FileSize(host_client->download_file), host_client->download_name, extensions); @@ -1352,7 +1352,7 @@ static void SV_Download_f(cmd_state_t *cmd) { char extensions[MAX_QPATH]; // make sure this can hold all extensions extensions[0] = '\0'; - + if(host_client->download_deflate) strlcat(extensions, " deflate", sizeof(extensions)); @@ -1702,7 +1702,7 @@ static void SV_Prepare_CSQC(void) svs.csqc_progdata = NULL; svs.csqc_progdata_deflated = NULL; - + sv.csqc_progname[0] = 0; svs.csqc_progdata = FS_LoadFile(csqc_progname.string, sv_mempool, false, &progsize); @@ -2623,7 +2623,7 @@ double SV_Frame(double time) ++svs.perf_acc_offset_samples; svs.perf_acc_offset += offset; svs.perf_acc_offset_squared += offset * offset; - + if(svs.perf_acc_offset_max < offset) svs.perf_acc_offset_max = offset; } diff --git a/sv_save.c b/sv_save.c index 4c0eca7d..84b4b73c 100644 --- a/sv_save.c +++ b/sv_save.c @@ -139,7 +139,7 @@ void SV_Savegame_to(prvm_prog_t *prog, const char *name) // (like newline, specifically) into escape codes s = stringbuffer->strings[k]; for (l = 0;l < (int)sizeof(line) - 2 && *s;) - { + { if (*s == '\n') { line[l++] = '\\'; @@ -551,7 +551,7 @@ void SV_Loadgame_f(cmd_state_t *cmd) else Con_Printf(CON_ERROR "failed to create stringbuffer %i \"%s\"\n", i, com_token); } - } + } // skip any trailing text or unrecognized commands while (COM_ParseToken_Simple(&t, true, false, true) && strcmp(com_token, "\n")) ; diff --git a/sv_send.c b/sv_send.c index a9675530..02183f81 100644 --- a/sv_send.c +++ b/sv_send.c @@ -1209,7 +1209,7 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t { statsf[STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR] = sv_airaccel_qw_stretchfactor.value; statsf[STAT_MOVEVARS_AIRCONTROL_PENALTY] = sv_aircontrol_penalty.value; - statsf[STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW] = sv_airspeedlimit_nonqw.value; + statsf[STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW] = sv_airspeedlimit_nonqw.value; statsf[STAT_MOVEVARS_AIRSTRAFEACCEL_QW] = sv_airstrafeaccel_qw.value; statsf[STAT_MOVEVARS_AIRCONTROL_POWER] = sv_aircontrol_power.value; // movement settings for prediction @@ -1230,7 +1230,7 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t statsf[STAT_MOVEVARS_AIRCONTROL] = sv_aircontrol.value; statsf[STAT_FRAGLIMIT] = fraglimit.value; statsf[STAT_TIMELIMIT] = timelimit.value; - statsf[STAT_MOVEVARS_FRICTION] = sv_friction.value; + statsf[STAT_MOVEVARS_FRICTION] = sv_friction.value; statsf[STAT_MOVEVARS_WATERFRICTION] = sv_waterfriction.value >= 0 ? sv_waterfriction.value : sv_friction.value; statsf[STAT_MOVEVARS_TICRATE] = sys_ticrate.value; statsf[STAT_MOVEVARS_TIMESCALE] = host_timescale.value; diff --git a/svvm_cmds.c b/svvm_cmds.c index ed5bb5aa..33f2e7c2 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -2499,7 +2499,7 @@ void SV_GetEntityMatrix (prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, scale = PRVM_serveredictfloat(ent, scale); if (!scale) scale = 1.0f; - + if (viewmatrix) Matrix4x4_CreateFromQuakeEntity(out, PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2] + PRVM_serveredictvector(ent, view_ofs)[2], PRVM_serveredictvector(ent, v_angle)[0], PRVM_serveredictvector(ent, v_angle)[1], PRVM_serveredictvector(ent, v_angle)[2], scale * cl_viewmodel_scale.value); else @@ -2902,7 +2902,7 @@ static void VM_SV_pointparticles(prvm_prog_t *prog) qbool SV_VM_ConsoleCommand (const char *text) { prvm_prog_t *prog = SVVM_prog; - return PRVM_ConsoleCommand(prog, text, &prog->funcoffsets.ConsoleCmd, true, PRVM_EDICT_TO_PROG(sv.world.prog->edicts), sv.time, !(!sv.active || !prog || !prog->loaded), "QC function ConsoleCmd is missing"); + return PRVM_ConsoleCommand(prog, text, &prog->funcoffsets.ConsoleCmd, true, PRVM_EDICT_TO_PROG(sv.world.prog->edicts), sv.time, !(!sv.active || !prog || !prog->loaded), "QC function ConsoleCmd is missing"); } // #352 void(string cmdname) registercommand (EXT_CSQC) diff --git a/sys.h b/sys.h index f6cd4647..33b28f58 100644 --- a/sys.h +++ b/sys.h @@ -75,7 +75,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # elif TARGET_OS_MAC # define DP_OS_NAME "macOS" # define DP_OS_STR "macos" -# endif +# endif #elif defined(__MORPHOS__) # define DP_OS_NAME "MorphOS" # define DP_OS_STR "morphos" @@ -175,7 +175,7 @@ dllfunction_t; qbool Sys_LoadSelf(dllhandle_t *handle); -/*! Loads a dependency library. +/*! Loads a dependency library. * \param dllnames a NULL terminated array of possible names for the DLL you want to load. * \param handle * \param fcts diff --git a/sys_sdl.c b/sys_sdl.c index 1bf22cd0..426e12b4 100644 --- a/sys_sdl.c +++ b/sys_sdl.c @@ -62,7 +62,7 @@ void Sys_Error (const char *error, ...) va_end (argptr); Con_Printf(CON_ERROR "Engine Error: %s\n", string); - + if(!nocrashdialog) SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Engine Error", string, NULL); @@ -222,7 +222,7 @@ int main (int argc, char *argv[]) Host_Main(); Sys_Quit(0); - + return 0; } diff --git a/sys_shared.c b/sys_shared.c index 39c9bf8b..7327156c 100644 --- a/sys_shared.c +++ b/sys_shared.c @@ -391,7 +391,7 @@ double Sys_DirtyTime(void) if (QueryPerformanceFrequency (&PerformanceFreq)) { QueryPerformanceCounter (&PerformanceCount); - + timescale = 1.0 / ((double) PerformanceFreq.LowPart + (double) PerformanceFreq.HighPart * 65536.0 * 65536.0); return ((double) PerformanceCount.LowPart + (double) PerformanceCount.HighPart * 65536.0 * 65536.0) * timescale; } diff --git a/timing.h b/timing.h index 33da8584..6765dd17 100644 --- a/timing.h +++ b/timing.h @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. double currentTime = Sys_DirtyTime(); \ Con_Printf ("%s: %.3g s\n", S, currentTime - _timing_start_); \ } - + #define TIMING_TIMESTATEMENT(Stmt) \ { \ TIMING_BEGIN \ diff --git a/todo b/todo index 28e8cb6c..04098841 100644 --- a/todo +++ b/todo @@ -1,7 +1,7 @@ - todo: difficulty ratings are: 0 = trivial, 1 = easy, 2 = easy-moderate, 3 = moderate, 4 = moderate-hard, 5 = hard, 6 = hard++, 7 = nightmare, d = done, -d = done but have not notified the people who asked for it, f = failed, -f = failed but have not notified the people who asked for it -d bug darkplaces d3d9: drawsetcliparea not working right - seems to be Y-flipped, this also affects menus in Steelstorm (VorteX) -d bug darkplaces d3d9: overbright particles get weird colors (VorteX) -0 bug darkplaces server browser: scrolling wraps weirdly (causing duplicates of first entry) when there are fewer servers than a full screen can show (LordHavoc) +0 bug darkplaces server browser: scrolling wraps weirdly (causing duplicates of first entry) when there are fewer servers than a full screen can show (LordHavoc) 0 bug darkplaces android: make sure android:theme is set reasonably to avoid having performance issues on Adreno (it may need to be android:theme="@android:style/Theme.Translucent" or maybe some other value?) (banshee21) 0 bug darkplaces client csqc: CSQC_InputEvent is supposed to handle mouse movement, compare to FTEQW code (avirox) 0 bug darkplaces client csqc: engine prediction function is not implemented - could just return the engine's current cl.movement_origin (Spike) diff --git a/utf8lib.c b/utf8lib.c index 155b4aea..099aaf8c 100644 --- a/utf8lib.c +++ b/utf8lib.c @@ -77,7 +77,7 @@ findchar: if (_len) *_len = 0; return false; } - + if (bits == 1) { // ascii if (_start) *_start = i; if (_len) *_len = 1; diff --git a/vid_sdl.c b/vid_sdl.c index 5b581c5d..749a2439 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -988,7 +988,7 @@ void IN_Move( void ) { // have the mouse stuck in the middle, example use: prevent expose effect of beryl during the game when not using // window grabbing. --blub - + // we need 2 frames to initialize the center position if(!stuck) { @@ -1447,7 +1447,7 @@ static void AdjustWindowBounds(viddef_mode_t *mode, RECT *rect) workWidth = workArea.right - workArea.left; workHeight = workArea.bottom - workArea.top; - // SDL forces the window height to be <= screen height - 27px (on Win8.1 - probably intended for the title bar) + // SDL forces the window height to be <= screen height - 27px (on Win8.1 - probably intended for the title bar) // If the task bar is docked to the the left screen border and we move the window to negative y, // there would be some part of the regular desktop visible on the bottom of the screen. screenHeight = GetSystemMetrics(SM_CYSCREEN); @@ -1464,7 +1464,7 @@ static void AdjustWindowBounds(viddef_mode_t *mode, RECT *rect) rect->top = workArea.top + titleBarPixels; mode->height = workHeight - titleBarPixels; } - else + else { rect->left = workArea.left + max(0, (workWidth - width) / 2); rect->top = workArea.top + max(0, (workHeight - height) / 2); @@ -1635,7 +1635,7 @@ static qbool VID_InitModeGL(viddef_mode_t *mode) vid_hasfocus = true; vid_usingmouse = false; vid_usinghidecursor = false; - + return true; } diff --git a/view.c b/view.c index e9c0352a..b1664779 100644 --- a/view.c +++ b/view.c @@ -1160,10 +1160,10 @@ void V_CalcViewBlend(void) r_refdef.viewblend[1] *= (1.0f/256.0f); r_refdef.viewblend[2] *= (1.0f/256.0f); } - + // Samual: Ugly hack, I know. But it's the best we can do since // there is no way to detect client states from the engine. - if (cl.stats[STAT_HEALTH] <= 0 && cl.stats[STAT_HEALTH] != -666 && + if (cl.stats[STAT_HEALTH] <= 0 && cl.stats[STAT_HEALTH] != -666 && cl.stats[STAT_HEALTH] != -2342 && cl_deathfade.value > 0) { cl.deathfade += cl_deathfade.value * max(0.00001, cl.time - cl.oldtime); @@ -1287,7 +1287,7 @@ void V_Init (void) Cvar_RegisterVariable (&v_kickpitch); Cvar_RegisterVariable (&cl_stairsmoothspeed); - + Cvar_RegisterVariable (&cl_smoothviewheight); Cvar_RegisterVariable (&chase_back); diff --git a/vpk.h b/vpk.h index 3490766f..ac21ac46 100644 --- a/vpk.h +++ b/vpk.h @@ -26,12 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* * The VPK format is Valve's package format for Source engine games, * used to store game content. - * + * * Game content is spread across multiple VPK files. A single, special * VPK file, ending in _dir.vpk, contains a centralized directory * tree for all of the other files, and has its own header. * Although content can be stored in the directory file. - * + * * This is useful for navigating game content without having * to guess which VPK some file belongs to, while also * making game updates more efficient by spreading content diff --git a/world.c b/world.c index 229fbe7e..98d43951 100644 --- a/world.c +++ b/world.c @@ -515,7 +515,7 @@ enum dContactMotionN = 0x080, dContactSlip1 = 0x100, dContactSlip2 = 0x200, - + dContactApprox0 = 0x0000, dContactApprox1_1 = 0x1000, dContactApprox1_2 = 0x2000, @@ -1613,11 +1613,11 @@ static void World_Physics_UpdateODE(world_t *world) dWorldSetAutoDisableFlag(odeworld, (physics_ode_autodisable.integer) ? 1 : 0); if (physics_ode_autodisable.integer) { - dWorldSetAutoDisableSteps(odeworld, bound(1, physics_ode_autodisable_steps.integer, 100)); + dWorldSetAutoDisableSteps(odeworld, bound(1, physics_ode_autodisable_steps.integer, 100)); dWorldSetAutoDisableTime(odeworld, physics_ode_autodisable_time.value); dWorldSetAutoDisableAverageSamplesCount(odeworld, bound(1, physics_ode_autodisable_threshold_samples.integer, 100)); - dWorldSetAutoDisableLinearThreshold(odeworld, physics_ode_autodisable_threshold_linear.value); - dWorldSetAutoDisableAngularThreshold(odeworld, physics_ode_autodisable_threshold_angular.value); + dWorldSetAutoDisableLinearThreshold(odeworld, physics_ode_autodisable_threshold_linear.value); + dWorldSetAutoDisableAngularThreshold(odeworld, physics_ode_autodisable_threshold_angular.value); } } @@ -2072,8 +2072,8 @@ static void World_Physics_Frame_JointFromEntity(world_t *world, prvm_edict_t *ed } // test convex geometry data -// planes for a cube, these should coincide with the -dReal test_convex_planes[] = +// planes for a cube, these should coincide with the +dReal test_convex_planes[] = { 1.0f ,0.0f ,0.0f ,2.25f, 0.0f ,1.0f ,0.0f ,2.25f, @@ -2084,7 +2084,7 @@ dReal test_convex_planes[] = }; const unsigned int test_convex_planecount = 6; // points for a cube -dReal test_convex_points[] = +dReal test_convex_points[] = { 2.25f,2.25f,2.25f, // point 0 -2.25f,2.25f,2.25f, // point 1 @@ -2096,8 +2096,8 @@ dReal test_convex_points[] = -2.25f,-2.25f,-2.25f, // point 7 }; const unsigned int test_convex_pointcount = 8; -// polygons for a cube (6 squares), index -unsigned int test_convex_polygons[] = +// polygons for a cube (6 squares), index +unsigned int test_convex_polygons[] = { 4,0,2,6,4, // positive X 4,1,0,4,5, // positive Y @@ -2385,7 +2385,7 @@ static void World_Physics_Frame_BodyFromEntity(world_t *world, prvm_edict_t *ed) { // already formed a polygon? if (used[triangleindex]) - continue; + continue; // init polygon // switch clockwise->counterclockwise ie = &model->brush.collisionmesh->element3i[triangleindex*3]; @@ -2467,8 +2467,8 @@ static void World_Physics_Frame_BodyFromEntity(world_t *world, prvm_edict_t *ed) polygons = polygonsData; for (i = 0; i < numplanes; i++) { - if((pointsData[(polygons[1]*3)+0]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+2] + - pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+2]*pointsData[(polygons[3]*3)+0] + + if((pointsData[(polygons[1]*3)+0]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+2] + pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+2]*pointsData[(polygons[3]*3)+0] pointsData[(polygons[1]*3)+2]*pointsData[(polygons[2]*3)+0]*pointsData[(polygons[3]*3)+1] - pointsData[(polygons[1]*3)+2]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+0] - pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+0]*pointsData[(polygons[3]*3)+2] - @@ -2919,7 +2919,7 @@ static void nearCallback (void *data, dGeomID o1, dGeomID o2) // at least one object has to be using MOVETYPE_PHYSICS and should be enabled or we just don't care if (!b1enabled && !b2enabled) return; - + // exit without doing anything if the two bodies are connected by a joint if (b1 && b2 && dAreConnectedExcluding(b1, b2, dJointTypeContact)) return; @@ -3040,7 +3040,7 @@ void World_Physics_Frame(world_t *world, double frametime, double gravity) world->physics.ode_iterations++; world->physics.ode_time -= world->physics.ode_step; } - } + } world->physics.ode_movelimit = physics_ode_movelimit.value / world->physics.ode_step; World_Physics_UpdateODE(world); -- 2.39.2