Update demo1
This commit is contained in:
parent
c957d0b35f
commit
1b30c0ee89
1 changed files with 7 additions and 6 deletions
13
demo1.cpp
13
demo1.cpp
|
@ -7,6 +7,8 @@
|
||||||
license: CC0 1.0
|
license: CC0 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define CAMERA_COLL_HEIGHT_BELOW ((3 * UNITS_PER_SQUARE) / 2)
|
||||||
|
|
||||||
#include "general.hpp"
|
#include "general.hpp"
|
||||||
|
|
||||||
#define LEVEL_X_RES 29
|
#define LEVEL_X_RES 29
|
||||||
|
@ -64,7 +66,7 @@ const signed char levelFloor[] =
|
||||||
40, 0,48,-8,-8,-8,32,32,32,32,40, 1, 0, 1,40,32,32,32,32,32,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
40, 0,48,-8,-8,-8,32,32,32,32,40, 1, 0, 1,40,32,32,32,32,32,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
||||||
40, 0,48,-8,-8,-8,-8,-8,-8,-8,-8, 0, 0, 0,-8,-8,-8,36,32,36,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
40, 0,48,-8,-8,-8,-8,-8,-8,-8,-8, 0, 0, 0,-8,-8,-8,36,32,36,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
||||||
40, 0,48,-8,-8,-8,-8,-8,-8,-8,-8, 0, 0, 0,-8,-8,-8,-8,-8,-8,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
40, 0,48,-8,-8,-8,-8,-8,-8,-8,-8, 0, 0, 0,-8,-8,-8,-8,-8,-8,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
||||||
40, 0,48, 0,-2,-2, 0,-8,-8,-8,-8, 0, 0, 0,-8,-8, 0, 0, 0, 0, 0, 0, 0, 0,24,24,15,24,24,
|
40, 0,48, 0,-2,-2, 0,-8,-8,-8,-8, 0, 0, 0,-8,-8, 0, 0, 0, 0, 0, 0, 0, 0,24,24,10,24,24,
|
||||||
40, 0, 0, 0,-2,-2, 0, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0,24,
|
40, 0, 0, 0,-2,-2, 0, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0,24,
|
||||||
40, 0, 0, 0,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0,24,
|
40, 0, 0, 0,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0,24,
|
||||||
40,24,48,-2,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24,
|
40,24,48,-2,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24,
|
||||||
|
@ -77,8 +79,8 @@ const signed char levelFloor[] =
|
||||||
const signed char levelCeiling[] =
|
const signed char levelCeiling[] =
|
||||||
{
|
{
|
||||||
40,40,40,40,40,40,40,99,99,99,99,36,40,40,40,40,40,36,99,99,99,99,99,99,99,99,99,99,99,
|
40,40,40,40,40,40,40,99,99,99,99,36,40,40,40,40,40,36,99,99,99,99,99,99,99,99,99,99,99,
|
||||||
40,99,99,99,99,99,20,99,99,99,99,36,40,99,99,99,99,36,99,99,99,99,99,99,99,99,99,99,99,
|
40,99,99,99,99,99,20,99,99,99,99,36,40,30,30,30,99,36,99,99,99,99,99,99,99,99,99,99,99,
|
||||||
40,99,99,99,99,99,20,99,99,99,99,36,40,99,99,99,99,36,99,99,99,99,99,99,99,99,99,99,99,
|
40,99,99,99,99,99,20,99,99,99,99,36,40,30,30,30,99,36,99,99,99,99,99,99,99,99,99,99,99,
|
||||||
40,99,99,99,99,99,48,99,99,99,99,36,24,24,24,24,24,36,99,99,99,99,99,99,99,99,99,99,99,
|
40,99,99,99,99,99,48,99,99,99,99,36,24,24,24,24,24,36,99,99,99,99,99,99,99,99,99,99,99,
|
||||||
40,99,48,48,48,48,47,99,99,99,99,36,36,36,36,36,36,36,99,99,99,99,99,99,99,99,99,99,99,
|
40,99,48,48,48,48,47,99,99,99,99,36,36,36,36,36,36,36,99,99,99,99,99,99,99,99,99,99,99,
|
||||||
40,99,48,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
|
40,99,48,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
|
||||||
|
@ -695,8 +697,7 @@ int main()
|
||||||
|
|
||||||
sprites[0] = Sprite(sprite1,10,5,1,100);
|
sprites[0] = Sprite(sprite1,10,5,1,100);
|
||||||
sprites[1] = Sprite(sprite1,14,5,1,100);
|
sprites[1] = Sprite(sprite1,14,5,1,100);
|
||||||
sprites[2] = Sprite(sprite2,15,19,1,150);
|
sprites[2] = Sprite(sprite2,15,19,1,200);
|
||||||
sprites[2].mHeight -= UNITS_PER_SQUARE / 2;
|
|
||||||
|
|
||||||
pokitto.display.persistence = 1;
|
pokitto.display.persistence = 1;
|
||||||
pokitto.setFrameRate(FPS);
|
pokitto.setFrameRate(FPS);
|
||||||
|
@ -781,7 +782,7 @@ int main()
|
||||||
Unit prevHeight = player.mCamera.height;
|
Unit prevHeight = player.mCamera.height;
|
||||||
|
|
||||||
moveCameraWithCollision(&player.mCamera,moveOffset,player.mVericalSpeed,
|
moveCameraWithCollision(&player.mCamera,moveOffset,player.mVericalSpeed,
|
||||||
floorHeightAt, ceilingHeightAt);
|
floorHeightAt, ceilingHeightAt, 1);
|
||||||
|
|
||||||
Unit heightDiff = player.mCamera.height - prevHeight;
|
Unit heightDiff = player.mCamera.height - prevHeight;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue