Skip to content

[GEN][ZH] Cleans up inconsistencies #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomsons26
Copy link

Cleans up whitespace issues
Fixes inconsistent comments
Makes include order consistent with ZH

@xezon xezon added this to the Code foundation build up milestone Apr 11, 2025
@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Unify Unifies code between Generals and Zero Hour Generals Related Generals only ZeroHour Relates to Zero Hour Refactor Improves the structure of the code, with negligible changes in function. labels Apr 11, 2025
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will pause reviewing this change.

The whitespace changes were incorrectly applied to Zero Hour source files. It looks like double spaces have been mass replaced with tabs. This is wrong, because it will affect inline spaces as well. This kind of refactor would need to be done with a script that only looks at leading whitespace and corrects them.

// Because of changes in wind, pressure, etc.
// Those changes are added here, then the


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 3 blank lines here in ZH :P

CString loopCountText;
loopCountText.Format( "%d", audioEventInfo->m_loopCount );
loopCountEdit->SetWindowText( loopCountText );
}

/// Move data from object to dialog controls
void MapObjectProps::dictToEnabled()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The github diff in this function looks suspiciously broken, which indicates that something is not right.

if ( flagSpikes )
{
if ( Debug_Statistics::Get_Draw_Calls()>2000 )
fprintf( m_fp, " DRAWS OUT OF TOLERANCE(2000)\n" );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these fprintf's meant to use tabs in this file!? It seems odd.

DEBUG_LOG((remark));
drawGraph( "@", graphScale, timeNoPart );

sprintf(remark, "Without Spawn %f \n", timeNoSpawn );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 spaces changed to tab

// Real muzzleHeight = attachTransform.Get_Z_Translation();
// DEBUG_ASSERTCRASH( muzzleHeight > 0.001f, ("YOUR TURRET HAS A VERY LOW PROJECTILE LAUNCH POSITION, BUT FOUND A VALID BONE. DID YOU PICK THE WRONG ONE? %s", launcher->getTemplate()->getName().str()));
// Real muzzleHeight = attachTransform.Get_Z_Translation();
// DEBUG_ASSERTCRASH( muzzleHeight > 0.001f, ("YOUR TURRET HAS A VERY LOW PROJECTILE LAUNCH POSITION, BUT FOUND A VALID BONE. DID YOU PICK THE WRONG ONE? %s", launcher->getTemplate()->getName().str()));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be tabs.

@tomsons26 tomsons26 marked this pull request as draft April 11, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Generals Related Generals only Minor Severity: Minor < Major < Critical < Blocker Refactor Improves the structure of the code, with negligible changes in function. Unify Unifies code between Generals and Zero Hour ZeroHour Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants