warnings silenciats
This commit is contained in:
@@ -13,7 +13,7 @@ void create_rock(int size, int x = 0, int y = 0) {
|
||||
int i = 0; while (i<20 && model[i].num_lines > 0) { i++; }
|
||||
model[i].num_lines = 8;
|
||||
model[i].size = size; //900
|
||||
if (x == 0) { model[i].pos = { 100+rand()%600, 100+rand()%400 }; } else { model[i].pos = { x, y }; }
|
||||
if (x == 0) { model[i].pos = { float(100+rand()%600), float(100+rand()%400) }; } else { model[i].pos = { float(x), float(y) }; }
|
||||
model[i].angle = rand()%360;
|
||||
model[i].speed = { (rand()%10) * (4-size) * 0.1f * SDL_cosf(model[i].angle*M_PI/180.0f), (rand()%10) * (3-size) * 0.1f * SDL_sinf(model[i].angle*M_PI/180.0f) };
|
||||
float da = 0.0f;
|
||||
@@ -90,8 +90,8 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
wl[model[i].num_lines] = wl[0];
|
||||
SDL_RenderDrawLinesF(sdlRenderer, wl, model[i].num_lines+1);
|
||||
if (bullet[i].ttl > 0) { SDL_Rect rect { bullet[i].pos.x, bullet[i].pos.y, 2, 2}; SDL_RenderDrawRect(sdlRenderer, &rect); }
|
||||
if (debris[i].ttl > 0) { SDL_Rect rect { debris[i].pos.x, debris[i].pos.y, 2, 2}; SDL_RenderDrawRect(sdlRenderer, &rect); }
|
||||
if (bullet[i].ttl > 0) { SDL_Rect rect { int(bullet[i].pos.x), int(bullet[i].pos.y), 2, 2}; SDL_RenderDrawRect(sdlRenderer, &rect); }
|
||||
if (debris[i].ttl > 0) { SDL_Rect rect { int(debris[i].pos.x), int(debris[i].pos.y), 2, 2}; SDL_RenderDrawRect(sdlRenderer, &rect); }
|
||||
}
|
||||
SDL_RenderPresent(sdlRenderer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user