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 --- gameproj.sublime-workspace | 653 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 653 insertions(+) create mode 100644 gameproj.sublime-workspace (limited to 'gameproj.sublime-workspace') diff --git a/gameproj.sublime-workspace b/gameproj.sublime-workspace new file mode 100644 index 0000000..d298e05 --- /dev/null +++ b/gameproj.sublime-workspace @@ -0,0 +1,653 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "Writ", + "WriteLine" + ], + [ + "NU", + "NUM_BODIES" + ], + [ + "SDL_Draw", + "SDL_SetRenderDrawColor" + ], + [ + "y_", + "y_ecp" + ], + [ + "chea", + "cheat_active" + ], + [ + "SDL_SC", + "SDL_SCANCODE_S" + ], + [ + "SDL_Lock", + "SDL_LockTexture" + ], + [ + "clock", + "clock_t" + ], + [ + "textu", + "textures" + ], + [ + "text", + "texture_ih" + ], + [ + "textur", + "texture_ih" + ], + [ + "MAP", + "MAPY" + ] + ] + }, + "buffers": + [ + { + "file": "simulations/boids.c", + "settings": + { + "buffer_size": 4811, + "encoding": "UTF-8", + "line_ending": "Unix" + } + }, + { + "file": "simulations/universe.c", + "settings": + { + "buffer_size": 2502, + "encoding": "UTF-8", + "line_ending": "Unix" + } + }, + { + "file": "/home/pupkich/projects/chordgen.py", + "settings": + { + "buffer_size": 1732, + "encoding": "UTF-8", + "line_ending": "Unix" + } + }, + { + "contents": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//0\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//1\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//2\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//3\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//4\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//5\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//6\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//7\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//8\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//9\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//10\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//11\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//12\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//13\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,//14\n\t\t1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n\nvoid drawSky(void *tpixels, SDL_Surface *surface, struct player P)\n{\n\tUint32 *edited = (Uint32 *)malloc(WIDTH*HEIGHT/2*sizeof(Uint32));\n\tfor(int y = 1; y < HEIGHT/2; y++)\n\t\tfor(int x = 0; x < WIDTH; x++)\n\t\t{\n\t\t\tint xo = (int)(-P.th*WIDTH/(FOV*DEG)) - x;\n\t\t\tif(xo < 0) {xo += WIDTH;}\n\t\t\txo %= WIDTH; \n\t\t\tint index = (y*WIDTH + xo)*3;\n\t\t\tchar red = sky[index];\n\t\t\tchar green = sky[index +1];\n\t\t\tchar blue = sky[index +2];\n\t\t\tedited[y*WIDTH + x] = SDL_MapRGB(surface->format, red, green, blue);\n\t\t}\n\tmemcpy(tpixels, edited, sizeof(WIDTH*HEIGHT/2*sizeof(Uint32)));\n\tfree(edited);\n}\n\nUint32 mixSDLColors(Uint32 back, Uint32 front, SDL_PixelFormat *fmt, int alpha)\n{\n\tif(alpha == 0)\n\t\treturn front;\n\n\tUint32 ch1, ch2, sum = 0;\n\n\tch1 = back & fmt->Rmask;\n\tch2 = front & fmt->Rmask;\n\tsum |= (ch1 + ch2) >> 1 & fmt->Rmask;\n\n\tch1 = back & fmt->Gmask;\n\tch2 = front & fmt->Gmask;\n\tsum |= (ch1 + ch2) >> 1 & fmt->Gmask;\n\n\tch1 = back & fmt->Bmask;\n\tch2 = front & fmt->Bmask;\n\tsum |= (ch1 + ch2) >> 1 & fmt->Bmask;\n\n\tsum |= front & !(fmt->Rmask + fmt->Gmask + fmt->Bmask);\n\treturn sum;\n}", + "settings": + { + "buffer_size": 1681, + "line_ending": "Unix" + } + }, + { + "file": "/home/pupkich/Документы/physgraph.c", + "settings": + { + "buffer_size": 642, + "encoding": "UTF-8", + "line_ending": "Unix" + } + }, + { + "contents": "#include \n\n#ifdef _WIN32 // грубый способ определения; на деле разница не в ОС, а в компиляторe\n\t#include \n\t#include \n\t#include \n#else\n\t#include \n\t#include \n\t#include \n#endif\n\n#define HEIGHT 480\n#define WIDTH 640\n#define CELL 16\n#define DELAY 10\n\nstruct cell {int x, y, birth_num, death_num} \n\t\t\tcells[HEIGHT * WIDTH / CELL];\n\nvoid render(SDL_Renderer *renderer, SDL_Rect *cellrects) {\n\tSDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); // фон\n\tSDL_RenderClear(renderer);\n\tSDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);\n\n\tfor(int i = 0; i