{"id":385846,"date":"2024-06-29T06:21:53","date_gmt":"2024-06-29T06:21:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=385846"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=385846","title":{"rendered":"<span>\u0423\u0440\u043e\u043a\u0438 \u043f\u043e SDL 2: \u0423\u0440\u043e\u043a 13 \u0432\u0432\u043e\u0434 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0430 \u044d\u043a\u0440\u0430\u043d\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/954\/f43\/0cf\/954f430cfddff46a97fc60c0f98f5cfc.jpeg\" width=\"740\" height=\"414\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/954\/f43\/0cf\/954f430cfddff46a97fc60c0f98f5cfc.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043a\u0430\u0440\u0442\u0443, \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d \u043f\u043e \u043d\u0435\u0439, \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<p>\u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#include&lt;SDL2\/SDL.h>  #include&lt;SDL2\/SDL_image.h>  #include&lt;SDL2\/SDL_ttf.h>  #include&lt;stdlib.h>    int main(void)  {    SDL_Init(SDL_INIT_VIDEO);    TTF_Init();       SDL_Window* window = SDL_CreateWindow(\"Dune_the_best\", SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,490,SDL_WINDOW_SHOWN);    SDL_Renderer* gRenderer = SDL_CreateRenderer(window,-1,SDL_RENDERER_ACCELERATED);       SDL_Color textColor = {0,255,0};    TTF_Font* textFont = TTF_OpenFont(\"v_DigitalStrip_v1.5.ttf\",18);      SDL_Surface* image = SDL_LoadBMP(\"hw.bmp\");    SDL_Surface* textSurface = NULL;      SDL_Texture* groundTexture = SDL_CreateTextureFromSurface(gRenderer,image);    SDL_Texture* textTexture = NULL; <\/code><\/pre>\n<p>\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0438\u0434\u0435\u043e, \u0448\u0440\u0438\u0444\u0442\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b.<\/p>\n<pre><code class=\"cpp\">  SDL_Rect cameraPosition = {100,100,300,300};   SDL_Rect textPosition = {5,450,100,20};   SDL_Rect minimap = {540,0,100,100};   SDL_Rect brickVision = { 563,13,45,45};  <\/code><\/pre>\n<p>\u0437\u0430\u0434\u0430\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043a\u0430\u043c\u0435\u0440\u044b, \u0442\u0435\u043a\u0441\u0442\u0430, \u043c\u0438\u043d\u0438\u043a\u0430\u0440\u0442\u044b(<strong>minimap<\/strong>) \u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0444\u043e\u043d\u043e\u0432\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f(<strong>brickVision)<\/strong><\/p>\n<pre><code class=\"cpp\">  int quit = 0,x = 330, y = 240; \/\/x \u0438 y \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u044b\u0448\u0438    char* inputText; inputText=(char*)malloc(40);    int lengthText = 0; SDL_Event e;   while(!quit)   {    SDL_StartTextInput();      while(SDL_PollEvent(&amp;e) != 0)     {  if(e.type == SDL_QUIT) {         quit = 1; <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0435\u043a\u0435\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439(<strong>SDL_Event<\/strong>), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430( <strong>SDL_StartTextInput<\/strong>) \u0438 \u0446\u0438\u043a\u043b \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430<\/p>\n<pre><code class=\"cpp\">     }else if(e.type == SDL_KEYDOWN) {        switch(e.key.keysym.sym)       {         case SDLK_UP:         if (cameraPosition.y > 0)cameraPosition.y = cameraPosition.y -5;             brickVision.y = brickVision.y -1;        break;         case SDLK_DOWN:        if (cameraPosition.y &lt; 200) cameraPosition.y = cameraPosition.y +5;             brickVision.y = brickVision.y +1;        break;         case SDLK_LEFT:        if (cameraPosition.x >= 0)cameraPosition.x = cameraPosition.x -5;             brickVision.x = brickVision.x -1;        break;         case SDLK_RIGHT:         if (cameraPosition.x &lt; 340) cameraPosition.x = cameraPosition.x +5;             brickVision.x = brickVision.x +1;        break; <\/code><\/pre>\n<p>\u0414\u0432\u0438\u0433\u0430\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u0443 \u043f\u043e \u043c\u0438\u043d\u0438\u043a\u0430\u0440\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438<\/p>\n<pre><code class=\"cpp\">      case SDLK_RETURN:        if(lengthText>0) {          *inputText = '\\0';           inputText -=lengthText;           textSurface = TTF_RenderText_Solid(textFont,inputText,textColor);           textPosition.w = textSurface->w;           textPosition.h = textSurface->h;           textTexture = SDL_CreateTextureFromSurface(gRenderer,textSurface);           lengthText = 0;         }           break;       }       }else if (e.type == SDL_TEXTINPUT) {       *inputText = *e.text.text;             inputText++;             lengthText++;  <\/code><\/pre>\n<p>\u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 Enter(<strong>SDLK_RETURN<\/strong>), \u0442\u043e \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0431\u0443\u0444\u0435\u0440 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0438 \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u0431\u0443\u0444\u0435\u0440, \u0435\u0441\u043b\u0438 \u0436\u0435 \u043d\u0430\u0436\u0430\u0442\u0430 \u043a\u0430\u043a\u0430\u044f \u0442\u043e \u0431\u0443\u043a\u0432\u0430(<strong>SDL_TEXTINPUT<\/strong>), \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440(<strong>inputText<\/strong>).<\/p>\n<pre><code class=\"cpp\">      } else if(e.type == SDL_MOUSEMOTION) {           SDL_GetMouseState(&amp;x,&amp;y);       }          }   if (x &lt; 105 &amp;&amp; cameraPosition.x >= 0) {             cameraPosition.x = cameraPosition.x -5;             brickVision.x = brickVision.x -1;              SDL_Delay(10);       }         if (x > 505 &amp;&amp; cameraPosition.x &lt;  340) {             cameraPosition.x = cameraPosition.x + 5;             brickVision.x = brickVision.x +1;              SDL_Delay(10);       }           if (y &lt; 100 &amp;&amp; cameraPosition.y >= 0) {              brickVision.y = brickVision.y -1;              cameraPosition.y = cameraPosition.y -5;             SDL_Delay(10);           }           if ( y > 360 &amp;&amp; cameraPosition.y &lt;  210) {             brickVision.y = brickVision.y +1;             cameraPosition.y = cameraPosition.y + 5;             SDL_Delay(10);           } <\/code><\/pre>\n<p>\u0434\u0432\u0438\u0433\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d \u043c\u044b\u0448\u043a\u043e\u0439, \u043f\u043e \u043a\u0440\u0430\u044e \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code>    SDL_RenderClear(gRenderer);          SDL_RenderCopy(gRenderer,groundTexture,&amp;cameraPosition,NULL);      SDL_RenderCopy(gRenderer,groundTexture,NULL,&amp;minimap);     SDL_SetRenderDrawColor(gRenderer,0x00,0xFF,0x00,0xFF);     SDL_RenderDrawRect(gRenderer,&amp;brickVision);     SDL_RenderCopy(gRenderer,textTexture,NULL,&amp;textPosition);     SDL_RenderPresent(gRenderer); <\/code><\/pre>\n<p>\u041e\u0447\u0438\u0449\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<pre><code class=\"cpp\">    SDL_StopTextInput();   }  SDL_DestroyWindow(window);  TTF_Quit();  SDL_Quit();  }<\/code><\/pre>\n<p><a href=\"https:\/\/www.dropbox.com\/sh\/welukvo9tt7140f\/AADWMMAcbnmBrhKz-tMb6IPBa?dl=0\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/580858\/\" rel=\"noopener noreferrer nofollow\">&lt;&lt; \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0443\u0440\u043e\u043a<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/581790\/\"> https:\/\/habr.com\/ru\/articles\/581790\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043a\u0430\u0440\u0442\u0443, \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0440\u0430\u043d \u043f\u043e \u043d\u0435\u0439, \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<p>\u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#include&lt;SDL2\/SDL.h>  #include&lt;SDL2\/SDL_image.h>  #include&lt;SDL2\/SDL_ttf.h>  #include&lt;stdlib.h>    int main(void)  {    SDL_Init(SDL_INIT_VIDEO);    TTF_Init();       SDL_Window* window = SDL_CreateWindow(\"Dune_the_best\", SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,490,SDL_WINDOW_SHOWN);    SDL_Renderer* gRenderer = SDL_CreateRenderer(window,-1,SDL_RENDERER_ACCELERATED);       SDL_Color textColor = {0,255,0};    TTF_Font* textFont = TTF_OpenFont(\"v_DigitalStrip_v1.5.ttf\",18);      SDL_Surface* image = SDL_LoadBMP(\"hw.bmp\");    SDL_Surface* textSurface = NULL;      SDL_Texture* groundTexture = SDL_CreateTextureFromSurface(gRenderer,image);    SDL_Texture* textTexture = NULL; <\/code><\/pre>\n<p>\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0438\u0434\u0435\u043e, \u0448\u0440\u0438\u0444\u0442\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b.<\/p>\n<pre><code class=\"cpp\">  SDL_Rect cameraPosition = {100,100,300,300};   SDL_Rect textPosition = {5,450,100,20};   SDL_Rect minimap = {540,0,100,100};   SDL_Rect brickVision = { 563,13,45,45};  <\/code><\/pre>\n<p>\u0437\u0430\u0434\u0430\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043a\u0430\u043c\u0435\u0440\u044b, \u0442\u0435\u043a\u0441\u0442\u0430, \u043c\u0438\u043d\u0438\u043a\u0430\u0440\u0442\u044b(<strong>minimap<\/strong>) \u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0444\u043e\u043d\u043e\u0432\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f(<strong>brickVision)<\/strong><\/p>\n<pre><code class=\"cpp\">  int quit = 0,x = 330, y = 240; \/\/x \u0438 y \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u044b\u0448\u0438    char* inputText; inputText=(char*)malloc(40);    int lengthText = 0; SDL_Event e;   while(!quit)   {    SDL_StartTextInput();      while(SDL_PollEvent(&amp;e) != 0)     {  if(e.type == SDL_QUIT) {         quit = 1; <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0435\u043a\u0435\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439(<strong>SDL_Event<\/strong>), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430( <strong>SDL_StartTextInput<\/strong>) \u0438 \u0446\u0438\u043a\u043b \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430<\/p>\n<pre><code class=\"cpp\">     }else if(e.type == SDL_KEYDOWN) {        switch(e.key.keysym.sym)       {         case SDLK_UP:         if (cameraPosition.y > 0)cameraPosition.y = cameraPosition.y -5;             brickVision.y = brickVision.y -1;        break;         case SDLK_DOWN:        if (cameraPosition.y &lt; 200) cameraPosition.y = cameraPosition.y +5;             brickVision.y = brickVision.y +1;        break;         case SDLK_LEFT:        if (cameraPosition.x >= 0)cameraPosition.x = cameraPosition.x -5;             brickVision.x = brickVision.x -1;        break;         case SDLK_RIGHT:         if (cameraPosition.x &lt; 340) cameraPosition.x = cameraPosition.x +5;             brickVision.x = brickVision.x +1;        break; <\/code><\/pre>\n<p>\u0414\u0432\u0438\u0433\u0430\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u0443 \u043f\u043e \u043c\u0438\u043d\u0438\u043a\u0430\u0440\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438<\/p>\n<pre><code class=\"cpp\">      case SDLK_RETURN:        if(lengthText>0) {          *inputText = '\\0';           inputText -=lengthText;           textSurface = TTF_RenderText_Solid(textFont,inputText,textColor);           textPosition.w = textSurface->w;           textPosition.h = textSurface->h;           textTexture = SDL_CreateTextureFromSurface(gRenderer,textSurface);           lengthText = 0;         }           break;       }       }else if (e.type == SDL_TEXTINPUT) {       *inputText = *e.text.text;             inputText++;             lengthText++;  <\/code><\/pre>\n<p>\u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 Enter(<strong>SDLK_RETURN<\/strong>), \u0442\u043e \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0431\u0443\u0444\u0435\u0440 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0438 \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u0431\u0443\u0444\u0435\u0440, \u0435\u0441\u043b\u0438 \u0436\u0435 \u043d\u0430\u0436\u0430\u0442\u0430 \u043a\u0430\u043a\u0430\u044f \u0442\u043e \u0431\u0443\u043a\u0432\u0430(<strong>SDL_TEXTINPUT<\/strong>), \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440(<strong>inputText<\/strong>).<\/p>\n<pre><code class=\"cpp\">      } else if(e.type == SDL_MOUSEMOTION) {           SDL_GetMouseState(&amp;x,&amp;y);       }          }   if (x &lt; 105 &amp;&amp; cameraPosition.x >= 0) {             cameraPosition.x = cameraPosition.x -5;             brickVision.x = brickVision.x -1;              SDL_Delay(10);       }         if (x > 505 &amp;&amp; cameraPosition.x &lt;  340) {             cameraPosition.x = cameraPosition.x + 5;             brickVision.x = brickVision.x +1;              SDL_Delay(10);       }           if (y &lt; 100 &amp;&amp; cameraPosition.y >= 0) {              brickVision.y = brickVision.y -1;              cameraPosition.y = cameraPosition.y -5;             SDL_Delay(10);           }           if ( y > 360 &amp;&amp; cameraPosition.y &lt;  210) {             brickVision.y = brickVision.y +1;             cameraPosition.y = cameraPosition.y + 5;             SDL_Delay(10);           } <\/code><\/pre>\n<p>\u0434\u0432\u0438\u0433\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d \u043c\u044b\u0448\u043a\u043e\u0439, \u043f\u043e \u043a\u0440\u0430\u044e \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code>    SDL_RenderClear(gRenderer);          SDL_RenderCopy(gRenderer,groundTexture,&amp;cameraPosition,NULL);      SDL_RenderCopy(gRenderer,groundTexture,NULL,&amp;minimap);     SDL_SetRenderDrawColor(gRenderer,0x00,0xFF,0x00,0xFF);     SDL_RenderDrawRect(gRenderer,&amp;brickVision);     SDL_RenderCopy(gRenderer,textTexture,NULL,&amp;textPosition);     SDL_RenderPresent(gRenderer); <\/code><\/pre>\n<p>\u041e\u0447\u0438\u0449\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<pre><code class=\"cpp\">    SDL_StopTextInput();   }  SDL_DestroyWindow(window);  TTF_Quit();  SDL_Quit();  }<\/code><\/pre>\n<p><a href=\"https:\/\/www.dropbox.com\/sh\/welukvo9tt7140f\/AADWMMAcbnmBrhKz-tMb6IPBa?dl=0\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/580858\/\" rel=\"noopener noreferrer nofollow\">&lt;&lt; \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0443\u0440\u043e\u043a<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/581790\/\"> https:\/\/habr.com\/ru\/articles\/581790\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-385846","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385846"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385846\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}