public void renderWall(int[] p1, int[] p2, int[] p3, int[] p4, double zDiff, double z0, double z1, double x0, double x1, BufferedImage image, boolean alphaEnabled){

        Screen screen = raycaster.getBuffer();

        double topYDiff = p2[1] - p1[1];
        double topXDiff = p2[0] - p1[0];

        double topGrad = topYDiff / topXDiff;

        double bottomYDif = p3[1] - p4[1];
        double bottomXDif = p3[0] - p4[0];

        double bottomGrad = bottomYDif / bottomXDif;

        int pX = p1[0];
        if(pX < 0){
            pX = 0;
        }
        int pX2 = p2[0];
        if(pX2 > screen.getWidth()){
            pX2 = screen.getWidth();
        }

        for(double xPos = pX; xPos < pX2; xPos++){

            double xPoint = xPos - p1[0];

            int y1 = p1[1] + (int)(xPoint * topGrad);
            int y2 = p4[1] + (int)(xPoint * bottomGrad);

            int pY1 = y1;
            int pY2 = y2;

            if(pY1 < 0){
                pY1 = 0;
            }
            if(pY2 > screen.getHeight()){
                pY2 = screen.getHeight();
            }

            double xGrad = xPoint / topXDiff;
            double xTexGrad = ((1 - xGrad) * x0) + (xGrad * x1);
            double zTexInterp = getXTexture(xTexGrad, z0, z1);
            int xTex = (int)(zTexInterp * ((double)image.getWidth()));

            double z = (zTexInterp * zDiff) + z0;

            double yDiff = pY2 - pY1;
            double yTexGrad = ((double)image.getHeight()) / (y2 - y1);

            for(int y = 0; y < yDiff; y++){

                int yTex = (int)(((double)y + (pY1 - y1)) * yTexGrad);

                int xPix = (int)xPos;
                int yPix = y + pY1;

                int tex = image.getRGB(xTex, yTex);

                int colour = 0;
                int alpha = (tex >> 24) & 0xFF;

                if(alpha == 0){
                    continue;
                }

                if(alphaEnabled == true) {
                    colour = Shader.getColourBlend(Shader.getColour(tex, z), xPix, yPix, screen, table.alpha(alpha), this.table);
                }else{
                    colour = Shader.getColour(image.getRGB(xTex, yTex), z);
                }

                if(colour == 0){
                    continue;
                }

                screen.setPixel(xPix, yPix, colour, z);
            }

        }

    }