Look at changes
This commit is contained in:
parent
c91a59bab8
commit
d312cf1497
1 changed files with 13 additions and 3 deletions
12
demo3.cpp
12
demo3.cpp
|
@ -463,11 +463,21 @@ int main()
|
||||||
colorAddition = -1;
|
colorAddition = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editing && editCounter == 0)
|
if (editing)
|
||||||
|
{
|
||||||
|
int16_t heightDiff = changes[changeIndex].mHeight - player.mCamera.height;
|
||||||
|
|
||||||
|
if (heightDiff > UNITS_PER_SQUARE / 2)
|
||||||
|
shearDirection = 1;
|
||||||
|
else if (heightDiff < -1 * UNITS_PER_SQUARE / 2)
|
||||||
|
shearDirection = -1;
|
||||||
|
|
||||||
|
if (editCounter == 0 && colorAddition != 0)
|
||||||
{
|
{
|
||||||
changes[changeIndex].mColor = wrap(changes[changeIndex].mColor + colorAddition,SQUARE_COLORS);
|
changes[changeIndex].mColor = wrap(changes[changeIndex].mColor + colorAddition,SQUARE_COLORS);
|
||||||
editCounter = 4;
|
editCounter = 4;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
editCounter = max(0, editCounter - 1);
|
editCounter = max(0, editCounter - 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue