| Prev: 6947 | Up: Map | Next: 6963 |
694D: Advance to next bridge/level
|
Called when all 64 terrain fragments of the current bridge are completed. Resets Y-position and advances to the next bridge. Bridge index wraps from 49 back to 1, but the player's progress counter in state_bridge_player_1 continues incrementing for the wraparound calculation in init_current_bridge.
|
||||||||
| increase_bridge_index | 694D | LD DE,$0000 | Reset Y-position to start of new bridge. | |||||
| 6950 | LD ($5F70),DE | |||||||
| 6954 | LD A,($5EF0) | Increment bridge index at state_bridge_index. | ||||||
| 6957 | INC A | |||||||
| 6958 | LD ($5EF0),A | |||||||
| 695B | CP $31 | If index reaches $31 (49), wrap to 1. | ||||||
| 695D | JP Z,next_bridge_index_overflow | |||||||
| 6960 | LD A,$00 | |||||||
| 6962 | RET | |||||||
| Prev: 6947 | Up: Map | Next: 6963 |