Improve door
This commit is contained in:
parent
55ff278ede
commit
05f8086400
1 changed files with 5 additions and 1 deletions
|
@ -39,6 +39,10 @@
|
||||||
memory and turning can be less precise (can be seen a lot with 64 item
|
memory and turning can be less precise (can be seen a lot with 64 item
|
||||||
LUT). */
|
LUT). */
|
||||||
|
|
||||||
|
#define DOOR_ROLL_SIGN -1
|
||||||
|
/* ^ Defines how the door roll: -1 opens the door to the left, 1 to the
|
||||||
|
right, 0 to both. */
|
||||||
|
|
||||||
#define FPS 60
|
#define FPS 60
|
||||||
#define HEAD_BOB_HEIGHT 200
|
#define HEAD_BOB_HEIGHT 200
|
||||||
#define HEAD_BOB_STEP 20
|
#define HEAD_BOB_STEP 20
|
||||||
|
@ -902,7 +906,7 @@ Unit rollAt(int16_t x, int16_t y)
|
||||||
|
|
||||||
if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES &&
|
if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES &&
|
||||||
level[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x] == 6)
|
level[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x] == 6)
|
||||||
return (pokitto.frameCount * 10) % UNITS_PER_SQUARE;
|
return sinInt(pokitto.frameCount * 10) + DOOR_ROLL_SIGN * UNITS_PER_SQUARE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue