I think the multi-dimensional box array might be changed between PS2 and gamecube. When we use the PS2 dwarf: bossPatBox box[3][8]; 3 * 8 = 24 1. the compiler generates addi r3, r3, 0x78 for the loop, which is incorrect 2. The hardcoded loop values are both 4 and 6, and 4 * 6 = 24. I think it's supposed to be bossPatBox box[4][6] instead. because the two issues abov
| 2269 | and the box arrays still take up the same size. |
| 2270 | */ |
| 2271 | void zNPCBPatrick::hiddenByCutscene() |
| 2272 | { |
| 2273 | for (S32 i = 0; i < 2; i++) |
| 2274 | { |
| 2275 | this->underwear[i]->state = this->underwear[i]->state & ~0x3F | 1; |
| 2276 | zEntEvent(this->underwear[i], eEventCollision_Visible_On); |
| 2277 | this->underwear[i]->timer = f832; |
| 2278 | } |
| 2279 | |
| 2280 | switch (this->round) |
| 2281 | { |
| 2282 | case 1: |
| 2283 | { |
| 2284 | zEntPlayer_SNDStop(ePlayerSnd_Heli); |
| 2285 | globals.player.lassoInfo.swingTarget = NULL; |
| 2286 | gCurrentPlayer = eCurrentPlayerSpongeBob; |
| 2287 | |
| 2288 | for (S32 i = 0; i < 4; i++) |
| 2289 | { |
| 2290 | for (S32 j = 0; j < 6; j++) |
| 2291 | { |
| 2292 | bossPatBox* bx = &this->box[i][j]; |
| 2293 | bx->velocity = f832; |
| 2294 | bx->flags = 0; |
| 2295 | bx->pos = f1141 + bx->minY; |
| 2296 | } |
| 2297 | } |
| 2298 | |
| 2299 | this->backBox.velocity = f832; |
| 2300 | this->backBox.flags = 0; |
| 2301 | this->backBox.pos = f1141 + this->backBox.minY; |
| 2302 | |
| 2303 | break; |
| 2304 | } |
| 2305 | case 2: |
| 2306 | { |
| 2307 | gCurrentPlayer = eCurrentPlayerSandy; |
| 2308 | zEntEvent(this->safeGroundPortal, eEventTeleportPlayer); |
| 2309 | xEntShow(this->fudgeHandle); |
| 2310 | break; |
| 2311 | } |
| 2312 | case 3: |
| 2313 | { |
| 2314 | zEntPlayer_SNDStop(ePlayerSnd_Heli); |
| 2315 | globals.player.lassoInfo.swingTarget = NULL; |
| 2316 | gCurrentPlayer = eCurrentPlayerSpongeBob; |
| 2317 | zEntEvent(this->safeGroundPortal, eEventTeleportPlayer); |
| 2318 | |
| 2319 | for (S32 i = 0; i < 4; i++) |
| 2320 | { |
| 2321 | for (S32 j = 0; j < 6; j++) |
| 2322 | { |
| 2323 | bossPatBox* bx = &this->box[i][j]; |
| 2324 | bx->velocity = f832; |
| 2325 | bx->flags = 0; |
| 2326 | bx->pos = f1141 + bx->minY; |
| 2327 | } |
| 2328 | } |
no test coverage detected