atm959

Wow

Sep 1st, 2019
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. for (int i = 0; i < 3; i++) {
  2. int j = 0;
  3. for (int x = 0; x < this->width; x++) {
  4. for (int y = 0; y < this->height; y++) {
  5. if (this->tiles[i][j] != 0) {
  6. this->renderer->renderImagePart((x * LEVEL_TILE_SIZE) + (this->scrollX / (i + 1)), (y * LEVEL_TILE_SIZE) + (this->scrollY / (i + 1)), LEVEL_TILE_SIZE, LEVEL_TILE_SIZE, ((this->tiles[i][j] - 1) % 2) * 16, ((this->tiles[i][j] - 1) / 2) * 16, (((this->tiles[i][j] - 1) % 2) * 16) + 16, (((this->tiles[i][j] - 1) / 2) * 16) + 16);
  7. }
  8. j++;
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment