diff --git a/src/g_game.c b/src/g_game.c index a9446714d..9db9c413b 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -897,12 +897,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics) turnright = PLAYER1INPUTDOWN(gc_turnright); turnleft = PLAYER1INPUTDOWN(gc_turnleft); - + straferkey = PLAYER1INPUTDOWN(gc_straferight); strafelkey = PLAYER1INPUTDOWN(gc_strafeleft); movefkey = PLAYER1INPUTDOWN(gc_forward); movebkey = PLAYER1INPUTDOWN(gc_backward); - + mouseaiming = (PLAYER1INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook.value; analogjoystickmove = cv_usejoystick.value && !Joystick.bGamepadStyle; gamepadjoystickmove = cv_usejoystick.value && Joystick.bGamepadStyle; diff --git a/src/hu_stuff.c b/src/hu_stuff.c index cd57c7d84..28b20f61e 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -994,12 +994,12 @@ static void HU_DrawCEcho(void) static void HU_drawGametype(void) { const char *strvalue = NULL; - + if (gametype < 0 || gametype >= NUMGAMETYPES) return; // not a valid gametype??? strvalue = Gametype_Names[gametype]; - + if (splitscreen) V_DrawString(4, 184, 0, strvalue); else diff --git a/src/p_enemy.c b/src/p_enemy.c index 11e043be1..9acc8430e 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -10557,36 +10557,36 @@ void A_Boss5Jump(mobj_t *actor) angle_t theta; // Angle of attack // INT32 locvar1 = var1; // INT32 locvar2 = var2; - + #ifdef HAVE_BLUA if (LUA_CallAction("A_Boss5Jump", actor)) return; #endif - + if (!actor->tracer) return; // Don't even bother if we've got nothing to aim at. - + // Look up actor's current gravity situation if (actor->subsector->sector->gravity) g = FixedMul(gravity,(FixedDiv(*actor->subsector->sector->gravity>>FRACBITS, 1000))); else g = gravity; - + // Look up distance between actor and its tracer x = P_AproxDistance(actor->tracer->x - actor->x, actor->tracer->y - actor->y); // Look up height difference between actor and its tracer y = actor->tracer->z - actor->z; - + // Get x^2 + y^2. Have to do it in a roundabout manner, because this overflows fixed_t way too easily otherwise. x_int = x>>FRACBITS; y_int = y>>FRACBITS; intHypotenuse = (x_int*x_int) + (y_int*y_int); fixedHypotenuse = FixedSqrt(intHypotenuse) *256; - + // a = g(y+/-sqrt(x^2+y^2)). a1 can be +, a2 can be -. a1 = FixedMul(g,y+fixedHypotenuse); a2 = FixedMul(g,y-fixedHypotenuse); - + // Determine which one isn't actually an imaginary number (or the smaller of the two, if both are real), and use that for v. if (a1 < 0 || a2 < 0) { @@ -10608,7 +10608,7 @@ void A_Boss5Jump(mobj_t *actor) // We can cut the "+/- sqrt" part out entirely, since v was calculated specifically for it to equal zero. So: //theta = tantoangle[FixedDiv(aToUse,FixedMul(g,x)) >> DBITS]; theta = tantoangle[SlopeDiv(aToUse,FixedMul(g,x))]; - + // Okay, complicated math done. Let's make this object jump already. A_FaceTracer(actor); diff --git a/src/p_spec.c b/src/p_spec.c index 803c1ab86..dbee873ec 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -145,7 +145,7 @@ void P_InitPicAnims(void) size_t i; I_Assert(animdefs == NULL); - + maxanims = 0; for (w = numwadfiles-1; w >= 0; w--) @@ -161,7 +161,7 @@ void P_InitPicAnims(void) animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", (UINT16)w, animdefsLumpNum + 1); } } - + // Define the last one animdefs[maxanims].istexture = -1; strncpy(animdefs[maxanims].endname, "", 9); diff --git a/src/r_data.c b/src/r_data.c index 1a6162dc2..c4209fad6 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -1196,7 +1196,7 @@ lumpnum_t R_GetFlatNumForName(const char *name) // Scan wad files backwards so patched flats take preference. for (i = numwadfiles - 1; i >= 0; i--) { - + if (wadfiles[i]->type == RET_PK3) { start = W_CheckNumForFolderStartPK3("Flats/", i, 0); diff --git a/src/r_main.c b/src/r_main.c index c5f64c1e9..9d0a8fe60 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1311,7 +1311,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_translucenthud); CV_RegisterVar(&cv_maxportals); - + CV_RegisterVar(&cv_movebob); #ifdef HWRENDER diff --git a/src/w_wad.c b/src/w_wad.c index c8701f98f..75bf40983 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -617,7 +617,7 @@ UINT16 W_InitFile(const char *filename) lumpinfo_t *lump_p; filelump_t *fileinfo; void *fileinfov; - + type = RET_WAD; // read the header diff --git a/src/w_wad.h b/src/w_wad.h index 14bf4d85f..f06725884 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -43,11 +43,11 @@ typedef struct } ATTRPACK filelump_t; // Available compression methods for lumps. -typedef enum +typedef enum { - CM_NOCOMPRESSION, - CM_DEFLATE, - CM_LZF, + CM_NOCOMPRESSION, + CM_DEFLATE, + CM_LZF, CM_UNSUPPORTED } compmethod;