Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < 3; i++) {
- int j = 0;
- for (int x = 0; x < this->width; x++) {
- for (int y = 0; y < this->height; y++) {
- if (this->tiles[i][j] != 0) {
- 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);
- }
- j++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment