File tree Expand file tree Collapse file tree
decompile/General/RaceFlag Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,19 +91,19 @@ void DECOMP_RaceFlag_DrawSelf()
9191 // === Step 2 ===
9292 if (0xfff < angle [0 ])
9393 {
94+ // reset counter
9495 data .checkerFlagVariables [4 ] &= 0x1ffff ;
9596 angle [0 ] = (int )data .checkerFlagVariables [4 ] >> 5 ;
9697
97- // Linear +=
9898 data .checkerFlagVariables [0 ] += 0x200 ;
9999 data .checkerFlagVariables [2 ] += 200 ;
100100
101- // Trigonometric +=
102- approx [ 0 ] = DECOMP_MATH_Sin (data .checkerFlagVariables [0 ]) + 0xfff ;
103- data . checkerFlagVariables [ 1 ] = ( approx [ 0 ] * 0x20 >> 0xd ) + 0x96 ;
104-
105- approx [ 0 ] = DECOMP_MATH_Sin ( data . checkerFlagVariables [ 2 ]) + 0xfff ;
106- data .checkerFlagVariables [3 ] = (approx [ 0 ] * 0x40 >> 0xd ) + 0xb4 ;
101+ int sin0 = DECOMP_MATH_Sin ( data . checkerFlagVariables [ 0 ]) + 0xfff ;
102+ int sin2 = DECOMP_MATH_Sin (data .checkerFlagVariables [2 ]) + 0xfff ;
103+
104+ // reset based on trig
105+ data . checkerFlagVariables [ 1 ] = (( sin0 * 0x20 ) >> 0xd ) + 0x96 ;
106+ data .checkerFlagVariables [3 ] = (( sin2 * 0x40 ) >> 0xd ) + 0xb4 ;
107107 }
108108
109109
@@ -194,19 +194,19 @@ void DECOMP_RaceFlag_DrawSelf()
194194 // === Step 2 ===
195195 if (0xfff < angle [0 ])
196196 {
197+ // reset counter
197198 local4 &= 0x1ffff ;
198199 angle [0 ] = (int )local4 >> 5 ;
199200
200- // Linear +=
201201 local0 += 0x200 ;
202202 local2 += 200 ;
203203
204- // Trigonometric +=
205- approx [ 0 ] = DECOMP_MATH_Sin (local0 ) + 0xfff ;
206- local1 = ( approx [ 0 ] * 0x20 >> 0xd ) + 0x96 ;
207-
208- approx [ 0 ] = DECOMP_MATH_Sin ( local2 ) + 0xfff ;
209- local3 = (approx [ 0 ] * 0x40 >> 0xd ) + 0xb4 ;
204+ int sin0 = DECOMP_MATH_Sin ( local0 ) + 0xfff ;
205+ int sin2 = DECOMP_MATH_Sin (local2 ) + 0xfff ;
206+
207+ // reset based on trig
208+ local1 = ( sin0 * 0x20 >> 0xd ) + 0x96 ;
209+ local3 = (sin2 * 0x40 >> 0xd ) + 0xb4 ;
210210 }
211211
212212
You can’t perform that action at this time.
0 commit comments