mirror of https://github.com/UberGames/rpgxEF.git
- Fixed variableScope and unreadVariable style warnings in UI module
- also removed my test file Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>
This commit is contained in:
parent
d85e61ae76
commit
390e597c43
|
@ -1716,7 +1716,6 @@ rankset to that new data
|
||||||
|
|
||||||
void UI_InitRanksData( char* ranksName ) {
|
void UI_InitRanksData( char* ranksName ) {
|
||||||
char filePath[MAX_QPATH];
|
char filePath[MAX_QPATH];
|
||||||
int i;
|
|
||||||
|
|
||||||
if ( !Q_stricmp( uis.rankSet.rankSetName, ranksName ) )
|
if ( !Q_stricmp( uis.rankSet.rankSetName, ranksName ) )
|
||||||
goto refreshRank;
|
goto refreshRank;
|
||||||
|
@ -1745,7 +1744,8 @@ void UI_InitRanksData( char* ranksName ) {
|
||||||
|
|
||||||
refreshRank:
|
refreshRank:
|
||||||
/* using our current cvar'd rank, do a compare. if we find a match, set our player to that rank in the menu */
|
/* using our current cvar'd rank, do a compare. if we find a match, set our player to that rank in the menu */
|
||||||
for ( i=0, uis.currentRank=0; i < MAX_RANKS; i++ ) {
|
int i;
|
||||||
|
for ( int i=0, uis.currentRank=0; i < MAX_RANKS; i++ ) {
|
||||||
if ( !Q_stricmp( uis.rankSet.rankNames[i].consoleName, UI_Cvar_VariableString( "ui_playerRank" ) ) ) {
|
if ( !Q_stricmp( uis.rankSet.rankNames[i].consoleName, UI_Cvar_VariableString( "ui_playerRank" ) ) ) {
|
||||||
uis.currentRank = i;
|
uis.currentRank = i;
|
||||||
break;
|
break;
|
||||||
|
@ -2929,7 +2929,6 @@ void UI_SecurityCodeSetup ( void )
|
||||||
int fileLen;
|
int fileLen;
|
||||||
rpgxSecurityFile_t *code;
|
rpgxSecurityFile_t *code;
|
||||||
rpgxSecurityFile_t wCode;
|
rpgxSecurityFile_t wCode;
|
||||||
unsigned long bit=0;
|
|
||||||
static qboolean ui_SecuritySetup=qfalse;
|
static qboolean ui_SecuritySetup=qfalse;
|
||||||
|
|
||||||
/* QVM Hack */
|
/* QVM Hack */
|
||||||
|
@ -2997,6 +2996,7 @@ void UI_SecurityCodeSetup ( void )
|
||||||
/* generate our player hash */
|
/* generate our player hash */
|
||||||
while ( code->hash == 0 || code->hash == SECURITY_HASH )
|
while ( code->hash == 0 || code->hash == SECURITY_HASH )
|
||||||
{
|
{
|
||||||
|
unsigned long bit=0;
|
||||||
/* set a pretty good random seed */
|
/* set a pretty good random seed */
|
||||||
srand( trap_Milliseconds() );
|
srand( trap_Milliseconds() );
|
||||||
/*code->hash = (int)(rand() / (((double)RAND_MAX + 1)/ SECURITY_HASH));*/
|
/*code->hash = (int)(rand() / (((double)RAND_MAX + 1)/ SECURITY_HASH));*/
|
||||||
|
|
|
@ -129,7 +129,6 @@ static void UI_CDKeyMenu_DrawKey( void *self )
|
||||||
menufield_s *f;
|
menufield_s *f;
|
||||||
qboolean focus;
|
qboolean focus;
|
||||||
int style;
|
int style;
|
||||||
char c;
|
|
||||||
float *color;
|
float *color;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
|
@ -157,6 +156,7 @@ static void UI_CDKeyMenu_DrawKey( void *self )
|
||||||
// draw cursor if we have focus
|
// draw cursor if we have focus
|
||||||
if( focus )
|
if( focus )
|
||||||
{
|
{
|
||||||
|
char c;
|
||||||
if ( trap_Key_GetOverstrikeMode() )
|
if ( trap_Key_GetOverstrikeMode() )
|
||||||
{
|
{
|
||||||
c = 11;
|
c = 11;
|
||||||
|
|
|
@ -63,7 +63,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) {
|
||||||
|
|
||||||
int downloadSize, downloadCount, downloadTime;
|
int downloadSize, downloadCount, downloadTime;
|
||||||
char dlSizeBuf[64], totalSizeBuf[64], xferRateBuf[64], dlTimeBuf[64];
|
char dlSizeBuf[64], totalSizeBuf[64], xferRateBuf[64], dlTimeBuf[64];
|
||||||
int xferRate;
|
|
||||||
int width, leftWidth;
|
int width, leftWidth;
|
||||||
int style = UI_LEFT|UI_SMALLFONT|UI_DROPSHADOW;
|
int style = UI_LEFT|UI_SMALLFONT|UI_DROPSHADOW;
|
||||||
const char *s;
|
const char *s;
|
||||||
|
@ -100,6 +99,7 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) {
|
||||||
UI_DrawProportionalString( leftWidth, etaYpos, estimating, style, color_white );
|
UI_DrawProportionalString( leftWidth, etaYpos, estimating, style, color_white );
|
||||||
UI_DrawProportionalString( leftWidth, copiedYpos, va(XofXcopied, dlSizeBuf, totalSizeBuf), style, color_white );
|
UI_DrawProportionalString( leftWidth, copiedYpos, va(XofXcopied, dlSizeBuf, totalSizeBuf), style, color_white );
|
||||||
} else {
|
} else {
|
||||||
|
int xferRate;
|
||||||
if ((uis.realtime - downloadTime) / 1000) {
|
if ((uis.realtime - downloadTime) / 1000) {
|
||||||
xferRate = downloadCount / ((uis.realtime - downloadTime) / 1000);
|
xferRate = downloadCount / ((uis.realtime - downloadTime) / 1000);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -942,7 +942,6 @@ static void Controls_DrawKeyBinding( void *self )
|
||||||
int x,bindingX;
|
int x,bindingX;
|
||||||
int y;
|
int y;
|
||||||
int b1;
|
int b1;
|
||||||
int b2;
|
|
||||||
qboolean c;
|
qboolean c;
|
||||||
char name[32];
|
char name[32];
|
||||||
char name2[32];
|
char name2[32];
|
||||||
|
@ -970,7 +969,7 @@ static void Controls_DrawKeyBinding( void *self )
|
||||||
trap_Key_KeynumToStringBuf( b1, name, 32 );
|
trap_Key_KeynumToStringBuf( b1, name, 32 );
|
||||||
Q_strupr(name);
|
Q_strupr(name);
|
||||||
|
|
||||||
b2 = g_bindings[a->generic.id].bind2;
|
int b2 = g_bindings[a->generic.id].bind2;
|
||||||
if (b2 != -1)
|
if (b2 != -1)
|
||||||
{
|
{
|
||||||
trap_Key_KeynumToStringBuf( b2, name2, 32 );
|
trap_Key_KeynumToStringBuf( b2, name2, 32 );
|
||||||
|
|
|
@ -1065,7 +1065,6 @@ static sfxHandle_t PlayerEmotes_KeyEvent ( int key ) {
|
||||||
menucommon_s *s;
|
menucommon_s *s;
|
||||||
int i;
|
int i;
|
||||||
char command[256];
|
char command[256];
|
||||||
int emoteId;
|
|
||||||
|
|
||||||
s = (menucommon_s *)Menu_ItemAtCursor( &s_playerEmotes.menu );
|
s = (menucommon_s *)Menu_ItemAtCursor( &s_playerEmotes.menu );
|
||||||
|
|
||||||
|
@ -1134,7 +1133,7 @@ static sfxHandle_t PlayerEmotes_KeyEvent ( int key ) {
|
||||||
if ( key == K_MOUSE2 && ( s->id >= ID_EMOTELIST1 && s->id <= ID_EMOTELIST12 ) ) {
|
if ( key == K_MOUSE2 && ( s->id >= ID_EMOTELIST1 && s->id <= ID_EMOTELIST12 ) ) {
|
||||||
PlayerEmotes_ExecuteOffset();
|
PlayerEmotes_ExecuteOffset();
|
||||||
|
|
||||||
emoteId = s_playerEmotes.mainEmotesList[ ((s->id - 100)-1)+s_playerEmotes.emoteListOffset ];
|
int emoteId = s_playerEmotes.mainEmotesList[ ((s->id - 100)-1)+s_playerEmotes.emoteListOffset ];
|
||||||
|
|
||||||
if ( emoteId >= 0 && emoteId < bg_numEmotes ) {
|
if ( emoteId >= 0 && emoteId < bg_numEmotes ) {
|
||||||
trap_Cmd_ExecuteText( EXEC_APPEND, va( "wait 5;emote %s\n", bg_emoteList[emoteId].name ) );
|
trap_Cmd_ExecuteText( EXEC_APPEND, va( "wait 5;emote %s\n", bg_emoteList[emoteId].name ) );
|
||||||
|
|
|
@ -39,13 +39,13 @@ M_GridFont_Graphics
|
||||||
*/
|
*/
|
||||||
void M_GridFont_Graphics (void)
|
void M_GridFont_Graphics (void)
|
||||||
{
|
{
|
||||||
int x,y,color;
|
int x,y;
|
||||||
int i,i2,xInc;
|
int i,i2,xInc;
|
||||||
char character[2];
|
char character[2];
|
||||||
|
|
||||||
character[1] = 0;
|
character[1] = 0;
|
||||||
y = 190;
|
y = 190;
|
||||||
color = CT_LTORANGE;
|
int color = CT_LTORANGE;
|
||||||
for (i=32;i<256;)
|
for (i=32;i<256;)
|
||||||
{
|
{
|
||||||
x = 100;
|
x = 100;
|
||||||
|
@ -236,12 +236,10 @@ Fonts_MenuEvent
|
||||||
*/
|
*/
|
||||||
static void Fonts_MenuEvent( void* ptr, int notification )
|
static void Fonts_MenuEvent( void* ptr, int notification )
|
||||||
{
|
{
|
||||||
menuframework_s* m;
|
|
||||||
|
|
||||||
if (notification != QM_ACTIVATED)
|
if (notification != QM_ACTIVATED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m = ((menucommon_s*)ptr)->parent;
|
menuframework_s* m = ((menucommon_s*)ptr)->parent;
|
||||||
|
|
||||||
switch (((menucommon_s*)ptr)->id)
|
switch (((menucommon_s*)ptr)->id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Just a test file to make sure I understand the branching in git
|
|
Loading…
Reference in New Issue