From 3c0a3b8413ee58a3e5678075c862e95f7c8395c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=9B=D1=8C=D0=B2=D0=BE=D0=B2?= Date: Mon, 27 Mar 2023 11:25:27 +0300 Subject: =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- levels/level_test.dat | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 levels/level_test.dat (limited to 'levels') diff --git a/levels/level_test.dat b/levels/level_test.dat new file mode 100644 index 0000000..7dcba20 --- /dev/null +++ b/levels/level_test.dat @@ -0,0 +1,108 @@ +#include "../textures/textures.ppm" // текстуры +#include "../textures/warpclouds960640pixelated.ppm" +#include "../textures/barrel_goo_anim32.ppm" + +#define MAPX 16 // размер (массива) карты по X +#define MAPY 16 // размер (массива) карты по Y + +struct player +{ float x, y, dx, dy, th; }; +struct player P = {50, 50, 0, 0, 0}; // начальные параметры игрока + +struct sprite +{ + int type, state, texture, opacity; + float x, y, z, scaleV, scaleH, offset; +}; +struct sprite sp[] = {{0, 1, 0, 128, 40, 180, 20, 1, 1, 32, }, + {0, 1, 0, 128, 448, 256, 20, 1, 1, 0, }, + {0, 1, 0, 128, 448, 288, 20, 2, 2, 256,}}; + // список спрайтов + +int layoutW[MAPX*MAPY] = // массив стен +{ + /* 10 12 14 */ + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,//0 + 3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,//1 + 3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,//2 + 3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,3,//3 + 3,0,0,3,3,0,0,0,0,0,0,0,0,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