Skip to content

Commit

Permalink
[Meta] trim EOL whitespace (#1202)
Browse files Browse the repository at this point in the history
* trim EOL whitespace

* draw the rest of the owl

* fix encoding issue with JK2 cg_effects.cpp
  • Loading branch information
Razish authored Feb 19, 2024
1 parent 8e56d3c commit 4547d40
Show file tree
Hide file tree
Showing 196 changed files with 3,800 additions and 3,800 deletions.
14 changes: 7 additions & 7 deletions cmake/Modules/InstallZIP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,35 @@ if(WIN32)
set(ZIP_COMMAND "${ZIP_EXECUTABLE}" -P "<ARCHIVE>" <FILES>)
endif()
endif()

if(NOT ZIP_EXECUTABLE)
find_program(ZIP_EXECUTABLE wzzip PATHS "$ENV{ProgramW6432}/WinZip")
if(ZIP_EXECUTABLE)
set(ZIP_COMMAND "${ZIP_EXECUTABLE}" -P "<ARCHIVE>" <FILES>)
endif()
endif()

if(NOT ZIP_EXECUTABLE)
find_program(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip")
if(ZIP_EXECUTABLE)
set(ZIP_COMMAND "${ZIP_EXECUTABLE}" a -tzip "<ARCHIVE>" <FILES>)
endif()
endif()

if(NOT ZIP_EXECUTABLE)
find_program(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramW6432}/7-Zip")
if(ZIP_EXECUTABLE)
set(ZIP_COMMAND "${ZIP_EXECUTABLE}" a -tzip "<ARCHIVE>" <FILES>)
endif()
endif()

if(NOT ZIP_EXECUTABLE)
find_program(ZIP_EXECUTABLE winrar PATHS "$ENV{ProgramFiles}/WinRAR")
if(ZIP_EXECUTABLE)
set(ZIP_COMMAND "${ZIP_EXECUTABLE}" a "<ARCHIVE>" <FILES>)
endif()
endif()

if(NOT ZIP_EXECUTABLE)
find_program(ZIP_EXECUTABLE winrar PATHS "$ENV{ProgramW6432}/WinRAR")
if(ZIP_EXECUTABLE)
Expand All @@ -85,7 +85,7 @@ if(NOT ZIP_EXECUTABLE)
else()
find_program(ZIP_EXECUTABLE zip)
endif()

if(ZIP_EXECUTABLE)
set(ZIP_COMMAND "${ZIP_EXECUTABLE}" -r "<ARCHIVE>" . -i<FILES>)
endif()
Expand All @@ -94,7 +94,7 @@ endif()
function(add_zip_command output)
set(MultiValueArgs FILES DEPENDS)
cmake_parse_arguments(ARGS "" "" "${MultiValueArgs}" ${ARGN})

set(ZipCommand ${ZIP_COMMAND})
string(REPLACE <ARCHIVE> "${output}" ZipCommand "${ZipCommand}")
string(REPLACE <FILES> "${ARGS_FILES}" ZipCommand "${ZipCommand}")
Expand Down
2 changes: 1 addition & 1 deletion code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ if(BuildSPEngine OR BuildJK2SPEngine)
)
source_group("common" FILES ${SPEngineCommonFiles})
set(SPEngineFiles ${SPEngineFiles} ${SPEngineCommonFiles})

set(SPEngineCommonSafeFiles
"${SharedDir}/qcommon/safe/files.cpp"
"${SharedDir}/qcommon/safe/files.h"
Expand Down
2 changes: 1 addition & 1 deletion code/cgame/cg_credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static bool SortBySurname(const StringAndSize_t &str1, const StringAndSize_t &st
{
std::string::const_reverse_iterator rstart1 = std::find_if(str1.str.rbegin(), str1.str.rend(), isspace);
std::string::const_reverse_iterator rstart2 = std::find_if(str2.str.rbegin(), str2.str.rend(), isspace);


return Q_stricmp(&*rstart1.base(), &*rstart2.base()) < 0;
}
Expand Down
4 changes: 2 additions & 2 deletions code/game/g_roff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void G_RoffNotetrackCallback( gentity_t *ent, const char *notetrack)
// notetrack = "loop rof relative";
// notetrack = "loop sfx sound/vehicles/tie/loop.wav";
// notetrack = "loop sfx kill";
//'loop rof' notes:
//'loop rof' notes:
// (1) absolute ==> reset rof to original delta position/rotation world location before looping.
// (2) relative ==> reset rof to original delta position/rotation at current location before looping.
//'loop sfx' notes:
Expand Down Expand Up @@ -742,7 +742,7 @@ void G_Roff( gentity_t *ent )
move_rotate2_t *data = &((move_rotate2_t *)roff->data)[ ent->roff_ctr ];
VectorCopy( data->origin_delta, org );
VectorCopy( data->rotate_delta, ang );

if ( data->mStartNote != -1 )
{
for ( int n = 0; n < data->mNumNotes; n++ )
Expand Down
22 changes: 11 additions & 11 deletions code/game/g_svcmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ static svcmd_t svcmds[] = {
{ "saberColor", Svcmd_SaberColor_f, CMD_CHEAT },
{ "saber", Svcmd_Saber_f, CMD_CHEAT },
{ "saberBlade", Svcmd_SaberBlade_f, CMD_CHEAT },

{ "setForceJump", Svcmd_ForceSetLevel_f<FP_LEVITATION>, CMD_CHEAT },
{ "setSaberThrow", Svcmd_ForceSetLevel_f<FP_SABERTHROW>, CMD_CHEAT },
{ "setForceHeal", Svcmd_ForceSetLevel_f<FP_HEAL>, CMD_CHEAT },
Expand All @@ -926,29 +926,29 @@ static svcmd_t svcmds[] = {
{ "setForceSight", Svcmd_ForceSetLevel_f<FP_SEE>, CMD_CHEAT },
{ "setForceAll", Svcmd_SetForceAll_f, CMD_CHEAT },
{ "setSaberAll", Svcmd_SetSaberAll_f, CMD_CHEAT },

{ "saberAttackCycle", Svcmd_SaberAttackCycle_f, CMD_NONE },

{ "runscript", Svcmd_RunScript_f, CMD_CHEAT },

{ "playerTeam", Svcmd_PlayerTeam_f, CMD_CHEAT },

{ "control", Svcmd_Control_f, CMD_CHEAT },
{ "grab", Svcmd_Grab_f, CMD_CHEAT },
{ "knockdown", Svcmd_Knockdown_f, CMD_CHEAT },

{ "playerModel", Svcmd_PlayerModel_f, CMD_NONE },
{ "playerTint", Svcmd_PlayerTint_f, CMD_NONE },

{ "nexttestaxes", G_NextTestAxes, CMD_NONE },

{ "exitview", Svcmd_ExitView_f, CMD_NONE },

{ "iknowkungfu", Svcmd_IKnowKungfu_f, CMD_CHEAT },

{ "secrets", Svcmd_Secrets_f, CMD_NONE },
{ "difficulty", Svcmd_Difficulty_f, CMD_NONE },

//{ "say", Svcmd_Say_f, qtrue },
//{ "toggleallowvote", Svcmd_ToggleAllowVote_f, qfalse },
//{ "toggleuserinfovalidation", Svcmd_ToggleUserinfoValidation_f, qfalse },
Expand All @@ -966,7 +966,7 @@ qboolean ConsoleCommand( void ) {

if ( !command )
return qfalse;

if ( (command->flags & CMD_CHEAT)
&& !g_cheats->integer )
{
Expand Down
14 changes: 7 additions & 7 deletions code/qcommon/cvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,11 @@ cvar_t *Cvar_Get( const char *var_name, const char *var_value, int flags ) {
return var;
}

static void Cvar_QSortByName( cvar_t **a, int n )
static void Cvar_QSortByName( cvar_t **a, int n )
{
cvar_t *temp;
cvar_t *m;
int i, j;
int i, j;

i = 0;
j = n;
Expand All @@ -497,10 +497,10 @@ static void Cvar_QSortByName( cvar_t **a, int n )
while ( strcmp( a[j]->name, m->name ) < 0 ) j--;

if ( i <= j ) {
temp = a[i];
a[i] = a[j];
temp = a[i];
a[i] = a[j];
a[j] = temp;
i++;
i++;
j--;
}
} while ( i <= j );
Expand All @@ -510,7 +510,7 @@ static void Cvar_QSortByName( cvar_t **a, int n )
}


static void Cvar_Sort( void )
static void Cvar_Sort( void )
{
cvar_t *list[ MAX_CVARS ], *var;
int count;
Expand All @@ -529,7 +529,7 @@ static void Cvar_Sort( void )
}

Cvar_QSortByName( &list[0], count-1 );

cvar_vars = NULL;

// relink cvars
Expand Down
2 changes: 1 addition & 1 deletion code/qcommon/ojk_saved_game_helper_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class SavedGameClassArchiver
{
public:
enum { is_implemented = false };

static void sg_export(
SavedGameHelper& saved_game,
const T& instance)
Expand Down
2 changes: 1 addition & 1 deletion code/qcommon/safe/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace Zone
using other = Allocator< U, tag >;
};
};

template< typename T >
using UniquePtr = std::unique_ptr< T, Deleter >;

Expand Down
2 changes: 1 addition & 1 deletion code/rd-common/tr_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ void CFontInfo::UpdateAsianIfNeeded( bool bForceReEval /* = false */ )
case eTaiwanese:
case eJapanese:
#ifndef JK2_MODE
case eChinese:
case eChinese:
#endif
m_AsianGlyph.horizAdvance = iCappedHeight + 3; // need to force some spacing for these
// case eThai: // this is done dynamically elsewhere, since Thai glyphs are variable width
Expand Down
4 changes: 2 additions & 2 deletions code/rd-vanilla/tr_ghoul2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3569,7 +3569,7 @@ qboolean R_LoadMDXM( model_t *mod, void *buffer, const char *mod_name, qboolean

// first up, go load in the animation file we need that has the skeletal animation info for this model
mdxm->animIndex = RE_RegisterModel(va ("%s.gla",mdxm->animName));

char animGLAName[MAX_QPATH];
char *strippedName;
char *slash = NULL;
Expand All @@ -3593,7 +3593,7 @@ qboolean R_LoadMDXM( model_t *mod, void *buffer, const char *mod_name, qboolean
{
RE_RegisterModel(va("models/players/%s_%s/%s_%s.gla", strippedName, mapname, strippedName, mapname));
}
}
}

#ifndef JK2_MODE
bool isAnOldModelFile = false;
Expand Down
2 changes: 1 addition & 1 deletion code/rd-vanilla/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2478,7 +2478,7 @@ Ghoul2 Insert End
// functioned because rgbGen identity doesn't work with setcolor.
//
// We match against retail version of gfx/menus/radar/arrow_w by calculating
// the hash value of the shader text, and comparing it against a
// the hash value of the shader text, and comparing it against a
// precalculated value.
if ( shaderHash == RETAIL_ARROW_W_SHADER_HASH &&
Q_stricmp( shader.name, "gfx/menus/radar/arrow_w" ) == 0 )
Expand Down
2 changes: 1 addition & 1 deletion code/ui/ui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ void UI_FreeAllSpecies( void )
UI_FreeSpecies(&uiInfo.playerSpecies[i]);
}
free(uiInfo.playerSpecies);

uiInfo.playerSpeciesCount = 0;
uiInfo.playerSpecies = NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions code/ui/ui_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ static void Item_ApplyHacks( itemDef_t *item ) {
Com_Printf( "Disabling eax field because current platform does not support EAX.\n");
}
}

if ( item->type == ITEM_TYPE_TEXT && item->window.name && !Q_stricmp( item->window.name, "eax_icon") && item->cvarTest && !Q_stricmp( item->cvarTest, "s_UseOpenAL" ) && item->enableCvar && (item->cvarFlags & CVAR_HIDE) ) {
if( item->parent )
{
Expand Down Expand Up @@ -1085,7 +1085,7 @@ static void Item_ApplyHacks( itemDef_t *item ) {
Com_Printf( "Extended sound quality field to contain very high option.\n");
}
}

if ( item->type == ITEM_TYPE_MULTI && item->window.name && !Q_stricmp( item->window.name, "voice") && item->cvar && !Q_stricmp( item->cvar, "g_subtitles" ) ) {
multiDef_t *multiPtr = (multiDef_t *)item->typeData;
int i;
Expand Down
6 changes: 3 additions & 3 deletions code/win32/game.rc
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//

1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END

3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
Expand Down
6 changes: 3 additions & 3 deletions code/win32/winquake.rc
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//

1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END

3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
"\0"
END
Expand Down
4 changes: 2 additions & 2 deletions codeJK2/cgame/FX_DEMP2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ void FX_DEMP2_AltDetonate( vec3_t org, float size )

ex->startTime = cg.time;
ex->endTime = ex->startTime + 1300;

ex->radius = size;
ex->refEntity.customShader = cgi_R_RegisterShader( "gfx/effects/demp2shell" );

ex->refEntity.hModel = cgi_R_RegisterModel( "models/items/sphere.md3" );
VectorCopy( org, ex->refEntity.origin );

ex->color[0] = ex->color[1] = ex->color[2] = 255.0f;
}
14 changes: 7 additions & 7 deletions codeJK2/cgame/FX_Disruptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ static vec3_t WHITE ={1.0f,1.0f,1.0f};

void FX_DisruptorMainShot( vec3_t start, vec3_t end )
{
FX_AddLine( start, end, 0.1f, 4.0f, 0.0f,
FX_AddLine( start, end, 0.1f, 4.0f, 0.0f,
1.0f, 0.0f, 0.0f,
WHITE, WHITE, 0.0f,
120, cgi_R_RegisterShader( "gfx/effects/redLine" ),
120, cgi_R_RegisterShader( "gfx/effects/redLine" ),
FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
}

Expand All @@ -51,21 +51,21 @@ FX_DisruptorAltShot
*/
void FX_DisruptorAltShot( vec3_t start, vec3_t end, qboolean fullCharge )
{
FX_AddLine( start, end, 0.1f, 10.0f, 0.0f,
FX_AddLine( start, end, 0.1f, 10.0f, 0.0f,
1.0f, 0.0f, 0.0f,
WHITE, WHITE, 0.0f,
175, cgi_R_RegisterShader( "gfx/effects/redLine" ),
175, cgi_R_RegisterShader( "gfx/effects/redLine" ),
FX_SIZE_LINEAR | FX_ALPHA_LINEAR );

if ( fullCharge )
{
vec3_t YELLER={0.8f,0.7f,0.0f};

// add some beef
FX_AddLine( start, end, 0.1f, 7.0f, 0.0f,
FX_AddLine( start, end, 0.1f, 7.0f, 0.0f,
1.0f, 0.0f, 0.0f,
YELLER, YELLER, 0.0f,
150, cgi_R_RegisterShader( "gfx/misc/whiteline2" ),
150, cgi_R_RegisterShader( "gfx/misc/whiteline2" ),
FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
}
}
Expand All @@ -85,7 +85,7 @@ void FX_DisruptorAltMiss( vec3_t origin, vec3_t normal )
VectorCopy( c1, c2 );
c1[2] += 4;
c2[2] += 12;

VectorAdd( origin, normal, pos );
pos[2] += 28;

Expand Down
Loading

0 comments on commit 4547d40

Please sign in to comment.