mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2025-09-08 17:10:16 +02:00
Switched positional audio to collision coordinate system.
Refactored positional audio.
This commit is contained in:
parent
c93e11ee6b
commit
8017734de4
19 changed files with 214 additions and 143 deletions
|
@ -102,8 +102,8 @@ void TLine::place_in_grid()
|
|||
for (auto indexX = xBox0, indexY = yBox0; indexX != xBox1 || indexY != yBox1;)
|
||||
{
|
||||
// Calculate y from indexY and from line formula
|
||||
auto yDiscrete = (indexY + yBias) * edgeMan->AdvanceY + edgeMan->Y;
|
||||
auto ylinear = ((indexX + xBias) * edgeMan->AdvanceX + edgeMan->X) * dyDx + precomp;
|
||||
auto yDiscrete = (indexY + yBias) * edgeMan->AdvanceY + edgeMan->MinY;
|
||||
auto ylinear = ((indexX + xBias) * edgeMan->AdvanceX + edgeMan->MinX) * dyDx + precomp;
|
||||
if (dirY == 1 ? ylinear >= yDiscrete : ylinear <= yDiscrete)
|
||||
{
|
||||
// Advance indexY when discrete value is ahead/behind
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue