Add more graphics
This commit is contained in:
parent
861760f263
commit
f18f10dbe7
1 changed files with 218 additions and 75 deletions
293
demo1.cpp
293
demo1.cpp
|
@ -24,7 +24,7 @@
|
|||
|
||||
Player player;
|
||||
|
||||
#define SPRITES 7
|
||||
#define SPRITES 13
|
||||
#define SPRITE_MAX_DISTANCE 5 * UNITS_PER_SQUARE
|
||||
|
||||
Sprite sprites[SPRITES];
|
||||
|
@ -56,6 +56,8 @@ const unsigned char levelTexture[] =
|
|||
1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3 // 20 0
|
||||
};
|
||||
|
||||
#define XX -15
|
||||
|
||||
/// For each level square says the floor height.
|
||||
const signed char levelFloor[] =
|
||||
{
|
||||
|
@ -72,9 +74,9 @@ const signed char levelFloor[] =
|
|||
40, 0,-3,-8,-8,-8,32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,-3,-8,-8, 0, 0, 0, 0, 0, 0,24, // 9 11
|
||||
40, 0,-6,-8,-8,-8,32, 0, 0, 0,48,48, 0,48,48, 0, 0,36,32,36,-8,-8, 0, 0, 0, 0, 0, 0,24, // 10 10
|
||||
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, // 11 9
|
||||
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, // 12 8
|
||||
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, // 13 7
|
||||
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, // 14 6
|
||||
40, 0,48,-8,-8,-8,-8,-8,XX,XX,XX, 0, 0, 0,XX,XX,-8,36,32,36,-8,-8, 0, 0, 0, 0, 0, 0,24, // 12 8
|
||||
40, 0,48,-8,-8,-8,-8,-8,XX,XX,XX, 0, 0, 0,XX,XX,-8,-8,-8,-8,-8,-8, 0, 0, 0, 0, 0, 0,24, // 13 7
|
||||
40, 0,48, 0,-2,-2, 0,-8,XX,XX,XX, 0, 0, 0,XX,XX, 0, 0, 0, 0, 0, 0, 0, 0,24,24,10,24,24, // 14 6
|
||||
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, // 15 5
|
||||
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, // 16 4
|
||||
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, // 17 3
|
||||
|
@ -83,6 +85,8 @@ const signed char levelFloor[] =
|
|||
0,24,24,24,32,32,32,27,24,27,30,34,36,38,36,34,36,34,34,32,32,33,37,39,24,24,24,24,24 // 20 0
|
||||
};
|
||||
|
||||
#undef XX
|
||||
|
||||
#define XX 127 // helper to keep a big number two-characters, for formatting
|
||||
|
||||
/// For each level square says the ceiling height.
|
||||
|
@ -272,79 +276,79 @@ const unsigned char texture2[] =
|
|||
|
||||
const unsigned char texture3[] =
|
||||
{ 32, 32 // width, height
|
||||
,0xb6,0x3d,0x33,0x33,0x3e,0x33,0x2a,0x29,0x2a,0x29,0x2a,0x20,0x29,0x29
|
||||
,0xb6,0x3d,0x33,0x33,0x3e,0x33,0x2a,0x29,0x2a,0x7b,0x7b,0x58,0x29,0x29
|
||||
,0x2a,0x29,0x10,0x10,0x10,0x49,0x58,0x99,0x50,0x50,0x10,0x4b,0x54,0x54
|
||||
,0x55,0x55,0x4a,0x49,0x29,0x3d,0x3d,0x7c,0x3d,0x33,0x34,0x3d,0x33,0x33
|
||||
,0x33,0x20,0x20,0x29,0x10,0x20,0x10,0x50,0x10,0x49,0x10,0x99,0x51,0x51
|
||||
,0x55,0x55,0x4a,0x49,0x29,0x3d,0x3d,0x7c,0x3d,0x33,0x34,0x3d,0x7b,0x7b
|
||||
,0x7b,0x58,0x20,0x61,0x28,0x28,0x58,0x50,0x10,0x49,0x10,0x99,0x51,0x51
|
||||
,0x33,0x10,0x53,0x66,0x67,0x15,0x54,0x4b,0x7f,0x33,0x7f,0x3d,0x3e,0x3d
|
||||
,0x33,0x3d,0x29,0x29,0x2a,0x20,0x20,0x2a,0x10,0x20,0x10,0x51,0x50,0x50
|
||||
,0x58,0x51,0x51,0x51,0x33,0x33,0x10,0x55,0x5e,0x67,0x26,0x66,0x29,0x7f
|
||||
,0x3e,0x3d,0x3d,0x33,0x3d,0x33,0x29,0x10,0x10,0x20,0x33,0x10,0x10,0x2a
|
||||
,0x58,0x59,0x50,0x10,0x51,0x51,0x10,0x51,0x52,0x37,0x37,0x10,0x10,0x5d
|
||||
,0x53,0x55,0x6c,0x3e,0x3d,0x33,0x33,0x3d,0x33,0x29,0x10,0x2a,0x20,0x20
|
||||
,0x29,0x20,0x10,0x10,0x58,0x10,0x10,0x10,0x58,0x49,0x51,0x99,0x49,0x37
|
||||
,0x37,0x33,0x33,0x10,0x10,0x49,0x7f,0x7f,0x33,0x3d,0x3d,0x7f,0x33,0x3e
|
||||
,0x29,0x2a,0x29,0x2a,0x29,0x2a,0x20,0x20,0x20,0x50,0x51,0x10,0x58,0x51
|
||||
,0x51,0x99,0x49,0x00,0x33,0x10,0x10,0x10,0x10,0x10,0x3d,0x7f,0x3d,0x33
|
||||
,0x3d,0x3d,0x33,0x2a,0x2a,0x20,0x29,0x29,0x29,0x10,0x20,0x19,0x10,0x19
|
||||
,0x51,0x50,0x58,0x51,0x49,0x99,0x00,0x00,0x10,0x10,0x33,0x33,0x33,0x10
|
||||
,0x3d,0x7f,0x7f,0x33,0x3e,0x33,0x33,0x33,0x29,0x20,0x33,0x2a,0x20,0x58
|
||||
,0x58,0x19,0x19,0x51,0x10,0x51,0x59,0x51,0x51,0x51,0x00,0x10,0x10,0x00
|
||||
,0x00,0x10,0x10,0x10,0x3d,0xb6,0x2a,0x3e,0x33,0x3d,0x33,0x3d,0x2a,0x10
|
||||
,0x20,0x2a,0x10,0x58,0x58,0x19,0x50,0x19,0x58,0x10,0x58,0x99,0x51,0x49
|
||||
,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x3d,0x2a,0x6c,0x3d,0x3e,0x33
|
||||
,0x33,0x29,0x33,0x29,0x10,0x29,0x20,0x69,0x58,0x10,0x19,0x10,0x99,0x10
|
||||
,0x58,0x99,0x49,0x99,0x51,0x00,0x00,0x00,0x10,0x10,0x10,0x53,0xb6,0x3d
|
||||
,0x6c,0x33,0x33,0x33,0x3d,0x29,0x20,0x33,0x20,0x20,0x29,0x20,0x51,0x51
|
||||
,0x51,0x50,0x99,0x58,0x99,0x49,0x99,0x49,0x00,0x00,0x00,0x10,0x10,0x00
|
||||
,0x00,0x53,0x29,0x3e,0x7f,0x29,0x33,0x2a,0x33,0x29,0x29,0x33,0x20,0x29
|
||||
,0x10,0x58,0x10,0x49,0x51,0x58,0x99,0x49,0x49,0x51,0x51,0x00,0x00,0x00
|
||||
,0x00,0x00,0x00,0x00,0x53,0x33,0x29,0x33,0x7e,0x33,0xb6,0x2a,0x33,0x29
|
||||
,0x20,0x10,0x29,0x20,0x10,0x58,0x59,0x10,0x50,0x99,0x49,0x49,0x49,0x49
|
||||
,0x51,0x9a,0x4b,0x53,0x53,0x4a,0x4a,0x15,0x37,0x37,0x2d,0x7c,0x3e,0x3d
|
||||
,0x7f,0x29,0x2a,0x10,0x29,0x10,0x10,0x20,0x29,0x58,0x51,0x51,0x99,0x51
|
||||
,0x49,0x49,0x99,0x10,0x49,0x49,0x4a,0x4b,0x53,0x56,0x56,0x33,0x37,0x37
|
||||
,0x6c,0x33,0x3d,0x3d,0x3d,0x7f,0x20,0x10,0x29,0x10,0x10,0x99,0x10,0x58
|
||||
,0x51,0x49,0x49,0x49,0x49,0x58,0x49,0x51,0x4a,0x4b,0x4b,0x54,0x66,0x67
|
||||
,0x67,0x33,0x10,0x10,0xb6,0x3d,0x33,0x7f,0x29,0x3d,0x33,0x33,0x29,0x29
|
||||
,0xac,0x58,0x10,0x49,0x49,0x49,0x49,0x49,0x49,0x50,0x59,0x51,0x51,0x51
|
||||
,0x54,0x15,0x66,0x5e,0x33,0x10,0x56,0x54,0xb6,0x3d,0x33,0x33,0x3e,0x33
|
||||
,0x29,0x33,0x33,0x33,0x10,0x10,0x10,0x51,0x49,0x49,0x49,0x49,0x49,0x49
|
||||
,0x58,0x50,0x50,0x49,0x4b,0x54,0x54,0x55,0x55,0x55,0x4a,0x49,0x29,0x3d
|
||||
,0x3d,0x7c,0x7f,0x6c,0x2a,0x29,0x10,0x10,0x10,0x19,0x20,0x10,0x99,0x51
|
||||
,0x51,0x49,0x49,0x49,0x10,0x51,0x51,0x51,0x52,0x53,0x66,0x67,0x67,0x15
|
||||
,0x54,0x4b,0x29,0x33,0x7f,0x3d,0x6c,0x29,0x33,0x20,0x29,0x10,0x20,0x20
|
||||
,0x99,0x10,0x99,0x51,0x58,0x99,0x49,0x49,0x49,0x51,0x51,0x4b,0x4b,0x53
|
||||
,0x55,0x5e,0x5e,0x67,0x26,0x66,0x29,0x7f,0x3e,0x3d,0x29,0x29,0x33,0x2a
|
||||
,0x2a,0x20,0x33,0x20,0x61,0x20,0x58,0x10,0x10,0x99,0x99,0x49,0x49,0x10
|
||||
,0x51,0x52,0x4a,0x4b,0x53,0x54,0x54,0x5d,0x53,0x55,0x6c,0x7f,0x6c,0x29
|
||||
,0x33,0x3d,0x2a,0x20,0x29,0x2a,0x10,0x2a,0x20,0x20,0x58,0x10,0x10,0x58
|
||||
,0x99,0x51,0x51,0x49,0x99,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x54,0x54
|
||||
,0xb6,0xb6,0x33,0x3d,0x3e,0x3e,0x2a,0x33,0x20,0x2a,0x20,0x33,0x2a,0x58
|
||||
,0x58,0x50,0x10,0x58,0x10,0x10,0x58,0x99,0x00,0x99,0x00,0x00,0x00,0x00
|
||||
,0x33,0x10,0x00,0x49,0xb6,0x29,0x3f,0x33,0x33,0x33,0x3d,0x33,0x20,0x2a
|
||||
,0x33,0x2a,0x29,0x58,0x99,0x10,0x50,0x10,0x10,0x10,0x10,0x99,0x51,0x00
|
||||
,0x51,0x00,0x10,0x10,0x33,0x33,0x10,0x00,0x3d,0x6c,0x3d,0x33,0x3e,0x33
|
||||
,0x33,0x2a,0x2a,0x2a,0x33,0x29,0x10,0x58,0x58,0x10,0x10,0x10,0x51,0x10
|
||||
,0x50,0x99,0x51,0x51,0x00,0x00,0x00,0x10,0x10,0x37,0x37,0x10,0x7f,0xb6
|
||||
,0x33,0x3d,0x33,0x3f,0x2a,0x33,0x2a,0x33,0x29,0x10,0x10,0x29,0x10,0x33
|
||||
,0x10,0x50,0x49,0x10,0x51,0x51,0x51,0x51,0x51,0x00,0x00,0x00,0x00,0x33
|
||||
,0x37,0x33,0x3d,0x2a,0x3d,0x3d,0x3e,0x33,0x33,0x2a,0x2a,0x33,0x33,0x10
|
||||
,0x2a,0x20,0x10,0x10,0x10,0x50,0x49,0x58,0x51,0x51,0x58,0x99,0x00,0x00
|
||||
,0x00,0x00,0x00,0x10,0x33,0x33,0x7f,0x3d,0x33,0x7f,0x3d,0x3d,0x33,0x3d
|
||||
,0x20,0x29,0x20,0x33,0x2a,0x10,0x10,0x2a,0x10,0x10,0x10,0x58,0x99,0x51
|
||||
,0x59,0x99,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x33,0x29,0x3e,0x3d,0x3d
|
||||
,0x7c,0x3e,0x2a,0x3d,0x2c,0x2a,0x20,0x33,0x29,0x20,0x10,0x2a,0x10,0x10
|
||||
,0x49,0x10,0x99,0x49,0x51,0x51,0x49,0x00,0x10,0x10,0x10,0x10,0x53,0x14
|
||||
,0x29,0x33,0x7e,0x33,0x3d,0x3d,0x33,0x33,0x29,0x20,0x20,0x33,0x20,0x20
|
||||
,0x20,0x20,0x10,0x51,0x50,0x10,0x99,0x49,0x49,0x51,0x9a,0x4b,0x53,0x53
|
||||
,0x4a,0x15,0x56,0x54,0x2d,0x7c,0x3e,0x3d,0x3d,0x7e,0x3d,0x3d,0x2a,0x33
|
||||
,0x10,0x29,0x2a,0x29,0x10,0x20,0x10,0x58,0x58,0x58,0x99,0x51,0x10,0x49
|
||||
,0x49,0x4a,0x4b,0x53,0x56,0x54,0x4b,0x54,0x6c,0x33,0x3d,0x3d,0x3d,0x33
|
||||
,0x3d,0x33,0x29,0x33,0x20,0x20,0x20,0x10,0x2a,0x10,0x50,0x99,0x58,0x58
|
||||
,0x51,0x51,0x51,0x4a,0x4b,0x4b,0x54,0x66,0x67,0x56,0x2e,0x5e,0xb6,0x3d
|
||||
,0x33,0x7f,0x29,0x3d,0x2a,0x29,0x33,0x29,0x20,0x2a,0x10,0x10,0x2a,0x10
|
||||
,0x10,0x50,0x10,0x50,0x59,0x51,0x51,0x51,0x51,0x54,0x15,0x66,0x5e,0x15
|
||||
,0x33,0x08,0x7b,0x7b,0x58,0x58,0x08,0x7b,0x28,0x28,0x08,0x08,0x50,0x08
|
||||
,0x08,0x51,0x51,0x51,0x33,0x33,0x10,0x55,0x5e,0x67,0x26,0x66,0x29,0x7f
|
||||
,0x3e,0x7b,0x7b,0x28,0x58,0x08,0x7b,0x7b,0x58,0x58,0x7b,0x7b,0x28,0x28
|
||||
,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x51,0x52,0x37,0x37,0x10,0x10,0x5d
|
||||
,0x53,0x55,0x6c,0x3e,0x3d,0x7b,0x7b,0x7b,0x58,0x08,0x7b,0x7b,0x28,0x7b
|
||||
,0x7b,0x7b,0x08,0x08,0x08,0x58,0x58,0x08,0x58,0x58,0x58,0x99,0x49,0x37
|
||||
,0x37,0x33,0x33,0x10,0x10,0x49,0x7f,0x7f,0x33,0x7b,0x28,0x7b,0x08,0x58
|
||||
,0x28,0x7b,0x58,0x58,0x58,0x7b,0x58,0x08,0x08,0x58,0x58,0x58,0x58,0x58
|
||||
,0x08,0x99,0x49,0x00,0x33,0x10,0x10,0x10,0x10,0x13,0x3d,0x7f,0x28,0x7b
|
||||
,0x28,0x28,0x58,0x58,0x7b,0x7b,0x7b,0x28,0x7b,0x7b,0x58,0x08,0x08,0x08
|
||||
,0x58,0x08,0x08,0x08,0x08,0x99,0x00,0x00,0x10,0x10,0x33,0x33,0x13,0x09
|
||||
,0x3d,0x7f,0x28,0x7b,0x7b,0x28,0x28,0x7b,0x7b,0x7b,0x7b,0x28,0x7b,0x7b
|
||||
,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x58,0x58,0x58,0x58,0x08,0x10,0x00
|
||||
,0x00,0x10,0x65,0x09,0x3d,0xb6,0x58,0x28,0x7b,0x28,0x28,0x7b,0x7b,0x7b
|
||||
,0x28,0x28,0x7b,0x7b,0x08,0x08,0x58,0x58,0x7b,0x08,0x08,0x08,0x58,0x58
|
||||
,0x58,0x08,0x00,0x00,0x00,0x00,0x65,0x09,0x3d,0x2a,0x08,0x58,0x28,0x28
|
||||
,0x28,0x7b,0x7b,0x28,0x28,0x7b,0x7b,0x08,0x08,0x08,0x58,0x28,0x28,0x58
|
||||
,0x08,0x58,0x58,0x58,0x08,0x00,0x00,0x00,0x10,0x10,0x13,0x09,0xb6,0x7b
|
||||
,0x08,0x08,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x08,0x08,0x08
|
||||
,0x58,0x28,0x28,0x58,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x10,0x10,0x65
|
||||
,0x13,0x09,0x7b,0x7b,0x08,0x58,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x7b
|
||||
,0x7b,0x08,0x08,0x58,0x58,0x58,0x28,0x08,0x08,0x08,0x08,0x08,0x08,0x00
|
||||
,0x00,0x00,0x65,0x65,0x13,0x09,0x7b,0x7b,0x7b,0x28,0x28,0x7b,0x7b,0x58
|
||||
,0x58,0x28,0x7b,0x7b,0x7b,0x28,0x08,0x08,0x58,0x58,0x28,0x08,0x08,0x08
|
||||
,0x08,0x08,0x08,0x08,0x53,0x4a,0x65,0x13,0x09,0x13,0x7b,0x7b,0x28,0x28
|
||||
,0x28,0x28,0x7b,0x7b,0x58,0x58,0x7b,0x7b,0x28,0x28,0x08,0x08,0x08,0x08
|
||||
,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x09,0x65,0x13,0x13,0x65,0x13
|
||||
,0x07,0x7b,0x58,0x58,0x28,0x7b,0x7b,0x7b,0x58,0x58,0x58,0x28,0x28,0x28
|
||||
,0x08,0x08,0x08,0x08,0x08,0x08,0x58,0x58,0x28,0x28,0x08,0x08,0x09,0x13
|
||||
,0x13,0x65,0x65,0x13,0x7b,0x7b,0x7b,0x58,0x58,0x28,0x7b,0x7b,0x58,0x58
|
||||
,0x58,0x58,0x58,0x58,0x08,0x08,0x08,0x08,0x08,0x08,0x58,0x58,0x58,0x28
|
||||
,0x28,0x28,0x08,0x09,0x09,0x09,0x09,0x65,0x08,0x7b,0x7b,0x58,0x58,0x28
|
||||
,0x28,0x28,0x58,0x58,0x58,0x58,0x28,0x7b,0x28,0x58,0x08,0x08,0x08,0x08
|
||||
,0x08,0x58,0x28,0x28,0x28,0x28,0x28,0x09,0x13,0x65,0x65,0x65,0x58,0x7b
|
||||
,0x7b,0x7b,0x58,0x28,0x28,0x58,0x58,0x58,0x58,0x58,0x28,0x28,0x7b,0x58
|
||||
,0x08,0x08,0x08,0x08,0x08,0x08,0x58,0x28,0x28,0x28,0x09,0x09,0x13,0x13
|
||||
,0x13,0x09,0x58,0x7b,0x7b,0x28,0x28,0x28,0x28,0x58,0x58,0x58,0x58,0x58
|
||||
,0x28,0x7b,0x7b,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x58,0x58,0x08,0x08
|
||||
,0x09,0x09,0x09,0x09,0x09,0x09,0x29,0x28,0x28,0x28,0x28,0x28,0x7b,0x58
|
||||
,0x58,0x58,0x58,0x28,0x7b,0x28,0x08,0x08,0x08,0x08,0x28,0x28,0x08,0x58
|
||||
,0x58,0x28,0x08,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x6c,0x28,0x58,0x28
|
||||
,0x28,0x28,0x7b,0x7b,0x28,0x28,0x58,0x7b,0x7b,0x7b,0x08,0x08,0x58,0x58
|
||||
,0x28,0x58,0x58,0x58,0x28,0x28,0x28,0x08,0x08,0x13,0x09,0x09,0x09,0x09
|
||||
,0xb6,0xb6,0x08,0x28,0x28,0x28,0x28,0x7b,0x7b,0x28,0x58,0x28,0x7b,0x7b
|
||||
,0x28,0x08,0x08,0x58,0x7b,0x08,0x58,0x58,0x28,0x28,0x28,0x08,0x08,0x00
|
||||
,0x13,0x09,0x09,0x09,0xb6,0x29,0x58,0x28,0x28,0x7b,0x7b,0x7b,0x7b,0x28
|
||||
,0x58,0x58,0x28,0x28,0x28,0x08,0x08,0x08,0x28,0x08,0x08,0x58,0x58,0x58
|
||||
,0x08,0x08,0x10,0x10,0x33,0x13,0x09,0x09,0x3d,0x6c,0x28,0x7b,0x28,0x7b
|
||||
,0x28,0x7b,0x7b,0x58,0x08,0x08,0x08,0x08,0x28,0x08,0x08,0x08,0x58,0x08
|
||||
,0x08,0x08,0x58,0x08,0x08,0x00,0x00,0x10,0x10,0x13,0x13,0x09,0x7f,0xb6
|
||||
,0x28,0x7b,0x7b,0x7b,0x08,0x08,0x08,0x08,0x58,0x58,0x08,0x08,0x08,0x08
|
||||
,0x58,0x58,0x58,0x58,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x33
|
||||
,0x13,0x09,0x3d,0x2a,0x08,0x08,0x7b,0x7b,0x28,0x08,0x08,0x08,0x08,0x58
|
||||
,0x58,0x08,0x08,0x58,0x58,0x58,0x58,0x58,0x08,0x08,0x08,0x08,0x08,0x08
|
||||
,0x00,0x00,0x00,0x10,0x13,0x09,0x7f,0x3d,0x33,0x08,0x28,0x28,0x28,0x08
|
||||
,0x08,0x08,0x58,0x58,0x58,0x08,0x58,0x58,0x58,0x58,0x08,0x08,0x08,0x08
|
||||
,0x08,0x08,0x00,0x00,0x00,0x00,0x10,0x10,0x13,0x09,0x29,0x3e,0x3d,0x3d
|
||||
,0x28,0x28,0x28,0x08,0x58,0x08,0x08,0x08,0x08,0x28,0x58,0x58,0x28,0x28
|
||||
,0x08,0x58,0x08,0x08,0x08,0x08,0x08,0x00,0x10,0x10,0x10,0x10,0x53,0x09
|
||||
,0x29,0x33,0x7e,0x33,0x08,0x28,0x28,0x08,0x28,0x28,0x08,0x58,0x28,0x28
|
||||
,0x58,0x58,0x28,0x28,0x28,0x58,0x08,0x08,0x08,0x08,0x08,0x4b,0x53,0x53
|
||||
,0x4a,0x15,0x56,0x54,0x2d,0x7c,0x3e,0x3d,0x08,0x08,0x58,0x58,0x28,0x28
|
||||
,0x08,0x28,0x28,0x28,0x58,0x58,0x58,0x08,0x08,0x08,0x08,0x08,0x10,0x49
|
||||
,0x49,0x4a,0x4b,0x53,0x56,0x54,0x4b,0x54,0x6c,0x33,0x3d,0x3d,0x3d,0x08
|
||||
,0x58,0x08,0x28,0x28,0x08,0x08,0x28,0x28,0x08,0x08,0x08,0x08,0x08,0x08
|
||||
,0x08,0x08,0x51,0x4a,0x4b,0x4b,0x54,0x66,0x67,0x56,0x2e,0x5e,0xb6,0x3d
|
||||
,0x33,0x7f,0x29,0x3d,0x2a,0x28,0x28,0x58,0x58,0x08,0x18,0x18,0x08,0x08
|
||||
,0x08,0x08,0x08,0x50,0x59,0x51,0x51,0x51,0x51,0x54,0x15,0x66,0x5e,0x15
|
||||
,0x56,0x54
|
||||
};
|
||||
|
||||
|
@ -660,6 +664,130 @@ const unsigned char sprite3[] =
|
|||
,0x07,0x07
|
||||
};
|
||||
|
||||
const unsigned char sprite4[] =
|
||||
{ 24, 24 // width, height
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x58,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x07,0x58,0x2b,0x34,0x34
|
||||
,0x34,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x58,0x34,0x58,0x2b,0x34,0x7d,0x7d,0x7d,0x34,0x0a,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34
|
||||
,0x34,0x58,0x2b,0x7d,0x7d,0x34,0x0a,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34,0x7d,0x58,0x2b,0x2b
|
||||
,0x2b,0x0a,0x09,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x58,0x34,0x7d,0x58,0x22,0x2b,0x58,0x58,0x34,0x34
|
||||
,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x58,0x34,0x2b,0x58,0x58,0x58,0x22,0x34,0xbf,0x7f,0x7d,0x7d,0x0a,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x2b,0x2b,0x58
|
||||
,0x58,0x22,0x2b,0x7d,0x7f,0x34,0x34,0x34,0x34,0x0a,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x58,0x34,0x09,0x58,0x2b,0x2b
|
||||
,0x2b,0x22,0x22,0x58,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x22,0x58,0x7d,0x34,0x09,0x58,0x58,0x58,0x58,0x0a,0x0a
|
||||
,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x2b
|
||||
,0x58,0x7f,0x34,0x22,0x09,0x58,0x2b,0x34,0x34,0x34,0x34,0x0a,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34,0x2b,0x58,0x34,0x7f,0x34
|
||||
,0x09,0x22,0x2b,0x7f,0x7f,0x7d,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x58,0x34,0x7d,0x7d,0x22,0x58,0x34,0x34,0x22,0x22,0x2b,0x7d
|
||||
,0x7d,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34
|
||||
,0x7d,0x34,0x22,0x5a,0x58,0x2b,0x2b,0x58,0x58,0x58,0x0a,0x0a,0x0a,0x0a
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34,0x34,0x5a,0x2b,0x2b
|
||||
,0x09,0x58,0x58,0x2b,0x2b,0x34,0x34,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x58,0x58,0x58,0x2b,0x35,0x34,0x09,0x58,0x2b
|
||||
,0x7d,0x7f,0x7d,0x7d,0x34,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x58,0x34,0x3d,0x2c,0x22,0x09,0x2b,0x7d,0x7f,0x34,0x7d
|
||||
,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34
|
||||
,0x7d,0x2b,0x3d,0x34,0x09,0x22,0x22,0x22,0x34,0x0a,0x0a,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34,0x7d,0x22,0x58,0x2b
|
||||
,0x7d,0x7d,0x34,0x2b,0x09,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x58,0x7d,0x7f,0x0a,0x0a,0x2b,0x34,0x7d,0x7f,0x7d
|
||||
,0x2b,0x09,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x58,0x7d,0x7f,0x0a,0x07,0x58,0x2b,0x34,0x7d,0x7d,0x7d,0x2b,0x09,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34,0x7d,0x0a
|
||||
,0x07,0x07,0x58,0x58,0x34,0x34,0x34,0x34,0x0a,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x58,0x34,0x0a,0x07,0x07,0x07,0x07
|
||||
,0x58,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x58,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07
|
||||
};
|
||||
|
||||
const unsigned char sprite5[] =
|
||||
{ 32, 32 // width, height
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x1c,0x1c,0x1c,0x1c,0x5b,0x5b,0x09,0x09,0x13,0x1c,0x1d
|
||||
,0x0a,0x0a,0x0a,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x1c,0x1c,0x1c,0x1c,0x25,0x25,0x25,0x25,0x25,0x25,0x5b
|
||||
,0x09,0x13,0x13,0x1c,0x13,0x13,0x0a,0x0a,0x0a,0x09,0x09,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x5b,0x09,0x1d,0x26,0x26,0x26,0x26,0x26
|
||||
,0x26,0x26,0x26,0x1d,0x5b,0x09,0x13,0x1c,0x1c,0x1c,0x13,0x13,0x0b,0x0a
|
||||
,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x13,0x64,0x09,0x1d
|
||||
,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x5b,0x5b,0x09,0x13,0x1d,0x1d
|
||||
,0x1d,0x13,0x13,0x13,0x0a,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x09
|
||||
,0x13,0x64,0x09,0x1d,0x1c,0x1c,0x1c,0x13,0x13,0x13,0x13,0x13,0x13,0x64
|
||||
,0x09,0x13,0x13,0x13,0x1d,0x1c,0x13,0x13,0x09,0x09,0x09,0x09,0x07,0x07
|
||||
,0x07,0x07,0x07,0x09,0x13,0x64,0x09,0x13,0x13,0x13,0x13,0x13,0x13,0x13
|
||||
,0x13,0x13,0x13,0x5b,0x5b,0x09,0x13,0x13,0x13,0x1c,0x13,0x13,0x13,0x09
|
||||
,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x09,0x13,0x5b,0x09,0x13,0x13,0x13
|
||||
,0x13,0x26,0x26,0x26,0x26,0x26,0x26,0x1d,0x64,0x09,0x1c,0x1c,0x1c,0x13
|
||||
,0x13,0x13,0x13,0x0a,0x09,0x09,0x09,0x07,0x07,0x07,0x09,0x12,0x13,0x12
|
||||
,0x5b,0x13,0x13,0x1c,0x1c,0x25,0x25,0x25,0x26,0x26,0x26,0x25,0x64,0x09
|
||||
,0x1c,0x1c,0x1d,0x1d,0x1c,0x1c,0x13,0x0a,0x09,0x09,0x09,0x07,0x07,0x07
|
||||
,0x09,0x12,0x13,0x13,0x5b,0x09,0x13,0x1c,0x1c,0x1d,0x1d,0x26,0x26,0x26
|
||||
,0x26,0x26,0x64,0x12,0x09,0x1c,0x1d,0x1d,0x1c,0x13,0x13,0x13,0x0a,0x09
|
||||
,0x09,0x09,0x07,0x07,0x09,0x13,0x1c,0x13,0x64,0x09,0x13,0x1c,0x1c,0x1c
|
||||
,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x13,0x12,0x09,0x1c,0x1c,0x1c,0x1c,0x13
|
||||
,0x13,0x13,0x13,0x0a,0x09,0x09,0x07,0x07,0x09,0x13,0x1c,0x13,0x64,0x09
|
||||
,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x5b,0x09,0x13
|
||||
,0x13,0x1c,0x13,0x13,0x13,0x13,0x13,0x0a,0x09,0x09,0x07,0x07,0x09,0x13
|
||||
,0x1c,0x13,0x64,0x09,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13
|
||||
,0x13,0x64,0x09,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0a,0x0a,0x09,0x09
|
||||
,0x07,0x07,0x09,0x13,0x1c,0x13,0x64,0x09,0x13,0x13,0x26,0x26,0x26,0x26
|
||||
,0x26,0x26,0x26,0x26,0x1d,0x64,0x09,0x1d,0x1d,0x1d,0x1c,0x13,0x13,0x13
|
||||
,0x13,0x0a,0x09,0x09,0x07,0x07,0x09,0x13,0x1c,0x13,0x64,0x09,0x13,0x13
|
||||
,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x25,0x64,0x09,0x1d,0x1d,0x1c
|
||||
,0x1c,0x13,0x13,0x13,0x13,0x0a,0x09,0x09,0x07,0x07,0x09,0x13,0x1c,0x13
|
||||
,0x64,0x09,0x13,0x13,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x64
|
||||
,0x09,0x1d,0x1c,0x1c,0x13,0x13,0x13,0x13,0x13,0x0a,0x09,0x09,0x07,0x07
|
||||
,0x09,0x13,0x1c,0x13,0x64,0x09,0x13,0x13,0x25,0x25,0x25,0x25,0x25,0x25
|
||||
,0x25,0x25,0x25,0x64,0x09,0x1d,0x1c,0x1c,0x13,0x13,0x13,0x13,0x13,0x0a
|
||||
,0x09,0x09,0x07,0x07,0x09,0x13,0x1c,0x0a,0x64,0x09,0x13,0x13,0x25,0x1d
|
||||
,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x64,0x09,0x1c,0x1c,0x13,0x13,0x13
|
||||
,0x13,0x13,0x0a,0x0a,0x09,0x09,0x07,0x07,0x09,0x13,0x1c,0x12,0x64,0x09
|
||||
,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x64,0x09,0x13
|
||||
,0x13,0x13,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x09,0x09,0x07,0x07,0x09,0x13
|
||||
,0x1c,0x13,0x5b,0x09,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13
|
||||
,0x13,0x5b,0x09,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0a,0x0a,0x09,0x09
|
||||
,0x07,0x07,0x09,0x12,0x1c,0x13,0x5b,0x09,0x13,0x13,0x1c,0x1d,0x1d,0x1d
|
||||
,0x1d,0x1d,0x1d,0x1d,0x1d,0x64,0x09,0x1c,0x1c,0x13,0x13,0x13,0x13,0x13
|
||||
,0x0a,0x0a,0x09,0x09,0x07,0x07,0x09,0x12,0x1c,0x12,0x5b,0x13,0x1c,0x1c
|
||||
,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1d,0x1d,0x5b,0x5b,0x13,0x13,0x13,0x13
|
||||
,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x09,0x07,0x07,0x07,0x07,0x09,0x1c,0x5b
|
||||
,0x09,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x12,0x09
|
||||
,0x13,0x13,0x13,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x0a,0x09,0x07,0x07,0x07
|
||||
,0x07,0x09,0x1c,0x64,0x09,0x13,0x13,0x13,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c
|
||||
,0x1c,0x13,0x12,0x09,0x13,0x13,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x0a,0x0a
|
||||
,0x09,0x07,0x07,0x07,0x07,0x09,0x13,0x64,0x0a,0x13,0x13,0x13,0x13,0x13
|
||||
,0x13,0x13,0x13,0x13,0x13,0x12,0x12,0x0a,0x13,0x13,0x13,0x13,0x0a,0x0a
|
||||
,0x0a,0x0a,0x0a,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x13,0x09,0x13,0x13
|
||||
,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x12,0x09,0x13,0x13,0x13
|
||||
,0x13,0x13,0x0a,0x0a,0x0a,0x0a,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x0a,0x0b,0x13,0x1c,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x12,0x12
|
||||
,0x0a,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x0a,0x09,0x09,0x09,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x13,0x13,0x13,0x13,0x1c,0x1c,0x13,0x13,0x13
|
||||
,0x13,0x12,0x12,0x09,0x13,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x09,0x09,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x13
|
||||
,0x13,0x13,0x13,0x13,0x13,0x09,0x09,0x13,0x13,0x13,0x0a,0x0a,0x0a,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
||||
,0x07,0x07
|
||||
};
|
||||
|
||||
const unsigned char *textures[] = {texture1, texture2, texture3, texture4};
|
||||
|
||||
Unit textureAt(int16_t x, int16_t y)
|
||||
|
@ -795,15 +923,30 @@ int main()
|
|||
|
||||
player.setPositionSquare(6,4);
|
||||
|
||||
// statues
|
||||
sprites[0] = Sprite(sprite1,10,5,1,100);
|
||||
sprites[1] = Sprite(sprite1,14,5,1,100);
|
||||
|
||||
// NPC
|
||||
sprites[2] = Sprite(sprite2,15,19,1,200);
|
||||
|
||||
// trees
|
||||
sprites[3] = Sprite(sprite3,8,2,1,300);
|
||||
sprites[3].mPosition.y -= UNITS_PER_SQUARE / 2;
|
||||
sprites[4] = Sprite(sprite3,20,5,1,300);
|
||||
sprites[5] = Sprite(sprite3,26,18,1,300);
|
||||
sprites[6] = Sprite(sprite3,16,12,1,300);
|
||||
|
||||
// grass
|
||||
sprites[7] = Sprite(sprite4,27,16,0,100);
|
||||
sprites[8] = Sprite(sprite4,6,6,0,150);
|
||||
sprites[9] = Sprite(sprite4,8,5,0,120);
|
||||
sprites[10] = Sprite(sprite4,17,6,0,150);
|
||||
|
||||
// barrels
|
||||
sprites[11] = Sprite(sprite5,12,16,0,120);
|
||||
sprites[12] = Sprite(sprite5,27,5,0,120);
|
||||
|
||||
uint32_t previousTime = 0;
|
||||
uint32_t dt;
|
||||
|
||||
|
|
Loading…
Reference in a new issue