2018-08-31 18:40:05 +02:00
|
|
|
/**
|
|
|
|
WIP raycasting demo for Pokitto.
|
|
|
|
|
2018-09-03 10:56:48 +02:00
|
|
|
Don't forget to compile with -O3!
|
|
|
|
|
2018-08-31 18:40:05 +02:00
|
|
|
author: Miloslav "drummyfish" Ciz
|
2018-09-08 14:30:03 +02:00
|
|
|
license: CC0 1.0
|
|
|
|
*/
|
2018-08-31 18:40:05 +02:00
|
|
|
|
2018-09-09 16:16:52 +02:00
|
|
|
#define CAMERA_COLL_HEIGHT_BELOW ((3 * UNITS_PER_SQUARE) / 2)
|
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
#include "general.hpp"
|
2018-09-04 15:52:12 +02:00
|
|
|
|
2018-09-05 15:59:34 +02:00
|
|
|
#define LEVEL_X_RES 29
|
|
|
|
#define LEVEL_Y_RES 21
|
|
|
|
|
2018-09-08 14:55:14 +02:00
|
|
|
Player player;
|
|
|
|
|
|
|
|
#define SPRITES 3
|
|
|
|
#define SPRITE_MAX_DISTANCE 5 * UNITS_PER_SQUARE
|
2018-09-08 15:00:13 +02:00
|
|
|
|
2018-09-08 15:58:32 +02:00
|
|
|
#define JUMP_SPEED 500
|
|
|
|
|
2018-09-08 14:55:14 +02:00
|
|
|
Sprite sprites[SPRITES];
|
|
|
|
|
2018-09-08 15:00:13 +02:00
|
|
|
/// For each level square says the texture index.
|
2018-09-05 16:25:57 +02:00
|
|
|
const unsigned char levelTexture[] =
|
|
|
|
{
|
2018-09-06 11:18:47 +02:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 3, 3, 2, 2, 2, 2,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 1, 2,
|
2018-09-05 17:12:11 +02:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0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1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
|
2018-09-06 11:18:47 +02:00
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3,
|
|
|
|
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
|
2018-09-05 16:25:57 +02:00
|
|
|
};
|
|
|
|
|
2018-09-08 15:00:13 +02:00
|
|
|
/// For each level square says the floor height.
|
2018-09-05 15:59:34 +02:00
|
|
|
const signed char levelFloor[] =
|
|
|
|
{
|
|
|
|
40,40,40,40,40,40,40,40,48,40,48,40,40,40,40,40,40,48,40,48,40,48,40,48,48,24,24,26,28,
|
|
|
|
40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,40, 2, 2, 2,40,32,32,32,32,32,32,32,48, 2, 2, 2,26,
|
|
|
|
40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,40, 2, 2, 2,40, 0, 0, 0, 0, 0,32,32,40, 2, 2, 2,26,
|
|
|
|
40,16,12, 8, 4, 0,48, 0, 0, 0, 0, 0,24, 2,24, 8,24, 0, 0, 9, 9, 0,28,32,48, 2, 2, 2,24,
|
|
|
|
40,20,48,48,48,48,48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0,24,32,40, 0, 0, 0,24,
|
|
|
|
40,24,48,40,40,40,40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20,32,48, 0, 0, 0,24,
|
2018-09-08 11:11:27 +02:00
|
|
|
40,28,32,32,32,32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8,12,16,32,40, 0, 0, 0,24,
|
2018-09-05 15:59:34 +02:00
|
|
|
40,32,32,32,32,32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,32,32,32,32,32,48, 0, 0, 0,24,
|
|
|
|
40, 0,48,40,40,40,40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,-3,-8,-8,-5,-2, 0, 0, 0, 0,24,
|
2018-09-08 11:11:27 +02:00
|
|
|
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,
|
|
|
|
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,
|
2018-09-05 15:59:34 +02:00
|
|
|
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,-8,-8,-8,-8,-8, 0, 0, 0, 0, 0, 0,24,
|
2018-09-09 16:16:52 +02:00
|
|
|
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,
|
2018-09-05 15:59:34 +02:00
|
|
|
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,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,
|
|
|
|
0,24,48,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,24,
|
|
|
|
0,24,48,48,48,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0,24,
|
|
|
|
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
|
|
|
|
};
|
|
|
|
|
2018-09-08 15:00:13 +02:00
|
|
|
/// For each level square says the ceiling height.
|
2018-09-05 15:59:34 +02:00
|
|
|
const signed char levelCeiling[] =
|
|
|
|
{
|
2018-09-05 19:08:22 +02:00
|
|
|
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,
|
2018-09-09 16:33:07 +02:00
|
|
|
40,50,50,50,45,40,20,99,99,99,99,36,40,30,30,30,99,36,99,99,99,99,99,99,99,99,99,99,99,
|
|
|
|
40,50,50,50,45,40,20,99,99,99,99,36,40,30,30,30,99,36,99,99,99,99,99,99,99,99,99,99,99,
|
|
|
|
40,50,50,50,45,40,48,99,99,99,99,36,24,24,24,24,24,36,99,99,99,99,99,99,99,99,99,99,99,
|
|
|
|
40,50,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,50,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,50,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,50,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,50,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,99,
|
|
|
|
40,40,16,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,30,16,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,25,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,99,
|
2018-09-08 11:11:27 +02:00
|
|
|
40,20,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,99,
|
|
|
|
40,18,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,24,24,24,24,
|
|
|
|
40,18,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,24,24,24,24,
|
|
|
|
40,18,16,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,25,27,29,24,
|
|
|
|
40,18,16,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,25,27,29,24,
|
2018-09-05 15:59:34 +02:00
|
|
|
40,24,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,25,27,29,24,
|
2018-09-08 11:11:27 +02:00
|
|
|
99,24,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,25,27,29,24,
|
|
|
|
99,24,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,25,27,29,24,
|
|
|
|
99,24,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,24,24,24,24,24,24
|
2018-09-05 15:59:34 +02:00
|
|
|
};
|
|
|
|
|
2018-09-05 17:12:11 +02:00
|
|
|
const unsigned char texture1[] =
|
2018-09-03 14:22:52 +02:00
|
|
|
{ 32, 32 // width, height
|
2018-09-05 06:33:11 +02:00
|
|
|
,0x12,0x65,0x65,0x6d,0x24,0x64,0x5b,0x12,0x12,0x64,0x5b,0x5b,0x12,0x51
|
|
|
|
,0x12,0x09,0x00,0x6d,0x6d,0x6d,0x24,0x5b,0x5b,0x52,0x12,0x5b,0x52,0x5b
|
|
|
|
,0x12,0x5b,0x52,0x09,0x12,0x5b,0x5b,0x5b,0x52,0x5b,0x5b,0x52,0x00,0x64
|
|
|
|
,0x64,0x52,0x52,0x52,0x5b,0x00,0x09,0x6d,0x5b,0x5a,0x5b,0x5b,0x5a,0x51
|
|
|
|
,0x12,0x64,0x5b,0x52,0x5b,0x52,0x5b,0x08,0x12,0x24,0x5b,0x5b,0x5b,0x5b
|
|
|
|
,0x09,0x11,0x00,0x64,0x5b,0x5b,0x5a,0x09,0x09,0x08,0x00,0x5b,0x5b,0x5b
|
|
|
|
,0x5a,0x64,0x12,0x51,0x00,0x64,0x5b,0x52,0x52,0x11,0x09,0x09,0x12,0x24
|
|
|
|
,0x5b,0x5b,0x52,0x5a,0x12,0x09,0x00,0x5b,0x52,0x09,0x12,0x09,0x09,0x09
|
|
|
|
,0x00,0x24,0x5a,0x5a,0x5b,0x51,0x12,0x08,0x09,0x25,0x5b,0x52,0x5b,0x52
|
|
|
|
,0x11,0x09,0x12,0x64,0x5b,0x52,0x09,0x11,0x12,0x09,0x00,0x12,0x00,0x12
|
|
|
|
,0x00,0x00,0x00,0x08,0x09,0x64,0x5b,0x51,0x12,0x11,0x12,0x08,0x09,0x64
|
|
|
|
,0x5a,0x5b,0x12,0x12,0x09,0x09,0x12,0x65,0x5c,0x52,0x5a,0x5b,0x51,0x09
|
|
|
|
,0x00,0x64,0x6d,0x6d,0x5c,0x65,0x64,0x09,0x00,0x24,0x64,0x5b,0x09,0x12
|
|
|
|
,0x11,0x00,0x09,0x64,0x5b,0x52,0x52,0x12,0x12,0x08,0x00,0x64,0x52,0x52
|
|
|
|
,0x52,0x52,0x5b,0x09,0x00,0x6d,0x5b,0x5b,0x52,0x5b,0x51,0x09,0x00,0x1b
|
|
|
|
,0x5b,0x12,0x12,0x12,0x12,0x09,0x12,0x5b,0x11,0x09,0x11,0x09,0x09,0x09
|
|
|
|
,0x09,0x5b,0x09,0x09,0x09,0x09,0x09,0x09,0x12,0x65,0x5b,0x5b,0x5b,0x52
|
|
|
|
,0x5b,0x09,0x00,0x64,0x12,0x63,0x5b,0x12,0x5b,0x09,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x09,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5b
|
|
|
|
,0x64,0x5b,0x09,0x5b,0x52,0x09,0x09,0x5b,0x11,0x52,0x09,0x12,0x09,0x08
|
|
|
|
,0x00,0x1b,0x1b,0x23,0x1b,0x5a,0x5b,0x11,0x12,0x64,0x64,0x6d,0x24,0x5b
|
|
|
|
,0x5b,0x09,0x00,0x5b,0x5a,0x52,0x52,0x09,0x08,0x09,0x12,0x5b,0x52,0x11
|
|
|
|
,0x5a,0x11,0x12,0x08,0x08,0x1b,0x52,0x52,0x5b,0x5a,0x09,0x09,0x12,0x64
|
|
|
|
,0x5b,0x64,0x12,0x12,0x12,0x08,0x00,0x00,0x00,0x12,0x09,0x00,0x09,0x00
|
|
|
|
,0x12,0x24,0x5a,0x52,0x12,0x12,0x12,0x08,0x12,0x1b,0x12,0x5a,0x49,0x5a
|
|
|
|
,0x52,0x09,0x12,0x6d,0x5b,0x52,0x5a,0x12,0x09,0x09,0x12,0x65,0x64,0x6d
|
|
|
|
,0x6d,0x64,0x64,0x5b,0x00,0x5a,0x08,0x08,0x09,0x09,0x08,0x09,0x00,0x5b
|
|
|
|
,0x5a,0x11,0x51,0x51,0x5a,0x09,0x12,0x6d,0x5b,0x5b,0x12,0x11,0x12,0x09
|
|
|
|
,0x00,0x65,0x5b,0x64,0x5b,0x5b,0x5b,0x52,0x00,0x00,0x12,0x12,0x12,0x09
|
|
|
|
,0x00,0x00,0x00,0x5a,0x52,0x52,0x09,0x52,0x09,0x09,0x12,0x63,0x5b,0x5a
|
|
|
|
,0x09,0x5b,0x11,0x08,0x00,0x65,0x5b,0x5b,0x52,0x5b,0x52,0x52,0x00,0x65
|
|
|
|
,0x6d,0x64,0x65,0x64,0x64,0x5b,0x00,0x5b,0x12,0x09,0x11,0x09,0x09,0x09
|
|
|
|
,0x09,0x5b,0x11,0x08,0x09,0x09,0x09,0x08,0x00,0x64,0x64,0x5b,0x5b,0x5b
|
|
|
|
,0x5b,0x09,0x00,0x5b,0x5b,0x5b,0x5b,0x5b,0x52,0x52,0x00,0x64,0x51,0x52
|
|
|
|
,0x52,0x52,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x5b
|
|
|
|
,0x5b,0x5b,0x52,0x52,0x5b,0x09,0x12,0x65,0x5b,0x5b,0x5b,0x52,0x5b,0x09
|
|
|
|
,0x00,0x63,0x5a,0x51,0x51,0x51,0x5a,0x08,0x12,0x24,0x64,0x65,0x24,0x64
|
|
|
|
,0x64,0x5b,0x00,0x5b,0x5b,0x52,0x5b,0x5b,0x52,0x09,0x00,0x64,0x5b,0x5b
|
|
|
|
,0x12,0x52,0x5a,0x09,0x12,0x24,0x52,0x52,0x09,0x52,0x52,0x08,0x12,0x64
|
|
|
|
,0x64,0x5b,0x5b,0x5b,0x64,0x52,0x00,0x6d,0x5b,0x52,0x5b,0x52,0x52,0x08
|
|
|
|
,0x00,0x5b,0x5b,0x52,0x52,0x5b,0x52,0x09,0x00,0x1b,0x52,0x51,0x5a,0x52
|
|
|
|
,0x09,0x09,0x12,0x64,0x52,0x5c,0x5b,0x64,0x5b,0x51,0x09,0x6d,0x5b,0x52
|
|
|
|
,0x5b,0x52,0x11,0x09,0x00,0x64,0x5a,0x64,0x5b,0x52,0x5b,0x08,0x00,0x11
|
|
|
|
,0x09,0x49,0x08,0x09,0x00,0x09,0x00,0x64,0x64,0x5b,0x52,0x5b,0x5b,0x09
|
|
|
|
,0x12,0x65,0x64,0x5b,0x52,0x5b,0x52,0x09,0x12,0x64,0x64,0x64,0x52,0x09
|
|
|
|
,0x5c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x64,0x5b,0x64
|
|
|
|
,0x52,0x5b,0x52,0x49,0x00,0x64,0x5b,0x52,0x52,0x5b,0x51,0x09,0x09,0x5b
|
|
|
|
,0x09,0x09,0x09,0x08,0x09,0x12,0x00,0x6d,0x24,0x6d,0x24,0x64,0x64,0x5b
|
|
|
|
,0x00,0x64,0x63,0x5b,0x5b,0x52,0x52,0x09,0x12,0x64,0x5b,0x5b,0x52,0x11
|
|
|
|
,0x5b,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x12,0x6d,0x64,0x5b
|
|
|
|
,0x52,0x64,0x5b,0x52,0x12,0x6d,0x5b,0x5b,0x5b,0x5b,0x5b,0x09,0x00,0x64
|
|
|
|
,0x11,0x5a,0x52,0x5b,0x52,0x09,0x00,0x5b,0x5a,0x63,0x5a,0x23,0x12,0x00
|
|
|
|
,0x12,0x6d,0x5b,0x11,0x5b,0x64,0x64,0x52,0x12,0x63,0x5b,0x5b,0x5b,0x5b
|
|
|
|
,0x52,0x08,0x00,0x5c,0x52,0x5b,0x5b,0x52,0x52,0x08,0x08,0x5b,0x52,0x51
|
|
|
|
,0x09,0x52,0x5a,0x09,0x00,0x6d,0x52,0x11,0x52,0x5b,0x52,0x09,0x12,0x64
|
|
|
|
,0x5a,0x5b,0x52,0x5b,0x5b,0x08,0x00,0x5b,0x52,0x09,0x09,0x09,0x09,0x09
|
|
|
|
,0x09,0x24,0x52,0x09,0x12,0x09,0x52,0x08,0x00,0x5b,0x5a,0x52,0x12,0x5b
|
|
|
|
,0x5b,0x09,0x00,0x65,0x52,0x5b,0x5b,0x52,0x11,0x09,0x09,0x00,0x00,0x00
|
|
|
|
,0x00,0x12,0x00,0x08,0x00,0x5b,0x52,0x51,0x09,0x09,0x09,0x09,0x00,0x64
|
|
|
|
,0x5b,0x52,0x52,0x09,0x5b,0x09,0x12,0x6d,0x5b,0x5b,0x5b,0x5b,0x5a,0x11
|
|
|
|
,0x00,0x6d,0x6d,0x24,0x64,0x64,0x5b,0x5b,0x00,0x5a,0x12,0x52,0x12,0x09
|
|
|
|
,0x12,0x08,0x00,0x5b,0x12,0x09,0x09,0x09,0x08,0x09,0x00,0x64,0x5b,0x5b
|
|
|
|
,0x52,0x5a,0x5b,0x09,0x12,0x6d,0x64,0x5a,0x5b,0x5b,0x5b,0x5b,0x00,0x5a
|
|
|
|
,0x11,0x52,0x09,0x12,0x09,0x09,0x09,0x00,0x00,0x00,0x00,0x12,0x12,0x12
|
|
|
|
,0x12,0x64,0x52,0x5b,0x5b,0x5b,0x5b,0x09,0x12,0x6d,0x12,0x5b,0x12,0x52
|
|
|
|
,0x5b,0x52,0x09,0x5a,0x09,0x51,0x09,0x09,0x09,0x09,0x09,0x5c,0x64,0x6d
|
|
|
|
,0x1b,0x24,0x64,0x08,0x12,0x64,0x5b,0x52,0x5b,0x5b,0x52,0x09,0x00,0x5b
|
|
|
|
,0x5b,0x52,0x11,0x5b,0x12,0x09,0x08,0x5b,0x5a,0x09,0x51,0x52,0x12,0x08
|
|
|
|
,0x00,0x5b,0x5b,0x11,0x5b,0x5b,0x5b,0x08,0x09,0x5b,0x12,0x52,0x52,0x09
|
|
|
|
,0x09,0x09,0x00,0x6d,0x5b,0x52,0x52,0x12,0x12,0x09,0x08,0x11,0x00,0x49
|
|
|
|
,0x09,0x00,0x09,0x00,0x00,0x6d,0x12,0x5b,0x52,0x5b,0x52,0x09,0x00,0x00
|
|
|
|
,0x09,0x09,0x12,0x00,0x12,0x00,0x00,0x64,0x52,0x5b,0x52,0x5b,0x52,0x09
|
|
|
|
,0x09,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x64,0x52,0x5b,0x5b,0x52
|
|
|
|
,0x52,0x09
|
2018-09-03 14:22:52 +02:00
|
|
|
};
|
|
|
|
|
2018-09-05 17:12:11 +02:00
|
|
|
const unsigned char texture2[] =
|
2018-09-03 15:14:39 +02:00
|
|
|
{ 32, 32 // width, height
|
2018-09-05 06:33:11 +02:00
|
|
|
,0x65,0x1d,0x01,0x1c,0x12,0x0a,0x01,0x13,0x14,0x6e,0x2e,0x0b,0x1c,0x1d
|
|
|
|
,0x2e,0x1d,0x13,0x0b,0x13,0x65,0x1d,0x1d,0x13,0x66,0x6f,0x6e,0x65,0x6f
|
|
|
|
,0x77,0x7f,0x6f,0x6f,0x1d,0x14,0x13,0x6e,0x6e,0x66,0x6f,0x77,0x77,0x6f
|
|
|
|
,0x66,0x66,0x13,0x25,0x0a,0x01,0x6e,0x66,0x01,0x12,0x02,0x01,0x1b,0x6e
|
|
|
|
,0x77,0x77,0x77,0x77,0x77,0x6f,0x6f,0x6e,0x1c,0x1d,0x1c,0x77,0x67,0x6f
|
|
|
|
,0x6f,0x77,0x67,0x77,0x77,0x66,0x13,0x0a,0x14,0x77,0x66,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x5e,0x77,0x27,0x7f,0x77,0x7f,0x67
|
|
|
|
,0x66,0x67,0x1d,0x1d,0x13,0x09,0x76,0x66,0x24,0x1c,0x1b,0x13,0x13,0x1d
|
|
|
|
,0x25,0x25,0x5e,0x1d,0x6e,0x25,0x1c,0x25,0x66,0x1d,0x09,0x1d,0x77,0x6f
|
|
|
|
,0x66,0x6f,0x66,0x66,0x66,0x6e,0x65,0x66,0x65,0x1c,0x1d,0x1d,0x65,0x14
|
|
|
|
,0x1c,0x25,0x0a,0x0a,0x0a,0x25,0x1d,0x66,0x14,0x25,0x66,0x6e,0x1d,0x25
|
|
|
|
,0x09,0x1c,0x66,0x77,0x6f,0x66,0x7f,0x77,0x1d,0x6e,0x1c,0x1d,0x1d,0x0a
|
|
|
|
,0x25,0x66,0x1d,0x25,0x13,0x0a,0x1d,0x14,0x1e,0x13,0x1d,0x14,0x65,0x66
|
|
|
|
,0x66,0x25,0x1d,0x14,0x0a,0x14,0x15,0x65,0x7f,0x77,0x66,0x25,0x1d,0x1d
|
|
|
|
,0x1d,0x6e,0x1c,0x14,0x13,0x65,0x1d,0x1c,0x0a,0x0a,0x65,0x1d,0x25,0x0a
|
|
|
|
,0x1c,0x1d,0x1c,0x25,0x1d,0x1c,0x14,0x01,0x1b,0x0a,0x1d,0x65,0x6f,0x1d
|
|
|
|
,0x66,0x65,0x6e,0x66,0x1d,0x14,0x0a,0x0a,0x1b,0x12,0x1c,0x0a,0x14,0x6e
|
|
|
|
,0x66,0x25
|
2018-09-03 15:14:39 +02:00
|
|
|
};
|
|
|
|
|
2018-09-05 17:12:11 +02:00
|
|
|
const unsigned char texture3[] =
|
|
|
|
{ 32, 32 // width, height
|
|
|
|
,0xb6,0x3d,0x33,0x33,0x3e,0x33,0x2a,0x29,0x2a,0x29,0x2a,0x20,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
|
|
|
|
,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
|
|
|
|
,0x56,0x54
|
|
|
|
};
|
|
|
|
|
2018-09-06 11:18:47 +02:00
|
|
|
const unsigned char texture4[] =
|
|
|
|
{ 32, 32 // width, height
|
|
|
|
,0x12,0x1c,0x65,0x65,0x65,0x65,0x1c,0x1c,0x1c,0x1c,0x1c,0x1b,0x1b,0x1b
|
|
|
|
,0x13,0x00,0x5b,0x5b,0xad,0xad,0xad,0xad,0x5b,0x00,0x64,0xad,0xad,0x64
|
|
|
|
,0x64,0x64,0x5b,0x00,0x1c,0x1b,0x1b,0x1b,0x13,0x13,0x12,0x13,0x12,0x12
|
|
|
|
,0x12,0x12,0x0a,0x0a,0x09,0x00,0x5b,0x5b,0xad,0xad,0xad,0x64,0x5b,0x00
|
|
|
|
,0xad,0x64,0x64,0x64,0x64,0x64,0x5b,0x00,0x65,0x1b,0x1b,0x13,0x13,0x12
|
|
|
|
,0x0a,0x0a,0x12,0x0a,0x0a,0x0a,0x0a,0x09,0x09,0x00,0x5b,0x5b,0xad,0xad
|
|
|
|
,0xad,0x64,0x5b,0x00,0xad,0x64,0x64,0x64,0x64,0x64,0x5b,0x00,0x65,0x1b
|
|
|
|
,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x0a,0x09,0x00
|
|
|
|
,0x5b,0x5b,0xad,0xad,0x64,0x64,0x5b,0x00,0x64,0x64,0x64,0x64,0x64,0x64
|
|
|
|
,0x12,0x00,0x65,0x13,0x12,0x00,0x09,0x09,0x0a,0x09,0x09,0x09,0x09,0x09
|
|
|
|
,0x13,0x0a,0x09,0x00,0x5b,0x5b,0xad,0x64,0x64,0x5b,0x5b,0x00,0x64,0x64
|
|
|
|
,0x64,0x64,0x64,0x64,0x5b,0x00,0x65,0x13,0x12,0x00,0x09,0x0a,0x12,0x12
|
|
|
|
,0x0a,0x12,0x12,0x0a,0x1b,0x0a,0x09,0x00,0x5b,0x5b,0x64,0x64,0x5b,0x64
|
|
|
|
,0x5b,0x00,0x64,0x64,0x64,0x64,0x64,0x64,0x5b,0x00,0x65,0x12,0x13,0x00
|
|
|
|
,0x09,0x12,0x0a,0x0a,0x12,0x0a,0x0a,0x0a,0x1c,0x09,0x0a,0x00,0x5b,0x5b
|
|
|
|
,0x64,0x64,0x64,0x64,0x5b,0x00,0x5b,0x5b,0x5b,0x12,0x5b,0x12,0x5b,0x00
|
|
|
|
,0x65,0x13,0x12,0x00,0x09,0x12,0x0a,0x0a,0x0a,0x09,0x0a,0x09,0x1c,0x0a
|
|
|
|
,0x0a,0x00,0x5b,0x5b,0xad,0x64,0x5b,0x64,0x5b,0x00,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x1c,0x12,0x0a,0x00,0x09,0x12,0x0a,0x0a,0x09,0x0a
|
|
|
|
,0x09,0x09,0x1c,0x0a,0x0a,0x00,0x52,0x52,0x64,0x64,0x64,0x5b,0x5b,0x00
|
|
|
|
,0xad,0xad,0xad,0xad,0xad,0xad,0x5b,0x00,0x1c,0x12,0x0a,0x00,0x09,0x0a
|
|
|
|
,0x0a,0x0a,0x09,0x09,0x09,0x09,0x65,0x0a,0x09,0x00,0x5b,0x52,0x64,0x64
|
|
|
|
,0x5b,0x64,0x5b,0x00,0xad,0xad,0xad,0xad,0xad,0x64,0x5b,0x00,0x1b,0x0a
|
|
|
|
,0x12,0x00,0x09,0x0a,0x09,0x09,0x0a,0x0a,0x09,0x09,0x65,0x09,0x09,0x00
|
|
|
|
,0x5b,0x5b,0x5b,0x64,0x5b,0x5b,0x5b,0x00,0xad,0xad,0xad,0xad,0xad,0x64
|
|
|
|
,0x5b,0x00,0x1b,0x12,0x0a,0x00,0x09,0x0a,0x0a,0x09,0x0a,0x09,0x09,0x0a
|
|
|
|
,0x1c,0x09,0x09,0x00,0x52,0x12,0x64,0x64,0x64,0x5b,0x5b,0x00,0xad,0xad
|
|
|
|
,0xad,0xad,0x64,0x64,0x5b,0x00,0x1b,0x0a,0x09,0x09,0x13,0x1b,0x1c,0x1c
|
|
|
|
,0x65,0x65,0x1c,0x1c,0x1b,0x09,0x09,0x00,0x5b,0x52,0x64,0x64,0x64,0x5b
|
|
|
|
,0x12,0x00,0xad,0xad,0xad,0x64,0x64,0x5b,0x5b,0x00,0x1b,0x0a,0x09,0x0a
|
|
|
|
,0x09,0x09,0x09,0x0a,0x09,0x0a,0x09,0x09,0x09,0x09,0x09,0x00,0x12,0x12
|
|
|
|
,0x5b,0x5b,0x5b,0x5b,0x5b,0x00,0xad,0xad,0x64,0x64,0x5b,0x5b,0x12,0x00
|
|
|
|
,0x13,0x09,0x09,0x09,0x09,0x09,0x0a,0x0a,0x09,0x09,0x09,0x09,0x09,0x09
|
|
|
|
,0x09,0x00,0x09,0x09,0x5b,0x12,0x12,0x12,0x12,0x00,0xad,0xad,0x64,0x64
|
|
|
|
,0x64,0x64,0x5b,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|
|
|
,0xad,0x64,0x64,0x5b,0x5b,0x5b,0x12,0x00,0x12,0x1c,0x65,0x65,0x65,0x65
|
|
|
|
,0x1c,0x1c,0x1c,0x1c,0x1c,0x1b,0x1b,0x1b,0x13,0x00,0x5b,0x5b,0xad,0x64
|
|
|
|
,0xad,0xad,0x5b,0x00,0x64,0x64,0x64,0x5b,0x5b,0x64,0x5b,0x00,0x1c,0x1b
|
|
|
|
,0x1b,0x1b,0x1b,0x13,0x12,0x13,0x12,0x12,0x12,0x12,0x0a,0x0a,0x09,0x00
|
|
|
|
,0x5b,0x5b,0xad,0xad,0xad,0x64,0x5b,0x00,0xad,0x64,0x5b,0x5b,0x5b,0x5b
|
|
|
|
,0x5b,0x00,0x65,0x1b,0x1b,0x13,0x13,0x12,0x0a,0x0a,0x12,0x0a,0x0a,0x0a
|
|
|
|
,0x0a,0x09,0x09,0x00,0x5b,0x5b,0xad,0x64,0x64,0x64,0x5b,0x00,0x64,0x64
|
|
|
|
,0x64,0x64,0x5b,0x5b,0x5b,0x00,0x65,0x13,0x1b,0x00,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x09,0x0a,0x09,0x00,0x5b,0x5b,0x64,0x64,0x64,0x64
|
|
|
|
,0x5b,0x00,0x64,0x64,0x64,0x64,0x5b,0x64,0x5b,0x00,0x65,0x1b,0x13,0x00
|
|
|
|
,0x09,0x09,0x0a,0x09,0x09,0x09,0x09,0x09,0x1b,0x0a,0x09,0x00,0x5b,0x5b
|
|
|
|
,0xad,0x64,0x5b,0x64,0x5b,0x00,0x64,0x64,0x64,0x64,0x5b,0x5b,0x5b,0x00
|
|
|
|
,0x65,0x13,0x12,0x00,0x09,0x0a,0x12,0x12,0x0a,0x12,0x12,0x12,0x1b,0x0a
|
|
|
|
,0x09,0x00,0x5b,0x52,0x64,0x64,0x5b,0x5b,0x5b,0x00,0x64,0x64,0x64,0x64
|
|
|
|
,0x5b,0x5b,0x12,0x00,0x65,0x12,0x13,0x00,0x09,0x12,0x0a,0x0a,0x0a,0x0a
|
|
|
|
,0x0a,0x0a,0x1c,0x09,0x0a,0x00,0x5b,0x5b,0x64,0x64,0x5b,0x64,0x5b,0x00
|
|
|
|
,0x5b,0x5b,0x5b,0x5b,0x5b,0x12,0x5b,0x00,0x65,0x13,0x12,0x00,0x09,0x12
|
|
|
|
,0x0a,0x0a,0x0a,0x09,0x0a,0x09,0x1c,0x0a,0x0a,0x00,0x5b,0x52,0x64,0x5b
|
|
|
|
,0x64,0x5b,0x5b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x12
|
|
|
|
,0x0a,0x00,0x09,0x12,0x0a,0x0a,0x09,0x0a,0x09,0x09,0x1c,0x0a,0x0a,0x00
|
|
|
|
,0x52,0x5b,0x64,0x64,0x5b,0x5b,0x5b,0x00,0xad,0xad,0xad,0xad,0xad,0xad
|
|
|
|
,0x5b,0x00,0x1c,0x12,0x0a,0x00,0x09,0x0a,0x0a,0x0a,0x09,0x09,0x09,0x09
|
|
|
|
,0x65,0x0a,0x09,0x00,0x5b,0x52,0x64,0x64,0x5b,0x5b,0x5b,0x00,0xad,0xad
|
|
|
|
,0xad,0xad,0xad,0x64,0x5b,0x00,0x1b,0x0a,0x12,0x00,0x09,0x0a,0x09,0x09
|
|
|
|
,0x0a,0x0a,0x09,0x09,0x65,0x09,0x09,0x00,0x52,0x12,0x64,0x5b,0x5b,0x5b
|
|
|
|
,0x5b,0x00,0xad,0xad,0xad,0xad,0xad,0x64,0x5b,0x00,0x1b,0x12,0x0a,0x00
|
|
|
|
,0x09,0x0a,0x0a,0x09,0x0a,0x09,0x09,0x0a,0x1c,0x09,0x09,0x00,0x52,0x52
|
|
|
|
,0x5b,0x5b,0x5b,0x64,0x5b,0x00,0xad,0xad,0xad,0xad,0x64,0x64,0x5b,0x00
|
|
|
|
,0x1b,0x0a,0x09,0x09,0x13,0x1b,0x1c,0x1c,0x65,0x65,0x1c,0x1c,0x1b,0x09
|
|
|
|
,0x09,0x00,0x12,0x12,0x5b,0x5b,0x5b,0x5b,0x5b,0x00,0xad,0xad,0xad,0xad
|
|
|
|
,0xad,0x64,0x5b,0x00,0x1b,0x0a,0x09,0x0a,0x0a,0x09,0x09,0x09,0x09,0x09
|
|
|
|
,0x09,0x09,0x09,0x09,0x09,0x00,0x12,0x12,0x5b,0x5b,0x5b,0x5b,0x12,0x00
|
|
|
|
,0xad,0xad,0xad,0x64,0xad,0x64,0x5b,0x00,0x13,0x09,0x0a,0x09,0x09,0x09
|
|
|
|
,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x00,0x09,0x12,0x5b,0x5b
|
|
|
|
,0x5b,0x12,0x5b,0x00,0xad,0xad,0x64,0x64,0xad,0x64,0x5b,0x00,0x0a,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xad,0x64,0xad,0x64,0xad,0x64
|
|
|
|
,0x12,0x00
|
|
|
|
};
|
|
|
|
|
2018-09-06 08:54:03 +02:00
|
|
|
const unsigned char sprite1[] =
|
2018-09-03 15:48:50 +02:00
|
|
|
{ 32, 32 // width, height
|
2018-09-06 08:54:03 +02:00
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x00,0x00,0x00,0x64,0x64,0x64,0x76,0x64,0x64,0x64,0x64,0x64,0x00,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x00,0x00,0x64,0x76,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x00,0x00,0x76,0x64,0x00,0x00,0x00,0x09,0x09,0x09
|
|
|
|
,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x52,0x76,0x76,0x64
|
|
|
|
,0x52,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x76,0x64,0x00,0x09,0x09,0x09
|
|
|
|
,0x09,0x09,0x52,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x52
|
|
|
|
,0x09,0x76,0x52,0x64,0x52,0x00,0x07,0x07,0x07,0x00,0xff,0x76,0x09,0x09
|
|
|
|
,0x52,0x09,0x52,0x09,0x09,0x52,0x09,0x00,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x00,0x76,0x76,0x64,0x52,0x64,0x09,0x64,0x52,0x00,0x07,0x07,0x00,0xff
|
|
|
|
,0x09,0x09,0x09,0x52,0x09,0x52,0x09,0x52,0x52,0x52,0x52,0x00,0x00,0x07
|
|
|
|
,0x07,0x07,0x07,0x00,0x52,0x76,0x52,0x64,0x09,0x76,0x52,0x64,0x52,0x00
|
|
|
|
,0x07,0x00,0x76,0x52,0x52,0x64,0x64,0x52,0x52,0x52,0x52,0x64,0x52,0x64
|
|
|
|
,0x64,0x64,0x64,0x00,0x07,0x07,0x00,0x52,0x09,0x76,0x09,0x64,0x52,0x76
|
|
|
|
,0x09,0x64,0x52,0x00,0x00,0x76,0x64,0x00,0x00,0x00,0x00,0x00,0x64,0x52
|
|
|
|
,0x52,0x52,0x52,0x52,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x52,0x09,0x64
|
|
|
|
,0x52,0x64,0x52,0x76,0x52,0x64,0x52,0x00,0x00,0xff,0x00,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x00,0x64,0x52,0x52,0x52,0x00,0x00,0x00,0x07,0x07,0x07,0x07
|
|
|
|
,0x00,0x00,0x09,0x76,0x09,0x64,0x09,0x64,0x52,0x52,0x52,0x00,0x07,0x00
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x64,0x52,0x00,0x00,0x76,0x76
|
|
|
|
,0x00,0x07,0x07,0x07,0x00,0x64,0x09,0x76,0x52,0x64,0x09,0x76,0x09,0x52
|
|
|
|
,0x52,0x00,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x07,0x00,0x64,0x09
|
|
|
|
,0x00,0x76,0x64,0x00,0x00,0x07,0x07,0x07,0x00,0x52,0x00,0x76,0x09,0x52
|
|
|
|
,0x09,0x64,0x52,0x64,0x52,0x00,0x07,0x00,0x07,0x07,0x00,0x64,0x76,0x64
|
|
|
|
,0x00,0x07,0x00,0x09,0x76,0x64,0x76,0x00,0x76,0x00,0x07,0x00,0x64,0x64
|
|
|
|
,0x09,0x64,0x52,0x64,0x09,0x76,0x52,0x64,0x52,0x00,0x00,0xff,0x00,0x00
|
|
|
|
,0x76,0x00,0x00,0x64,0x64,0x00,0x52,0x52,0x64,0x00,0x00,0x76,0x64,0x64
|
|
|
|
,0x00,0x64,0x00,0x00,0x09,0x76,0x09,0x64,0x09,0x76,0x52,0x52,0x52,0x00
|
|
|
|
,0x07,0x00,0x76,0x76,0x00,0x07,0x07,0x00,0x64,0x00,0x09,0x64,0x52,0x64
|
|
|
|
,0x64,0x64,0x00,0x00,0x64,0x00,0x00,0x52,0x09,0x64,0x09,0x52,0x00,0x76
|
|
|
|
,0x09,0x64,0x52,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x07,0x00,0x64,0x52
|
|
|
|
,0x64,0x52,0x52,0x64,0x64,0x00,0x07,0x07,0x00,0x07,0x00,0x52,0x09,0x64
|
|
|
|
,0x52,0x52,0x00,0x64,0x09,0x52,0x52,0x00,0x07,0x07,0x00,0x00,0x07,0x07
|
|
|
|
,0x07,0x00,0x64,0x52,0x64,0x52,0x52,0x52,0x64,0x00,0x07,0x07,0x00,0x07
|
|
|
|
,0x00,0x52,0x00,0x64,0x09,0x64,0x00,0x64,0x09,0x52,0x52,0x00,0x07,0x00
|
|
|
|
,0x64,0x64,0x00,0x07,0x07,0x00,0x52,0x00,0x09,0x64,0x52,0x52,0x52,0x64
|
|
|
|
,0x00,0x00,0x64,0x00,0x00,0x09,0x00,0x76,0x09,0x52,0x00,0x76,0x09,0x52
|
|
|
|
,0x52,0x00,0x00,0x64,0x00,0x00,0x64,0x00,0x00,0x52,0x64,0x00,0x52,0x52
|
|
|
|
,0x64,0x00,0x00,0x64,0x64,0x64,0x00,0x64,0x00,0x00,0x00,0x64,0x09,0x52
|
|
|
|
,0x00,0x64,0x52,0x52,0x52,0x00,0x07,0x00,0x07,0x07,0x00,0x52,0x64,0x52
|
|
|
|
,0x00,0x07,0x00,0x09,0x64,0x64,0x64,0x00,0x64,0x00,0x07,0x00,0x64,0x64
|
|
|
|
,0x00,0x64,0x09,0x52,0x00,0x64,0x09,0x64,0x52,0x00,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x00,0x00,0x00,0x07,0x00,0x64,0x00,0x00,0x64,0x52,0x00,0x00,0x07
|
|
|
|
,0x07,0x07,0x00,0x52,0x09,0x64,0x52,0x52,0x00,0x64,0x52,0x52,0x52,0x00
|
|
|
|
,0x07,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x64,0x00,0x00,0x00
|
|
|
|
,0x64,0x64,0x00,0x07,0x07,0x07,0x00,0x64,0x00,0x64,0x09,0x52,0x00,0x52
|
|
|
|
,0x09,0x52,0x52,0x00,0x00,0x64,0x00,0x07,0x07,0x07,0x07,0x07,0x00,0x64
|
|
|
|
,0x00,0x00,0x09,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x52
|
|
|
|
,0x52,0x52,0x00,0x64,0x09,0x52,0x52,0x00,0x00,0x64,0x64,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x64,0x00,0x00,0x09,0x09,0x09,0x00,0x00,0x00,0x00,0x07,0x07
|
|
|
|
,0x00,0x00,0x00,0x64,0x09,0x52,0x00,0x52,0x09,0x52,0x52,0x00,0x07,0x00
|
|
|
|
,0x64,0x00,0x09,0x52,0x52,0x52,0x09,0x09,0x52,0x09,0x52,0x52,0x52,0x52
|
|
|
|
,0x52,0x00,0x00,0x07,0x00,0x09,0x00,0x52,0x09,0x52,0x00,0x52,0x52,0x52
|
|
|
|
,0x52,0x00,0x07,0x07,0x00,0x64,0x00,0x09,0x09,0x09,0x09,0x09,0x09,0x09
|
|
|
|
,0x09,0x09,0x09,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x09,0x64,0x52,0x52
|
|
|
|
,0x00,0x64,0x09,0x52,0x52,0x00,0x07,0x07,0x07,0x00,0x64,0x64,0x00,0x09
|
|
|
|
,0x09,0x52,0x09,0x09,0x09,0x09,0x52,0x00,0x00,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x00,0x52,0x52,0x52,0x00,0x52,0x09,0x52,0x52,0x00,0x07,0x07,0x07,0x07
|
|
|
|
,0x00,0x00,0x64,0x64,0x09,0x09,0x09,0x52,0x09,0x52,0x09,0x00,0x00,0x00
|
|
|
|
,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x64,0x52,0x52,0x52,0x00
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x64,0x64,0x09,0x09,0x52,0x09
|
|
|
|
,0x52,0x09,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x09,0x52
|
|
|
|
,0x52,0x52,0x52,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00
|
|
|
|
,0x64,0x64,0x64,0x09,0x09,0x09,0x09,0x09,0x00,0x00,0x00,0x00,0x07,0x07
|
|
|
|
,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x64,0x64,0x64,0x64,0x64,0x64,0x64
|
|
|
|
,0x64,0x64,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07
|
|
|
|
};
|
|
|
|
|
|
|
|
const unsigned char sprite2[] =
|
|
|
|
{ 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,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,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,0x00,0x00,0x00,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0xbf,0xbf
|
|
|
|
,0xbf,0x00,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x27,0x00,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x00,0xbf,0x5b,0x5b,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x27,0x27
|
|
|
|
,0x0c,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x00,0x52,0x6d,0x5b,0x09,0x0c,0x0c,0x0c,0x27,0x27
|
|
|
|
,0x27,0x0c,0x0a,0x0a,0x0a,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x00,0x07,0x00,0x5b,0x09,0x09,0x09,0x0a,0x0a
|
|
|
|
,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0b,0x0b,0x0a,0x00,0x07,0x07,0x00,0x00
|
|
|
|
,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x3f,0x00,0x5b,0x09,0x5b
|
|
|
|
,0x09,0x00,0x02,0x01,0x01,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x00
|
|
|
|
,0x00,0x07,0x00,0x3e,0xb6,0x00,0x07,0x00,0x07,0x07,0x07,0x00,0x15,0x15
|
|
|
|
,0x3d,0x09,0x09,0x09,0x00,0x01,0x01,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x01
|
|
|
|
,0x01,0x01,0x01,0x52,0x52,0x00,0x07,0x00,0x3e,0x6d,0x00,0xb6,0x00,0x07
|
|
|
|
,0x00,0x0c,0x0c,0x15,0x15,0x3d,0x00,0x00,0x0a,0x0a,0x00,0x00,0x00,0x01
|
|
|
|
,0x01,0x01,0x01,0x01,0x01,0x01,0x52,0x6d,0x52,0x00,0x07,0x07,0x00,0x3d
|
|
|
|
,0x5b,0x6d,0x00,0x00,0x27,0x27,0x0c,0x0c,0x15,0x3f,0x00,0x01,0x00,0x00
|
|
|
|
,0x09,0x00,0x52,0x00,0x09,0x00,0x00,0x00,0x01,0x01,0x09,0xb6,0x09,0x00
|
|
|
|
,0x07,0x07,0x07,0x00,0x3d,0x09,0x00,0x0a,0x0c,0x15,0x27,0x09,0x09,0x09
|
|
|
|
,0x09,0x00,0x3f,0x00,0x52,0x09,0x64,0x00,0x3d,0x3d,0x3f,0x64,0x64,0x09
|
|
|
|
,0xb6,0x6d,0x09,0x00,0x07,0x07,0x00,0xbf,0x6d,0x00,0x5b,0x52,0x0a,0x09
|
|
|
|
,0x09,0x09,0x5b,0x6d,0x09,0x5b,0x3d,0x00,0x64,0x00,0x64,0x09,0x00,0x1d
|
|
|
|
,0x3f,0x5b,0x52,0x52,0x09,0x52,0x00,0x00,0x07,0x00,0xb6,0xff,0x3e,0x00
|
|
|
|
,0x3e,0x3e,0x3d,0x09,0x5b,0x6d,0xbf,0xb6,0x52,0x3e,0x1d,0x3d,0x00,0x64
|
|
|
|
,0x00,0x52,0x00,0x00,0x09,0x52,0x52,0x12,0x09,0x00,0x00,0x00,0x00,0x3d
|
|
|
|
,0x3d,0x3d,0x00,0x00,0x00,0x00,0x09,0x09,0x09,0x6d,0x6d,0x52,0x52,0x3e
|
|
|
|
,0x1d,0x3d,0x00,0x64,0x00,0x52,0x00,0x02,0x00,0x00,0x09,0x00,0x00,0x01
|
|
|
|
,0x00,0x00,0x07,0x00,0x52,0x5b,0x3d,0x00,0x3d,0x3f,0x3f,0x09,0x5b,0x52
|
|
|
|
,0x5b,0x6d,0x52,0x3d,0x1d,0x3f,0x00,0x64,0x00,0x52,0x00,0x01,0x01,0x01
|
|
|
|
,0x01,0x0a,0x0a,0x0a,0x00,0x00,0x07,0x07,0x00,0x52,0x5b,0x00,0x52,0x52
|
|
|
|
,0x0a,0x27,0x09,0x09,0x09,0x09,0x52,0x5b,0x3f,0x00,0x00,0x64,0x00,0x52
|
|
|
|
,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x07,0x07,0x07,0x07,0x00
|
|
|
|
,0x3f,0x09,0x00,0x0a,0x0c,0x27,0x0c,0x15,0x3f,0x09,0x09,0x09,0x3f,0x00
|
|
|
|
,0x64,0x00,0x52,0x09,0x00,0x3d,0x3f,0x5b,0x00,0x00,0x01,0x01,0x00,0x07
|
|
|
|
,0x07,0x07,0x00,0x1d,0x52,0x5b,0x00,0x0c,0x27,0x0c,0x0c,0x15,0x0c,0x3d
|
|
|
|
,0x00,0x00,0x00,0x00,0x52,0x09,0x00,0x00,0x3f,0x3e,0x3d,0x52,0x52,0x64
|
|
|
|
,0x09,0x52,0x00,0x00,0x07,0x00,0x1d,0x5b,0x00,0x5b,0x00,0x27,0x0c,0x0c
|
|
|
|
,0x15,0x15,0x15,0x3d,0x52,0x52,0x0a,0x52,0xbf,0x6d,0x00,0x00,0x00,0x3f
|
|
|
|
,0x52,0x12,0x12,0x09,0x64,0xb6,0x52,0x00,0x00,0x3f,0x5b,0x00,0x07,0x00
|
|
|
|
,0x07,0x00,0x00,0x0c,0x27,0x15,0x15,0x3e,0x00,0x09,0x52,0xbf,0x6d,0x5b
|
|
|
|
,0x0a,0x0a,0x0a,0x01,0x00,0x00,0x00,0x00,0x00,0x64,0x09,0x00,0x00,0x00
|
|
|
|
,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x27,0x3e,0x27,0x27,0x15
|
|
|
|
,0x09,0x00,0x00,0x0a,0x0a,0x0a,0x0a,0x0a,0x01,0x01,0x01,0x00,0x00,0x09
|
|
|
|
,0x09,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x00
|
|
|
|
,0x3d,0x0c,0x0c,0x27,0x27,0x27,0x27,0x15,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a
|
|
|
|
,0x01,0x01,0x01,0x0a,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x27,0x27,0x27
|
|
|
|
,0x27,0x15,0x15,0x0a,0x0a,0x0a,0x0a,0x0a,0x00,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07
|
|
|
|
,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x15,0x15,0x15,0x15,0x15,0x00,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,0x00,0x00,0x00,0x00
|
|
|
|
,0x00,0x00,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,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
|
2018-09-03 15:48:50 +02:00
|
|
|
};
|
|
|
|
|
2018-09-06 11:18:47 +02:00
|
|
|
const unsigned char *textures[] = {texture1, texture2, texture3, texture4};
|
2018-09-05 17:12:11 +02:00
|
|
|
|
2018-09-05 16:25:57 +02:00
|
|
|
Unit textureAt(int16_t x, int16_t y)
|
|
|
|
{
|
|
|
|
if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES)
|
|
|
|
return levelTexture[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x];
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
Unit floorHeightAt(int16_t x, int16_t y)
|
2018-08-31 18:40:05 +02:00
|
|
|
{
|
2018-09-05 15:59:34 +02:00
|
|
|
if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES)
|
|
|
|
return (levelFloor[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x] * UNITS_PER_SQUARE) / 8;
|
2018-09-05 11:35:33 +02:00
|
|
|
|
2018-09-05 15:59:34 +02:00
|
|
|
return 0;
|
2018-09-05 11:35:33 +02:00
|
|
|
}
|
|
|
|
|
2018-09-05 16:25:57 +02:00
|
|
|
Unit ceilingHeightAt(int16_t x, int16_t y)
|
2018-09-05 11:35:33 +02:00
|
|
|
{
|
2018-09-05 15:59:34 +02:00
|
|
|
signed char v = 99;
|
|
|
|
|
|
|
|
if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES)
|
|
|
|
v = levelCeiling[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x];
|
2018-09-05 11:35:33 +02:00
|
|
|
|
2018-09-05 15:59:34 +02:00
|
|
|
return (v * UNITS_PER_SQUARE) / 8;
|
2018-08-31 18:40:05 +02:00
|
|
|
}
|
|
|
|
|
2018-09-08 15:00:13 +02:00
|
|
|
/**
|
|
|
|
Function for drawing a single pixel (like fragment shader).
|
|
|
|
*/
|
2018-09-02 19:43:54 +02:00
|
|
|
inline void pixelFunc(PixelInfo pixel)
|
2018-08-31 18:40:05 +02:00
|
|
|
{
|
2018-09-04 15:52:12 +02:00
|
|
|
if (pixel.position.y == MIDDLE_ROW)
|
|
|
|
zBuffer[pixel.position.x] = pixel.depth;
|
|
|
|
|
2018-09-03 15:14:39 +02:00
|
|
|
uint8_t c;
|
2018-09-03 10:56:48 +02:00
|
|
|
|
2018-09-05 19:08:22 +02:00
|
|
|
Unit depth = pixel.depth - UNITS_PER_SQUARE * 3;
|
|
|
|
depth = depth > 0 ? depth : 1;
|
2018-09-03 10:56:48 +02:00
|
|
|
|
2018-09-03 15:14:39 +02:00
|
|
|
int intensity = 7 - (depth * 7) / (UNITS_PER_SQUARE * 5);
|
2018-09-03 14:22:52 +02:00
|
|
|
|
|
|
|
if (intensity < 0)
|
|
|
|
intensity = 0;
|
|
|
|
|
2018-09-03 15:14:39 +02:00
|
|
|
if (pixel.isWall)
|
|
|
|
{
|
|
|
|
if ((pixel.hit.direction == 0 || pixel.hit.direction == 2))
|
|
|
|
intensity -= 2;
|
|
|
|
|
|
|
|
if (intensity < 0)
|
|
|
|
intensity = 0;
|
|
|
|
|
2018-09-05 17:12:11 +02:00
|
|
|
c = sampleImage(textures[pixel.hit.type],pixel.hit.textureCoord,pixel.textureCoordY);
|
2018-09-03 15:14:39 +02:00
|
|
|
c = addIntensity(c,intensity - 3);
|
|
|
|
}
|
|
|
|
else
|
2018-09-05 19:08:22 +02:00
|
|
|
c = pixel.isFloor ?
|
|
|
|
rgbToIndex(intensity/2,intensity,intensity/3) :
|
|
|
|
rgbToIndex(intensity,intensity/2,0);
|
|
|
|
|
2018-09-01 12:04:17 +02:00
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
uint8_t *buf = pokitto.display.screenbuffer;
|
2018-09-01 12:04:17 +02:00
|
|
|
|
2018-09-03 10:56:48 +02:00
|
|
|
buf += pixel.position.x * SUBSAMPLE;
|
2018-09-08 14:30:03 +02:00
|
|
|
buf += pixel.position.y * pokitto.display.width;
|
2018-09-03 10:56:48 +02:00
|
|
|
|
|
|
|
for (uint8_t i = 0; i < SUBSAMPLE - 1; ++i)
|
|
|
|
*buf++ = c;
|
|
|
|
|
2018-09-02 19:43:54 +02:00
|
|
|
*buf = c;
|
2018-08-31 18:40:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void draw()
|
|
|
|
{
|
|
|
|
RayConstraints c;
|
|
|
|
|
2018-09-06 08:54:03 +02:00
|
|
|
c.maxHits = 8;
|
|
|
|
c.maxSteps = 10;
|
2018-09-05 11:43:55 +02:00
|
|
|
c.computeTextureCoords = 1;
|
2018-08-31 18:40:05 +02:00
|
|
|
|
2018-09-08 07:09:46 +02:00
|
|
|
render(player.mCamera,floorHeightAt,ceilingHeightAt,textureAt,pixelFunc,c);
|
2018-09-03 15:48:50 +02:00
|
|
|
|
2018-09-04 16:08:14 +02:00
|
|
|
Unit previousDepth;
|
|
|
|
|
2018-09-06 08:54:03 +02:00
|
|
|
// draw sprites
|
|
|
|
|
2018-09-04 15:52:12 +02:00
|
|
|
for (uint8_t i = 0; i < SPRITES; ++i)
|
|
|
|
{
|
2018-09-06 09:40:40 +02:00
|
|
|
if (dist(sprites[i].mPosition,player.mCamera.position) > SPRITE_MAX_DISTANCE)
|
|
|
|
continue;
|
|
|
|
|
2018-09-04 15:52:12 +02:00
|
|
|
PixelInfo pos = mapToScreen(sprites[i].mPosition,sprites[i].mHeight,player.mCamera);
|
|
|
|
|
|
|
|
if (pos.depth > 0)
|
2018-09-06 08:54:03 +02:00
|
|
|
drawSprite(sprites[i].mImage,pos.position.x * SUBSAMPLE,pos.position.y,
|
|
|
|
pos.depth,perspectiveScale(sprites[i].mPixelSize,pos.depth));
|
2018-09-04 16:08:14 +02:00
|
|
|
|
|
|
|
if (i != 0 && pos.depth > previousDepth)
|
|
|
|
{
|
|
|
|
Sprite tmp = sprites[i];
|
|
|
|
sprites[i] = sprites[i - 1];
|
|
|
|
sprites[i - 1] = tmp;
|
|
|
|
}
|
|
|
|
|
|
|
|
previousDepth = pos.depth;
|
2018-09-04 15:52:12 +02:00
|
|
|
}
|
2018-09-08 14:30:03 +02:00
|
|
|
/*
|
|
|
|
pokitto.display.setColor(rgbToIndex(7,7,3));
|
|
|
|
pokitto.display.setCursor(1,1);
|
|
|
|
pokitto.display.print(player.mCamera.position.x);
|
|
|
|
pokitto.display.print(" ");
|
|
|
|
pokitto.display.print(player.mCamera.position.y);
|
|
|
|
pokitto.display.print(" ");
|
|
|
|
pokitto.display.print(player.mCamera.direction);
|
|
|
|
*/
|
2018-08-31 18:40:05 +02:00
|
|
|
}
|
|
|
|
|
2018-09-09 16:39:08 +02:00
|
|
|
bool runReleased = false;
|
|
|
|
|
2018-08-31 18:40:05 +02:00
|
|
|
int main()
|
|
|
|
{
|
2018-09-08 14:30:03 +02:00
|
|
|
pokitto.begin();
|
2018-09-08 14:55:14 +02:00
|
|
|
initPalette();
|
|
|
|
|
|
|
|
player.setPositionSquare(4,5);
|
2018-09-02 19:43:54 +02:00
|
|
|
|
2018-09-08 14:55:14 +02:00
|
|
|
sprites[0] = Sprite(sprite1,10,5,1,100);
|
|
|
|
sprites[1] = Sprite(sprite1,14,5,1,100);
|
2018-09-09 16:16:52 +02:00
|
|
|
sprites[2] = Sprite(sprite2,15,19,1,200);
|
2018-09-02 20:25:17 +02:00
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
pokitto.display.persistence = 1;
|
2018-09-08 14:55:14 +02:00
|
|
|
pokitto.setFrameRate(FPS);
|
2018-09-08 14:30:03 +02:00
|
|
|
pokitto.display.setFont(fontTiny);
|
2018-08-31 18:40:05 +02:00
|
|
|
|
2018-09-08 18:55:25 +02:00
|
|
|
uint32_t previousTime = 0;
|
|
|
|
uint32_t dt;
|
2018-09-08 15:53:11 +02:00
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
while (pokitto.isRunning())
|
2018-08-31 18:40:05 +02:00
|
|
|
{
|
2018-09-08 14:30:03 +02:00
|
|
|
if (pokitto.update())
|
2018-08-31 18:40:05 +02:00
|
|
|
{
|
|
|
|
draw();
|
|
|
|
|
2018-09-08 15:58:32 +02:00
|
|
|
uint32_t timeNow = pokitto.getTime();
|
|
|
|
dt = timeNow - previousTime;
|
|
|
|
previousTime = timeNow;
|
|
|
|
|
2018-09-09 16:39:08 +02:00
|
|
|
int16_t horizontalStep = (dt * PLAYER_SPEED * (player.mRunning ? 2 : 1)) / 1000;
|
2018-09-08 15:58:32 +02:00
|
|
|
int16_t rotationStep = (dt * PLAYER_ROTATION_SPEED) / 1000;
|
2018-08-31 18:40:05 +02:00
|
|
|
|
|
|
|
Vector2D d = angleToDirection(player.mCamera.direction);
|
|
|
|
|
2018-09-07 19:46:37 +02:00
|
|
|
Vector2D moveOffset;
|
|
|
|
|
|
|
|
moveOffset.x = 0;
|
|
|
|
moveOffset.y = 0;
|
|
|
|
|
2018-09-08 15:53:11 +02:00
|
|
|
d.x = (d.x * horizontalStep) / UNITS_PER_SQUARE;
|
|
|
|
d.y = (d.y * horizontalStep) / UNITS_PER_SQUARE;
|
2018-08-31 18:40:05 +02:00
|
|
|
|
2018-09-02 19:43:54 +02:00
|
|
|
if (d.x == 0 && d.y == 0)
|
|
|
|
{
|
2018-09-08 15:53:11 +02:00
|
|
|
d.x = d.x > 0 ? horizontalStep : -1 * horizontalStep;
|
|
|
|
d.y = d.y > 0 ? horizontalStep : -1 * horizontalStep;
|
2018-09-02 19:43:54 +02:00
|
|
|
}
|
|
|
|
|
2018-09-09 16:39:08 +02:00
|
|
|
bool aButton = pokitto.aBtn();
|
|
|
|
|
|
|
|
if (pokitto.cBtn())
|
|
|
|
{
|
|
|
|
if (runReleased)
|
|
|
|
{
|
|
|
|
player.mRunning = !player.mRunning;
|
|
|
|
runReleased = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
runReleased = true;
|
2018-09-04 15:52:12 +02:00
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
if (pokitto.upBtn())
|
2018-08-31 18:40:05 +02:00
|
|
|
{
|
2018-09-09 16:39:08 +02:00
|
|
|
if (aButton)
|
2018-09-08 07:09:46 +02:00
|
|
|
player.mCamera.shear = min(player.mCamera.shear + 10,60);
|
2018-09-04 15:52:12 +02:00
|
|
|
else
|
2018-09-07 19:46:37 +02:00
|
|
|
moveOffset = d;
|
2018-08-31 18:40:05 +02:00
|
|
|
}
|
2018-09-08 14:30:03 +02:00
|
|
|
else if (pokitto.downBtn())
|
2018-08-31 18:40:05 +02:00
|
|
|
{
|
2018-09-09 16:39:08 +02:00
|
|
|
if (aButton)
|
2018-09-08 07:09:46 +02:00
|
|
|
player.mCamera.shear = max(player.mCamera.shear - 10,-60);
|
2018-09-04 15:52:12 +02:00
|
|
|
else
|
|
|
|
{
|
2018-09-07 19:46:37 +02:00
|
|
|
moveOffset.x = -1 * d.x;
|
|
|
|
moveOffset.y = -1 * d.y;
|
2018-09-04 15:52:12 +02:00
|
|
|
}
|
|
|
|
}
|
2018-09-08 07:09:46 +02:00
|
|
|
else
|
|
|
|
player.mCamera.shear /= 2;
|
|
|
|
|
2018-09-09 16:39:08 +02:00
|
|
|
if (!aButton)
|
2018-09-08 07:09:46 +02:00
|
|
|
player.mCamera.shear /= 2;
|
2018-09-07 20:33:38 +02:00
|
|
|
|
2018-09-04 15:52:12 +02:00
|
|
|
int addition = 0;
|
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
if (pokitto.rightBtn())
|
2018-09-04 15:52:12 +02:00
|
|
|
addition = 1;
|
2018-09-08 14:30:03 +02:00
|
|
|
else if (pokitto.leftBtn())
|
2018-09-04 15:52:12 +02:00
|
|
|
addition = -1;
|
2018-08-31 18:40:05 +02:00
|
|
|
|
2018-09-09 16:39:08 +02:00
|
|
|
if (aButton)
|
2018-09-04 15:52:12 +02:00
|
|
|
{
|
2018-09-07 19:46:37 +02:00
|
|
|
d = angleToDirection(player.mCamera.direction + UNITS_PER_SQUARE / 4);
|
2018-09-08 15:53:11 +02:00
|
|
|
d.x = (d.x * horizontalStep * addition) / UNITS_PER_SQUARE;
|
|
|
|
d.y = (d.y * horizontalStep * addition) / UNITS_PER_SQUARE;
|
2018-09-07 19:46:37 +02:00
|
|
|
|
|
|
|
moveOffset = d;
|
2018-09-04 15:52:12 +02:00
|
|
|
}
|
|
|
|
else
|
2018-09-08 15:53:11 +02:00
|
|
|
player.mCamera.direction += addition * rotationStep;
|
2018-09-07 20:33:38 +02:00
|
|
|
|
2018-09-08 07:45:54 +02:00
|
|
|
Unit prevHeight = player.mCamera.height;
|
|
|
|
|
2018-09-08 11:11:27 +02:00
|
|
|
moveCameraWithCollision(&player.mCamera,moveOffset,player.mVericalSpeed,
|
2018-09-09 16:16:52 +02:00
|
|
|
floorHeightAt, ceilingHeightAt, 1);
|
2018-09-08 07:45:54 +02:00
|
|
|
|
|
|
|
Unit heightDiff = player.mCamera.height - prevHeight;
|
|
|
|
|
|
|
|
if (heightDiff == 0)
|
|
|
|
player.mVericalSpeed = 0; // hit floor/ceiling
|
|
|
|
|
2018-09-08 14:30:03 +02:00
|
|
|
if (player.mVericalSpeed == 0 && pokitto.bBtn())
|
2018-09-08 07:45:54 +02:00
|
|
|
{
|
|
|
|
int16_t camX = divRoundDown(player.mCamera.position.x,UNITS_PER_SQUARE);
|
|
|
|
int16_t camY = divRoundDown(player.mCamera.position.y,UNITS_PER_SQUARE);
|
|
|
|
|
2018-09-08 07:52:43 +02:00
|
|
|
if (player.mCamera.height - CAMERA_COLL_HEIGHT_BELOW -
|
2018-09-08 07:45:54 +02:00
|
|
|
floorHeightAt(camX,camY) < 2)
|
2018-09-08 15:58:32 +02:00
|
|
|
player.mVericalSpeed = JUMP_SPEED; // jump
|
2018-09-08 15:53:11 +02:00
|
|
|
}
|
2018-09-08 07:45:54 +02:00
|
|
|
|
2018-09-08 15:53:11 +02:00
|
|
|
player.mVericalSpeed -= (dt * GRAVITY_ACCELERATION) / 1000; // gravity
|
2018-08-31 18:40:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|