All pastes #169158 Raw Edit

Untitled

public cpp v1 · immutable
·published 2006-09-13 17:55 UTC
rendered paste body
if(event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_SPACE) {  n = 0;  while(shootThread[n] != NULL) {    n++;    if(n == 6)      break;  }		     if(n != 6) {    player.pressShoot();    x = player.getX();		      if(player.getDir() == 0)      x = x - 14;    else      x = x + knight.getWidth() + 2;    y = player.getY() + (player.getY() / 2) - 10			    Bullet bullet(x, y, screen, background, "bullet.png");			    bullet.addtoSurface();    shootD.dir = player.getDir();    shootD.speed = 5;    shootD.bullet = •    shootThread[n] = SDL_CreateThread(shoot, &shootD);  }}