mirror of
https://github.com/pret/pokeemerald.git
synced 2026-03-21 17:54:57 -05:00
Updated Improving the WaitForVBlank function (markdown)
parent
16a0e837fc
commit
d38e7ffc81
|
|
@ -56,4 +56,4 @@ static void WaitForVBlank(void)
|
|||
}
|
||||
```
|
||||
|
||||
The less-efficient `WaitForVBlank` will now only run while the Wireless Adapter is communicating. This has been written so that, during normal gameplay, you won't lose performance due to an extra jump as the comparison follows right into setting the `swi` and then the function exits immediately afterwards. The only loss over the above two versions are the cycles needed to perform the comparison. The code jumps only while the Wireless Adapter is communicating, but the busy loop tanks performance in that scenario anyway so the cost is negligible.
|
||||
The less-efficient `WaitForVBlank` will now only run while the Wireless Adapter is communicating. This has been written so that, during normal gameplay, performance losses over the above two versions are as minimized as possible. You won't lose performance due to an extra jump as the comparison follows right into setting the `swi` and then the function exits immediately afterwards. The only loss over the above two versions are the cycles needed to perform the comparison. The code jumps only while the Wireless Adapter is communicating, but the busy loop tanks performance in that scenario anyway so the cost is negligible.
|
||||
Loading…
Reference in New Issue
Block a user