/* ************************************************************************** */ /* _____ _ */ /* ML_background.c |_ _|__ _ _| |__ ___ _ _ */ /* | Project : CaphiOS | |/ _ \| | | | '_ \ / _ \ | | | */ /* | | (_) | |_| | | | | __/ |_| | */ /* By: thomas |_|\___/ \__,_|_| |_|\___|\__, |.fr */ /* Last updated: 2016/05/23 23:38:59 |___/ */ /* */ /* ************************************************************************** */ #include /* ** ML_background: ** Draws a sprite on the whole screen. ** @bmp: link to the bmp data (must be 128*16 bytes long) */ void ML_background(const void *bmp, ML_Mode mode) { unsigned int *v = ML_vram_address(); const unsigned int *b = bmp; int w = 0; switch (mode) { case ML_MAND: for (; w < 256; w++) *v++ &= *b++; break; case ML_MOR: for (; w < 256; w++) *v++ |= *b++; break; case ML_MXOR: for (; w < 256; w++) *v++ ^= *b++; break; } }