#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,0,0,3,//4 3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,//5 3,3,3,3,3,2,3,3,2,3,3,2,3,0,0,3,//6 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,//7 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,//8 3,3,4,3,3,2,3,3,2,3,3,2,3,0,0,3,//9 3,0,0,0,3,3,3,3,3,5,5,5,3,0,0,3,//10 3,3,0,3,3,0,0,0,0,0,0,5,3,0,0,3,//11 3,0,0,0,3,0,3,3,3,0,0,5,3,0,0,3,//12 3,3,0,3,3,0,3,3,3,3,3,3,3,0,0,3,//13 3,0,0,0,3,0,0,0,0,0,0,0,4,0,0,3,//14 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,//15 /*0,1,2,3,4,5,6,7,8,9, 11 13 15*/ }; int layoutF[MAPX*MAPY] = // массив текстур пола { /* 10 12 14 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,//0 0,0,0,0,0,0,0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