source/src/graphics.c
uint8_t fadecgb()
{
    //fadestep out of range return true
    if (fadeStep > fadeSteps)
    {
        return 1;
    }
    else
    {
         //fade based on what we need todo (in/out)
        if(fadeCounter == 1)
        {
            if(fadein)
            {
                fadeInCGB();
            }
            else
            {
                fadeOutCGB();
            }
        }

        //inc fadecounter 
        fadeCounter++;
        //if fadecounter reaches skip limit 
        if(fadeCounter == startFade)
        {
            //increase fade step & reset fadecounter
            fadeStep++;
            fadeCounter = 1;
        }
        return 0;
    }
}
//fade function for color gameboy need to set fadecounter first using above function
fade function for color gameboy need to set fadecounter first using above function
fade function for color gameboy need to set fadecounter first using above function
uint8_t fadecgb()
{
    if (fadeStep > fadeSteps)
    {
        return 1;
    }
    else
    {
        if(fadeCounter == 1)
        {
            if(fadein)
            {
                fadeInCGB();
            }
            else
            {
                fadeOutCGB();
            }
        }
        fadeCounter++;
        if(fadeCounter == startFade)
        {
            fadeStep++;
            fadeCounter = 1;
        }
        return 0;
    }
}
uint8_t fadecgb ( ) { if ( fadeStep > fadeSteps ) { return 1 ; } else { if ( fadeCounter == 1 ) { if ( fadein ) { fadeInCGB ( ) ; } else { fadeOutCGB ( ) ; } } fadeCounter ++ ; if ( fadeCounter == startFade ) { fadeStep ++ ; fadeCounter = 1 ; } return 0 ; } }
fade function for color gameboy need to set fadecounter first using above function
fade function for color gameboy need to set fadecounter first using above function
//fadestep out of range return true //fade based on what we need todo (in/out) //inc fadecounter  //if fadecounter reaches skip limit  //increase fade step & reset fadecounter