arreglat el CMakeLists.txt per a windows
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <SDL3/SDL.h>
|
||||
#include <cmath>
|
||||
|
||||
@@ -55,10 +56,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
float dist = sqrt(i * i + j * j);
|
||||
float z = cos((dist / 40 - time) * M_PI * 2) * 6;
|
||||
const int x = rad + i + dx;
|
||||
const int y = rad + j - z + dy;
|
||||
if (x < WIDTH && y < HEIGHT && x >= 0 && y >= 0)
|
||||
surface[x + y * WIDTH] = 1;
|
||||
const int X = rad + i + dx;
|
||||
const int Y = rad + j - z + dy;
|
||||
if (X < WIDTH && Y < HEIGHT && X >= 0 && Y >= 0)
|
||||
surface[X + Y * WIDTH] = 1;
|
||||
}
|
||||
|
||||
// Vuelca la surface a la textura
|
||||
@@ -68,9 +69,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
SDL_UnlockTexture(texture);
|
||||
|
||||
SDL_RenderTexture(renderer, texture, nullptr, nullptr);
|
||||
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user