DEADSOFTWARE

Исправлено падение скорости после разгона от звезды, изменён баланс, звезда выглядит...
[netwar.git] / netwar.c
index 44e8725cc6ff9c117784d59b64472fd207d491a2..b7c2222b212be1a1511e8a0af5167770053ab1a6 100644 (file)
--- a/netwar.c
+++ b/netwar.c
@@ -88,7 +88,7 @@ static void closewindow() {
 }
 
 static void paintmodel(const float * model, int modelsz, float mx, float my, float r, float size, int cx, int cy) {
-       int scale = (WIDTH + HEIGHT) / 2 * size;
+       int scale = (WIDTH + HEIGHT) / 2 * size / 2;
 
        int count = modelsz / sizeof(model[0]) / 2;
        int x = mx * WIDTH  / 2;
@@ -115,7 +115,12 @@ static void paintwindow() {
        int cy = HEIGHT / 2;
 
        SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0xFF, 0x00);
-       paintmodel(star, sizeof(star), 0, 0, 0, STAR_SIZE, cx, cy);
+
+       static float start_r;
+       for(int i = 0; i < STAR_SIZE * 200; i++)
+               paintmodel(star, sizeof(star), 0, 0, M_PI / i + start_r, STAR_SIZE, cx, cy);
+
+       start_r += 0.0001;
 
        for(int i = 0; i < MAX_PLAYERS; i++) {
                if(i == cl_playerid)